@woosh/meep-engine 2.93.2 → 2.93.3
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/meep.cjs +1 -1
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +1 -1
- package/package.json +1 -1
- package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts.map +1 -1
- package/src/engine/animation/clip/ecd_bind_animation_curve.js +7 -3
- package/src/engine/animation/curve/prototypeGLTF.js +15 -11
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +0 -14
- package/src/engine/ecs/computeComponentClassName.d.ts +2 -0
- package/src/engine/ecs/computeComponentClassName.d.ts.map +1 -0
- package/src/engine/ecs/computeComponentClassName.js +13 -0
package/build/meep.module.js
CHANGED
|
@@ -72626,7 +72626,7 @@ class Entity {
|
|
|
72626
72626
|
const component = this.getComponent(klass);
|
|
72627
72627
|
|
|
72628
72628
|
if (component === null) {
|
|
72629
|
-
throw new Error(`Component of given class not found`);
|
|
72629
|
+
throw new Error(`Component of given class '${computeComponentClassName(klass)}' not found`);
|
|
72630
72630
|
}
|
|
72631
72631
|
|
|
72632
72632
|
return component;
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecd_bind_animation_curve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/clip/ecd_bind_animation_curve.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ecd_bind_animation_curve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/clip/ecd_bind_animation_curve.js"],"names":[],"mappings":"AAuUA;;;;GAIG;AACH,2DAFW,mBAAmB,wBA6B7B;8BAhW6B,oBAAoB;qCACb,2BAA2B"}
|
|
@@ -14,13 +14,17 @@ import { AnimationTrackBinding } from "./AnimationTrackBinding.js";
|
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
16
|
* @param {EntityNode} node
|
|
17
|
-
* @returns {
|
|
17
|
+
* @returns {string|undefined}
|
|
18
18
|
*/
|
|
19
19
|
function get_node_name(node) {
|
|
20
20
|
/**
|
|
21
21
|
* @type {Name}
|
|
22
22
|
*/
|
|
23
|
-
const name = node.entity.
|
|
23
|
+
const name = node.entity.getComponent(Name);
|
|
24
|
+
|
|
25
|
+
if (name === null) {
|
|
26
|
+
return undefined;
|
|
27
|
+
}
|
|
24
28
|
|
|
25
29
|
return name.getValue();
|
|
26
30
|
}
|
|
@@ -348,7 +352,7 @@ export function convert_three_clip(node, clip) {
|
|
|
348
352
|
meep_clip.tracks.push(meep_track);
|
|
349
353
|
clip_binding.tracks.push(AnimationTrackBinding.from(writer, meep_track));
|
|
350
354
|
} catch (e) {
|
|
351
|
-
logger.error(`Failed to parse track[${i}]: ${e
|
|
355
|
+
logger.error(`Failed to parse track[${i}]: ${e}`);
|
|
352
356
|
}
|
|
353
357
|
}
|
|
354
358
|
|
|
@@ -38,17 +38,17 @@ async function main(engine) {
|
|
|
38
38
|
yaw: 3.123185307179593,
|
|
39
39
|
});
|
|
40
40
|
//
|
|
41
|
-
make_sample('data/models/samples/InterpolationTest.glb',[
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],engine.entityManager.dataset);
|
|
41
|
+
// make_sample('data/models/samples/InterpolationTest.glb',[
|
|
42
|
+
// 'Step Scale',
|
|
43
|
+
// 'Linear Scale',
|
|
44
|
+
// 'CubicSpline Scale',
|
|
45
|
+
// 'Step Rotation',
|
|
46
|
+
// 'CubicSpline Rotation',
|
|
47
|
+
// 'Linear Rotation',
|
|
48
|
+
// 'Step Translation',
|
|
49
|
+
// 'CubicSpline Translation',
|
|
50
|
+
// 'Linear Translation'
|
|
51
|
+
// ],engine.entityManager.dataset);
|
|
52
52
|
|
|
53
53
|
// make_sample('data/models/samples/BoxAnimated.glb',[
|
|
54
54
|
// 'animation_0'
|
|
@@ -57,6 +57,10 @@ async function main(engine) {
|
|
|
57
57
|
// make_sample('data/models/samples/animatedbox1.gltf', [
|
|
58
58
|
// 'All Animations'
|
|
59
59
|
// ], engine.entityManager.dataset);
|
|
60
|
+
|
|
61
|
+
make_sample('moicon/Separated_Cardboard-Box-800x600x400_Roughness0/V1 Cardboard B.gltf', [
|
|
62
|
+
'All Animations'
|
|
63
|
+
], engine.entityManager.dataset);
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
/**
|
package/src/engine/ecs/Entity.js
CHANGED
|
@@ -193,7 +193,7 @@ class Entity {
|
|
|
193
193
|
const component = this.getComponent(klass);
|
|
194
194
|
|
|
195
195
|
if (component === null) {
|
|
196
|
-
throw new Error(`Component of given class not found`);
|
|
196
|
+
throw new Error(`Component of given class '${computeComponentClassName(klass)}' not found`);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
return component;
|
|
@@ -1868,20 +1868,6 @@ function stringifyComponent(c) {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
1870
|
|
|
1871
|
-
function computeComponentClassName(klass) {
|
|
1872
|
-
if (klass === undefined) {
|
|
1873
|
-
return "undefined";
|
|
1874
|
-
} else if (klass === null) {
|
|
1875
|
-
return "null";
|
|
1876
|
-
} else if (typeof klass.type === "string") {
|
|
1877
|
-
return klass.type;
|
|
1878
|
-
} else if (typeof klass === "function") {
|
|
1879
|
-
return klass.name;
|
|
1880
|
-
} else {
|
|
1881
|
-
return "$UNKNOWN"
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
1871
|
|
|
1886
1872
|
/**
|
|
1887
1873
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computeComponentClassName.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/computeComponentClassName.js"],"names":[],"mappings":"AAAA,4DAYC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function computeComponentClassName(klass) {
|
|
2
|
+
if (klass === undefined) {
|
|
3
|
+
return "undefined";
|
|
4
|
+
} else if (klass === null) {
|
|
5
|
+
return "null";
|
|
6
|
+
} else if (typeof klass.type === "string") {
|
|
7
|
+
return klass.type;
|
|
8
|
+
} else if (typeof klass === "function") {
|
|
9
|
+
return klass.name;
|
|
10
|
+
} else {
|
|
11
|
+
return "$UNKNOWN"
|
|
12
|
+
}
|
|
13
|
+
}
|