Skip to content

@modoki/engine / index / Canvas2D

Variable: Canvas2D

const Canvas2D: Trait<{ referenceHeight: number; referenceWidth: number; scaleMode: Canvas2DScaleMode; }>

Canvas2D — marks a UIElement as hosting a 2D PixiJS canvas. The entity must also have RenderableUI + UIElement (for DOM positioning). Child entities with Renderable2D are rendered into this canvas.

Built with Modoki.