Skip to main content

Global Methods

Methods available in the global scope. These methods can be called from anywhere.

This is the API for Lens Studio 4. For the latest API documentation, click here.


Methods

static getDeltaTime() : Number

Returns the time difference in seconds between the current frame and previous frame.


static getTime() : Number

Returns the time in seconds since the lens was started.


static isNull(Object reference) : Boolean

Returns true if the passed in object is null or destroyed. Useful as a safe way to check if a SceneObject or Component has been destroyed.


static print(Object message) : void

Prints out a message to the Logger window.


Examples

print('Lens time: ' + getTime());
Was this page helpful?
Yes
No