@woosh/meep-engine 2.39.28 → 2.39.29

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.
@@ -0,0 +1,3 @@
1
+ export class ExplicitBinaryBoundingVolumeHierarchy {
2
+
3
+ }
@@ -2,10 +2,13 @@ import {System} from "../../../ecs/System";
2
2
  import Engine from "../../../Engine";
3
3
  import {ShadedGeometry} from "./ShadedGeometry";
4
4
  import {SurfacePoint3} from "../../../../core/geom/3d/SurfacePoint3";
5
+ import {ExplicitBinaryBoundingVolumeHierarchy} from "../../../../core/bvh2/bvh3/ExplicitBinaryBoundingVolumeHierarchy";
5
6
 
6
7
  export class ShadedGeometrySystem extends System<ShadedGeometry> {
7
8
  constructor(engine: Engine)
8
9
 
10
+ readonly bvh: ExplicitBinaryBoundingVolumeHierarchy
11
+
9
12
  raycastNearest(
10
13
  contact: SurfacePoint3,
11
14
  origin_x: number, origin_y: number, origin_z: number,
@@ -108,6 +108,14 @@ export class ShadedGeometrySystem extends System {
108
108
  });
109
109
  }
110
110
 
111
+ /**
112
+ *
113
+ * @returns {ExplicitBinaryBoundingVolumeHierarchy}
114
+ */
115
+ get bvh() {
116
+ return this.__bvh_binary;
117
+ }
118
+
111
119
  /**
112
120
  * NOTE: DO NOT MODIFY RESULTS
113
121
  * @returns {Map<number,number>}
@@ -386,7 +394,7 @@ export class ShadedGeometrySystem extends System {
386
394
  direction_x, direction_y, direction_z
387
395
  );
388
396
 
389
- const geometry_hit_found = sg.query_raycast_nearest(scratch_point,scratch_ray_0,m4);
397
+ const geometry_hit_found = sg.query_raycast_nearest(scratch_point, scratch_ray_0, m4);
390
398
 
391
399
  if (!geometry_hit_found) {
392
400
  continue;
@@ -467,7 +475,7 @@ export class ShadedGeometrySystem extends System {
467
475
  direction_x, direction_y, direction_z
468
476
  );
469
477
 
470
- const geometry_hit_found = sg.query_raycast_nearest(scratch_point,scratch_ray_0,m4);
478
+ const geometry_hit_found = sg.query_raycast_nearest(scratch_point, scratch_ray_0, m4);
471
479
 
472
480
  if (!geometry_hit_found) {
473
481
  continue;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "productName": "Meep",
6
6
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.39.28",
8
+ "version": "2.39.29",
9
9
  "dependencies": {
10
10
  "gl-matrix": "3.4.3",
11
11
  "fast-levenshtein": "2.0.6",