@woosh/meep-engine 2.108.3 → 2.109.0

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 (130) hide show
  1. package/build/meep.cjs +91 -60
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +91 -60
  4. package/package.json +1 -1
  5. package/src/core/assert.d.ts +2 -2
  6. package/src/core/assert.d.ts.map +1 -1
  7. package/src/core/assert.js +1 -1
  8. package/src/core/binary/align_4.spec.d.ts +2 -0
  9. package/src/core/binary/align_4.spec.d.ts.map +1 -0
  10. package/src/core/binary/align_4.spec.js +20 -0
  11. package/src/core/binary/{de_interleave_bits_by_2.d.ts → de_interleave_2_bits.d.ts} +1 -1
  12. package/src/core/binary/de_interleave_2_bits.d.ts.map +1 -0
  13. package/src/core/binary/de_interleave_2_bits.spec.js +1 -1
  14. package/src/core/binary/hex2dec.spec.d.ts +2 -0
  15. package/src/core/binary/hex2dec.spec.d.ts.map +1 -0
  16. package/src/core/binary/hex2dec.spec.js +22 -0
  17. package/src/core/binary/split_by_2.spec.d.ts +2 -0
  18. package/src/core/binary/split_by_2.spec.d.ts.map +1 -0
  19. package/src/core/binary/split_by_2.spec.js +22 -0
  20. package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.d.ts +4 -1
  21. package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.d.ts.map +1 -1
  22. package/src/core/bvh2/bvh3/ebvh_build_for_geometry_morton.js +16 -7
  23. package/src/core/bvh2/bvh3/ebvh_build_hierarchy.js +1 -1
  24. package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.d.ts.map +1 -1
  25. package/src/core/bvh2/bvh3/query/bvh_query_user_data_ray.js +12 -7
  26. package/src/core/geom/2d/circle/circle_circumference.d.ts +7 -0
  27. package/src/core/geom/2d/circle/circle_circumference.d.ts.map +1 -0
  28. package/src/core/geom/2d/circle/circle_circumference.js +12 -0
  29. package/src/core/geom/2d/compute_polygon_area_2d.d.ts.map +1 -1
  30. package/src/core/geom/2d/compute_polygon_area_2d.js +6 -4
  31. package/src/core/geom/2d/lt-grid/LooseTightGrid.js +1 -1
  32. package/src/core/geom/2d/triangle2d_get_barycentric.d.ts +2 -2
  33. package/src/core/geom/2d/triangle2d_get_barycentric.js +2 -2
  34. package/src/core/geom/3d/Ray3.d.ts +19 -0
  35. package/src/core/geom/3d/Ray3.d.ts.map +1 -0
  36. package/src/core/geom/3d/Ray3.js +27 -0
  37. package/src/core/geom/3d/ray/ray3_shift_origin_along_direction.d.ts +10 -0
  38. package/src/core/geom/3d/ray/ray3_shift_origin_along_direction.d.ts.map +1 -0
  39. package/src/core/geom/3d/ray/ray3_shift_origin_along_direction.js +35 -0
  40. package/src/core/geom/3d/sphere/harmonics/compute_legendre_polynomial.d.ts +1 -0
  41. package/src/core/geom/3d/sphere/harmonics/compute_legendre_polynomial.d.ts.map +1 -0
  42. package/src/core/geom/3d/sphere/harmonics/compute_legendre_polynomial.js +0 -0
  43. package/src/core/geom/3d/sphere/harmonics/sh3_convolve_with_cosine_kernel.d.ts +9 -0
  44. package/src/core/geom/3d/sphere/harmonics/sh3_convolve_with_cosine_kernel.d.ts.map +1 -0
  45. package/src/core/geom/3d/sphere/harmonics/sh3_convolve_with_cosine_kernel.js +25 -0
  46. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.d.ts.map +1 -1
  47. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +2 -4
  48. package/src/core/geom/3d/sphere/harmonics/sh3_rotate_bl.d.ts +8 -0
  49. package/src/core/geom/3d/sphere/harmonics/sh3_rotate_bl.d.ts.map +1 -0
  50. package/src/core/geom/3d/sphere/harmonics/sh3_rotate_bl.js +94 -0
  51. package/src/core/geom/3d/sphere/harmonics/sh3_rotate_filament.d.ts +8 -0
  52. package/src/core/geom/3d/sphere/harmonics/sh3_rotate_filament.d.ts.map +1 -0
  53. package/src/core/geom/3d/sphere/harmonics/{sh3_rotate.js → sh3_rotate_filament.js} +5 -2
  54. package/src/core/geom/3d/sphere/harmonics/sh_compute_K.d.ts +3 -3
  55. package/src/core/geom/3d/sphere/harmonics/sh_compute_K.js +3 -3
  56. package/src/core/geom/3d/tetrahedra/delaunay/tetrahedral_mesh_build_from_grid.d.ts.map +1 -1
  57. package/src/core/geom/3d/tetrahedra/delaunay/tetrahedral_mesh_build_from_grid.js +29 -14
  58. package/src/core/geom/Quaternion.js +1 -1
  59. package/src/core/geom/vec3/v3_matrix4_multiply.d.ts +10 -0
  60. package/src/core/geom/vec3/v3_matrix4_multiply.d.ts.map +1 -0
  61. package/src/core/geom/vec3/v3_matrix4_multiply.js +27 -0
  62. package/src/core/geom/vec3/v3_shift_along_direction.d.ts +14 -0
  63. package/src/core/geom/vec3/v3_shift_along_direction.d.ts.map +1 -0
  64. package/src/core/geom/vec3/v3_shift_along_direction.js +23 -0
  65. package/src/core/math/compute_legendre_polynomial.d.ts +10 -0
  66. package/src/core/math/compute_legendre_polynomial.d.ts.map +1 -0
  67. package/src/core/math/compute_legendre_polynomial.js +46 -0
  68. package/src/core/math/statistics/softmax.d.ts +11 -0
  69. package/src/core/math/statistics/softmax.d.ts.map +1 -0
  70. package/src/core/math/statistics/softmax.js +24 -0
  71. package/src/core/math/statistics/softmax.spec.d.ts +2 -0
  72. package/src/core/math/statistics/softmax.spec.d.ts.map +1 -0
  73. package/src/core/math/statistics/softmax.spec.js +9 -0
  74. package/src/engine/ecs/transform/Transform.d.ts.map +1 -1
  75. package/src/engine/ecs/transform/Transform.js +19 -4
  76. package/src/engine/graphics/ecs/camera/CameraSystem.d.ts.map +1 -1
  77. package/src/engine/graphics/ecs/camera/CameraSystem.js +25 -13
  78. package/src/engine/graphics/geometry/decode_attribute_value.d.ts +10 -0
  79. package/src/engine/graphics/geometry/decode_attribute_value.d.ts.map +1 -0
  80. package/src/engine/graphics/geometry/decode_attribute_value.js +28 -0
  81. package/src/engine/graphics/geometry/geometry_construct_triangle_normal.d.ts +11 -0
  82. package/src/engine/graphics/geometry/geometry_construct_triangle_normal.d.ts.map +1 -0
  83. package/src/engine/graphics/geometry/geometry_construct_triangle_normal.js +31 -0
  84. package/src/engine/graphics/sh3/lpv/LightProbeVolume.d.ts.map +1 -1
  85. package/src/engine/graphics/sh3/lpv/LightProbeVolume.js +0 -86
  86. package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.d.ts +1 -0
  87. package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.d.ts.map +1 -1
  88. package/src/engine/graphics/sh3/lpv/WebGLCubeProbeRenderer.js +6 -2
  89. package/src/engine/graphics/sh3/path_tracer/{GeometryBVHBatched.d.ts → BufferedGeometryBVH.d.ts} +9 -2
  90. package/src/engine/graphics/sh3/path_tracer/BufferedGeometryBVH.d.ts.map +1 -0
  91. package/src/engine/graphics/sh3/path_tracer/{GeometryBVHBatched.js → BufferedGeometryBVH.js} +84 -5
  92. package/src/engine/graphics/sh3/path_tracer/PathTracedMesh.d.ts +6 -4
  93. package/src/engine/graphics/sh3/path_tracer/PathTracedMesh.d.ts.map +1 -1
  94. package/src/engine/graphics/sh3/path_tracer/PathTracedMesh.js +54 -8
  95. package/src/engine/graphics/sh3/path_tracer/PathTracedScene.d.ts +6 -10
  96. package/src/engine/graphics/sh3/path_tracer/PathTracedScene.d.ts.map +1 -1
  97. package/src/engine/graphics/sh3/path_tracer/PathTracedScene.js +41 -47
  98. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.d.ts +11 -0
  99. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.d.ts.map +1 -0
  100. package/src/engine/graphics/sh3/path_tracer/material/MaterialConverter.js +102 -0
  101. package/src/engine/graphics/sh3/path_tracer/material/StandardMaterial.d.ts +9 -0
  102. package/src/engine/graphics/sh3/path_tracer/material/StandardMaterial.d.ts.map +1 -0
  103. package/src/engine/graphics/sh3/path_tracer/material/StandardMaterial.js +17 -0
  104. package/src/engine/graphics/sh3/path_tracer/material/StandardTexture.d.ts +31 -0
  105. package/src/engine/graphics/sh3/path_tracer/material/StandardTexture.d.ts.map +1 -0
  106. package/src/engine/graphics/sh3/path_tracer/material/StandardTexture.js +85 -0
  107. package/src/engine/graphics/sh3/path_tracer/material/TextureFilter.d.ts +14 -0
  108. package/src/engine/graphics/sh3/path_tracer/material/TextureFilter.d.ts.map +1 -0
  109. package/src/engine/graphics/sh3/path_tracer/material/TextureFilter.js +17 -0
  110. package/src/engine/graphics/sh3/path_tracer/material/TextureWrapping.d.ts +7 -0
  111. package/src/engine/graphics/sh3/path_tracer/material/TextureWrapping.d.ts.map +1 -0
  112. package/src/engine/graphics/sh3/path_tracer/material/TextureWrapping.js +9 -0
  113. package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +104 -9
  114. package/src/engine/graphics/sh3/path_tracer/texture/sample_material.d.ts +1 -2
  115. package/src/engine/graphics/sh3/path_tracer/texture/sample_material.d.ts.map +1 -1
  116. package/src/engine/graphics/sh3/path_tracer/texture/sample_material.js +50 -23
  117. package/src/engine/graphics/sh3/prototypeSH3Probe.js +62 -28
  118. package/src/engine/graphics/texture/formatToChannelCount.d.ts.map +1 -1
  119. package/src/engine/graphics/texture/formatToChannelCount.js +8 -1
  120. package/src/engine/graphics/texture/sampler/one_pixel_sampler_uint8.d.ts +8 -0
  121. package/src/engine/graphics/texture/sampler/one_pixel_sampler_uint8.d.ts.map +1 -0
  122. package/src/engine/graphics/texture/sampler/one_pixel_sampler_uint8.js +10 -0
  123. package/src/engine/graphics/texture/sampler/sampler_multiply_vector.d.ts +8 -0
  124. package/src/engine/graphics/texture/sampler/sampler_multiply_vector.d.ts.map +1 -0
  125. package/src/engine/graphics/texture/sampler/sampler_multiply_vector.js +23 -0
  126. package/src/core/binary/de_interleave_bits_by_2.d.ts.map +0 -1
  127. package/src/core/geom/3d/sphere/harmonics/sh3_rotate.d.ts +0 -8
  128. package/src/core/geom/3d/sphere/harmonics/sh3_rotate.d.ts.map +0 -1
  129. package/src/engine/graphics/sh3/path_tracer/GeometryBVHBatched.d.ts.map +0 -1
  130. /package/src/core/binary/{de_interleave_bits_by_2.js → de_interleave_2_bits.js} +0 -0
package/build/meep.cjs CHANGED
@@ -557,7 +557,7 @@ assert.isArray = function (value, name = 'value') {
557
557
 
558
558
  /**
559
559
  * @template T
560
- * @param {ArrayLike<T>|T[]} value
560
+ * @param {ArrayLike<T>|T[]|Uint32Array|Float32Array} value
561
561
  * @param {string} name
562
562
  */
563
563
  assert.isArrayLike = function (value, name = 'value') {
@@ -3608,7 +3608,7 @@ let Quaternion$1 = class Quaternion {
3608
3608
  /**
3609
3609
  *
3610
3610
  * @param {Quaternion} other
3611
- * @param {number} max_delta
3611
+ * @param {number} max_delta in radians
3612
3612
  */
3613
3613
  rotateTowards(other, max_delta) {
3614
3614
  Quaternion.rotateTowards(this, this, other, max_delta);
@@ -4987,6 +4987,19 @@ class Transform {
4987
4987
  return result;
4988
4988
  }
4989
4989
 
4990
+ /**
4991
+ *
4992
+ * @param {number[]|Float32Array} mat
4993
+ * @returns {Transform}
4994
+ */
4995
+ static fromMatrix(mat) {
4996
+ const result = new Transform();
4997
+
4998
+ result.fromMatrix4(mat);
4999
+
5000
+ return result;
5001
+ }
5002
+
4990
5003
  /**
4991
5004
  * Multiply two transforms, result it written into this one
4992
5005
  * @param {Transform} a
@@ -5000,17 +5013,18 @@ class Transform {
5000
5013
 
5001
5014
  /**
5002
5015
  *
5003
- * @param {mat4|number[]|Float32Array} m
5016
+ * @param {mat4|number[]|Float32Array} matrix
5004
5017
  */
5005
- fromMatrix4(m) {
5018
+ fromMatrix4(matrix) {
5019
+
5006
5020
  // we know we are changing the matrix, so we're going to need to disable the flag that sets matrix from position/rotation/scale changes
5007
5021
  const ad = this.getFlag(TransformFlags.AutomaticChangeDetection);
5008
5022
 
5009
5023
  this.clearFlag(TransformFlags.AutomaticChangeDetection);
5010
5024
 
5011
- this.matrix.set(m);
5025
+ this.matrix.set(matrix);
5012
5026
 
5013
- decompose_matrix_4_array(m, this.position, this.rotation, this.scale);
5027
+ decompose_matrix_4_array(matrix, this.position, this.rotation, this.scale);
5014
5028
 
5015
5029
  // restore value of the flag
5016
5030
  this.writeFlag(TransformFlags.AutomaticChangeDetection, ad);
@@ -5464,7 +5478,7 @@ const UnsignedShort5551Type = 1018;
5464
5478
  const UnsignedShort565Type = 1019;
5465
5479
  const UnsignedInt248Type = 1020;
5466
5480
  const AlphaFormat = 1021;
5467
- const RGBFormat = 1022;
5481
+ const RGBFormat$1 = 1022;
5468
5482
  const RGBAFormat = 1023;
5469
5483
  const LuminanceFormat = 1024;
5470
5484
  const LuminanceAlphaFormat = 1025;
@@ -23396,7 +23410,7 @@ function WebGLProgram( renderer, cacheKey, parameters, bindingStates ) {
23396
23410
  ( parameters.toneMapping !== NoToneMapping ) ? getToneMappingFunction( 'toneMapping', parameters.toneMapping ) : '',
23397
23411
 
23398
23412
  parameters.dithering ? '#define DITHERING' : '',
23399
- parameters.format === RGBFormat ? '#define OPAQUE' : '',
23413
+ parameters.format === RGBFormat$1 ? '#define OPAQUE' : '',
23400
23414
 
23401
23415
  ShaderChunk[ 'encodings_pars_fragment' ], // this code is required here because it is used by the various encoding/decoding function defined below
23402
23416
  parameters.map ? getTexelDecodingFunction( 'mapTexelToLinear', parameters.mapEncoding ) : '',
@@ -27494,7 +27508,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
27494
27508
 
27495
27509
  mipmap = mipmaps[ i ];
27496
27510
 
27497
- if ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) {
27511
+ if ( texture.format !== RGBAFormat && texture.format !== RGBFormat$1 ) {
27498
27512
 
27499
27513
  if ( glFormat !== null ) {
27500
27514
 
@@ -27705,7 +27719,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
27705
27719
 
27706
27720
  const mipmap = mipmaps[ j ];
27707
27721
 
27708
- if ( texture.format !== RGBAFormat && texture.format !== RGBFormat ) {
27722
+ if ( texture.format !== RGBAFormat && texture.format !== RGBFormat$1 ) {
27709
27723
 
27710
27724
  if ( glFormat !== null ) {
27711
27725
 
@@ -28122,7 +28136,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
28122
28136
 
28123
28137
  // Handles WebGL2 RGBFormat fallback - #18858
28124
28138
 
28125
- if ( isWebGL2 && texture.format === RGBFormat && ( texture.type === FloatType || texture.type === HalfFloatType ) ) {
28139
+ if ( isWebGL2 && texture.format === RGBFormat$1 && ( texture.type === FloatType || texture.type === HalfFloatType ) ) {
28126
28140
 
28127
28141
  texture.format = RGBAFormat;
28128
28142
 
@@ -28467,7 +28481,7 @@ function WebGLUtils( gl, extensions, capabilities ) {
28467
28481
  }
28468
28482
 
28469
28483
  if ( p === AlphaFormat ) return 6406;
28470
- if ( p === RGBFormat ) return 6407;
28484
+ if ( p === RGBFormat$1 ) return 6407;
28471
28485
  if ( p === RGBAFormat ) return 6408;
28472
28486
  if ( p === LuminanceFormat ) return 6409;
28473
28487
  if ( p === LuminanceAlphaFormat ) return 6410;
@@ -29262,7 +29276,7 @@ class WebXRManager extends EventDispatcher {
29262
29276
  glProjLayer.textureWidth,
29263
29277
  glProjLayer.textureHeight,
29264
29278
  {
29265
- format: attributes.alpha ? RGBAFormat : RGBFormat,
29279
+ format: attributes.alpha ? RGBAFormat : RGBFormat$1,
29266
29280
  type: UnsignedByteType,
29267
29281
  depthTexture: new DepthTexture( glProjLayer.textureWidth, glProjLayer.textureHeight, depthType, undefined, undefined, undefined, undefined, undefined, undefined, depthFormat ),
29268
29282
  stencilBuffer: attributes.stencil,
@@ -34187,7 +34201,7 @@ class VideoTexture extends Texture {
34187
34201
 
34188
34202
  super( video, mapping, wrapS, wrapT, magFilter, minFilter, format, type, anisotropy );
34189
34203
 
34190
- this.format = format !== undefined ? format : RGBFormat;
34204
+ this.format = format !== undefined ? format : RGBFormat$1;
34191
34205
 
34192
34206
  this.minFilter = minFilter !== undefined ? minFilter : LinearFilter;
34193
34207
  this.magFilter = magFilter !== undefined ? magFilter : LinearFilter;
@@ -58964,7 +58978,7 @@ function writeSample2DDataToDataTexture(sampler, texture) {
58964
58978
  throw new Error('itemSize is 2 and texture.format is not RGFormat');
58965
58979
  }
58966
58980
  } else if (sampler.itemSize === 3) {
58967
- if (texture.format !== RGBFormat) {
58981
+ if (texture.format !== RGBFormat$1) {
58968
58982
  throw new Error('itemSize is 2 and texture.format is not RGBFormat');
58969
58983
  }
58970
58984
  } else if (sampler.itemSize === 4) {
@@ -59188,7 +59202,7 @@ function channelCountToThreeTextureFormat(count) {
59188
59202
  case 2:
59189
59203
  return RGFormat;
59190
59204
  case 3:
59191
- return RGBFormat;
59205
+ return RGBFormat$1;
59192
59206
  case 4:
59193
59207
  return RGBAFormat;
59194
59208
  default:
@@ -62743,7 +62757,7 @@ class TerrainLayers {
62743
62757
  * @type {DataTexture2DArray}
62744
62758
  */
62745
62759
  this.texture = new DataTexture2DArray(new Uint8Array(3), 1, 1, 1);
62746
- this.texture.format = RGBFormat;
62760
+ this.texture.format = RGBFormat$1;
62747
62761
  this.texture.type = UnsignedByteType;
62748
62762
 
62749
62763
  this.texture.wrapS = RepeatWrapping;
@@ -67534,6 +67548,12 @@ const CopyShader = {
67534
67548
 
67535
67549
  };
67536
67550
 
67551
+ /**
67552
+ * WebGL constant, declared explicitly to avoid issues with later THREE.js versions where it is absent
67553
+ * @type {number}
67554
+ */
67555
+ const RGBFormat = 1022;
67556
+
67537
67557
  /**
67538
67558
  *
67539
67559
  * @param {number} format
@@ -69337,6 +69357,36 @@ function computeSystemName(system) {
69337
69357
  return system.constructor.name;
69338
69358
  }
69339
69359
 
69360
+ /**
69361
+ *
69362
+ * @param {Object3D} object
69363
+ */
69364
+ function threeUpdateMatrix(object) {
69365
+ object.updateMatrix();
69366
+
69367
+ const children = object.children;
69368
+ for (let i = 0, childCount = children.length; i < childCount; i++) {
69369
+ const child = children[i];
69370
+
69371
+ threeUpdateMatrix(child);
69372
+ }
69373
+ }
69374
+
69375
+ /**
69376
+ *
69377
+ * @param {Object3D} object3
69378
+ */
69379
+ function threeUpdateTransform(object3) {
69380
+
69381
+ /**
69382
+ signal that transformation matrix should be updated
69383
+ @see https://threejs.org/docs/index.html#api/core/Object3D.matrixWorldNeedsUpdate
69384
+ */
69385
+ threeUpdateMatrix(object3);
69386
+
69387
+ object3.updateMatrixWorld(false);
69388
+ }
69389
+
69340
69390
  /**
69341
69391
  *
69342
69392
  * @param {Camera} c
@@ -70083,50 +70133,43 @@ function set_camera_aspect_ratio(camera, width, height) {
70083
70133
 
70084
70134
  /**
70085
70135
  *
70086
- * @param {Object3D} object
70136
+ * @param {Camera} camera
70087
70137
  */
70088
- function threeUpdateMatrix(object) {
70089
- object.updateMatrix();
70138
+ function update_camera_transform(camera) {
70090
70139
 
70091
- const children = object.children;
70092
- for (let i = 0, childCount = children.length; i < childCount; i++) {
70093
- const child = children[i];
70140
+ const three_camera = camera.object;
70094
70141
 
70095
- threeUpdateMatrix(child);
70142
+ if (three_camera === null) {
70143
+ return;
70096
70144
  }
70145
+
70146
+ three_camera.updateProjectionMatrix();
70147
+ threeUpdateTransform(three_camera);
70097
70148
  }
70098
70149
 
70099
70150
  /**
70100
70151
  *
70101
- * @param {Object3D} object3
70152
+ * @param {THREE.Camera} object
70153
+ * @param {Quaternion} rotation
70102
70154
  */
70103
- function threeUpdateTransform(object3) {
70155
+ function three_camera_set_transform_rotation(object, rotation) {
70104
70156
 
70105
- /**
70106
- signal that transformation matrix should be updated
70107
- @see https://threejs.org/docs/index.html#api/core/Object3D.matrixWorldNeedsUpdate
70157
+ /*
70158
+ NOTE: I'm not sure why, but three.js camera points in the opposite direction to normal objects
70159
+ See: https://github.com/mrdoob/three.js/blob/412b99a7f26e117ea97f40eb53d010ab81aa3279/src/core/Object3D.js#L282
70108
70160
  */
70109
- threeUpdateMatrix(object3);
70110
70161
 
70111
- object3.updateMatrixWorld(false);
70112
- }
70113
-
70114
- /**
70115
- *
70116
- * @param {Camera} camera
70117
- */
70118
- function update_camera_transform(camera) {
70162
+ invertQuaternionOrientation(object.quaternion, rotation);
70119
70163
 
70120
- const three_camera = camera.object;
70164
+ object.rotation.setFromQuaternion(object.quaternion);
70121
70165
 
70122
- if (three_camera === null) {
70123
- return;
70124
- }
70166
+ // rotation.__setThreeEuler(camera.object.rotation); // seems unnecessary, based on Object3D.lookAt implementation
70167
+ // camera.object.quaternion.set(rotation.x, rotation.y, rotation.z, rotation.w);
70168
+
70169
+ object.updateProjectionMatrix();
70170
+ threeUpdateTransform(object);
70171
+ }
70125
70172
 
70126
- three_camera.updateProjectionMatrix();
70127
- threeUpdateTransform(three_camera);
70128
- }
70129
-
70130
70173
  class CameraSystem extends System {
70131
70174
  /**
70132
70175
  *
@@ -70215,19 +70258,7 @@ class CameraSystem extends System {
70215
70258
  function synchronizeRotation() {
70216
70259
  const rotation = transform.rotation;
70217
70260
 
70218
- /*
70219
- NOTE: I'm not sure why, but three.js camera points in the opposite direction to normal objects
70220
- See: https://github.com/mrdoob/three.js/blob/412b99a7f26e117ea97f40eb53d010ab81aa3279/src/core/Object3D.js#L282
70221
- */
70222
-
70223
- invertQuaternionOrientation(camera.object.quaternion, rotation);
70224
-
70225
- camera.object.rotation.setFromQuaternion(camera.object.quaternion);
70226
-
70227
- // rotation.__setThreeEuler(camera.object.rotation); // seems unnecessary, based on Object3D.lookAt implementation
70228
- // camera.object.quaternion.set(rotation.x, rotation.y, rotation.z, rotation.w);
70229
-
70230
- update_camera_transform(camera);
70261
+ three_camera_set_transform_rotation(camera.object, rotation);
70231
70262
  }
70232
70263
 
70233
70264
  function rebuild() {
@@ -88350,7 +88381,7 @@ class ColorAndDepthFrameBuffer extends FrameBuffer {
88350
88381
 
88351
88382
  const target = new WebGLMultisampleRenderTarget(size.x, size.y,{ignoreDepth: false});
88352
88383
 
88353
- target.texture.format = RGBFormat; // note, three.js required RGBA render texture, even though RGB would do here
88384
+ target.texture.format = RGBFormat$1; // note, three.js required RGBA render texture, even though RGB would do here
88354
88385
  target.texture.minFilter = NearestFilter;
88355
88386
  target.texture.magFilter = NearestFilter;
88356
88387
  target.texture.generateMipmaps = false;