@woosh/meep-engine 2.119.124 → 2.119.125

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.119.124",
8
+ "version": "2.119.125",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -0,0 +1,2 @@
1
+ # References:
2
+ * "Fast and Simple Agglomerative LBVH Construction" by Ciprian Apetrei, 2014
@@ -44,7 +44,7 @@ export function ebvh_build_hierarchy(
44
44
  for (let i = 0; i < sah_optimization_cycle_count; i++) {
45
45
 
46
46
  // sort intermediate nodes using small locality and SAH metric
47
- const swap_distance = (i + 1) * 2;
47
+ const swap_distance = 1 << (i & 0b111 + 1);
48
48
 
49
49
  ebvh_nodes_sort_sah_local4(
50
50
  bvh,