@onerjs/core 8.53.5 → 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.
Files changed (841) hide show
  1. package/Animations/animationGroup.d.ts +0 -1
  2. package/Animations/animationGroup.js +0 -1
  3. package/Animations/animationGroup.js.map +1 -1
  4. package/Animations/animationGroup.pure.js +2 -0
  5. package/Animations/animationGroup.pure.js.map +1 -1
  6. package/Animations/runtimeAnimation.js +11 -0
  7. package/Animations/runtimeAnimation.js.map +1 -1
  8. package/Audio/audioSceneComponent.pure.js +1 -1
  9. package/AudioV2/abstractAudio/abstractSound.d.ts +2 -1
  10. package/AudioV2/abstractAudio/abstractSound.js +7 -2
  11. package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
  12. package/AudioV2/abstractAudio/abstractSoundInstance.d.ts +3 -1
  13. package/AudioV2/abstractAudio/abstractSoundInstance.js.map +1 -1
  14. package/AudioV2/abstractAudio/staticSound.d.ts +6 -0
  15. package/AudioV2/abstractAudio/staticSound.js +17 -1
  16. package/AudioV2/abstractAudio/staticSound.js.map +1 -1
  17. package/AudioV2/abstractAudio/staticSoundInstance.d.ts +4 -2
  18. package/AudioV2/abstractAudio/staticSoundInstance.js.map +1 -1
  19. package/AudioV2/abstractAudio/streamingSound.d.ts +6 -0
  20. package/AudioV2/abstractAudio/streamingSound.js +9 -1
  21. package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
  22. package/AudioV2/webAudio/webAudioStaticSound.d.ts +7 -1
  23. package/AudioV2/webAudio/webAudioStaticSound.js +56 -8
  24. package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
  25. package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -1
  26. package/AudioV2/webAudio/webAudioStreamingSound.js +16 -4
  27. package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
  28. package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +2 -2
  29. package/BakedVertexAnimation/bakedVertexAnimationManager.js +151 -121
  30. package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
  31. package/Behaviors/Cameras/interpolatingBehavior.d.ts +17 -2
  32. package/Behaviors/Cameras/interpolatingBehavior.js +53 -23
  33. package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
  34. package/Bones/bone.pure.js +3 -3
  35. package/Buffers/buffer.pure.js +0 -12
  36. package/Buffers/buffer.pure.js.map +1 -1
  37. package/Cameras/Inputs/BaseCameraMouseWheelInput.js +141 -126
  38. package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
  39. package/Cameras/Inputs/BaseCameraPointersInput.d.ts +2 -1
  40. package/Cameras/Inputs/BaseCameraPointersInput.js +290 -277
  41. package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
  42. package/Cameras/Inputs/arcRotateCameraGamepadInput.js +115 -102
  43. package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
  44. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +3 -0
  45. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +334 -273
  46. package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
  47. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +273 -258
  48. package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
  49. package/Cameras/Inputs/arcRotateCameraPointersInput.js +237 -213
  50. package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
  51. package/Cameras/Inputs/flyCameraKeyboardInput.js +199 -168
  52. package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
  53. package/Cameras/Inputs/flyCameraMouseInput.js +243 -229
  54. package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
  55. package/Cameras/Inputs/followCameraKeyboardMoveInput.js +311 -266
  56. package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
  57. package/Cameras/Inputs/followCameraMouseWheelInput.js +139 -119
  58. package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
  59. package/Cameras/Inputs/followCameraPointersInput.js +239 -203
  60. package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
  61. package/Cameras/Inputs/freeCameraGamepadInput.js +127 -114
  62. package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
  63. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +278 -244
  64. package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
  65. package/Cameras/Inputs/freeCameraMouseInput.js +216 -202
  66. package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
  67. package/Cameras/Inputs/freeCameraMouseWheelInput.js +368 -353
  68. package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
  69. package/Cameras/Inputs/freeCameraTouchInput.js +185 -172
  70. package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
  71. package/Cameras/Inputs/geospatialCameraKeyboardInput.d.ts +2 -0
  72. package/Cameras/Inputs/geospatialCameraKeyboardInput.js +291 -246
  73. package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
  74. package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +11 -1
  75. package/Cameras/Inputs/geospatialCameraPointersInput.js +18 -2
  76. package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
  77. package/Cameras/Inputs/orbitCameraPointersInput.js +112 -96
  78. package/Cameras/Inputs/orbitCameraPointersInput.js.map +1 -1
  79. package/Cameras/VR/vrExperienceHelper.d.ts +0 -2
  80. package/Cameras/VR/vrExperienceHelper.js +0 -2
  81. package/Cameras/VR/vrExperienceHelper.js.map +1 -1
  82. package/Cameras/VR/vrExperienceHelper.pure.js +5 -0
  83. package/Cameras/VR/vrExperienceHelper.pure.js.map +1 -1
  84. package/Cameras/arcRotateCamera.pure.js +1559 -1479
  85. package/Cameras/arcRotateCamera.pure.js.map +1 -1
  86. package/Cameras/camera.pure.js +1225 -1178
  87. package/Cameras/camera.pure.js.map +1 -1
  88. package/Cameras/flyCamera.pure.js +369 -351
  89. package/Cameras/flyCamera.pure.js.map +1 -1
  90. package/Cameras/followCamera.pure.js +229 -192
  91. package/Cameras/followCamera.pure.js.map +1 -1
  92. package/Cameras/freeCamera.pure.js +373 -351
  93. package/Cameras/freeCamera.pure.js.map +1 -1
  94. package/Cameras/geospatialCamera.pure.d.ts +30 -7
  95. package/Cameras/geospatialCamera.pure.js +502 -457
  96. package/Cameras/geospatialCamera.pure.js.map +1 -1
  97. package/Cameras/geospatialCameraMovement.js +2 -2
  98. package/Cameras/geospatialCameraMovement.js.map +1 -1
  99. package/Cameras/targetCamera.pure.d.ts +7 -0
  100. package/Cameras/targetCamera.pure.js +550 -509
  101. package/Cameras/targetCamera.pure.js.map +1 -1
  102. package/Cameras/universalCamera.pure.js +98 -85
  103. package/Cameras/universalCamera.pure.js.map +1 -1
  104. package/Collisions/gpuPicker.d.ts +111 -4
  105. package/Collisions/gpuPicker.js +696 -119
  106. package/Collisions/gpuPicker.js.map +1 -1
  107. package/Compute/computeShader.pure.js +372 -355
  108. package/Compute/computeShader.pure.js.map +1 -1
  109. package/Culling/Helper/transformFeedbackBoundingHelper.pure.js +2 -2
  110. package/Decorators/nodeDecorator.d.ts +11 -1
  111. package/Decorators/nodeDecorator.js +43 -6
  112. package/Decorators/nodeDecorator.js.map +1 -1
  113. package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js +8 -0
  114. package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js.map +1 -1
  115. package/Engines/Native/nativeHelpers.js +15 -0
  116. package/Engines/Native/nativeHelpers.js.map +1 -1
  117. package/Engines/Native/nativeInterfaces.d.ts +7 -2
  118. package/Engines/Native/nativeInterfaces.js.map +1 -1
  119. package/Engines/Native/nativeRenderTargetWrapper.d.ts +5 -0
  120. package/Engines/Native/nativeRenderTargetWrapper.js +35 -1
  121. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  122. package/Engines/Processors/shaderProcessor.js +5 -3
  123. package/Engines/Processors/shaderProcessor.js.map +1 -1
  124. package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js +16 -3
  125. package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js.map +1 -1
  126. package/Engines/WebGPU/webgpuClearQuad.pure.js +7 -1
  127. package/Engines/WebGPU/webgpuClearQuad.pure.js.map +1 -1
  128. package/Engines/abstractEngine.functions.d.ts +8 -2
  129. package/Engines/abstractEngine.functions.js +12 -4
  130. package/Engines/abstractEngine.functions.js.map +1 -1
  131. package/Engines/abstractEngine.pure.d.ts +20 -1
  132. package/Engines/abstractEngine.pure.js +21 -134
  133. package/Engines/abstractEngine.pure.js.map +1 -1
  134. package/Engines/engine.d.ts +208 -0
  135. package/Engines/engine.pure.js +0 -15
  136. package/Engines/engine.pure.js.map +1 -1
  137. package/Engines/nullEngine.pure.d.ts +66 -0
  138. package/Engines/nullEngine.pure.js +97 -0
  139. package/Engines/nullEngine.pure.js.map +1 -1
  140. package/Engines/thinEngine.pure.d.ts +0 -13
  141. package/Engines/thinEngine.pure.js +4 -23
  142. package/Engines/thinEngine.pure.js.map +1 -1
  143. package/Engines/thinNativeEngine.d.ts +0 -1
  144. package/Engines/thinNativeEngine.js +0 -1
  145. package/Engines/thinNativeEngine.js.map +1 -1
  146. package/Engines/thinNativeEngine.pure.d.ts +27 -0
  147. package/Engines/thinNativeEngine.pure.js +383 -17
  148. package/Engines/thinNativeEngine.pure.js.map +1 -1
  149. package/Engines/webgpuEngine.d.ts +1 -0
  150. package/Engines/webgpuEngine.js +1 -0
  151. package/Engines/webgpuEngine.js.map +1 -1
  152. package/Engines/webgpuEngine.pure.d.ts +9 -0
  153. package/Engines/webgpuEngine.pure.js +7 -0
  154. package/Engines/webgpuEngine.pure.js.map +1 -1
  155. package/FlowGraph/flowGraph.js +9 -0
  156. package/FlowGraph/flowGraph.js.map +1 -1
  157. package/FlowGraph/flowGraphContext.js +597 -584
  158. package/FlowGraph/flowGraphContext.js.map +1 -1
  159. package/FlowGraph/flowGraphDataConnection.pure.d.ts +14 -0
  160. package/FlowGraph/flowGraphDataConnection.pure.js +38 -1
  161. package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
  162. package/FlowGraph/serialization.d.ts +11 -0
  163. package/FlowGraph/serialization.js +11 -1
  164. package/FlowGraph/serialization.js.map +1 -1
  165. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js +182 -170
  166. package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js.map +1 -1
  167. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js +196 -184
  168. package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js.map +1 -1
  169. package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js +222 -210
  170. package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js.map +1 -1
  171. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +123 -111
  172. package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
  173. package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +158 -146
  174. package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
  175. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js +63 -51
  176. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js.map +1 -1
  177. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js +122 -110
  178. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js.map +1 -1
  179. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js +76 -64
  180. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js.map +1 -1
  181. package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js +89 -77
  182. package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js.map +1 -1
  183. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js +134 -122
  184. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js.map +1 -1
  185. package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js +58 -46
  186. package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js.map +1 -1
  187. package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js +107 -95
  188. package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js.map +1 -1
  189. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js +181 -169
  190. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js.map +1 -1
  191. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js +63 -51
  192. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js.map +1 -1
  193. package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js +63 -51
  194. package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js.map +1 -1
  195. package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js +76 -64
  196. package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js.map +1 -1
  197. package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js +246 -234
  198. package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js.map +1 -1
  199. package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js +108 -96
  200. package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js.map +1 -1
  201. package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js +87 -75
  202. package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js.map +1 -1
  203. package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js +76 -64
  204. package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js.map +1 -1
  205. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js +313 -301
  206. package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js.map +1 -1
  207. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js +502 -490
  208. package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js.map +1 -1
  209. package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js +147 -135
  210. package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js.map +1 -1
  211. package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js +90 -78
  212. package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js.map +1 -1
  213. package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js +179 -167
  214. package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js.map +1 -1
  215. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +462 -451
  216. package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
  217. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +265 -253
  218. package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
  219. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js +204 -192
  220. package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js.map +1 -1
  221. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +611 -550
  222. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
  223. package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js +320 -308
  224. package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js.map +1 -1
  225. package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js +87 -75
  226. package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js.map +1 -1
  227. package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js +154 -142
  228. package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js.map +1 -1
  229. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js +150 -138
  230. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js.map +1 -1
  231. package/FrameGraph/Node/Blocks/inputBlock.pure.js +270 -256
  232. package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
  233. package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js +95 -83
  234. package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js.map +1 -1
  235. package/FrameGraph/Node/nodeRenderGraph.js +715 -693
  236. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
  237. package/FrameGraph/Node/nodeRenderGraphBlock.js +548 -533
  238. package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
  239. package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.d.ts +2 -2
  240. package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js +43 -51
  241. package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js.map +1 -1
  242. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.d.ts +0 -1
  243. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js +0 -1
  244. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js.map +1 -1
  245. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.d.ts +0 -1
  246. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +66 -35
  247. package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
  248. package/Helpers/environmentHelper.js +2 -2
  249. package/Helpers/environmentHelper.js.map +1 -1
  250. package/Layers/effectLayer.js +529 -519
  251. package/Layers/effectLayer.js.map +1 -1
  252. package/Layers/glowLayer.pure.js +428 -413
  253. package/Layers/glowLayer.pure.js.map +1 -1
  254. package/Layers/highlightLayer.pure.js +473 -458
  255. package/Layers/highlightLayer.pure.js.map +1 -1
  256. package/Layers/selectionOutlineLayer.pure.js +360 -345
  257. package/Layers/selectionOutlineLayer.pure.js.map +1 -1
  258. package/Lights/Clustered/clusteredLightContainer.pure.d.ts +1 -1
  259. package/Lights/Clustered/clusteredLightContainer.pure.js +583 -558
  260. package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
  261. package/Lights/Shadows/shadowGenerator.js +6 -1
  262. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  263. package/Lights/areaLight.pure.js +61 -39
  264. package/Lights/areaLight.pure.js.map +1 -1
  265. package/Lights/directionalLight.pure.js +308 -284
  266. package/Lights/directionalLight.pure.js.map +1 -1
  267. package/Lights/hemisphericLight.pure.js +123 -104
  268. package/Lights/hemisphericLight.pure.js.map +1 -1
  269. package/Lights/light.d.ts +5 -3
  270. package/Lights/light.js +869 -827
  271. package/Lights/light.js.map +1 -1
  272. package/Lights/pointLight.pure.js +185 -174
  273. package/Lights/pointLight.pure.js.map +1 -1
  274. package/Lights/rectAreaLight.pure.d.ts +17 -0
  275. package/Lights/rectAreaLight.pure.js +238 -159
  276. package/Lights/rectAreaLight.pure.js.map +1 -1
  277. package/Lights/shadowLight.js +280 -268
  278. package/Lights/shadowLight.js.map +1 -1
  279. package/Lights/spotLight.pure.js +460 -427
  280. package/Lights/spotLight.pure.js.map +1 -1
  281. package/Loading/Plugins/babylonFileLoader.pure.js +17 -5
  282. package/Loading/Plugins/babylonFileLoader.pure.js.map +1 -1
  283. package/Loading/sceneLoader.d.ts +5 -1
  284. package/Loading/sceneLoader.js +299 -402
  285. package/Loading/sceneLoader.js.map +1 -1
  286. package/Materials/Background/backgroundMaterial.pure.d.ts +18 -18
  287. package/Materials/Background/backgroundMaterial.pure.js +949 -794
  288. package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
  289. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.d.ts +15 -0
  290. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +34 -1
  291. package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
  292. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +9 -0
  293. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +26 -2
  294. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
  295. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.d.ts +2 -1
  296. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +169 -149
  297. package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
  298. package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +1 -1
  299. package/Materials/Node/Blocks/Dual/lightBlock.pure.js +442 -429
  300. package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
  301. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js +396 -383
  302. package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js.map +1 -1
  303. package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js +237 -220
  304. package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js.map +1 -1
  305. package/Materials/Node/Blocks/Dual/textureBlock.pure.js +1 -1
  306. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js +150 -133
  307. package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js.map +1 -1
  308. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +265 -250
  309. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
  310. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js +159 -142
  311. package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js.map +1 -1
  312. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +214 -201
  313. package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
  314. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js +419 -400
  315. package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js.map +1 -1
  316. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +3 -1
  317. package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
  318. package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js +302 -289
  319. package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js.map +1 -1
  320. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1327 -1272
  321. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
  322. package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js +352 -337
  323. package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js.map +1 -1
  324. package/Materials/Node/Blocks/PBR/refractionBlock.pure.js +297 -277
  325. package/Materials/Node/Blocks/PBR/refractionBlock.pure.js.map +1 -1
  326. package/Materials/Node/Blocks/PBR/sheenBlock.pure.js +146 -131
  327. package/Materials/Node/Blocks/PBR/sheenBlock.pure.js.map +1 -1
  328. package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js +158 -145
  329. package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js.map +1 -1
  330. package/Materials/Node/Blocks/clampBlock.pure.js +92 -77
  331. package/Materials/Node/Blocks/clampBlock.pure.js.map +1 -1
  332. package/Materials/Node/Blocks/cloudBlock.pure.js +145 -132
  333. package/Materials/Node/Blocks/cloudBlock.pure.js.map +1 -1
  334. package/Materials/Node/Blocks/conditionalBlock.pure.js +182 -169
  335. package/Materials/Node/Blocks/conditionalBlock.pure.js.map +1 -1
  336. package/Materials/Node/Blocks/curveBlock.pure.js +259 -246
  337. package/Materials/Node/Blocks/curveBlock.pure.js.map +1 -1
  338. package/Materials/Node/Blocks/debugBlock.pure.js +119 -106
  339. package/Materials/Node/Blocks/debugBlock.pure.js.map +1 -1
  340. package/Materials/Node/Blocks/loopBlock.pure.js +123 -110
  341. package/Materials/Node/Blocks/loopBlock.pure.js.map +1 -1
  342. package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js +185 -172
  343. package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js.map +1 -1
  344. package/Materials/Node/Blocks/remapBlock.pure.js +127 -112
  345. package/Materials/Node/Blocks/remapBlock.pure.js.map +1 -1
  346. package/Materials/Node/Blocks/transformBlock.pure.js +196 -185
  347. package/Materials/Node/Blocks/transformBlock.pure.js.map +1 -1
  348. package/Materials/Node/Blocks/triPlanarBlock.pure.js +451 -438
  349. package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
  350. package/Materials/Node/Blocks/trigonometryBlock.pure.js +184 -171
  351. package/Materials/Node/Blocks/trigonometryBlock.pure.js.map +1 -1
  352. package/Materials/Node/Blocks/waveBlock.pure.js +97 -84
  353. package/Materials/Node/Blocks/waveBlock.pure.js.map +1 -1
  354. package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js +276 -263
  355. package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js.map +1 -1
  356. package/Materials/Node/nodeMaterial.pure.js +1765 -1737
  357. package/Materials/Node/nodeMaterial.pure.js.map +1 -1
  358. package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
  359. package/Materials/PBR/openpbrMaterial.pure.d.ts +102 -102
  360. package/Materials/PBR/openpbrMaterial.pure.js +3115 -2243
  361. package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
  362. package/Materials/PBR/pbrAnisotropicConfiguration.d.ts +3 -3
  363. package/Materials/PBR/pbrAnisotropicConfiguration.js +255 -227
  364. package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
  365. package/Materials/PBR/pbrBRDFConfiguration.d.ts +9 -9
  366. package/Materials/PBR/pbrBRDFConfiguration.js +203 -155
  367. package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
  368. package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
  369. package/Materials/PBR/pbrBaseMaterial.pure.js +1751 -1736
  370. package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
  371. package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +13 -13
  372. package/Materials/PBR/pbrBaseSimpleMaterial.js +205 -117
  373. package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
  374. package/Materials/PBR/pbrClearCoatConfiguration.d.ts +9 -9
  375. package/Materials/PBR/pbrClearCoatConfiguration.js +464 -406
  376. package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
  377. package/Materials/PBR/pbrIridescenceConfiguration.d.ts +3 -3
  378. package/Materials/PBR/pbrIridescenceConfiguration.js +271 -239
  379. package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
  380. package/Materials/PBR/pbrMaterial.pure.d.ts +66 -66
  381. package/Materials/PBR/pbrMaterial.pure.js +1041 -685
  382. package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
  383. package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.d.ts +5 -5
  384. package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js +176 -115
  385. package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js.map +1 -1
  386. package/Materials/PBR/pbrSheenConfiguration.d.ts +7 -7
  387. package/Materials/PBR/pbrSheenConfiguration.js +314 -270
  388. package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
  389. package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.d.ts +5 -5
  390. package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js +172 -117
  391. package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js.map +1 -1
  392. package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +16 -16
  393. package/Materials/PBR/pbrSubSurfaceConfiguration.js +864 -764
  394. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  395. package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +43 -0
  396. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +64 -0
  397. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -0
  398. package/Materials/Textures/HTML/htmlInteractionManager.d.ts +69 -0
  399. package/Materials/Textures/HTML/htmlInteractionManager.js +130 -0
  400. package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -0
  401. package/Materials/Textures/HTML/htmlRaycastInteractionManager.d.ts +84 -0
  402. package/Materials/Textures/HTML/htmlRaycastInteractionManager.js +246 -0
  403. package/Materials/Textures/HTML/htmlRaycastInteractionManager.js.map +1 -0
  404. package/Materials/Textures/HTML/htmlTexture.d.ts +148 -0
  405. package/Materials/Textures/HTML/htmlTexture.js +455 -0
  406. package/Materials/Textures/HTML/htmlTexture.js.map +1 -0
  407. package/Materials/Textures/HTML/index.d.ts +4 -0
  408. package/Materials/Textures/HTML/index.js +5 -0
  409. package/Materials/Textures/HTML/index.js.map +1 -0
  410. package/Materials/Textures/HTML/pure.d.ts +5 -0
  411. package/Materials/Textures/HTML/pure.js +6 -0
  412. package/Materials/Textures/HTML/pure.js.map +1 -0
  413. package/Materials/Textures/Procedurals/proceduralTexture.pure.js +671 -643
  414. package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
  415. package/Materials/Textures/baseTexture.pure.js +880 -825
  416. package/Materials/Textures/baseTexture.pure.js.map +1 -1
  417. package/Materials/Textures/cubeTexture.d.ts +0 -1
  418. package/Materials/Textures/cubeTexture.js +0 -1
  419. package/Materials/Textures/cubeTexture.js.map +1 -1
  420. package/Materials/Textures/cubeTexture.pure.js +368 -333
  421. package/Materials/Textures/cubeTexture.pure.js.map +1 -1
  422. package/Materials/Textures/dynamicTexture.d.ts +0 -1
  423. package/Materials/Textures/dynamicTexture.js +0 -1
  424. package/Materials/Textures/dynamicTexture.js.map +1 -1
  425. package/Materials/Textures/dynamicTexture.pure.js +2 -0
  426. package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
  427. package/Materials/Textures/htmlElementTexture.d.ts +0 -2
  428. package/Materials/Textures/htmlElementTexture.js +0 -2
  429. package/Materials/Textures/htmlElementTexture.js.map +1 -1
  430. package/Materials/Textures/htmlElementTexture.pure.js +4 -0
  431. package/Materials/Textures/htmlElementTexture.pure.js.map +1 -1
  432. package/Materials/Textures/index.d.ts +1 -0
  433. package/Materials/Textures/index.js +1 -1
  434. package/Materials/Textures/index.js.map +1 -1
  435. package/Materials/Textures/multiRenderTarget.d.ts +0 -1
  436. package/Materials/Textures/multiRenderTarget.js +0 -1
  437. package/Materials/Textures/multiRenderTarget.js.map +1 -1
  438. package/Materials/Textures/multiRenderTarget.pure.js +2 -0
  439. package/Materials/Textures/multiRenderTarget.pure.js.map +1 -1
  440. package/Materials/Textures/pure.d.ts +1 -0
  441. package/Materials/Textures/pure.js +1 -0
  442. package/Materials/Textures/pure.js.map +1 -1
  443. package/Materials/Textures/texture.pure.js +961 -923
  444. package/Materials/Textures/texture.pure.js.map +1 -1
  445. package/Materials/Textures/videoTexture.pure.d.ts +3 -0
  446. package/Materials/Textures/videoTexture.pure.js +450 -401
  447. package/Materials/Textures/videoTexture.pure.js.map +1 -1
  448. package/Materials/colorCurves.pure.js +510 -477
  449. package/Materials/colorCurves.pure.js.map +1 -1
  450. package/Materials/effect.pure.js +0 -7
  451. package/Materials/effect.pure.js.map +1 -1
  452. package/Materials/imageProcessing.js +12 -4
  453. package/Materials/imageProcessing.js.map +1 -1
  454. package/Materials/imageProcessingConfiguration.pure.js +647 -587
  455. package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
  456. package/Materials/material.decalMapConfiguration.pure.d.ts +2 -2
  457. package/Materials/material.decalMapConfiguration.pure.js +149 -130
  458. package/Materials/material.decalMapConfiguration.pure.js.map +1 -1
  459. package/Materials/material.detailMapConfiguration.d.ts +3 -3
  460. package/Materials/material.detailMapConfiguration.js +213 -175
  461. package/Materials/material.detailMapConfiguration.js.map +1 -1
  462. package/Materials/material.pure.js +1815 -1721
  463. package/Materials/material.pure.js.map +1 -1
  464. package/Materials/materialPluginBase.pure.js +270 -249
  465. package/Materials/materialPluginBase.pure.js.map +1 -1
  466. package/Materials/materialPluginManager.pure.js +18 -8
  467. package/Materials/materialPluginManager.pure.js.map +1 -1
  468. package/Materials/materialStencilState.js +211 -200
  469. package/Materials/materialStencilState.js.map +1 -1
  470. package/Materials/meshDebugPluginMaterial.pure.d.ts +2 -2
  471. package/Materials/meshDebugPluginMaterial.pure.js +397 -275
  472. package/Materials/meshDebugPluginMaterial.pure.js.map +1 -1
  473. package/Materials/standardMaterial.pure.d.ts +32 -32
  474. package/Materials/standardMaterial.pure.js +1804 -1394
  475. package/Materials/standardMaterial.pure.js.map +1 -1
  476. package/Maths/math.color.pure.js +5 -5
  477. package/Maths/math.functions.js +38 -30
  478. package/Maths/math.functions.js.map +1 -1
  479. package/Maths/math.vector.pure.js +25 -25
  480. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +18 -8
  481. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  482. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +86 -1
  483. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +255 -104
  484. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  485. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.d.ts +39 -0
  486. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +322 -0
  487. package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -0
  488. package/Meshes/GreasedLine/greasedLineMesh.pure.js +4 -4
  489. package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
  490. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +107 -94
  491. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
  492. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js +276 -263
  493. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js.map +1 -1
  494. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js +247 -232
  495. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js.map +1 -1
  496. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +299 -284
  497. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
  498. package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js +196 -181
  499. package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js.map +1 -1
  500. package/Meshes/Node/Blocks/Set/latticeBlock.pure.js +198 -179
  501. package/Meshes/Node/Blocks/Set/latticeBlock.pure.js.map +1 -1
  502. package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js +151 -138
  503. package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js.map +1 -1
  504. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js +107 -94
  505. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js.map +1 -1
  506. package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js +138 -125
  507. package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js.map +1 -1
  508. package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js +213 -200
  509. package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js.map +1 -1
  510. package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js +138 -125
  511. package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js.map +1 -1
  512. package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js +179 -164
  513. package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js.map +1 -1
  514. package/Meshes/Node/Blocks/Sources/boxBlock.pure.js +183 -170
  515. package/Meshes/Node/Blocks/Sources/boxBlock.pure.js.map +1 -1
  516. package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js +125 -112
  517. package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js.map +1 -1
  518. package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js +153 -140
  519. package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js.map +1 -1
  520. package/Meshes/Node/Blocks/Sources/discBlock.pure.js +112 -99
  521. package/Meshes/Node/Blocks/Sources/discBlock.pure.js.map +1 -1
  522. package/Meshes/Node/Blocks/Sources/gridBlock.pure.js +133 -120
  523. package/Meshes/Node/Blocks/Sources/gridBlock.pure.js.map +1 -1
  524. package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js +128 -115
  525. package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js.map +1 -1
  526. package/Meshes/Node/Blocks/Sources/meshBlock.pure.js +116 -103
  527. package/Meshes/Node/Blocks/Sources/meshBlock.pure.js.map +1 -1
  528. package/Meshes/Node/Blocks/Sources/planeBlock.pure.js +160 -147
  529. package/Meshes/Node/Blocks/Sources/planeBlock.pure.js.map +1 -1
  530. package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js +144 -131
  531. package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js.map +1 -1
  532. package/Meshes/Node/Blocks/Sources/torusBlock.pure.js +112 -99
  533. package/Meshes/Node/Blocks/Sources/torusBlock.pure.js.map +1 -1
  534. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js +200 -185
  535. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js.map +1 -1
  536. package/Meshes/Node/Blocks/bevelBlock.pure.js +111 -98
  537. package/Meshes/Node/Blocks/bevelBlock.pure.js.map +1 -1
  538. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +182 -165
  539. package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
  540. package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js +89 -76
  541. package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js.map +1 -1
  542. package/Meshes/Node/Blocks/conditionBlock.pure.js +184 -169
  543. package/Meshes/Node/Blocks/conditionBlock.pure.js.map +1 -1
  544. package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js +270 -255
  545. package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js.map +1 -1
  546. package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js +172 -159
  547. package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js.map +1 -1
  548. package/Meshes/Node/Blocks/geometryCurveBlock.pure.js +230 -217
  549. package/Meshes/Node/Blocks/geometryCurveBlock.pure.js.map +1 -1
  550. package/Meshes/Node/Blocks/geometryEaseBlock.pure.js +256 -245
  551. package/Meshes/Node/Blocks/geometryEaseBlock.pure.js.map +1 -1
  552. package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +206 -189
  553. package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
  554. package/Meshes/Node/Blocks/geometryTransformBlock.pure.js +166 -153
  555. package/Meshes/Node/Blocks/geometryTransformBlock.pure.js.map +1 -1
  556. package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js +221 -208
  557. package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js.map +1 -1
  558. package/Meshes/Node/Blocks/mappingBlock.pure.js +150 -137
  559. package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
  560. package/Meshes/Node/Blocks/mathBlock.pure.js +269 -256
  561. package/Meshes/Node/Blocks/mathBlock.pure.js.map +1 -1
  562. package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js +141 -128
  563. package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js.map +1 -1
  564. package/Meshes/Node/Blocks/randomBlock.pure.js +161 -148
  565. package/Meshes/Node/Blocks/randomBlock.pure.js.map +1 -1
  566. package/Meshes/Node/Blocks/subdivideBlock.pure.js +102 -87
  567. package/Meshes/Node/Blocks/subdivideBlock.pure.js.map +1 -1
  568. package/Meshes/Node/nodeGeometry.js +560 -538
  569. package/Meshes/Node/nodeGeometry.js.map +1 -1
  570. package/Meshes/Node/nodeGeometryBlock.js +473 -458
  571. package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
  572. package/Meshes/abstractMesh.pure.js +2218 -2207
  573. package/Meshes/abstractMesh.pure.js.map +1 -1
  574. package/Meshes/geometry.js +30 -15
  575. package/Meshes/geometry.js.map +1 -1
  576. package/Meshes/mesh.pure.js +26 -14
  577. package/Meshes/mesh.pure.js.map +1 -1
  578. package/Meshes/mesh.vertexData.js +1665 -1655
  579. package/Meshes/mesh.vertexData.js.map +1 -1
  580. package/Meshes/transformNode.pure.js +1400 -1372
  581. package/Meshes/transformNode.pure.js.map +1 -1
  582. package/Misc/decorators.d.ts +34 -19
  583. package/Misc/decorators.functions.d.ts +33 -2
  584. package/Misc/decorators.functions.js +114 -35
  585. package/Misc/decorators.functions.js.map +1 -1
  586. package/Misc/decorators.js +96 -68
  587. package/Misc/decorators.js.map +1 -1
  588. package/Misc/decorators.serialization.js +47 -40
  589. package/Misc/decorators.serialization.js.map +1 -1
  590. package/Misc/decorators.serializationUtilities.d.ts +24 -0
  591. package/Misc/decorators.serializationUtilities.js +20 -0
  592. package/Misc/decorators.serializationUtilities.js.map +1 -0
  593. package/Misc/dumpTools.pure.js +43 -33
  594. package/Misc/dumpTools.pure.js.map +1 -1
  595. package/Misc/fileTools.pure.js +8 -0
  596. package/Misc/fileTools.pure.js.map +1 -1
  597. package/Misc/observable.pure.js +0 -7
  598. package/Misc/observable.pure.js.map +1 -1
  599. package/Misc/snapshotRenderingHelper.d.ts +4 -1
  600. package/Misc/snapshotRenderingHelper.js.map +1 -1
  601. package/Misc/symbolMetadataPolyfill.d.ts +11 -0
  602. package/Misc/symbolMetadataPolyfill.js +22 -0
  603. package/Misc/symbolMetadataPolyfill.js.map +1 -0
  604. package/Misc/tools.pure.js +2 -2
  605. package/Misc/tools.pure.js.map +1 -1
  606. package/Morph/morphTarget.js +382 -365
  607. package/Morph/morphTarget.js.map +1 -1
  608. package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js +160 -145
  609. package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js.map +1 -1
  610. package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js +187 -174
  611. package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js.map +1 -1
  612. package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js +238 -219
  613. package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js.map +1 -1
  614. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js +140 -115
  615. package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js.map +1 -1
  616. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js +157 -144
  617. package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js.map +1 -1
  618. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js +133 -119
  619. package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js.map +1 -1
  620. package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js +93 -80
  621. package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js.map +1 -1
  622. package/Particles/Node/Blocks/particleDebugBlock.pure.js +117 -105
  623. package/Particles/Node/Blocks/particleDebugBlock.pure.js.map +1 -1
  624. package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js +105 -92
  625. package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js.map +1 -1
  626. package/Particles/Node/Blocks/particleGradientValueBlock.pure.js +82 -69
  627. package/Particles/Node/Blocks/particleGradientValueBlock.pure.js.map +1 -1
  628. package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js +113 -101
  629. package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js.map +1 -1
  630. package/Particles/Node/Blocks/particleMathBlock.pure.js +278 -265
  631. package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
  632. package/Particles/Node/Blocks/particleNumberMathBlock.pure.js +155 -142
  633. package/Particles/Node/Blocks/particleNumberMathBlock.pure.js.map +1 -1
  634. package/Particles/Node/Blocks/particleRandomBlock.pure.js +156 -143
  635. package/Particles/Node/Blocks/particleRandomBlock.pure.js.map +1 -1
  636. package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js +217 -204
  637. package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js.map +1 -1
  638. package/Particles/Node/Blocks/particleVectorMathBlock.pure.js +106 -93
  639. package/Particles/Node/Blocks/particleVectorMathBlock.pure.js.map +1 -1
  640. package/Particles/Node/Blocks/systemBlock.pure.js +366 -330
  641. package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
  642. package/Particles/Node/nodeParticleBlock.js +339 -324
  643. package/Particles/Node/nodeParticleBlock.js.map +1 -1
  644. package/Particles/Node/nodeParticleSystemSet.js +494 -473
  645. package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
  646. package/Particles/gpuParticleSystem.d.ts +0 -1
  647. package/Particles/gpuParticleSystem.js +0 -1
  648. package/Particles/gpuParticleSystem.js.map +1 -1
  649. package/Particles/gpuParticleSystem.pure.d.ts +4 -3
  650. package/Particles/gpuParticleSystem.pure.js +27 -16
  651. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  652. package/Particles/particleSystem.pure.js +57 -2
  653. package/Particles/particleSystem.pure.js.map +1 -1
  654. package/Particles/thinParticleSystem.d.ts +0 -1
  655. package/Particles/thinParticleSystem.js +0 -1
  656. package/Particles/thinParticleSystem.js.map +1 -1
  657. package/Particles/thinParticleSystem.pure.js +2 -0
  658. package/Particles/thinParticleSystem.pure.js.map +1 -1
  659. package/Particles/webgl2ParticleSystem.pure.js +2 -0
  660. package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
  661. package/Physics/v1/physicsImpostor.pure.js +4 -4
  662. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +675 -656
  663. package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
  664. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +0 -1
  665. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +0 -1
  666. package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
  667. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js +521 -486
  668. package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js.map +1 -1
  669. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +0 -1
  670. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +0 -1
  671. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
  672. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js +241 -220
  673. package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js.map +1 -1
  674. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js +852 -835
  675. package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js.map +1 -1
  676. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js +1135 -1073
  677. package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js.map +1 -1
  678. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js +319 -303
  679. package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js.map +1 -1
  680. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +212 -199
  681. package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
  682. package/PostProcesses/blackAndWhitePostProcess.pure.js +67 -55
  683. package/PostProcesses/blackAndWhitePostProcess.pure.js.map +1 -1
  684. package/PostProcesses/bloomMergePostProcess.pure.js +74 -62
  685. package/PostProcesses/bloomMergePostProcess.pure.js.map +1 -1
  686. package/PostProcesses/blurPostProcess.pure.js +127 -115
  687. package/PostProcesses/blurPostProcess.pure.js.map +1 -1
  688. package/PostProcesses/chromaticAberrationPostProcess.pure.js +130 -118
  689. package/PostProcesses/chromaticAberrationPostProcess.pure.js.map +1 -1
  690. package/PostProcesses/circleOfConfusionPostProcess.pure.js +115 -104
  691. package/PostProcesses/circleOfConfusionPostProcess.pure.js.map +1 -1
  692. package/PostProcesses/colorCorrectionPostProcess.pure.js +55 -43
  693. package/PostProcesses/colorCorrectionPostProcess.pure.js.map +1 -1
  694. package/PostProcesses/convolutionPostProcess.pure.js +96 -84
  695. package/PostProcesses/convolutionPostProcess.pure.js.map +1 -1
  696. package/PostProcesses/extractHighlightsPostProcess.pure.js +68 -57
  697. package/PostProcesses/extractHighlightsPostProcess.pure.js.map +1 -1
  698. package/PostProcesses/filterPostProcess.pure.js +66 -54
  699. package/PostProcesses/filterPostProcess.pure.js.map +1 -1
  700. package/PostProcesses/fxaaPostProcess.pure.js.map +1 -1
  701. package/PostProcesses/grainPostProcess.pure.js +82 -70
  702. package/PostProcesses/grainPostProcess.pure.js.map +1 -1
  703. package/PostProcesses/imageProcessingPostProcess.js +334 -322
  704. package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
  705. package/PostProcesses/motionBlurPostProcess.pure.js +246 -235
  706. package/PostProcesses/motionBlurPostProcess.pure.js.map +1 -1
  707. package/PostProcesses/passPostProcess.pure.js +75 -63
  708. package/PostProcesses/passPostProcess.pure.js.map +1 -1
  709. package/PostProcesses/postProcess.pure.js +899 -835
  710. package/PostProcesses/postProcess.pure.js.map +1 -1
  711. package/PostProcesses/refractionPostProcess.pure.js +114 -87
  712. package/PostProcesses/refractionPostProcess.pure.js.map +1 -1
  713. package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +108 -96
  714. package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
  715. package/PostProcesses/screenSpaceReflectionPostProcess.pure.js +241 -220
  716. package/PostProcesses/screenSpaceReflectionPostProcess.pure.js.map +1 -1
  717. package/PostProcesses/sharpenPostProcess.pure.js +86 -74
  718. package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
  719. package/PostProcesses/tonemapPostProcess.pure.js +82 -70
  720. package/PostProcesses/tonemapPostProcess.pure.js.map +1 -1
  721. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +500 -465
  722. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
  723. package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +0 -1
  724. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +0 -1
  725. package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
  726. package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js +2 -0
  727. package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js.map +1 -1
  728. package/Probes/reflectionProbe.pure.js +238 -224
  729. package/Probes/reflectionProbe.pure.js.map +1 -1
  730. package/Rendering/GlobalIllumination/giRSMManager.pure.d.ts +1 -1
  731. package/Rendering/GlobalIllumination/giRSMManager.pure.js +138 -105
  732. package/Rendering/GlobalIllumination/giRSMManager.pure.js.map +1 -1
  733. package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -1
  734. package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +155 -138
  735. package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
  736. package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +0 -2
  737. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +0 -2
  738. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
  739. package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +5 -0
  740. package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
  741. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +0 -1
  742. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +0 -1
  743. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
  744. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +1 -0
  745. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +34 -0
  746. package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
  747. package/Rendering/edgesRenderer.pure.js.map +1 -1
  748. package/Rendering/prePassRenderer.d.ts +0 -2
  749. package/Rendering/prePassRenderer.js +0 -2
  750. package/Rendering/prePassRenderer.js.map +1 -1
  751. package/Rendering/prePassRenderer.pure.js +2 -0
  752. package/Rendering/prePassRenderer.pure.js.map +1 -1
  753. package/Rendering/reflectiveShadowMap.pure.d.ts +1 -1
  754. package/Rendering/reflectiveShadowMap.pure.js +151 -130
  755. package/Rendering/reflectiveShadowMap.pure.js.map +1 -1
  756. package/Rendering/thinDepthPeelingRenderer.d.ts +0 -1
  757. package/Rendering/thinDepthPeelingRenderer.js +0 -1
  758. package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
  759. package/Shaders/ShadersInclude/gaussianSplatting.js +1 -0
  760. package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
  761. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +35 -5
  762. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
  763. package/Shaders/gaussianSplatting.fragment.js +17 -1
  764. package/Shaders/gaussianSplatting.fragment.js.map +1 -1
  765. package/Shaders/gaussianSplatting.vertex.js +1 -1
  766. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  767. package/Shaders/gaussianSplattingDepth.vertex.js +1 -1
  768. package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
  769. package/Shaders/picking.fragment.js +39 -3
  770. package/Shaders/picking.fragment.js.map +1 -1
  771. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +3 -1
  772. package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
  773. package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
  774. package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
  775. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +39 -7
  776. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
  777. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +4 -3
  778. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
  779. package/ShadersWGSL/gaussianSplatting.fragment.js +14 -1
  780. package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
  781. package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
  782. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  783. package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -2
  784. package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
  785. package/ShadersWGSL/lightingVolume.compute.js +2 -2
  786. package/ShadersWGSL/lightingVolume.compute.js.map +1 -1
  787. package/ShadersWGSL/picking.fragment.js +22 -1
  788. package/ShadersWGSL/picking.fragment.js.map +1 -1
  789. package/XR/features/Layers/WebXRCompositionLayer.d.ts +3 -2
  790. package/XR/features/Layers/WebXRCompositionLayer.js +2 -2
  791. package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
  792. package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +59 -0
  793. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +120 -0
  794. package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -0
  795. package/XR/features/Layers/WebXRWebGPUProjectionLayer.d.ts +25 -0
  796. package/XR/features/Layers/WebXRWebGPUProjectionLayer.js +69 -0
  797. package/XR/features/Layers/WebXRWebGPUProjectionLayer.js.map +1 -0
  798. package/XR/features/WebXRLayers.pure.d.ts +8 -0
  799. package/XR/features/WebXRLayers.pure.js +43 -6
  800. package/XR/features/WebXRLayers.pure.js.map +1 -1
  801. package/XR/native/nativeXRRenderTarget.d.ts +2 -2
  802. package/XR/native/nativeXRRenderTarget.js +2 -2
  803. package/XR/native/nativeXRRenderTarget.js.map +1 -1
  804. package/XR/webXRExperienceHelper.js +10 -1
  805. package/XR/webXRExperienceHelper.js.map +1 -1
  806. package/XR/webXRGraphicsBinding.d.ts +90 -0
  807. package/XR/webXRGraphicsBinding.js +85 -0
  808. package/XR/webXRGraphicsBinding.js.map +1 -0
  809. package/XR/webXRLayerRenderTargetTexture.d.ts +24 -0
  810. package/XR/webXRLayerRenderTargetTexture.js +30 -0
  811. package/XR/webXRLayerRenderTargetTexture.js.map +1 -0
  812. package/XR/webXRManagedOutputCanvas.d.ts +14 -0
  813. package/XR/webXRManagedOutputCanvas.js +24 -5
  814. package/XR/webXRManagedOutputCanvas.js.map +1 -1
  815. package/XR/webXRRenderTargetTextureProvider.d.ts +25 -4
  816. package/XR/webXRRenderTargetTextureProvider.js +33 -35
  817. package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
  818. package/XR/webXRSessionManager.d.ts +11 -0
  819. package/XR/webXRSessionManager.js +37 -0
  820. package/XR/webXRSessionManager.js.map +1 -1
  821. package/XR/webXRTypes.d.ts +9 -6
  822. package/XR/webXRTypes.js.map +1 -1
  823. package/XR/webXRWebGLLayer.d.ts +2 -2
  824. package/XR/webXRWebGLLayer.js +2 -2
  825. package/XR/webXRWebGLLayer.js.map +1 -1
  826. package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +12 -0
  827. package/XR/webXRWebGLRenderTargetTextureProvider.js +58 -0
  828. package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -0
  829. package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +69 -0
  830. package/XR/webXRWebGPURenderTargetTextureProvider.js +148 -0
  831. package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -0
  832. package/index.d.ts +1 -0
  833. package/index.js +1 -0
  834. package/index.js.map +1 -1
  835. package/node.js +878 -845
  836. package/node.js.map +1 -1
  837. package/package.json +8 -14
  838. package/scene.pure.d.ts +12 -0
  839. package/scene.pure.js +36 -0
  840. package/scene.pure.js.map +1 -1
  841. package/tslib.es6.js +304 -150
@@ -1 +1 @@
1
- {"version":3,"file":"imageProcessingConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/imageProcessingConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,iCAAiC,EAAE,iCAAiC,EAAE,MAAM,0CAA0C,CAAC;AAChI,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,4BAA4B;IAAzC;QAkBI;;WAEG;QAEI,gBAAW,GAA0B,IAAI,WAAW,EAAE,CAAC;QAGtD,wBAAmB,GAAG,KAAK,CAAC;QAwC5B,yBAAoB,GAAG,KAAK,CAAC;QAoB7B,gCAA2B,GAAG,IAAI,CAAC;QAoBnC,qBAAgB,GAAG,IAAI,CAAC;QAmBhC,gBAAgB;QAET,cAAS,GAAG,GAAG,CAAC;QAoBf,wBAAmB,GAAG,KAAK,CAAC;QAoB5B,qBAAgB,GAAG,4BAA4B,CAAC,oBAAo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N,iBAAiB,EAAE;mEACkC;AAM/C;IADN,SAAS,EAAE;uEACmB;AAGvB;IADP,SAAS,EAAE;wEACoE;AAoBxE;IADP,SAAS,EAAE;sEACqB;AAoBzB;IADP,SAAS,EAAE;uEACsB;AAsB1B;IADP,SAAS,EAAE;yEAC8B;AAqBnC;IADN,SAAS,EAAE;0EACwB;AAuB7B;IADN,SAAS,EAAE;yEACuB;AAoB3B;IADP,SAAS,EAAE;gEACc;AAuBnB;IADN,SAAS,EAAE;wEACkB;AAMvB;IADN,SAAS,EAAE;yEACmB;AAsMnC,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAAC,MAAW;IACzD,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,4BAA4B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACvG,yBAAyB;IACzB,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACpD,CAAC;IACD,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACpD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oCAAoC;IAChD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,4BAA4B,CAAC,KAAK,GAAG,iCAAiC,CAAC;IAEvE,mBAAmB,CAAC,mCAAmC,GAAG,iCAAiC,CAAC;IAE5F,sBAAsB;IACtB,aAAa,CAAC,sCAAsC,EAAE,4BAA4B,CAAC,CAAC;AACxF,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, serializeAsTexture, serializeAsColorCurves, serializeAsColor4 } from \"../Misc/decorators\";\r\nimport { Observable } from \"../Misc/observable.pure\";\r\nimport { type Nullable } from \"../types\";\r\nimport { Color4 } from \"../Maths/math.color.pure\";\r\nimport { ColorCurves, ColorCurvesBind } from \"../Materials/colorCurves.pure\";\r\nimport { type BaseTexture } from \"../Materials/Textures/baseTexture.pure\";\r\nimport { type Effect } from \"../Materials/effect.pure\";\r\nimport { Mix } from \"../Misc/tools.functions\";\r\nimport { SerializationHelper } from \"../Misc/decorators.serialization\";\r\nimport { type IImageProcessingConfigurationDefines } from \"./imageProcessingConfiguration.defines\";\r\nimport { PrepareSamplersForImageProcessing, PrepareUniformsForImageProcessing } from \"./imageProcessingConfiguration.functions\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This groups together the common properties used for image processing either in direct forward pass\r\n * or through post processing effect depending on the use of the image processing pipeline in your scene\r\n * or not.\r\n */\r\nexport class ImageProcessingConfiguration {\r\n /**\r\n * Default tone mapping applied in BabylonJS.\r\n */\r\n public static readonly TONEMAPPING_STANDARD = 0;\r\n\r\n /**\r\n * ACES Tone mapping (used by default in unreal and unity). This can help getting closer\r\n * to other engines rendering to increase portability.\r\n */\r\n public static readonly TONEMAPPING_ACES = 1;\r\n\r\n /**\r\n * Neutral Tone mapping developped by the Khronos group in order to constrain\r\n * values between 0 and 1 without shifting Hue.\r\n */\r\n public static readonly TONEMAPPING_KHR_PBR_NEUTRAL = 2;\r\n\r\n /**\r\n * Color curves setup used in the effect if colorCurvesEnabled is set to true\r\n */\r\n @serializeAsColorCurves()\r\n public colorCurves: Nullable<ColorCurves> = new ColorCurves();\r\n\r\n @serialize()\r\n private _colorCurvesEnabled = false;\r\n /**\r\n * Gets whether the color curves effect is enabled.\r\n */\r\n public get colorCurvesEnabled(): boolean {\r\n return this._colorCurvesEnabled;\r\n }\r\n /**\r\n * Sets whether the color curves effect is enabled.\r\n */\r\n public set colorCurvesEnabled(value: boolean) {\r\n if (this._colorCurvesEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorCurvesEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serializeAsTexture(\"colorGradingTexture\")\r\n private _colorGradingTexture: Nullable<BaseTexture>;\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public get colorGradingTexture(): Nullable<BaseTexture> {\r\n return this._colorGradingTexture;\r\n }\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public set colorGradingTexture(value: Nullable<BaseTexture>) {\r\n if (this._colorGradingTexture === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingTexture = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingEnabled = false;\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public get colorGradingEnabled(): boolean {\r\n return this._colorGradingEnabled;\r\n }\r\n /**\r\n * Sets whether the color grading effect is enabled.\r\n */\r\n public set colorGradingEnabled(value: boolean) {\r\n if (this._colorGradingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingWithGreenDepth = true;\r\n /**\r\n * Gets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public get colorGradingWithGreenDepth(): boolean {\r\n return this._colorGradingWithGreenDepth;\r\n }\r\n /**\r\n * Sets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public set colorGradingWithGreenDepth(value: boolean) {\r\n if (this._colorGradingWithGreenDepth === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingWithGreenDepth = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingBGR = true;\r\n /**\r\n * Gets whether the color grading texture contains BGR values.\r\n */\r\n public get colorGradingBGR(): boolean {\r\n return this._colorGradingBGR;\r\n }\r\n /**\r\n * Sets whether the color grading texture contains BGR values.\r\n */\r\n public set colorGradingBGR(value: boolean) {\r\n if (this._colorGradingBGR === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingBGR = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _exposure = 1.0;\r\n /**\r\n * Gets the Exposure used in the effect.\r\n */\r\n public get exposure(): number {\r\n return this._exposure;\r\n }\r\n /**\r\n * Sets the Exposure used in the effect.\r\n */\r\n public set exposure(value: number) {\r\n if (this._exposure === value) {\r\n return;\r\n }\r\n\r\n this._exposure = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingEnabled = false;\r\n /**\r\n * Gets whether the tone mapping effect is enabled.\r\n */\r\n public get toneMappingEnabled(): boolean {\r\n return this._toneMappingEnabled;\r\n }\r\n /**\r\n * Sets whether the tone mapping effect is enabled.\r\n */\r\n public set toneMappingEnabled(value: boolean) {\r\n if (this._toneMappingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingType = ImageProcessingConfiguration.TONEMAPPING_STANDARD;\r\n /**\r\n * Gets the type of tone mapping effect.\r\n */\r\n public get toneMappingType(): number {\r\n return this._toneMappingType;\r\n }\r\n /**\r\n * Sets the type of tone mapping effect used in BabylonJS.\r\n */\r\n public set toneMappingType(value: number) {\r\n if (this._toneMappingType === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingType = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n protected _contrast = 1.0;\r\n /**\r\n * Gets the contrast used in the effect.\r\n */\r\n public get contrast(): number {\r\n return this._contrast;\r\n }\r\n /**\r\n * Sets the contrast used in the effect.\r\n */\r\n public set contrast(value: number) {\r\n if (this._contrast === value) {\r\n return;\r\n }\r\n\r\n this._contrast = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Vignette stretch size.\r\n */\r\n @serialize()\r\n public vignetteStretch = 0;\r\n\r\n /**\r\n * Vignette center X Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterX = 0;\r\n\r\n /**\r\n * Vignette center Y Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterY = 0;\r\n\r\n /**\r\n * Back Compat: Vignette center Y Offset.\r\n * @deprecated use vignetteCenterY instead\r\n */\r\n public get vignetteCentreY(): number {\r\n return this.vignetteCenterY;\r\n }\r\n public set vignetteCentreY(value: number) {\r\n this.vignetteCenterY = value;\r\n }\r\n\r\n /**\r\n * Back Compat: Vignette center X Offset.\r\n * @deprecated use vignetteCenterX instead\r\n */\r\n public get vignetteCentreX(): number {\r\n return this.vignetteCenterX;\r\n }\r\n public set vignetteCentreX(value: number) {\r\n this.vignetteCenterX = value;\r\n }\r\n\r\n /**\r\n * Vignette weight or intensity of the vignette effect.\r\n */\r\n @serialize()\r\n public vignetteWeight = 1.5;\r\n\r\n /**\r\n * Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode)\r\n * if vignetteEnabled is set to true.\r\n */\r\n @serializeAsColor4()\r\n public vignetteColor: Color4 = new Color4(0, 0, 0, 0);\r\n\r\n /**\r\n * Camera field of view used by the Vignette effect.\r\n */\r\n @serialize()\r\n public vignetteCameraFov = 0.5;\r\n\r\n @serialize()\r\n private _vignetteBlendMode = ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY;\r\n /**\r\n * Gets the vignette blend mode allowing different kind of effect.\r\n */\r\n public get vignetteBlendMode(): number {\r\n return this._vignetteBlendMode;\r\n }\r\n /**\r\n * Sets the vignette blend mode allowing different kind of effect.\r\n */\r\n public set vignetteBlendMode(value: number) {\r\n if (this._vignetteBlendMode === value) {\r\n return;\r\n }\r\n\r\n this._vignetteBlendMode = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _vignetteEnabled = false;\r\n /**\r\n * Gets whether the vignette effect is enabled.\r\n */\r\n public get vignetteEnabled(): boolean {\r\n return this._vignetteEnabled;\r\n }\r\n /**\r\n * Sets whether the vignette effect is enabled.\r\n */\r\n public set vignetteEnabled(value: boolean) {\r\n if (this._vignetteEnabled === value) {\r\n return;\r\n }\r\n\r\n this._vignetteEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringEnabled = false;\r\n /**\r\n * Gets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public get ditheringEnabled(): boolean {\r\n return this._ditheringEnabled;\r\n }\r\n /**\r\n * Sets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public set ditheringEnabled(value: boolean) {\r\n if (this._ditheringEnabled === value) {\r\n return;\r\n }\r\n\r\n this._ditheringEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringIntensity = 1.0 / 255.0;\r\n /**\r\n * Gets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public get ditheringIntensity(): number {\r\n return this._ditheringIntensity;\r\n }\r\n /**\r\n * Sets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public set ditheringIntensity(value: number) {\r\n if (this._ditheringIntensity === value) {\r\n return;\r\n }\r\n\r\n this._ditheringIntensity = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _skipFinalColorClamp = false;\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public get skipFinalColorClamp(): boolean {\r\n return this._skipFinalColorClamp;\r\n }\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public set skipFinalColorClamp(value: boolean) {\r\n if (this._skipFinalColorClamp === value) {\r\n return;\r\n }\r\n\r\n this._skipFinalColorClamp = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _applyByPostProcess = false;\r\n /**\r\n * Gets whether the image processing is applied through a post process or not.\r\n */\r\n public get applyByPostProcess(): boolean {\r\n return this._applyByPostProcess;\r\n }\r\n /**\r\n * Sets whether the image processing is applied through a post process or not.\r\n */\r\n public set applyByPostProcess(value: boolean) {\r\n if (this._applyByPostProcess === value) {\r\n return;\r\n }\r\n\r\n this._applyByPostProcess = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _isEnabled = true;\r\n /**\r\n * Gets whether the image processing is enabled or not.\r\n */\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n /**\r\n * Sets whether the image processing is enabled or not.\r\n */\r\n public set isEnabled(value: boolean) {\r\n if (this._isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Width of the output texture used in the post process. If not provided, uses the width of the screen.\r\n */\r\n @serialize()\r\n public outputTextureWidth = 0;\r\n\r\n /**\r\n * Height of the output texture used in the post process. If not provided, uses the height of the screen.\r\n */\r\n @serialize()\r\n public outputTextureHeight = 0;\r\n\r\n /**\r\n * An event triggered when the configuration changes and requires Shader to Update some parameters.\r\n */\r\n public onUpdateParameters = new Observable<ImageProcessingConfiguration>();\r\n\r\n /**\r\n * Method called each time the image processing information changes requires to recompile the effect.\r\n */\r\n protected _updateParameters(): void {\r\n this.onUpdateParameters.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets the current class name.\r\n * @returns \"ImageProcessingConfiguration\"\r\n */\r\n public getClassName(): string {\r\n return \"ImageProcessingConfiguration\";\r\n }\r\n\r\n /**\r\n * Prepare the list of uniforms associated with the Image Processing effects.\r\n * @param uniforms The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareUniforms: (uniforms: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareUniformsForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of samplers associated with the Image Processing effects.\r\n * @param samplersList The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareSamplers: (samplersList: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareSamplersForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of defines associated to the shader.\r\n * @param defines the list of defines to complete\r\n * @param forPostProcess Define if we are currently in post process mode or not\r\n */\r\n public prepareDefines(defines: IImageProcessingConfigurationDefines, forPostProcess = false): void {\r\n if (forPostProcess !== this.applyByPostProcess || !this._isEnabled) {\r\n defines.VIGNETTE = false;\r\n defines.TONEMAPPING = 0;\r\n defines.CONTRAST = false;\r\n defines.EXPOSURE = false;\r\n defines.COLORCURVES = false;\r\n defines.COLORGRADING = false;\r\n defines.COLORGRADING3D = false;\r\n defines.DITHER = false;\r\n defines.IMAGEPROCESSING = false;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess && this._isEnabled;\r\n return;\r\n }\r\n\r\n defines.VIGNETTE = this.vignetteEnabled;\r\n defines.VIGNETTEBLENDMODEMULTIPLY = this.vignetteBlendMode === ImageProcessingConfiguration._VIGNETTEMODE_MULTIPLY;\r\n defines.VIGNETTEBLENDMODEOPAQUE = !defines.VIGNETTEBLENDMODEMULTIPLY;\r\n\r\n if (!this._toneMappingEnabled) {\r\n defines.TONEMAPPING = 0;\r\n } else {\r\n switch (this._toneMappingType) {\r\n case ImageProcessingConfiguration.TONEMAPPING_KHR_PBR_NEUTRAL:\r\n defines.TONEMAPPING = 3;\r\n break;\r\n case ImageProcessingConfiguration.TONEMAPPING_ACES:\r\n defines.TONEMAPPING = 2;\r\n break;\r\n default:\r\n defines.TONEMAPPING = 1;\r\n break;\r\n }\r\n }\r\n\r\n defines.CONTRAST = this.contrast !== 1.0;\r\n defines.EXPOSURE = this.exposure !== 1.0;\r\n defines.COLORCURVES = this.colorCurvesEnabled && !!this.colorCurves;\r\n defines.COLORGRADING = this.colorGradingEnabled && !!this.colorGradingTexture;\r\n if (defines.COLORGRADING) {\r\n defines.COLORGRADING3D = this.colorGradingTexture!.is3D;\r\n } else {\r\n defines.COLORGRADING3D = false;\r\n }\r\n defines.SAMPLER3DGREENDEPTH = this.colorGradingWithGreenDepth;\r\n defines.SAMPLER3DBGRMAP = this.colorGradingBGR;\r\n defines.DITHER = this._ditheringEnabled;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSING =\r\n defines.VIGNETTE || !!defines.TONEMAPPING || defines.CONTRAST || defines.EXPOSURE || defines.COLORCURVES || defines.COLORGRADING || defines.DITHER;\r\n }\r\n\r\n /**\r\n * Returns true if all the image processing information are ready.\r\n * @returns True if ready, otherwise, false\r\n */\r\n public isReady() {\r\n // Color Grading texture can not be none blocking.\r\n return !this.colorGradingEnabled || !this.colorGradingTexture || this.colorGradingTexture.isReady();\r\n }\r\n\r\n /**\r\n * Binds the image processing to the shader.\r\n * @param effect The effect to bind to\r\n * @param overrideAspectRatio Override the aspect ratio of the effect\r\n */\r\n public bind(effect: Effect, overrideAspectRatio?: number): void {\r\n // Color Curves\r\n if (this._colorCurvesEnabled && this.colorCurves) {\r\n ColorCurvesBind(this.colorCurves, effect);\r\n }\r\n\r\n // Vignette and dither handled together due to common uniform.\r\n if (this._vignetteEnabled || this._ditheringEnabled) {\r\n const inverseWidth = 1 / (this.outputTextureWidth || effect.getEngine().getRenderWidth());\r\n const inverseHeight = 1 / (this.outputTextureHeight || effect.getEngine().getRenderHeight());\r\n effect.setFloat2(\"vInverseScreenSize\", inverseWidth, inverseHeight);\r\n\r\n if (this._ditheringEnabled) {\r\n effect.setFloat(\"ditherIntensity\", 0.5 * this._ditheringIntensity);\r\n }\r\n\r\n if (this._vignetteEnabled) {\r\n const aspectRatio = overrideAspectRatio != null ? overrideAspectRatio : inverseHeight / inverseWidth;\r\n\r\n let vignetteScaleY = Math.tan(this.vignetteCameraFov * 0.5);\r\n let vignetteScaleX = vignetteScaleY * aspectRatio;\r\n\r\n const vignetteScaleGeometricMean = Math.sqrt(vignetteScaleX * vignetteScaleY);\r\n vignetteScaleX = Mix(vignetteScaleX, vignetteScaleGeometricMean, this.vignetteStretch);\r\n vignetteScaleY = Mix(vignetteScaleY, vignetteScaleGeometricMean, this.vignetteStretch);\r\n\r\n effect.setFloat4(\"vignetteSettings1\", vignetteScaleX, vignetteScaleY, -vignetteScaleX * this.vignetteCenterX, -vignetteScaleY * this.vignetteCenterY);\r\n\r\n const vignettePower = -2.0 * this.vignetteWeight;\r\n effect.setFloat4(\"vignetteSettings2\", this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);\r\n }\r\n }\r\n\r\n // Exposure\r\n effect.setFloat(\"exposureLinear\", this.exposure);\r\n\r\n // Contrast\r\n effect.setFloat(\"contrast\", this.contrast);\r\n\r\n // Color transform settings\r\n if (this.colorGradingTexture) {\r\n effect.setTexture(\"txColorTransform\", this.colorGradingTexture);\r\n const textureSize = this.colorGradingTexture.getSize().height;\r\n\r\n effect.setFloat4(\r\n \"colorTransformSettings\",\r\n (textureSize - 1) / textureSize, // textureScale\r\n 0.5 / textureSize, // textureOffset\r\n textureSize, // textureSize\r\n this.colorGradingTexture.level // weight\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Clones the current image processing instance.\r\n * @returns The cloned image processing\r\n */\r\n public clone(): ImageProcessingConfiguration {\r\n return SerializationHelper.Clone(() => new ImageProcessingConfiguration(), this);\r\n }\r\n\r\n /**\r\n * Serializes the current image processing instance to a json representation.\r\n * @returns a JSON representation\r\n */\r\n public serialize(): any {\r\n return SerializationHelper.Serialize(this);\r\n }\r\n\r\n // Static constants associated to the image processing.\r\n private static _VIGNETTEMODE_MULTIPLY = 0;\r\n private static _VIGNETTEMODE_OPAQUE = 1;\r\n\r\n /**\r\n * Used to apply the vignette as a mix with the pixel color.\r\n */\r\n public static get VIGNETTEMODE_MULTIPLY(): number {\r\n return this._VIGNETTEMODE_MULTIPLY;\r\n }\r\n\r\n /**\r\n * Used to apply the vignette as a replacement of the pixel color.\r\n */\r\n public static get VIGNETTEMODE_OPAQUE(): number {\r\n return this._VIGNETTEMODE_OPAQUE;\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n\r\n/**\r\n * Parses the image processing from a json representation.\r\n * @param source the JSON source to parse\r\n * @returns The parsed image processing\r\n */\r\nexport function ImageProcessingConfigurationParse(source: any): ImageProcessingConfiguration {\r\n const parsed = SerializationHelper.Parse(() => new ImageProcessingConfiguration(), source, null, null);\r\n // Backward compatibility\r\n if (source.vignetteCentreX !== undefined) {\r\n parsed.vignetteCenterX = source.vignetteCentreX;\r\n }\r\n if (source.vignetteCentreY !== undefined) {\r\n parsed.vignetteCenterY = source.vignetteCentreY;\r\n }\r\n\r\n return parsed;\r\n}\r\n\r\n/**\r\n * Register side effects for imageProcessingConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterImageProcessingConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n // References the dependencies.\r\n ImageProcessingConfiguration.Parse = ImageProcessingConfigurationParse;\r\n\r\n SerializationHelper._ImageProcessingConfigurationParser = ImageProcessingConfigurationParse;\r\n\r\n // Register Class Name\r\n RegisterClass(\"BABYLON.ImageProcessingConfiguration\", ImageProcessingConfiguration);\r\n}\r\n"]}
1
+ {"version":3,"file":"imageProcessingConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/imageProcessingConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB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CAAC;IACD,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACpD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oCAAoC;IAChD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,4BAA4B,CAAC,KAAK,GAAG,iCAAiC,CAAC;IAEvE,mBAAmB,CAAC,mCAAmC,GAAG,iCAAiC,CAAC;IAE5F,sBAAsB;IACtB,aAAa,CAAC,sCAAsC,EAAE,4BAA4B,CAAC,CAAC;AACxF,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, serializeAsTexture, serializeAsColorCurves, serializeAsColor4 } from \"../Misc/decorators\";\r\nimport { Observable } from \"../Misc/observable.pure\";\r\nimport { type Nullable } from \"../types\";\r\nimport { Color4 } from \"../Maths/math.color.pure\";\r\nimport { ColorCurves, ColorCurvesBind } from \"../Materials/colorCurves.pure\";\r\nimport { type BaseTexture } from \"../Materials/Textures/baseTexture.pure\";\r\nimport { type Effect } from \"../Materials/effect.pure\";\r\nimport { Mix } from \"../Misc/tools.functions\";\r\nimport { SerializationHelper } from \"../Misc/decorators.serialization\";\r\nimport { type IImageProcessingConfigurationDefines } from \"./imageProcessingConfiguration.defines\";\r\nimport { PrepareSamplersForImageProcessing, PrepareUniformsForImageProcessing } from \"./imageProcessingConfiguration.functions\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This groups together the common properties used for image processing either in direct forward pass\r\n * or through post processing effect depending on the use of the image processing pipeline in your scene\r\n * or not.\r\n */\r\nexport class ImageProcessingConfiguration {\r\n /**\r\n * Default tone mapping applied in BabylonJS.\r\n */\r\n public static readonly TONEMAPPING_STANDARD = 0;\r\n\r\n /**\r\n * ACES Tone mapping (used by default in unreal and unity). This can help getting closer\r\n * to other engines rendering to increase portability.\r\n */\r\n public static readonly TONEMAPPING_ACES = 1;\r\n\r\n /**\r\n * Neutral Tone mapping developped by the Khronos group in order to constrain\r\n * values between 0 and 1 without shifting Hue.\r\n */\r\n public static readonly TONEMAPPING_KHR_PBR_NEUTRAL = 2;\r\n\r\n /**\r\n * Color curves setup used in the effect if colorCurvesEnabled is set to true\r\n */\r\n @serializeAsColorCurves()\r\n public colorCurves: Nullable<ColorCurves> = new ColorCurves();\r\n\r\n @serialize()\r\n private _colorCurvesEnabled = false;\r\n /**\r\n * Gets whether the color curves effect is enabled.\r\n */\r\n public get colorCurvesEnabled(): boolean {\r\n return this._colorCurvesEnabled;\r\n }\r\n /**\r\n * Sets whether the color curves effect is enabled.\r\n */\r\n public set colorCurvesEnabled(value: boolean) {\r\n if (this._colorCurvesEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorCurvesEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serializeAsTexture(\"colorGradingTexture\")\r\n private _colorGradingTexture: Nullable<BaseTexture>;\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public get colorGradingTexture(): Nullable<BaseTexture> {\r\n return this._colorGradingTexture;\r\n }\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public set colorGradingTexture(value: Nullable<BaseTexture>) {\r\n if (this._colorGradingTexture === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingTexture = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingEnabled = false;\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public get colorGradingEnabled(): boolean {\r\n return this._colorGradingEnabled;\r\n }\r\n /**\r\n * Sets whether the color grading effect is enabled.\r\n */\r\n public set colorGradingEnabled(value: boolean) {\r\n if (this._colorGradingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingWithGreenDepth = true;\r\n /**\r\n * Gets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public get colorGradingWithGreenDepth(): boolean {\r\n return this._colorGradingWithGreenDepth;\r\n }\r\n /**\r\n * Sets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public set colorGradingWithGreenDepth(value: boolean) {\r\n if (this._colorGradingWithGreenDepth === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingWithGreenDepth = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingBGR = true;\r\n /**\r\n * Gets whether the color grading texture contains BGR values.\r\n */\r\n public get colorGradingBGR(): boolean {\r\n return this._colorGradingBGR;\r\n }\r\n /**\r\n * Sets whether the color grading texture contains BGR values.\r\n */\r\n public set colorGradingBGR(value: boolean) {\r\n if (this._colorGradingBGR === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingBGR = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _exposure = 1.0;\r\n /**\r\n * Gets the Exposure used in the effect.\r\n */\r\n public get exposure(): number {\r\n return this._exposure;\r\n }\r\n /**\r\n * Sets the Exposure used in the effect.\r\n */\r\n public set exposure(value: number) {\r\n if (this._exposure === value) {\r\n return;\r\n }\r\n\r\n this._exposure = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingEnabled = false;\r\n /**\r\n * Gets whether the tone mapping effect is enabled.\r\n */\r\n public get toneMappingEnabled(): boolean {\r\n return this._toneMappingEnabled;\r\n }\r\n /**\r\n * Sets whether the tone mapping effect is enabled.\r\n */\r\n public set toneMappingEnabled(value: boolean) {\r\n if (this._toneMappingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingType = ImageProcessingConfiguration.TONEMAPPING_STANDARD;\r\n /**\r\n * Gets the type of tone mapping effect.\r\n */\r\n public get toneMappingType(): number {\r\n return this._toneMappingType;\r\n }\r\n /**\r\n * Sets the type of tone mapping effect used in BabylonJS.\r\n */\r\n public set toneMappingType(value: number) {\r\n if (this._toneMappingType === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingType = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n protected _contrast = 1.0;\r\n /**\r\n * Gets the contrast used in the effect.\r\n */\r\n public get contrast(): number {\r\n return this._contrast;\r\n }\r\n /**\r\n * Sets the contrast used in the effect.\r\n */\r\n public set contrast(value: number) {\r\n if (this._contrast === value) {\r\n return;\r\n }\r\n\r\n this._contrast = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Vignette stretch size.\r\n */\r\n @serialize()\r\n public vignetteStretch = 0;\r\n\r\n /**\r\n * Vignette center X Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterX = 0;\r\n\r\n /**\r\n * Vignette center Y Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterY = 0;\r\n\r\n /**\r\n * Back Compat: Vignette center Y Offset.\r\n * @deprecated use vignetteCenterY instead\r\n */\r\n public get vignetteCentreY(): number {\r\n return this.vignetteCenterY;\r\n }\r\n public set vignetteCentreY(value: number) {\r\n this.vignetteCenterY = value;\r\n }\r\n\r\n /**\r\n * Back Compat: Vignette center X Offset.\r\n * @deprecated use vignetteCenterX instead\r\n */\r\n public get vignetteCentreX(): number {\r\n return this.vignetteCenterX;\r\n }\r\n public set vignetteCentreX(value: number) {\r\n this.vignetteCenterX = value;\r\n }\r\n\r\n /**\r\n * Vignette weight or intensity of the vignette effect.\r\n */\r\n @serialize()\r\n public vignetteWeight = 1.5;\r\n\r\n /**\r\n * Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode)\r\n * if vignetteEnabled is set to true.\r\n */\r\n @serializeAsColor4()\r\n public vignetteColor: Color4 = new Color4(0, 0, 0, 0);\r\n\r\n /**\r\n * Camera field of view used by the Vignette effect.\r\n */\r\n @serialize()\r\n public vignetteCameraFov = 0.5;\r\n\r\n @serialize()\r\n private _vignetteBlendMode = ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY;\r\n /**\r\n * Gets the vignette blend mode allowing different kind of effect.\r\n */\r\n public get vignetteBlendMode(): number {\r\n return this._vignetteBlendMode;\r\n }\r\n /**\r\n * Sets the vignette blend mode allowing different kind of effect.\r\n */\r\n public set vignetteBlendMode(value: number) {\r\n if (this._vignetteBlendMode === value) {\r\n return;\r\n }\r\n\r\n this._vignetteBlendMode = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _vignetteEnabled = false;\r\n /**\r\n * Gets whether the vignette effect is enabled.\r\n */\r\n public get vignetteEnabled(): boolean {\r\n return this._vignetteEnabled;\r\n }\r\n /**\r\n * Sets whether the vignette effect is enabled.\r\n */\r\n public set vignetteEnabled(value: boolean) {\r\n if (this._vignetteEnabled === value) {\r\n return;\r\n }\r\n\r\n this._vignetteEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringEnabled = false;\r\n /**\r\n * Gets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public get ditheringEnabled(): boolean {\r\n return this._ditheringEnabled;\r\n }\r\n /**\r\n * Sets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public set ditheringEnabled(value: boolean) {\r\n if (this._ditheringEnabled === value) {\r\n return;\r\n }\r\n\r\n this._ditheringEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringIntensity = 1.0 / 255.0;\r\n /**\r\n * Gets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public get ditheringIntensity(): number {\r\n return this._ditheringIntensity;\r\n }\r\n /**\r\n * Sets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public set ditheringIntensity(value: number) {\r\n if (this._ditheringIntensity === value) {\r\n return;\r\n }\r\n\r\n this._ditheringIntensity = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _skipFinalColorClamp = false;\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public get skipFinalColorClamp(): boolean {\r\n return this._skipFinalColorClamp;\r\n }\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public set skipFinalColorClamp(value: boolean) {\r\n if (this._skipFinalColorClamp === value) {\r\n return;\r\n }\r\n\r\n this._skipFinalColorClamp = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _applyByPostProcess = false;\r\n /**\r\n * Gets whether the image processing is applied through a post process or not.\r\n */\r\n public get applyByPostProcess(): boolean {\r\n return this._applyByPostProcess;\r\n }\r\n /**\r\n * Sets whether the image processing is applied through a post process or not.\r\n */\r\n public set applyByPostProcess(value: boolean) {\r\n if (this._applyByPostProcess === value) {\r\n return;\r\n }\r\n\r\n this._applyByPostProcess = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _isEnabled = true;\r\n /**\r\n * Gets whether the image processing is enabled or not.\r\n */\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n /**\r\n * Sets whether the image processing is enabled or not.\r\n */\r\n public set isEnabled(value: boolean) {\r\n if (this._isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Width of the output texture used in the post process. If not provided, uses the width of the screen.\r\n */\r\n @serialize()\r\n public outputTextureWidth = 0;\r\n\r\n /**\r\n * Height of the output texture used in the post process. If not provided, uses the height of the screen.\r\n */\r\n @serialize()\r\n public outputTextureHeight = 0;\r\n\r\n /**\r\n * An event triggered when the configuration changes and requires Shader to Update some parameters.\r\n */\r\n public onUpdateParameters = new Observable<ImageProcessingConfiguration>();\r\n\r\n /**\r\n * Method called each time the image processing information changes requires to recompile the effect.\r\n */\r\n protected _updateParameters(): void {\r\n this.onUpdateParameters.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets the current class name.\r\n * @returns \"ImageProcessingConfiguration\"\r\n */\r\n public getClassName(): string {\r\n return \"ImageProcessingConfiguration\";\r\n }\r\n\r\n /**\r\n * Prepare the list of uniforms associated with the Image Processing effects.\r\n * @param uniforms The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareUniforms: (uniforms: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareUniformsForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of samplers associated with the Image Processing effects.\r\n * @param samplersList The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareSamplers: (samplersList: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareSamplersForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of defines associated to the shader.\r\n * @param defines the list of defines to complete\r\n * @param forPostProcess Define if we are currently in post process mode or not\r\n */\r\n public prepareDefines(defines: IImageProcessingConfigurationDefines, forPostProcess = false): void {\r\n if (forPostProcess !== this.applyByPostProcess || !this._isEnabled) {\r\n defines.VIGNETTE = false;\r\n defines.TONEMAPPING = 0;\r\n defines.CONTRAST = false;\r\n defines.EXPOSURE = false;\r\n defines.COLORCURVES = false;\r\n defines.COLORGRADING = false;\r\n defines.COLORGRADING3D = false;\r\n defines.DITHER = false;\r\n defines.IMAGEPROCESSING = false;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess && this._isEnabled;\r\n return;\r\n }\r\n\r\n defines.VIGNETTE = this.vignetteEnabled;\r\n defines.VIGNETTEBLENDMODEMULTIPLY = this.vignetteBlendMode === ImageProcessingConfiguration._VIGNETTEMODE_MULTIPLY;\r\n defines.VIGNETTEBLENDMODEOPAQUE = !defines.VIGNETTEBLENDMODEMULTIPLY;\r\n\r\n if (!this._toneMappingEnabled) {\r\n defines.TONEMAPPING = 0;\r\n } else {\r\n switch (this._toneMappingType) {\r\n case ImageProcessingConfiguration.TONEMAPPING_KHR_PBR_NEUTRAL:\r\n defines.TONEMAPPING = 3;\r\n break;\r\n case ImageProcessingConfiguration.TONEMAPPING_ACES:\r\n defines.TONEMAPPING = 2;\r\n break;\r\n default:\r\n defines.TONEMAPPING = 1;\r\n break;\r\n }\r\n }\r\n\r\n defines.CONTRAST = this.contrast !== 1.0;\r\n defines.EXPOSURE = this.exposure !== 1.0;\r\n defines.COLORCURVES = this.colorCurvesEnabled && !!this.colorCurves;\r\n defines.COLORGRADING = this.colorGradingEnabled && !!this.colorGradingTexture;\r\n if (defines.COLORGRADING) {\r\n defines.COLORGRADING3D = this.colorGradingTexture!.is3D;\r\n } else {\r\n defines.COLORGRADING3D = false;\r\n }\r\n defines.SAMPLER3DGREENDEPTH = this.colorGradingWithGreenDepth;\r\n defines.SAMPLER3DBGRMAP = this.colorGradingBGR;\r\n defines.DITHER = this._ditheringEnabled;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSING =\r\n defines.VIGNETTE || !!defines.TONEMAPPING || defines.CONTRAST || defines.EXPOSURE || defines.COLORCURVES || defines.COLORGRADING || defines.DITHER;\r\n }\r\n\r\n /**\r\n * Returns true if all the image processing information are ready.\r\n * @returns True if ready, otherwise, false\r\n */\r\n public isReady() {\r\n // Color Grading texture can not be none blocking.\r\n return !this.colorGradingEnabled || !this.colorGradingTexture || this.colorGradingTexture.isReady();\r\n }\r\n\r\n /**\r\n * Binds the image processing to the shader.\r\n * @param effect The effect to bind to\r\n * @param overrideAspectRatio Override the aspect ratio of the effect\r\n */\r\n public bind(effect: Effect, overrideAspectRatio?: number): void {\r\n // Color Curves\r\n if (this._colorCurvesEnabled && this.colorCurves) {\r\n ColorCurvesBind(this.colorCurves, effect);\r\n }\r\n\r\n // Vignette and dither handled together due to common uniform.\r\n if (this._vignetteEnabled || this._ditheringEnabled) {\r\n const inverseWidth = 1 / (this.outputTextureWidth || effect.getEngine().getRenderWidth());\r\n const inverseHeight = 1 / (this.outputTextureHeight || effect.getEngine().getRenderHeight());\r\n effect.setFloat2(\"vInverseScreenSize\", inverseWidth, inverseHeight);\r\n\r\n if (this._ditheringEnabled) {\r\n effect.setFloat(\"ditherIntensity\", 0.5 * this._ditheringIntensity);\r\n }\r\n\r\n if (this._vignetteEnabled) {\r\n const aspectRatio = overrideAspectRatio != null ? overrideAspectRatio : inverseHeight / inverseWidth;\r\n\r\n let vignetteScaleY = Math.tan(this.vignetteCameraFov * 0.5);\r\n let vignetteScaleX = vignetteScaleY * aspectRatio;\r\n\r\n const vignetteScaleGeometricMean = Math.sqrt(vignetteScaleX * vignetteScaleY);\r\n vignetteScaleX = Mix(vignetteScaleX, vignetteScaleGeometricMean, this.vignetteStretch);\r\n vignetteScaleY = Mix(vignetteScaleY, vignetteScaleGeometricMean, this.vignetteStretch);\r\n\r\n effect.setFloat4(\"vignetteSettings1\", vignetteScaleX, vignetteScaleY, -vignetteScaleX * this.vignetteCenterX, -vignetteScaleY * this.vignetteCenterY);\r\n\r\n const vignettePower = -2.0 * this.vignetteWeight;\r\n effect.setFloat4(\"vignetteSettings2\", this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);\r\n }\r\n }\r\n\r\n // Exposure\r\n effect.setFloat(\"exposureLinear\", this.exposure);\r\n\r\n // Contrast\r\n effect.setFloat(\"contrast\", this.contrast);\r\n\r\n // Color transform settings\r\n if (this.colorGradingTexture) {\r\n effect.setTexture(\"txColorTransform\", this.colorGradingTexture);\r\n const textureSize = this.colorGradingTexture.getSize().height;\r\n\r\n effect.setFloat4(\r\n \"colorTransformSettings\",\r\n (textureSize - 1) / textureSize, // textureScale\r\n 0.5 / textureSize, // textureOffset\r\n textureSize, // textureSize\r\n this.colorGradingTexture.level // weight\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Clones the current image processing instance.\r\n * @returns The cloned image processing\r\n */\r\n public clone(): ImageProcessingConfiguration {\r\n return SerializationHelper.Clone(() => new ImageProcessingConfiguration(), this);\r\n }\r\n\r\n /**\r\n * Serializes the current image processing instance to a json representation.\r\n * @returns a JSON representation\r\n */\r\n public serialize(): any {\r\n return SerializationHelper.Serialize(this);\r\n }\r\n\r\n // Static constants associated to the image processing.\r\n private static _VIGNETTEMODE_MULTIPLY = 0;\r\n private static _VIGNETTEMODE_OPAQUE = 1;\r\n\r\n /**\r\n * Used to apply the vignette as a mix with the pixel color.\r\n */\r\n public static get VIGNETTEMODE_MULTIPLY(): number {\r\n return this._VIGNETTEMODE_MULTIPLY;\r\n }\r\n\r\n /**\r\n * Used to apply the vignette as a replacement of the pixel color.\r\n */\r\n public static get VIGNETTEMODE_OPAQUE(): number {\r\n return this._VIGNETTEMODE_OPAQUE;\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n\r\n/**\r\n * Parses the image processing from a json representation.\r\n * @param source the JSON source to parse\r\n * @returns The parsed image processing\r\n */\r\nexport function ImageProcessingConfigurationParse(source: any): ImageProcessingConfiguration {\r\n const parsed = SerializationHelper.Parse(() => new ImageProcessingConfiguration(), source, null, null);\r\n // Backward compatibility\r\n if (source.vignetteCentreX !== undefined) {\r\n parsed.vignetteCenterX = source.vignetteCentreX;\r\n }\r\n if (source.vignetteCentreY !== undefined) {\r\n parsed.vignetteCenterY = source.vignetteCentreY;\r\n }\r\n\r\n return parsed;\r\n}\r\n\r\n/**\r\n * Register side effects for imageProcessingConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterImageProcessingConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n // References the dependencies.\r\n ImageProcessingConfiguration.Parse = ImageProcessingConfigurationParse;\r\n\r\n SerializationHelper._ImageProcessingConfigurationParser = ImageProcessingConfigurationParse;\r\n\r\n // Register Class Name\r\n RegisterClass(\"BABYLON.ImageProcessingConfiguration\", ImageProcessingConfiguration);\r\n}\r\n"]}
@@ -26,13 +26,13 @@ export declare class DecalMapConfiguration extends MaterialPluginBase {
26
26
  /**
27
27
  * Enables or disables the decal map on this material
28
28
  */
29
- isEnabled: boolean;
29
+ accessor isEnabled: boolean;
30
30
  private _smoothAlpha;
31
31
  /**
32
32
  * Enables or disables the smooth alpha mode on this material. Default: false.
33
33
  * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.
34
34
  */
35
- smoothAlpha: boolean;
35
+ accessor smoothAlpha: boolean;
36
36
  private _internalMarkAllSubMeshesAsTexturesDirty;
37
37
  /** @internal */
38
38
  _markAllSubMeshesAsTexturesDirty(): void;
@@ -1,5 +1,5 @@
1
1
  /** This file must only contain pure code and pure imports */
2
- import { __decorate } from "../tslib.es6.js";
2
+ import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers } from "../tslib.es6.js";
3
3
  import { serialize, expandToProperty } from "../Misc/decorators.js";
4
4
  import { MaterialDefines } from "./materialDefines.js";
5
5
  import { MaterialPluginBase } from "./materialPluginBase.pure.js";
@@ -23,137 +23,156 @@ export class DecalMapDefines extends MaterialDefines {
23
23
  * Plugin that implements the decal map component of a material
24
24
  * @since 5.49.1
25
25
  */
26
- export class DecalMapConfiguration extends MaterialPluginBase {
27
- /** @internal */
28
- _markAllSubMeshesAsTexturesDirty() {
29
- this._enable(this._isEnabled);
30
- this._internalMarkAllSubMeshesAsTexturesDirty();
31
- }
32
- /**
33
- * Gets a boolean indicating that the plugin is compatible with a given shader language.
34
- * @returns true if the plugin is compatible with the shader language
35
- */
36
- isCompatible() {
37
- return true;
38
- }
39
- /**
40
- * Creates a new DecalMapConfiguration
41
- * @param material The material to attach the decal map plugin to
42
- * @param addToPluginList If the plugin should be added to the material plugin list
43
- */
44
- constructor(material, addToPluginList = true) {
45
- super(material, "DecalMap", 150, new DecalMapDefines(), addToPluginList);
46
- this._isEnabled = false;
47
- /**
48
- * Enables or disables the decal map on this material
49
- */
50
- this.isEnabled = false;
51
- this._smoothAlpha = false;
52
- /**
53
- * Enables or disables the smooth alpha mode on this material. Default: false.
54
- * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.
55
- */
56
- this.smoothAlpha = false;
57
- this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method
58
- this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];
59
- }
60
- /**
61
- * Checks if the sub mesh is ready to be used
62
- * @param defines the list of defines
63
- * @param scene the current scene
64
- * @param engine the current engine
65
- * @param subMesh the sub mesh to check
66
- * @returns true if the sub mesh is ready
67
- */
68
- isReadyForSubMesh(defines, scene, engine, subMesh) {
69
- const decalMap = subMesh.getMesh().decalMap;
70
- if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
71
- return true;
72
- }
73
- return decalMap.isReady();
74
- }
75
- /**
76
- * Prepares the defines before attributes are set
77
- * @param defines the list of defines
78
- * @param scene the current scene
79
- * @param mesh the current mesh
80
- */
81
- prepareDefinesBeforeAttributes(defines, scene, mesh) {
82
- const decalMap = mesh.decalMap;
83
- if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
84
- const isDirty = defines.DECAL;
85
- if (isDirty) {
86
- defines.markAsTexturesDirty();
26
+ let DecalMapConfiguration = (() => {
27
+ var _a, _DecalMapConfiguration_isEnabled_accessor_storage, _DecalMapConfiguration_smoothAlpha_accessor_storage;
28
+ let _classSuper = MaterialPluginBase;
29
+ let _isEnabled_decorators;
30
+ let _isEnabled_initializers = [];
31
+ let _isEnabled_extraInitializers = [];
32
+ let _smoothAlpha_decorators;
33
+ let _smoothAlpha_initializers = [];
34
+ let _smoothAlpha_extraInitializers = [];
35
+ return _a = class DecalMapConfiguration extends _classSuper {
36
+ /**
37
+ * Enables or disables the decal map on this material
38
+ */
39
+ get isEnabled() { return __classPrivateFieldGet(this, _DecalMapConfiguration_isEnabled_accessor_storage, "f"); }
40
+ set isEnabled(value) { __classPrivateFieldSet(this, _DecalMapConfiguration_isEnabled_accessor_storage, value, "f"); }
41
+ /**
42
+ * Enables or disables the smooth alpha mode on this material. Default: false.
43
+ * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.
44
+ */
45
+ get smoothAlpha() { return __classPrivateFieldGet(this, _DecalMapConfiguration_smoothAlpha_accessor_storage, "f"); }
46
+ set smoothAlpha(value) { __classPrivateFieldSet(this, _DecalMapConfiguration_smoothAlpha_accessor_storage, value, "f"); }
47
+ /** @internal */
48
+ _markAllSubMeshesAsTexturesDirty() {
49
+ this._enable(this._isEnabled);
50
+ this._internalMarkAllSubMeshesAsTexturesDirty();
87
51
  }
88
- defines.DECAL = false;
89
- }
90
- else {
91
- const isDirty = !defines.DECAL || defines.GAMMADECAL !== decalMap.texture.gammaSpace;
92
- if (isDirty) {
93
- defines.markAsTexturesDirty();
52
+ /**
53
+ * Gets a boolean indicating that the plugin is compatible with a given shader language.
54
+ * @returns true if the plugin is compatible with the shader language
55
+ */
56
+ isCompatible() {
57
+ return true;
94
58
  }
95
- defines.DECAL = true;
96
- defines.GAMMADECAL = decalMap.texture.gammaSpace;
97
- defines.DECAL_SMOOTHALPHA = this._smoothAlpha;
98
- PrepareDefinesForMergedUV(decalMap.texture, defines, "DECAL");
99
- }
100
- }
101
- /**
102
- * Binds the material data for a sub mesh
103
- * @param uniformBuffer the uniform buffer to update
104
- * @param scene the current scene
105
- * @param _engine the current engine
106
- * @param subMesh the sub mesh to bind
107
- */
108
- hardBindForSubMesh(uniformBuffer, scene, _engine, subMesh) {
109
- /**
110
- * Note that we override hardBindForSubMesh and not bindForSubMesh because the material can be shared by multiple meshes,
111
- * in which case mustRebind could return false even though the decal map is different for each mesh: that's because the decal map
112
- * is not part of the material but hosted by the decalMap of the mesh instead.
113
- */
114
- const decalMap = subMesh.getMesh().decalMap;
115
- if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
116
- return;
117
- }
118
- const isFrozen = this._material.isFrozen;
119
- const texture = decalMap.texture;
120
- if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {
121
- uniformBuffer.updateFloat4("vDecalInfos", texture.coordinatesIndex, 0, 0, 0);
122
- BindTextureMatrix(texture, uniformBuffer, "decal");
123
- }
124
- uniformBuffer.setTexture("decalSampler", texture);
125
- }
126
- /**
127
- * Gets the class name of this plugin
128
- * @returns the class name
129
- */
130
- getClassName() {
131
- return "DecalMapConfiguration";
132
- }
133
- /**
134
- * Gets the samplers used by the plugin
135
- * @param samplers the list of samplers to update
136
- */
137
- getSamplers(samplers) {
138
- samplers.push("decalSampler");
139
- }
140
- getUniforms() {
141
- return {
142
- ubo: [
143
- { name: "vDecalInfos", size: 4, type: "vec4" },
144
- { name: "decalMatrix", size: 16, type: "mat4" },
145
- ],
146
- };
147
- }
148
- }
149
- __decorate([
150
- serialize(),
151
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
152
- ], DecalMapConfiguration.prototype, "isEnabled", void 0);
153
- __decorate([
154
- serialize(),
155
- expandToProperty("_markAllSubMeshesAsTexturesDirty")
156
- ], DecalMapConfiguration.prototype, "smoothAlpha", void 0);
59
+ /**
60
+ * Creates a new DecalMapConfiguration
61
+ * @param material The material to attach the decal map plugin to
62
+ * @param addToPluginList If the plugin should be added to the material plugin list
63
+ */
64
+ constructor(material, addToPluginList = true) {
65
+ super(material, "DecalMap", 150, new DecalMapDefines(), addToPluginList);
66
+ this._isEnabled = false;
67
+ _DecalMapConfiguration_isEnabled_accessor_storage.set(this, __runInitializers(this, _isEnabled_initializers, false));
68
+ this._smoothAlpha = (__runInitializers(this, _isEnabled_extraInitializers), false);
69
+ _DecalMapConfiguration_smoothAlpha_accessor_storage.set(this, __runInitializers(this, _smoothAlpha_initializers, false));
70
+ this._internalMarkAllSubMeshesAsTexturesDirty = __runInitializers(this, _smoothAlpha_extraInitializers);
71
+ this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method
72
+ this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];
73
+ }
74
+ /**
75
+ * Checks if the sub mesh is ready to be used
76
+ * @param defines the list of defines
77
+ * @param scene the current scene
78
+ * @param engine the current engine
79
+ * @param subMesh the sub mesh to check
80
+ * @returns true if the sub mesh is ready
81
+ */
82
+ isReadyForSubMesh(defines, scene, engine, subMesh) {
83
+ const decalMap = subMesh.getMesh().decalMap;
84
+ if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
85
+ return true;
86
+ }
87
+ return decalMap.isReady();
88
+ }
89
+ /**
90
+ * Prepares the defines before attributes are set
91
+ * @param defines the list of defines
92
+ * @param scene the current scene
93
+ * @param mesh the current mesh
94
+ */
95
+ prepareDefinesBeforeAttributes(defines, scene, mesh) {
96
+ const decalMap = mesh.decalMap;
97
+ if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
98
+ const isDirty = defines.DECAL;
99
+ if (isDirty) {
100
+ defines.markAsTexturesDirty();
101
+ }
102
+ defines.DECAL = false;
103
+ }
104
+ else {
105
+ const isDirty = !defines.DECAL || defines.GAMMADECAL !== decalMap.texture.gammaSpace;
106
+ if (isDirty) {
107
+ defines.markAsTexturesDirty();
108
+ }
109
+ defines.DECAL = true;
110
+ defines.GAMMADECAL = decalMap.texture.gammaSpace;
111
+ defines.DECAL_SMOOTHALPHA = this._smoothAlpha;
112
+ PrepareDefinesForMergedUV(decalMap.texture, defines, "DECAL");
113
+ }
114
+ }
115
+ /**
116
+ * Binds the material data for a sub mesh
117
+ * @param uniformBuffer the uniform buffer to update
118
+ * @param scene the current scene
119
+ * @param _engine the current engine
120
+ * @param subMesh the sub mesh to bind
121
+ */
122
+ hardBindForSubMesh(uniformBuffer, scene, _engine, subMesh) {
123
+ /**
124
+ * Note that we override hardBindForSubMesh and not bindForSubMesh because the material can be shared by multiple meshes,
125
+ * in which case mustRebind could return false even though the decal map is different for each mesh: that's because the decal map
126
+ * is not part of the material but hosted by the decalMap of the mesh instead.
127
+ */
128
+ const decalMap = subMesh.getMesh().decalMap;
129
+ if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
130
+ return;
131
+ }
132
+ const isFrozen = this._material.isFrozen;
133
+ const texture = decalMap.texture;
134
+ if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {
135
+ uniformBuffer.updateFloat4("vDecalInfos", texture.coordinatesIndex, 0, 0, 0);
136
+ BindTextureMatrix(texture, uniformBuffer, "decal");
137
+ }
138
+ uniformBuffer.setTexture("decalSampler", texture);
139
+ }
140
+ /**
141
+ * Gets the class name of this plugin
142
+ * @returns the class name
143
+ */
144
+ getClassName() {
145
+ return "DecalMapConfiguration";
146
+ }
147
+ /**
148
+ * Gets the samplers used by the plugin
149
+ * @param samplers the list of samplers to update
150
+ */
151
+ getSamplers(samplers) {
152
+ samplers.push("decalSampler");
153
+ }
154
+ getUniforms() {
155
+ return {
156
+ ubo: [
157
+ { name: "vDecalInfos", size: 4, type: "vec4" },
158
+ { name: "decalMatrix", size: 16, type: "mat4" },
159
+ ],
160
+ };
161
+ }
162
+ },
163
+ _DecalMapConfiguration_isEnabled_accessor_storage = new WeakMap(),
164
+ _DecalMapConfiguration_smoothAlpha_accessor_storage = new WeakMap(),
165
+ (() => {
166
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
167
+ _isEnabled_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
168
+ _smoothAlpha_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
169
+ __esDecorate(_a, null, _isEnabled_decorators, { kind: "accessor", name: "isEnabled", static: false, private: false, access: { has: obj => "isEnabled" in obj, get: obj => obj.isEnabled, set: (obj, value) => { obj.isEnabled = value; } }, metadata: _metadata }, _isEnabled_initializers, _isEnabled_extraInitializers);
170
+ __esDecorate(_a, null, _smoothAlpha_decorators, { kind: "accessor", name: "smoothAlpha", static: false, private: false, access: { has: obj => "smoothAlpha" in obj, get: obj => obj.smoothAlpha, set: (obj, value) => { obj.smoothAlpha = value; } }, metadata: _metadata }, _smoothAlpha_initializers, _smoothAlpha_extraInitializers);
171
+ if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
172
+ })(),
173
+ _a;
174
+ })();
175
+ export { DecalMapConfiguration };
157
176
  let _Registered = false;
158
177
  /**
159
178
  * Register side effects for materialDecalMapConfiguration.
@@ -1 +1 @@
1
- {"version":3,"file":"material.decalMapConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/material.decalMapConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAApD;;QACI,UAAK,GAAG,KAAK,CAAC;QACd,kBAAa,GAAG,CAAC,CAAC;QAClB,sBAAiB,GAAG,KAAK,CAAC;QAC1B,eAAU,GAAG,KAAK,CAAC;IACvB,CAAC;CAAA;AAED;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,kBAAk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C,QAAQ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;YAC9D,aAAa,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7E,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;QAED,aAAa,CAAC,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,uBAAuB,CAAC;IACnC,CAAC;IAED;;;OAGG;IACa,WAAW,CAAC,QAAkB;QAC1C,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAClC,CAAC;IAEe,WAAW;QACvB,OAAO;YACH,GAAG,EAAE;gBACD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;gBAC9C,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;aAClD;SACJ,CAAC;IACN,CAAC;CACJ;AA3IU;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;wDAC5B;AAUlB;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;0DAC1B;AAmI/B,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,qCAAqC;IACjD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, expandToProperty } from \"../Misc/decorators\";\r\nimport { MaterialDefines } from \"./materialDefines\";\r\nimport { MaterialPluginBase } from \"./materialPluginBase.pure\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { MaterialFlags } from \"./materialFlags\";\r\nimport { type Scene } from \"core/scene.pure\";\r\nimport { type Engine } from \"core/Engines/engine.pure\";\r\nimport { type SubMesh } from \"core/Meshes/subMesh.pure\";\r\nimport { type AbstractMesh } from \"core/Meshes/abstractMesh.pure\";\r\nimport { type UniformBuffer } from \"./uniformBuffer\";\r\nimport { type PBRBaseMaterial } from \"./PBR/pbrBaseMaterial.pure\";\r\nimport { type StandardMaterial } from \"./standardMaterial.pure\";\r\nimport { BindTextureMatrix, PrepareDefinesForMergedUV } from \"./materialHelper.functions\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class DecalMapDefines extends MaterialDefines {\r\n DECAL = false;\r\n DECALDIRECTUV = 0;\r\n DECAL_SMOOTHALPHA = false;\r\n GAMMADECAL = false;\r\n}\r\n\r\n/**\r\n * Plugin that implements the decal map component of a material\r\n * @since 5.49.1\r\n */\r\nexport class DecalMapConfiguration extends MaterialPluginBase {\r\n private _isEnabled = false;\r\n /**\r\n * Enables or disables the decal map on this material\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public isEnabled = false;\r\n\r\n private _smoothAlpha = false;\r\n\r\n /**\r\n * Enables or disables the smooth alpha mode on this material. Default: false.\r\n * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public smoothAlpha = false;\r\n\r\n private _internalMarkAllSubMeshesAsTexturesDirty: () => void;\r\n\r\n /** @internal */\r\n public _markAllSubMeshesAsTexturesDirty(): void {\r\n this._enable(this._isEnabled);\r\n this._internalMarkAllSubMeshesAsTexturesDirty();\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the plugin is compatible with a given shader language.\r\n * @returns true if the plugin is compatible with the shader language\r\n */\r\n public override isCompatible(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Creates a new DecalMapConfiguration\r\n * @param material The material to attach the decal map plugin to\r\n * @param addToPluginList If the plugin should be added to the material plugin list\r\n */\r\n constructor(material: PBRBaseMaterial | StandardMaterial, addToPluginList = true) {\r\n super(material, \"DecalMap\", 150, new DecalMapDefines(), addToPluginList);\r\n\r\n this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method\r\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[Constants.MATERIAL_TextureDirtyFlag];\r\n }\r\n\r\n /**\r\n * Checks if the sub mesh is ready to be used\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param engine the current engine\r\n * @param subMesh the sub mesh to check\r\n * @returns true if the sub mesh is ready\r\n */\r\n public override isReadyForSubMesh(defines: DecalMapDefines, scene: Scene, engine: Engine, subMesh: SubMesh): boolean {\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return true;\r\n }\r\n\r\n return decalMap.isReady();\r\n }\r\n\r\n /**\r\n * Prepares the defines before attributes are set\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param mesh the current mesh\r\n */\r\n public override prepareDefinesBeforeAttributes(defines: DecalMapDefines, scene: Scene, mesh: AbstractMesh): void {\r\n const decalMap = mesh.decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n const isDirty = defines.DECAL;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = false;\r\n } else {\r\n const isDirty = !defines.DECAL || defines.GAMMADECAL !== decalMap.texture.gammaSpace;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = true;\r\n defines.GAMMADECAL = decalMap.texture.gammaSpace;\r\n defines.DECAL_SMOOTHALPHA = this._smoothAlpha;\r\n PrepareDefinesForMergedUV(decalMap.texture, defines, \"DECAL\");\r\n }\r\n }\r\n\r\n /**\r\n * Binds the material data for a sub mesh\r\n * @param uniformBuffer the uniform buffer to update\r\n * @param scene the current scene\r\n * @param _engine the current engine\r\n * @param subMesh the sub mesh to bind\r\n */\r\n public override hardBindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, _engine: Engine, subMesh: SubMesh): void {\r\n /**\r\n * Note that we override hardBindForSubMesh and not bindForSubMesh because the material can be shared by multiple meshes,\r\n * in which case mustRebind could return false even though the decal map is different for each mesh: that's because the decal map\r\n * is not part of the material but hosted by the decalMap of the mesh instead.\r\n */\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return;\r\n }\r\n\r\n const isFrozen = this._material.isFrozen;\r\n const texture = decalMap.texture;\r\n\r\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\r\n uniformBuffer.updateFloat4(\"vDecalInfos\", texture.coordinatesIndex, 0, 0, 0);\r\n BindTextureMatrix(texture, uniformBuffer, \"decal\");\r\n }\r\n\r\n uniformBuffer.setTexture(\"decalSampler\", texture);\r\n }\r\n\r\n /**\r\n * Gets the class name of this plugin\r\n * @returns the class name\r\n */\r\n public override getClassName(): string {\r\n return \"DecalMapConfiguration\";\r\n }\r\n\r\n /**\r\n * Gets the samplers used by the plugin\r\n * @param samplers the list of samplers to update\r\n */\r\n public override getSamplers(samplers: string[]): void {\r\n samplers.push(\"decalSampler\");\r\n }\r\n\r\n public override getUniforms(): { ubo?: Array<{ name: string; size: number; type: string }>; vertex?: string; fragment?: string } {\r\n return {\r\n ubo: [\r\n { name: \"vDecalInfos\", size: 4, type: \"vec4\" },\r\n { name: \"decalMatrix\", size: 16, type: \"mat4\" },\r\n ],\r\n };\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for materialDecalMapConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterMaterialDecalMapConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n RegisterClass(\"BABYLON.DecalMapConfiguration\", DecalMapConfiguration);\r\n}\r\n"]}
1
+ {"version":3,"file":"material.decalMapConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/material.decalMapConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAApD;;QACI,UAAK,GAAG,KAAK,CAAC;QACd,kBAAa,GAAG,CAAC,CAAC;QAClB,sBAAiB,GAAG,KAAK,CAAC;QAC1B,eAAU,GAAG,KAAK,CAAC;IACvB,CAAC;CAAA;AAED;;;GAGG;IACU,qBAAqB;;sBAAS,kBAAkB;;;;;;;sBAAhD,qBAAsB,SAAQ,WAAkB;YAEzD;;eAEG;YAGH,IAAgB,SAAS,mGAAS;YAAlC,IAAgB,SAAS,wGAAS;YAIlC;;;eAGG;YAGH,IAAgB,WAAW,qGAAS;YAApC,IAAgB,WAAW,0GAAS;YAIpC,gBAAgB;YACT,gCAAgC;gBACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC9B,IAAI,CAAC,wCAAwC,EAAE,CAAC;YACpD,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gBAAgB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBAC7E,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;gBACvD,CAAC;gBAED,aAAa,CAAC,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YACtD,CAAC;YAED;;;eAGG;YACa,YAAY;gBACxB,OAAO,uBAAuB,CAAC;YACnC,CAAC;YAED;;;eAGG;YACa,WAAW,CAAC,QAAkB;gBAC1C,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAClC,CAAC;YAEe,WAAW;gBACvB,OAAO;oBACH,GAAG,EAAE;wBACD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;wBAC9C,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;qBAClD;iBACJ,CAAC;YACN,CAAC;;;;;;qCA5IA,SAAS,EAAE,EACX,gBAAgB,CAAC,kCAAkC,CAAC;uCASpD,SAAS,EAAE,EACX,gBAAgB,CAAC,kCAAkC,CAAC;YATrD,8KAAgB,SAAS,6BAAT,SAAS,6FAAS;YAUlC,oLAAgB,WAAW,6BAAX,WAAW,iGAAS;;;;;SAjB3B,qBAAqB;AAoJlC,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,qCAAqC;IACjD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, expandToProperty } from \"../Misc/decorators\";\r\nimport { MaterialDefines } from \"./materialDefines\";\r\nimport { MaterialPluginBase } from \"./materialPluginBase.pure\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { MaterialFlags } from \"./materialFlags\";\r\nimport { type Scene } from \"core/scene.pure\";\r\nimport { type Engine } from \"core/Engines/engine.pure\";\r\nimport { type SubMesh } from \"core/Meshes/subMesh.pure\";\r\nimport { type AbstractMesh } from \"core/Meshes/abstractMesh.pure\";\r\nimport { type UniformBuffer } from \"./uniformBuffer\";\r\nimport { type PBRBaseMaterial } from \"./PBR/pbrBaseMaterial.pure\";\r\nimport { type StandardMaterial } from \"./standardMaterial.pure\";\r\nimport { BindTextureMatrix, PrepareDefinesForMergedUV } from \"./materialHelper.functions\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class DecalMapDefines extends MaterialDefines {\r\n DECAL = false;\r\n DECALDIRECTUV = 0;\r\n DECAL_SMOOTHALPHA = false;\r\n GAMMADECAL = false;\r\n}\r\n\r\n/**\r\n * Plugin that implements the decal map component of a material\r\n * @since 5.49.1\r\n */\r\nexport class DecalMapConfiguration extends MaterialPluginBase {\r\n private _isEnabled = false;\r\n /**\r\n * Enables or disables the decal map on this material\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor isEnabled = false;\r\n\r\n private _smoothAlpha = false;\r\n\r\n /**\r\n * Enables or disables the smooth alpha mode on this material. Default: false.\r\n * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor smoothAlpha = false;\r\n\r\n private _internalMarkAllSubMeshesAsTexturesDirty: () => void;\r\n\r\n /** @internal */\r\n public _markAllSubMeshesAsTexturesDirty(): void {\r\n this._enable(this._isEnabled);\r\n this._internalMarkAllSubMeshesAsTexturesDirty();\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the plugin is compatible with a given shader language.\r\n * @returns true if the plugin is compatible with the shader language\r\n */\r\n public override isCompatible(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Creates a new DecalMapConfiguration\r\n * @param material The material to attach the decal map plugin to\r\n * @param addToPluginList If the plugin should be added to the material plugin list\r\n */\r\n constructor(material: PBRBaseMaterial | StandardMaterial, addToPluginList = true) {\r\n super(material, \"DecalMap\", 150, new DecalMapDefines(), addToPluginList);\r\n\r\n this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method\r\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[Constants.MATERIAL_TextureDirtyFlag];\r\n }\r\n\r\n /**\r\n * Checks if the sub mesh is ready to be used\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param engine the current engine\r\n * @param subMesh the sub mesh to check\r\n * @returns true if the sub mesh is ready\r\n */\r\n public override isReadyForSubMesh(defines: DecalMapDefines, scene: Scene, engine: Engine, subMesh: SubMesh): boolean {\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return true;\r\n }\r\n\r\n return decalMap.isReady();\r\n }\r\n\r\n /**\r\n * Prepares the defines before attributes are set\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param mesh the current mesh\r\n */\r\n public override prepareDefinesBeforeAttributes(defines: DecalMapDefines, scene: Scene, mesh: AbstractMesh): void {\r\n const decalMap = mesh.decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n const isDirty = defines.DECAL;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = false;\r\n } else {\r\n const isDirty = !defines.DECAL || defines.GAMMADECAL !== decalMap.texture.gammaSpace;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = true;\r\n defines.GAMMADECAL = decalMap.texture.gammaSpace;\r\n defines.DECAL_SMOOTHALPHA = this._smoothAlpha;\r\n PrepareDefinesForMergedUV(decalMap.texture, defines, \"DECAL\");\r\n }\r\n }\r\n\r\n /**\r\n * Binds the material data for a sub mesh\r\n * @param uniformBuffer the uniform buffer to update\r\n * @param scene the current scene\r\n * @param _engine the current engine\r\n * @param subMesh the sub mesh to bind\r\n */\r\n public override hardBindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, _engine: Engine, subMesh: SubMesh): void {\r\n /**\r\n * Note that we override hardBindForSubMesh and not bindForSubMesh because the material can be shared by multiple meshes,\r\n * in which case mustRebind could return false even though the decal map is different for each mesh: that's because the decal map\r\n * is not part of the material but hosted by the decalMap of the mesh instead.\r\n */\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return;\r\n }\r\n\r\n const isFrozen = this._material.isFrozen;\r\n const texture = decalMap.texture;\r\n\r\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\r\n uniformBuffer.updateFloat4(\"vDecalInfos\", texture.coordinatesIndex, 0, 0, 0);\r\n BindTextureMatrix(texture, uniformBuffer, \"decal\");\r\n }\r\n\r\n uniformBuffer.setTexture(\"decalSampler\", texture);\r\n }\r\n\r\n /**\r\n * Gets the class name of this plugin\r\n * @returns the class name\r\n */\r\n public override getClassName(): string {\r\n return \"DecalMapConfiguration\";\r\n }\r\n\r\n /**\r\n * Gets the samplers used by the plugin\r\n * @param samplers the list of samplers to update\r\n */\r\n public override getSamplers(samplers: string[]): void {\r\n samplers.push(\"decalSampler\");\r\n }\r\n\r\n public override getUniforms(): { ubo?: Array<{ name: string; size: number; type: string }>; vertex?: string; fragment?: string } {\r\n return {\r\n ubo: [\r\n { name: \"vDecalInfos\", size: 4, type: \"vec4\" },\r\n { name: \"decalMatrix\", size: 16, type: \"mat4\" },\r\n ],\r\n };\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for materialDecalMapConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterMaterialDecalMapConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n RegisterClass(\"BABYLON.DecalMapConfiguration\", DecalMapConfiguration);\r\n}\r\n"]}
@@ -29,7 +29,7 @@ export declare class DetailMapConfiguration extends MaterialPluginBase {
29
29
  /**
30
30
  * The detail texture of the material.
31
31
  */
32
- texture: Nullable<BaseTexture>;
32
+ accessor texture: Nullable<BaseTexture>;
33
33
  /**
34
34
  * Defines how strongly the detail diffuse/albedo channel is blended with the regular diffuse/albedo texture
35
35
  * Bigger values mean stronger blending
@@ -49,12 +49,12 @@ export declare class DetailMapConfiguration extends MaterialPluginBase {
49
49
  /**
50
50
  * The method used to blend the bump and detail normals together
51
51
  */
52
- normalBlendMethod: number;
52
+ accessor normalBlendMethod: number;
53
53
  private _isEnabled;
54
54
  /**
55
55
  * Enable or disable the detail map on this material
56
56
  */
57
- isEnabled: boolean;
57
+ accessor isEnabled: boolean;
58
58
  /** @internal */
59
59
  private _internalMarkAllSubMeshesAsTexturesDirty;
60
60
  /** @internal */