@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 +8 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/dist/loader/material.d.ts.map +1 -1
- package/docs/classes/BlendLoadPlugin.html +2 -2
- package/docs/interfaces/BlendFile.html +7 -7
- package/docs/interfaces/BlendLoadOptions.html +2 -2
- package/package.json +1 -1
- package/src/loader/material.ts +3 -1
package/dist/index.mjs
CHANGED
|
@@ -1312,8 +1312,10 @@ function createMaterial(mat, ctx) {
|
|
|
1312
1312
|
}
|
|
1313
1313
|
const metalSock = socketByName(inp, "Metallic");
|
|
1314
1314
|
const metalTex = textureFromSocket(links, metalSock, false, ctx);
|
|
1315
|
-
if (metalTex)
|
|
1316
|
-
|
|
1315
|
+
if (metalTex) {
|
|
1316
|
+
material.metalnessMap = metalTex;
|
|
1317
|
+
material.metalness = 1;
|
|
1318
|
+
} else {
|
|
1317
1319
|
const m = num(socketConst(metalSock));
|
|
1318
1320
|
if (m !== void 0) material.metalness = m;
|
|
1319
1321
|
}
|
|
@@ -1387,6 +1389,7 @@ function createMaterial(mat, ctx) {
|
|
|
1387
1389
|
const emSock = emission ? socketByName(inputsOf(emission), "Color") : principled ? socketByName(inputsOf(principled), "Emission Color", "Emission") : null;
|
|
1388
1390
|
const emStrSock = emission ? socketByName(inputsOf(emission), "Strength") : principled ? socketByName(inputsOf(principled), "Emission Strength") : null;
|
|
1389
1391
|
const emTex = textureFromSocket(links, emSock, true, ctx);
|
|
1392
|
+
if (emTex) material.emissiveMap = emTex;
|
|
1390
1393
|
let emCol = socketConst(emSock);
|
|
1391
1394
|
if (emTex && (!emCol || emCol.length < 3 || !emCol[0] && !emCol[1] && !emCol[2])) emCol = [1, 1, 1];
|
|
1392
1395
|
if (emCol && emCol.length >= 3 && (emCol[0] || emCol[1] || emCol[2] || emTex)) {
|