The FrameAPI provides functionalities to register and unregister custom callback functions which are executed on every run of the ContextAPI internal update loop.
Example
// Create an instance of the ContextAPIconstmyContext : ContextAPI = webvis.createContext( "example" )// Define your frame listenerconstmyFrameListener : FrameListener = ( time : number, elapsed : number ) =>{console.log(`Current time ${time} ms. Time since last call ${elapsed} ms.`);};// Register your frame listenermyContext.registerFrameListener( myFrameListener );// Unregister your frame listenermyContext.registerFrameListener( myFrameListener );
The FrameAPI provides functionalities to register and unregister custom callback functions which are executed on every run of the ContextAPI internal update loop.
Example