@three-blocks/devtools 12.0.0-alpha.402.g6a35bb19fa05 → 12.0.0-alpha.404.gda4777c53f54

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +137 -22
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,39 +1,154 @@
1
1
  # @three-blocks/devtools
2
2
 
3
- ## 12.0.0-alpha.402.g6a35bb19fa05
3
+ ## 12.0.0-alpha.404.gda4777c53f54
4
4
 
5
- - Library: Three.js r186 is supported, and development always compiles shaders live until previewed.
5
+ - Packages: This alpha contains no user-facing changes.
6
6
 
7
- - Library: Vite builds capture precompiled shaders from the built bundle; nothing to commit.
7
+ - Packages: Built from `da4777c53f54`.
8
8
 
9
- - Devtools: The shader watch command, the 186dev Three.js lane and Playwright driver names are gone.
10
9
 
11
- - Starter: New projects ship no generated shader files; the build captures them.
10
+ ## 12.0.0
12
11
 
13
- - CLI: One check command verifies types, the production build and every scene, with a PNG per scene.
12
+ ### Major Changes
14
13
 
15
- - Devtools: Development names the shaders that compile after the first frame, once per burst.
14
+ - c5cca15: Devtools: The shader watch command, the 186dev Three.js lane and Playwright driver names are gone.
16
15
 
17
- - Library: Ambient occlusion compiles again with antialiasing on Three.js r186.
16
+ Removed from `@three-blocks/devtools`: `three-blocks shaders watch`, `watchShaders`, `ShaderWatchQueue` and
17
+ their option types (captures are release artifacts, never edit-loop validation); and
18
+ `createPlaywrightShaderDriver`, `createStaticPlaywrightShaderDriver`,
19
+ `createAttachedPlaywrightShaderDriver` with their `Playwright*` option types — `createShaderDriver()` and
20
+ `ShaderDriverOptions` take the same `serve` / `base` / `url` options, and capture has been Node-native for a release.
18
21
 
19
- - Devtools: Interrupted captures and checks no longer leave renderer processes running.
22
+ Removed from `three-blocks/shaders`: the pre-release `186dev` lane (`assertThreeWebGPU186Dev`,
23
+ `createThreeWebGPU186DevShaderCompatibility`, `THREE_R186DEV_VERSION`,
24
+ `THREE_WEBGPU_R186DEV_COMPATIBILITY`) and `THREE_BLOCKS_THREE_186DEV_HOOK_TRANSFORM_VERSION` from
25
+ `three-blocks/vite`. Released Three.js 0.186.x is the supported revision and 0.185.x
26
+ stays frozen for one release.
20
27
 
21
- - Devtools: Captures and checks deliver pointer and wheel input to listeners on the window.
22
-
23
- - Starter: Add a scene by adding a folder; the build captures it and the check command boots it.
24
-
25
- - CLI: JSON output of devtools commands no longer starts with a banner line.
26
-
27
- - Devtools: Precompiled temporal antialiasing and upscaling jitter the camera again.
28
-
29
- - Library: Ambient occlusion loads precompiled on WebGPU instead of compiling at startup.
30
-
31
- - Website: The shader precompilation benchmark now measures the official Three.js r186 examples.
28
+ ### Minor Changes
32
29
 
33
- - Library: Precompiled ambient occlusion no longer crashes on its first frame on Three.js r186.
30
+ - c5cca15: CLI: One check command verifies types, the production build and every scene, with a PNG per scene.
31
+
32
+ `npx three-blocks check [--json]` (devtools `runProjectCheck()`) runs the project's own TypeScript, builds
33
+ the production bundle once in `strict` mode (which captures its shaders), and boots every configured
34
+ scene natively in Node. Each route reports its lifecycle, console and page errors, the reported shader
35
+ mode with `injected` / `missed` / `live` counters, and a PNG of its settled frame under
36
+ `.three-blocks/check/`. `BrowserPreviewOptions.screenshots` and `BrowserPreviewRouteReport.shaders` /
37
+ `.screenshot` expose the same to `three-blocks browser preview`. Generated projects gain a `check`
38
+ script and ignore `.three-blocks/check/`.
39
+
40
+ - c5cca15: Library: Vite builds capture precompiled shaders from the built bundle; nothing to commit.
41
+
42
+ When no fresh committed capture exists and `@three-blocks/devtools` is installed, `vite build` loads the
43
+ bundle it has just written natively in Node and writes
44
+ `<outDir>/three-blocks/shaders/<scene>.<backend>.json`. `shaders: { capture: false }` opts out.
45
+ `ThreeBlocksShaderBuildConfig.built` and `ShaderBuildState.built` carry the public path;
46
+ `installShaderCache()` then loads the manifest from there instead of calling `loadManifest`, so
47
+ `registerDevtools()`, the worker shell and `installShaderCache( { state: threeBlocksShaders } )` need no
48
+ change. `InstallShaderCacheOptions.loadManifest` and `CreateWorkerRuntimeOptions.loadShaderManifest`
49
+ become optional: without a loader the manifest is fetched from `<base>three-blocks/shaders/`
50
+ (`InstallShaderCacheOptions.base`), which also serves a committed capture's public twin, so a build
51
+ host without a GPU can keep a committed cache with no template code. For such a bundle `strict`
52
+ fails the build when the capture fails, instead of stopping a stale receipt at `buildStart`; a host
53
+ without a GPU adapter otherwise ships a correct, live-compiling output. `base` must be an absolute path.
54
+
55
+ `captureBuiltShaders()` and `three-blocks shaders capture --serve <dir> --built [--base <path>]` run the
56
+ same engine after any bundler's build. A production bundle no longer needs capture instrumentation:
57
+ the shader runtime hands its renderer to the capture host the Node driver injects
58
+ (`offerRendererToShaderCapture`), the Node renderer can run an init script inside worker threads
59
+ (`addInitScript( { content, workers: true } )`), and the static driver injects its runtime that way.
60
+ Capture classification no longer depends on `constructor.name`, which a minified bundle mangles, and
61
+ the Node DOM applies the user-agent defaults for headings, bold and italic text.
62
+
63
+ - c5cca15: Starter: Add a scene by adding a folder; the build captures it and the check command boots it.
64
+
65
+ A generated project grows by `src/scenes/<name>/scene.ts`, opened with `?scene=<name>`. The worker
66
+ resolves it through one registry (`boot.flags.scene`, a new runtime flag relayed by the app shell),
67
+ the shader tool enumerates the same folders, so `vite build` captures the new scene and
68
+ `three-blocks check` boots it and writes its PNG. An unknown `?scene=` fails with the known scenes.
69
+
70
+ - c5cca15: Library: Three.js r186 is supported, and development always compiles shaders live until previewed.
71
+
72
+ `THREE_BLOCKS_SUPPORTED_THREE_RANGE` widens to `>=0.185.0 <0.187.0` and `isSupportedThreeVersion`
73
+ exposes the same gate to the other bundler adapters. `createThreeWebGPUShaderCompatibility` and
74
+ `createThreeWebGLShaderCompatibility` now route to the installed release, so application code
75
+ survives the upgrade unchanged; `createThreeShaderCompatibility` and `threeShaderCompatibilityId`
76
+ select by backend. On an unverified Three.js revision `threeBlocks()` and the non-Vite adapters warn
77
+ once and compile live instead of throwing; strict builds and captures still stop.
78
+
79
+ Development always compiles TSL live, because the next edit strands any receipt: the worker shell,
80
+ `registerDevtools()` and the `threeBlocksShaders` export (`mode: 'live'`) hydrate only on an explicit
81
+ preview, and `ShaderBuildState.mode` lets `installShaderCache()` treat live over a fresh receipt as a
82
+ choice (no warning, never strict). The overlay offers "Preview production shaders" / "Back to live
83
+ TSL"; a preview whose receipt goes stale returns to live by itself, and the policy-changed full
84
+ reload is gone. Its toggle is a plain `?tbShaders=live|precompiled` preference instead of the parity
85
+ harness flag that froze the starter after one frame. `readThreeBlocksRuntimeFlags` parses it on the
86
+ page, `WorkerBootState` relays it as `flags`, and `CreateWorkerRuntimeOptions` accepts it, so a
87
+ worker-owned renderer honours the page's shader mode and its `?webgl=1` backend switch.
88
+
89
+ Hydration no longer takes retained-input ordinals (an application that rendered before creating its
90
+ inputs, such as `PMREMGenerator.fromScene()` ahead of `bloom()`, bound the wrong uniform); recipes
91
+ cover r186's `highpModelViewMatrix`, `SunLight` cascades and after-object instancing. Parity
92
+ failures now carry a state-oracle verdict (`ShaderCaptureStats.stateOracle`,
93
+ `TestShadersOptions.stateOracle`, the optional `stateOracle` argument of `ShaderBrowserDriver.observe`).
94
+ Receipt transform 65 strands earlier receipts: recapture.
34
95
 
35
- - Packages: Built from `6a35bb19fa05`.
96
+ ### Patch Changes
36
97
 
98
+ - c5cca15: Library: Ambient occlusion loads precompiled on WebGPU instead of compiling at startup.
99
+
100
+ Three.js r186 declares a sampler for a gathered texture (`texture.gather()`) even over a depth
101
+ texture. GTAO reads depth that way, and the captured state addressed the view as the pass texture
102
+ node it was cloned from, so the hydrated bind group lacked that sampler and every GTAO pass fell
103
+ back to a live build. A gathered view now gets its own `textureReference` recipe with a `gather`
104
+ flag, and hydration restores the sampler. Recapture to pick this up.
105
+
106
+ - c5cca15: Devtools: Interrupted captures and checks no longer leave renderer processes running.
107
+
108
+ A Node renderer page is a forked process with its own animation loop and GPU device. When the process
109
+ driving it died without closing it (a crash, a kill, Ctrl-C during a capture), the page kept running
110
+ indefinitely and skewed every later timing on the machine. The page process now exits when its IPC
111
+ channel disconnects.
112
+
113
+ - c5cca15: Devtools: Captures and checks deliver pointer and wheel input to listeners on the window.
114
+
115
+ The Node renderer's bubble path ended at the document, so an application listening on `window`
116
+ (the usual place for `pointermove` and `wheel`) never saw driven input, and `DOMContentLoaded`
117
+ never reached `window` either. A bubbling event that leaves the document now reaches `window`
118
+ with its fields and original target.
119
+
120
+ - c5cca15: Devtools: Precompiled temporal antialiasing and upscaling jitter the camera again.
121
+
122
+ Three.js r186 keeps `OnBeforeRenderPipeline` / `OnAfterRenderPipeline` callbacks on the render
123
+ pipeline's context, filled only while a node's `setup()` runs. TRAA, TAAU and temporal
124
+ reprojection jitter the camera there, so a precompiled state that skipped setup rendered every
125
+ frame unjittered and temporal antialiasing silently did nothing. Capture now marks such a scene as
126
+ requiring setup, and binds a texture node whose value the application reassigns (history and
127
+ ping-pong targets) through the node instead of the texture it held at capture time. Recapture to
128
+ pick this up.
129
+
130
+ - c5cca15: Library: Ambient occlusion compiles again with antialiasing on Three.js r186.
131
+
132
+ Three.js r186's `GTAONode` reads its centre depth with `gather()`, and WGSL has no `textureGather()`
133
+ overload for multisampled textures, so `ao( scenePass.getTextureNode( 'depth' ), … )` on an
134
+ `antialias: true` renderer failed to compile (it worked on r185). The r186 in-memory patch lane, shared
135
+ by `threeBlocks()` and the webpack, Rollup, esbuild and Next.js adapters, now carries
136
+ [three.js #34609](https://github.com/mrdoob/three.js/pull/34609) verbatim: `generateTextureGather()`
137
+ falls back to four `textureLoad()` calls for multisampled textures. It is removed when a supported
138
+ release contains that pull request. The lane identifier moves to `r186-provider-v2`; receipts are
139
+ unaffected, because no shader that needed this fix could be captured before.
140
+
141
+ - Updated dependencies [53ea952]
142
+ - Updated dependencies [c5cca15]
143
+ - Updated dependencies [c5cca15]
144
+ - Updated dependencies [c5cca15]
145
+ - Updated dependencies [c5cca15]
146
+ - Updated dependencies [c5cca15]
147
+ - Updated dependencies [c5cca15]
148
+ - Updated dependencies [c5cca15]
149
+ - Updated dependencies [c5cca15]
150
+ - Updated dependencies [c5cca15]
151
+ - three-blocks@0.13.0
37
152
 
38
153
  ## 11.1.0
39
154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@three-blocks/devtools",
3
- "version": "12.0.0-alpha.402.g6a35bb19fa05",
3
+ "version": "12.0.0-alpha.404.gda4777c53f54",
4
4
  "description": "Three Blocks devtools command engine for npx three-blocks; the runtime lives in three-blocks/devtools and the Vite plugin",
5
5
  "keywords": [
6
6
  "three",
@@ -103,7 +103,7 @@
103
103
  "@types/node": "^22.10.0",
104
104
  "@types/three": "0.186.0",
105
105
  "create-vite": "9.1.1",
106
- "three-blocks": "0.13.0-alpha.402.g6a35bb19fa05",
106
+ "three-blocks": "0.13.0-alpha.404.gda4777c53f54",
107
107
  "three-r185": "npm:three@0.185.1",
108
108
  "tsup": "^8.0.0",
109
109
  "vite": "^7.2.2",
@@ -114,7 +114,7 @@
114
114
  },
115
115
  "peerDependencies": {
116
116
  "three": ">=0.185.0",
117
- "three-blocks": "0.13.0-alpha.402.g6a35bb19fa05",
117
+ "three-blocks": "0.13.0-alpha.404.gda4777c53f54",
118
118
  "vite": ">=7.2.2 <9.0.0"
119
119
  },
120
120
  "peerDependenciesMeta": {