Skip to main content

@novorender/web_app / createSphereObject

Function: createSphereObject()

function createSphereObject(detail, material?): RenderStateDynamicObject

Experimental

Create a simple sphere mesh object.

Parameters

ParameterTypeDefault valueDescription
detailnumber5The level of tesselation, expressed as # subdivisions of the base icosahedron.
material?RenderStateDynamicMaterialundefinedThe material to use, or undefined for default material.

Returns

RenderStateDynamicObject

Example

const sphere = createSphereObject();
view.modifyRenderState({ dynamic: { objects: [sphere] } });

Defined in

@novorender/web_app/geometry.ts:127