@onerjs/core 8.42.3 → 8.42.5

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 (158) hide show
  1. package/Animations/animatorAvatar.d.ts +31 -16
  2. package/Animations/animatorAvatar.js +138 -86
  3. package/Animations/animatorAvatar.js.map +1 -1
  4. package/AudioV2/abstractAudio/abstractSound.js +3 -4
  5. package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
  6. package/AudioV2/abstractAudio/audioBus.js +3 -0
  7. package/AudioV2/abstractAudio/audioBus.js.map +1 -1
  8. package/AudioV2/abstractAudio/streamingSoundInstance.d.ts +1 -1
  9. package/AudioV2/abstractAudio/streamingSoundInstance.js +2 -2
  10. package/AudioV2/abstractAudio/streamingSoundInstance.js.map +1 -1
  11. package/AudioV2/webAudio/components/spatialWebAudioUpdaterComponent.d.ts +4 -1
  12. package/AudioV2/webAudio/components/spatialWebAudioUpdaterComponent.js +5 -2
  13. package/AudioV2/webAudio/components/spatialWebAudioUpdaterComponent.js.map +1 -1
  14. package/AudioV2/webAudio/webAudioStaticSound.js +3 -3
  15. package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
  16. package/AudioV2/webAudio/webAudioStreamingSound.js +2 -4
  17. package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
  18. package/Cameras/Inputs/geospatialCameraKeyboardInput.js +6 -3
  19. package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
  20. package/Cameras/geospatialCamera.d.ts +4 -2
  21. package/Cameras/geospatialCamera.js +10 -8
  22. package/Cameras/geospatialCamera.js.map +1 -1
  23. package/Cameras/geospatialCameraMovement.d.ts +11 -1
  24. package/Cameras/geospatialCameraMovement.js +26 -6
  25. package/Cameras/geospatialCameraMovement.js.map +1 -1
  26. package/Debug/physicsViewer.d.ts +1 -0
  27. package/Debug/physicsViewer.js +1 -0
  28. package/Debug/physicsViewer.js.map +1 -1
  29. package/Engines/WebGPU/webgpuBufferManager.js +3 -1
  30. package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
  31. package/Engines/abstractEngine.js +2 -2
  32. package/Engines/abstractEngine.js.map +1 -1
  33. package/Engines/nullEngine.js +4 -0
  34. package/Engines/nullEngine.js.map +1 -1
  35. package/Engines/webgpuEngine.js +2 -2
  36. package/Engines/webgpuEngine.js.map +1 -1
  37. package/FrameGraph/frameGraph.d.ts +21 -1
  38. package/FrameGraph/frameGraph.js +49 -0
  39. package/FrameGraph/frameGraph.js.map +1 -1
  40. package/FrameGraph/frameGraphUtils.d.ts +1 -2
  41. package/FrameGraph/frameGraphUtils.js +2 -27
  42. package/FrameGraph/frameGraphUtils.js.map +1 -1
  43. package/Helpers/environmentHelper.js +7 -0
  44. package/Helpers/environmentHelper.js.map +1 -1
  45. package/Layers/highlightLayer.d.ts +14 -0
  46. package/Layers/highlightLayer.js +20 -0
  47. package/Layers/highlightLayer.js.map +1 -1
  48. package/Layers/selectionOutlineLayer.d.ts +1 -0
  49. package/Layers/selectionOutlineLayer.js +1 -0
  50. package/Layers/selectionOutlineLayer.js.map +1 -1
  51. package/Layers/thinEffectLayer.js +25 -1
  52. package/Layers/thinEffectLayer.js.map +1 -1
  53. package/Layers/thinHighlightLayer.d.ts +9 -0
  54. package/Layers/thinHighlightLayer.js +19 -3
  55. package/Layers/thinHighlightLayer.js.map +1 -1
  56. package/Lights/Clustered/clusteredLightContainer.js +10 -8
  57. package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
  58. package/Loading/Plugins/babylonFileLoader.d.ts +2 -0
  59. package/Loading/Plugins/babylonFileLoader.js +2 -0
  60. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  61. package/Materials/Node/Blocks/Dual/depthSourceBlock.d.ts +1 -0
  62. package/Materials/Node/Blocks/Dual/depthSourceBlock.js +1 -0
  63. package/Materials/Node/Blocks/Dual/depthSourceBlock.js.map +1 -1
  64. package/Materials/Node/Blocks/Dual/sceneDepthBlock.d.ts +1 -0
  65. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +1 -0
  66. package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
  67. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js +10 -4
  68. package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  69. package/Materials/Textures/renderTargetTexture.js +6 -4
  70. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  71. package/Meshes/abstractMesh.d.ts +9 -0
  72. package/Meshes/abstractMesh.js +16 -0
  73. package/Meshes/abstractMesh.js.map +1 -1
  74. package/Meshes/mesh.js +2 -0
  75. package/Meshes/mesh.js.map +1 -1
  76. package/Meshes/thinInstanceMesh.d.ts +7 -3
  77. package/Meshes/thinInstanceMesh.js +15 -3
  78. package/Meshes/thinInstanceMesh.js.map +1 -1
  79. package/Misc/index.d.ts +1 -0
  80. package/Misc/index.js +1 -0
  81. package/Misc/index.js.map +1 -1
  82. package/Misc/snapshotRenderingHelper.d.ts +5 -3
  83. package/Misc/snapshotRenderingHelper.js +9 -5
  84. package/Misc/snapshotRenderingHelper.js.map +1 -1
  85. package/Particles/EmitterTypes/coneParticleEmitter.js +3 -3
  86. package/Particles/EmitterTypes/coneParticleEmitter.js.map +1 -1
  87. package/Particles/EmitterTypes/sphereParticleEmitter.js +2 -2
  88. package/Particles/EmitterTypes/sphereParticleEmitter.js.map +1 -1
  89. package/Particles/Node/Blocks/index.d.ts +0 -2
  90. package/Particles/Node/Blocks/index.js +0 -2
  91. package/Particles/Node/Blocks/index.js.map +1 -1
  92. package/Particles/Node/Blocks/particleNumberMathBlock.js +16 -0
  93. package/Particles/Node/Blocks/particleNumberMathBlock.js.map +1 -1
  94. package/Particles/Node/Blocks/systemBlock.d.ts +0 -4
  95. package/Particles/Node/Blocks/systemBlock.js +1 -32
  96. package/Particles/Node/Blocks/systemBlock.js.map +1 -1
  97. package/Particles/Node/nodeParticleSystemSet.helper.js +2 -89
  98. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  99. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.d.ts +1 -0
  100. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +1 -0
  101. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
  102. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +1 -0
  103. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +1 -0
  104. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
  105. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +6 -0
  106. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +8 -0
  107. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
  108. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +1 -0
  109. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +1 -0
  110. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
  111. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.d.ts +6 -0
  112. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +8 -0
  113. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
  114. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.d.ts +1 -0
  115. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +1 -0
  116. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
  117. package/PostProcesses/screenSpaceReflectionPostProcess.d.ts +1 -0
  118. package/PostProcesses/screenSpaceReflectionPostProcess.js +1 -0
  119. package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
  120. package/Rendering/GlobalIllumination/giRSMManager.d.ts +1 -0
  121. package/Rendering/GlobalIllumination/giRSMManager.js +1 -0
  122. package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
  123. package/Rendering/IBLShadows/iblShadowsAccumulationPass.js +7 -3
  124. package/Rendering/IBLShadows/iblShadowsAccumulationPass.js.map +1 -1
  125. package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js +3 -1
  126. package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js.map +1 -1
  127. package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +3 -1
  128. package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
  129. package/Rendering/geometryBufferRenderer.js +3 -0
  130. package/Rendering/geometryBufferRenderer.js.map +1 -1
  131. package/Rendering/prePassRenderer.d.ts +1 -0
  132. package/Rendering/prePassRenderer.js +1 -0
  133. package/Rendering/prePassRenderer.js.map +1 -1
  134. package/Shaders/gpuUpdateParticles.vertex.js +1 -1
  135. package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
  136. package/ShadersWGSL/ShadersInclude/depthPrePass.js +4 -1
  137. package/ShadersWGSL/ShadersInclude/depthPrePass.js.map +1 -1
  138. package/ShadersWGSL/background.fragment.js +1 -1
  139. package/ShadersWGSL/background.fragment.js.map +1 -1
  140. package/ShadersWGSL/default.fragment.js +1 -1
  141. package/ShadersWGSL/default.fragment.js.map +1 -1
  142. package/ShadersWGSL/gpuUpdateParticles.compute.js +1 -1
  143. package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
  144. package/XR/features/WebXRControllerPhysics.d.ts +1 -0
  145. package/XR/features/WebXRControllerPhysics.js +1 -0
  146. package/XR/features/WebXRControllerPhysics.js.map +1 -1
  147. package/XR/features/WebXRHandTracking.d.ts +1 -0
  148. package/XR/features/WebXRHandTracking.js +1 -0
  149. package/XR/features/WebXRHandTracking.js.map +1 -1
  150. package/package.json +1 -1
  151. package/scene.js +19 -1
  152. package/scene.js.map +1 -1
  153. package/Particles/Node/Blocks/Update/updateRemapBlock.d.ts +0 -39
  154. package/Particles/Node/Blocks/Update/updateRemapBlock.js +0 -93
  155. package/Particles/Node/Blocks/Update/updateRemapBlock.js.map +0 -1
  156. package/Particles/Node/Blocks/particleFresnelBlock.d.ts +0 -34
  157. package/Particles/Node/Blocks/particleFresnelBlock.js +0 -74
  158. package/Particles/Node/Blocks/particleFresnelBlock.js.map +0 -1
@@ -1,7 +1,4 @@
1
- import { Color4 } from "../../Maths/math.color.js";
2
1
  import { Vector2, Vector3 } from "../../Maths/math.vector.js";
3
- import { FactorGradient } from "../../Misc/gradients.js";
4
- import { NodeParticleBlockConnectionPointTypes } from "./Enums/nodeParticleBlockConnectionPointTypes.js";
5
2
  import { NodeParticleSystemSet } from "./nodeParticleSystemSet.js";
6
3
  import { NodeParticleContextualSources } from "./Enums/nodeParticleContextualSources.js";
7
4
  import { NodeParticleSystemSources } from "./Enums/nodeParticleSystemSources.js";
@@ -35,7 +32,6 @@ import { UpdateFlowMapBlock } from "./Blocks/Update/updateFlowMapBlock.js";
35
32
  import { UpdateNoiseBlock } from "./Blocks/Update/updateNoiseBlock.js";
36
33
  import { UpdatePositionBlock } from "./Blocks/Update/updatePositionBlock.js";
37
34
  import { UpdateSizeBlock } from "./Blocks/Update/updateSizeBlock.js";
38
- import { UpdateRemapBlock } from "./Blocks/Update/updateRemapBlock.js";
39
35
  import { GenerateBase64StringFromPixelData } from "../../Misc/copyTools.js";
40
36
  /**
41
37
  * Converts a ParticleSystem to a NodeParticleSystemSet.
@@ -67,7 +63,7 @@ async function _ExtractDatafromParticleSystemAsync(newSet, oldSystem, context) {
67
63
  }
68
64
  // ------------- CREATE PARTICLE FUNCTIONS -------------
69
65
  // The creation of the different properties follows the order they are added to the CreationQueue in ThinParticleSystem:
70
- // Lifetime, Emit Power, Size, Scale/StartSize, Angle, Color, Noise, ColorDead, Ramp, Sheet
66
+ // Lifetime, Emit Power, Size, Scale/StartSize, Angle, Color, Noise, ColorDead, Sheet
71
67
  function _CreateParticleBlockGroup(oldSystem, context) {
72
68
  // Create particle block
73
69
  const createParticleBlock = new CreateParticleBlock("Create Particle");
@@ -359,7 +355,7 @@ function _SpriteSheetBlock(particle, oldSystem) {
359
355
  /**
360
356
  * Creates the group of blocks that represent the particle system update
361
357
  * The creation of the different properties follows the order they are added to the ProcessQueue in ThinParticleSystem:
362
- * Color, AngularSpeedGradients, AngularSpeed, VelocityGradients, Direction, LimitVelocityGradients, DragGradients, Position, Noise, SizeGradients, Gravity, RemapGradients
358
+ * Color, AngularSpeedGradients, AngularSpeed, VelocityGradients, Direction, LimitVelocityGradients, DragGradients, Position, Noise, SizeGradients, Gravity
363
359
  * @param inputParticle The particle input connection point
364
360
  * @param oldSystem The old particle system to convert
365
361
  * @param context The runtime conversion context
@@ -394,9 +390,6 @@ function _UpdateParticleBlockGroup(inputParticle, oldSystem, context) {
394
390
  if (oldSystem.gravity.equalsToFloats(0, 0, 0) === false) {
395
391
  updatedParticle = _UpdateParticleGravityBlockGroup(updatedParticle, oldSystem.gravity);
396
392
  }
397
- if (oldSystem.useRampGradients) {
398
- updatedParticle = _UpdateParticleRemapGradientBlockGroup(updatedParticle, oldSystem.getColorRemapGradients(), oldSystem.getAlphaRemapGradients(), context);
399
- }
400
393
  if (oldSystem.isAnimationSheetEnabled) {
401
394
  updatedParticle = _UpdateParticleSpriteCellBlockGroup(updatedParticle);
402
395
  }
@@ -678,71 +671,6 @@ function _UpdateParticleGravityBlockGroup(inputParticle, gravity) {
678
671
  addDirectionBlock.output.connectTo(updateDirection.direction);
679
672
  return updateDirection.output;
680
673
  }
681
- /**
682
- * Creates the group of blocks that represent the color and alpha remap update
683
- * @param inputParticle The input particle to update
684
- * @param colorRemapGradients The color remap gradients
685
- * @param alphaRemapGradients The alpha remap gradients
686
- * @param context The context of the current conversion
687
- * @returns The ouput of the group of blocks that represent the particle remap update
688
- */
689
- function _UpdateParticleRemapGradientBlockGroup(inputParticle, colorRemapGradients, alphaRemapGradients, context) {
690
- let hasUpdate = false;
691
- const remapUpdateBlock = new UpdateRemapBlock("Remap Update");
692
- if (colorRemapGradients && colorRemapGradients.length > 0) {
693
- context.ageToLifeTimeRatioBlockGroupOutput = _CreateAgeToLifeTimeRatioBlockGroup(context);
694
- // Split the color gradient into factor1 and factor2 gradients
695
- const colorFactor1Gradients = [];
696
- const colorFactor2Gradients = [];
697
- for (let i = 0; i < colorRemapGradients.length; i++) {
698
- const gradientValue = colorRemapGradients[i];
699
- colorFactor1Gradients.push(new FactorGradient(gradientValue.gradient, gradientValue.factor1));
700
- colorFactor2Gradients.push(new FactorGradient(gradientValue.gradient, gradientValue.factor2));
701
- }
702
- // Generate the gradient
703
- const colorFactor1BlockGroup = _CreateGradientBlockGroup(context.ageToLifeTimeRatioBlockGroupOutput, colorFactor1Gradients, ParticleRandomBlockLocks.OncePerParticle, "Color Min");
704
- // Generate the gradient
705
- const colorFactor2BlockGroup = _CreateGradientBlockGroup(context.ageToLifeTimeRatioBlockGroupOutput, colorFactor2Gradients, ParticleRandomBlockLocks.OncePerParticle, "Color Max");
706
- const substractBlock = new ParticleMathBlock("Color Max - Min");
707
- substractBlock.operation = ParticleMathBlockOperations.Subtract;
708
- colorFactor2BlockGroup.connectTo(substractBlock.left);
709
- colorFactor1BlockGroup.connectTo(substractBlock.right);
710
- const colorConverterBlock = new ParticleConverterBlock("Color Remap Converter");
711
- colorFactor1BlockGroup.connectTo(colorConverterBlock.xIn);
712
- substractBlock.output.connectTo(colorConverterBlock.yIn);
713
- colorConverterBlock.xyOut.connectTo(remapUpdateBlock.remapColor);
714
- hasUpdate = true;
715
- }
716
- if (alphaRemapGradients && alphaRemapGradients.length > 0) {
717
- context.ageToLifeTimeRatioBlockGroupOutput = _CreateAgeToLifeTimeRatioBlockGroup(context);
718
- // Split the color gradient into factor1 and factor2 gradients
719
- const alphaFactor1Gradients = [];
720
- const alphaFactor2Gradients = [];
721
- for (let i = 0; i < alphaRemapGradients.length; i++) {
722
- const gradientValue = alphaRemapGradients[i];
723
- alphaFactor1Gradients.push(new FactorGradient(gradientValue.gradient, gradientValue.factor1));
724
- alphaFactor2Gradients.push(new FactorGradient(gradientValue.gradient, gradientValue.factor2));
725
- }
726
- // Generate the gradient
727
- const alphaFactor1BlockGroup = _CreateGradientBlockGroup(context.ageToLifeTimeRatioBlockGroupOutput, alphaFactor1Gradients, ParticleRandomBlockLocks.OncePerParticle, "Alpha Min");
728
- // Generate the gradient
729
- const alphaFactor2BlockGroup = _CreateGradientBlockGroup(context.ageToLifeTimeRatioBlockGroupOutput, alphaFactor2Gradients, ParticleRandomBlockLocks.OncePerParticle, "Alpha Max");
730
- const substractBlock = new ParticleMathBlock("Alpha Max - Min");
731
- substractBlock.operation = ParticleMathBlockOperations.Subtract;
732
- alphaFactor2BlockGroup.connectTo(substractBlock.left);
733
- alphaFactor1BlockGroup.connectTo(substractBlock.right);
734
- const alphaConverterBlock = new ParticleConverterBlock("Alpha Remap Converter");
735
- alphaFactor1BlockGroup.connectTo(alphaConverterBlock.xIn);
736
- substractBlock.output.connectTo(alphaConverterBlock.yIn);
737
- alphaConverterBlock.xyOut.connectTo(remapUpdateBlock.remapAlpha);
738
- hasUpdate = true;
739
- }
740
- if (hasUpdate) {
741
- inputParticle.connectTo(remapUpdateBlock.particle);
742
- return remapUpdateBlock.output;
743
- }
744
- return inputParticle;
745
- }
746
674
  /**
747
675
  * Creates the group of blocks that represent the particle sprite cell update
748
676
  * @param inputParticle The input particle to update
@@ -816,10 +744,6 @@ function _SystemBlockGroup(updateParticleOutput, oldSystem, context) {
816
744
  _SystemCustomShader(oldSystem, newSystem);
817
745
  _SystemEmitRateValue(oldSystem.getEmitRateGradients(), oldSystem.targetStopDuration, oldSystem.emitRate, newSystem, context);
818
746
  _SystemTargetStopDuration(oldSystem.targetStopDuration, newSystem, context);
819
- const rampGradients = oldSystem.getRampGradients();
820
- if (rampGradients && rampGradients.length > 0) {
821
- _SystemRampGradientsBlockGroup(rampGradients, newSystem);
822
- }
823
747
  const texture = oldSystem.particleTexture;
824
748
  if (texture) {
825
749
  _CreateTextureBlock(texture).connectTo(newSystem.texture);
@@ -889,17 +813,6 @@ function _SystemTargetStopDuration(targetStopDuration, newSystem, context) {
889
813
  newSystem.targetStopDuration.value = targetStopDuration;
890
814
  }
891
815
  }
892
- function _SystemRampGradientsBlockGroup(rampGradients, newSystem) {
893
- const gradientBlock = new ParticleGradientBlock("Ramp Gradient Block");
894
- for (let i = 0; i < rampGradients.length; i++) {
895
- const rampGradient = rampGradients[i];
896
- const gradientValueBlock = new ParticleGradientValueBlock(`Ramp Gradient ${i}`);
897
- gradientValueBlock.reference = rampGradient.gradient;
898
- _CreateAndConnectInput(`Color ${i}`, new Color4(rampGradient.color.r, rampGradient.color.g, rampGradient.color.b), gradientValueBlock.value, NodeParticleBlockConnectionPointTypes.Color4);
899
- gradientValueBlock.output.connectTo(gradientBlock.inputs[i + 1]);
900
- }
901
- gradientBlock.output.connectTo(newSystem.rampGradient);
902
- }
903
816
  // ------------- UTILITY FUNCTIONS -------------
904
817
  function _CreateDeltaModifiedInput(name, value) {
905
818
  const multiplyBlock = new ParticleMathBlock("Multiply by Delta");