@woosh/meep-engine 2.119.119 → 2.119.120

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.119",
8
+ "version": "2.119.120",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"ebvh_nodes_sort_sah_local4.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/ebvh_nodes_sort_sah_local4.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,gDAPW,GAAG,SACH,MAAM,EAAE,GAAC,WAAW,oBACpB,MAAM,EAAE,GAAC,WAAW,UACpB,MAAM,YACN,MAAM,SACN,MAAM,UAqGhB"}
1
+ {"version":3,"file":"ebvh_nodes_sort_sah_local4.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/ebvh_nodes_sort_sah_local4.js"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,gDAPW,GAAG,SACH,MAAM,EAAE,GAAC,WAAW,oBACpB,MAAM,EAAE,GAAC,WAAW,UACpB,MAAM,YACN,MAAM,SACN,MAAM,UAwGhB"}
@@ -104,9 +104,12 @@ export function ebvh_nodes_sort_sah_local4(
104
104
  post_swap = cost_cb < cost_ad;
105
105
  }
106
106
 
107
- // put node pairs in their cost order
108
- array_swap(nodes, index_a, nodes, index_c, 2);
109
- array_swap(primitive_counts, index_a, primitive_counts, index_c, 2);
107
+ if (post_swap) {
108
+ // put node pairs in their cost order
109
+ array_swap(nodes, index_a, nodes, index_c, 2);
110
+ array_swap(primitive_counts, index_a, primitive_counts, index_c, 2);
111
+ }
112
+
110
113
  }
111
114
 
112
115
  return swap_count;