For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/PrimitiveShapesManager.md.

Class: PrimitiveShapesManager

Beta

Primitive Shapes class used to allow adding and removing text primitives to the world.

Properties

maxShapes

readonly maxShapes: number

Beta

Remarks

This is the maximum number of allowed primitive shapes.

Methods

addText()

addText(text, dimension?): void

Beta

Parameters

text

TextPrimitive

The text primitive to be added.

dimension?

Dimension

Returns

void

Remarks

Adds a new text primitive to the world.

Throws

This function can throw errors.

EngineError

PrimitiveShapeError


getShapes()

getShapes(options?): PrimitiveShape[]

Beta

Parameters

options?

PrimitiveShapeQueryOptions

Optional options for querying existing shapes to narrow down the results.

Returns

PrimitiveShape[]

Remarks

Fetches and queries all primitive shapes stored in the manager and returns the results as an array of shape handles.


removeAll()

removeAll(): void

Beta

Returns

void

Remarks

Removes all text primitives from the world.


removeText()

removeText(text): void

Beta

Parameters

text

TextPrimitive

Returns

void

Remarks

Removes an instance of a text primitive from the world. This is equivalent to calling remove on the text itself.