@onerjs/core 8.53.4 → 8.53.6
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/animationGroup.d.ts +0 -1
- package/Animations/animationGroup.js +0 -1
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/animationGroup.pure.js +2 -0
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +11 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioSceneComponent.pure.js +1 -1
- package/AudioV2/abstractAudio/abstractSound.d.ts +2 -1
- package/AudioV2/abstractAudio/abstractSound.js +7 -2
- package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.d.ts +3 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/staticSound.d.ts +6 -0
- package/AudioV2/abstractAudio/staticSound.js +17 -1
- package/AudioV2/abstractAudio/staticSound.js.map +1 -1
- package/AudioV2/abstractAudio/staticSoundInstance.d.ts +4 -2
- package/AudioV2/abstractAudio/staticSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/streamingSound.d.ts +6 -0
- package/AudioV2/abstractAudio/streamingSound.js +9 -1
- package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.d.ts +7 -1
- package/AudioV2/webAudio/webAudioStaticSound.js +56 -8
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -1
- package/AudioV2/webAudio/webAudioStreamingSound.js +16 -4
- package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +2 -2
- package/BakedVertexAnimation/bakedVertexAnimationManager.js +151 -121
- package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
- package/Behaviors/Cameras/interpolatingBehavior.d.ts +17 -2
- package/Behaviors/Cameras/interpolatingBehavior.js +53 -23
- package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
- package/Bones/bone.pure.js +3 -3
- package/Buffers/buffer.pure.js +0 -12
- package/Buffers/buffer.pure.js.map +1 -1
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js +141 -126
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.d.ts +2 -1
- package/Cameras/Inputs/BaseCameraPointersInput.js +290 -277
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js +115 -102
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +3 -0
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +334 -273
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +273 -258
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.js +237 -213
- package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraKeyboardInput.js +199 -168
- package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraMouseInput.js +243 -229
- package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js +311 -266
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +139 -119
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js +239 -203
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraGamepadInput.js +127 -114
- package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +278 -244
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js +216 -202
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.js +368 -353
- package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraTouchInput.js +185 -172
- package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraKeyboardInput.d.ts +2 -0
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js +291 -246
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +11 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.js +18 -2
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/orbitCameraPointersInput.js +112 -96
- package/Cameras/Inputs/orbitCameraPointersInput.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.d.ts +0 -2
- package/Cameras/VR/vrExperienceHelper.js +0 -2
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.pure.js +5 -0
- package/Cameras/VR/vrExperienceHelper.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1559 -1479
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Cameras/camera.pure.js +1225 -1178
- package/Cameras/camera.pure.js.map +1 -1
- package/Cameras/flyCamera.pure.js +369 -351
- package/Cameras/flyCamera.pure.js.map +1 -1
- package/Cameras/followCamera.pure.js +229 -192
- package/Cameras/followCamera.pure.js.map +1 -1
- package/Cameras/freeCamera.pure.js +373 -351
- package/Cameras/freeCamera.pure.js.map +1 -1
- package/Cameras/geospatialCamera.pure.d.ts +30 -7
- package/Cameras/geospatialCamera.pure.js +502 -457
- package/Cameras/geospatialCamera.pure.js.map +1 -1
- package/Cameras/geospatialCameraMovement.js +2 -2
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/Cameras/targetCamera.pure.d.ts +7 -0
- package/Cameras/targetCamera.pure.js +550 -509
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Cameras/universalCamera.pure.js +98 -85
- package/Cameras/universalCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +111 -4
- package/Collisions/gpuPicker.js +696 -119
- package/Collisions/gpuPicker.js.map +1 -1
- package/Compute/computeShader.pure.js +372 -355
- package/Compute/computeShader.pure.js.map +1 -1
- package/Culling/Helper/transformFeedbackBoundingHelper.pure.js +2 -2
- package/Decorators/nodeDecorator.d.ts +11 -1
- package/Decorators/nodeDecorator.js +43 -6
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js +8 -0
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +15 -0
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +7 -2
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +5 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +35 -1
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderProcessor.js +5 -3
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js +16 -3
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js +7 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js.map +1 -1
- package/Engines/abstractEngine.functions.d.ts +8 -2
- package/Engines/abstractEngine.functions.js +12 -4
- package/Engines/abstractEngine.functions.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +20 -1
- package/Engines/abstractEngine.pure.js +21 -134
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +208 -0
- package/Engines/engine.pure.js +0 -15
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nullEngine.pure.d.ts +66 -0
- package/Engines/nullEngine.pure.js +97 -0
- package/Engines/nullEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +0 -13
- package/Engines/thinEngine.pure.js +4 -23
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.d.ts +0 -1
- package/Engines/thinNativeEngine.js +0 -1
- package/Engines/thinNativeEngine.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +27 -0
- package/Engines/thinNativeEngine.pure.js +383 -17
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +9 -0
- package/Engines/webgpuEngine.pure.js +7 -0
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/flowGraph.js +9 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphContext.js +597 -584
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.pure.d.ts +14 -0
- package/FlowGraph/flowGraphDataConnection.pure.js +38 -1
- package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +11 -0
- package/FlowGraph/serialization.js +11 -1
- package/FlowGraph/serialization.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js +182 -170
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js +196 -184
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js +222 -210
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +123 -111
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +158 -146
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js +122 -110
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js +89 -77
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js +134 -122
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js +58 -46
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js +107 -95
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js +181 -169
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js +246 -234
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js +108 -96
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js +313 -301
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js +502 -490
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js +147 -135
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js +90 -78
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js +179 -167
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +462 -451
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +265 -253
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js +204 -192
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +611 -550
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js +320 -308
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js +154 -142
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js +150 -138
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js +270 -256
- package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js +95 -83
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js +715 -693
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphBlock.js +548 -533
- package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.d.ts +2 -2
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js +43 -51
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +66 -35
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
- package/Helpers/environmentHelper.js +2 -2
- package/Helpers/environmentHelper.js.map +1 -1
- package/Layers/effectLayer.js +529 -519
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.pure.js +428 -413
- package/Layers/glowLayer.pure.js.map +1 -1
- package/Layers/highlightLayer.pure.js +473 -458
- package/Layers/highlightLayer.pure.js.map +1 -1
- package/Layers/selectionOutlineLayer.pure.js +360 -345
- package/Layers/selectionOutlineLayer.pure.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.d.ts +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.js +583 -558
- package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +6 -1
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/areaLight.pure.js +61 -39
- package/Lights/areaLight.pure.js.map +1 -1
- package/Lights/directionalLight.pure.js +308 -284
- package/Lights/directionalLight.pure.js.map +1 -1
- package/Lights/hemisphericLight.pure.js +123 -104
- package/Lights/hemisphericLight.pure.js.map +1 -1
- package/Lights/light.d.ts +5 -3
- package/Lights/light.js +869 -827
- package/Lights/light.js.map +1 -1
- package/Lights/pointLight.pure.js +185 -174
- package/Lights/pointLight.pure.js.map +1 -1
- package/Lights/rectAreaLight.pure.d.ts +17 -0
- package/Lights/rectAreaLight.pure.js +238 -159
- package/Lights/rectAreaLight.pure.js.map +1 -1
- package/Lights/shadowLight.js +280 -268
- package/Lights/shadowLight.js.map +1 -1
- package/Lights/spotLight.pure.js +460 -427
- package/Lights/spotLight.pure.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.pure.js +17 -5
- package/Loading/Plugins/babylonFileLoader.pure.js.map +1 -1
- package/Loading/sceneLoader.d.ts +5 -1
- package/Loading/sceneLoader.js +299 -402
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +18 -18
- package/Materials/Background/backgroundMaterial.pure.js +949 -794
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.d.ts +15 -0
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +34 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +9 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +26 -2
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.d.ts +2 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +169 -149
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js +442 -429
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js +396 -383
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js +237 -220
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js +150 -133
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +265 -250
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js +159 -142
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +214 -201
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js +419 -400
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +3 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js +302 -289
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1327 -1272
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js +352 -337
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js +297 -277
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js +146 -131
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js +158 -145
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/clampBlock.pure.js +92 -77
- package/Materials/Node/Blocks/clampBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/cloudBlock.pure.js +145 -132
- package/Materials/Node/Blocks/cloudBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/conditionalBlock.pure.js +182 -169
- package/Materials/Node/Blocks/conditionalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/curveBlock.pure.js +259 -246
- package/Materials/Node/Blocks/curveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/debugBlock.pure.js +119 -106
- package/Materials/Node/Blocks/debugBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/loopBlock.pure.js +123 -110
- package/Materials/Node/Blocks/loopBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js +185 -172
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/remapBlock.pure.js +127 -112
- package/Materials/Node/Blocks/remapBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/transformBlock.pure.js +196 -185
- package/Materials/Node/Blocks/transformBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.pure.js +451 -438
- package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/trigonometryBlock.pure.js +184 -171
- package/Materials/Node/Blocks/trigonometryBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/waveBlock.pure.js +97 -84
- package/Materials/Node/Blocks/waveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js +276 -263
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.js +1765 -1737
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
- package/Materials/PBR/openpbrMaterial.pure.d.ts +102 -102
- package/Materials/PBR/openpbrMaterial.pure.js +3115 -2243
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrAnisotropicConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrAnisotropicConfiguration.js +255 -227
- package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBRDFConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrBRDFConfiguration.js +203 -155
- package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +1751 -1736
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +13 -13
- package/Materials/PBR/pbrBaseSimpleMaterial.js +205 -117
- package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
- package/Materials/PBR/pbrClearCoatConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrClearCoatConfiguration.js +464 -406
- package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
- package/Materials/PBR/pbrIridescenceConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrIridescenceConfiguration.js +271 -239
- package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
- package/Materials/PBR/pbrMaterial.pure.d.ts +66 -66
- package/Materials/PBR/pbrMaterial.pure.js +1041 -685
- package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js +176 -115
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSheenConfiguration.d.ts +7 -7
- package/Materials/PBR/pbrSheenConfiguration.js +314 -270
- package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js +172 -117
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +16 -16
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +864 -764
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +43 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +64 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -0
- package/Materials/Textures/HTML/htmlInteractionManager.d.ts +69 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js +130 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.d.ts +84 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js +246 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlTexture.d.ts +148 -0
- package/Materials/Textures/HTML/htmlTexture.js +455 -0
- package/Materials/Textures/HTML/htmlTexture.js.map +1 -0
- package/Materials/Textures/HTML/index.d.ts +4 -0
- package/Materials/Textures/HTML/index.js +5 -0
- package/Materials/Textures/HTML/index.js.map +1 -0
- package/Materials/Textures/HTML/pure.d.ts +5 -0
- package/Materials/Textures/HTML/pure.js +6 -0
- package/Materials/Textures/HTML/pure.js.map +1 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +671 -643
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/baseTexture.pure.js +880 -825
- package/Materials/Textures/baseTexture.pure.js.map +1 -1
- package/Materials/Textures/cubeTexture.d.ts +0 -1
- package/Materials/Textures/cubeTexture.js +0 -1
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.pure.js +368 -333
- package/Materials/Textures/cubeTexture.pure.js.map +1 -1
- package/Materials/Textures/dynamicTexture.d.ts +0 -1
- package/Materials/Textures/dynamicTexture.js +0 -1
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/dynamicTexture.pure.js +2 -0
- package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.d.ts +0 -2
- package/Materials/Textures/htmlElementTexture.js +0 -2
- package/Materials/Textures/htmlElementTexture.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.pure.js +4 -0
- package/Materials/Textures/htmlElementTexture.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -1
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.d.ts +0 -1
- package/Materials/Textures/multiRenderTarget.js +0 -1
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.pure.js +2 -0
- package/Materials/Textures/multiRenderTarget.pure.js.map +1 -1
- package/Materials/Textures/pure.d.ts +1 -0
- package/Materials/Textures/pure.js +1 -0
- package/Materials/Textures/pure.js.map +1 -1
- package/Materials/Textures/texture.pure.js +961 -923
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/Textures/videoTexture.pure.d.ts +3 -0
- package/Materials/Textures/videoTexture.pure.js +450 -401
- package/Materials/Textures/videoTexture.pure.js.map +1 -1
- package/Materials/colorCurves.pure.js +510 -477
- package/Materials/colorCurves.pure.js.map +1 -1
- package/Materials/effect.pure.js +0 -7
- package/Materials/effect.pure.js.map +1 -1
- package/Materials/imageProcessing.js +12 -4
- package/Materials/imageProcessing.js.map +1 -1
- package/Materials/imageProcessingConfiguration.pure.js +647 -587
- package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
- package/Materials/material.decalMapConfiguration.pure.d.ts +2 -2
- package/Materials/material.decalMapConfiguration.pure.js +149 -130
- package/Materials/material.decalMapConfiguration.pure.js.map +1 -1
- package/Materials/material.detailMapConfiguration.d.ts +3 -3
- package/Materials/material.detailMapConfiguration.js +213 -175
- package/Materials/material.detailMapConfiguration.js.map +1 -1
- package/Materials/material.pure.js +1815 -1721
- package/Materials/material.pure.js.map +1 -1
- package/Materials/materialPluginBase.pure.js +270 -249
- package/Materials/materialPluginBase.pure.js.map +1 -1
- package/Materials/materialPluginManager.pure.js +18 -8
- package/Materials/materialPluginManager.pure.js.map +1 -1
- package/Materials/materialStencilState.js +211 -200
- package/Materials/materialStencilState.js.map +1 -1
- package/Materials/meshDebugPluginMaterial.pure.d.ts +2 -2
- package/Materials/meshDebugPluginMaterial.pure.js +397 -275
- package/Materials/meshDebugPluginMaterial.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +32 -32
- package/Materials/standardMaterial.pure.js +1804 -1394
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Maths/math.color.pure.js +5 -5
- package/Maths/math.functions.js +38 -30
- package/Maths/math.functions.js.map +1 -1
- package/Maths/math.vector.pure.js +25 -25
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +18 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +86 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +255 -104
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.d.ts +39 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +322 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -0
- package/Meshes/GreasedLine/greasedLineMesh.pure.js +4 -4
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +107 -94
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js +276 -263
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js +247 -232
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +299 -284
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js +196 -181
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js +198 -179
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js +151 -138
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js +107 -94
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js +213 -200
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js +179 -164
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js +183 -170
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js +125 -112
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js +153 -140
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js +133 -120
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js +128 -115
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js +116 -103
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js +160 -147
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js +144 -131
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js +200 -185
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/bevelBlock.pure.js +111 -98
- package/Meshes/Node/Blocks/bevelBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +182 -165
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js +89 -76
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.pure.js +184 -169
- package/Meshes/Node/Blocks/conditionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js +270 -255
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js +172 -159
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js +230 -217
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js +256 -245
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +206 -189
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js +166 -153
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js +221 -208
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +150 -137
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mathBlock.pure.js +269 -256
- package/Meshes/Node/Blocks/mathBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js +141 -128
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/randomBlock.pure.js +161 -148
- package/Meshes/Node/Blocks/randomBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/subdivideBlock.pure.js +102 -87
- package/Meshes/Node/Blocks/subdivideBlock.pure.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +560 -538
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +473 -458
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +2218 -2207
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/geometry.js +30 -15
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.pure.js +26 -14
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/mesh.vertexData.js +1665 -1655
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/transformNode.pure.js +1400 -1372
- package/Meshes/transformNode.pure.js.map +1 -1
- package/Misc/decorators.d.ts +34 -19
- package/Misc/decorators.functions.d.ts +33 -2
- package/Misc/decorators.functions.js +114 -35
- package/Misc/decorators.functions.js.map +1 -1
- package/Misc/decorators.js +96 -68
- package/Misc/decorators.js.map +1 -1
- package/Misc/decorators.serialization.js +47 -40
- package/Misc/decorators.serialization.js.map +1 -1
- package/Misc/decorators.serializationUtilities.d.ts +24 -0
- package/Misc/decorators.serializationUtilities.js +20 -0
- package/Misc/decorators.serializationUtilities.js.map +1 -0
- package/Misc/dumpTools.pure.js +43 -33
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/fileTools.pure.js +8 -0
- package/Misc/fileTools.pure.js.map +1 -1
- package/Misc/observable.pure.js +0 -7
- package/Misc/observable.pure.js.map +1 -1
- package/Misc/snapshotRenderingHelper.d.ts +4 -1
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/symbolMetadataPolyfill.d.ts +11 -0
- package/Misc/symbolMetadataPolyfill.js +22 -0
- package/Misc/symbolMetadataPolyfill.js.map +1 -0
- package/Misc/tools.pure.js +2 -2
- package/Misc/tools.pure.js.map +1 -1
- package/Morph/morphTarget.js +382 -365
- package/Morph/morphTarget.js.map +1 -1
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js +160 -145
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js +187 -174
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js +238 -219
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js +140 -115
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js +157 -144
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js +133 -119
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js +93 -80
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleDebugBlock.pure.js +117 -105
- package/Particles/Node/Blocks/particleDebugBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js +105 -92
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js +82 -69
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js +113 -101
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +278 -265
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js +155 -142
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleRandomBlock.pure.js +156 -143
- package/Particles/Node/Blocks/particleRandomBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js +217 -204
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js +106 -93
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.js +366 -330
- package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
- package/Particles/Node/nodeParticleBlock.js +339 -324
- package/Particles/Node/nodeParticleBlock.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.js +494 -473
- package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +0 -1
- package/Particles/gpuParticleSystem.js +0 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +4 -3
- package/Particles/gpuParticleSystem.pure.js +27 -16
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particleSystem.pure.js +57 -2
- package/Particles/particleSystem.pure.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +0 -1
- package/Particles/thinParticleSystem.js +0 -1
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.pure.js +2 -0
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Particles/webgl2ParticleSystem.pure.js +2 -0
- package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
- package/Physics/v1/physicsImpostor.pure.js +4 -4
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +675 -656
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js +521 -486
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js +241 -220
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js +852 -835
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js +1135 -1073
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js +319 -303
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +212 -199
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.pure.js +67 -55
- package/PostProcesses/blackAndWhitePostProcess.pure.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.pure.js +74 -62
- package/PostProcesses/bloomMergePostProcess.pure.js.map +1 -1
- package/PostProcesses/blurPostProcess.pure.js +127 -115
- package/PostProcesses/blurPostProcess.pure.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.pure.js +130 -118
- package/PostProcesses/chromaticAberrationPostProcess.pure.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.pure.js +115 -104
- package/PostProcesses/circleOfConfusionPostProcess.pure.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.pure.js +55 -43
- package/PostProcesses/colorCorrectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.pure.js +96 -84
- package/PostProcesses/convolutionPostProcess.pure.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.pure.js +68 -57
- package/PostProcesses/extractHighlightsPostProcess.pure.js.map +1 -1
- package/PostProcesses/filterPostProcess.pure.js +66 -54
- package/PostProcesses/filterPostProcess.pure.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.pure.js.map +1 -1
- package/PostProcesses/grainPostProcess.pure.js +82 -70
- package/PostProcesses/grainPostProcess.pure.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js +334 -322
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.pure.js +246 -235
- package/PostProcesses/motionBlurPostProcess.pure.js.map +1 -1
- package/PostProcesses/passPostProcess.pure.js +75 -63
- package/PostProcesses/passPostProcess.pure.js.map +1 -1
- package/PostProcesses/postProcess.pure.js +899 -835
- package/PostProcesses/postProcess.pure.js.map +1 -1
- package/PostProcesses/refractionPostProcess.pure.js +114 -87
- package/PostProcesses/refractionPostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +108 -96
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js +241 -220
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +86 -74
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.pure.js +82 -70
- package/PostProcesses/tonemapPostProcess.pure.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +500 -465
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js +2 -0
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js.map +1 -1
- package/Probes/reflectionProbe.pure.js +238 -224
- package/Probes/reflectionProbe.pure.js.map +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.d.ts +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.js +138 -105
- package/Rendering/GlobalIllumination/giRSMManager.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +155 -138
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +5 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +1 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +34 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/edgesRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +0 -2
- package/Rendering/prePassRenderer.js +0 -2
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +2 -0
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Rendering/reflectiveShadowMap.pure.d.ts +1 -1
- package/Rendering/reflectiveShadowMap.pure.js +151 -130
- package/Rendering/reflectiveShadowMap.pure.js.map +1 -1
- package/Rendering/thinDepthPeelingRenderer.d.ts +0 -1
- package/Rendering/thinDepthPeelingRenderer.js +0 -1
- package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +1 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +35 -5
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.js +17 -1
- package/Shaders/gaussianSplatting.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +1 -1
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
- package/Shaders/picking.fragment.js +39 -3
- package/Shaders/picking.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +3 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +39 -7
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +4 -3
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js +14 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/lightingVolume.compute.js +2 -2
- package/ShadersWGSL/lightingVolume.compute.js.map +1 -1
- package/ShadersWGSL/picking.fragment.js +22 -1
- package/ShadersWGSL/picking.fragment.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +3 -2
- package/XR/features/Layers/WebXRCompositionLayer.js +2 -2
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +59 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +120 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.d.ts +25 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js +69 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js.map +1 -0
- package/XR/features/WebXRLayers.pure.d.ts +8 -0
- package/XR/features/WebXRLayers.pure.js +43 -6
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/native/nativeXRRenderTarget.d.ts +2 -2
- package/XR/native/nativeXRRenderTarget.js +2 -2
- package/XR/native/nativeXRRenderTarget.js.map +1 -1
- package/XR/webXRExperienceHelper.js +10 -1
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRGraphicsBinding.d.ts +90 -0
- package/XR/webXRGraphicsBinding.js +85 -0
- package/XR/webXRGraphicsBinding.js.map +1 -0
- package/XR/webXRLayerRenderTargetTexture.d.ts +24 -0
- package/XR/webXRLayerRenderTargetTexture.js +30 -0
- package/XR/webXRLayerRenderTargetTexture.js.map +1 -0
- package/XR/webXRManagedOutputCanvas.d.ts +14 -0
- package/XR/webXRManagedOutputCanvas.js +24 -5
- package/XR/webXRManagedOutputCanvas.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +25 -4
- package/XR/webXRRenderTargetTextureProvider.js +33 -35
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +11 -0
- package/XR/webXRSessionManager.js +37 -0
- package/XR/webXRSessionManager.js.map +1 -1
- package/XR/webXRTypes.d.ts +9 -6
- package/XR/webXRTypes.js.map +1 -1
- package/XR/webXRWebGLLayer.d.ts +2 -2
- package/XR/webXRWebGLLayer.js +2 -2
- package/XR/webXRWebGLLayer.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +12 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js +58 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +69 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js +148 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/node.js +878 -845
- package/node.js.map +1 -1
- package/package.json +8 -14
- package/scene.pure.d.ts +12 -0
- package/scene.pure.js +36 -0
- package/scene.pure.js.map +1 -1
- package/tslib.es6.js +304 -150
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** This file must only contain pure code and pure imports */
|
|
2
|
-
import {
|
|
2
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers } from "../../tslib.es6.js";
|
|
3
3
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
4
4
|
import { serialize, serializeAsColor3, expandToProperty, serializeAsTexture, serializeAsVector3 } from "../../Misc/decorators.js";
|
|
5
5
|
import { SmartArray } from "../../Misc/smartArray.js";
|
|
@@ -9,7 +9,7 @@ import { VertexBuffer } from "../../Buffers/buffer.pure.js";
|
|
|
9
9
|
import { MaterialDefines } from "../../Materials/materialDefines.js";
|
|
10
10
|
import { PushMaterial } from "../../Materials/pushMaterial.js";
|
|
11
11
|
import { ImageProcessingDefinesMixin } from "../../Materials/imageProcessingConfiguration.defines.js";
|
|
12
|
-
import { ImageProcessingConfiguration } from "../../Materials/imageProcessingConfiguration.pure.js";
|
|
12
|
+
import { ImageProcessingConfiguration, RegisterImageProcessingConfiguration } from "../../Materials/imageProcessingConfiguration.pure.js";
|
|
13
13
|
|
|
14
14
|
import { MaterialFlags } from "../materialFlags.js";
|
|
15
15
|
import { Color3 } from "../../Maths/math.color.pure.js";
|
|
@@ -180,837 +180,990 @@ class BackgroundMaterialBase extends ImageProcessingMixin(PushMaterial) {
|
|
|
180
180
|
* Background material used to create an efficient environment around your scene.
|
|
181
181
|
* #157MGZ: simple test
|
|
182
182
|
*/
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
*/
|
|
322
|
-
this.reflectionAmount = 1.0;
|
|
323
|
-
/**
|
|
324
|
-
* This specifies the weight of the reflection at grazing angle.
|
|
325
|
-
*/
|
|
326
|
-
this.reflectionReflectance0 = 0.05;
|
|
327
|
-
/**
|
|
328
|
-
* This specifies the weight of the reflection at a perpendicular point of view.
|
|
329
|
-
*/
|
|
330
|
-
this.reflectionReflectance90 = 0.5;
|
|
331
|
-
/**
|
|
332
|
-
* Helps to directly use the maps channels instead of their level.
|
|
333
|
-
*/
|
|
334
|
-
this.useRGBColor = true;
|
|
335
|
-
/**
|
|
336
|
-
* This helps reducing the banding effect that could occur on the background.
|
|
337
|
-
*/
|
|
338
|
-
this.enableNoise = false;
|
|
339
|
-
this._fovMultiplier = 1.0;
|
|
340
|
-
/**
|
|
341
|
-
* Enable the FOV adjustment feature controlled by fovMultiplier.
|
|
342
|
-
*/
|
|
343
|
-
this.useEquirectangularFOV = false;
|
|
344
|
-
this._maxSimultaneousLights = 4;
|
|
345
|
-
/**
|
|
346
|
-
* Number of Simultaneous lights allowed on the material.
|
|
347
|
-
*/
|
|
348
|
-
this.maxSimultaneousLights = 4;
|
|
349
|
-
this._shadowOnly = false;
|
|
350
|
-
/**
|
|
351
|
-
* Make the material only render shadows
|
|
352
|
-
*/
|
|
353
|
-
this.shadowOnly = false;
|
|
354
|
-
/**
|
|
355
|
-
* Due to a bug in iOS10, video tags (which are using the background material) are in BGR and not RGB.
|
|
356
|
-
* Setting this flag to true (not done automatically!) will convert it back to RGB.
|
|
357
|
-
*/
|
|
358
|
-
this.switchToBGR = false;
|
|
359
|
-
this._enableGroundProjection = false;
|
|
360
|
-
/**
|
|
361
|
-
* Enables the ground projection mode on the material.
|
|
362
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection
|
|
363
|
-
*/
|
|
364
|
-
this.enableGroundProjection = false;
|
|
365
|
-
/**
|
|
366
|
-
* Defines the radius of the projected ground if enableGroundProjection is true.
|
|
367
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection
|
|
368
|
-
*/
|
|
369
|
-
this.projectedGroundRadius = 1000;
|
|
370
|
-
/**
|
|
371
|
-
* Defines the height of the projected ground if enableGroundProjection is true.
|
|
372
|
-
* @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection
|
|
373
|
-
*/
|
|
374
|
-
this.projectedGroundHeight = 10;
|
|
375
|
-
// Temp values kept as cache in the material.
|
|
376
|
-
this._renderTargets = new SmartArray(16);
|
|
377
|
-
this._reflectionControls = Vector4.Zero();
|
|
378
|
-
this._white = Color3.White();
|
|
379
|
-
this._primaryShadowColor = Color3.Black();
|
|
380
|
-
this._primaryHighlightColor = Color3.Black();
|
|
381
|
-
this._shadersLoaded = false;
|
|
382
|
-
// Setup the default processing configuration to the scene.
|
|
383
|
-
this._attachImageProcessingConfiguration(null);
|
|
384
|
-
this.getRenderTargetTextures = () => {
|
|
385
|
-
this._renderTargets.reset();
|
|
386
|
-
if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {
|
|
387
|
-
this._renderTargets.push(this._diffuseTexture);
|
|
183
|
+
let BackgroundMaterial = (() => {
|
|
184
|
+
var _a, _BackgroundMaterial_primaryColor_accessor_storage, _BackgroundMaterial_reflectionTexture_accessor_storage, _BackgroundMaterial_reflectionBlur_accessor_storage, _BackgroundMaterial_diffuseTexture_accessor_storage, _BackgroundMaterial_shadowLights_accessor_storage, _BackgroundMaterial_shadowLevel_accessor_storage, _BackgroundMaterial_sceneCenter_accessor_storage, _BackgroundMaterial_opacityFresnel_accessor_storage, _BackgroundMaterial_reflectionFresnel_accessor_storage, _BackgroundMaterial_reflectionFalloffDistance_accessor_storage, _BackgroundMaterial_reflectionAmount_accessor_storage, _BackgroundMaterial_reflectionReflectance0_accessor_storage, _BackgroundMaterial_reflectionReflectance90_accessor_storage, _BackgroundMaterial_useRGBColor_accessor_storage, _BackgroundMaterial_enableNoise_accessor_storage, _BackgroundMaterial_maxSimultaneousLights_accessor_storage, _BackgroundMaterial_shadowOnly_accessor_storage, _BackgroundMaterial_enableGroundProjection_accessor_storage;
|
|
185
|
+
let _classSuper = BackgroundMaterialBase;
|
|
186
|
+
let __primaryColor_decorators;
|
|
187
|
+
let __primaryColor_initializers = [];
|
|
188
|
+
let __primaryColor_extraInitializers = [];
|
|
189
|
+
let _primaryColor_decorators;
|
|
190
|
+
let _primaryColor_initializers = [];
|
|
191
|
+
let _primaryColor_extraInitializers = [];
|
|
192
|
+
let ___perceptualColor_decorators;
|
|
193
|
+
let ___perceptualColor_initializers = [];
|
|
194
|
+
let ___perceptualColor_extraInitializers = [];
|
|
195
|
+
let __primaryColorShadowLevel_decorators;
|
|
196
|
+
let __primaryColorShadowLevel_initializers = [];
|
|
197
|
+
let __primaryColorShadowLevel_extraInitializers = [];
|
|
198
|
+
let __primaryColorHighlightLevel_decorators;
|
|
199
|
+
let __primaryColorHighlightLevel_initializers = [];
|
|
200
|
+
let __primaryColorHighlightLevel_extraInitializers = [];
|
|
201
|
+
let __reflectionTexture_decorators;
|
|
202
|
+
let __reflectionTexture_initializers = [];
|
|
203
|
+
let __reflectionTexture_extraInitializers = [];
|
|
204
|
+
let _reflectionTexture_decorators;
|
|
205
|
+
let _reflectionTexture_initializers = [];
|
|
206
|
+
let _reflectionTexture_extraInitializers = [];
|
|
207
|
+
let __reflectionBlur_decorators;
|
|
208
|
+
let __reflectionBlur_initializers = [];
|
|
209
|
+
let __reflectionBlur_extraInitializers = [];
|
|
210
|
+
let _reflectionBlur_decorators;
|
|
211
|
+
let _reflectionBlur_initializers = [];
|
|
212
|
+
let _reflectionBlur_extraInitializers = [];
|
|
213
|
+
let __diffuseTexture_decorators;
|
|
214
|
+
let __diffuseTexture_initializers = [];
|
|
215
|
+
let __diffuseTexture_extraInitializers = [];
|
|
216
|
+
let _diffuseTexture_decorators;
|
|
217
|
+
let _diffuseTexture_initializers = [];
|
|
218
|
+
let _diffuseTexture_extraInitializers = [];
|
|
219
|
+
let _shadowLights_decorators;
|
|
220
|
+
let _shadowLights_initializers = [];
|
|
221
|
+
let _shadowLights_extraInitializers = [];
|
|
222
|
+
let __shadowLevel_decorators;
|
|
223
|
+
let __shadowLevel_initializers = [];
|
|
224
|
+
let __shadowLevel_extraInitializers = [];
|
|
225
|
+
let _shadowLevel_decorators;
|
|
226
|
+
let _shadowLevel_initializers = [];
|
|
227
|
+
let _shadowLevel_extraInitializers = [];
|
|
228
|
+
let __sceneCenter_decorators;
|
|
229
|
+
let __sceneCenter_initializers = [];
|
|
230
|
+
let __sceneCenter_extraInitializers = [];
|
|
231
|
+
let _sceneCenter_decorators;
|
|
232
|
+
let _sceneCenter_initializers = [];
|
|
233
|
+
let _sceneCenter_extraInitializers = [];
|
|
234
|
+
let __opacityFresnel_decorators;
|
|
235
|
+
let __opacityFresnel_initializers = [];
|
|
236
|
+
let __opacityFresnel_extraInitializers = [];
|
|
237
|
+
let _opacityFresnel_decorators;
|
|
238
|
+
let _opacityFresnel_initializers = [];
|
|
239
|
+
let _opacityFresnel_extraInitializers = [];
|
|
240
|
+
let __reflectionFresnel_decorators;
|
|
241
|
+
let __reflectionFresnel_initializers = [];
|
|
242
|
+
let __reflectionFresnel_extraInitializers = [];
|
|
243
|
+
let _reflectionFresnel_decorators;
|
|
244
|
+
let _reflectionFresnel_initializers = [];
|
|
245
|
+
let _reflectionFresnel_extraInitializers = [];
|
|
246
|
+
let __reflectionFalloffDistance_decorators;
|
|
247
|
+
let __reflectionFalloffDistance_initializers = [];
|
|
248
|
+
let __reflectionFalloffDistance_extraInitializers = [];
|
|
249
|
+
let _reflectionFalloffDistance_decorators;
|
|
250
|
+
let _reflectionFalloffDistance_initializers = [];
|
|
251
|
+
let _reflectionFalloffDistance_extraInitializers = [];
|
|
252
|
+
let __reflectionAmount_decorators;
|
|
253
|
+
let __reflectionAmount_initializers = [];
|
|
254
|
+
let __reflectionAmount_extraInitializers = [];
|
|
255
|
+
let _reflectionAmount_decorators;
|
|
256
|
+
let _reflectionAmount_initializers = [];
|
|
257
|
+
let _reflectionAmount_extraInitializers = [];
|
|
258
|
+
let __reflectionReflectance0_decorators;
|
|
259
|
+
let __reflectionReflectance0_initializers = [];
|
|
260
|
+
let __reflectionReflectance0_extraInitializers = [];
|
|
261
|
+
let _reflectionReflectance0_decorators;
|
|
262
|
+
let _reflectionReflectance0_initializers = [];
|
|
263
|
+
let _reflectionReflectance0_extraInitializers = [];
|
|
264
|
+
let __reflectionReflectance90_decorators;
|
|
265
|
+
let __reflectionReflectance90_initializers = [];
|
|
266
|
+
let __reflectionReflectance90_extraInitializers = [];
|
|
267
|
+
let _reflectionReflectance90_decorators;
|
|
268
|
+
let _reflectionReflectance90_initializers = [];
|
|
269
|
+
let _reflectionReflectance90_extraInitializers = [];
|
|
270
|
+
let __useRGBColor_decorators;
|
|
271
|
+
let __useRGBColor_initializers = [];
|
|
272
|
+
let __useRGBColor_extraInitializers = [];
|
|
273
|
+
let _useRGBColor_decorators;
|
|
274
|
+
let _useRGBColor_initializers = [];
|
|
275
|
+
let _useRGBColor_extraInitializers = [];
|
|
276
|
+
let __enableNoise_decorators;
|
|
277
|
+
let __enableNoise_initializers = [];
|
|
278
|
+
let __enableNoise_extraInitializers = [];
|
|
279
|
+
let _enableNoise_decorators;
|
|
280
|
+
let _enableNoise_initializers = [];
|
|
281
|
+
let _enableNoise_extraInitializers = [];
|
|
282
|
+
let __maxSimultaneousLights_decorators;
|
|
283
|
+
let __maxSimultaneousLights_initializers = [];
|
|
284
|
+
let __maxSimultaneousLights_extraInitializers = [];
|
|
285
|
+
let _maxSimultaneousLights_decorators;
|
|
286
|
+
let _maxSimultaneousLights_initializers = [];
|
|
287
|
+
let _maxSimultaneousLights_extraInitializers = [];
|
|
288
|
+
let __shadowOnly_decorators;
|
|
289
|
+
let __shadowOnly_initializers = [];
|
|
290
|
+
let __shadowOnly_extraInitializers = [];
|
|
291
|
+
let _shadowOnly_decorators;
|
|
292
|
+
let _shadowOnly_initializers = [];
|
|
293
|
+
let _shadowOnly_extraInitializers = [];
|
|
294
|
+
let _enableGroundProjection_decorators;
|
|
295
|
+
let _enableGroundProjection_initializers = [];
|
|
296
|
+
let _enableGroundProjection_extraInitializers = [];
|
|
297
|
+
let _projectedGroundRadius_decorators;
|
|
298
|
+
let _projectedGroundRadius_initializers = [];
|
|
299
|
+
let _projectedGroundRadius_extraInitializers = [];
|
|
300
|
+
let _projectedGroundHeight_decorators;
|
|
301
|
+
let _projectedGroundHeight_initializers = [];
|
|
302
|
+
let _projectedGroundHeight_extraInitializers = [];
|
|
303
|
+
return _a = class BackgroundMaterial extends _classSuper {
|
|
304
|
+
/**
|
|
305
|
+
* Key light Color (multiply against the environment texture)
|
|
306
|
+
*/
|
|
307
|
+
get primaryColor() { return __classPrivateFieldGet(this, _BackgroundMaterial_primaryColor_accessor_storage, "f"); }
|
|
308
|
+
set primaryColor(value) { __classPrivateFieldSet(this, _BackgroundMaterial_primaryColor_accessor_storage, value, "f"); }
|
|
309
|
+
/**
|
|
310
|
+
* Experimental Internal Use Only.
|
|
311
|
+
*
|
|
312
|
+
* Key light Color in "perceptual value" meaning the color you would like to see on screen.
|
|
313
|
+
* This acts as a helper to set the primary color to a more "human friendly" value.
|
|
314
|
+
* Conversion to linear space as well as exposure and tone mapping correction will be applied to keep the
|
|
315
|
+
* output color as close as possible from the chosen value.
|
|
316
|
+
* (This does not account for contrast color grading and color curves as they are considered post effect and not directly
|
|
317
|
+
* part of lighting setup.)
|
|
318
|
+
*/
|
|
319
|
+
get _perceptualColor() {
|
|
320
|
+
return this.__perceptualColor;
|
|
388
321
|
}
|
|
389
|
-
|
|
390
|
-
this.
|
|
322
|
+
set _perceptualColor(value) {
|
|
323
|
+
this.__perceptualColor = value;
|
|
324
|
+
this._computePrimaryColorFromPerceptualColor();
|
|
325
|
+
this._markAllSubMeshesAsLightsDirty();
|
|
391
326
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
327
|
+
/**
|
|
328
|
+
* Defines the level of the shadows (dark area of the reflection map) in order to help scaling the colors.
|
|
329
|
+
* The color opposite to the primary color is used at the level chosen to define what the black area would look.
|
|
330
|
+
*/
|
|
331
|
+
get primaryColorShadowLevel() {
|
|
332
|
+
return this._primaryColorShadowLevel;
|
|
333
|
+
}
|
|
334
|
+
set primaryColorShadowLevel(value) {
|
|
335
|
+
this._primaryColorShadowLevel = value;
|
|
336
|
+
this._computePrimaryColors();
|
|
337
|
+
this._markAllSubMeshesAsLightsDirty();
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Defines the level of the highlights (highlight area of the reflection map) in order to help scaling the colors.
|
|
341
|
+
* The primary color is used at the level chosen to define what the white area would look.
|
|
342
|
+
*/
|
|
343
|
+
get primaryColorHighlightLevel() {
|
|
344
|
+
return this._primaryColorHighlightLevel;
|
|
345
|
+
}
|
|
346
|
+
set primaryColorHighlightLevel(value) {
|
|
347
|
+
this._primaryColorHighlightLevel = value;
|
|
348
|
+
this._computePrimaryColors();
|
|
349
|
+
this._markAllSubMeshesAsLightsDirty();
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Reflection Texture used in the material.
|
|
353
|
+
* Should be author in a specific way for the best result (refer to the documentation).
|
|
354
|
+
*/
|
|
355
|
+
get reflectionTexture() { return __classPrivateFieldGet(this, _BackgroundMaterial_reflectionTexture_accessor_storage, "f"); }
|
|
356
|
+
set reflectionTexture(value) { __classPrivateFieldSet(this, _BackgroundMaterial_reflectionTexture_accessor_storage, value, "f"); }
|
|
357
|
+
/**
|
|
358
|
+
* Reflection Texture level of blur.
|
|
359
|
+
*
|
|
360
|
+
* Can be use to reuse an existing HDR Texture and target a specific LOD to prevent authoring the
|
|
361
|
+
* texture twice.
|
|
362
|
+
*/
|
|
363
|
+
get reflectionBlur() { return __classPrivateFieldGet(this, _BackgroundMaterial_reflectionBlur_accessor_storage, "f"); }
|
|
364
|
+
set reflectionBlur(value) { __classPrivateFieldSet(this, _BackgroundMaterial_reflectionBlur_accessor_storage, value, "f"); }
|
|
365
|
+
/**
|
|
366
|
+
* Diffuse Texture used in the material.
|
|
367
|
+
* Should be author in a specific way for the best result (refer to the documentation).
|
|
368
|
+
*/
|
|
369
|
+
get diffuseTexture() { return __classPrivateFieldGet(this, _BackgroundMaterial_diffuseTexture_accessor_storage, "f"); }
|
|
370
|
+
set diffuseTexture(value) { __classPrivateFieldSet(this, _BackgroundMaterial_diffuseTexture_accessor_storage, value, "f"); }
|
|
371
|
+
/**
|
|
372
|
+
* Specify the list of lights casting shadow on the material.
|
|
373
|
+
* All scene shadow lights will be included if null.
|
|
374
|
+
*/
|
|
375
|
+
get shadowLights() { return __classPrivateFieldGet(this, _BackgroundMaterial_shadowLights_accessor_storage, "f"); }
|
|
376
|
+
set shadowLights(value) { __classPrivateFieldSet(this, _BackgroundMaterial_shadowLights_accessor_storage, value, "f"); }
|
|
377
|
+
/**
|
|
378
|
+
* Helps adjusting the shadow to a softer level if required.
|
|
379
|
+
* 0 means black shadows and 1 means no shadows.
|
|
380
|
+
*/
|
|
381
|
+
get shadowLevel() { return __classPrivateFieldGet(this, _BackgroundMaterial_shadowLevel_accessor_storage, "f"); }
|
|
382
|
+
set shadowLevel(value) { __classPrivateFieldSet(this, _BackgroundMaterial_shadowLevel_accessor_storage, value, "f"); }
|
|
383
|
+
/**
|
|
384
|
+
* In case of opacity Fresnel or reflection falloff, this is use as a scene center.
|
|
385
|
+
* It is usually zero but might be interesting to modify according to your setup.
|
|
386
|
+
*/
|
|
387
|
+
get sceneCenter() { return __classPrivateFieldGet(this, _BackgroundMaterial_sceneCenter_accessor_storage, "f"); }
|
|
388
|
+
set sceneCenter(value) { __classPrivateFieldSet(this, _BackgroundMaterial_sceneCenter_accessor_storage, value, "f"); }
|
|
389
|
+
/**
|
|
390
|
+
* This helps specifying that the material is falling off to the sky box at grazing angle.
|
|
391
|
+
* This helps ensuring a nice transition when the camera goes under the ground.
|
|
392
|
+
*/
|
|
393
|
+
get opacityFresnel() { return __classPrivateFieldGet(this, _BackgroundMaterial_opacityFresnel_accessor_storage, "f"); }
|
|
394
|
+
set opacityFresnel(value) { __classPrivateFieldSet(this, _BackgroundMaterial_opacityFresnel_accessor_storage, value, "f"); }
|
|
395
|
+
/**
|
|
396
|
+
* This helps specifying that the material is falling off from diffuse to the reflection texture at grazing angle.
|
|
397
|
+
* This helps adding a mirror texture on the ground.
|
|
398
|
+
*/
|
|
399
|
+
get reflectionFresnel() { return __classPrivateFieldGet(this, _BackgroundMaterial_reflectionFresnel_accessor_storage, "f"); }
|
|
400
|
+
set reflectionFresnel(value) { __classPrivateFieldSet(this, _BackgroundMaterial_reflectionFresnel_accessor_storage, value, "f"); }
|
|
401
|
+
/**
|
|
402
|
+
* This helps specifying the falloff radius off the reflection texture from the sceneCenter.
|
|
403
|
+
* This helps adding a nice falloff effect to the reflection if used as a mirror for instance.
|
|
404
|
+
*/
|
|
405
|
+
get reflectionFalloffDistance() { return __classPrivateFieldGet(this, _BackgroundMaterial_reflectionFalloffDistance_accessor_storage, "f"); }
|
|
406
|
+
set reflectionFalloffDistance(value) { __classPrivateFieldSet(this, _BackgroundMaterial_reflectionFalloffDistance_accessor_storage, value, "f"); }
|
|
407
|
+
/**
|
|
408
|
+
* This specifies the weight of the reflection against the background in case of reflection Fresnel.
|
|
409
|
+
*/
|
|
410
|
+
get reflectionAmount() { return __classPrivateFieldGet(this, _BackgroundMaterial_reflectionAmount_accessor_storage, "f"); }
|
|
411
|
+
set reflectionAmount(value) { __classPrivateFieldSet(this, _BackgroundMaterial_reflectionAmount_accessor_storage, value, "f"); }
|
|
412
|
+
/**
|
|
413
|
+
* This specifies the weight of the reflection at grazing angle.
|
|
414
|
+
*/
|
|
415
|
+
get reflectionReflectance0() { return __classPrivateFieldGet(this, _BackgroundMaterial_reflectionReflectance0_accessor_storage, "f"); }
|
|
416
|
+
set reflectionReflectance0(value) { __classPrivateFieldSet(this, _BackgroundMaterial_reflectionReflectance0_accessor_storage, value, "f"); }
|
|
417
|
+
/**
|
|
418
|
+
* This specifies the weight of the reflection at a perpendicular point of view.
|
|
419
|
+
*/
|
|
420
|
+
get reflectionReflectance90() { return __classPrivateFieldGet(this, _BackgroundMaterial_reflectionReflectance90_accessor_storage, "f"); }
|
|
421
|
+
set reflectionReflectance90(value) { __classPrivateFieldSet(this, _BackgroundMaterial_reflectionReflectance90_accessor_storage, value, "f"); }
|
|
422
|
+
/**
|
|
423
|
+
* Sets the reflection reflectance fresnel values according to the default standard
|
|
424
|
+
* empirically know to work well :-)
|
|
425
|
+
*/
|
|
426
|
+
set reflectionStandardFresnelWeight(value) {
|
|
427
|
+
let reflectionWeight = value;
|
|
428
|
+
if (reflectionWeight < 0.5) {
|
|
429
|
+
reflectionWeight = reflectionWeight * 2.0;
|
|
430
|
+
this.reflectionReflectance0 = _a.StandardReflectance0 * reflectionWeight;
|
|
431
|
+
this.reflectionReflectance90 = _a.StandardReflectance90 * reflectionWeight;
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
reflectionWeight = reflectionWeight * 2.0 - 1.0;
|
|
435
|
+
this.reflectionReflectance0 = _a.StandardReflectance0 + (1.0 - _a.StandardReflectance0) * reflectionWeight;
|
|
436
|
+
this.reflectionReflectance90 = _a.StandardReflectance90 + (1.0 - _a.StandardReflectance90) * reflectionWeight;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Helps to directly use the maps channels instead of their level.
|
|
441
|
+
*/
|
|
442
|
+
get useRGBColor() { return __classPrivateFieldGet(this, _BackgroundMaterial_useRGBColor_accessor_storage, "f"); }
|
|
443
|
+
set useRGBColor(value) { __classPrivateFieldSet(this, _BackgroundMaterial_useRGBColor_accessor_storage, value, "f"); }
|
|
444
|
+
/**
|
|
445
|
+
* This helps reducing the banding effect that could occur on the background.
|
|
446
|
+
*/
|
|
447
|
+
get enableNoise() { return __classPrivateFieldGet(this, _BackgroundMaterial_enableNoise_accessor_storage, "f"); }
|
|
448
|
+
set enableNoise(value) { __classPrivateFieldSet(this, _BackgroundMaterial_enableNoise_accessor_storage, value, "f"); }
|
|
449
|
+
/**
|
|
450
|
+
* The current fov(field of view) multiplier, 0.0 - 2.0. Defaults to 1.0. Lower values "zoom in" and higher values "zoom out".
|
|
451
|
+
* Best used when trying to implement visual zoom effects like fish-eye or binoculars while not adjusting camera fov.
|
|
452
|
+
* Recommended to be keep at 1.0 except for special cases.
|
|
453
|
+
*/
|
|
454
|
+
get fovMultiplier() {
|
|
455
|
+
return this._fovMultiplier;
|
|
456
|
+
}
|
|
457
|
+
set fovMultiplier(value) {
|
|
458
|
+
if (isNaN(value)) {
|
|
459
|
+
value = 1.0;
|
|
460
|
+
}
|
|
461
|
+
this._fovMultiplier = Math.max(0.0, Math.min(2.0, value));
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Number of Simultaneous lights allowed on the material.
|
|
465
|
+
*/
|
|
466
|
+
get maxSimultaneousLights() { return __classPrivateFieldGet(this, _BackgroundMaterial_maxSimultaneousLights_accessor_storage, "f"); }
|
|
467
|
+
set maxSimultaneousLights(value) { __classPrivateFieldSet(this, _BackgroundMaterial_maxSimultaneousLights_accessor_storage, value, "f"); }
|
|
468
|
+
/**
|
|
469
|
+
* Make the material only render shadows
|
|
470
|
+
*/
|
|
471
|
+
get shadowOnly() { return __classPrivateFieldGet(this, _BackgroundMaterial_shadowOnly_accessor_storage, "f"); }
|
|
472
|
+
set shadowOnly(value) { __classPrivateFieldSet(this, _BackgroundMaterial_shadowOnly_accessor_storage, value, "f"); }
|
|
473
|
+
/**
|
|
474
|
+
* Enables the ground projection mode on the material.
|
|
475
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection
|
|
476
|
+
*/
|
|
477
|
+
get enableGroundProjection() { return __classPrivateFieldGet(this, _BackgroundMaterial_enableGroundProjection_accessor_storage, "f"); }
|
|
478
|
+
set enableGroundProjection(value) { __classPrivateFieldSet(this, _BackgroundMaterial_enableGroundProjection_accessor_storage, value, "f"); }
|
|
479
|
+
/**
|
|
480
|
+
* Instantiates a Background Material in the given scene
|
|
481
|
+
* @param name The friendly name of the material
|
|
482
|
+
* @param scene The scene to add the material to
|
|
483
|
+
* @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
|
|
484
|
+
*/
|
|
485
|
+
constructor(name, scene, forceGLSL = false) {
|
|
486
|
+
super(name, scene, undefined, forceGLSL);
|
|
487
|
+
this._primaryColor = __runInitializers(this, __primaryColor_initializers, void 0);
|
|
488
|
+
_BackgroundMaterial_primaryColor_accessor_storage.set(this, (__runInitializers(this, __primaryColor_extraInitializers), __runInitializers(this, _primaryColor_initializers, Color3.White())));
|
|
489
|
+
this.__perceptualColor = (__runInitializers(this, _primaryColor_extraInitializers), __runInitializers(this, ___perceptualColor_initializers, void 0));
|
|
490
|
+
this._primaryColorShadowLevel = (__runInitializers(this, ___perceptualColor_extraInitializers), __runInitializers(this, __primaryColorShadowLevel_initializers, 0));
|
|
491
|
+
this._primaryColorHighlightLevel = (__runInitializers(this, __primaryColorShadowLevel_extraInitializers), __runInitializers(this, __primaryColorHighlightLevel_initializers, 0));
|
|
492
|
+
this._reflectionTexture = (__runInitializers(this, __primaryColorHighlightLevel_extraInitializers), __runInitializers(this, __reflectionTexture_initializers, void 0));
|
|
493
|
+
_BackgroundMaterial_reflectionTexture_accessor_storage.set(this, (__runInitializers(this, __reflectionTexture_extraInitializers), __runInitializers(this, _reflectionTexture_initializers, null)));
|
|
494
|
+
this._reflectionBlur = (__runInitializers(this, _reflectionTexture_extraInitializers), __runInitializers(this, __reflectionBlur_initializers, void 0));
|
|
495
|
+
_BackgroundMaterial_reflectionBlur_accessor_storage.set(this, (__runInitializers(this, __reflectionBlur_extraInitializers), __runInitializers(this, _reflectionBlur_initializers, 0)));
|
|
496
|
+
this._diffuseTexture = (__runInitializers(this, _reflectionBlur_extraInitializers), __runInitializers(this, __diffuseTexture_initializers, void 0));
|
|
497
|
+
_BackgroundMaterial_diffuseTexture_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture_extraInitializers), __runInitializers(this, _diffuseTexture_initializers, null)));
|
|
498
|
+
this._shadowLights = (__runInitializers(this, _diffuseTexture_extraInitializers), null);
|
|
499
|
+
_BackgroundMaterial_shadowLights_accessor_storage.set(this, __runInitializers(this, _shadowLights_initializers, null));
|
|
500
|
+
this._shadowLevel = (__runInitializers(this, _shadowLights_extraInitializers), __runInitializers(this, __shadowLevel_initializers, void 0));
|
|
501
|
+
_BackgroundMaterial_shadowLevel_accessor_storage.set(this, (__runInitializers(this, __shadowLevel_extraInitializers), __runInitializers(this, _shadowLevel_initializers, 0)));
|
|
502
|
+
this._sceneCenter = (__runInitializers(this, _shadowLevel_extraInitializers), __runInitializers(this, __sceneCenter_initializers, void 0));
|
|
503
|
+
_BackgroundMaterial_sceneCenter_accessor_storage.set(this, (__runInitializers(this, __sceneCenter_extraInitializers), __runInitializers(this, _sceneCenter_initializers, Vector3.Zero())));
|
|
504
|
+
this._opacityFresnel = (__runInitializers(this, _sceneCenter_extraInitializers), __runInitializers(this, __opacityFresnel_initializers, void 0));
|
|
505
|
+
_BackgroundMaterial_opacityFresnel_accessor_storage.set(this, (__runInitializers(this, __opacityFresnel_extraInitializers), __runInitializers(this, _opacityFresnel_initializers, true)));
|
|
506
|
+
this._reflectionFresnel = (__runInitializers(this, _opacityFresnel_extraInitializers), __runInitializers(this, __reflectionFresnel_initializers, void 0));
|
|
507
|
+
_BackgroundMaterial_reflectionFresnel_accessor_storage.set(this, (__runInitializers(this, __reflectionFresnel_extraInitializers), __runInitializers(this, _reflectionFresnel_initializers, false)));
|
|
508
|
+
this._reflectionFalloffDistance = (__runInitializers(this, _reflectionFresnel_extraInitializers), __runInitializers(this, __reflectionFalloffDistance_initializers, void 0));
|
|
509
|
+
_BackgroundMaterial_reflectionFalloffDistance_accessor_storage.set(this, (__runInitializers(this, __reflectionFalloffDistance_extraInitializers), __runInitializers(this, _reflectionFalloffDistance_initializers, 0.0)));
|
|
510
|
+
this._reflectionAmount = (__runInitializers(this, _reflectionFalloffDistance_extraInitializers), __runInitializers(this, __reflectionAmount_initializers, void 0));
|
|
511
|
+
_BackgroundMaterial_reflectionAmount_accessor_storage.set(this, (__runInitializers(this, __reflectionAmount_extraInitializers), __runInitializers(this, _reflectionAmount_initializers, 1.0)));
|
|
512
|
+
this._reflectionReflectance0 = (__runInitializers(this, _reflectionAmount_extraInitializers), __runInitializers(this, __reflectionReflectance0_initializers, void 0));
|
|
513
|
+
_BackgroundMaterial_reflectionReflectance0_accessor_storage.set(this, (__runInitializers(this, __reflectionReflectance0_extraInitializers), __runInitializers(this, _reflectionReflectance0_initializers, 0.05)));
|
|
514
|
+
this._reflectionReflectance90 = (__runInitializers(this, _reflectionReflectance0_extraInitializers), __runInitializers(this, __reflectionReflectance90_initializers, void 0));
|
|
515
|
+
_BackgroundMaterial_reflectionReflectance90_accessor_storage.set(this, (__runInitializers(this, __reflectionReflectance90_extraInitializers), __runInitializers(this, _reflectionReflectance90_initializers, 0.5)));
|
|
516
|
+
this._useRGBColor = (__runInitializers(this, _reflectionReflectance90_extraInitializers), __runInitializers(this, __useRGBColor_initializers, void 0));
|
|
517
|
+
_BackgroundMaterial_useRGBColor_accessor_storage.set(this, (__runInitializers(this, __useRGBColor_extraInitializers), __runInitializers(this, _useRGBColor_initializers, true)));
|
|
518
|
+
this._enableNoise = (__runInitializers(this, _useRGBColor_extraInitializers), __runInitializers(this, __enableNoise_initializers, void 0));
|
|
519
|
+
_BackgroundMaterial_enableNoise_accessor_storage.set(this, (__runInitializers(this, __enableNoise_extraInitializers), __runInitializers(this, _enableNoise_initializers, false)));
|
|
520
|
+
this._fovMultiplier = (__runInitializers(this, _enableNoise_extraInitializers), 1.0);
|
|
521
|
+
/**
|
|
522
|
+
* Enable the FOV adjustment feature controlled by fovMultiplier.
|
|
523
|
+
*/
|
|
524
|
+
this.useEquirectangularFOV = false;
|
|
525
|
+
this._maxSimultaneousLights = __runInitializers(this, __maxSimultaneousLights_initializers, 4);
|
|
526
|
+
_BackgroundMaterial_maxSimultaneousLights_accessor_storage.set(this, (__runInitializers(this, __maxSimultaneousLights_extraInitializers), __runInitializers(this, _maxSimultaneousLights_initializers, 4)));
|
|
527
|
+
this._shadowOnly = (__runInitializers(this, _maxSimultaneousLights_extraInitializers), __runInitializers(this, __shadowOnly_initializers, false));
|
|
528
|
+
_BackgroundMaterial_shadowOnly_accessor_storage.set(this, (__runInitializers(this, __shadowOnly_extraInitializers), __runInitializers(this, _shadowOnly_initializers, false)));
|
|
529
|
+
/**
|
|
530
|
+
* Due to a bug in iOS10, video tags (which are using the background material) are in BGR and not RGB.
|
|
531
|
+
* Setting this flag to true (not done automatically!) will convert it back to RGB.
|
|
532
|
+
*/
|
|
533
|
+
this.switchToBGR = (__runInitializers(this, _shadowOnly_extraInitializers), false);
|
|
534
|
+
this._enableGroundProjection = false;
|
|
535
|
+
_BackgroundMaterial_enableGroundProjection_accessor_storage.set(this, __runInitializers(this, _enableGroundProjection_initializers, false));
|
|
536
|
+
/**
|
|
537
|
+
* Defines the radius of the projected ground if enableGroundProjection is true.
|
|
538
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection
|
|
539
|
+
*/
|
|
540
|
+
this.projectedGroundRadius = (__runInitializers(this, _enableGroundProjection_extraInitializers), __runInitializers(this, _projectedGroundRadius_initializers, 1000));
|
|
541
|
+
/**
|
|
542
|
+
* Defines the height of the projected ground if enableGroundProjection is true.
|
|
543
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/environment/skybox#ground-projection
|
|
544
|
+
*/
|
|
545
|
+
this.projectedGroundHeight = (__runInitializers(this, _projectedGroundRadius_extraInitializers), __runInitializers(this, _projectedGroundHeight_initializers, 10));
|
|
546
|
+
// Temp values kept as cache in the material.
|
|
547
|
+
this._renderTargets = (__runInitializers(this, _projectedGroundHeight_extraInitializers), new SmartArray(16));
|
|
548
|
+
this._reflectionControls = Vector4.Zero();
|
|
549
|
+
this._white = Color3.White();
|
|
550
|
+
this._primaryShadowColor = Color3.Black();
|
|
551
|
+
this._primaryHighlightColor = Color3.Black();
|
|
552
|
+
this._shadersLoaded = false;
|
|
553
|
+
// Setup the default processing configuration to the scene.
|
|
554
|
+
this._attachImageProcessingConfiguration(null);
|
|
555
|
+
this.getRenderTargetTextures = () => {
|
|
556
|
+
this._renderTargets.reset();
|
|
557
|
+
if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {
|
|
558
|
+
this._renderTargets.push(this._diffuseTexture);
|
|
559
|
+
}
|
|
560
|
+
if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
|
|
561
|
+
this._renderTargets.push(this._reflectionTexture);
|
|
562
|
+
}
|
|
563
|
+
return this._renderTargets;
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* Gets a boolean indicating that current material needs to register RTT
|
|
568
|
+
*/
|
|
569
|
+
get hasRenderTargetTextures() {
|
|
570
|
+
if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {
|
|
571
|
+
return true;
|
|
572
|
+
}
|
|
573
|
+
if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
|
|
574
|
+
return true;
|
|
575
|
+
}
|
|
576
|
+
return false;
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* The entire material has been created in order to prevent overdraw.
|
|
580
|
+
* @returns false
|
|
581
|
+
*/
|
|
582
|
+
needAlphaTesting() {
|
|
432
583
|
return true;
|
|
433
584
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
defines._needUVs = false;
|
|
455
|
-
if (scene.texturesEnabled) {
|
|
456
|
-
if (scene.getEngine().getCaps().textureLOD) {
|
|
457
|
-
defines.TEXTURELODSUPPORT = true;
|
|
585
|
+
/**
|
|
586
|
+
* The entire material has been created in order to prevent overdraw.
|
|
587
|
+
* @returns true if blending is enable
|
|
588
|
+
*/
|
|
589
|
+
needAlphaBlending() {
|
|
590
|
+
return this.alpha < 1 || (this._diffuseTexture != null && this._diffuseTexture.hasAlpha) || this._shadowOnly;
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Checks whether the material is ready to be rendered for a given mesh.
|
|
594
|
+
* @param mesh The mesh to render
|
|
595
|
+
* @param subMesh The submesh to check against
|
|
596
|
+
* @param useInstances Specify wether or not the material is used with instances
|
|
597
|
+
* @returns true if all the dependencies are ready (Textures, Effects...)
|
|
598
|
+
*/
|
|
599
|
+
isReadyForSubMesh(mesh, subMesh, useInstances = false) {
|
|
600
|
+
const drawWrapper = subMesh._drawWrapper;
|
|
601
|
+
if (drawWrapper.effect && this.isFrozen) {
|
|
602
|
+
if (drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
|
|
603
|
+
return true;
|
|
604
|
+
}
|
|
458
605
|
}
|
|
459
|
-
if (
|
|
460
|
-
|
|
461
|
-
|
|
606
|
+
if (!subMesh.materialDefines) {
|
|
607
|
+
subMesh.materialDefines = new BackgroundMaterialDefines();
|
|
608
|
+
}
|
|
609
|
+
const scene = this.getScene();
|
|
610
|
+
const defines = subMesh.materialDefines;
|
|
611
|
+
if (this._isReadyForSubMesh(subMesh)) {
|
|
612
|
+
return true;
|
|
613
|
+
}
|
|
614
|
+
const engine = scene.getEngine();
|
|
615
|
+
// Lights
|
|
616
|
+
PrepareDefinesForLights(scene, mesh, defines, false, this._maxSimultaneousLights);
|
|
617
|
+
defines._needNormals = true;
|
|
618
|
+
if (!AreLightsTexturesReady(scene, mesh, this._maxSimultaneousLights)) {
|
|
619
|
+
return false;
|
|
620
|
+
}
|
|
621
|
+
// Multiview
|
|
622
|
+
PrepareDefinesForMultiview(scene, defines);
|
|
623
|
+
// Textures
|
|
624
|
+
if (defines._areTexturesDirty) {
|
|
625
|
+
defines._needUVs = false;
|
|
626
|
+
if (scene.texturesEnabled) {
|
|
627
|
+
if (scene.getEngine().getCaps().textureLOD) {
|
|
628
|
+
defines.TEXTURELODSUPPORT = true;
|
|
629
|
+
}
|
|
630
|
+
if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {
|
|
631
|
+
if (!this._diffuseTexture.isReadyOrNotBlocking()) {
|
|
632
|
+
return false;
|
|
633
|
+
}
|
|
634
|
+
PrepareDefinesForMergedUV(this._diffuseTexture, defines, "DIFFUSE");
|
|
635
|
+
defines.DIFFUSEHASALPHA = this._diffuseTexture.hasAlpha;
|
|
636
|
+
defines.GAMMADIFFUSE = this._diffuseTexture.gammaSpace;
|
|
637
|
+
defines.OPACITYFRESNEL = this._opacityFresnel;
|
|
638
|
+
}
|
|
639
|
+
else {
|
|
640
|
+
defines.DIFFUSE = false;
|
|
641
|
+
defines.DIFFUSEDIRECTUV = 0;
|
|
642
|
+
defines.DIFFUSEHASALPHA = false;
|
|
643
|
+
defines.GAMMADIFFUSE = false;
|
|
644
|
+
defines.OPACITYFRESNEL = false;
|
|
645
|
+
}
|
|
646
|
+
const reflectionTexture = this._reflectionTexture;
|
|
647
|
+
PrepareDefinesForIBL(scene, reflectionTexture, defines);
|
|
648
|
+
if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {
|
|
649
|
+
if (!reflectionTexture.isReadyOrNotBlocking()) {
|
|
650
|
+
return false;
|
|
651
|
+
}
|
|
652
|
+
defines.EQUIRECTANGULAR_RELFECTION_FOV = this.useEquirectangularFOV;
|
|
653
|
+
defines.REFLECTIONBGR = this.switchToBGR;
|
|
654
|
+
defines.REFLECTIONBLUR = this._reflectionBlur > 0;
|
|
655
|
+
if (this.reflectionFresnel) {
|
|
656
|
+
defines.REFLECTIONFRESNEL = true;
|
|
657
|
+
defines.REFLECTIONFALLOFF = this.reflectionFalloffDistance > 0;
|
|
658
|
+
this._reflectionControls.x = this.reflectionAmount;
|
|
659
|
+
this._reflectionControls.y = this.reflectionReflectance0;
|
|
660
|
+
this._reflectionControls.z = this.reflectionReflectance90;
|
|
661
|
+
this._reflectionControls.w = 1 / this.reflectionFalloffDistance;
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
defines.REFLECTIONFRESNEL = false;
|
|
665
|
+
defines.REFLECTIONFALLOFF = false;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
else {
|
|
669
|
+
defines.REFLECTIONFRESNEL = false;
|
|
670
|
+
defines.REFLECTIONFALLOFF = false;
|
|
671
|
+
defines.REFLECTIONBLUR = false;
|
|
672
|
+
}
|
|
462
673
|
}
|
|
463
|
-
|
|
464
|
-
defines.
|
|
465
|
-
defines.
|
|
466
|
-
defines.OPACITYFRESNEL = this._opacityFresnel;
|
|
674
|
+
defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;
|
|
675
|
+
defines.USERGBCOLOR = this._useRGBColor;
|
|
676
|
+
defines.NOISE = this._enableNoise;
|
|
467
677
|
}
|
|
468
|
-
|
|
469
|
-
defines.
|
|
470
|
-
defines.
|
|
471
|
-
defines.DIFFUSEHASALPHA = false;
|
|
472
|
-
defines.GAMMADIFFUSE = false;
|
|
473
|
-
defines.OPACITYFRESNEL = false;
|
|
678
|
+
if (defines._areLightsDirty) {
|
|
679
|
+
defines.USEHIGHLIGHTANDSHADOWCOLORS = !this._useRGBColor && (this._primaryColorShadowLevel !== 0 || this._primaryColorHighlightLevel !== 0);
|
|
680
|
+
defines.BACKMAT_SHADOWONLY = this._shadowOnly;
|
|
474
681
|
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {
|
|
478
|
-
if (!reflectionTexture.isReadyOrNotBlocking()) {
|
|
682
|
+
if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {
|
|
683
|
+
if (!this._imageProcessingConfiguration.isReady()) {
|
|
479
684
|
return false;
|
|
480
685
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
if (this.
|
|
485
|
-
defines.
|
|
486
|
-
defines.
|
|
487
|
-
this._reflectionControls.x = this.reflectionAmount;
|
|
488
|
-
this._reflectionControls.y = this.reflectionReflectance0;
|
|
489
|
-
this._reflectionControls.z = this.reflectionReflectance90;
|
|
490
|
-
this._reflectionControls.w = 1 / this.reflectionFalloffDistance;
|
|
686
|
+
this._imageProcessingConfiguration.prepareDefines(defines);
|
|
687
|
+
}
|
|
688
|
+
if (defines._areMiscDirty) {
|
|
689
|
+
if (defines.REFLECTIONMAP_3D && this._enableGroundProjection) {
|
|
690
|
+
defines.PROJECTED_GROUND = true;
|
|
691
|
+
defines.REFLECTIONMAP_SKYBOX = true;
|
|
491
692
|
}
|
|
492
693
|
else {
|
|
493
|
-
defines.
|
|
494
|
-
defines.REFLECTIONFALLOFF = false;
|
|
694
|
+
defines.PROJECTED_GROUND = false;
|
|
495
695
|
}
|
|
496
696
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
697
|
+
// Misc.
|
|
698
|
+
PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, undefined, undefined, undefined, this._isVertexOutputInvariant);
|
|
699
|
+
// Values that need to be evaluated on every frame
|
|
700
|
+
PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);
|
|
701
|
+
// Attribs
|
|
702
|
+
if (PrepareDefinesForAttributes(mesh, defines, false, true, false)) {
|
|
703
|
+
if (mesh) {
|
|
704
|
+
if (!scene.getEngine().getCaps().standardDerivatives && !mesh.isVerticesDataPresent(VertexBuffer.NormalKind)) {
|
|
705
|
+
mesh.createNormals(true);
|
|
706
|
+
Logger.Warn("BackgroundMaterial: Normals have been created for the mesh: " + mesh.name);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
501
709
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
710
|
+
// Get correct effect
|
|
711
|
+
if (defines.isDirty) {
|
|
712
|
+
defines.markAsProcessed();
|
|
713
|
+
scene.resetCachedMaterial();
|
|
714
|
+
// Fallbacks
|
|
715
|
+
const fallbacks = new EffectFallbacks();
|
|
716
|
+
if (defines.FOG) {
|
|
717
|
+
fallbacks.addFallback(0, "FOG");
|
|
718
|
+
}
|
|
719
|
+
if (defines.POINTSIZE) {
|
|
720
|
+
fallbacks.addFallback(1, "POINTSIZE");
|
|
721
|
+
}
|
|
722
|
+
if (defines.MULTIVIEW) {
|
|
723
|
+
fallbacks.addFallback(0, "MULTIVIEW");
|
|
724
|
+
}
|
|
725
|
+
HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);
|
|
726
|
+
//Attributes
|
|
727
|
+
const attribs = [VertexBuffer.PositionKind];
|
|
728
|
+
if (defines.NORMAL) {
|
|
729
|
+
attribs.push(VertexBuffer.NormalKind);
|
|
730
|
+
}
|
|
731
|
+
if (defines.UV1) {
|
|
732
|
+
attribs.push(VertexBuffer.UVKind);
|
|
733
|
+
}
|
|
734
|
+
if (defines.UV2) {
|
|
735
|
+
attribs.push(VertexBuffer.UV2Kind);
|
|
736
|
+
}
|
|
737
|
+
PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
|
|
738
|
+
PrepareAttributesForInstances(attribs, defines);
|
|
739
|
+
const uniforms = [
|
|
740
|
+
"world",
|
|
741
|
+
"view",
|
|
742
|
+
"viewProjection",
|
|
743
|
+
"vEyePosition",
|
|
744
|
+
"vLightsType",
|
|
745
|
+
"vFogInfos",
|
|
746
|
+
"vFogColor",
|
|
747
|
+
"pointSize",
|
|
748
|
+
"mBones",
|
|
749
|
+
"vPrimaryColor",
|
|
750
|
+
"vPrimaryColorShadow",
|
|
751
|
+
"fFovMultiplier",
|
|
752
|
+
"shadowLevel",
|
|
753
|
+
"alpha",
|
|
754
|
+
"vBackgroundCenter",
|
|
755
|
+
"vReflectionControl",
|
|
756
|
+
"vDiffuseInfos",
|
|
757
|
+
"diffuseMatrix",
|
|
758
|
+
"projectedGroundInfos",
|
|
759
|
+
"logarithmicDepthConstant",
|
|
760
|
+
];
|
|
761
|
+
AddClipPlaneUniforms(uniforms);
|
|
762
|
+
const samplers = ["diffuseSampler"];
|
|
763
|
+
PrepareUniformsAndSamplersForIBL(uniforms, samplers, false);
|
|
764
|
+
const uniformBuffers = ["Material", "Scene"];
|
|
765
|
+
if (ImageProcessingConfiguration) {
|
|
766
|
+
ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);
|
|
767
|
+
ImageProcessingConfiguration.PrepareSamplers(samplers, defines);
|
|
768
|
+
}
|
|
769
|
+
PrepareUniformsAndSamplersList({
|
|
770
|
+
uniformsNames: uniforms,
|
|
771
|
+
uniformBuffersNames: uniformBuffers,
|
|
772
|
+
samplers: samplers,
|
|
773
|
+
defines: defines,
|
|
774
|
+
maxSimultaneousLights: this._maxSimultaneousLights,
|
|
775
|
+
shaderLanguage: this._shaderLanguage,
|
|
776
|
+
});
|
|
777
|
+
const join = defines.toString();
|
|
778
|
+
const effect = scene.getEngine().createEffect("background", {
|
|
779
|
+
attributes: attribs,
|
|
780
|
+
uniformsNames: uniforms,
|
|
781
|
+
uniformBuffersNames: uniformBuffers,
|
|
782
|
+
samplers: samplers,
|
|
783
|
+
defines: join,
|
|
784
|
+
fallbacks: fallbacks,
|
|
785
|
+
onCompiled: this.onCompiled,
|
|
786
|
+
onError: this.onError,
|
|
787
|
+
indexParameters: { maxSimultaneousLights: this._maxSimultaneousLights },
|
|
788
|
+
shaderLanguage: this._shaderLanguage,
|
|
789
|
+
extraInitializationsAsync: this._shadersLoaded
|
|
790
|
+
? undefined
|
|
791
|
+
: async () => {
|
|
792
|
+
if (this.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
793
|
+
await Promise.all([import("../../ShadersWGSL/background.vertex.js"), import("../../ShadersWGSL/background.fragment.js")]);
|
|
794
|
+
}
|
|
795
|
+
else {
|
|
796
|
+
await Promise.all([import("../../Shaders/background.vertex.js"), import("../../Shaders/background.fragment.js")]);
|
|
797
|
+
}
|
|
798
|
+
this._shadersLoaded = true;
|
|
799
|
+
},
|
|
800
|
+
}, engine);
|
|
801
|
+
subMesh.setEffect(effect, defines, this._materialContext);
|
|
802
|
+
this.buildUniformLayout();
|
|
536
803
|
}
|
|
804
|
+
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
805
|
+
return false;
|
|
806
|
+
}
|
|
807
|
+
defines._renderId = scene.getRenderId();
|
|
808
|
+
drawWrapper._wasPreviouslyReady = true;
|
|
809
|
+
drawWrapper._wasPreviouslyUsingInstances = useInstances;
|
|
810
|
+
this._checkScenePerformancePriority();
|
|
811
|
+
return true;
|
|
537
812
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
813
|
+
/**
|
|
814
|
+
* Compute the primary color according to the chosen perceptual color.
|
|
815
|
+
*/
|
|
816
|
+
_computePrimaryColorFromPerceptualColor() {
|
|
817
|
+
if (!this.__perceptualColor) {
|
|
818
|
+
return;
|
|
819
|
+
}
|
|
820
|
+
this._primaryColor.copyFrom(this.__perceptualColor);
|
|
821
|
+
// Revert gamma space.
|
|
822
|
+
this._primaryColor.toLinearSpaceToRef(this._primaryColor, this.getScene().getEngine().useExactSrgbConversions);
|
|
823
|
+
// Revert image processing configuration.
|
|
824
|
+
if (this._imageProcessingConfiguration) {
|
|
825
|
+
// Revert Exposure.
|
|
826
|
+
this._primaryColor.scaleToRef(1 / this._imageProcessingConfiguration.exposure, this._primaryColor);
|
|
827
|
+
}
|
|
828
|
+
this._computePrimaryColors();
|
|
553
829
|
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
830
|
+
/**
|
|
831
|
+
* Compute the highlights and shadow colors according to their chosen levels.
|
|
832
|
+
*/
|
|
833
|
+
_computePrimaryColors() {
|
|
834
|
+
if (this._primaryColorShadowLevel === 0 && this._primaryColorHighlightLevel === 0) {
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
// Find the highlight color based on the configuration.
|
|
838
|
+
this._primaryColor.scaleToRef(this._primaryColorShadowLevel, this._primaryShadowColor);
|
|
839
|
+
this._primaryColor.subtractToRef(this._primaryShadowColor, this._primaryShadowColor);
|
|
840
|
+
// Find the shadow color based on the configuration.
|
|
841
|
+
this._white.subtractToRef(this._primaryColor, this._primaryHighlightColor);
|
|
842
|
+
this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel, this._primaryHighlightColor);
|
|
843
|
+
this._primaryColor.addToRef(this._primaryHighlightColor, this._primaryHighlightColor);
|
|
559
844
|
}
|
|
560
|
-
|
|
561
|
-
|
|
845
|
+
/**
|
|
846
|
+
* Build the uniform buffer used in the material.
|
|
847
|
+
*/
|
|
848
|
+
buildUniformLayout() {
|
|
849
|
+
// Order is important !
|
|
850
|
+
this._uniformBuffer.addUniform("vPrimaryColor", 4);
|
|
851
|
+
this._uniformBuffer.addUniform("vPrimaryColorShadow", 4);
|
|
852
|
+
this._uniformBuffer.addUniform("vDiffuseInfos", 2);
|
|
853
|
+
this._uniformBuffer.addUniform("diffuseMatrix", 16);
|
|
854
|
+
this._uniformBuffer.addUniform("fFovMultiplier", 1);
|
|
855
|
+
this._uniformBuffer.addUniform("pointSize", 1);
|
|
856
|
+
this._uniformBuffer.addUniform("shadowLevel", 1);
|
|
857
|
+
this._uniformBuffer.addUniform("alpha", 1);
|
|
858
|
+
this._uniformBuffer.addUniform("vBackgroundCenter", 3);
|
|
859
|
+
this._uniformBuffer.addUniform("vReflectionControl", 4);
|
|
860
|
+
this._uniformBuffer.addUniform("projectedGroundInfos", 2);
|
|
861
|
+
PrepareUniformLayoutForIBL(this._uniformBuffer, true, false, false);
|
|
862
|
+
this._uniformBuffer.create();
|
|
562
863
|
}
|
|
563
|
-
|
|
564
|
-
|
|
864
|
+
/**
|
|
865
|
+
* Unbind the material.
|
|
866
|
+
*/
|
|
867
|
+
unbind() {
|
|
868
|
+
if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {
|
|
869
|
+
this._uniformBuffer.setTexture("diffuseSampler", null);
|
|
870
|
+
}
|
|
871
|
+
if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
|
|
872
|
+
this._uniformBuffer.setTexture("reflectionSampler", null);
|
|
873
|
+
}
|
|
874
|
+
super.unbind();
|
|
565
875
|
}
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
"
|
|
572
|
-
"vEyePosition",
|
|
573
|
-
"vLightsType",
|
|
574
|
-
"vFogInfos",
|
|
575
|
-
"vFogColor",
|
|
576
|
-
"pointSize",
|
|
577
|
-
"mBones",
|
|
578
|
-
"vPrimaryColor",
|
|
579
|
-
"vPrimaryColorShadow",
|
|
580
|
-
"fFovMultiplier",
|
|
581
|
-
"shadowLevel",
|
|
582
|
-
"alpha",
|
|
583
|
-
"vBackgroundCenter",
|
|
584
|
-
"vReflectionControl",
|
|
585
|
-
"vDiffuseInfos",
|
|
586
|
-
"diffuseMatrix",
|
|
587
|
-
"projectedGroundInfos",
|
|
588
|
-
"logarithmicDepthConstant",
|
|
589
|
-
];
|
|
590
|
-
AddClipPlaneUniforms(uniforms);
|
|
591
|
-
const samplers = ["diffuseSampler"];
|
|
592
|
-
PrepareUniformsAndSamplersForIBL(uniforms, samplers, false);
|
|
593
|
-
const uniformBuffers = ["Material", "Scene"];
|
|
594
|
-
if (ImageProcessingConfiguration) {
|
|
595
|
-
ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);
|
|
596
|
-
ImageProcessingConfiguration.PrepareSamplers(samplers, defines);
|
|
876
|
+
/**
|
|
877
|
+
* Bind only the world matrix to the material.
|
|
878
|
+
* @param world The world matrix to bind.
|
|
879
|
+
*/
|
|
880
|
+
bindOnlyWorldMatrix(world) {
|
|
881
|
+
this._activeEffect.setMatrix("world", world);
|
|
597
882
|
}
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
883
|
+
/**
|
|
884
|
+
* Bind the material for a dedicated submesh (every used meshes will be considered opaque).
|
|
885
|
+
* @param world The world matrix to bind.
|
|
886
|
+
* @param mesh the mesh to bind for.
|
|
887
|
+
* @param subMesh The submesh to bind for.
|
|
888
|
+
*/
|
|
889
|
+
bindForSubMesh(world, mesh, subMesh) {
|
|
890
|
+
const scene = this.getScene();
|
|
891
|
+
const defines = subMesh.materialDefines;
|
|
892
|
+
if (!defines) {
|
|
893
|
+
return;
|
|
894
|
+
}
|
|
895
|
+
const effect = subMesh.effect;
|
|
896
|
+
if (!effect) {
|
|
897
|
+
return;
|
|
898
|
+
}
|
|
899
|
+
this._activeEffect = effect;
|
|
900
|
+
// Matrices
|
|
901
|
+
this.bindOnlyWorldMatrix(world);
|
|
902
|
+
// Bones
|
|
903
|
+
BindBonesParameters(mesh, this._activeEffect);
|
|
904
|
+
const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);
|
|
905
|
+
const needToAlwaysBindUniformBuffers = scene.getEngine()._features.needToAlwaysBindUniformBuffers;
|
|
906
|
+
if (mustRebind) {
|
|
907
|
+
this._uniformBuffer.bindToEffect(effect, "Material");
|
|
908
|
+
this.bindViewProjection(effect);
|
|
909
|
+
const reflectionTexture = this._reflectionTexture;
|
|
910
|
+
if (!this._uniformBuffer.useUbo || !this.isFrozen || !this._uniformBuffer.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {
|
|
911
|
+
// Texture uniforms
|
|
912
|
+
if (scene.texturesEnabled) {
|
|
913
|
+
if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {
|
|
914
|
+
this._uniformBuffer.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
|
|
915
|
+
BindTextureMatrix(this._diffuseTexture, this._uniformBuffer, "diffuse");
|
|
916
|
+
}
|
|
917
|
+
BindIBLParameters(scene, defines, this._uniformBuffer, Color3.White(), reflectionTexture, false, true, false, false, false, false, this._reflectionBlur);
|
|
918
|
+
}
|
|
919
|
+
if (this.shadowLevel > 0) {
|
|
920
|
+
this._uniformBuffer.updateFloat("shadowLevel", this.shadowLevel);
|
|
921
|
+
}
|
|
922
|
+
this._uniformBuffer.updateFloat("alpha", this.alpha);
|
|
923
|
+
// Point size
|
|
924
|
+
if (this.pointsCloud) {
|
|
925
|
+
this._uniformBuffer.updateFloat("pointSize", this.pointSize);
|
|
926
|
+
}
|
|
927
|
+
if (defines.USEHIGHLIGHTANDSHADOWCOLORS) {
|
|
928
|
+
this._uniformBuffer.updateColor4("vPrimaryColor", this._primaryHighlightColor, 1.0);
|
|
929
|
+
this._uniformBuffer.updateColor4("vPrimaryColorShadow", this._primaryShadowColor, 1.0);
|
|
623
930
|
}
|
|
624
931
|
else {
|
|
625
|
-
|
|
932
|
+
this._uniformBuffer.updateColor4("vPrimaryColor", this._primaryColor, 1.0);
|
|
626
933
|
}
|
|
627
|
-
this._shadersLoaded = true;
|
|
628
|
-
},
|
|
629
|
-
}, engine);
|
|
630
|
-
subMesh.setEffect(effect, defines, this._materialContext);
|
|
631
|
-
this.buildUniformLayout();
|
|
632
|
-
}
|
|
633
|
-
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
634
|
-
return false;
|
|
635
|
-
}
|
|
636
|
-
defines._renderId = scene.getRenderId();
|
|
637
|
-
drawWrapper._wasPreviouslyReady = true;
|
|
638
|
-
drawWrapper._wasPreviouslyUsingInstances = useInstances;
|
|
639
|
-
this._checkScenePerformancePriority();
|
|
640
|
-
return true;
|
|
641
|
-
}
|
|
642
|
-
/**
|
|
643
|
-
* Compute the primary color according to the chosen perceptual color.
|
|
644
|
-
*/
|
|
645
|
-
_computePrimaryColorFromPerceptualColor() {
|
|
646
|
-
if (!this.__perceptualColor) {
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
|
-
this._primaryColor.copyFrom(this.__perceptualColor);
|
|
650
|
-
// Revert gamma space.
|
|
651
|
-
this._primaryColor.toLinearSpaceToRef(this._primaryColor, this.getScene().getEngine().useExactSrgbConversions);
|
|
652
|
-
// Revert image processing configuration.
|
|
653
|
-
if (this._imageProcessingConfiguration) {
|
|
654
|
-
// Revert Exposure.
|
|
655
|
-
this._primaryColor.scaleToRef(1 / this._imageProcessingConfiguration.exposure, this._primaryColor);
|
|
656
|
-
}
|
|
657
|
-
this._computePrimaryColors();
|
|
658
|
-
}
|
|
659
|
-
/**
|
|
660
|
-
* Compute the highlights and shadow colors according to their chosen levels.
|
|
661
|
-
*/
|
|
662
|
-
_computePrimaryColors() {
|
|
663
|
-
if (this._primaryColorShadowLevel === 0 && this._primaryColorHighlightLevel === 0) {
|
|
664
|
-
return;
|
|
665
|
-
}
|
|
666
|
-
// Find the highlight color based on the configuration.
|
|
667
|
-
this._primaryColor.scaleToRef(this._primaryColorShadowLevel, this._primaryShadowColor);
|
|
668
|
-
this._primaryColor.subtractToRef(this._primaryShadowColor, this._primaryShadowColor);
|
|
669
|
-
// Find the shadow color based on the configuration.
|
|
670
|
-
this._white.subtractToRef(this._primaryColor, this._primaryHighlightColor);
|
|
671
|
-
this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel, this._primaryHighlightColor);
|
|
672
|
-
this._primaryColor.addToRef(this._primaryHighlightColor, this._primaryHighlightColor);
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Build the uniform buffer used in the material.
|
|
676
|
-
*/
|
|
677
|
-
buildUniformLayout() {
|
|
678
|
-
// Order is important !
|
|
679
|
-
this._uniformBuffer.addUniform("vPrimaryColor", 4);
|
|
680
|
-
this._uniformBuffer.addUniform("vPrimaryColorShadow", 4);
|
|
681
|
-
this._uniformBuffer.addUniform("vDiffuseInfos", 2);
|
|
682
|
-
this._uniformBuffer.addUniform("diffuseMatrix", 16);
|
|
683
|
-
this._uniformBuffer.addUniform("fFovMultiplier", 1);
|
|
684
|
-
this._uniformBuffer.addUniform("pointSize", 1);
|
|
685
|
-
this._uniformBuffer.addUniform("shadowLevel", 1);
|
|
686
|
-
this._uniformBuffer.addUniform("alpha", 1);
|
|
687
|
-
this._uniformBuffer.addUniform("vBackgroundCenter", 3);
|
|
688
|
-
this._uniformBuffer.addUniform("vReflectionControl", 4);
|
|
689
|
-
this._uniformBuffer.addUniform("projectedGroundInfos", 2);
|
|
690
|
-
PrepareUniformLayoutForIBL(this._uniformBuffer, true, false, false);
|
|
691
|
-
this._uniformBuffer.create();
|
|
692
|
-
}
|
|
693
|
-
/**
|
|
694
|
-
* Unbind the material.
|
|
695
|
-
*/
|
|
696
|
-
unbind() {
|
|
697
|
-
if (this._diffuseTexture && this._diffuseTexture.isRenderTarget) {
|
|
698
|
-
this._uniformBuffer.setTexture("diffuseSampler", null);
|
|
699
|
-
}
|
|
700
|
-
if (this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
|
|
701
|
-
this._uniformBuffer.setTexture("reflectionSampler", null);
|
|
702
|
-
}
|
|
703
|
-
super.unbind();
|
|
704
|
-
}
|
|
705
|
-
/**
|
|
706
|
-
* Bind only the world matrix to the material.
|
|
707
|
-
* @param world The world matrix to bind.
|
|
708
|
-
*/
|
|
709
|
-
bindOnlyWorldMatrix(world) {
|
|
710
|
-
this._activeEffect.setMatrix("world", world);
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* Bind the material for a dedicated submesh (every used meshes will be considered opaque).
|
|
714
|
-
* @param world The world matrix to bind.
|
|
715
|
-
* @param mesh the mesh to bind for.
|
|
716
|
-
* @param subMesh The submesh to bind for.
|
|
717
|
-
*/
|
|
718
|
-
bindForSubMesh(world, mesh, subMesh) {
|
|
719
|
-
const scene = this.getScene();
|
|
720
|
-
const defines = subMesh.materialDefines;
|
|
721
|
-
if (!defines) {
|
|
722
|
-
return;
|
|
723
|
-
}
|
|
724
|
-
const effect = subMesh.effect;
|
|
725
|
-
if (!effect) {
|
|
726
|
-
return;
|
|
727
|
-
}
|
|
728
|
-
this._activeEffect = effect;
|
|
729
|
-
// Matrices
|
|
730
|
-
this.bindOnlyWorldMatrix(world);
|
|
731
|
-
// Bones
|
|
732
|
-
BindBonesParameters(mesh, this._activeEffect);
|
|
733
|
-
const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);
|
|
734
|
-
const needToAlwaysBindUniformBuffers = scene.getEngine()._features.needToAlwaysBindUniformBuffers;
|
|
735
|
-
if (mustRebind) {
|
|
736
|
-
this._uniformBuffer.bindToEffect(effect, "Material");
|
|
737
|
-
this.bindViewProjection(effect);
|
|
738
|
-
const reflectionTexture = this._reflectionTexture;
|
|
739
|
-
if (!this._uniformBuffer.useUbo || !this.isFrozen || !this._uniformBuffer.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {
|
|
740
|
-
// Texture uniforms
|
|
741
|
-
if (scene.texturesEnabled) {
|
|
742
|
-
if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {
|
|
743
|
-
this._uniformBuffer.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
|
|
744
|
-
BindTextureMatrix(this._diffuseTexture, this._uniformBuffer, "diffuse");
|
|
745
934
|
}
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
935
|
+
this._uniformBuffer.updateFloat("fFovMultiplier", this._fovMultiplier);
|
|
936
|
+
// Fresnel
|
|
937
|
+
if (defines.REFLECTIONFRESNEL) {
|
|
938
|
+
this._uniformBuffer.updateFloat4("vReflectionControl", this._reflectionControls.x, this._reflectionControls.y, this._reflectionControls.z, this._reflectionControls.w);
|
|
939
|
+
}
|
|
940
|
+
if ((defines.REFLECTIONFRESNEL && defines.REFLECTIONFALLOFF) || defines.OPACITYFRESNEL) {
|
|
941
|
+
const center = TmpVectors.Vector3[0].copyFrom(this.sceneCenter).subtractInPlace(scene.floatingOriginOffset);
|
|
942
|
+
this._uniformBuffer.updateFloat3("vBackgroundCenter", center.x, center.y, center.z);
|
|
943
|
+
}
|
|
944
|
+
// Textures
|
|
945
|
+
if (scene.texturesEnabled) {
|
|
946
|
+
if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {
|
|
947
|
+
this._uniformBuffer.setTexture("diffuseSampler", this._diffuseTexture);
|
|
948
|
+
}
|
|
949
|
+
if (reflectionTexture && MaterialFlags.ReflectionTextureEnabled) {
|
|
950
|
+
BindIBLSamplers(scene, defines, this._uniformBuffer, reflectionTexture);
|
|
951
|
+
}
|
|
952
|
+
if (defines.PROJECTED_GROUND) {
|
|
953
|
+
this._uniformBuffer.updateFloat2("projectedGroundInfos", this.projectedGroundRadius, this.projectedGroundHeight);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
// Clip plane
|
|
957
|
+
BindClipPlane(this._activeEffect, this, scene);
|
|
958
|
+
scene.bindEyePosition(effect);
|
|
750
959
|
}
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
this._uniformBuffer.updateFloat("pointSize", this.pointSize);
|
|
960
|
+
else if (needToAlwaysBindUniformBuffers) {
|
|
961
|
+
this._uniformBuffer.bindToEffect(effect, "Material");
|
|
962
|
+
this._needToBindSceneUbo = true;
|
|
755
963
|
}
|
|
756
|
-
if (
|
|
757
|
-
|
|
758
|
-
this._uniformBuffer.updateColor4("vPrimaryColorShadow", this._primaryShadowColor, 1.0);
|
|
964
|
+
if ((mustRebind || !this.isFrozen || needToAlwaysBindUniformBuffers) && scene.lightsEnabled) {
|
|
965
|
+
BindLights(scene, mesh, this._activeEffect, defines, this._maxSimultaneousLights);
|
|
759
966
|
}
|
|
760
|
-
|
|
761
|
-
|
|
967
|
+
if (mustRebind || !this.isFrozen) {
|
|
968
|
+
// View
|
|
969
|
+
this.bindView(effect);
|
|
970
|
+
// Fog
|
|
971
|
+
BindFogParameters(scene, mesh, this._activeEffect, true);
|
|
972
|
+
// Log. depth
|
|
973
|
+
if (this._useLogarithmicDepth) {
|
|
974
|
+
BindLogDepth(defines, effect, scene);
|
|
975
|
+
}
|
|
976
|
+
// image processing
|
|
977
|
+
if (this._imageProcessingConfiguration) {
|
|
978
|
+
this._imageProcessingConfiguration.bind(this._activeEffect);
|
|
979
|
+
}
|
|
762
980
|
}
|
|
981
|
+
this._afterBind(mesh, this._activeEffect, subMesh);
|
|
982
|
+
this._uniformBuffer.update();
|
|
763
983
|
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
}
|
|
773
|
-
// Textures
|
|
774
|
-
if (scene.texturesEnabled) {
|
|
775
|
-
if (this._diffuseTexture && MaterialFlags.DiffuseTextureEnabled) {
|
|
776
|
-
this._uniformBuffer.setTexture("diffuseSampler", this._diffuseTexture);
|
|
984
|
+
/**
|
|
985
|
+
* Checks to see if a texture is used in the material.
|
|
986
|
+
* @param texture - Base texture to use.
|
|
987
|
+
* @returns - Boolean specifying if a texture is used in the material.
|
|
988
|
+
*/
|
|
989
|
+
hasTexture(texture) {
|
|
990
|
+
if (super.hasTexture(texture)) {
|
|
991
|
+
return true;
|
|
777
992
|
}
|
|
778
|
-
if (
|
|
779
|
-
|
|
993
|
+
if (this._reflectionTexture === texture) {
|
|
994
|
+
return true;
|
|
780
995
|
}
|
|
781
|
-
if (
|
|
782
|
-
|
|
996
|
+
if (this._diffuseTexture === texture) {
|
|
997
|
+
return true;
|
|
783
998
|
}
|
|
999
|
+
return false;
|
|
784
1000
|
}
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* Dispose the material.
|
|
1003
|
+
* @param forceDisposeEffect Force disposal of the associated effect.
|
|
1004
|
+
* @param forceDisposeTextures Force disposal of the associated textures.
|
|
1005
|
+
*/
|
|
1006
|
+
dispose(forceDisposeEffect = false, forceDisposeTextures = false) {
|
|
1007
|
+
if (forceDisposeTextures) {
|
|
1008
|
+
if (this.diffuseTexture) {
|
|
1009
|
+
this.diffuseTexture.dispose();
|
|
1010
|
+
}
|
|
1011
|
+
if (this.reflectionTexture) {
|
|
1012
|
+
this.reflectionTexture.dispose();
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
this._renderTargets.dispose();
|
|
1016
|
+
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
|
|
1017
|
+
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
|
|
1018
|
+
}
|
|
1019
|
+
super.dispose(forceDisposeEffect);
|
|
804
1020
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
1021
|
+
/**
|
|
1022
|
+
* Clones the material.
|
|
1023
|
+
* @param name The cloned name.
|
|
1024
|
+
* @returns The cloned material.
|
|
1025
|
+
*/
|
|
1026
|
+
clone(name) {
|
|
1027
|
+
return SerializationHelper.Clone(() => new _a(name, this.getScene()), this);
|
|
808
1028
|
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
*/
|
|
818
|
-
hasTexture(texture) {
|
|
819
|
-
if (super.hasTexture(texture)) {
|
|
820
|
-
return true;
|
|
821
|
-
}
|
|
822
|
-
if (this._reflectionTexture === texture) {
|
|
823
|
-
return true;
|
|
824
|
-
}
|
|
825
|
-
if (this._diffuseTexture === texture) {
|
|
826
|
-
return true;
|
|
827
|
-
}
|
|
828
|
-
return false;
|
|
829
|
-
}
|
|
830
|
-
/**
|
|
831
|
-
* Dispose the material.
|
|
832
|
-
* @param forceDisposeEffect Force disposal of the associated effect.
|
|
833
|
-
* @param forceDisposeTextures Force disposal of the associated textures.
|
|
834
|
-
*/
|
|
835
|
-
dispose(forceDisposeEffect = false, forceDisposeTextures = false) {
|
|
836
|
-
if (forceDisposeTextures) {
|
|
837
|
-
if (this.diffuseTexture) {
|
|
838
|
-
this.diffuseTexture.dispose();
|
|
1029
|
+
/**
|
|
1030
|
+
* Serializes the current material to its JSON representation.
|
|
1031
|
+
* @returns The JSON representation.
|
|
1032
|
+
*/
|
|
1033
|
+
serialize() {
|
|
1034
|
+
const serializationObject = super.serialize();
|
|
1035
|
+
serializationObject.customType = "BABYLON.BackgroundMaterial";
|
|
1036
|
+
return serializationObject;
|
|
839
1037
|
}
|
|
840
|
-
|
|
841
|
-
|
|
1038
|
+
/**
|
|
1039
|
+
* Gets the class name of the material
|
|
1040
|
+
* @returns "BackgroundMaterial"
|
|
1041
|
+
*/
|
|
1042
|
+
getClassName() {
|
|
1043
|
+
return "BackgroundMaterial";
|
|
842
1044
|
}
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
__decorate([
|
|
966
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
967
|
-
], BackgroundMaterial.prototype, "reflectionAmount", void 0);
|
|
968
|
-
__decorate([
|
|
969
|
-
serialize()
|
|
970
|
-
], BackgroundMaterial.prototype, "_reflectionReflectance0", void 0);
|
|
971
|
-
__decorate([
|
|
972
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
973
|
-
], BackgroundMaterial.prototype, "reflectionReflectance0", void 0);
|
|
974
|
-
__decorate([
|
|
975
|
-
serialize()
|
|
976
|
-
], BackgroundMaterial.prototype, "_reflectionReflectance90", void 0);
|
|
977
|
-
__decorate([
|
|
978
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
979
|
-
], BackgroundMaterial.prototype, "reflectionReflectance90", void 0);
|
|
980
|
-
__decorate([
|
|
981
|
-
serialize()
|
|
982
|
-
], BackgroundMaterial.prototype, "_useRGBColor", void 0);
|
|
983
|
-
__decorate([
|
|
984
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
985
|
-
], BackgroundMaterial.prototype, "useRGBColor", void 0);
|
|
986
|
-
__decorate([
|
|
987
|
-
serialize()
|
|
988
|
-
], BackgroundMaterial.prototype, "_enableNoise", void 0);
|
|
989
|
-
__decorate([
|
|
990
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
991
|
-
], BackgroundMaterial.prototype, "enableNoise", void 0);
|
|
992
|
-
__decorate([
|
|
993
|
-
serialize()
|
|
994
|
-
], BackgroundMaterial.prototype, "_maxSimultaneousLights", void 0);
|
|
995
|
-
__decorate([
|
|
996
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
997
|
-
], BackgroundMaterial.prototype, "maxSimultaneousLights", void 0);
|
|
998
|
-
__decorate([
|
|
999
|
-
serialize()
|
|
1000
|
-
], BackgroundMaterial.prototype, "_shadowOnly", void 0);
|
|
1001
|
-
__decorate([
|
|
1002
|
-
expandToProperty("_markAllSubMeshesAsLightsDirty")
|
|
1003
|
-
], BackgroundMaterial.prototype, "shadowOnly", void 0);
|
|
1004
|
-
__decorate([
|
|
1005
|
-
serialize(),
|
|
1006
|
-
expandToProperty("_markAllSubMeshesAsMiscDirty")
|
|
1007
|
-
], BackgroundMaterial.prototype, "enableGroundProjection", void 0);
|
|
1008
|
-
__decorate([
|
|
1009
|
-
serialize()
|
|
1010
|
-
], BackgroundMaterial.prototype, "projectedGroundRadius", void 0);
|
|
1011
|
-
__decorate([
|
|
1012
|
-
serialize()
|
|
1013
|
-
], BackgroundMaterial.prototype, "projectedGroundHeight", void 0);
|
|
1045
|
+
/**
|
|
1046
|
+
* Parse a JSON input to create back a background material.
|
|
1047
|
+
* @param source The JSON data to parse
|
|
1048
|
+
* @param scene The scene to create the parsed material in
|
|
1049
|
+
* @param rootUrl The root url of the assets the material depends upon
|
|
1050
|
+
* @returns the instantiated BackgroundMaterial.
|
|
1051
|
+
*/
|
|
1052
|
+
static Parse(source, scene, rootUrl) {
|
|
1053
|
+
return SerializationHelper.Parse(() => new _a(source.name, scene), source, scene, rootUrl);
|
|
1054
|
+
}
|
|
1055
|
+
},
|
|
1056
|
+
_BackgroundMaterial_primaryColor_accessor_storage = new WeakMap(),
|
|
1057
|
+
_BackgroundMaterial_reflectionTexture_accessor_storage = new WeakMap(),
|
|
1058
|
+
_BackgroundMaterial_reflectionBlur_accessor_storage = new WeakMap(),
|
|
1059
|
+
_BackgroundMaterial_diffuseTexture_accessor_storage = new WeakMap(),
|
|
1060
|
+
_BackgroundMaterial_shadowLights_accessor_storage = new WeakMap(),
|
|
1061
|
+
_BackgroundMaterial_shadowLevel_accessor_storage = new WeakMap(),
|
|
1062
|
+
_BackgroundMaterial_sceneCenter_accessor_storage = new WeakMap(),
|
|
1063
|
+
_BackgroundMaterial_opacityFresnel_accessor_storage = new WeakMap(),
|
|
1064
|
+
_BackgroundMaterial_reflectionFresnel_accessor_storage = new WeakMap(),
|
|
1065
|
+
_BackgroundMaterial_reflectionFalloffDistance_accessor_storage = new WeakMap(),
|
|
1066
|
+
_BackgroundMaterial_reflectionAmount_accessor_storage = new WeakMap(),
|
|
1067
|
+
_BackgroundMaterial_reflectionReflectance0_accessor_storage = new WeakMap(),
|
|
1068
|
+
_BackgroundMaterial_reflectionReflectance90_accessor_storage = new WeakMap(),
|
|
1069
|
+
_BackgroundMaterial_useRGBColor_accessor_storage = new WeakMap(),
|
|
1070
|
+
_BackgroundMaterial_enableNoise_accessor_storage = new WeakMap(),
|
|
1071
|
+
_BackgroundMaterial_maxSimultaneousLights_accessor_storage = new WeakMap(),
|
|
1072
|
+
_BackgroundMaterial_shadowOnly_accessor_storage = new WeakMap(),
|
|
1073
|
+
_BackgroundMaterial_enableGroundProjection_accessor_storage = new WeakMap(),
|
|
1074
|
+
(() => {
|
|
1075
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1076
|
+
__primaryColor_decorators = [serializeAsColor3()];
|
|
1077
|
+
_primaryColor_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
|
|
1078
|
+
___perceptualColor_decorators = [serializeAsColor3()];
|
|
1079
|
+
__primaryColorShadowLevel_decorators = [serialize()];
|
|
1080
|
+
__primaryColorHighlightLevel_decorators = [serialize()];
|
|
1081
|
+
__reflectionTexture_decorators = [serializeAsTexture()];
|
|
1082
|
+
_reflectionTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1083
|
+
__reflectionBlur_decorators = [serialize()];
|
|
1084
|
+
_reflectionBlur_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1085
|
+
__diffuseTexture_decorators = [serializeAsTexture()];
|
|
1086
|
+
_diffuseTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1087
|
+
_shadowLights_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1088
|
+
__shadowLevel_decorators = [serialize()];
|
|
1089
|
+
_shadowLevel_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1090
|
+
__sceneCenter_decorators = [serializeAsVector3()];
|
|
1091
|
+
_sceneCenter_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1092
|
+
__opacityFresnel_decorators = [serialize()];
|
|
1093
|
+
_opacityFresnel_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1094
|
+
__reflectionFresnel_decorators = [serialize()];
|
|
1095
|
+
_reflectionFresnel_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1096
|
+
__reflectionFalloffDistance_decorators = [serialize()];
|
|
1097
|
+
_reflectionFalloffDistance_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1098
|
+
__reflectionAmount_decorators = [serialize()];
|
|
1099
|
+
_reflectionAmount_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1100
|
+
__reflectionReflectance0_decorators = [serialize()];
|
|
1101
|
+
_reflectionReflectance0_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1102
|
+
__reflectionReflectance90_decorators = [serialize()];
|
|
1103
|
+
_reflectionReflectance90_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1104
|
+
__useRGBColor_decorators = [serialize()];
|
|
1105
|
+
_useRGBColor_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1106
|
+
__enableNoise_decorators = [serialize()];
|
|
1107
|
+
_enableNoise_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1108
|
+
__maxSimultaneousLights_decorators = [serialize()];
|
|
1109
|
+
_maxSimultaneousLights_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1110
|
+
__shadowOnly_decorators = [serialize()];
|
|
1111
|
+
_shadowOnly_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
|
|
1112
|
+
_enableGroundProjection_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsMiscDirty")];
|
|
1113
|
+
_projectedGroundRadius_decorators = [serialize()];
|
|
1114
|
+
_projectedGroundHeight_decorators = [serialize()];
|
|
1115
|
+
__esDecorate(_a, null, _primaryColor_decorators, { kind: "accessor", name: "primaryColor", static: false, private: false, access: { has: obj => "primaryColor" in obj, get: obj => obj.primaryColor, set: (obj, value) => { obj.primaryColor = value; } }, metadata: _metadata }, _primaryColor_initializers, _primaryColor_extraInitializers);
|
|
1116
|
+
__esDecorate(_a, null, _reflectionTexture_decorators, { kind: "accessor", name: "reflectionTexture", static: false, private: false, access: { has: obj => "reflectionTexture" in obj, get: obj => obj.reflectionTexture, set: (obj, value) => { obj.reflectionTexture = value; } }, metadata: _metadata }, _reflectionTexture_initializers, _reflectionTexture_extraInitializers);
|
|
1117
|
+
__esDecorate(_a, null, _reflectionBlur_decorators, { kind: "accessor", name: "reflectionBlur", static: false, private: false, access: { has: obj => "reflectionBlur" in obj, get: obj => obj.reflectionBlur, set: (obj, value) => { obj.reflectionBlur = value; } }, metadata: _metadata }, _reflectionBlur_initializers, _reflectionBlur_extraInitializers);
|
|
1118
|
+
__esDecorate(_a, null, _diffuseTexture_decorators, { kind: "accessor", name: "diffuseTexture", static: false, private: false, access: { has: obj => "diffuseTexture" in obj, get: obj => obj.diffuseTexture, set: (obj, value) => { obj.diffuseTexture = value; } }, metadata: _metadata }, _diffuseTexture_initializers, _diffuseTexture_extraInitializers);
|
|
1119
|
+
__esDecorate(_a, null, _shadowLights_decorators, { kind: "accessor", name: "shadowLights", static: false, private: false, access: { has: obj => "shadowLights" in obj, get: obj => obj.shadowLights, set: (obj, value) => { obj.shadowLights = value; } }, metadata: _metadata }, _shadowLights_initializers, _shadowLights_extraInitializers);
|
|
1120
|
+
__esDecorate(_a, null, _shadowLevel_decorators, { kind: "accessor", name: "shadowLevel", static: false, private: false, access: { has: obj => "shadowLevel" in obj, get: obj => obj.shadowLevel, set: (obj, value) => { obj.shadowLevel = value; } }, metadata: _metadata }, _shadowLevel_initializers, _shadowLevel_extraInitializers);
|
|
1121
|
+
__esDecorate(_a, null, _sceneCenter_decorators, { kind: "accessor", name: "sceneCenter", static: false, private: false, access: { has: obj => "sceneCenter" in obj, get: obj => obj.sceneCenter, set: (obj, value) => { obj.sceneCenter = value; } }, metadata: _metadata }, _sceneCenter_initializers, _sceneCenter_extraInitializers);
|
|
1122
|
+
__esDecorate(_a, null, _opacityFresnel_decorators, { kind: "accessor", name: "opacityFresnel", static: false, private: false, access: { has: obj => "opacityFresnel" in obj, get: obj => obj.opacityFresnel, set: (obj, value) => { obj.opacityFresnel = value; } }, metadata: _metadata }, _opacityFresnel_initializers, _opacityFresnel_extraInitializers);
|
|
1123
|
+
__esDecorate(_a, null, _reflectionFresnel_decorators, { kind: "accessor", name: "reflectionFresnel", static: false, private: false, access: { has: obj => "reflectionFresnel" in obj, get: obj => obj.reflectionFresnel, set: (obj, value) => { obj.reflectionFresnel = value; } }, metadata: _metadata }, _reflectionFresnel_initializers, _reflectionFresnel_extraInitializers);
|
|
1124
|
+
__esDecorate(_a, null, _reflectionFalloffDistance_decorators, { kind: "accessor", name: "reflectionFalloffDistance", static: false, private: false, access: { has: obj => "reflectionFalloffDistance" in obj, get: obj => obj.reflectionFalloffDistance, set: (obj, value) => { obj.reflectionFalloffDistance = value; } }, metadata: _metadata }, _reflectionFalloffDistance_initializers, _reflectionFalloffDistance_extraInitializers);
|
|
1125
|
+
__esDecorate(_a, null, _reflectionAmount_decorators, { kind: "accessor", name: "reflectionAmount", static: false, private: false, access: { has: obj => "reflectionAmount" in obj, get: obj => obj.reflectionAmount, set: (obj, value) => { obj.reflectionAmount = value; } }, metadata: _metadata }, _reflectionAmount_initializers, _reflectionAmount_extraInitializers);
|
|
1126
|
+
__esDecorate(_a, null, _reflectionReflectance0_decorators, { kind: "accessor", name: "reflectionReflectance0", static: false, private: false, access: { has: obj => "reflectionReflectance0" in obj, get: obj => obj.reflectionReflectance0, set: (obj, value) => { obj.reflectionReflectance0 = value; } }, metadata: _metadata }, _reflectionReflectance0_initializers, _reflectionReflectance0_extraInitializers);
|
|
1127
|
+
__esDecorate(_a, null, _reflectionReflectance90_decorators, { kind: "accessor", name: "reflectionReflectance90", static: false, private: false, access: { has: obj => "reflectionReflectance90" in obj, get: obj => obj.reflectionReflectance90, set: (obj, value) => { obj.reflectionReflectance90 = value; } }, metadata: _metadata }, _reflectionReflectance90_initializers, _reflectionReflectance90_extraInitializers);
|
|
1128
|
+
__esDecorate(_a, null, _useRGBColor_decorators, { kind: "accessor", name: "useRGBColor", static: false, private: false, access: { has: obj => "useRGBColor" in obj, get: obj => obj.useRGBColor, set: (obj, value) => { obj.useRGBColor = value; } }, metadata: _metadata }, _useRGBColor_initializers, _useRGBColor_extraInitializers);
|
|
1129
|
+
__esDecorate(_a, null, _enableNoise_decorators, { kind: "accessor", name: "enableNoise", static: false, private: false, access: { has: obj => "enableNoise" in obj, get: obj => obj.enableNoise, set: (obj, value) => { obj.enableNoise = value; } }, metadata: _metadata }, _enableNoise_initializers, _enableNoise_extraInitializers);
|
|
1130
|
+
__esDecorate(_a, null, _maxSimultaneousLights_decorators, { kind: "accessor", name: "maxSimultaneousLights", static: false, private: false, access: { has: obj => "maxSimultaneousLights" in obj, get: obj => obj.maxSimultaneousLights, set: (obj, value) => { obj.maxSimultaneousLights = value; } }, metadata: _metadata }, _maxSimultaneousLights_initializers, _maxSimultaneousLights_extraInitializers);
|
|
1131
|
+
__esDecorate(_a, null, _shadowOnly_decorators, { kind: "accessor", name: "shadowOnly", static: false, private: false, access: { has: obj => "shadowOnly" in obj, get: obj => obj.shadowOnly, set: (obj, value) => { obj.shadowOnly = value; } }, metadata: _metadata }, _shadowOnly_initializers, _shadowOnly_extraInitializers);
|
|
1132
|
+
__esDecorate(_a, null, _enableGroundProjection_decorators, { kind: "accessor", name: "enableGroundProjection", static: false, private: false, access: { has: obj => "enableGroundProjection" in obj, get: obj => obj.enableGroundProjection, set: (obj, value) => { obj.enableGroundProjection = value; } }, metadata: _metadata }, _enableGroundProjection_initializers, _enableGroundProjection_extraInitializers);
|
|
1133
|
+
__esDecorate(null, null, __primaryColor_decorators, { kind: "field", name: "_primaryColor", static: false, private: false, access: { has: obj => "_primaryColor" in obj, get: obj => obj._primaryColor, set: (obj, value) => { obj._primaryColor = value; } }, metadata: _metadata }, __primaryColor_initializers, __primaryColor_extraInitializers);
|
|
1134
|
+
__esDecorate(null, null, ___perceptualColor_decorators, { kind: "field", name: "__perceptualColor", static: false, private: false, access: { has: obj => "__perceptualColor" in obj, get: obj => obj.__perceptualColor, set: (obj, value) => { obj.__perceptualColor = value; } }, metadata: _metadata }, ___perceptualColor_initializers, ___perceptualColor_extraInitializers);
|
|
1135
|
+
__esDecorate(null, null, __primaryColorShadowLevel_decorators, { kind: "field", name: "_primaryColorShadowLevel", static: false, private: false, access: { has: obj => "_primaryColorShadowLevel" in obj, get: obj => obj._primaryColorShadowLevel, set: (obj, value) => { obj._primaryColorShadowLevel = value; } }, metadata: _metadata }, __primaryColorShadowLevel_initializers, __primaryColorShadowLevel_extraInitializers);
|
|
1136
|
+
__esDecorate(null, null, __primaryColorHighlightLevel_decorators, { kind: "field", name: "_primaryColorHighlightLevel", static: false, private: false, access: { has: obj => "_primaryColorHighlightLevel" in obj, get: obj => obj._primaryColorHighlightLevel, set: (obj, value) => { obj._primaryColorHighlightLevel = value; } }, metadata: _metadata }, __primaryColorHighlightLevel_initializers, __primaryColorHighlightLevel_extraInitializers);
|
|
1137
|
+
__esDecorate(null, null, __reflectionTexture_decorators, { kind: "field", name: "_reflectionTexture", static: false, private: false, access: { has: obj => "_reflectionTexture" in obj, get: obj => obj._reflectionTexture, set: (obj, value) => { obj._reflectionTexture = value; } }, metadata: _metadata }, __reflectionTexture_initializers, __reflectionTexture_extraInitializers);
|
|
1138
|
+
__esDecorate(null, null, __reflectionBlur_decorators, { kind: "field", name: "_reflectionBlur", static: false, private: false, access: { has: obj => "_reflectionBlur" in obj, get: obj => obj._reflectionBlur, set: (obj, value) => { obj._reflectionBlur = value; } }, metadata: _metadata }, __reflectionBlur_initializers, __reflectionBlur_extraInitializers);
|
|
1139
|
+
__esDecorate(null, null, __diffuseTexture_decorators, { kind: "field", name: "_diffuseTexture", static: false, private: false, access: { has: obj => "_diffuseTexture" in obj, get: obj => obj._diffuseTexture, set: (obj, value) => { obj._diffuseTexture = value; } }, metadata: _metadata }, __diffuseTexture_initializers, __diffuseTexture_extraInitializers);
|
|
1140
|
+
__esDecorate(null, null, __shadowLevel_decorators, { kind: "field", name: "_shadowLevel", static: false, private: false, access: { has: obj => "_shadowLevel" in obj, get: obj => obj._shadowLevel, set: (obj, value) => { obj._shadowLevel = value; } }, metadata: _metadata }, __shadowLevel_initializers, __shadowLevel_extraInitializers);
|
|
1141
|
+
__esDecorate(null, null, __sceneCenter_decorators, { kind: "field", name: "_sceneCenter", static: false, private: false, access: { has: obj => "_sceneCenter" in obj, get: obj => obj._sceneCenter, set: (obj, value) => { obj._sceneCenter = value; } }, metadata: _metadata }, __sceneCenter_initializers, __sceneCenter_extraInitializers);
|
|
1142
|
+
__esDecorate(null, null, __opacityFresnel_decorators, { kind: "field", name: "_opacityFresnel", static: false, private: false, access: { has: obj => "_opacityFresnel" in obj, get: obj => obj._opacityFresnel, set: (obj, value) => { obj._opacityFresnel = value; } }, metadata: _metadata }, __opacityFresnel_initializers, __opacityFresnel_extraInitializers);
|
|
1143
|
+
__esDecorate(null, null, __reflectionFresnel_decorators, { kind: "field", name: "_reflectionFresnel", static: false, private: false, access: { has: obj => "_reflectionFresnel" in obj, get: obj => obj._reflectionFresnel, set: (obj, value) => { obj._reflectionFresnel = value; } }, metadata: _metadata }, __reflectionFresnel_initializers, __reflectionFresnel_extraInitializers);
|
|
1144
|
+
__esDecorate(null, null, __reflectionFalloffDistance_decorators, { kind: "field", name: "_reflectionFalloffDistance", static: false, private: false, access: { has: obj => "_reflectionFalloffDistance" in obj, get: obj => obj._reflectionFalloffDistance, set: (obj, value) => { obj._reflectionFalloffDistance = value; } }, metadata: _metadata }, __reflectionFalloffDistance_initializers, __reflectionFalloffDistance_extraInitializers);
|
|
1145
|
+
__esDecorate(null, null, __reflectionAmount_decorators, { kind: "field", name: "_reflectionAmount", static: false, private: false, access: { has: obj => "_reflectionAmount" in obj, get: obj => obj._reflectionAmount, set: (obj, value) => { obj._reflectionAmount = value; } }, metadata: _metadata }, __reflectionAmount_initializers, __reflectionAmount_extraInitializers);
|
|
1146
|
+
__esDecorate(null, null, __reflectionReflectance0_decorators, { kind: "field", name: "_reflectionReflectance0", static: false, private: false, access: { has: obj => "_reflectionReflectance0" in obj, get: obj => obj._reflectionReflectance0, set: (obj, value) => { obj._reflectionReflectance0 = value; } }, metadata: _metadata }, __reflectionReflectance0_initializers, __reflectionReflectance0_extraInitializers);
|
|
1147
|
+
__esDecorate(null, null, __reflectionReflectance90_decorators, { kind: "field", name: "_reflectionReflectance90", static: false, private: false, access: { has: obj => "_reflectionReflectance90" in obj, get: obj => obj._reflectionReflectance90, set: (obj, value) => { obj._reflectionReflectance90 = value; } }, metadata: _metadata }, __reflectionReflectance90_initializers, __reflectionReflectance90_extraInitializers);
|
|
1148
|
+
__esDecorate(null, null, __useRGBColor_decorators, { kind: "field", name: "_useRGBColor", static: false, private: false, access: { has: obj => "_useRGBColor" in obj, get: obj => obj._useRGBColor, set: (obj, value) => { obj._useRGBColor = value; } }, metadata: _metadata }, __useRGBColor_initializers, __useRGBColor_extraInitializers);
|
|
1149
|
+
__esDecorate(null, null, __enableNoise_decorators, { kind: "field", name: "_enableNoise", static: false, private: false, access: { has: obj => "_enableNoise" in obj, get: obj => obj._enableNoise, set: (obj, value) => { obj._enableNoise = value; } }, metadata: _metadata }, __enableNoise_initializers, __enableNoise_extraInitializers);
|
|
1150
|
+
__esDecorate(null, null, __maxSimultaneousLights_decorators, { kind: "field", name: "_maxSimultaneousLights", static: false, private: false, access: { has: obj => "_maxSimultaneousLights" in obj, get: obj => obj._maxSimultaneousLights, set: (obj, value) => { obj._maxSimultaneousLights = value; } }, metadata: _metadata }, __maxSimultaneousLights_initializers, __maxSimultaneousLights_extraInitializers);
|
|
1151
|
+
__esDecorate(null, null, __shadowOnly_decorators, { kind: "field", name: "_shadowOnly", static: false, private: false, access: { has: obj => "_shadowOnly" in obj, get: obj => obj._shadowOnly, set: (obj, value) => { obj._shadowOnly = value; } }, metadata: _metadata }, __shadowOnly_initializers, __shadowOnly_extraInitializers);
|
|
1152
|
+
__esDecorate(null, null, _projectedGroundRadius_decorators, { kind: "field", name: "projectedGroundRadius", static: false, private: false, access: { has: obj => "projectedGroundRadius" in obj, get: obj => obj.projectedGroundRadius, set: (obj, value) => { obj.projectedGroundRadius = value; } }, metadata: _metadata }, _projectedGroundRadius_initializers, _projectedGroundRadius_extraInitializers);
|
|
1153
|
+
__esDecorate(null, null, _projectedGroundHeight_decorators, { kind: "field", name: "projectedGroundHeight", static: false, private: false, access: { has: obj => "projectedGroundHeight" in obj, get: obj => obj.projectedGroundHeight, set: (obj, value) => { obj.projectedGroundHeight = value; } }, metadata: _metadata }, _projectedGroundHeight_initializers, _projectedGroundHeight_extraInitializers);
|
|
1154
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
1155
|
+
})(),
|
|
1156
|
+
/**
|
|
1157
|
+
* Standard reflectance value at parallel view angle.
|
|
1158
|
+
*/
|
|
1159
|
+
_a.StandardReflectance0 = 0.05,
|
|
1160
|
+
/**
|
|
1161
|
+
* Standard reflectance value at grazing angle.
|
|
1162
|
+
*/
|
|
1163
|
+
_a.StandardReflectance90 = 0.5,
|
|
1164
|
+
_a;
|
|
1165
|
+
})();
|
|
1166
|
+
export { BackgroundMaterial };
|
|
1014
1167
|
let _Registered = false;
|
|
1015
1168
|
/**
|
|
1016
1169
|
* Register side effects for backgroundMaterial.
|
|
@@ -1021,6 +1174,8 @@ export function RegisterBackgroundMaterial() {
|
|
|
1021
1174
|
return;
|
|
1022
1175
|
}
|
|
1023
1176
|
_Registered = true;
|
|
1177
|
+
// BackgroundMaterial serializes its image processing configuration, so the parser must be registered for clone/parse to work.
|
|
1178
|
+
RegisterImageProcessingConfiguration();
|
|
1024
1179
|
RegisterClass("BABYLON.BackgroundMaterial", BackgroundMaterial);
|
|
1025
1180
|
}
|
|
1026
1181
|
//# sourceMappingURL=backgroundMaterial.pure.js.map
|