zincjs 1.18.3 → 1.18.4
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/zinc.frontend.js +1 -1
- package/build/zinc.js +2 -2
- package/build/zinc.js.map +1 -1
- package/package.json +1 -1
- package/src/loaders/JSONLoader.js +16 -11
package/package.json
CHANGED
|
@@ -198,9 +198,9 @@ Object.assign( JSONLoader.prototype, {
|
|
|
198
198
|
geometry.uvs[i][k] = json.uvs[i][k];
|
|
199
199
|
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
if (normals) {
|
|
@@ -210,7 +210,7 @@ Object.assign( JSONLoader.prototype, {
|
|
|
210
210
|
geometry.normals[i] = normals[i];
|
|
211
211
|
|
|
212
212
|
}
|
|
213
|
-
|
|
213
|
+
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
if (colors) {
|
|
@@ -220,7 +220,7 @@ Object.assign( JSONLoader.prototype, {
|
|
|
220
220
|
geometry.colors[i] = colors[i];
|
|
221
221
|
|
|
222
222
|
}
|
|
223
|
-
|
|
223
|
+
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
|
|
@@ -361,6 +361,11 @@ Object.assign( JSONLoader.prototype, {
|
|
|
361
361
|
face.b = faces[ offset ++ ];
|
|
362
362
|
face.c = faces[ offset ++ ];
|
|
363
363
|
|
|
364
|
+
//A hack to get things going
|
|
365
|
+
if (!face.b) face.b = face.a;
|
|
366
|
+
if (!face.c) face.c = face.b;
|
|
367
|
+
|
|
368
|
+
|
|
364
369
|
if ( hasMaterial ) {
|
|
365
370
|
|
|
366
371
|
materialIndex = faces[ offset ++ ];
|
|
@@ -671,23 +676,23 @@ Object.assign( JSONLoader.prototype, {
|
|
|
671
676
|
|
|
672
677
|
var materials = Loader.prototype.initMaterials( json.materials, texturePath, 'Anonymous' );
|
|
673
678
|
|
|
674
|
-
|
|
679
|
+
|
|
675
680
|
if (json.materials[0].video) {
|
|
676
|
-
|
|
681
|
+
|
|
677
682
|
var fullPath = texturePath + json.materials[0].video;
|
|
678
683
|
|
|
679
684
|
if (this.paramsString) {
|
|
680
685
|
|
|
681
686
|
fullPath = fullPath + `?${this.paramsString}`;
|
|
682
|
-
|
|
687
|
+
|
|
683
688
|
}
|
|
684
689
|
|
|
685
690
|
const videoHandler = new VideoHandler(fullPath);
|
|
686
|
-
|
|
691
|
+
|
|
687
692
|
geometry._video = videoHandler;
|
|
688
|
-
|
|
693
|
+
|
|
689
694
|
}
|
|
690
|
-
|
|
695
|
+
|
|
691
696
|
if (materials && materials.length > 0) {
|
|
692
697
|
if (json.materials[0].singleSided) {
|
|
693
698
|
materials[0].side = THREE.FrontSide;
|
|
@@ -700,7 +705,7 @@ Object.assign( JSONLoader.prototype, {
|
|
|
700
705
|
materials[0].shininess = Math.floor(json.materials[0].specularCoef / 3);
|
|
701
706
|
}
|
|
702
707
|
}
|
|
703
|
-
|
|
708
|
+
|
|
704
709
|
return { geometry: geometry, materials: materials };
|
|
705
710
|
|
|
706
711
|
}
|