@woosh/meep-engine 2.91.8 → 2.92.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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "description": "Fully featured ECS game engine written in JavaScript",
6
6
  "type": "module",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.91.8",
8
+ "version": "2.92.0",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -0,0 +1,4 @@
1
+ export class EntityNodeAnimationClip {
2
+ name: string
3
+ duration: number
4
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EntityNodeAnimationClip.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/EntityNodeAnimationClip.js"],"names":[],"mappings":"AAAA;IACI,aAAS;IACT;;;OAGG;IACH,QAFU,sBAAsB,CAErB;IACX,iBAAY;IAEZ,yBAMC;CACJ"}
@@ -0,0 +1,17 @@
1
+ export class EntityNodeAnimationClip {
2
+ name = ""
3
+ /**
4
+ *
5
+ * @type {AnimatedValueBinding[]}
6
+ */
7
+ tracks = []
8
+ duration = 0
9
+
10
+ writeAt(time) {
11
+ for (let i = 0; i < this.tracks.length; i++) {
12
+ const track = this.tracks[i];
13
+
14
+ track.writeAt(time);
15
+ }
16
+ }
17
+ }
@@ -4,15 +4,5 @@
4
4
  * @param {AnimationClip} clip
5
5
  */
6
6
  export function convert_three_clip(node: EntityNode, clip: AnimationClip): EntityNodeAnimationClip;
7
- export class EntityNodeAnimationClip {
8
- name: string;
9
- /**
10
- *
11
- * @type {AnimatedValueBinding[]}
12
- */
13
- tracks: AnimatedValueBinding[];
14
- duration: number;
15
- writeAt(time: any): void;
16
- }
17
- import { AnimatedValueBinding } from "../../graphics/ecs/mesh-v2/aggregate/animation/AnimatedValueBinding.js";
7
+ import { EntityNodeAnimationClip } from "./EntityNodeAnimationClip.js";
18
8
  //# sourceMappingURL=ecd_bind_animation_curve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ecd_bind_animation_curve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/ecd_bind_animation_curve.js"],"names":[],"mappings":"AAySA;;;;GAIG;AACH,mGAaC;AApCD;IACI,aAAS;IACT;;;OAGG;IACH,QAFU,oBAAoB,EAAE,CAErB;IACX,iBAAY;IAEZ,yBAMC;CACJ;qCAtSoC,wEAAwE"}
1
+ {"version":3,"file":"ecd_bind_animation_curve.d.ts","sourceRoot":"","sources":["../../../../../src/engine/animation/curve/ecd_bind_animation_curve.js"],"names":[],"mappings":"AAwRA;;;;GAIG;AACH,mGAaC;wCApSuC,8BAA8B"}
@@ -4,6 +4,7 @@ import { BoundQuaternionWriter } from "../../graphics/ecs/mesh-v2/aggregate/anim
4
4
  import { BoundValueWriter } from "../../graphics/ecs/mesh-v2/aggregate/animation/BoundValueWriter.js";
5
5
  import { BoundVector3Writer } from "../../graphics/ecs/mesh-v2/aggregate/animation/BoundVector3Writer.js";
6
6
  import { AnimationCurve } from "./AnimationCurve.js";
7
+ import { EntityNodeAnimationClip } from "./EntityNodeAnimationClip.js";
7
8
  import { Keyframe } from "./Keyframe.js";
8
9
 
9
10
  /**
@@ -277,24 +278,6 @@ function convert_three_track(track, node) {
277
278
  return AnimatedValueBinding.from(writer, curves);
278
279
  }
279
280
 
280
- export class EntityNodeAnimationClip {
281
- name = ""
282
- /**
283
- *
284
- * @type {AnimatedValueBinding[]}
285
- */
286
- tracks = []
287
- duration = 0
288
-
289
- writeAt(time) {
290
- for (let i = 0; i < this.tracks.length; i++) {
291
- const track = this.tracks[i];
292
-
293
- track.writeAt(time);
294
- }
295
- }
296
- }
297
-
298
281
  /**
299
282
  * Three.js clip to internal representation
300
283
  * @param {EntityNode} node
@@ -0,0 +1,5 @@
1
+ export class SGAnimationPlayback {
2
+ clip_name: string
3
+ time: number
4
+ loop: boolean
5
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SGAnimationPlayback.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/mesh-v2/aggregate/SGAnimationPlayback.js"],"names":[],"mappings":"AAAA;IACI,kBAAc;IACd,aAAQ;IACR,cAAY;CACf"}
@@ -0,0 +1,5 @@
1
+ export class SGAnimationPlayback {
2
+ clip_name = ""
3
+ time = 0
4
+ loop = false
5
+ }
@@ -1,44 +1,12 @@
1
- export class SGMeshAnimationController {
2
- /**
3
- *
4
- * @type {AnimationPlayback[]}
5
- */
6
- active: AnimationPlayback[];
7
- /**
8
- *
9
- * @type {EntityNodeAnimationClip[]}
10
- */
11
- bound: EntityNodeAnimationClip[];
12
- /**
13
- *
14
- * @param {string} name
15
- * @return {EntityNodeAnimationClip|undefined}
16
- */
17
- getBoundByName(name: string): EntityNodeAnimationClip | undefined;
18
- /**
19
- *
20
- * @param {string} name
21
- * @return {AnimationPlayback|undefined}
22
- */
23
- getActiveByName(name: string): AnimationPlayback | undefined;
24
- /**
25
- *
26
- * @param {string} name
27
- * @param {boolean} loop
28
- * @param {number} time_offset
29
- * @returns {AnimationPlayback}
30
- */
31
- start(name: string, loop?: boolean, time_offset?: number): AnimationPlayback;
32
- /**
33
- *
34
- * @param {AnimationPlayback} playback
35
- * @return {boolean}
36
- */
37
- stop(playback: AnimationPlayback): boolean;
38
- }
39
- export class AnimationPlayback {
40
- clip_name: string;
41
- time: number;
42
- loop: boolean;
43
- }
44
- //# sourceMappingURL=SGMeshAnimationController.d.ts.map
1
+ import {EntityNodeAnimationClip} from "../../../../animation/curve/EntityNodeAnimationClip";
2
+ import {SGAnimationPlayback} from "./SGAnimationPlayback";
3
+
4
+ export class SGMeshAnimationController {
5
+ readonly bound: EntityNodeAnimationClip[]
6
+
7
+ start(name: string, loop?: boolean, time_offset?: number): SGAnimationPlayback
8
+
9
+ stop(playback: SGAnimationPlayback): boolean
10
+
11
+ getActiveByName(name: string): SGAnimationPlayback | undefined
12
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"SGMeshAnimationController.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationController.js"],"names":[],"mappings":"AAGA;IACI;;;OAGG;IACH,QAFU,iBAAiB,EAAE,CAElB;IAEX;;;OAGG;IACH,OAFU,yBAAyB,CAEzB;IAEV;;;;OAIG;IACH,qBAHW,MAAM,GACL,0BAAwB,SAAS,CAM5C;IAED;;;;OAIG;IACH,sBAHW,MAAM,GACL,iBAAiB,GAAC,SAAS,CAMtC;IAGD;;;;;;OAMG;IACH,YALW,MAAM,SACN,OAAO,gBACP,MAAM,GACJ,iBAAiB,CAgB7B;IAED;;;;OAIG;IACH,eAHW,iBAAiB,GAChB,OAAO,CAQlB;CACJ;AAED;IACI,kBAAc;IACd,aAAQ;IACR,cAAY;CACf"}
1
+ {"version":3,"file":"SGMeshAnimationController.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshAnimationController.js"],"names":[],"mappings":"AAIA;IACI;;;OAGG;IACH,QAFU,mBAAmB,EAAE,CAEpB;IAEX;;;OAGG;IACH,OAFU,yBAAyB,CAEzB;IAEV;;;;OAIG;IACH,qBAHW,MAAM,GACL,0BAAwB,SAAS,CAM5C;IAED;;;;OAIG;IACH,sBAHW,MAAM,GACL,mBAAmB,GAAC,SAAS,CAMxC;IAGD;;;;;;OAMG;IACH,YALW,MAAM,SACN,OAAO,gBACP,MAAM,GACJ,mBAAmB,CAgB/B;IAED;;;;OAIG;IACH,eAHW,mBAAmB,GAClB,OAAO,CAQlB;CACJ;oCAzEmC,0BAA0B"}
@@ -1,10 +1,11 @@
1
1
  import { assert } from "../../../../../core/assert.js";
2
2
  import { array_remove_first } from "../../../../../core/collection/array/array_remove_first.js";
3
+ import { SGAnimationPlayback } from "./SGAnimationPlayback.js";
3
4
 
4
5
  export class SGMeshAnimationController {
5
6
  /**
6
7
  *
7
- * @type {AnimationPlayback[]}
8
+ * @type {SGAnimationPlayback[]}
8
9
  */
9
10
  active = []
10
11
 
@@ -28,7 +29,7 @@ export class SGMeshAnimationController {
28
29
  /**
29
30
  *
30
31
  * @param {string} name
31
- * @return {AnimationPlayback|undefined}
32
+ * @return {SGAnimationPlayback|undefined}
32
33
  */
33
34
  getActiveByName(name) {
34
35
  assert.isString(name, 'name');
@@ -42,14 +43,14 @@ export class SGMeshAnimationController {
42
43
  * @param {string} name
43
44
  * @param {boolean} loop
44
45
  * @param {number} time_offset
45
- * @returns {AnimationPlayback}
46
+ * @returns {SGAnimationPlayback}
46
47
  */
47
48
  start(name, loop = false, time_offset = 0) {
48
49
  assert.isString(name, 'name');
49
50
  assert.isBoolean(loop, 'loop');
50
51
  assert.isNumber(time_offset, 'time_offset');
51
52
 
52
- const playback = new AnimationPlayback();
53
+ const playback = new SGAnimationPlayback();
53
54
 
54
55
  playback.clip_name = name;
55
56
  playback.loop = loop;
@@ -62,7 +63,7 @@ export class SGMeshAnimationController {
62
63
 
63
64
  /**
64
65
  *
65
- * @param {AnimationPlayback} playback
66
+ * @param {SGAnimationPlayback} playback
66
67
  * @return {boolean}
67
68
  */
68
69
  stop(playback) {
@@ -74,8 +75,3 @@ export class SGMeshAnimationController {
74
75
  }
75
76
  }
76
77
 
77
- export class AnimationPlayback {
78
- clip_name = ""
79
- time = 0
80
- loop = false
81
- }
@@ -1,24 +1,8 @@
1
- export class SGMeshAnimationControllerSystem extends System<any, any, any, any, any> {
2
- /**
3
- *
4
- * @param {Engine} engine
5
- */
6
- constructor(engine: Engine);
7
- engine: Engine;
8
- dependencies: (typeof SGMesh | typeof SGMeshAnimationController)[];
9
- components_used: (ResourceAccessSpecification<typeof SGMesh> | ResourceAccessSpecification<typeof SGMeshAnimationController>)[];
10
- /**
11
- *
12
- * @param {SGMeshAnimationController} anim
13
- * @param {SGMesh} mesh
14
- * @param {number} entity
15
- */
16
- link(anim: SGMeshAnimationController, mesh: SGMesh, entity: number): Promise<void>;
17
- update(td: any): void;
18
- #private;
19
- }
20
- import { System } from "../../../../ecs/System.js";
21
- import { SGMesh } from "./SGMesh.js";
22
- import { SGMeshAnimationController } from "./SGMeshAnimationController.js";
23
- import { ResourceAccessSpecification } from "../../../../../core/model/ResourceAccessSpecification.js";
24
- //# sourceMappingURL=SGMeshAnimationControllerSystem.d.ts.map
1
+ import {System} from "../../../../ecs/System";
2
+ import Engine from "../../../../Engine";
3
+ import {SGMesh} from "./SGMesh";
4
+ import {SGMeshAnimationController} from "./SGMeshAnimationController";
5
+
6
+ export class SGMeshAnimationControllerSystem extends System<SGMeshAnimationController,SGMesh>{
7
+ constructor(engine:Engine)
8
+ }