@onerjs/core 8.42.3 → 8.42.4
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/Animations/animatorAvatar.d.ts +31 -16
- package/Animations/animatorAvatar.js +138 -86
- package/Animations/animatorAvatar.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSound.js +3 -4
- package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
- package/AudioV2/abstractAudio/audioBus.js +3 -0
- package/AudioV2/abstractAudio/audioBus.js.map +1 -1
- package/AudioV2/abstractAudio/streamingSoundInstance.d.ts +1 -1
- package/AudioV2/abstractAudio/streamingSoundInstance.js +2 -2
- package/AudioV2/abstractAudio/streamingSoundInstance.js.map +1 -1
- package/AudioV2/webAudio/components/spatialWebAudioUpdaterComponent.d.ts +4 -1
- package/AudioV2/webAudio/components/spatialWebAudioUpdaterComponent.js +5 -2
- package/AudioV2/webAudio/components/spatialWebAudioUpdaterComponent.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.js +3 -3
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStreamingSound.js +2 -4
- package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js +6 -3
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
- package/Cameras/geospatialCamera.d.ts +4 -2
- package/Cameras/geospatialCamera.js +10 -8
- package/Cameras/geospatialCamera.js.map +1 -1
- package/Cameras/geospatialCameraMovement.d.ts +11 -1
- package/Cameras/geospatialCameraMovement.js +26 -6
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/Debug/physicsViewer.d.ts +1 -0
- package/Debug/physicsViewer.js +1 -0
- package/Debug/physicsViewer.js.map +1 -1
- package/Engines/WebGPU/webgpuBufferManager.js +3 -1
- package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/nullEngine.js +4 -0
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +2 -2
- package/Engines/webgpuEngine.js.map +1 -1
- package/Layers/highlightLayer.d.ts +14 -0
- package/Layers/highlightLayer.js +20 -0
- package/Layers/highlightLayer.js.map +1 -1
- package/Layers/selectionOutlineLayer.d.ts +1 -0
- package/Layers/selectionOutlineLayer.js +1 -0
- package/Layers/selectionOutlineLayer.js.map +1 -1
- package/Layers/thinEffectLayer.js +25 -1
- package/Layers/thinEffectLayer.js.map +1 -1
- package/Layers/thinHighlightLayer.d.ts +9 -0
- package/Layers/thinHighlightLayer.js +19 -3
- package/Layers/thinHighlightLayer.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.js +4 -0
- package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.d.ts +2 -0
- package/Loading/Plugins/babylonFileLoader.js +2 -0
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Materials/Node/Blocks/Dual/depthSourceBlock.d.ts +1 -0
- package/Materials/Node/Blocks/Dual/depthSourceBlock.js +1 -0
- package/Materials/Node/Blocks/Dual/depthSourceBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.d.ts +1 -0
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +1 -0
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
- package/Materials/Node/Blocks/Teleport/teleportOutBlock.js +10 -4
- package/Materials/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
- package/Materials/Textures/renderTargetTexture.js +6 -4
- package/Materials/Textures/renderTargetTexture.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +9 -0
- package/Meshes/abstractMesh.js +16 -0
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/mesh.js +2 -0
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/thinInstanceMesh.d.ts +7 -3
- package/Meshes/thinInstanceMesh.js +15 -3
- package/Meshes/thinInstanceMesh.js.map +1 -1
- package/Misc/snapshotRenderingHelper.d.ts +5 -3
- package/Misc/snapshotRenderingHelper.js +9 -5
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Particles/EmitterTypes/coneParticleEmitter.js +3 -3
- package/Particles/EmitterTypes/coneParticleEmitter.js.map +1 -1
- package/Particles/EmitterTypes/sphereParticleEmitter.js +2 -2
- package/Particles/EmitterTypes/sphereParticleEmitter.js.map +1 -1
- package/Particles/Node/Blocks/index.d.ts +0 -2
- package/Particles/Node/Blocks/index.js +0 -2
- package/Particles/Node/Blocks/index.js.map +1 -1
- package/Particles/Node/Blocks/particleNumberMathBlock.js +16 -0
- package/Particles/Node/Blocks/particleNumberMathBlock.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.d.ts +0 -4
- package/Particles/Node/Blocks/systemBlock.js +1 -32
- package/Particles/Node/Blocks/systemBlock.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.helper.js +2 -89
- package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.d.ts +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.d.ts +6 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +8 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.d.ts +6 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +8 -0
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.d.ts +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.d.ts +1 -0
- package/PostProcesses/screenSpaceReflectionPostProcess.js +1 -0
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.d.ts +1 -0
- package/Rendering/GlobalIllumination/giRSMManager.js +1 -0
- package/Rendering/GlobalIllumination/giRSMManager.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js +7 -3
- package/Rendering/IBLShadows/iblShadowsAccumulationPass.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js +3 -1
- package/Rendering/IBLShadows/iblShadowsSpatialBlurPass.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js +3 -1
- package/Rendering/IBLShadows/iblShadowsVoxelTracingPass.js.map +1 -1
- package/Rendering/geometryBufferRenderer.js +3 -0
- package/Rendering/geometryBufferRenderer.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +1 -0
- package/Rendering/prePassRenderer.js +1 -0
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Shaders/gpuUpdateParticles.vertex.js +1 -1
- package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/depthPrePass.js +4 -1
- package/ShadersWGSL/ShadersInclude/depthPrePass.js.map +1 -1
- package/ShadersWGSL/background.fragment.js +1 -1
- package/ShadersWGSL/background.fragment.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +1 -1
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
- package/XR/features/WebXRControllerPhysics.d.ts +1 -0
- package/XR/features/WebXRControllerPhysics.js +1 -0
- package/XR/features/WebXRControllerPhysics.js.map +1 -1
- package/XR/features/WebXRHandTracking.d.ts +1 -0
- package/XR/features/WebXRHandTracking.js +1 -0
- package/XR/features/WebXRHandTracking.js.map +1 -1
- package/package.json +1 -1
- package/Particles/Node/Blocks/Update/updateRemapBlock.d.ts +0 -39
- package/Particles/Node/Blocks/Update/updateRemapBlock.js +0 -93
- package/Particles/Node/Blocks/Update/updateRemapBlock.js.map +0 -1
- package/Particles/Node/Blocks/particleFresnelBlock.d.ts +0 -34
- package/Particles/Node/Blocks/particleFresnelBlock.js +0 -74
- 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,
|
|
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
|
|
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");
|