Skip to content

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 ​

Component.constructor

Properties ​

PropertyModifierTypeDefault valueDescriptionInherited from
dirtypublicbooleantrue-Component.dirty
enabledpublicbooleantrue-Component.enabled
materialpublicstringundefinedMaterial slot (MaterialFields.ts).-
materialValuespublicRecord<string, unknown>undefined--
shapespublicGraphicsShape[]undefined--

© 2026 PlayAdGentic