Class: GraphicsComponent
Declarative 2D vector drawing. GraphicsRenderSystem rebuilds the backend resource whenever shapes is reassigned. Painter's-algorithm draw order; coordinates are entity-local.
The auto-dirty setter compares by reference, so mutating the array in place is invisible. Reassign at the end if you tweak shapes incrementally.
Extends
Constructors
Constructor
ts
new GraphicsComponent(): GraphicsComponent;Returns
GraphicsComponent
Inherited from
Properties
| Property | Modifier | Type | Default value | Description | Inherited from |
|---|---|---|---|---|---|
dirty | public | boolean | true | - | Component.dirty |
enabled | public | boolean | true | - | Component.enabled |
material | public | string | undefined | Material slot (MaterialFields.ts). | - |
materialValues | public | Record<string, unknown> | undefined | - | - |
shapes | public | GraphicsShape[] | undefined | - | - |