@plasius/gpu-renderer 0.2.52 → 0.2.53
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 +15 -0
- package/README.md +4 -0
- 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,20 @@ All notable changes to this project will be documented in this file.
|
|
|
23
23
|
- **Security**
|
|
24
24
|
- (placeholder)
|
|
25
25
|
|
|
26
|
+
## [0.2.53] - 2026-10-20
|
|
27
|
+
|
|
28
|
+
- **Added**
|
|
29
|
+
- (placeholder)
|
|
30
|
+
|
|
31
|
+
- **Changed**
|
|
32
|
+
- (placeholder)
|
|
33
|
+
|
|
34
|
+
- **Fixed**
|
|
35
|
+
- 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.
|
|
36
|
+
|
|
37
|
+
- **Security**
|
|
38
|
+
- (placeholder)
|
|
39
|
+
|
|
26
40
|
## [0.2.52] - 2026-10-20
|
|
27
41
|
|
|
28
42
|
- Restore consumer-first rendering examples and API guides; correct unsupported shared-helper imports and separate implementation/release notes.
|
|
@@ -1270,3 +1284,4 @@ All notable changes to this project will be documented in this file.
|
|
|
1270
1284
|
[0.2.50]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.50
|
|
1271
1285
|
[0.2.51]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.51
|
|
1272
1286
|
[0.2.52]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.52
|
|
1287
|
+
[0.2.53]: https://github.com/Plasius-LTD/gpu-renderer/releases/tag/v0.2.53
|
package/README.md
CHANGED
|
@@ -66,6 +66,10 @@ Supply decoded triangle geometry and material/texture data through `meshes`.
|
|
|
66
66
|
The renderer does not fetch glTF files: use a loader such as
|
|
67
67
|
[`@plasius/gpu-shared`](https://www.npmjs.com/package/@plasius/gpu-shared), or adapt
|
|
68
68
|
canonical decoded assets with `createCanonicalWavefrontMeshInputs`.
|
|
69
|
+
The canonical adapter maps the core 0.5 material texture slots; it currently
|
|
70
|
+
accepts UV0 and identity texture transforms. Other selections/transforms fail
|
|
71
|
+
explicitly so authored appearance is not silently changed. See the
|
|
72
|
+
[canonical integration contract](docs/guides/integration.md#canonical-model-ingestion).
|
|
69
73
|
For an interactive model viewer with loading, integrity checks, camera gestures
|
|
70
74
|
and quality controls, use the shared package's `model-inspection` entry.
|
|
71
75
|
|
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;
|