@woosh/meep-engine 2.119.77 → 2.119.79

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.77",
8
+ "version": "2.119.79",
9
9
  "main": "build/meep.module.js",
10
10
  "module": "build/meep.module.js",
11
11
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"sh3_dering_optimize_positive.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js"],"names":[],"mappings":"AAgSA;;;;;;;GAOG;AACH,qDANW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,aACN,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,oBAClC,MAAM,oBACN,MAAM,QAIhB"}
1
+ {"version":3,"file":"sh3_dering_optimize_positive.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js"],"names":[],"mappings":"AA0SA;;;;;;;GAOG;AACH,qDANW,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,iBAClC,MAAM,aACN,MAAM,EAAE,GAAC,YAAY,GAAC,YAAY,oBAClC,MAAM,oBACN,MAAM,QAIhB"}
@@ -266,24 +266,34 @@ function windowSH(
266
266
 
267
267
  array_copy(input, input_offset, output, output_offset, numBands * numBands * channel_count);
268
268
 
269
-
270
269
  for (let l = 0; l < numBands; l++) {
271
270
  // scale each band individually
272
271
  const w = sinc_window(l, cutoff);
273
272
 
274
273
  // write zonal harmonic
275
274
  for (let i = 0; i < channel_count; i++) {
276
- output[output_offset + sh_index(0, l) * channel_count + i] *= w;
275
+
276
+ const j = sh_index(0, l);
277
+
278
+ output[output_offset + j * channel_count + i] *= w;
277
279
  }
278
280
 
279
281
  // write the rest of the band
280
282
  for (let m = 1; m <= l; m++) {
281
283
  for (let i = 0; i < channel_count; i++) {
282
- output[output_offset + sh_index(-m, l) * channel_count + i] *= w;
283
- output[output_offset + sh_index(m, l) * channel_count + i] *= w;
284
+
285
+ const j0 = sh_index(-m, l);
286
+
287
+ output[output_offset + j0 * channel_count + i] *= w;
288
+
289
+ const j1 = sh_index(m, l);
290
+
291
+ output[output_offset + j1 * channel_count + i] *= w;
292
+
284
293
  }
285
294
  }
286
295
  }
296
+
287
297
  }
288
298
 
289
299
  /**
@@ -36,15 +36,15 @@ export function sh3_sample_irradiance_by_direction(
36
36
  channel_value = harmonics[harmonics_offset + i] * 0.88622692545275801364908374167057;
37
37
 
38
38
  // band 1
39
- channel_value += harmonics[harmonics_offset + dimension_count + i] * 2.0 * 0.51166335397324424423977581244463 * y;
39
+ channel_value -= harmonics[harmonics_offset + dimension_count + i] * 2.0 * 0.51166335397324424423977581244463 * y;
40
40
  channel_value += harmonics[harmonics_offset + dimension_count * 2 + i] * 2.0 * 0.51166335397324424423977581244463 * z;
41
- channel_value += harmonics[harmonics_offset + dimension_count * 3 + i] * 2.0 * 0.51166335397324424423977581244463 * x;
41
+ channel_value -= harmonics[harmonics_offset + dimension_count * 3 + i] * 2.0 * 0.51166335397324424423977581244463 * x;
42
42
 
43
43
  // band 2
44
44
  channel_value += harmonics[harmonics_offset + dimension_count * 4 + i] * 2.0 * 0.42904276540489171563379376569857 * x * y;
45
- channel_value += harmonics[harmonics_offset + dimension_count * 5 + i] * 2.0 * 0.42904276540489171563379376569857 * y * z;
45
+ channel_value -= harmonics[harmonics_offset + dimension_count * 5 + i] * 2.0 * 0.42904276540489171563379376569857 * y * z;
46
46
  channel_value += harmonics[harmonics_offset + dimension_count * 6 + i] * (3 * z * z - 1) * 0.24770795610037568833406429782001;
47
- channel_value += harmonics[harmonics_offset + dimension_count * 7 + i] * 2.0 * 0.42904276540489171563379376569857 * x * z;
47
+ channel_value -= harmonics[harmonics_offset + dimension_count * 7 + i] * 2.0 * 0.42904276540489171563379376569857 * x * z;
48
48
  channel_value += harmonics[harmonics_offset + dimension_count * 8 + i] * 0.42904276540489171563379376569857 * (x * x - y * y);
49
49
 
50
50
  // write out
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @source https://github.com/pocl/pocl/blob/d9f32dd32dfdf2dee18f615a2d42b94a5d472c83/include/CL/cl_platform.h#L204C30-L204C43
3
+ * @type {number}
4
+ */
5
+ export const FLT_EPSILON_16: number;
6
+ //# sourceMappingURL=FLT_EPSILON_16.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FLT_EPSILON_16.d.ts","sourceRoot":"","sources":["../../../../src/core/math/FLT_EPSILON_16.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,6BAFU,MAAM,CAE2B"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @source https://github.com/pocl/pocl/blob/d9f32dd32dfdf2dee18f615a2d42b94a5d472c83/include/CL/cl_platform.h#L204C30-L204C43
3
+ * @type {number}
4
+ */
5
+ export const FLT_EPSILON_16 = 9.765625e-04;