@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.
- 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/FrameGraph/frameGraph.d.ts +21 -1
- package/FrameGraph/frameGraph.js +49 -0
- package/FrameGraph/frameGraph.js.map +1 -1
- package/FrameGraph/frameGraphUtils.d.ts +1 -2
- package/FrameGraph/frameGraphUtils.js +2 -27
- package/FrameGraph/frameGraphUtils.js.map +1 -1
- package/Helpers/environmentHelper.js +7 -0
- package/Helpers/environmentHelper.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 +10 -8
- 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/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.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/scene.js +19 -1
- package/scene.js.map +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,39 +0,0 @@
|
|
|
1
|
-
import type { NodeParticleConnectionPoint } from "../../nodeParticleBlockConnectionPoint.js";
|
|
2
|
-
import type { NodeParticleBuildState } from "../../nodeParticleBuildState.js";
|
|
3
|
-
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
4
|
-
/**
|
|
5
|
-
* Block used to update the remap value of a particle
|
|
6
|
-
*/
|
|
7
|
-
export declare class UpdateRemapBlock extends NodeParticleBlock {
|
|
8
|
-
/**
|
|
9
|
-
* Create a new UpdateRemapBlock
|
|
10
|
-
* @param name defines the block name
|
|
11
|
-
*/
|
|
12
|
-
constructor(name: string);
|
|
13
|
-
/**
|
|
14
|
-
* Gets the particle component
|
|
15
|
-
*/
|
|
16
|
-
get particle(): NodeParticleConnectionPoint;
|
|
17
|
-
/**
|
|
18
|
-
* Gets the remapColor input component
|
|
19
|
-
*/
|
|
20
|
-
get remapColor(): NodeParticleConnectionPoint;
|
|
21
|
-
/**
|
|
22
|
-
* Gets the remapAlpha input component
|
|
23
|
-
*/
|
|
24
|
-
get remapAlpha(): NodeParticleConnectionPoint;
|
|
25
|
-
/**
|
|
26
|
-
* Gets the output component
|
|
27
|
-
*/
|
|
28
|
-
get output(): NodeParticleConnectionPoint;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the current class name
|
|
31
|
-
* @returns the class name
|
|
32
|
-
*/
|
|
33
|
-
getClassName(): string;
|
|
34
|
-
/**
|
|
35
|
-
* Builds the block
|
|
36
|
-
* @param state defines the current build state
|
|
37
|
-
*/
|
|
38
|
-
_build(state: NodeParticleBuildState): void;
|
|
39
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { Vector2, Vector4 } from "../../../../Maths/math.vector.js";
|
|
2
|
-
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
3
|
-
import { NodeParticleBlock } from "../../nodeParticleBlock.js";
|
|
4
|
-
import { NodeParticleBlockConnectionPointTypes } from "../../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
5
|
-
import { _ConnectAtTheEnd } from "../../../Queue/executionQueue.js";
|
|
6
|
-
/**
|
|
7
|
-
* Block used to update the remap value of a particle
|
|
8
|
-
*/
|
|
9
|
-
export class UpdateRemapBlock extends NodeParticleBlock {
|
|
10
|
-
/**
|
|
11
|
-
* Create a new UpdateRemapBlock
|
|
12
|
-
* @param name defines the block name
|
|
13
|
-
*/
|
|
14
|
-
constructor(name) {
|
|
15
|
-
super(name);
|
|
16
|
-
this.registerInput("particle", NodeParticleBlockConnectionPointTypes.Particle);
|
|
17
|
-
this.registerInput("remapColor", NodeParticleBlockConnectionPointTypes.Vector2, true);
|
|
18
|
-
this.registerInput("remapAlpha", NodeParticleBlockConnectionPointTypes.Vector2, true);
|
|
19
|
-
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Particle);
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Gets the particle component
|
|
23
|
-
*/
|
|
24
|
-
get particle() {
|
|
25
|
-
return this._inputs[0];
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Gets the remapColor input component
|
|
29
|
-
*/
|
|
30
|
-
get remapColor() {
|
|
31
|
-
return this._inputs[1];
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Gets the remapAlpha input component
|
|
35
|
-
*/
|
|
36
|
-
get remapAlpha() {
|
|
37
|
-
return this._inputs[2];
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Gets the output component
|
|
41
|
-
*/
|
|
42
|
-
get output() {
|
|
43
|
-
return this._outputs[0];
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Gets the current class name
|
|
47
|
-
* @returns the class name
|
|
48
|
-
*/
|
|
49
|
-
getClassName() {
|
|
50
|
-
return "UpdateRemapBlock";
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Builds the block
|
|
54
|
-
* @param state defines the current build state
|
|
55
|
-
*/
|
|
56
|
-
_build(state) {
|
|
57
|
-
const system = this.particle.getConnectedValue(state);
|
|
58
|
-
this.output._storedValue = system;
|
|
59
|
-
if (!this.remapColor.isConnected && !this.remapAlpha.isConnected) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
const processRemap = (particle) => {
|
|
63
|
-
state.particleContext = particle;
|
|
64
|
-
state.systemContext = system;
|
|
65
|
-
const colorRemap = this.remapColor.isConnected ? this.remapColor.getConnectedValue(state) : new Vector2(0, 1);
|
|
66
|
-
const alphaRemap = this.remapAlpha.isConnected ? this.remapAlpha.getConnectedValue(state) : new Vector2(0, 1);
|
|
67
|
-
if (!particle.remapData) {
|
|
68
|
-
particle.remapData = new Vector4(0, 1, 0, 1);
|
|
69
|
-
}
|
|
70
|
-
if (colorRemap) {
|
|
71
|
-
particle.remapData.x = colorRemap.x;
|
|
72
|
-
particle.remapData.y = colorRemap.y;
|
|
73
|
-
}
|
|
74
|
-
if (alphaRemap) {
|
|
75
|
-
particle.remapData.z = alphaRemap.x;
|
|
76
|
-
particle.remapData.w = alphaRemap.y;
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const remapProcessing = {
|
|
80
|
-
process: processRemap,
|
|
81
|
-
previousItem: null,
|
|
82
|
-
nextItem: null,
|
|
83
|
-
};
|
|
84
|
-
if (system._updateQueueStart) {
|
|
85
|
-
_ConnectAtTheEnd(remapProcessing, system._updateQueueStart);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
system._updateQueueStart = remapProcessing;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
RegisterClass("BABYLON.UpdateRemapBlock", UpdateRemapBlock);
|
|
93
|
-
//# sourceMappingURL=updateRemapBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"updateRemapBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Particles/Node/Blocks/Update/updateRemapBlock.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,sCAA4B;AACpD,OAAO,EAAE,iBAAiB,EAAE,mCAA8C;AAC1E,OAAO,EAAE,qCAAqC,EAAE,6DAAwE;AACxH,OAAO,EAAE,gBAAgB,EAAE,yCAA4C;AAEvE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AAiB,CAAC,CAAC;QAChE,CAAC;aAAM,CAAC;YACJ,MAAM,CAAC,iBAAiB,GAAG,eAAe,CAAC;QAC/C,CAAC;IACL,CAAC;CACJ;AAED,aAAa,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import type { Particle } from \"core/Particles/particle\";\r\nimport type { ThinParticleSystem } from \"core/Particles/thinParticleSystem\";\r\nimport type { NodeParticleConnectionPoint } from \"core/Particles/Node/nodeParticleBlockConnectionPoint\";\r\nimport type { NodeParticleBuildState } from \"core/Particles/Node/nodeParticleBuildState\";\r\n\r\nimport { Vector2, Vector4 } from \"../../../../Maths/math.vector\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\nimport { NodeParticleBlock } from \"core/Particles/Node/nodeParticleBlock\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"core/Particles/Node/Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport { _ConnectAtTheEnd } from \"core/Particles/Queue/executionQueue\";\r\n\r\n/**\r\n * Block used to update the remap value of a particle\r\n */\r\nexport class UpdateRemapBlock extends NodeParticleBlock {\r\n /**\r\n * Create a new UpdateRemapBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"particle\", NodeParticleBlockConnectionPointTypes.Particle);\r\n this.registerInput(\"remapColor\", NodeParticleBlockConnectionPointTypes.Vector2, true);\r\n this.registerInput(\"remapAlpha\", NodeParticleBlockConnectionPointTypes.Vector2, true);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Particle);\r\n }\r\n\r\n /**\r\n * Gets the particle component\r\n */\r\n public get particle(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the remapColor input component\r\n */\r\n public get remapColor(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the remapAlpha input component\r\n */\r\n public get remapAlpha(): NodeParticleConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"UpdateRemapBlock\";\r\n }\r\n\r\n /**\r\n * Builds the block\r\n * @param state defines the current build state\r\n */\r\n public override _build(state: NodeParticleBuildState) {\r\n const system = this.particle.getConnectedValue(state) as ThinParticleSystem;\r\n\r\n this.output._storedValue = system;\r\n\r\n if (!this.remapColor.isConnected && !this.remapAlpha.isConnected) {\r\n return;\r\n }\r\n\r\n const processRemap = (particle: Particle) => {\r\n state.particleContext = particle;\r\n state.systemContext = system;\r\n\r\n const colorRemap = this.remapColor.isConnected ? (this.remapColor.getConnectedValue(state) as Vector2) : new Vector2(0, 1);\r\n const alphaRemap = this.remapAlpha.isConnected ? (this.remapAlpha.getConnectedValue(state) as Vector2) : new Vector2(0, 1);\r\n\r\n if (!particle.remapData) {\r\n particle.remapData = new Vector4(0, 1, 0, 1);\r\n }\r\n\r\n if (colorRemap) {\r\n particle.remapData.x = colorRemap.x;\r\n particle.remapData.y = colorRemap.y;\r\n }\r\n\r\n if (alphaRemap) {\r\n particle.remapData.z = alphaRemap.x;\r\n particle.remapData.w = alphaRemap.y;\r\n }\r\n };\r\n\r\n const remapProcessing = {\r\n process: processRemap,\r\n previousItem: null,\r\n nextItem: null,\r\n };\r\n\r\n if (system._updateQueueStart) {\r\n _ConnectAtTheEnd(remapProcessing, system._updateQueueStart);\r\n } else {\r\n system._updateQueueStart = remapProcessing;\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.UpdateRemapBlock\", UpdateRemapBlock);\r\n"]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { NodeParticleBlock } from "../nodeParticleBlock.js";
|
|
2
|
-
import type { NodeParticleConnectionPoint } from "../nodeParticleBlockConnectionPoint.js";
|
|
3
|
-
/**
|
|
4
|
-
* Block used to compute the fresnel term
|
|
5
|
-
*/
|
|
6
|
-
export declare class ParticleFresnelBlock extends NodeParticleBlock {
|
|
7
|
-
/**
|
|
8
|
-
* Creates a new ParticleFresnelBlock
|
|
9
|
-
* @param name defines the block name
|
|
10
|
-
*/
|
|
11
|
-
constructor(name: string);
|
|
12
|
-
/**
|
|
13
|
-
* Gets the current class name
|
|
14
|
-
* @returns the class name
|
|
15
|
-
*/
|
|
16
|
-
getClassName(): string;
|
|
17
|
-
/**
|
|
18
|
-
* Gets the view input component
|
|
19
|
-
*/
|
|
20
|
-
get view(): NodeParticleConnectionPoint;
|
|
21
|
-
/**
|
|
22
|
-
* Gets the normal input component
|
|
23
|
-
*/
|
|
24
|
-
get normal(): NodeParticleConnectionPoint;
|
|
25
|
-
/**
|
|
26
|
-
* Gets the gradient operand input component
|
|
27
|
-
*/
|
|
28
|
-
get gradient(): NodeParticleConnectionPoint;
|
|
29
|
-
/**
|
|
30
|
-
* Gets the output component
|
|
31
|
-
*/
|
|
32
|
-
get output(): NodeParticleConnectionPoint;
|
|
33
|
-
_build(): void;
|
|
34
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { RegisterClass } from "../../../Misc/typeStore.js";
|
|
2
|
-
import { Vector3 } from "../../../Maths/math.vector.js";
|
|
3
|
-
import { NodeParticleBlock } from "../nodeParticleBlock.js";
|
|
4
|
-
import { NodeParticleBlockConnectionPointTypes } from "../Enums/nodeParticleBlockConnectionPointTypes.js";
|
|
5
|
-
/**
|
|
6
|
-
* Block used to compute the fresnel term
|
|
7
|
-
*/
|
|
8
|
-
export class ParticleFresnelBlock extends NodeParticleBlock {
|
|
9
|
-
/**
|
|
10
|
-
* Creates a new ParticleFresnelBlock
|
|
11
|
-
* @param name defines the block name
|
|
12
|
-
*/
|
|
13
|
-
constructor(name) {
|
|
14
|
-
super(name);
|
|
15
|
-
this.registerInput("view", NodeParticleBlockConnectionPointTypes.Vector3);
|
|
16
|
-
this.registerInput("normal", NodeParticleBlockConnectionPointTypes.Vector3);
|
|
17
|
-
this.registerOutput("output", NodeParticleBlockConnectionPointTypes.Float);
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Gets the current class name
|
|
21
|
-
* @returns the class name
|
|
22
|
-
*/
|
|
23
|
-
getClassName() {
|
|
24
|
-
return "ParticleFresnelBlock";
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Gets the view input component
|
|
28
|
-
*/
|
|
29
|
-
get view() {
|
|
30
|
-
return this._inputs[0];
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Gets the normal input component
|
|
34
|
-
*/
|
|
35
|
-
get normal() {
|
|
36
|
-
return this._inputs[1];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Gets the gradient operand input component
|
|
40
|
-
*/
|
|
41
|
-
get gradient() {
|
|
42
|
-
return this._inputs[2];
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Gets the output component
|
|
46
|
-
*/
|
|
47
|
-
get output() {
|
|
48
|
-
return this._outputs[0];
|
|
49
|
-
}
|
|
50
|
-
_build() {
|
|
51
|
-
if (!this.view.isConnected || !this.normal.isConnected) {
|
|
52
|
-
this.output._storedFunction = null;
|
|
53
|
-
this.output._storedValue = null;
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
this.output._storedFunction = (state) => {
|
|
57
|
-
const view = this.view.getConnectedValue(state);
|
|
58
|
-
const normal = this.normal.getConnectedValue(state);
|
|
59
|
-
const f0 = 0.04; // base reflectance at normal incidence (e.g. 0.04 for dielectrics)
|
|
60
|
-
const nLen = normal.length();
|
|
61
|
-
const vLen = view.length();
|
|
62
|
-
// Guard against zero-length inputs
|
|
63
|
-
if (nLen < 1e-8 || vLen < 1e-8) {
|
|
64
|
-
return f0;
|
|
65
|
-
}
|
|
66
|
-
const cosTheta = Math.min(Math.max(Vector3.Dot(normal, view) / (nLen * vLen), 0.0), 1.0);
|
|
67
|
-
// Schlick approximation
|
|
68
|
-
const oneMinusCos = 1.0 - cosTheta;
|
|
69
|
-
return f0 + (1.0 - f0) * Math.pow(oneMinusCos, 5.0);
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
RegisterClass("BABYLON.ParticleFresnelBlock", ParticleFresnelBlock);
|
|
74
|
-
//# sourceMappingURL=particleFresnelBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"particleFresnelBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Particles/Node/Blocks/particleFresnelBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,gDAAgD,CAAC;AAGvG;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,iBAAiB;IACvD;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAC1E,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAC5E,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,qCAAqC,CAAC,KAAK,CAAC,CAAC;IAC/E,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QACX,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,MAAM;QACb,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;Q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AAG,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACxD,CAAC,CAAC;IACN,CAAC;CACJ;AAED,aAAa,CAAC,8BAA8B,EAAE,oBAAoB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { Vector3 } from \"core/Maths/math.vector\";\r\nimport { NodeParticleBlock } from \"../nodeParticleBlock\";\r\nimport { NodeParticleBlockConnectionPointTypes } from \"../Enums/nodeParticleBlockConnectionPointTypes\";\r\nimport type { NodeParticleConnectionPoint } from \"../nodeParticleBlockConnectionPoint\";\r\n\r\n/**\r\n * Block used to compute the fresnel term\r\n */\r\nexport class ParticleFresnelBlock extends NodeParticleBlock {\r\n /**\r\n * Creates a new ParticleFresnelBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"view\", NodeParticleBlockConnectionPointTypes.Vector3);\r\n this.registerInput(\"normal\", NodeParticleBlockConnectionPointTypes.Vector3);\r\n this.registerOutput(\"output\", NodeParticleBlockConnectionPointTypes.Float);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"ParticleFresnelBlock\";\r\n }\r\n\r\n /**\r\n * Gets the view input component\r\n */\r\n public get view(): NodeParticleConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the normal input component\r\n */\r\n public get normal(): NodeParticleConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the gradient operand input component\r\n */\r\n public get gradient(): NodeParticleConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeParticleConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n public override _build() {\r\n if (!this.view.isConnected || !this.normal.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const view = this.view.getConnectedValue(state);\r\n const normal = this.normal.getConnectedValue(state);\r\n const f0 = 0.04; // base reflectance at normal incidence (e.g. 0.04 for dielectrics)\r\n\r\n const nLen = normal.length();\r\n const vLen = view.length();\r\n\r\n // Guard against zero-length inputs\r\n if (nLen < 1e-8 || vLen < 1e-8) {\r\n return f0;\r\n }\r\n\r\n const cosTheta = Math.min(Math.max(Vector3.Dot(normal, view) / (nLen * vLen), 0.0), 1.0);\r\n\r\n // Schlick approximation\r\n const oneMinusCos = 1.0 - cosTheta;\r\n return f0 + (1.0 - f0) * Math.pow(oneMinusCos, 5.0);\r\n };\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ParticleFresnelBlock\", ParticleFresnelBlock);\r\n"]}
|