@plasius/gpu-renderer 0.2.52 → 0.2.54
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 +30 -0
- package/README.md +11 -18
- package/dist/index.cjs +17 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/canonical-wavefront-meshes.js +23 -0
package/CHANGELOG.md
CHANGED
|
@@ -23,6 +23,34 @@ All notable changes to this project will be documented in this file.
|
|
|
23
23
|
- **Security**
|
|
24
24
|
- (placeholder)
|
|
25
25
|
|
|
26
|
+
## [0.2.54] - 2026-10-21
|
|
27
|
+
|
|
28
|
+
- **Added**
|
|
29
|
+
- (placeholder)
|
|
30
|
+
|
|
31
|
+
- **Changed**
|
|
32
|
+
- Explain direct WebGPU control in the public README and keep dependency admission guidance in the development guide.
|
|
33
|
+
|
|
34
|
+
- **Fixed**
|
|
35
|
+
- (placeholder)
|
|
36
|
+
|
|
37
|
+
- **Security**
|
|
38
|
+
- (placeholder)
|
|
39
|
+
|
|
40
|
+
## [0.2.53] - 2026-10-20
|
|
41
|
+
|
|
42
|
+
- **Added**
|
|
43
|
+
- (placeholder)
|
|
44
|
+
|
|
45
|
+
- **Changed**
|
|
46
|
+
- (placeholder)
|
|
47
|
+
|
|
48
|
+
- **Fixed**
|
|
49
|
+
- Map six additional canonical material texture channels, align canonical types with core 0.5.0, and reject unsupported UV selections or texture transforms before they can be silently ignored.
|
|
50
|
+
|
|
51
|
+
- **Security**
|
|
52
|
+
- (placeholder)
|
|
53
|
+
|
|
26
54
|
## [0.2.52] - 2026-10-20
|
|
27
55
|
|
|
28
56
|
- Restore consumer-first rendering examples and API guides; correct unsupported shared-helper imports and separate implementation/release notes.
|
|
@@ -1270,3 +1298,5 @@ All notable changes to this project will be documented in this file.
|
|
|
1270
1298
|
[0.2.50]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.50
|
|
1271
1299
|
[0.2.51]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.51
|
|
1272
1300
|
[0.2.52]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.52
|
|
1301
|
+
[0.2.53]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.53
|
|
1302
|
+
[0.2.54]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.54
|
package/README.md
CHANGED
|
@@ -12,6 +12,10 @@ Framework-independent WebGPU rendering for browser applications. Render triangle
|
|
|
12
12
|
meshes with the wavefront path tracer, draw native raster surfaces, or use the
|
|
13
13
|
frame lifecycle and XR integration APIs in your own rendering pipeline.
|
|
14
14
|
|
|
15
|
+
The APIs expose GPU resource ownership, render passes and sample accumulation
|
|
16
|
+
directly. Use them from JavaScript or TypeScript when you want explicit control
|
|
17
|
+
over your application's WebGPU pipeline.
|
|
18
|
+
|
|
15
19
|
Apache-2.0 · ESM and CommonJS · TypeScript declarations included.
|
|
16
20
|
|
|
17
21
|
## Install
|
|
@@ -66,6 +70,10 @@ Supply decoded triangle geometry and material/texture data through `meshes`.
|
|
|
66
70
|
The renderer does not fetch glTF files: use a loader such as
|
|
67
71
|
[`@plasius/gpu-shared`](https://www.npmjs.com/package/@plasius/gpu-shared), or adapt
|
|
68
72
|
canonical decoded assets with `createCanonicalWavefrontMeshInputs`.
|
|
73
|
+
The canonical adapter maps the core 0.5 material texture slots; it currently
|
|
74
|
+
accepts UV0 and identity texture transforms. Other selections/transforms fail
|
|
75
|
+
explicitly so authored appearance is not silently changed. See the
|
|
76
|
+
[canonical integration contract](docs/guides/integration.md#canonical-model-ingestion).
|
|
69
77
|
For an interactive model viewer with loading, integrity checks, camera gestures
|
|
70
78
|
and quality controls, use the shared package's `model-inspection` entry.
|
|
71
79
|
|
|
@@ -141,29 +149,14 @@ route capabilities and rollout policy before mounting a scene.
|
|
|
141
149
|
|
|
142
150
|
## Development
|
|
143
151
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
```sh
|
|
147
|
-
npm ci --legacy-peer-deps
|
|
148
|
-
npm run lint
|
|
149
|
-
npm run typecheck
|
|
150
|
-
npm run test:coverage
|
|
151
|
-
npm run build
|
|
152
|
-
npm run pack:check
|
|
153
|
-
npm run zero-three
|
|
154
|
-
```
|
|
152
|
+
For checkout setup and required validation, start with the
|
|
153
|
+
[development guide](https://github.com/Plasius-LTD/gpu-renderer/blob/main/docs/guides/development.md).
|
|
155
154
|
|
|
156
155
|
`npm run demo` requires Python 3 and serves the parent workspace. With the checkout
|
|
157
156
|
named `gpu-renderer`, visit `http://localhost:8000/gpu-renderer/demo/`.
|
|
158
|
-
|
|
159
|
-
for sibling-package requirements and source layout, and
|
|
157
|
+
The development guide also describes the source layout. See
|
|
160
158
|
[CONTRIBUTING.md](https://github.com/Plasius-LTD/gpu-renderer/blob/main/CONTRIBUTING.md).
|
|
161
159
|
|
|
162
|
-
Three.js and dependency paths reaching it are prohibited across runtime,
|
|
163
|
-
development tooling and published artifacts. `npm run zero-three:source` checks
|
|
164
|
-
source admission before installation; `npm run zero-three` validates the installed
|
|
165
|
-
and built package evidence.
|
|
166
|
-
|
|
167
160
|
<!-- BEGIN PLASIUS RELEASE INTEGRITY -->
|
|
168
161
|
## Release integrity
|
|
169
162
|
|
package/dist/index.cjs
CHANGED
|
@@ -1595,7 +1595,13 @@ var EXTENSION_TEXTURE_BINDINGS = Object.freeze([
|
|
|
1595
1595
|
["clearcoatNormal", "clearcoat", "clearcoatNormalTexture"],
|
|
1596
1596
|
["transmission", "transmission", "transmissionTexture"],
|
|
1597
1597
|
["sheenColor", "sheen", "sheenColorTexture"],
|
|
1598
|
-
["sheenRoughness", "sheen", "sheenRoughnessTexture"]
|
|
1598
|
+
["sheenRoughness", "sheen", "sheenRoughnessTexture"],
|
|
1599
|
+
["thickness", "volume", "thicknessTexture"],
|
|
1600
|
+
["specular", "specular", "specularTexture"],
|
|
1601
|
+
["specularColor", "specular", "specularColorTexture"],
|
|
1602
|
+
["iridescence", "iridescence", "iridescenceTexture"],
|
|
1603
|
+
["iridescenceThickness", "iridescence", "iridescenceThicknessTexture"],
|
|
1604
|
+
["anisotropy", "anisotropy", "anisotropyTexture"]
|
|
1599
1605
|
]);
|
|
1600
1606
|
function requireArray(value, label) {
|
|
1601
1607
|
if (!Array.isArray(value)) {
|
|
@@ -1617,6 +1623,16 @@ function textureSample(binding, textures, label, extra = {}) {
|
|
|
1617
1623
|
if (!sample) {
|
|
1618
1624
|
throw new Error(`Missing decoded texture sample ${binding.textureId} for ${label}.`);
|
|
1619
1625
|
}
|
|
1626
|
+
if (binding.texCoordSet !== void 0 && binding.texCoordSet !== 0 || sample.texCoord !== void 0 && sample.texCoord !== 0) {
|
|
1627
|
+
throw new Error("Canonical texture sampling supports only UV set 0.");
|
|
1628
|
+
}
|
|
1629
|
+
const transform = binding.transform;
|
|
1630
|
+
if (transform !== void 0) {
|
|
1631
|
+
const identityPair = (value, expected) => value === void 0 || Array.isArray(value) && value.length === 2 && value[0] === expected && value[1] === expected;
|
|
1632
|
+
if (!transform || typeof transform !== "object" || Array.isArray(transform) || Object.keys(transform).some((key) => !["offset", "scale", "rotationRadians"].includes(key)) || !identityPair(transform.offset, 0) || !identityPair(transform.scale, 1) || transform.rotationRadians !== void 0 && transform.rotationRadians !== 0) {
|
|
1633
|
+
throw new Error("Canonical texture transforms require upstream application and identity bindings.");
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1620
1636
|
const width = Number(sample.width);
|
|
1621
1637
|
const height = Number(sample.height);
|
|
1622
1638
|
const data = sample.data;
|