@threepipe/plugin-blend-importer 0.3.0 → 0.3.1

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 CHANGED
@@ -10,6 +10,13 @@ All notable changes to this plugin will be documented in this file.
10
10
 
11
11
  - NA
12
12
 
13
+ ## [0.3.1] - 2026-10-24
14
+
15
+ ### Fixed
16
+
17
+ - **Metallic textures had no effect.** A texture linked to the Principled BSDF Metallic input set `metalnessMap` but left `metalness` at 0, and three.js multiplies the map by that factor, so the surface stayed non-metallic. `metalness` is now 1 when the map is set.
18
+ - **Emission textures were not applied.** The emission texture was loaded and used to pick the emissive color, but never assigned to `emissiveMap`, so the surface emitted a flat color (white with Blender's default black factor) instead of the texture pattern. It is now set as `emissiveMap`.
19
+
13
20
  ## [0.3.0] - 2026-10-23
14
21
 
15
22
  ### Added
@@ -63,6 +70,7 @@ All notable changes to this plugin will be documented in this file.
63
70
  - Update [threepipe](https://threepipe.org/) `peerDependency` to [0.1.0](https://github.com/repalash/threepipe/releases/tag/v0.1.0)
64
71
 
65
72
  [unreleased]: https://github.com/repalash/threepipe/tree/dev/plugins/blend-importer
73
+ [0.3.1]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugin-blend-importer-0.3.1
66
74
  [0.3.0]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugin-blend-importer-0.3.0
67
75
  [0.2.0]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugin-blend-importer-0.2.0
68
76
  [0.1.0]: https://github.com/repalash/threepipe/releases/tag/@threepipe/plugin-blend-importer-0.1.0
package/dist/index.js CHANGED
@@ -1315,8 +1315,10 @@
1315
1315
  }
1316
1316
  const metalSock = socketByName(inp, "Metallic");
1317
1317
  const metalTex = textureFromSocket(links, metalSock, false, ctx);
1318
- if (metalTex) material.metalnessMap = metalTex;
1319
- else {
1318
+ if (metalTex) {
1319
+ material.metalnessMap = metalTex;
1320
+ material.metalness = 1;
1321
+ } else {
1320
1322
  const m = num(socketConst(metalSock));
1321
1323
  if (m !== void 0) material.metalness = m;
1322
1324
  }
@@ -1390,6 +1392,7 @@
1390
1392
  const emSock = emission ? socketByName(inputsOf(emission), "Color") : principled ? socketByName(inputsOf(principled), "Emission Color", "Emission") : null;
1391
1393
  const emStrSock = emission ? socketByName(inputsOf(emission), "Strength") : principled ? socketByName(inputsOf(principled), "Emission Strength") : null;
1392
1394
  const emTex = textureFromSocket(links, emSock, true, ctx);
1395
+ if (emTex) material.emissiveMap = emTex;
1393
1396
  let emCol = socketConst(emSock);
1394
1397
  if (emTex && (!emCol || emCol.length < 3 || !emCol[0] && !emCol[1] && !emCol[2])) emCol = [1, 1, 1];
1395
1398
  if (emCol && emCol.length >= 3 && (emCol[0] || emCol[1] || emCol[2] || emTex)) {