Skip to main content

DOMEntity

A component that renders a DOM element at the position of an entity.

Definition​

function DOMEntity(
__namedParameters: PropsWithChildren<{
entity: Entity | null;
anchor?: Anchor;
scaleFactor?: number;
}>,
): Element | null;

Properties​

children

ReactNode

The children of the DOMEntity component.

entity

Entity | null

The entity to render the DOM element at the position of.

anchor

Anchor

The anchor of the DOM element.

scaleFactor

number

The scale factor of the DOM element.

Returns​

Element | null

The DOMEntity component.

Examples​

Loading samples...