Skip to main content

@novorender/api / createSphereObject

Function: createSphereObject()

function createSphereObject(detail, material?): RenderStateDynamicObject;

Defined in: @novorender/src/web_app/geometry.ts:168

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] } });