@woosh/meep-engine 2.36.25 → 2.36.26
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.
|
@@ -2,12 +2,6 @@ import { ShadedGeometry } from "../../ShadedGeometry.js";
|
|
|
2
2
|
|
|
3
3
|
export class RuntimeDrawMethodOptimizer {
|
|
4
4
|
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @type {EntityComponentDataset|null}
|
|
8
|
-
* @private
|
|
9
|
-
*/
|
|
10
|
-
this.__ecd = null;
|
|
11
5
|
|
|
12
6
|
/**
|
|
13
7
|
*
|
|
@@ -29,7 +23,13 @@ export class RuntimeDrawMethodOptimizer {
|
|
|
29
23
|
* @returns {boolean} true if a change was made, false otherwise
|
|
30
24
|
*/
|
|
31
25
|
step() {
|
|
32
|
-
const
|
|
26
|
+
const system = this.__system;
|
|
27
|
+
|
|
28
|
+
if (system === null) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const ecd = system.entityManager.dataset;
|
|
33
33
|
|
|
34
34
|
if (ecd === null) {
|
|
35
35
|
// no dataset attached
|
|
@@ -64,13 +64,13 @@ export class RuntimeDrawMethodOptimizer {
|
|
|
64
64
|
return false;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
const use_count =
|
|
67
|
+
const use_count = system.getGeometryUsageCounters().get(sg.geometry.id);
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
*
|
|
71
71
|
* @type {ShadedGeometryRendererContext|undefined}
|
|
72
72
|
*/
|
|
73
|
-
const first_context =
|
|
73
|
+
const first_context = system.__view_contexts.values().next().value;
|
|
74
74
|
|
|
75
75
|
if (first_context === undefined) {
|
|
76
76
|
return false;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"productName": "Meep",
|
|
6
6
|
"description": "production-ready JavaScript game engine based on Entity Component System Architecture",
|
|
7
7
|
"author": "Alexander Goldring",
|
|
8
|
-
"version": "2.36.
|
|
8
|
+
"version": "2.36.26",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|