@woosh/meep-engine 2.43.5 → 2.43.7
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.
|
@@ -143,6 +143,9 @@ export class GLTFAssetTransformer extends AssetTransformer {
|
|
|
143
143
|
micron_geometry.proxy = geometry;
|
|
144
144
|
|
|
145
145
|
geometry[MICRON_GEOMETRY_FIELD] = micron_geometry;
|
|
146
|
+
|
|
147
|
+
// push data into cache
|
|
148
|
+
this.__cache.set(geometry, micron_geometry);
|
|
146
149
|
}
|
|
147
150
|
|
|
148
151
|
|
|
@@ -184,6 +187,7 @@ export class GLTFAssetTransformer extends AssetTransformer {
|
|
|
184
187
|
const buffer = BinaryBuffer.fromArrayBuffer(micron_data.create());
|
|
185
188
|
|
|
186
189
|
deserialize_geometry_collection(this.__active_mesh_micron_cache, buffer);
|
|
190
|
+
|
|
187
191
|
}
|
|
188
192
|
|
|
189
193
|
|
|
@@ -4,6 +4,8 @@ import { ShadedGeometryFlags } from "../../../ecs/mesh-v2/ShadedGeometryFlags.js
|
|
|
4
4
|
import { MaterialVertexSpec, MaterialVertexSpecFlags } from "../../render/v1/MaterialVertexSpec.js";
|
|
5
5
|
import { compute_geometry_polycount } from "../../../geometry/compute_geometry_polycount.js";
|
|
6
6
|
import { inverseLerp } from "../../../../../core/math/inverseLerp.js";
|
|
7
|
+
import { MICRON_GEOMETRY_FIELD } from "../../MICRON_GEOMETRY_FIELD.js";
|
|
8
|
+
import { assert } from "../../../../../core/assert.js";
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
*
|
|
@@ -73,7 +75,18 @@ export class MicronShadedGeometryRenderAdapter extends AbstractRenderAdapter {
|
|
|
73
75
|
* @private
|
|
74
76
|
*/
|
|
75
77
|
__obtain_micron_geometry(sg) {
|
|
76
|
-
const
|
|
78
|
+
const buffer_geometry = sg.geometry;
|
|
79
|
+
|
|
80
|
+
const attached_micron_data = buffer_geometry[MICRON_GEOMETRY_FIELD];
|
|
81
|
+
|
|
82
|
+
if (attached_micron_data !== undefined) {
|
|
83
|
+
assert.equal(attached_micron_data.isMicronGeometry, true, `geometry[${MICRON_GEOMETRY_FIELD}].isMicronGeometry !== true`);
|
|
84
|
+
|
|
85
|
+
// data was found directly on the geometry
|
|
86
|
+
return attached_micron_data;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const geometry_id = buffer_geometry.id;
|
|
77
90
|
|
|
78
91
|
const micron_geometry = this.__geometry_map.get(geometry_id);
|
|
79
92
|
|
|
@@ -85,7 +98,7 @@ export class MicronShadedGeometryRenderAdapter extends AbstractRenderAdapter {
|
|
|
85
98
|
|
|
86
99
|
// no micron geometry
|
|
87
100
|
if (!this.__geometry_building_promises.has(geometry_id)) {
|
|
88
|
-
const p = this.__cache.get(
|
|
101
|
+
const p = this.__cache.get(buffer_geometry);
|
|
89
102
|
|
|
90
103
|
this.__geometry_building_promises.set(geometry_id, p);
|
|
91
104
|
|
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.43.
|
|
8
|
+
"version": "2.43.7",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|