@xviewer.js/core 1.0.0-alpha.14 → 1.0.0-alpha.15
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/dist/main.js +4 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +4 -3
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -2905,7 +2905,7 @@ class ResourceManager {
|
|
|
2905
2905
|
onError: reject
|
|
2906
2906
|
});
|
|
2907
2907
|
} else {
|
|
2908
|
-
reject("missing loader for " + ext);
|
|
2908
|
+
reject("ResourceManager.loadAsset: missing loader for " + ext);
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
2911
|
});
|
|
@@ -3126,6 +3126,7 @@ class Viewer extends EventEmitter {
|
|
|
3126
3126
|
this.addLoader(aGLTFLoader);
|
|
3127
3127
|
this.addLoader(aHDRLoader);
|
|
3128
3128
|
this.addLoader(aTextureLoader);
|
|
3129
|
+
this.addLoader(aJSONLoader);
|
|
3129
3130
|
}
|
|
3130
3131
|
_frame(time) {
|
|
3131
3132
|
this._time = time;
|
|
@@ -3333,7 +3334,7 @@ class Viewer extends EventEmitter {
|
|
|
3333
3334
|
parent.add(node);
|
|
3334
3335
|
this._componentManager.addComponent(node, ins);
|
|
3335
3336
|
} else {
|
|
3336
|
-
throw Error("unsuport object");
|
|
3337
|
+
throw Error("Viewer.addNode: unsuport object");
|
|
3337
3338
|
}
|
|
3338
3339
|
if (component) {
|
|
3339
3340
|
const components = Array.isArray(component) ? component : [
|
|
@@ -3422,7 +3423,7 @@ class Viewer extends EventEmitter {
|
|
|
3422
3423
|
if (target.every((v)=>v.isMaterial)) {
|
|
3423
3424
|
Viewer.CompileMaterial(this._renderer, this._scene, this._camera, target);
|
|
3424
3425
|
} else {
|
|
3425
|
-
throw Error("unsuport material");
|
|
3426
|
+
throw Error("Viewer.compile: unsuport material");
|
|
3426
3427
|
}
|
|
3427
3428
|
} else if (typeof target === "object") {
|
|
3428
3429
|
if (target.isMaterial) {
|