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