Skip to content

col

const col: object

Defined in: math/color.ts:17

readonly clone(c): Color

Color

Color

readonly create(r?, g?, b?, a?): Color

number = 0

number = 0

number = 0

number = 1

Color

readonly equals(a, b, epsilon?): boolean

Color

Color

number = 1e-6

boolean

readonly from255(r, g, b, a?): Color

From 0..255 channels (alpha defaults opaque).

number

number

number

number = 255

Color

readonly fromHex(hex): Color

Parse #rgb / #rgba / #rrggbb / #rrggbbaa (with or without #) to a 0..1 Color (alpha defaults opaque). Throws on malformed input.

string

Color

readonly lerp(a, b, t): Color

Per-channel linear interpolate a→b by t (t not clamped).

Color

Color

number

Color

readonly multiply(a, b): Color

Per-channel multiply (tint).

Color

Color

Color

readonly rgb(r, g, b): Color

Opaque color from RGB (0..1).

number

number

number

Color

readonly scaleRgb(c, s): Color

Scale RGB by s (alpha unchanged).

Color

number

Color

readonly toHex(c, withAlpha?): string

Format as #rrggbb (or #rrggbbaa when withAlpha). Clamps to [0,1].

Color

boolean = false

string

readonly withAlpha(c, a): Color

Color

number

Color

core-sys.ts

Engine infrastructure surface: platform, lifecycle, logging, diagnostics, timers, entity helpers, networking, screen.

These are the “runs under everything else” primitives that a consuming application might touch (logging, timers, platform detection, runtime config) but that are not directly part of the ECS or render pipeline.

Re-exported wholesale by core.ts.