Abstract Class: AnimationLoopTemplate
Defined in: modules/engine/src/animation-loop/animation-loop-template.ts:22
Minimal class that represents a "componentized" rendering life cycle (resource construction, repeated rendering, resource destruction)
Note
A motivation for this class compared to the raw animation loop is that it simplifies TypeScript code by allowing resources to be typed unconditionally since they are allocated in the constructor rather than in onInitialized
Note
Introduced in luma.gl v9
Example
AnimationLoopTemplate is intended to be subclassed,
but the subclass should not be instantiated directly. Instead the subclass
(i.e. the constructor of the subclass) should be used
as an argument to create an AnimationLoop.
Constructors
Constructor
new AnimationLoopTemplate(
animationProps?):AnimationLoopTemplate
Defined in: modules/engine/src/animation-loop/animation-loop-template.ts:23
Parameters
animationProps?
Returns
AnimationLoopTemplate
Methods
onFinalize()
abstractonFinalize(animationProps):void
Defined in: modules/engine/src/animation-loop/animation-loop-template.ts:28
Parameters
animationProps
Returns
void
onInitialize()
onInitialize(
animationProps):Promise<unknown>
Defined in: modules/engine/src/animation-loop/animation-loop-template.ts:24
Parameters
animationProps
Returns
Promise<unknown>
onRender()
abstractonRender(animationProps):unknown
Defined in: modules/engine/src/animation-loop/animation-loop-template.ts:27
Parameters
animationProps
Returns
unknown