createPlane

createPlane

Creates a square plane primitive and adds it to the scene.

Signature

createPlane(options?: CreatePrimitiveOptions): Promise<SceneObject>

Parameters

Parameter
Type
Required
Description

options

No

Transform and primitive-specific settings

PrimitiveSquarePlaneSettings fields

Field
Type
Description

width

number

Width

depth

number

Depth

widthSegments

number

Segments along width

depthSegments

number

Segments along depth

roundnessEnabled

boolean

Enable rounded corners

roundnessRadius

number

Roundness radius

roundnessRadiusSegments

number

Segments for roundness

computeNormals

boolean

Recompute normals

Returns

Promise<SceneObject> - the created object.

Examples

Last updated