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 ContextAPI constmyContext : ContextAPI = webvis.createContext( "example" )
// Define your frame listener constmyFrameListener : FrameListener = ( time : number, elapsed : number ) => { console.log(`Current time ${time} ms. Time since last call ${elapsed} ms.`); };
// Register your frame listener myContext.registerFrameListener( myFrameListener );
// Unregister your frame listener myContext.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