Properties

viewer

protected viewer: IViewer

All extensions hold a reference to the viewer implementation instance that spawned them

Accessors

enabled

get enabled(): boolean
set enabled(value: boolean)

All extensions should implement enabling/disabling themselves

inject

get inject(): Array<Constructor<Extension>>

Gets the list of extensions that need to get injected on creation time.
This is how an extension declares that it needs other extensions injected. Injection is automatically done when calling createExtension

Methods

onEarlyUpdate

onEarlyUpdate(deltaTime?: number)

Update function called before the viewer’s update

onLateUpdate

onLateUpdate(deltaTime?: number)

Update function called after the viewer’s update

onRender

onRender();

Render function called after the viewer’s render

onResize

onResize();

Called whenever a resize happens