Skip to main content

@novorender/web_app / createCubeObject

Function: createCubeObject()

function createCubeObject(material?): RenderStateDynamicObject

Experimental

Create a simple cube mesh object.

Parameters

ParameterTypeDescription
material?RenderStateDynamicMaterialThe material to use, or undefined for default material.

Returns

RenderStateDynamicObject

Example

const cube = createCubeObject();
view.modifyRenderState({ dynamic: { objects: [cube] } });

Defined in

@novorender/web_app/geometry.ts:47