@shopware-ag/dive 1.11.0 → 1.12.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/build/dive.cjs +22 -5
- package/build/dive.cjs.map +1 -1
- package/build/dive.d.cts +2 -0
- package/build/dive.d.ts +2 -0
- package/build/dive.js +22 -5
- package/build/dive.js.map +1 -1
- package/package.json +1 -1
- package/src/com/types.ts +2 -0
- package/src/model/Model.ts +27 -5
- package/src/model/__test__/Model.test.ts +2 -0
package/build/dive.cjs
CHANGED
|
@@ -1275,23 +1275,40 @@ var DIVEModel = class extends import_three8.Object3D {
|
|
|
1275
1275
|
if (!this._material) {
|
|
1276
1276
|
this._material = new import_three8.MeshStandardMaterial();
|
|
1277
1277
|
}
|
|
1278
|
-
if (material.
|
|
1279
|
-
|
|
1280
|
-
|
|
1278
|
+
if (material.vertexColors !== void 0) {
|
|
1279
|
+
this._material.vertexColors = material.vertexColors;
|
|
1280
|
+
}
|
|
1281
|
+
if (material.color !== void 0) {
|
|
1282
|
+
this._material.color = new import_three8.Color(material.color);
|
|
1283
|
+
}
|
|
1284
|
+
if (material.map !== void 0) {
|
|
1285
|
+
this._material.map = material.map;
|
|
1286
|
+
}
|
|
1287
|
+
if (material.normalMap !== void 0) {
|
|
1288
|
+
this._material.normalMap = material.normalMap;
|
|
1289
|
+
}
|
|
1290
|
+
if (material.roughness !== void 0) {
|
|
1291
|
+
this._material.roughness = material.roughness;
|
|
1292
|
+
}
|
|
1281
1293
|
if (material.roughnessMap !== void 0) {
|
|
1282
1294
|
this._material.roughnessMap = material.roughnessMap;
|
|
1283
1295
|
if (this._material.roughnessMap) {
|
|
1284
1296
|
this._material.roughness = 1;
|
|
1285
1297
|
}
|
|
1286
1298
|
}
|
|
1287
|
-
if (material.metalness !== void 0)
|
|
1299
|
+
if (material.metalness !== void 0) {
|
|
1300
|
+
this._material.metalness = material.metalness;
|
|
1301
|
+
}
|
|
1288
1302
|
if (material.metalnessMap !== void 0) {
|
|
1289
1303
|
this._material.metalnessMap = material.metalnessMap;
|
|
1290
1304
|
if (this._material.metalnessMap) {
|
|
1291
1305
|
this._material.metalness = 1;
|
|
1292
1306
|
}
|
|
1293
1307
|
}
|
|
1294
|
-
if (this._mesh)
|
|
1308
|
+
if (this._mesh) {
|
|
1309
|
+
this._mesh.material = this._material;
|
|
1310
|
+
this._mesh.material.needsUpdate = true;
|
|
1311
|
+
}
|
|
1295
1312
|
}
|
|
1296
1313
|
SetToWorldOrigin() {
|
|
1297
1314
|
var _a;
|