@driftengine/core 3.61.3 → 3.61.4
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.json
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"version": "3.61.4",
|
|
4
|
+
"date": "2026-09-13",
|
|
5
|
+
"entries": [
|
|
6
|
+
{
|
|
7
|
+
"kind": "fixed",
|
|
8
|
+
"short": "The published packages carry a dist built from the source beside it. 3.61.3 went out with the fixed source and a dist built before the fix, so installing it delivered the bug.",
|
|
9
|
+
"text": "**`dist/` is gitignored, so a tarball carries whatever the publishing machine last built**, and nothing hooked the build to the publish or compared the two. 3.61.3 went to the registry with `src/render/backend/webgpu/insetPass.ts` carrying the inset depth fix and `dist/render/backend/webgpu/insetPass.js` carrying the bug it fixed. `main`, `types` and the default `exports` condition all resolve to `dist`, so an ordinary consumer installed the defect under a version number that claimed to have cured it, and only a consumer reading the `drift-source` condition got the fix.\n\nA published version is immutable, so the answer is this release rather than a correction of that one. **3.61.3 should not be used**: for the inset fix, take 3.61.4.\n\n**Invisible from inside the workspace, which is what it has in common with the missing files 3.61.2 fixed.** A path dependency resolves through a symlink into the tree, where `dist` is whatever the last local build left behind; only an install from the registry can show either defect, and by then it is published. That is the whole argument for gating both at the tarball.\n\nEvery package now carries a `prepack` that builds it, so the tarball is built the same way whoever publishes it invokes npm, and `packages.test.mjs` asserts every package declares one. `prepack` rather than `prepublishOnly` because npm runs it for `npm pack` too, so the tarball a gate inspects is the tarball a consumer installs. Held by staling a built `dist` on purpose and packing: the file inside the tarball comes out rebuilt."
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
2
13
|
{
|
|
3
14
|
"version": "3.61.3",
|
|
4
15
|
"date": "2026-09-13",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DEPTH_CLEAR } from '../../depthConvention.js';
|
|
1
2
|
import { DEPTH_FORMAT } from './flatPass.js';
|
|
2
3
|
import { shaderModule } from './shaderModules.js';
|
|
3
4
|
/**
|
|
@@ -9,7 +10,10 @@ import { shaderModule } from './shaderModules.js';
|
|
|
9
10
|
* depth that way would silently un-occlude everything a scene draws *after* `endInset`.
|
|
10
11
|
*
|
|
11
12
|
* So the rect is drawn rather than cleared: one quad at the far plane, depth always written,
|
|
12
|
-
* colour written or masked off depending on whether the caller asked for a colour.
|
|
13
|
+
* colour written or masked off depending on whether the caller asked for a colour. **Which end of
|
|
14
|
+
* the buffer "the far plane" is comes from `depthConvention.ts`** and not from this file: depth is
|
|
15
|
+
* reversed here, and a quad that names the conventional end clears the inset to the *near* plane
|
|
16
|
+
* and makes it undrawable. See the note at the return.
|
|
13
17
|
*
|
|
14
18
|
* **Its own shader, and it is allowed to be.** This is not generated from GLSL and has no
|
|
15
19
|
* WebGL2 counterpart to stay honest against — the counterpart is `gl.clear`. The mip blit in
|
|
@@ -41,8 +45,24 @@ fn vertexMain(@builtin(vertex_index) index: u32) -> @builtin(position) vec4<f32>
|
|
|
41
45
|
vec2<f32>(0.0, 0.0), vec2<f32>(1.0, 1.0), vec2<f32>(0.0, 1.0),
|
|
42
46
|
);
|
|
43
47
|
let ndc = corner[index] * 2.0 - vec2<f32>(1.0, 1.0);
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
/*
|
|
49
|
+
* **The far plane, interpolated from the convention rather than written down.**
|
|
50
|
+
*
|
|
51
|
+
* This said \`1.0\`, under a comment calling it "the far plane, which is what a depth clear
|
|
52
|
+
* writes". That is true of a conventional depth buffer and this engine reverses depth, where
|
|
53
|
+
* 1.0 is the *near* plane and the compare is \`greater\`. The quad is drawn with
|
|
54
|
+
* \`depthCompare: 'always'\` and depth writes on, so it stamped the nearest possible value
|
|
55
|
+
* across the whole inset and every mesh drawn between \`beginInset\` and \`endInset\` failed
|
|
56
|
+
* the test against it: the box came out holding its clear colour and nothing else, on WebGPU
|
|
57
|
+
* only, with nothing logged. Reported from a game as two empty boxes on two menu screens, both
|
|
58
|
+
* of them the places it draws an inset.
|
|
59
|
+
*
|
|
60
|
+
* It is the mistake \`glslFarDepth\` exists because the sky made — a full-screen triangle at
|
|
61
|
+
* \`z = w\`, the far plane conventionally and the near plane once reversed. \`DEPTH_CLEAR\` is
|
|
62
|
+
* the same number by definition: what a depth attachment is cleared to, which is what a quad
|
|
63
|
+
* standing in for a depth clear must write.
|
|
64
|
+
*/
|
|
65
|
+
return vec4<f32>(ndc, ${DEPTH_CLEAR}.0, 1.0);
|
|
46
66
|
}
|
|
47
67
|
|
|
48
68
|
@fragment
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@driftengine/core",
|
|
3
|
-
"version": "3.61.
|
|
3
|
+
"version": "3.61.4",
|
|
4
4
|
"description": "DriftEngine reusable browser 3D runtime",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
],
|
|
30
30
|
"sideEffects": false,
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@driftengine/drft": "3.61.
|
|
33
|
-
"@driftengine/physics": "3.61.
|
|
32
|
+
"@driftengine/drft": "3.61.4",
|
|
33
|
+
"@driftengine/physics": "3.61.4",
|
|
34
34
|
"gl-matrix": "^3.4.3"
|
|
35
35
|
},
|
|
36
36
|
"author": "Drift Technologies",
|
|
@@ -58,5 +58,8 @@
|
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"prepack": "node ../../scripts/build.mjs @driftengine/core"
|
|
61
64
|
}
|
|
62
65
|
}
|