@holtjs/stage 0.5.0 → 0.5.2

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.
@@ -1,2 +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-GdPaQUqH.js";
1
+ import { $ as WebGpuCanvasContextLike, Q as WebGpuBootstrapResult, X as RendererWebGpuOptions, Y as RendererWebGpu, Z as RequestWebGpuOptions, et as WebGpuDeviceLike, tt as requestWebGpuDevice } from "./game-DWELKTnB.js";
2
2
  export { RendererWebGpu, RendererWebGpuOptions, RequestWebGpuOptions, WebGpuBootstrapResult, WebGpuCanvasContextLike, WebGpuDeviceLike, requestWebGpuDevice };
@@ -1 +1 @@
1
- export { t as RendererWebGpu, n as requestWebGpuDevice } from "./renderer-webgpu-BorAD6Kk.js";
1
+ export { t as RendererWebGpu, n as requestWebGpuDevice } from "./renderer-webgpu-Djk7FayG.js";
package/dist/rig2d.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Yt as BlendMode, bt as ImageObject, jt as SceneHostLike, ut as Container, yt as Graphics } from "./game-GdPaQUqH.js";
1
+ import { Yt as BlendMode, bt as ImageObject, jt as SceneHostLike, ut as Container, yt as Graphics } from "./game-DWELKTnB.js";
2
2
  export type RigCurveKind = 'linear' | 'step' | 'smoothstep' | 'outBack';
3
3
  export interface RigBoneDef {
4
4
  name: string;
package/dist/tilemap.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ct as BlitterObject, jt as SceneHostLike, ut as Container } from "./game-GdPaQUqH.js";
1
+ import { ct as BlitterObject, jt as SceneHostLike, ut as Container } from "./game-DWELKTnB.js";
2
2
  /** Pack signed 16-bit chunk coordinates `[-32768..32767]` into a single 32-bit integer Map key (zero string allocation). */
3
3
  export declare function packChunkKey(cx: number, cy: number): number;
4
4
  export declare function unpackChunkX(key: number): number;
package/dist/trace.d.ts CHANGED
@@ -1,2 +1,2 @@
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-GdPaQUqH.js";
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-DWELKTnB.js";
2
2
  export { SceneDigest, SceneDigestActiveFocus, SceneDigestEngineSandbox, SceneDigestNode, SceneDigestOptions, SceneDigestOverlayStats, SceneDigestSandbox, SceneDigestSurfaceEntry, SceneDigestSurfaceSource, SceneDigestSurfaces, buildSceneDigest, sanitizeTrackToken };
package/llms.txt CHANGED
@@ -7,7 +7,7 @@
7
7
  - [Official Docs & Live Playground](https://holt.js.org): Interactive KAPLAY-green playground, WebGPU & Kernel guide, 2.5D Survival Sandbox guide, and subpath references.
8
8
  - [README](https://github.com/botiverse-play/stage/blob/main/README.md): Overview, install, 20-subpath table, quick starts for WebGPU, `StageKernel`, 60 FPS video, and 2.5D survival games.
9
9
  - [Architecture](https://github.com/botiverse-play/stage/blob/main/docs/architecture.md): WebGPU/WebGL2/Canvas2D batchers, `StageKernel`, DPR/camera contracts, LIFO disposal, `SurfaceTree`, tracing-first observability.
10
- - [Changelog](https://github.com/botiverse-play/stage/blob/main/CHANGELOG.md): Release history (`0.1.0` – `0.5.0`).
10
+ - [Changelog](https://github.com/botiverse-play/stage/blob/main/CHANGELOG.md): Release history (`0.1.0` – `0.5.2`).
11
11
  - [Contributing](https://github.com/botiverse-play/stage/blob/main/CONTRIBUTING.md): Setup, invariants, verification gate, PR guidelines.
12
12
 
13
13
  ## AI Agent Skills & Instructions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holtjs/stage",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
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.",
@@ -5,7 +5,7 @@ description: Build zero-dependency WebGPU/WebGL2/Canvas2D 2D & 2.5D games, GPU S
5
5
 
6
6
  # Building 2D/2.5D Games, WebGPU UI & 60 FPS Video with `@holtjs/stage`
7
7
 
8
- Use this skill whenever creating or modifying a browser 2D/2.5D game, WebGPU/WebGL2 canvas UI, survival sandbox, automated `InputTimeline` test, or pure-Node headless image/storyboard/60 FPS video pipeline built on `@holtjs/stage` (`v0.5.0`, 20 subpaths).
8
+ Use this skill whenever creating or modifying a browser 2D/2.5D game, WebGPU/WebGL2 canvas UI, survival sandbox, automated `InputTimeline` test, or pure-Node headless image/storyboard/60 FPS video pipeline built on `@holtjs/stage` (`v0.5.2`, 20 subpaths).
9
9
 
10
10
  For the exhaustive exported symbol list across all 20 subpaths, see [references/subpaths.md](references/subpaths.md).
11
11
 
@@ -208,6 +208,8 @@ scene.tweens.spring({
208
208
  owner: card,
209
209
  onUpdate: (y) => { card.y = y; },
210
210
  });
211
+ // Or duration-based tween (`scene.tweens.to(...)` / `scene.tweens.add(...)`):
212
+ scene.tweens.to({ targets: card, alpha: { from: 0, to: 1 }, duration: 180, ease: 'outCubic' });
211
213
  ```
212
214
 
213
215
  ## 7. Zero-Browser 60 FPS Image, Storyboard & Video Rendering (`@holtjs/stage/headless`)
@@ -253,3 +255,5 @@ stage.destroy();
253
255
  - Destroying a parent `Container` unwinds children and disposers in strict LIFO order.
254
256
  5. **Respect `SurfaceTree` barriers everywhere & keep `trackId` PII-free**:
255
257
  - Gate world input on `!surfaces.isWorldBlocked()` and keep `trackId` static semantic tokens (`'craft.torch'`, `'hud.inventory'`). `buildSceneDigest()` never scrapes `TextObject.text`.
258
+ 6. **Use a dedicated `new Camera(rt.width, rt.height, true)` when rendering into an offscreen `StageRenderTarget`**:
259
+ - Passing `scene.cameras.main` applies the main camera's scroll/zoom/background; construct a dedicated transparent camera (`new Camera(rt.width, rt.height, true)`) for 1:1 FBO lightmap or post-FX passes.
@@ -1,6 +1,6 @@
1
1
  # `@holtjs/stage` Subpath API Quick Reference
2
2
 
3
- All symbols verified against `src/*.ts` (`@holtjs/stage@0.5.0`, 20 subpaths).
3
+ All symbols verified against `src/*.ts` (`@holtjs/stage@0.5.2`, 20 subpaths).
4
4
 
5
5
  ## `@holtjs/stage` (~57.3 kB gz · Core Engine Barrel)
6
6
  - **Bootstrap & Lifecycle**: `Stage` / `Stage2D` (namespaces), `AUTO`, `WEBGPU`, `WEBGL`, `CANVAS`, `Scale`, `Scenes`, `Game` (`.stepSimOnly()`, `.kernel`), `Scene`, `SceneManager`, `ScaleManager`, `GameLoop`, `EngineClock`, `LoaderPlugin`, `JsonCache`, `GameObjectFactory` (`scene.add.instancedBatch`, `customPass`, `panel`, `blitter`, etc.)
@@ -25,7 +25,7 @@ All symbols verified against `src/*.ts` (`@holtjs/stage@0.5.0`, 20 subpaths).
25
25
  ## `@holtjs/stage/headless` (~38.6 kB gz · pure Node with `@napi-rs/canvas`)
26
26
  - `createHeadlessStage(opts)`: `.step()`, `.stepToMs()`, `.stepToFrame()`, `.fastForward(frames)`, `.pointerDown/Move/Up()`, `.keyDown/Up()`, `.toRgba()`, `.toPng()`, `.digest()`, `.recordFrames()`
27
27
  - `renderStoryboard(stage, opts)` -> `{ png, width, height, digests }`
28
- - `createAudioTimeline(opts?)`: `.addAtMs()`, `.addAtFrame()`, `.renderStereo()`, `.toWav()`
28
+ - `createAudioTimeline(opts?)`: `.addAtMs()`, `.addAtFrame()`, `.toStereoPcm16()`, `.toWav()`
29
29
  - Types: `HeadlessCanvasLike`, `CreateHeadlessCanvas`, `HeadlessStageOptions`, `HeadlessRecordedFrame`, `RecordFramesOptions`, `HeadlessStage`, `StoryboardOptions`, `StoryboardResult`, `AudioCueOptions`, `AudioTimelineOptions`, `AudioTimeline`
30
30
 
31
31
  ## `@holtjs/stage/rig2d` (~5.7 kB gz · zero DOM)