@holtjs/stage 0.3.0 → 0.4.1
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 +27 -0
- package/dist/{game-BHDcwovp.js → game-Cu1G9xgW.js} +616 -1429
- package/dist/{game-NqFMKsuL.d.ts → game-GdPaQUqH.d.ts} +605 -10
- 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-BorAD6Kk.js +2619 -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
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,33 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.4.1] - 2026-12-03
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
- **WebGL `pixelStorei` Unpack Hygiene & `restoreState()` Isolation**:
|
|
13
|
+
- Reset `gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false)` immediately after `TextObject` (`src/display.ts`) and `RendererGl.uploadTextureSource()` (`src/renderer-gl.ts`) uploads instead of leaving `UNPACK_PREMULTIPLY_ALPHA_WEBGL = true` on the WebGL context (which premultiplied raw typed-array `RGBA8` data/splatmap uploads in `CustomPass` when alpha held non-opacity weights, reported by @Ivy).
|
|
14
|
+
- Updated `RendererGl.restoreState()` to reset `UNPACK_PREMULTIPLY_ALPHA_WEBGL = false`, `UNPACK_FLIP_Y_WEBGL = false`, `UNPACK_ALIGNMENT = 4`, `UNPACK_ROW_LENGTH = 0`, and the active framebuffer (`this.activeFbo`, supporting nested `renderToTarget()` FBO passes).
|
|
15
|
+
|
|
16
|
+
## [0.4.0] - 2026-12-03
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **WebGL Active Texture Unit Synchronization (`RendererGl.bindTextureAt`)**: moved `gl.activeTexture(gl.TEXTURE0 + unit)` and `this.activeTexUnit = unit` outside the `boundTexCache[unit] !== target` branch so `bindTextSlot0` and `uploadTextureSource` never upload `TextObject` or refreshed `CanvasTexture` images onto a stale higher texture unit after multi-texture flushes (resolves `GL_INVALID_VALUE: glTexSubImage2DRobustANGLE` HUD text freeze reported by @Ivy).
|
|
20
|
+
- **CustomPass State Isolation**: typed `CustomPassCallback` (`renderer: StageRenderer`) and enabled automatic `renderer.restoreState()` after `CustomPassObject.onRender` by default (`restoreState: true`).
|
|
21
|
+
- **Tween Docs & Alias**: aligned `SKILL.md` / `subpaths.md` with `TweenManager.to()` and added `TweenManager.add()` alias.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- **First-Party WebGPU Renderer (`@holtjs/stage/webgpu`, `WEBGPU`)**: added zero-dependency `RendererWebGpu` + `requestWebGpuDevice()` with WGSL quad/polygon batching and WGSL analytical rounded/pixelStep SDF `PanelObject` pipelines across `NORMAL`, `ADD`, `MULTIPLY`, and `SCREEN` blend modes.
|
|
25
|
+
- **Unified `StageKernel`, Plugin Lifecycle & `InputProvider` Bus (`@holtjs/stage/kernel`)**:
|
|
26
|
+
- `StageKernel` (`game.kernel`) + `StagePlugin` contract (`setup`, `prestep`, `update`, `postrender`, LIFO `dispose`, and automatic `SceneDigest.plugins` telemetry).
|
|
27
|
+
- `ActionMap` (`game.kernel.actions`: `bind`, `isDown`, `justPressed`, `justReleased`, `axis`) + `KeyboardPlugin.isDown(code)` / `justPressed(code)` / `justReleased(code)` / `injectKey()`.
|
|
28
|
+
- `createInputTimeline()` (`StagePlugin` & `InputProvider`): click directly by `trackId` via `buildSceneDigest()` or coordinates, smooth virtual cursor + click ripples (`showCursor: true`), `drag()`, `pressKey()`, `typeText()`, plus `createInputRecorder()` & `createInputReplay()`.
|
|
29
|
+
- **Hardware `InstancedBatchObject` & Offscreen `RenderTarget` + Lighting Blends**:
|
|
30
|
+
- `scene.add.instancedBatch(key, maxCount)` consuming SoA `Float32Array` columns via WebGL2 `drawElementsInstanced` (with Canvas2D & WebGPU support).
|
|
31
|
+
- `BlendModes.MULTIPLY` & `BlendModes.SCREEN` plus `renderer.createRenderTarget()` / `renderer.renderToTarget()` across WebGL FBOs and Canvas2D.
|
|
32
|
+
- **Camera & Headless Simulation Fast-Forward**:
|
|
33
|
+
- `Camera.configureHiDpi()`, `Camera.startFollow()` / `stopFollow()`, `Camera.screenToWorld()` / `worldToScreen()`.
|
|
34
|
+
- `Game.stepSimOnly()` and `HeadlessStage.fastForward(frames)` for zero-rasterization simulation fast-forwarding.
|
|
35
|
+
|
|
9
36
|
## [0.3.0] - 2026-12-03
|
|
10
37
|
|
|
11
38
|
### Changed
|