@woosh/meep-engine 2.119.94 → 2.119.95

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.94",
8
+ "version": "2.119.95",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -48,6 +48,38 @@ class Engine {
48
48
 
49
49
  viewStack = new ViewStack();
50
50
 
51
+ /**
52
+ *
53
+ * Static database
54
+ * Can contain tables of structured data that the application often works with.
55
+ * Engine startup will load all tables ensuring that data is ready once startup finishes
56
+ * Use sparingly, this is not suitable for very large amounts of data as all the data will be in memory and deserialization will stall engine startup
57
+ * Example: inventory item table, monster table
58
+ * @readonly
59
+ * @type {StaticKnowledgeDatabase}
60
+ */
61
+ staticKnowledge = new StaticKnowledgeDatabase();
62
+
63
+ /**
64
+ * @readonly
65
+ * @type {EnginePluginManager}
66
+ */
67
+ plugins = new EnginePluginManager();
68
+
69
+ /**
70
+ * Main simulation ticker
71
+ * @readonly
72
+ * @type {Ticker}
73
+ */
74
+ ticker = new Ticker();
75
+
76
+ /**
77
+ * Default executor, enables time-sharing concurrency
78
+ * @readonly
79
+ * @type {ConcurrentExecutor}
80
+ */
81
+ executor = new ConcurrentExecutor(1, 10);
82
+
51
83
  /**
52
84
  *
53
85
  * @param {EnginePlatform} platform
@@ -71,18 +103,8 @@ class Engine {
71
103
  */
72
104
  this.platform = platform;
73
105
 
74
- /**
75
- *
76
- * @type {StaticKnowledgeDatabase}
77
- */
78
- this.staticKnowledge = new StaticKnowledgeDatabase();
79
106
  this.staticKnowledge.validation_enabled = debug;
80
107
 
81
- /**
82
- *
83
- * @type {EnginePluginManager}
84
- */
85
- this.plugins = new EnginePluginManager();
86
108
 
87
109
  /**
88
110
  *
@@ -90,11 +112,6 @@ class Engine {
90
112
  */
91
113
  this.performance = new MetricCollection();
92
114
 
93
- /**
94
- *
95
- * @type {ConcurrentExecutor}
96
- */
97
- this.executor = new ConcurrentExecutor(1, 10);
98
115
 
99
116
  this.__using_external_entity_manager = entityManager !== undefined;
100
117
 
@@ -106,11 +123,6 @@ class Engine {
106
123
  this.entityManager = new EntityManager();
107
124
  }
108
125
 
109
- /**
110
- *
111
- * @type {Ticker}
112
- */
113
- this.ticker = new Ticker();
114
126
 
115
127
  /**
116
128
  *
@@ -1 +1 @@
1
- {"version":3,"file":"EngineConfiguration.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineConfiguration.js"],"names":[],"mappings":"AAGA;IAEI;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,kBAAe;IAEf;;;OAGG;IACH,SAFU,GAAG,CAAC,MAAM,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAElB;IAEpB;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,UAJa,CAAC,QACH,MAAM,UACN,WAAW,CAAC,CAAC,CAAC,WAUxB;IAED;;;;OAIG;IACH,aAJa,CAAC,QACH,MAAM,GACJ,WAAW,CAAC,CAAC,CAAC,CAU1B;IAED;;;;OAIG;IACH,kBAHW,KAAK,CAAC,YAAY,CAAC,GACjB,OAAO,CAQnB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,OAAO,CAUnB;IAED;;OAEG;IACH,2BAFW,MAAM,QAOhB;IAED;;;;OAIG;IACH,oBAHW,kCAAkC,GAChC,OAAO,CASnB;IAED;;;OAGG;IACH,cAFW,MAAM,iBAqDhB;CACJ"}
1
+ {"version":3,"file":"EngineConfiguration.d.ts","sourceRoot":"","sources":["../../../src/engine/EngineConfiguration.js"],"names":[],"mappings":"AAGA;IAEI;;;OAGG;IACH,gBAAa;IAEb;;;OAGG;IACH,gBAAa;IAEb;;;;;;;;;OASG;IACH,2BAAe;IAEf;;;OAGG;IACH,SAFU,GAAG,CAAC,MAAM,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAElB;IAEpB;;;;OAIG;IACH,gBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;OAIG;IACH,UAJa,CAAC,QACH,MAAM,UACN,WAAW,CAAC,CAAC,CAAC,WAUxB;IAED;;;;OAIG;IACH,aAJa,CAAC,QACH,MAAM,GACJ,WAAW,CAAC,CAAC,CAAC,CAU1B;IAED;;;;OAIG;IACH,kBAHW,KAAK,CAAC,YAAY,CAAC,GACjB,OAAO,CAQnB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,OAAO,CAUnB;IAED;;OAEG;IACH,2BAFW,MAAM,QAOhB;IAED;;;;OAIG;IACH,oBAHW,kCAAkC,GAChC,OAAO,CASnB;IAED;;;OAGG;IACH,cAFW,MAAM,iBAqDhB;CACJ"}
@@ -16,7 +16,13 @@ export class EngineConfiguration {
16
16
  plugins = [];
17
17
 
18
18
  /**
19
+ * Static database
20
+ * Can contain tables of structured data that the application often works with.
21
+ * Engine startup will load all tables ensuring that data is ready once startup finishes
22
+ * Use sparingly, this is not suitable for very large amounts of data as all the data will be in memory and deserialization will stall engine startup
23
+ * Example: inventory item table, monster table
19
24
  * @private
25
+ * @readonly
20
26
  * @type {StaticKnowledgeDataTableDescriptor[]}
21
27
  */
22
28
  knowledge = [];
@@ -1 +1 @@
1
- {"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../../../src/engine/reference/v2/Reference.js"],"names":[],"mappings":"AAEA;;GAEG;AACH,uBAFa,CAAC;IA0BV,qBAEC;IAED;;;OAGG;IACH,kBAFa,MAAM,CAAC,IAAI,EAAC,CAAC,CAAC,CAI1B;IAED;;;OAGG;IACH,YAFW,CAAC,QAcX;IAED;;;OAGG;IACH,YAFa,CAAC,CAIb;IAED;;;OAGG;IACH,gBAcC;;CACJ;;cAKS,QAAQ,gBAAW;;mBA3FV,uCAAuC"}
1
+ {"version":3,"file":"Reference.d.ts","sourceRoot":"","sources":["../../../../../src/engine/reference/v2/Reference.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,uBAFa,CAAC;IA0BV,qBAEC;IAED;;;OAGG;IACH,kBAFa,MAAM,CAAC,IAAI,EAAC,CAAC,CAAC,CAI1B;IAED;;;OAGG;IACH,YAFW,CAAC,QAcX;IAED;;;OAGG;IACH,YAFa,CAAC,CAIb;IAED;;;OAGG;IACH,gBAcC;;CACJ;;cAKS,QAAQ,gBAAW;;mBAlGV,uCAAuC"}
@@ -1,6 +1,13 @@
1
1
  import Signal from "../../../core/events/signal/Signal.js";
2
2
 
3
3
  /**
4
+ * Value container, allows reference counting through {@link #onReleased} signal
5
+ * Intended for usage with reference-managing systems
6
+ * @example
7
+ * const ref: Reference<Texture> = texture_system.get(some_id);
8
+ * // do work with texture
9
+ * ref.release(); // we're done with the resource, texture_system will be notified
10
+ * // now ref.getValue() === null, reference is no longer valid
4
11
  * @template T
5
12
  */
6
13
  export class Reference {
@@ -21,7 +28,7 @@ export class Reference {
21
28
 
22
29
 
23
30
  /**
24
- *
31
+ * Whether a value is bound or not. Will be true if value is != null
25
32
  * @type {boolean}
26
33
  * @private
27
34
  */