@woosh/meep-engine 2.47.10 → 2.47.11

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.11",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -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
  }