@woosh/meep-engine 2.43.16 → 2.43.18

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.
Files changed (53) hide show
  1. package/core/assert.js +3 -1
  2. package/core/bvh2/aabb3/aabb3_intersects_ray.js +14 -9
  3. package/core/bvh2/aabb3/aabb3_intersects_ray_branchless.js +52 -0
  4. package/core/bvh2/bvh3/ExplicitBinaryBoundingVolumeHierarchy.d.ts +2 -0
  5. package/core/bvh2/bvh3/ExplicitBinaryBoundingVolumeHierarchy.js +214 -5
  6. package/core/bvh2/bvh3/bvh_query_leaves_ray.js +32 -29
  7. package/core/collection/array/typed/typed_array_copy.js +2 -2
  8. package/core/geom/3d/aabb/compute_aabb_from_points.js +4 -3
  9. package/core/geom/3d/compute_triangle_normal.js +76 -0
  10. package/core/geom/3d/topology/samples/sampleFloodFill.js +1 -1
  11. package/core/geom/3d/topology/simplify/compute_face_normal_change_dot_product.js +1 -1
  12. package/core/geom/3d/topology/simplify/quadratic/Quadratic3.js +1 -1
  13. package/core/geom/3d/topology/struct/TopoTriangle.js +1 -57
  14. package/core/geom/3d/topology/tm_face_normal.js +1 -1
  15. package/core/geom/3d/topology/tm_vertex_compute_normal.js +1 -1
  16. package/core/geom/3d/triangle/computeTriangleRayIntersection.js +195 -27
  17. package/core/geom/Vector3.js +12 -12
  18. package/core/math/physics/brdf/D_GGX.js +13 -0
  19. package/editor/tools/v2/prototypeTransformControls.js +14 -2
  20. package/engine/ecs/parent/EntityNode.js +80 -7
  21. package/engine/ecs/parent/EntityNodeFlags.js +8 -0
  22. package/engine/ecs/terrain/tiles/TerrainTile.js +7 -9
  23. package/engine/graphics/ecs/path/PathDisplaySystem.d.ts +3 -0
  24. package/engine/graphics/ecs/path/PathDisplaySystem.js +10 -0
  25. package/engine/graphics/geometry/AttributeSpec.js +18 -3
  26. package/engine/graphics/geometry/VertexDataSpec.js +53 -3
  27. package/engine/graphics/micron/format/VirtualGeometry.js +7 -0
  28. package/engine/graphics/micron/render/VirtualGeometryBuilder.js +1 -1
  29. package/engine/graphics/micron/render/refinement/get_geometry_patch_cut.js +5 -2
  30. package/engine/graphics/particles/particular/engine/parameter/sample/RGBA_LUT_HEATMAP_IR.js +11 -0
  31. package/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +2 -9
  32. package/engine/graphics/sh3/README.md +1 -0
  33. package/engine/graphics/sh3/path_tracer/GeometryBVHBatched.js +324 -0
  34. package/engine/graphics/sh3/path_tracer/PathTracedMesh.js +85 -0
  35. package/engine/graphics/sh3/path_tracer/PathTracer.js +469 -0
  36. package/engine/graphics/sh3/path_tracer/apply_texture_clamping_to_coordinate.js +22 -0
  37. package/engine/graphics/sh3/path_tracer/compute_triangle_group_aabb3.js +36 -0
  38. package/engine/graphics/sh3/path_tracer/getBiasedNormalSample.js +55 -0
  39. package/engine/graphics/sh3/path_tracer/make_sky_hosek.js +44 -0
  40. package/engine/graphics/sh3/path_tracer/make_sky_rtiw.js +15 -0
  41. package/engine/graphics/sh3/path_tracer/prototypePathTracer.js +619 -0
  42. package/engine/graphics/sh3/path_tracer/random_in_hemisphere.js +39 -0
  43. package/engine/graphics/sh3/path_tracer/ray_hit_apply_transform.js +42 -0
  44. package/engine/graphics/sh3/path_tracer/ray_reflect.js +27 -0
  45. package/engine/graphics/sh3/path_tracer/sample_triangle_attribute.js +35 -0
  46. package/engine/graphics/sh3/path_tracer/vec3_uint8_to_float.js +12 -0
  47. package/engine/graphics/sh3/sky/hosek/README.md +4 -0
  48. package/engine/graphics/sh3/sky/hosek/prototype_hosek.js +71 -0
  49. package/engine/graphics/sh3/sky/hosek/sky_hosek_compute_irradiance_by_direction.js +4171 -0
  50. package/engine/graphics/texture/sampler/convertTexture2Sampler2D.js +2 -0
  51. package/package.json +1 -1
  52. package/view/elements/progress/SmoothProgressBar.js +1 -1
  53. package/view/task/TaskProgressView.js +6 -8
@@ -51,6 +51,8 @@ export function convertTexture2Sampler2D(texture, width, height, flipY = true) {
51
51
 
52
52
  }
53
53
 
54
+ // TODO add special case for DataTexture
55
+
54
56
  const renderer = WebGLRendererPool.global.get({});
55
57
 
56
58
  const ctx = renderer.getContext();
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.43.16",
8
+ "version": "2.43.18",
9
9
  "dependencies": {
10
10
  "gl-matrix": "3.4.3",
11
11
  "fast-levenshtein": "2.0.6",
@@ -19,7 +19,7 @@ function makeTextAbsolute(value, max, process) {
19
19
  class ProgressBarView extends View {
20
20
  /**
21
21
  *
22
- * @param {number[]|BoundedValue} model
22
+ * @param {number[]|BoundedValue} [model]
23
23
  * @param classList
24
24
  * @param displayLabel
25
25
  * @param displayLabelType
@@ -23,9 +23,7 @@ class TaskProgressView extends View {
23
23
  * @constructor
24
24
  */
25
25
  constructor({ task, localization }) {
26
- super(task, localization);
27
-
28
- const self = this;
26
+ super();
29
27
 
30
28
  function makeNameId() {
31
29
  const taskName = typeof task.name === "string" ? task.name : "unknown";
@@ -41,14 +39,14 @@ class TaskProgressView extends View {
41
39
 
42
40
  const progressBar = new SmoothProgressBar();
43
41
 
44
- function processFailure() {
42
+ const processFailure = () => {
45
43
  //find failed subtasks/dependencies
46
44
  if (task.children !== undefined) {
47
45
  const failedChildren = task.children.filter(function (t) {
48
46
  return t.state.getValue() === TaskState.FAILED;
49
47
  });
50
- failedChildren.forEach(function (t) {
51
- self.addChild(new LabelView("Failed subtask: " + t.name));
48
+ failedChildren.forEach((t) => {
49
+ this.addChild(new LabelView("Failed subtask: " + t.name));
52
50
  });
53
51
  }
54
52
 
@@ -122,7 +120,7 @@ class TaskProgressView extends View {
122
120
 
123
121
  clock.start();
124
122
 
125
- function update() {
123
+ const update = () => {
126
124
  const computedProgressValue = task.computeProgress();
127
125
 
128
126
  const taskProgress = Number.isNaN(computedProgressValue) ? 0 : computedProgressValue;
@@ -139,7 +137,7 @@ class TaskProgressView extends View {
139
137
 
140
138
  const state = task.state.getValue();
141
139
 
142
- if (state !== TaskState.FAILED && state !== TaskState.SUCCEEDED && self.isLinked) {
140
+ if (state !== TaskState.FAILED && state !== TaskState.SUCCEEDED && this.isLinked) {
143
141
  requestAnimationFrame(update);
144
142
  }
145
143
  }