@woosh/meep-engine 2.119.117 → 2.119.118
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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ebvh_build_hierarchy.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/ebvh_build_hierarchy.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,0CATW,GAAG,qBACH,MAAM,EAAE,GAAC,WAAW,oBACpB,MAAM,aACN,MAAM,EAAE,GAAC,WAAW,oBACpB,MAAM,2BACN,MAAM,0BACN,MAAM,GACJ,MAAM,
|
|
1
|
+
{"version":3,"file":"ebvh_build_hierarchy.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/ebvh_build_hierarchy.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;GAYG;AACH,0CATW,GAAG,qBACH,MAAM,EAAE,GAAC,WAAW,oBACpB,MAAM,aACN,MAAM,EAAE,GAAC,WAAW,oBACpB,MAAM,2BACN,MAAM,0BACN,MAAM,GACJ,MAAM,CAkFlB"}
|
|
@@ -38,23 +38,21 @@ export function ebvh_build_hierarchy(
|
|
|
38
38
|
|
|
39
39
|
while (unprocessed_node_count > 1) {
|
|
40
40
|
|
|
41
|
-
const sah_optimization_cycle_count = sah_optimization_level + sah_optimization_bias * current_construction_depth;
|
|
41
|
+
const sah_optimization_cycle_count = Math.floor(sah_optimization_level + sah_optimization_bias * current_construction_depth);
|
|
42
42
|
|
|
43
43
|
for (let i = 0; i < sah_optimization_cycle_count; i++) {
|
|
44
44
|
|
|
45
45
|
// sort intermediate nodes using small locality and SAH metric
|
|
46
|
-
const
|
|
46
|
+
const swap_distance = (sah_optimization_cycle_count - i) * 2;
|
|
47
|
+
|
|
48
|
+
ebvh_nodes_sort_sah_local4(
|
|
47
49
|
bvh,
|
|
48
50
|
unprocessed_nodes,
|
|
49
51
|
0,
|
|
50
|
-
|
|
52
|
+
swap_distance,
|
|
51
53
|
unprocessed_node_count
|
|
52
54
|
);
|
|
53
55
|
|
|
54
|
-
if (swap_count === 0) {
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
let added_nodes = 0;
|