@woosh/meep-engine 2.119.7 → 2.119.8

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.119.7",
8
+ "version": "2.119.8",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -27,6 +27,12 @@ export class EntityReference {
27
27
  * @return {boolean}
28
28
  */
29
29
  equals(other: EntityReference): boolean;
30
+ /**
31
+ *
32
+ * @param {EntityComponentDataset} ecd
33
+ * @returns {boolean}
34
+ */
35
+ verify(ecd: EntityComponentDataset): boolean;
30
36
  }
31
37
  export namespace EntityReference {
32
38
  let NULL: EntityReference;
@@ -1 +1 @@
1
- {"version":3,"file":"EntityReference.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityReference.js"],"names":[],"mappings":"AAEA;IAgCI;;;;;OAKG;IACH,gBAJW,MAAM,cACN,MAAM,GACL,eAAe,CAa1B;IAhDD;;;OAGG;IACH,IAFU,MAAM,CAET;IACP;;;OAGG;IACH,YAFU,MAAM,CAED;IAGf;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACd,OAAO,CAMlB;CAoBJ;;cAIS,eAAe"}
1
+ {"version":3,"file":"EntityReference.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityReference.js"],"names":[],"mappings":"AAEA;IA6CI;;;;;OAKG;IACH,gBAJW,MAAM,cACN,MAAM,GACL,eAAe,CAa1B;IA7DD;;;OAGG;IACH,IAFU,MAAM,CAET;IACP;;;OAGG;IACH,YAFU,MAAM,CAED;IAGf;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACd,OAAO,CAMlB;IAED;;;;OAIG;IACH,qCAFa,OAAO,CAQnB;CAoBJ;;cAIS,eAAe"}
@@ -32,6 +32,19 @@ export class EntityReference {
32
32
  ;
33
33
  }
34
34
 
35
+ /**
36
+ * Checks whether referenced entity exists and the generation matches
37
+ * @param {EntityComponentDataset} ecd
38
+ * @returns {boolean}
39
+ */
40
+ verify(ecd) {
41
+
42
+ return ecd.entityExists(this.id)
43
+ && this.generation === ecd.getEntityGeneration(this.id)
44
+ ;
45
+
46
+ }
47
+
35
48
  /**
36
49
  *
37
50
  * @param {number} id