@woosh/meep-engine 2.47.10 → 2.47.12

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.10",
8
+ "version": "2.47.12",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -184,10 +184,23 @@ export class NodeInstance {
184
184
 
185
185
  parameters[id] = value;
186
186
 
187
+
187
188
  if (old_value === undefined) {
188
189
  this.on.parameterAdded.send2(id, value);
189
190
  }
190
191
 
192
+ // perform .equals check if available
193
+ if (
194
+ value !== undefined
195
+ && old_value !== undefined
196
+ && typeof value === "object"
197
+ && typeof value.equals === "function"
198
+ && value.equals(old_value)
199
+ ) {
200
+ // parameter value has not changed
201
+ return;
202
+ }
203
+
191
204
  this.on.parameterChanged.send3(id, value, old_value);
192
205
  }
193
206
 
@@ -228,7 +241,7 @@ export class NodeInstance {
228
241
  }
229
242
  }
230
243
 
231
- clearParameters(){
244
+ clearParameters() {
232
245
  for (const key in this.parameters) {
233
246
  this.deleteParameter(key);
234
247
  }
@@ -1,4 +1,5 @@
1
- import { Uint32BufferAttribute } from "three";
1
+ import { UintArrayForCount } from "../../../../core/collection/array/typed/uint_array_for_count.js";
2
+ import { BufferAttribute } from "three";
2
3
 
3
4
  /**
4
5
  *
@@ -11,13 +12,16 @@ export function makeGeometryIndexed(geometry) {
11
12
  const position_attribute = geometry.getAttribute('position');
12
13
  // non-indexed geometry, build index
13
14
  const size = position_attribute.count;
14
- const array = new Uint32Array(size);
15
+
16
+ const UintArrayConstructor = UintArrayForCount(size);
17
+
18
+ const array = new UintArrayConstructor(size);
15
19
 
16
20
  for (let i = 0; i < size; i++) {
17
21
  array[i] = i;
18
22
  }
19
23
 
20
- index_attribute = new Uint32BufferAttribute(array, 1, false);
24
+ index_attribute = new BufferAttribute(array, 1, false);
21
25
 
22
26
  geometry.setIndex(index_attribute);
23
27
  }