Is sent in each frame, before the frame is rendered, to allow the user to perform any per frame activity (i.e. moving objects on the terrain).
SGWorld.attachEvent(“onFrame”, myOnFrame);
function myOnFrame(elapsed)
Parameter |
Description |
elapsed |
Time in seconds elapsed from the previous frame |
Remarks
The 3D window is constantly rendering its content. In each render pass (frame), just before the frame is drawn to the 3D window, the Skyline Globe Control fires an event to give the user the opportunity to perform any per frame activity. For example, the user can update the position of an object on the terrain to create motion. Alternatively, he can query the camera position to display it on a 2D map or to know if the camera is moving.