@holtjs/stage 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/{game-NqFMKsuL.d.ts → game-C6NrnZ7-.d.ts} +603 -9
- package/dist/{game-BHDcwovp.js → game-CbmA4myj.js} +601 -1427
- package/dist/headless.d.ts +10 -3
- package/dist/headless.js +45 -16
- package/dist/index.d.ts +11 -4
- package/dist/index.js +7 -3
- package/dist/joystick.d.ts +1 -1
- package/dist/joystick.js +1 -1
- package/dist/kernel.d.ts +2 -0
- package/dist/kernel.js +639 -0
- package/dist/renderer-webgpu-Bvvi5jN8.js +2618 -0
- package/dist/renderer-webgpu.d.ts +2 -0
- package/dist/renderer-webgpu.js +1 -0
- package/dist/trace.d.ts +2 -143
- package/dist/trace.js +3 -2
- package/dist/{tween-D3Ztppuz.d.ts → tween-BiF1FUvc.d.ts} +2 -0
- package/dist/tween.d.ts +1 -1
- package/dist/tween.js +4 -0
- package/dist/{types-ChGhuDNX.js → types-DRFB0Klc.js} +5 -2
- package/package.json +11 -2
- package/skills/stage/SKILL.md +11 -21
- package/skills/stage/references/subpaths.md +17 -9
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as WebGpuCanvasContextLike, Q as WebGpuBootstrapResult, X as RendererWebGpuOptions, Y as RendererWebGpu, Z as RequestWebGpuOptions, et as WebGpuDeviceLike, tt as requestWebGpuDevice } from "./game-C6NrnZ7-.js";
|
|
2
|
+
export { RendererWebGpu, RendererWebGpuOptions, RequestWebGpuOptions, WebGpuBootstrapResult, WebGpuCanvasContextLike, WebGpuDeviceLike, requestWebGpuDevice };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as RendererWebGpu, n as requestWebGpuDevice } from "./renderer-webgpu-Bvvi5jN8.js";
|
package/dist/trace.d.ts
CHANGED
|
@@ -1,143 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export interface SceneDigestNode {
|
|
4
|
-
trackId: string | null;
|
|
5
|
-
role: string | null;
|
|
6
|
-
alt: string | null;
|
|
7
|
-
surface: string | null;
|
|
8
|
-
type: string;
|
|
9
|
-
visible: boolean;
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
zIndex: number;
|
|
12
|
-
depth: number;
|
|
13
|
-
alpha: number;
|
|
14
|
-
bounds: [number, number, number, number];
|
|
15
|
-
}
|
|
16
|
-
export interface SceneDigestOverlayStats {
|
|
17
|
-
popovers: number;
|
|
18
|
-
dropdowns: number;
|
|
19
|
-
tooltipVisible: boolean;
|
|
20
|
-
toasts: number;
|
|
21
|
-
queuedToasts: number;
|
|
22
|
-
}
|
|
23
|
-
export interface SceneDigestSurfaceEntry {
|
|
24
|
-
id: string;
|
|
25
|
-
priority: number;
|
|
26
|
-
seq: number;
|
|
27
|
-
scope: string;
|
|
28
|
-
barrier: string;
|
|
29
|
-
parent: string | null;
|
|
30
|
-
}
|
|
31
|
-
export interface SceneDigestActiveFocus {
|
|
32
|
-
tag: string;
|
|
33
|
-
ui: string | null;
|
|
34
|
-
role: string | null;
|
|
35
|
-
}
|
|
36
|
-
export interface SceneDigestSurfaces {
|
|
37
|
-
active: SceneDigestSurfaceEntry[];
|
|
38
|
-
topBarrier: SceneDigestSurfaceEntry | null;
|
|
39
|
-
worldBlocked: boolean;
|
|
40
|
-
domZ: Record<string, number> | null;
|
|
41
|
-
activeFocus: SceneDigestActiveFocus | null;
|
|
42
|
-
}
|
|
43
|
-
export interface SceneDigestEngineSandbox {
|
|
44
|
-
modId: string;
|
|
45
|
-
ready: boolean;
|
|
46
|
-
uptimeMs: number;
|
|
47
|
-
renderer: string | null;
|
|
48
|
-
apps: number;
|
|
49
|
-
frames: number;
|
|
50
|
-
longFrames: number;
|
|
51
|
-
drawCalls: number;
|
|
52
|
-
texBinds: number;
|
|
53
|
-
errors: number;
|
|
54
|
-
violations: number;
|
|
55
|
-
lastHeartbeatMs: number | null;
|
|
56
|
-
}
|
|
57
|
-
export interface SceneDigestSandbox {
|
|
58
|
-
engine: SceneDigestEngineSandbox | null;
|
|
59
|
-
mountedWorkers: number;
|
|
60
|
-
}
|
|
61
|
-
export interface SceneDigest {
|
|
62
|
-
clock: EngineClockSnapshot | null;
|
|
63
|
-
traceId: string | null;
|
|
64
|
-
viewport: {
|
|
65
|
-
w: number;
|
|
66
|
-
h: number;
|
|
67
|
-
dpr: number;
|
|
68
|
-
};
|
|
69
|
-
renderer: {
|
|
70
|
-
type: string;
|
|
71
|
-
drawCalls?: number;
|
|
72
|
-
flushes?: number;
|
|
73
|
-
tris?: number;
|
|
74
|
-
culled?: number;
|
|
75
|
-
texBinds?: number;
|
|
76
|
-
sdfPanels?: number;
|
|
77
|
-
sdfDraws?: number;
|
|
78
|
-
msdfIcons?: number;
|
|
79
|
-
msdfDraws?: number;
|
|
80
|
-
pixelAaIcons?: number;
|
|
81
|
-
pixelAaDraws?: number;
|
|
82
|
-
};
|
|
83
|
-
lifecycle: SceneLifecycleStats | null;
|
|
84
|
-
tweens: TweenStats | null;
|
|
85
|
-
overlays: SceneDigestOverlayStats | null;
|
|
86
|
-
surfaces: SceneDigestSurfaces | null;
|
|
87
|
-
sandbox: SceneDigestSandbox | null;
|
|
88
|
-
displayListCount: number;
|
|
89
|
-
uiCount: number;
|
|
90
|
-
truncated: boolean;
|
|
91
|
-
nodes: SceneDigestNode[];
|
|
92
|
-
}
|
|
93
|
-
export interface SceneDigestSurfaceSource {
|
|
94
|
-
active?: () => ReadonlyArray<{
|
|
95
|
-
id: string;
|
|
96
|
-
priority: number;
|
|
97
|
-
seq: number;
|
|
98
|
-
scope: string;
|
|
99
|
-
barrier: string;
|
|
100
|
-
parent: string | null;
|
|
101
|
-
}>;
|
|
102
|
-
topBarrier?: () => {
|
|
103
|
-
id: string;
|
|
104
|
-
priority: number;
|
|
105
|
-
seq: number;
|
|
106
|
-
scope: string;
|
|
107
|
-
barrier: string;
|
|
108
|
-
parent: string | null;
|
|
109
|
-
} | null;
|
|
110
|
-
isWorldBlocked?: () => boolean;
|
|
111
|
-
domZ?: () => Record<string, number>;
|
|
112
|
-
activeFocus?: () => SceneDigestActiveFocus | null;
|
|
113
|
-
}
|
|
114
|
-
export interface SceneDigestOptions {
|
|
115
|
-
ui?: {
|
|
116
|
-
view?: {
|
|
117
|
-
w: number;
|
|
118
|
-
h: number;
|
|
119
|
-
};
|
|
120
|
-
dpr?: number;
|
|
121
|
-
registry?: {
|
|
122
|
-
api?: {
|
|
123
|
-
list?: () => Array<Record<string, any>>;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
__overlays?: {
|
|
127
|
-
stats?: () => SceneDigestOverlayStats;
|
|
128
|
-
} | null;
|
|
129
|
-
} | null;
|
|
130
|
-
surfaces?: SceneDigestSurfaceSource | null;
|
|
131
|
-
sandbox?: SceneDigestSandbox | (() => SceneDigestSandbox | null) | null;
|
|
132
|
-
traceId?: string | null;
|
|
133
|
-
dpr?: number;
|
|
134
|
-
maxNodes?: number;
|
|
135
|
-
}
|
|
136
|
-
/** Sanitize a privacy-safe semantic identifier (`trackId`, `role`, `surface`). Returns null if invalid or empty. */
|
|
137
|
-
export declare function sanitizeTrackToken(raw: unknown, maxLen?: number): string | null;
|
|
138
|
-
/**
|
|
139
|
-
* Build a privacy-safe structural snapshot of a Stage2D scene and optional UiRoot.
|
|
140
|
-
* Never reads arbitrary `TextObject.text` or user-typed strings; only emits sanitized `trackId`/`role`/`surface`
|
|
141
|
-
* tokens and explicitly declared semantic `alt` labels.
|
|
142
|
-
*/
|
|
143
|
-
export declare function buildSceneDigest(scene: Scene, opts?: SceneDigestOptions): SceneDigest;
|
|
1
|
+
import { B as SceneDigestSurfaceSource, F as SceneDigestNode, H as buildSceneDigest, I as SceneDigestOptions, L as SceneDigestOverlayStats, M as SceneDigest, N as SceneDigestActiveFocus, P as SceneDigestEngineSandbox, R as SceneDigestSandbox, U as sanitizeTrackToken, V as SceneDigestSurfaces, z as SceneDigestSurfaceEntry } from "./game-C6NrnZ7-.js";
|
|
2
|
+
export { SceneDigest, SceneDigestActiveFocus, SceneDigestEngineSandbox, SceneDigestNode, SceneDigestOptions, SceneDigestOverlayStats, SceneDigestSandbox, SceneDigestSurfaceEntry, SceneDigestSurfaceSource, SceneDigestSurfaces, buildSceneDigest, sanitizeTrackToken };
|
package/dist/trace.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./types-
|
|
1
|
+
import "./types-DRFB0Klc.js";
|
|
2
2
|
// src/trace.ts
|
|
3
3
|
const TRACK_TOKEN_RE = /^[\w:.\-/>]+$/;
|
|
4
4
|
const MAX_KEY_LEN = 64;
|
|
@@ -205,7 +205,7 @@ function buildSceneDigest(scene, opts = {}) {
|
|
|
205
205
|
};
|
|
206
206
|
walk(scene.children.list, true, 1, 0, 0);
|
|
207
207
|
const r = scene.renderer ?? scene.game?.renderer;
|
|
208
|
-
const rendererType = r?.type === 2 ? r.isWebGL2 ? "webgl2" : "webgl" : "canvas2d";
|
|
208
|
+
const rendererType = r?.type === 3 ? "webgpu" : r?.type === 2 ? r.isWebGL2 ? "webgl2" : "webgl" : "canvas2d";
|
|
209
209
|
const rStats = typeof r?.stats === "function" ? r.stats() : null;
|
|
210
210
|
const dpr = opts.dpr ?? opts.ui?.dpr ?? scene.dpr ?? 1;
|
|
211
211
|
const vw = opts.ui?.view?.w ?? Math.round((scene.scale?.width ?? 0) / (dpr || 1));
|
|
@@ -237,6 +237,7 @@ function buildSceneDigest(scene, opts = {}) {
|
|
|
237
237
|
overlays: typeof opts.ui?.__overlays?.stats === "function" ? opts.ui.__overlays.stats() : null,
|
|
238
238
|
surfaces: sanitizeSurfaces(opts.surfaces),
|
|
239
239
|
sandbox: sanitizeSandbox(opts.sandbox),
|
|
240
|
+
plugins: typeof scene.game?.kernel?.collectPluginDigests === "function" ? scene.game.kernel.collectPluginDigests() : null,
|
|
240
241
|
displayListCount: scene.children.list.length,
|
|
241
242
|
uiCount,
|
|
242
243
|
truncated,
|
|
@@ -81,6 +81,8 @@ declare class TweenManager {
|
|
|
81
81
|
private safeCall;
|
|
82
82
|
/** Start a deterministic duration-based eased tween. */
|
|
83
83
|
to(opts: TweenOptions): TweenHandle;
|
|
84
|
+
/** Alias for `to(opts)` so Phaser/KAPLAY-style `tweens.add(...)` and `tweens.to(...)` both work seamlessly. */
|
|
85
|
+
add(opts: TweenOptions): TweenHandle;
|
|
84
86
|
/** Start a sub-stepped damped harmonic spring with smooth mid-flight retargeting. */
|
|
85
87
|
spring(opts: SpringOptions): SpringHandle;
|
|
86
88
|
/** Advance all active tweens & springs by a clamped EngineClock delta in ms. */
|
package/dist/tween.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SpringHandle, c as TweenManager, i as Easings, l as TweenOptions, n as EasingFn, o as SpringOptions, r as EasingName, s as TweenHandle, t as DisposableOwner, u as TweenStats } from "./tween-
|
|
1
|
+
import { a as SpringHandle, c as TweenManager, i as Easings, l as TweenOptions, n as EasingFn, o as SpringOptions, r as EasingName, s as TweenHandle, t as DisposableOwner, u as TweenStats } from "./tween-BiF1FUvc.js";
|
|
2
2
|
export { DisposableOwner, EasingFn, EasingName, Easings, SpringHandle, SpringOptions, TweenHandle, TweenManager, TweenOptions, TweenStats };
|
package/dist/tween.js
CHANGED
|
@@ -162,6 +162,10 @@ var TweenManager = class {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
+
/** Alias for `to(opts)` so Phaser/KAPLAY-style `tweens.add(...)` and `tweens.to(...)` both work seamlessly. */
|
|
166
|
+
add(opts) {
|
|
167
|
+
return this.to(opts);
|
|
168
|
+
}
|
|
165
169
|
/** Start a sub-stepped damped harmonic spring with smooth mid-flight retargeting. */
|
|
166
170
|
spring(opts) {
|
|
167
171
|
const stiffness = Math.max(.001, Number.isFinite(opts.stiffness) ? opts.stiffness ?? 280 : 280);
|
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
const AUTO = 0;
|
|
3
3
|
const CANVAS = 1;
|
|
4
4
|
const WEBGL = 2;
|
|
5
|
+
const WEBGPU = 3;
|
|
5
6
|
const BlendModes = {
|
|
6
7
|
NORMAL: 0,
|
|
7
|
-
ADD: 1
|
|
8
|
+
ADD: 1,
|
|
9
|
+
MULTIPLY: 2,
|
|
10
|
+
SCREEN: 3
|
|
8
11
|
};
|
|
9
12
|
const TintModes = {
|
|
10
13
|
MULTIPLY: 0,
|
|
@@ -162,4 +165,4 @@ var EventEmitter = class {
|
|
|
162
165
|
return this;
|
|
163
166
|
}
|
|
164
167
|
};
|
|
165
|
-
export { EventEmitter as a, Scale as c, WEBGL as d,
|
|
168
|
+
export { rgbToCss as _, EventEmitter as a, Scale as c, WEBGL as d, WEBGPU as f, parseColor as g, packColorAbgr as h, CANVAS as i, Scenes as l, createMatrix2D as m, BLACK_RGB as n, FilterMode as o, WHITE_RGB as p, BlendModes as r, HEX_MASK as s, AUTO as t, TintModes as u };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holtjs/stage",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Zero-dependency TypeScript stage engine for 2D WebGL2/Canvas2D games, GPU SDF UI, procedural audio, tracing-native observability, and deterministic 60 FPS headless image & video rendering.",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Zero-dependency TypeScript stage engine for 2D WebGPU/WebGL2/Canvas2D games, GPU SDF UI, procedural audio, StageKernel plugins, tracing-native observability, and deterministic 60 FPS headless image & video rendering.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Botiverse, Inc.",
|
|
7
7
|
"homepage": "https://github.com/botiverse-play/stage#readme",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"keywords": [
|
|
16
16
|
"stage",
|
|
17
17
|
"stage2d",
|
|
18
|
+
"webgpu",
|
|
18
19
|
"webgl2",
|
|
19
20
|
"canvas2d",
|
|
20
21
|
"game-engine",
|
|
@@ -95,6 +96,14 @@
|
|
|
95
96
|
"./headless": {
|
|
96
97
|
"types": "./dist/headless.d.ts",
|
|
97
98
|
"default": "./dist/headless.js"
|
|
99
|
+
},
|
|
100
|
+
"./kernel": {
|
|
101
|
+
"types": "./dist/kernel.d.ts",
|
|
102
|
+
"default": "./dist/kernel.js"
|
|
103
|
+
},
|
|
104
|
+
"./webgpu": {
|
|
105
|
+
"types": "./dist/renderer-webgpu.d.ts",
|
|
106
|
+
"default": "./dist/renderer-webgpu.js"
|
|
98
107
|
}
|
|
99
108
|
},
|
|
100
109
|
"files": [
|
package/skills/stage/SKILL.md
CHANGED
|
@@ -32,13 +32,15 @@ pnpm add @holtjs/stage
|
|
|
32
32
|
| Procedural WebAudio foley DSP, stereo pan, sfxr voices, WAV | `@holtjs/stage/audio` | Yes |
|
|
33
33
|
| Dense TypedArray `SoaWorld` ECS, depth sort, 2.5D `DepthBand`s | `@holtjs/stage/ecs` | Yes |
|
|
34
34
|
| Deterministic 60 FPS headless Node PNG, storyboard & stereo video | `@holtjs/stage/headless` | Yes (with `@napi-rs/canvas`) |
|
|
35
|
+
| `StageKernel` plugins, `ActionMap`, `createInputTimeline`, replay | `@holtjs/stage/kernel` | Yes |
|
|
36
|
+
| Native WebGPU WGSL batch & SDF renderer (`RendererWebGpu`) | `@holtjs/stage/webgpu` | Browser WebGPU |
|
|
35
37
|
|
|
36
|
-
## 2. HiDPI / DPR Camera
|
|
38
|
+
## 2. One-Line HiDPI / DPR Camera & Follow Setup
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
Use `camera.configureHiDpi()` to map logical CSS pixels `(0, 0)..(vw, vh)` onto crisp physical `vw * dpr` pixels without manual origin/scroll math:
|
|
39
41
|
|
|
40
42
|
```ts
|
|
41
|
-
import { AUTO, Game, Scene, Scale, WEBGL } from '@holtjs/stage';
|
|
43
|
+
import { AUTO, Game, Scene, Scale, WEBGL, WEBGPU } from '@holtjs/stage';
|
|
42
44
|
|
|
43
45
|
class MyScene extends Scene {
|
|
44
46
|
dpr = 1;
|
|
@@ -46,25 +48,13 @@ class MyScene extends Scene {
|
|
|
46
48
|
vh = 480;
|
|
47
49
|
|
|
48
50
|
create() {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
applyDprCamera(parentEl: HTMLElement) {
|
|
53
|
-
const cap = this.game.renderer?.type === WEBGL ? 2 : 1;
|
|
54
|
-
this.dpr = Math.min(cap, Math.max(1, window.devicePixelRatio || 1));
|
|
51
|
+
const parentEl = document.getElementById('stage')!;
|
|
52
|
+
const maxDpr = this.game.renderer?.type === WEBGL || this.game.renderer?.type === WEBGPU ? 2 : 1;
|
|
55
53
|
this.vw = Math.max(300, Math.round(parentEl.clientWidth || 640));
|
|
56
54
|
this.vh = Math.max(280, Math.round(parentEl.clientHeight || 480));
|
|
57
|
-
this.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
this.game.canvas.style.width = `${this.vw}px`;
|
|
61
|
-
this.game.canvas.style.height = `${this.vh}px`;
|
|
62
|
-
}
|
|
63
|
-
const cam = this.cameras.main;
|
|
64
|
-
const ox = cam.width / 2;
|
|
65
|
-
const oy = cam.height / 2;
|
|
66
|
-
cam.setZoom(this.dpr);
|
|
67
|
-
cam.setScroll(ox / this.dpr - ox, oy / this.dpr - oy);
|
|
55
|
+
this.dpr = this.cameras.main.configureHiDpi(this.scale, this.vw, this.vh, window.devicePixelRatio || 1, maxDpr);
|
|
56
|
+
// Optional smooth camera follow:
|
|
57
|
+
// this.cameras.main.startFollow(player, { lerpX: 0.12, lerpY: 0.12, deadzoneWidth: 64, deadzoneHeight: 48 });
|
|
68
58
|
}
|
|
69
59
|
}
|
|
70
60
|
|
|
@@ -274,7 +264,7 @@ stage.destroy();
|
|
|
274
264
|
- Growing `SoaWorld` reallocates its TypedArray backing stores. After bulk `spawn()` calls that may grow capacity, re-bind `pos = world.store(Pos)` and resize any parallel `sortBuf`.
|
|
275
265
|
3. **Push spawned entities and FlowField targets out of obstacles**:
|
|
276
266
|
- Call `resolveCircleObstacles(pt, radius, obstacles)` on spawn positions and interactive targets so `flowField.compute()` always seeds from a walkable cell.
|
|
277
|
-
4. **Always register cleanup via `node.onDispose(fn)` and pass `owner` to `tweens.add()` / `tweens.spring()`**:
|
|
267
|
+
4. **Always register cleanup via `node.onDispose(fn)` and pass `owner` to `tweens.to()` (or `tweens.add()`) / `tweens.spring()`**:
|
|
278
268
|
- Destroying a parent `Container` unwinds children and disposers in strict LIFO order, preventing zombie callbacks on screen transitions.
|
|
279
269
|
5. **Respect `SurfaceTree` barriers everywhere**:
|
|
280
270
|
- Pass `canCapture: () => !surfaces.isWorldBlocked()` to `VirtualJoystick` and check `!surfaces.isWorldBlocked()` in world pointer handlers. Never invent parallel `isModalOpen` flags or hardcoded CSS `z-index` values — use `computeSurfaceDomZ()`.
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# `@holtjs/stage` Subpath API Quick Reference
|
|
2
2
|
|
|
3
|
-
All symbols verified against `src/*.ts` (`@holtjs/stage@0.
|
|
3
|
+
All symbols verified against `src/*.ts` (`@holtjs/stage@0.4.0`, 15 subpaths).
|
|
4
4
|
|
|
5
5
|
## `@holtjs/stage` (Core Engine Barrel)
|
|
6
|
-
- **Bootstrap & Lifecycle**: `Stage2D` (
|
|
7
|
-
- **Display Graph**: `DisplayList`, `DisplayObject`, `Container`, `ImageObject`, `NineSliceObject`, `TileSpriteObject`, `RectangleObject`, `PanelObject`, `MsdfIconObject`, `TextObject`, `Graphics`, `BlitterObject`, `CustomPassObject`
|
|
8
|
-
- **Renderers & GPU Batchers**: `RendererGl`, `Renderer2D`, `SdfPanelBatcher`, `MsdfIconBatcher`, `PixelAaBatcher`, `Camera`, `Texture`, `CanvasTexture`, `TextureSource`, `Frame`, `TextureManager`
|
|
9
|
-
- **
|
|
10
|
-
- **Math & Color**: `BlendModes`, `TintModes`, `FilterMode`, `WHITE_RGB`, `BLACK_RGB`, `HEX_MASK`, `createMatrix2D`, `parseColor`, `rgbToCss`, `packColorAbgr`
|
|
6
|
+
- **Bootstrap & Lifecycle**: `Stage` / `Stage2D` (namespaces), `AUTO`, `WEBGPU`, `WEBGL`, `CANVAS`, `Scale`, `Scenes`, `Game`, `Scene`, `SceneManager`, `ScaleManager`, `GameLoop`, `EngineClock`, `LoaderPlugin`, `JsonCache`, `GameObjectFactory` (`scene.add.instancedBatch`, `customPass`, `panel`, etc.)
|
|
7
|
+
- **Display Graph**: `DisplayList`, `DisplayObject`, `Container`, `ImageObject`, `NineSliceObject`, `TileSpriteObject`, `RectangleObject`, `PanelObject`, `MsdfIconObject`, `TextObject`, `Graphics`, `BlitterObject`, `InstancedBatchObject`, `CustomPassObject`
|
|
8
|
+
- **Renderers & GPU Batchers**: `RendererWebGpu`, `requestWebGpuDevice`, `RendererGl`, `Renderer2D`, `SdfPanelBatcher`, `MsdfIconBatcher`, `PixelAaBatcher`, `Camera` (`.configureHiDpi()`, `.startFollow()`, `.stopFollow()`, `.screenToWorld()`, `.worldToScreen()`), `Texture`, `CanvasTexture`, `TextureSource`, `Frame`, `TextureManager`
|
|
9
|
+
- **Kernel & Input**: `StageKernel`, `ActionMap`, `createInputTimeline`, `createInputRecorder`, `createInputReplay`, `EventEmitter`, `Pointer`, `KeyboardPlugin` (`.isDown()`, `.justPressed()`, `.justReleased()`, `.injectKey()`), `InputPlugin`
|
|
10
|
+
- **Math & Color**: `BlendModes` (`NORMAL`, `ADD`, `MULTIPLY`, `SCREEN`), `TintModes`, `FilterMode`, `WHITE_RGB`, `BLACK_RGB`, `HEX_MASK`, `createMatrix2D`, `parseColor`, `rgbToCss`, `packColorAbgr`
|
|
11
11
|
- **Bundled UI/Observability Re-exports**: `computeFlexLayout`, `computeWrapLayout`, `resolvePadding`, `Easings`, `TweenManager`, `VirtualJoystick`, `clampJoystickOrigin`, `computeJoystickVector`, `isInJoystickZone`, `pullJoystickOrigin`, `quantizeJoystickDpad`, `SURFACE_BAND`, `createSurfaceTree`, `resolveSurfacePriority`, `surfacePriorityToDomZ`, `computeSurfaceDomZ`, `buildSceneDigest`, `sanitizeTrackToken`
|
|
12
12
|
|
|
13
13
|
## `@holtjs/stage/flex` (~2.3 kB gz · zero DOM)
|
|
@@ -17,8 +17,8 @@ All symbols verified against `src/*.ts` (`@holtjs/stage@0.2.2`).
|
|
|
17
17
|
- Types: `FlexDir`, `FlexAlign`, `FlexJustify`, `FlexPadding`, `FlexContainerSpec`, `FlexItemSpec`, `FlexItemRect`, `FlexResult`, `WrapJustify`, `WrapContainerSpec`, `WrapItemSpec`, `WrapItemRect`, `WrapResult`
|
|
18
18
|
|
|
19
19
|
## `@holtjs/stage/tween` (~1.4 kB gz · zero DOM)
|
|
20
|
-
- `TweenManager`: `.add(opts)
|
|
21
|
-
- `Easings`: standard easing functions (`linear`, `
|
|
20
|
+
- `TweenManager`: `.to(opts)` (and `.add(opts)` alias), `.spring(opts)`, `.step(deltaMs)`, `.clear()`, `.stats()`
|
|
21
|
+
- `Easings`: standard easing functions (`linear`, `inQuad`, `outQuad`, `inOutQuad`, `inCubic`, `outCubic`, `inOutCubic`, `outQuart`, `inOutSine`, `outBack`)
|
|
22
22
|
- Types: `EasingFn`, `EasingName`, `DisposableOwner`, `TweenOptions`, `SpringOptions`, `TweenHandle`, `SpringHandle`, `TweenStats`
|
|
23
23
|
|
|
24
24
|
## `@holtjs/stage/joystick` (~4.4 kB gz)
|
|
@@ -70,5 +70,13 @@ All symbols verified against `src/*.ts` (`@holtjs/stage@0.2.2`).
|
|
|
70
70
|
|
|
71
71
|
## `@holtjs/stage/headless`
|
|
72
72
|
|
|
73
|
-
- Functions: `createHeadlessStage`, `renderStoryboard`, `createAudioTimeline`
|
|
73
|
+
- Functions: `createHeadlessStage` (with `.step()`, `.fastForward()`, `.pointerDown/Move/Up()`, `.keyDown/Up()`, `.recordFrames()`), `renderStoryboard`, `createAudioTimeline`
|
|
74
74
|
- Types: `HeadlessCanvasLike`, `CreateHeadlessCanvas`, `HeadlessStageOptions`, `HeadlessRecordedFrame`, `RecordFramesOptions`, `HeadlessStage`, `StoryboardOptions`, `StoryboardResult`, `AudioCueOptions`, `AudioTimelineOptions`, `AudioTimeline`
|
|
75
|
+
|
|
76
|
+
## `@holtjs/stage/kernel` (~2.8 kB gz · zero DOM)
|
|
77
|
+
- Classes & Factories: `StageKernel`, `ActionMap`, `createInputTimeline` (click by `trackId` or `{ x, y }`, drag, `pressKey`, `typeText`, optional visual cursor), `createInputRecorder`, `createInputReplay`
|
|
78
|
+
- Types: `StagePlugin`, `InputProvider`, `StageInputEvent`, `InputTargetSpec`, `InputTimelineOptions`, `InputTimelinePlugin`, `InputRecorderPlugin`, `RecordedInputEntry`
|
|
79
|
+
|
|
80
|
+
## `@holtjs/stage/webgpu` (~3.8 kB gz)
|
|
81
|
+
- `RendererWebGpu`, `requestWebGpuDevice(canvas, opts)`
|
|
82
|
+
- Types: `WebGpuDeviceLike`, `WebGpuCanvasContextLike`, `RendererWebGpuOptions`, `RequestWebGpuOptions`, `WebGpuBootstrapResult`
|