@woosh/meep-engine 2.34.24 → 2.34.25

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.
@@ -190,15 +190,11 @@ export class PatchRepresentation {
190
190
  return result;
191
191
  }
192
192
 
193
- computeBoundingBox() {
193
+ computeBounds() {
194
194
  computeTopoMeshBoundiningBox(this.bounding_box, this.topology_snapshot);
195
195
  computeTopoMeshBoundingSphere(this.bounding_sphere, this.topology_snapshot);
196
196
  }
197
197
 
198
- computeBounds() {
199
- this.computeBoundingBox();
200
- }
201
-
202
198
  /**
203
199
  * @returns {number}
204
200
  */
@@ -134,7 +134,13 @@ async function assemble_graph(nodes) {
134
134
  }
135
135
 
136
136
  // return root
137
- return __nodes[0];
137
+ const root = __nodes[0];
138
+
139
+ //set group bounds to produce a valid root
140
+ root.group_aabb.copy(root.bounding_box);
141
+ root.group_bounding_sphere.set(root.bounding_sphere);
142
+
143
+ return root;
138
144
  }
139
145
 
140
146
 
@@ -515,10 +515,6 @@ export async function merge_patches(
515
515
  // only 1 patch, no merge opportunity, forward it to output directly
516
516
  const node = nodes[0];
517
517
 
518
- //set group bounds to produce a valid root
519
- node.group_aabb.copy(node.bounding_box);
520
- node.group_bounding_sphere.set(node.bounding_sphere);
521
-
522
518
  output[output_offset.value++] = node;
523
519
  return 1;
524
520
  } else {
@@ -79,6 +79,8 @@ export class MicronGeometry {
79
79
  origin_x, origin_y, origin_z,
80
80
  direction_x, direction_y, direction_z
81
81
  ) {
82
+ let i;
83
+ let stack_cursor = 1;
82
84
 
83
85
  /**
84
86
  *
@@ -87,7 +89,6 @@ export class MicronGeometry {
87
89
  const hits = [];
88
90
 
89
91
  // initialize stack
90
- let stack_cursor = 1;
91
92
  const stack = scratch_traversal_stack;
92
93
  stack[0] = this.root;
93
94
 
@@ -154,7 +155,7 @@ export class MicronGeometry {
154
155
 
155
156
  const vertices = patch.vertex_attribute_arrays[position_attribute_index];
156
157
 
157
- for (let i = 0; i < index_count;) {
158
+ for ( i = 0; i < index_count;) {
158
159
  const a = indices[i++];
159
160
  const b = indices[i++];
160
161
  const c = indices[i++];
@@ -201,7 +202,7 @@ export class MicronGeometry {
201
202
 
202
203
  const child_count = children.length;
203
204
 
204
- for (let i = 0; i < child_count; i++) {
205
+ for ( i = 0; i < child_count; i++) {
205
206
  const child = children[i];
206
207
 
207
208
  // push to stack
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.34.24",
8
+ "version": "2.34.25",
9
9
  "dependencies": {
10
10
  "gl-matrix": "3.4.3",
11
11
  "fast-levenshtein": "2.0.6",