@woosh/meep-engine 2.119.111 → 2.119.113
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":"build_triangle_morton_codes.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/build_triangle_morton_codes.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,0DAXW,MAAM,EAAE,GAAC,WAAW,aACpB,MAAM,eACN,MAAM,EAAE,GAAC,UAAU,GAAC,WAAW,GAAC,WAAW,kBAC3C,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,WACN,MAAM,WACN,MAAM,WACN,MAAM,WACN,MAAM,WACN,MAAM,
|
|
1
|
+
{"version":3,"file":"build_triangle_morton_codes.d.ts","sourceRoot":"","sources":["../../../../../src/core/bvh2/bvh3/build_triangle_morton_codes.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,0DAXW,MAAM,EAAE,GAAC,WAAW,aACpB,MAAM,eACN,MAAM,EAAE,GAAC,UAAU,GAAC,WAAW,GAAC,WAAW,kBAC3C,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,WACN,MAAM,WACN,MAAM,WACN,MAAM,WACN,MAAM,WACN,MAAM,QAoFhB"}
|
|
@@ -78,10 +78,21 @@ export function build_triangle_morton_codes(
|
|
|
78
78
|
const ncy = (center_y - aabb_3_y0) * morton_scale_y;
|
|
79
79
|
const ncz = (center_z - aabb_3_z0) * morton_scale_z;
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
const ix = Math.round(ncx);
|
|
82
|
+
const iz = Math.round(ncz);
|
|
83
|
+
|
|
84
|
+
const m30 = morton(
|
|
84
85
|
Math.round(ncy),
|
|
86
|
+
ix,
|
|
87
|
+
iz,
|
|
85
88
|
);
|
|
89
|
+
|
|
90
|
+
// mix in remaining bits
|
|
91
|
+
const m32 = m30
|
|
92
|
+
| ((ix & (1 << 10)) << 20)
|
|
93
|
+
| ((iz & (1 << 10)) << 21)
|
|
94
|
+
;
|
|
95
|
+
|
|
96
|
+
morton_codes[i] = m32;
|
|
86
97
|
}
|
|
87
98
|
}
|