redhotmagma-visualization 1.36.0-beta.0 → 1.36.0
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/Three/Three2D.js +3 -2
- package/Three/Three3DScene.js +1 -1
- package/package.json +7 -4
- package/src/Three/Three2D.js +3 -2
- package/src/Three/Three3DScene.js +25 -3
package/Three/Three2D.js
CHANGED
|
@@ -1135,10 +1135,11 @@ var Three2D = /*#__PURE__*/function (_ThreeBase) {
|
|
|
1135
1135
|
key: "getModelPathFromDesignView",
|
|
1136
1136
|
value: function getModelPathFromDesignView(designView) {
|
|
1137
1137
|
var images = (0, _get2["default"])(designView, "images");
|
|
1138
|
+
var isImageArray = images instanceof Array;
|
|
1138
1139
|
|
|
1139
|
-
if (this._materialVariantPath && images.hasOwnProperty(this._materialVariantPath)) {
|
|
1140
|
+
if (images && !isImageArray && this._materialVariantPath && images.hasOwnProperty(this._materialVariantPath)) {
|
|
1140
1141
|
return images[this._materialVariantPath];
|
|
1141
|
-
} else if (images.hasOwnProperty(this._itemPath)) {
|
|
1142
|
+
} else if (images && !isImageArray && images.hasOwnProperty(this._itemPath)) {
|
|
1142
1143
|
return images[this._itemPath];
|
|
1143
1144
|
} else {
|
|
1144
1145
|
return this._materialVariantPath ? (0, _get2["default"])(designView, "images[".concat(this._materialVariantPath, "]")) : (0, _get2["default"])(designView, "images[".concat(this._itemPath, "]"));
|
package/Three/Three3DScene.js
CHANGED
|
@@ -750,7 +750,7 @@ var Three3DScene = /*#__PURE__*/function (_Three3D) {
|
|
|
750
750
|
|
|
751
751
|
case 2:
|
|
752
752
|
_context.t0 = p;
|
|
753
|
-
_context.next = _context.t0 === "alphaMap" ? 5 : _context.t0 === "aoMap" ? 5 : _context.t0 === "emissiveMap" ? 5 : _context.t0 === "lightMap" ? 5 : _context.t0 === "map" ? 5 : _context.t0 === "metalnessMap" ? 5 : _context.t0 === "normalMap" ? 5 : _context.t0 === "roughnessMap" ? 5 : _context.t0 === "aoMapIntensity" ? 15 : _context.t0 === "emissiveIntensity" ? 15 : _context.t0 === "envMapIntensity" ? 15 : _context.t0 === "lightMapIntensity" ? 15 : _context.t0 === "metalness" ? 15 : _context.t0 === "opacity" ? 15 : _context.t0 === "refractionRatio" ? 15 : _context.t0 === "roughness" ? 15 : _context.t0 === "color" ? 18 : _context.t0 === "emissive" ? 18 : 20;
|
|
753
|
+
_context.next = _context.t0 === "alphaMap" ? 5 : _context.t0 === "aoMap" ? 5 : _context.t0 === "emissiveMap" ? 5 : _context.t0 === "lightMap" ? 5 : _context.t0 === "map" ? 5 : _context.t0 === "metalnessMap" ? 5 : _context.t0 === "normalMap" ? 5 : _context.t0 === "roughnessMap" ? 5 : _context.t0 === "clearcoatMap" ? 5 : _context.t0 === "clearcoatNormalMap" ? 5 : _context.t0 === "clearcoatRoughnessMap" ? 5 : _context.t0 === "sheenRoughnessMap" ? 5 : _context.t0 === "sheenColorMap" ? 5 : _context.t0 === "specularIntensityMap" ? 5 : _context.t0 === "specularColorMap" ? 5 : _context.t0 === "thicknessMap" ? 5 : _context.t0 === "transmissionMap" ? 5 : _context.t0 === "aoMapIntensity" ? 15 : _context.t0 === "emissiveIntensity" ? 15 : _context.t0 === "envMapIntensity" ? 15 : _context.t0 === "lightMapIntensity" ? 15 : _context.t0 === "metalness" ? 15 : _context.t0 === "opacity" ? 15 : _context.t0 === "refractionRatio" ? 15 : _context.t0 === "roughness" ? 15 : _context.t0 === "attenuationDistance" ? 15 : _context.t0 === "clearcoat" ? 15 : _context.t0 === "clearcoatRoughness" ? 15 : _context.t0 === "ior" ? 15 : _context.t0 === "reflectivity" ? 15 : _context.t0 === "sheen" ? 15 : _context.t0 === "sheenRoughness" ? 15 : _context.t0 === "specularIntensity" ? 15 : _context.t0 === "thickness" ? 15 : _context.t0 === "transmission" ? 15 : _context.t0 === "color" ? 18 : _context.t0 === "emissive" ? 18 : _context.t0 === "attenuationColor" ? 18 : _context.t0 === "sheenColor" ? 18 : _context.t0 === "specularColor" ? 18 : 20;
|
|
754
754
|
break;
|
|
755
755
|
|
|
756
756
|
case 5:
|
package/package.json
CHANGED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redhotmagma-visualization",
|
|
3
|
-
"version": "1.36.0
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@babel/polyfill": "^7.12.1",
|
|
9
|
-
"@configuratorware/scripts": "1.36.0
|
|
9
|
+
"@configuratorware/scripts": "1.36.0",
|
|
10
10
|
"@tweenjs/tween.js": "^17.6.0",
|
|
11
11
|
"console-polyfill": "^0.3.0",
|
|
12
12
|
"css-element-queries": "^1.2.3",
|
|
13
13
|
"prop-types": "^15.7.2",
|
|
14
|
-
"react": "^
|
|
15
|
-
"react-dom": "^
|
|
14
|
+
"react": "^16.14.0",
|
|
15
|
+
"react-dom": "^16.14.0",
|
|
16
16
|
"three": "^0.127.0",
|
|
17
17
|
"uuid": "^3.4.0"
|
|
18
18
|
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"lodash": "^4.17.21"
|
|
21
|
+
},
|
|
19
22
|
"scripts": {
|
|
20
23
|
"copy-public": "node ./scripts/cpPublic.js",
|
|
21
24
|
"postinstall": "npm run copy-public"
|
package/src/Three/Three2D.js
CHANGED
|
@@ -642,9 +642,10 @@ export class Three2D extends ThreeBase {
|
|
|
642
642
|
|
|
643
643
|
getModelPathFromDesignView(designView) {
|
|
644
644
|
const images = get(designView, "images");
|
|
645
|
-
|
|
645
|
+
const isImageArray = images instanceof Array;
|
|
646
|
+
if (images && !isImageArray && this._materialVariantPath && images.hasOwnProperty(this._materialVariantPath)) {
|
|
646
647
|
return images[this._materialVariantPath];
|
|
647
|
-
} else if (images.hasOwnProperty(this._itemPath)) {
|
|
648
|
+
} else if (images && !isImageArray && images.hasOwnProperty(this._itemPath)) {
|
|
648
649
|
return images[this._itemPath];
|
|
649
650
|
} else {
|
|
650
651
|
return this._materialVariantPath
|
|
@@ -497,7 +497,16 @@ export class Three3DScene extends Three3D {
|
|
|
497
497
|
case "map":
|
|
498
498
|
case "metalnessMap":
|
|
499
499
|
case "normalMap":
|
|
500
|
-
case "roughnessMap":
|
|
500
|
+
case "roughnessMap":
|
|
501
|
+
case "clearcoatMap":
|
|
502
|
+
case "clearcoatNormalMap":
|
|
503
|
+
case "clearcoatRoughnessMap":
|
|
504
|
+
case "sheenRoughnessMap":
|
|
505
|
+
case "sheenColorMap":
|
|
506
|
+
case "specularIntensityMap":
|
|
507
|
+
case "specularColorMap":
|
|
508
|
+
case "thicknessMap":
|
|
509
|
+
case "transmissionMap": {
|
|
501
510
|
const texture =
|
|
502
511
|
material[p] || (material.map && material.map.clone()) || new Texture();
|
|
503
512
|
texture.image =
|
|
@@ -516,7 +525,17 @@ export class Three3DScene extends Three3D {
|
|
|
516
525
|
case "metalness":
|
|
517
526
|
case "opacity":
|
|
518
527
|
case "refractionRatio":
|
|
519
|
-
case "roughness":
|
|
528
|
+
case "roughness":
|
|
529
|
+
case "attenuationDistance":
|
|
530
|
+
case "clearcoat":
|
|
531
|
+
case "clearcoatRoughness":
|
|
532
|
+
case "ior":
|
|
533
|
+
case "reflectivity":
|
|
534
|
+
case "sheen":
|
|
535
|
+
case "sheenRoughness":
|
|
536
|
+
case "specularIntensity":
|
|
537
|
+
case "thickness":
|
|
538
|
+
case "transmission": {
|
|
520
539
|
const value = parseFloat(params[p]);
|
|
521
540
|
if (!isNaN(value)) {
|
|
522
541
|
material[p] = value;
|
|
@@ -524,7 +543,10 @@ export class Three3DScene extends Three3D {
|
|
|
524
543
|
break;
|
|
525
544
|
}
|
|
526
545
|
case "color":
|
|
527
|
-
case "emissive":
|
|
546
|
+
case "emissive":
|
|
547
|
+
case "attenuationColor":
|
|
548
|
+
case "sheenColor":
|
|
549
|
+
case "specularColor": {
|
|
528
550
|
material[p] = new Color(params[p]);
|
|
529
551
|
break;
|
|
530
552
|
}
|