wgge 0.1.3 → 0.1.5
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.
|
@@ -9,7 +9,7 @@ export default class ModelNodeTable extends ModelNodeCollection {
|
|
|
9
9
|
if (id === null || id === undefined || id === '') {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
if (typeof id === 'object' && id.
|
|
12
|
+
if (typeof id === 'object' && typeof id.get === 'function') {
|
|
13
13
|
return this.getById(id.get());
|
|
14
14
|
}
|
|
15
15
|
const i = Number(id);
|
package/game/GameController.js
CHANGED
|
@@ -11,6 +11,10 @@ export default class Model3dLoader extends AssetLoader {
|
|
|
11
11
|
const id = StringHelper.extractId(this.uri);
|
|
12
12
|
const model = this.assets.resources.models3d.getById(id);
|
|
13
13
|
|
|
14
|
+
if (!model) {
|
|
15
|
+
console.error(`Model id ${id} not found!`);
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
this.assets.getAsset(model.uri.get(), (gltf) => {
|
|
15
19
|
const mesh = gltf.scene.clone();
|
|
16
20
|
mesh.scale.set(model.scale.x, model.scale.y, model.scale.z);
|