Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Element

The Element interface represents a game element with additional functionality beyond basic nodes. Elements can have facets, class lists, and other game-specific features.

Properties

classList

Array<string>
An array of CSS class names applied to this element.

Methods

getFacet(name: string)

Retrieves a facet with the specified name (matched against the child's tag) from this element. Only meaningful when this.isFaceted === true (declared at construction time).

NameTypeDescription
namestringThe facet's tag name (e.g. 'front', 'back', 'hand').
Returns

Facet | null - The facet if found, null otherwise.