@woosh/meep-engine 2.47.22 → 2.47.23

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.47.22",
8
+ "version": "2.47.23",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -155,7 +155,7 @@ export class NodeGraph {
155
155
 
156
156
 
157
157
  // attempt to gain the same ID
158
- const can_use_same_id = this.__idpNodes.isUsed(other_node_id);
158
+ const can_use_same_id = !this.__idpNodes.isUsed(other_node_id);
159
159
 
160
160
  let this_node_id;
161
161
  if (can_use_same_id) {
@@ -351,6 +351,15 @@ export class InstancedFoliage {
351
351
  return true;
352
352
  }
353
353
 
354
+ /**
355
+ *
356
+ * @param {CameraView} view
357
+ * @returns {boolean}
358
+ */
359
+ has_view(view){
360
+ return this.__views.has(view);
361
+ }
362
+
354
363
  /**
355
364
  *
356
365
  * @param {CameraView} view
@@ -4,7 +4,7 @@
4
4
  * @returns {number}
5
5
  */
6
6
  export function compute_buffer_geometry_byte_size(g) {
7
- let result = 0;
7
+ let result = 54;
8
8
 
9
9
  const index = g.getIndex();
10
10
 
@@ -14,6 +14,9 @@ export function compute_buffer_geometry_byte_size(g) {
14
14
 
15
15
  for (const attribute_name in g.attributes) {
16
16
  result += g.attributes[attribute_name].array.buffer.byteLength;
17
+
18
+ // reserve some space for the attribute reference itself
19
+ result += 8;
17
20
  }
18
21
 
19
22
  return result;