Skip to content

ShapesAPI

Defined in: packages/threeplay/src/plugins/shapes/types.ts:85

API of the shapes plugin.

box(width?, height?, depth?, opts?): PrimitiveComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:86

number

number

number

ShapeOpts

PrimitiveComp


capsule(radius?, height?, opts?): PrimitiveComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:89

height is the total height, including the round caps.

number

number

ShapeOpts

PrimitiveComp


color(c?, g?, b?): ColorComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:97

Component: color of the shape (or HUD element).

ColorLike

number

number

ColorComp


cone(radius?, height?, opts?): PrimitiveComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:91

number

number

ShapeOpts

PrimitiveComp


cylinder(radius?, height?, opts?): PrimitiveComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:90

number

number

ShapeOpts

PrimitiveComp


material(opts): Comp & object

Defined in: packages/threeplay/src/plugins/shapes/types.ts:101

Component: replaces the material of the shape.

Material<MaterialEventMap> | MaterialOpts

Comp & object


mesh(geometry, material?, opts?): PrimitiveComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:95

Any three.js geometry and (optional) material.

BufferGeometry

Material<MaterialEventMap>

ShapeOpts

PrimitiveComp


opacity(value?): OpacityComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:99

Component: opacity 0–1.

number

OpacityComp


plane(width?, depth?, opts?): PrimitiveComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:93

A flat rectangle on the XZ plane (a floor), facing up.

number

number

ShapeOpts

PrimitiveComp


sphere(radius?, opts?): PrimitiveComp

Defined in: packages/threeplay/src/plugins/shapes/types.ts:87

number

ShapeOpts

PrimitiveComp