MotionScript

@motion-script/core


@motion-script/core / Render2DContext

Abstract Class: Render2DContext

Defined in: render/render-context.ts:108

Low-level shape-drawing API. Shapes are no longer declared directly on the context — they are built with a Graphics command list and submitted via draw. Multiple shapes chained on a Graphics before a paint call are combined into a single surface and painted together.

ctx.draw(new Graphics().ellipse(...).rect(...).fill(...)); // shared surface

Extended by

Constructors

Constructor

new Render2DContext(): Render2DContext

Returns

Render2DContext

Methods

draw()

abstract draw(graphics): void

Defined in: render/render-context.ts:110

Paint a built Graphics command list against this context.

Parameters

graphics

Graphics

Returns

void