@woosh/meep-engine 2.119.81 → 2.119.83
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/bundle-worker-image-decoder.js +1 -1
- package/package.json +1 -1
- package/src/core/binary/BinaryBuffer.d.ts +19 -0
- package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
- package/src/core/binary/BinaryBuffer.js +31 -0
- package/src/core/binary/half_to_float_uint16.d.ts.map +1 -1
- package/src/core/binary/half_to_float_uint16.js +14 -5
- package/src/core/binary/uint8_to_float.d.ts.map +1 -1
- package/src/core/binary/uint8_to_float.js +1 -0
- package/src/core/collection/heap/Uint32Heap.d.ts +12 -2
- package/src/core/collection/heap/Uint32Heap.d.ts.map +1 -1
- package/src/core/collection/heap/Uint32Heap.js +11 -0
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/color/Color.js +40 -44
- package/src/core/color/hsv/hsv2rgb.d.ts.map +1 -1
- package/src/core/color/hsv/hsv2rgb.js +2 -41
- package/src/core/color/hsv/hsv2rgb_float.d.ts +13 -0
- package/src/core/color/hsv/hsv2rgb_float.d.ts.map +1 -0
- package/src/core/color/hsv/hsv2rgb_float.js +56 -0
- package/src/core/events/signal/Signal.d.ts.map +1 -1
- package/src/core/events/signal/Signal.js +99 -105
- package/src/core/geom/3d/compose_matrix4_array.d.ts +17 -4
- package/src/core/geom/3d/compose_matrix4_array.d.ts.map +1 -1
- package/src/core/geom/3d/compose_matrix4_array.js +3 -3
- package/src/core/geom/Vector3.d.ts.map +1 -1
- package/src/core/geom/Vector3.js +17 -0
- package/src/engine/ecs/Entity.d.ts.map +1 -1
- package/src/engine/ecs/Entity.js +45 -15
- package/src/engine/ecs/EntityReference.d.ts +33 -0
- package/src/engine/ecs/EntityReference.d.ts.map +1 -1
- package/src/engine/ecs/EntityReference.js +59 -4
- package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts +2 -2
- package/src/engine/ecs/fow/FogOfWarRevealerSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/Light.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/Light.js +9 -4
- package/src/engine/graphics/ecs/path/PathDisplaySystem.d.ts.map +1 -1
- package/src/engine/sound/ecs/emitter/SoundTrack.d.ts.map +1 -1
- package/src/engine/sound/ecs/emitter/SoundTrack.js +8 -4
package/src/engine/ecs/Entity.js
CHANGED
|
@@ -3,6 +3,7 @@ import Signal from "../../core/events/signal/Signal.js";
|
|
|
3
3
|
import { isDefined } from "../../core/process/matcher/isDefined.js";
|
|
4
4
|
import { EntityFlags } from "./EntityFlags.js";
|
|
5
5
|
import { EventType } from "./EntityManager.js";
|
|
6
|
+
import { EntityReference } from "./EntityReference.js";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Set of default flags
|
|
@@ -20,17 +21,44 @@ const DEFAULT_FLAGS =
|
|
|
20
21
|
class Entity {
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {
|
|
24
|
+
* @readonly
|
|
25
|
+
* @type {EntityReference}
|
|
26
|
+
*/
|
|
27
|
+
reference = new EntityReference();
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated use {@link reference} instead
|
|
32
|
+
* @returns {number}
|
|
25
33
|
*/
|
|
26
|
-
id
|
|
34
|
+
get id() {
|
|
35
|
+
return this.reference.id;
|
|
36
|
+
}
|
|
27
37
|
|
|
28
38
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @type {number}
|
|
39
|
+
* @deprecated use {@link reference} instead
|
|
40
|
+
* @param {number} v
|
|
32
41
|
*/
|
|
33
|
-
|
|
42
|
+
set id(v) {
|
|
43
|
+
this.reference.id = v;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated use {@link reference} instead
|
|
48
|
+
* @returns {number}
|
|
49
|
+
*/
|
|
50
|
+
get generation() {
|
|
51
|
+
return this.reference.generation;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated use {@link reference} instead
|
|
57
|
+
* @param {number} v
|
|
58
|
+
*/
|
|
59
|
+
set generation(v) {
|
|
60
|
+
this.reference.generation = v;
|
|
61
|
+
}
|
|
34
62
|
|
|
35
63
|
/**
|
|
36
64
|
* Components associated with the entity
|
|
@@ -220,7 +248,7 @@ class Entity {
|
|
|
220
248
|
//see if entity is built
|
|
221
249
|
if (this.getFlag(EntityFlags.Built)) {
|
|
222
250
|
|
|
223
|
-
this.dataset.removeComponentFromEntity(this.id, klass);
|
|
251
|
+
this.dataset.removeComponentFromEntity(this.reference.id, klass);
|
|
224
252
|
|
|
225
253
|
}
|
|
226
254
|
|
|
@@ -325,7 +353,7 @@ class Entity {
|
|
|
325
353
|
if (this.getFlag(EntityFlags.Built)) {
|
|
326
354
|
|
|
327
355
|
const dataset = this.dataset;
|
|
328
|
-
const entity = this.id;
|
|
356
|
+
const entity = this.reference.id;
|
|
329
357
|
|
|
330
358
|
//check that the entity is the same as what we have built
|
|
331
359
|
//assert.ok(checkExistingComponents(entity, this.element, dataset), `Signature of Entity does not match existing entity(id=${entity})`);
|
|
@@ -334,8 +362,8 @@ class Entity {
|
|
|
334
362
|
|
|
335
363
|
dataset.removeEntity(entity);
|
|
336
364
|
|
|
337
|
-
|
|
338
|
-
this.
|
|
365
|
+
// clear reference
|
|
366
|
+
this.reference.copy(EntityReference.NULL);
|
|
339
367
|
|
|
340
368
|
this.clearFlag(EntityFlags.Built);
|
|
341
369
|
|
|
@@ -362,8 +390,9 @@ class Entity {
|
|
|
362
390
|
return this.id;
|
|
363
391
|
}
|
|
364
392
|
|
|
365
|
-
const entity =
|
|
366
|
-
this.
|
|
393
|
+
const entity = dataset.createEntity();
|
|
394
|
+
this.reference.bind(dataset, entity);
|
|
395
|
+
|
|
367
396
|
this.dataset = dataset;
|
|
368
397
|
|
|
369
398
|
let i;
|
|
@@ -419,9 +448,10 @@ class Entity {
|
|
|
419
448
|
.forEach(r.add, r);
|
|
420
449
|
|
|
421
450
|
r.setFlag(EntityFlags.Built);
|
|
422
|
-
|
|
451
|
+
|
|
423
452
|
r.dataset = dataset;
|
|
424
|
-
|
|
453
|
+
|
|
454
|
+
r.reference.bind(dataset,entity);
|
|
425
455
|
|
|
426
456
|
return r;
|
|
427
457
|
}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Uniquely identifies an entity by both its ID and generation.
|
|
3
|
+
* Lets us distinguish between two entities with the same ID that were created at different times
|
|
4
|
+
*/
|
|
1
5
|
export class EntityReference {
|
|
2
6
|
/**
|
|
3
7
|
*
|
|
@@ -8,14 +12,26 @@ export class EntityReference {
|
|
|
8
12
|
static from(id: number, generation: number): EntityReference;
|
|
9
13
|
/**
|
|
10
14
|
* Entity ID
|
|
15
|
+
* When entity is live - this is the entity ID inside associated `EntityComponentDataset`, when the entity is not live - it's set to -1
|
|
11
16
|
* @type {number}
|
|
12
17
|
*/
|
|
13
18
|
id: number;
|
|
14
19
|
/**
|
|
15
20
|
* Entity generation number. This uniquely identifies an entity in combination with the ID
|
|
21
|
+
* Generation of an existing entity must match for it to be considered "the same"
|
|
16
22
|
* @type {number}
|
|
17
23
|
*/
|
|
18
24
|
generation: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @param {EntityReference} other
|
|
28
|
+
*/
|
|
29
|
+
copy(other: EntityReference): void;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @returns {EntityReference}
|
|
33
|
+
*/
|
|
34
|
+
clone(): EntityReference;
|
|
19
35
|
/**
|
|
20
36
|
*
|
|
21
37
|
* @return {number}
|
|
@@ -39,6 +55,23 @@ export class EntityReference {
|
|
|
39
55
|
* @returns {boolean}
|
|
40
56
|
*/
|
|
41
57
|
destroy(ecd: EntityComponentDataset): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Bind reference to a specific entity
|
|
60
|
+
* @param {EntityComponentDataset} ecd
|
|
61
|
+
* @param {number} entity
|
|
62
|
+
*/
|
|
63
|
+
bind(ecd: EntityComponentDataset, entity: number): void;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @param {number} id
|
|
67
|
+
* @param {number} generation
|
|
68
|
+
*/
|
|
69
|
+
from(id: number, generation: number): void;
|
|
70
|
+
/**
|
|
71
|
+
* @readonly
|
|
72
|
+
* @type {boolean}
|
|
73
|
+
*/
|
|
74
|
+
readonly isEntityReference: boolean;
|
|
42
75
|
}
|
|
43
76
|
export namespace EntityReference {
|
|
44
77
|
let NULL: EntityReference;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EntityReference.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityReference.js"],"names":[],"mappings":"AAEA;
|
|
1
|
+
{"version":3,"file":"EntityReference.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityReference.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IA6GI;;;;;OAKG;IACH,gBAJW,MAAM,cACN,MAAM,GACL,eAAe,CAQ1B;IAvHD;;;;OAIG;IACH,IAFU,MAAM,CAET;IAEP;;;;OAIG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,YAFW,eAAe,QAKzB;IAED;;;OAGG;IACH,SAFa,eAAe,CAQ3B;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACd,OAAO,CAMlB;IAED;;;;OAIG;IACH,qCAFa,OAAO,CAQnB;IAED;;;;OAIG;IACH,sCAFa,OAAO,CASnB;IAED;;;;OAIG;IACH,0CAFW,MAAM,QAMhB;IAED;;;;OAIG;IACH,SAHW,MAAM,cACN,MAAM,QAUhB;IAiBL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAN1C;;cAWS,eAAe"}
|
|
@@ -1,19 +1,46 @@
|
|
|
1
1
|
import { assert } from "../../core/assert.js";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Uniquely identifies an entity by both its ID and generation.
|
|
5
|
+
* Lets us distinguish between two entities with the same ID that were created at different times
|
|
6
|
+
*/
|
|
3
7
|
export class EntityReference {
|
|
4
8
|
|
|
5
9
|
/**
|
|
6
10
|
* Entity ID
|
|
11
|
+
* When entity is live - this is the entity ID inside associated `EntityComponentDataset`, when the entity is not live - it's set to -1
|
|
7
12
|
* @type {number}
|
|
8
13
|
*/
|
|
9
14
|
id = -1
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* Entity generation number. This uniquely identifies an entity in combination with the ID
|
|
18
|
+
* Generation of an existing entity must match for it to be considered "the same"
|
|
13
19
|
* @type {number}
|
|
14
20
|
*/
|
|
15
21
|
generation = -1
|
|
16
22
|
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @param {EntityReference} other
|
|
26
|
+
*/
|
|
27
|
+
copy(other){
|
|
28
|
+
this.id = other.id;
|
|
29
|
+
this.generation = other.generation;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @returns {EntityReference}
|
|
35
|
+
*/
|
|
36
|
+
clone(){
|
|
37
|
+
const r = new EntityReference();
|
|
38
|
+
|
|
39
|
+
r.copy(this);
|
|
40
|
+
|
|
41
|
+
return r;
|
|
42
|
+
}
|
|
43
|
+
|
|
17
44
|
/**
|
|
18
45
|
*
|
|
19
46
|
* @return {number}
|
|
@@ -60,27 +87,55 @@ export class EntityReference {
|
|
|
60
87
|
}
|
|
61
88
|
}
|
|
62
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Bind reference to a specific entity
|
|
92
|
+
* @param {EntityComponentDataset} ecd
|
|
93
|
+
* @param {number} entity
|
|
94
|
+
*/
|
|
95
|
+
bind(ecd, entity){
|
|
96
|
+
const generation = ecd.getEntityGeneration(entity);
|
|
97
|
+
|
|
98
|
+
this.from(entity, generation);
|
|
99
|
+
}
|
|
100
|
+
|
|
63
101
|
/**
|
|
64
102
|
*
|
|
65
103
|
* @param {number} id
|
|
66
104
|
* @param {number} generation
|
|
67
|
-
* @return {EntityReference}
|
|
68
105
|
*/
|
|
69
|
-
|
|
106
|
+
from(id, generation){
|
|
70
107
|
|
|
71
108
|
assert.isNonNegativeInteger(id, 'id');
|
|
72
109
|
assert.isNonNegativeInteger(generation, 'generation');
|
|
73
110
|
|
|
111
|
+
this.id = id;
|
|
112
|
+
this.generation = generation;
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
*
|
|
118
|
+
* @param {number} id
|
|
119
|
+
* @param {number} generation
|
|
120
|
+
* @return {EntityReference}
|
|
121
|
+
*/
|
|
122
|
+
static from(id, generation) {
|
|
74
123
|
const r = new EntityReference();
|
|
75
124
|
|
|
76
|
-
r.id
|
|
77
|
-
r.generation = generation;
|
|
125
|
+
r.from(id, generation);
|
|
78
126
|
|
|
79
127
|
return r;
|
|
80
128
|
}
|
|
81
129
|
}
|
|
82
130
|
|
|
83
131
|
/**
|
|
132
|
+
* @readonly
|
|
133
|
+
* @type {boolean}
|
|
134
|
+
*/
|
|
135
|
+
EntityReference.prototype.isEntityReference = true;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Special singleton to describe an invalid reference
|
|
84
139
|
* @readonly
|
|
85
140
|
* @type {EntityReference}
|
|
86
141
|
*/
|
|
@@ -4,7 +4,7 @@ export class FogOfWarRevealerSystem extends System<any, any, any, any, any> {
|
|
|
4
4
|
* @param {number} team
|
|
5
5
|
*/
|
|
6
6
|
constructor(team: number);
|
|
7
|
-
dependencies: (typeof Transform | typeof
|
|
7
|
+
dependencies: (typeof Transform | typeof FogOfWarRevealer | typeof Team)[];
|
|
8
8
|
components_used: ResourceAccessSpecification<typeof FogOfWar>[];
|
|
9
9
|
data: any[];
|
|
10
10
|
/**
|
|
@@ -25,8 +25,8 @@ export class FogOfWarRevealerSystem extends System<any, any, any, any, any> {
|
|
|
25
25
|
}
|
|
26
26
|
import { System } from "../System.js";
|
|
27
27
|
import { Transform } from "../transform/Transform.js";
|
|
28
|
-
import Team from "../team/Team.js";
|
|
29
28
|
import { FogOfWarRevealer } from "./FogOfWarRevealer.js";
|
|
29
|
+
import Team from "../team/Team.js";
|
|
30
30
|
import { FogOfWar } from "./FogOfWar.js";
|
|
31
31
|
import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessSpecification.js";
|
|
32
32
|
//# sourceMappingURL=FogOfWarRevealerSystem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FogOfWarRevealerSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/fow/FogOfWarRevealerSystem.js"],"names":[],"mappings":"AAaA;IACI;;;OAGG;IACH,kBAFW,MAAM,EAkBhB;IAbG,2EAAuD;IAEvD,gEAEC;IAED,YAAc;IAEd;;;OAGG;IACH,MAFU,MAAM,CAEA;IAGpB;;;;;;OAMG;IACH,eALW,gBAAgB,aAChB,SAAS,QACT,IAAI,qBA2Dd;IAED,oBAmCC;IAED,mEAMC;CACJ;uBAjJsB,cAAc;0BAKX,2BAA2B;
|
|
1
|
+
{"version":3,"file":"FogOfWarRevealerSystem.d.ts","sourceRoot":"","sources":["../../../../../src/engine/ecs/fow/FogOfWarRevealerSystem.js"],"names":[],"mappings":"AAaA;IACI;;;OAGG;IACH,kBAFW,MAAM,EAkBhB;IAbG,2EAAuD;IAEvD,gEAEC;IAED,YAAc;IAEd;;;OAGG;IACH,MAFU,MAAM,CAEA;IAGpB;;;;;;OAMG;IACH,eALW,gBAAgB,aAChB,SAAS,QACT,IAAI,qBA2Dd;IAED,oBAmCC;IAED,mEAMC;CACJ;uBAjJsB,cAAc;0BAKX,2BAA2B;iCAJpB,uBAAuB;iBAGvC,iBAAiB;yBADT,eAAe;4CAKI,oDAAoD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Light.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/light/Light.js"],"names":[],"mappings":"AASA;IA+DI;;;;OAIG;IACH,yBAFa,KAAK,CAQjB;IApEG;;;OAGG;IACH,wBAA4D;IAE5D;;;OAGG;IACH,OAFU,KAAK,CAEgB;IAE/B;;;OAGG;IACH,WAFU,OAAO,CAEc;IAE/B;;;OAGG;IACH,OAFU,OAAO,CAEoB;IAErC;;;OAGG;IACH,UAFU,OAAO,CAEe;IAEhC;;;OAGG;IACH,UAFU,OAAO,CAE4B;IAE7C;;;OAGG;IACH,YAFU,eAAe,CAEmB;IAE5C;;;;OAIG;IACH,sBAAyB;IAEzB;;;;OAIG;IACH,mBAAsB;IAgB1B,
|
|
1
|
+
{"version":3,"file":"Light.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/light/Light.js"],"names":[],"mappings":"AASA;IA+DI;;;;OAIG;IACH,yBAFa,KAAK,CAQjB;IApEG;;;OAGG;IACH,wBAA4D;IAE5D;;;OAGG;IACH,OAFU,KAAK,CAEgB;IAE/B;;;OAGG;IACH,WAFU,OAAO,CAEc;IAE/B;;;OAGG;IACH,OAFU,OAAO,CAEoB;IAErC;;;OAGG;IACH,UAFU,OAAO,CAEe;IAEhC;;;OAGG;IACH,UAFU,OAAO,CAE4B;IAE7C;;;OAGG;IACH,YAFU,eAAe,CAEmB;IAE5C;;;;OAIG;IACH,sBAAyB;IAEzB;;;;OAIG;IACH,mBAAsB;IAgB1B,0BAqDC;IAED;;;;;MAqBC;CACJ;;;;;yBA/JwB,wCAAwC;sBAH3C,iCAAiC;oBACnC,kCAAkC;4BAC1B,2CAA2C;0BAE7C,gBAAgB"}
|
|
@@ -88,11 +88,16 @@ export class Light {
|
|
|
88
88
|
this.type.fromJSON(json.type);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
const j_color = json.color;
|
|
92
|
+
|
|
93
|
+
if (j_color !== undefined) {
|
|
94
|
+
const type = typeof j_color;
|
|
95
|
+
if (type === "string") {
|
|
96
|
+
this.color.parse(j_color);
|
|
97
|
+
} else if (type === "object") {
|
|
98
|
+
this.color.fromJSON(j_color);
|
|
94
99
|
} else {
|
|
95
|
-
this.color.fromUint(
|
|
100
|
+
this.color.fromUint(j_color);
|
|
96
101
|
}
|
|
97
102
|
} else {
|
|
98
103
|
// default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PathDisplaySystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/path/PathDisplaySystem.js"],"names":[],"mappings":"AAoPA;IACI;;;OAGG;IACH,4BAwCC;IAnCG,mDAGC;IAED,2KAIC;IAED;;;OAGG;IACH,eAAoB;IAEpB;;;OAGG;IACH,iCAAkB;IAElB;;;;OAIG;IACH,wBAAkC;IAElC;;;OAGG;IACH,YAFU,MAAM,CAEc;IAGlC;;;;OAIG;IACH,8BAFW,MAAM,QAQhB;IAED;;;;OAIG;IACH,6BAFW,MAAM,QAIhB;IAED,mFAKC;IAED,2EAKC;IAED,8BA+BC;CACJ;sCAtWqC,8CAA8C;
|
|
1
|
+
{"version":3,"file":"PathDisplaySystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/path/PathDisplaySystem.js"],"names":[],"mappings":"AAoPA;IACI;;;OAGG;IACH,4BAwCC;IAnCG,mDAGC;IAED,2KAIC;IAED;;;OAGG;IACH,eAAoB;IAEpB;;;OAGG;IACH,iCAAkB;IAElB;;;;OAIG;IACH,wBAAkC;IAElC;;;OAGG;IACH,YAFU,MAAM,CAEc;IAGlC;;;;OAIG;IACH,8BAFW,MAAM,QAQhB;IAED;;;;OAIG;IACH,6BAFW,MAAM,QAIhB;IAED,mFAKC;IAED,2EAKC;IAED,8BA+BC;CACJ;sCAtWqC,8CAA8C;4BAExD,kBAAkB;iBAI7B,4CAA4C;0BAWnC,qCAAqC;4CAHnB,uDAAuD;+BAEpE,8BAA8B;6BAjBhC,qCAAqC;8BAQpC,gCAAgC;mBAM3C,0CAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SoundTrack.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/ecs/emitter/SoundTrack.js"],"names":[],"mappings":"AAYA;
|
|
1
|
+
{"version":3,"file":"SoundTrack.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/sound/ecs/emitter/SoundTrack.js"],"names":[],"mappings":"AAYA;IAscI,uCAMC;IApcD;;;OAGG;IACH,KAFU,SAAO,IAAI,CAEV;IAEX;;;OAGG;IACH,MAFU,MAAM,CAEP;IAET;;;OAGG;IACH,SAFU,SAAO,IAAI,CAER;IAEb;;;OAGG;IACH,iBAAa;IAEb;;;;OAIG;IACH,UAFU,MAAM,CAEF;IAGd;;;OAGG;IACH,OAFU,MAAM,GAAC,eAAe,CAEV;IAEtB;QACI;;WAEG;eADO,OAAO,IAAI,CAAC;MAGxB;IAQF;;;OAGG;IACH,6BAEC;IAED;;;OAGG;IACH,yBAFW,YAAY,QAItB;IAED;;;OAGG;IACH,6BAMC;IAED,0BAEC;IAUD,gCAiDC;IAED,gBAaC;IAED;;;;OAIG;IACH,eAHW,UAAU,UAmCpB;IAED;;;;OAIG;IACH,cAHW,MAAM,oBAAkB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,oBAAkB,GACtB,IAAI,CAIhB;IAED;;;;OAIG;IACH,gBAHW,MAAM,oBAAkB,SACxB,OAAO,QAQjB;IAED;;;;OAIG;IACH,cAHW,MAAM,oBAAkB,GACtB,OAAO,CAInB;IAED;;;;;;;;;OASG;IACH,0BAJW,MAAM,YACN,MAAM,eACN,MAAM,QAuChB;IAED;;;OAGG;IACH,wBAMC;IAED;;;OAGG;IACH,qBAEC;IAUD;;;OAGG;IACH,uBAEC;IAdD;;;OAGG;IACH,oBAEC;IAkBD;;;OAGG;IACH,0BAEC;IAdD;;;OAGG;IACH,uBAEC;IAkBD;;;OAGG;IACH,iCAEC;IAdD;;;OAGG;IACH,8BAEC;IAUD;;;OAGG;IACH,YAFW,UAAU,QAOpB;IAED;;;;OAIG;IACH,cAHW,UAAU,GACR,OAAO,CAQnB;IAED;;;OAGG;IACH,QAFY,MAAM,CASjB;IAED;;;OAGG;IACH,SAFY,UAAU,CAQrB;IAED;;;;;;;;;MAWC;IAED;;;;;;;;;aA6BC;;CAUJ;gCAnd+B,sBAAsB;mBALnC,0CAA0C;gCAM7B,sBAAsB"}
|
|
@@ -161,12 +161,16 @@ export class SoundTrack {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
suspend() {
|
|
164
|
-
const nodes = this
|
|
164
|
+
const nodes = this.#nodes;
|
|
165
|
+
|
|
166
|
+
if(nodes.source !== null) {
|
|
165
167
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
+
nodes.source.stop();
|
|
169
|
+
nodes.source.disconnect();
|
|
168
170
|
|
|
169
|
-
|
|
171
|
+
nodes.source = null;
|
|
172
|
+
|
|
173
|
+
}
|
|
170
174
|
|
|
171
175
|
this.setFlag(SoundTrackFlags.Suspended);
|
|
172
176
|
}
|