@novorender/api / RenderStateDynamicObject
Interface: RenderStateDynamicObject
Defined in: @novorender/src/core3d/state/dynamic.ts:282
Dynamic object related render state.
Properties
baseObjectId?
readonly optional baseObjectId: number;
Defined in: @novorender/src/core3d/state/dynamic.ts:298
What base object id/index to use for object instances.
instances
readonly instances: readonly RenderStateDynamicInstance[];
Defined in: @novorender/src/core3d/state/dynamic.ts:295
Object instances
Remarks
Instances renders the same mesh once for reach instance at a unique position and rotation. This is accomplished by using GPU instancing, which means there is very little overhead per instance. As long as the total triangle count remains tolerable, thousands of instances is no problem.
See
https://learnopengl.com/Advanced-OpenGL/Instancing
mesh
readonly mesh: RenderStateDynamicMesh;
Defined in: @novorender/src/core3d/state/dynamic.ts:284
What mesh to render.