FrameAPI#

Interface FrameAPI

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
const myContext : ContextAPI = webvis.createContext( "example" )

// Define your frame listener
const myFrameListener : 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 );

Hierarchy

Methods

  • Registers a listener function which get called once per internal update tick.

    Parameters

    Returns void


Did you find this page useful? Please give it a rating:
Thank you for rating this page!
Any issues or feedback?
What kind of problem would you like to report?
Please tell us more about what's wrong: