@woosh/meep-engine 2.119.112 → 2.119.114

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.112",
8
+ "version": "2.119.114",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -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,QAyEhB"}
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,QAwEhB"}
@@ -36,10 +36,9 @@ export function build_triangle_morton_codes(
36
36
  const aabb_3_z0 = aabb_z0 * 3;
37
37
 
38
38
  // compute multipliers to bring normalized values in range of 10bit unsigned integer each
39
- // NOTE we give extra 11 bits to X and Z as most models tend to sprawl horizontally
40
- const morton_scale_x = aabb_size_x === 0 ? 0 : 2047 / (aabb_size_x * 3);
39
+ const morton_scale_x = aabb_size_x === 0 ? 0 : 1023 / (aabb_size_x * 3);
41
40
  const morton_scale_y = aabb_size_y === 0 ? 0 : 1023 / (aabb_size_y * 3);
42
- const morton_scale_z = aabb_size_z === 0 ? 0 : 2047 / (aabb_size_z * 3);
41
+ const morton_scale_z = aabb_size_z === 0 ? 0 : 1023 / (aabb_size_z * 3);
43
42
 
44
43
  // compute morton codes
45
44
  for (let i = 0; i < tri_count; i++) {
@@ -79,8 +78,8 @@ export function build_triangle_morton_codes(
79
78
  const ncz = (center_z - aabb_3_z0) * morton_scale_z;
80
79
 
81
80
  morton_codes[i] = morton(
82
- Math.round(ncy),
83
81
  Math.round(ncx),
82
+ Math.round(ncy),
84
83
  Math.round(ncz),
85
84
  );
86
85
  }