Hi, thanks for the response!
I'm having a tough time with scope from within Camera_tutorial.html Currently I'm modifying viewer.clock.onTick.addEventListener(function(clock) {
The first line is
var camera = scene.camera;
So I have no problems accessing properties and methods of the camera object.
If I try something like var mymoon = scene.moon;
I get this error: ReferenceError: Simon1994PlanetaryPositions is not defined
If I try something like var mypoint = new Cartesian3();
I get this error: ReferenceError: Cartesian3 is not defined
I've imported my own 3D math library because I don't know how to use Cesium's. However my library is array based, so I have to do stuff like convert from object to array:
var cam_pos = [camera.position.x,camera.position.y,camera.position.z];
then from array back to object
var camera_position={x:cam_pos[0],y:cam_pos[1],z:cam_pos[2]};
not truly a Cartesian3 object, but it seems to do the job.
If I knew how to use Cesium's vector math library I'd use that instead, such as cross, dot, add, subtract, normal, and projection functions. I noticed that Simon1994PlanetaryPositionsSpec.js has moon.x, moon.y, moon.z, it would be great if I had access to those properties!
I must say Camera control in Cesium is fantastic! I'm making good use out of the look,move,and rotate methods of the camera object.