@woosh/meep-engine 2.117.27 → 2.117.28
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
|
@@ -29,9 +29,9 @@ export function ebvh_nodes_sort_sah_local4(bvh, nodes, offset, count) {
|
|
|
29
29
|
const cost1 = bvh.node_get_combined_surface_area(a, c) + bvh.node_get_combined_surface_area(b, d);
|
|
30
30
|
const cost2 = bvh.node_get_combined_surface_area(a, d) + bvh.node_get_combined_surface_area(c, b);
|
|
31
31
|
|
|
32
|
-
if (cost0
|
|
32
|
+
if (cost0 <= cost1 && cost0 <= cost2) {
|
|
33
33
|
// no change
|
|
34
|
-
} else if (cost1
|
|
34
|
+
} else if (cost1 <= cost2) {
|
|
35
35
|
// swap C and B
|
|
36
36
|
nodes[i + 1] = c;
|
|
37
37
|
nodes[i + 2] = b;
|