Shared Types
Common type shapes referenced across modules. All coordinates are in logical pixels unless noted.
Point
{ x: number, y: number }Rect
Axis-aligned bounding box:
{ min: Point, max: Point }Colour
[r: number, g: number, b: number, a: number] where each component is 0..1ShaderDef
{ vert: string, frag: string, blend?: BlendMode } — absolute paths to SPIR-V shaders plus an optional blend modeBlendMode
'premultiplied-alpha' | 'opaque' | 'additive' | 'alpha'. Default is 'premultiplied-alpha'.TextureSemantic
'color-srgb-premul' | 'data-linear-no-premul'. Default is 'color-srgb-premul'; use data-linear for normals/height/data textures.WindowId
number (uint32)ElementId
numberValidation notes #
- Many API functions accept objects with optional fields. A field is considered present if the module checks for truthiness and then casts. Always supply the correct type when present.
- Numeric enums (e.g., engine run states) are documented on the relevant page.