@babylonjs/core 7.31.2 → 7.32.1

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 (367) hide show
  1. package/Behaviors/Cameras/autoRotationBehavior.js +1 -0
  2. package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
  3. package/Cameras/camera.d.ts +5 -2
  4. package/Cameras/camera.js +1 -0
  5. package/Cameras/camera.js.map +1 -1
  6. package/Decorators/nodeDecorator.d.ts +9 -1
  7. package/Decorators/nodeDecorator.js +8 -0
  8. package/Decorators/nodeDecorator.js.map +1 -1
  9. package/Engines/Extensions/engine.multiRender.js +40 -53
  10. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  11. package/Engines/Extensions/engine.renderTarget.js +20 -8
  12. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  13. package/Engines/WebGPU/Extensions/engine.debugging.js +16 -7
  14. package/Engines/WebGPU/Extensions/engine.debugging.js.map +1 -1
  15. package/Engines/WebGPU/Extensions/engine.multiRender.js +43 -44
  16. package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
  17. package/Engines/WebGPU/Extensions/engine.renderTarget.js +8 -6
  18. package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
  19. package/Engines/WebGPU/webgpuHardwareTexture.d.ts +3 -3
  20. package/Engines/WebGPU/webgpuHardwareTexture.js +12 -9
  21. package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
  22. package/Engines/WebGPU/webgpuTextureHelper.js +25 -19
  23. package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
  24. package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
  25. package/Engines/WebGPU/webgpuTextureManager.js +5 -3
  26. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  27. package/Engines/abstractEngine.d.ts +6 -1
  28. package/Engines/abstractEngine.js +2 -2
  29. package/Engines/abstractEngine.js.map +1 -1
  30. package/Engines/constants.d.ts +6 -1
  31. package/Engines/constants.js +6 -1
  32. package/Engines/constants.js.map +1 -1
  33. package/Engines/renderTargetWrapper.d.ts +7 -0
  34. package/Engines/renderTargetWrapper.js +15 -0
  35. package/Engines/renderTargetWrapper.js.map +1 -1
  36. package/Engines/webgpuEngine.d.ts +3 -1
  37. package/Engines/webgpuEngine.js +9 -8
  38. package/Engines/webgpuEngine.js.map +1 -1
  39. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.d.ts +47 -0
  40. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js +113 -0
  41. package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.js.map +1 -0
  42. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.d.ts +62 -0
  43. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js +171 -0
  44. package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.js.map +1 -0
  45. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.d.ts +51 -0
  46. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js +127 -0
  47. package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.js.map +1 -0
  48. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.d.ts +67 -0
  49. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js +187 -0
  50. package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.js.map +1 -0
  51. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.d.ts +77 -0
  52. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js +232 -0
  53. package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.js.map +1 -0
  54. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.d.ts +47 -0
  55. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js +113 -0
  56. package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.js.map +1 -0
  57. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.d.ts +41 -0
  58. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js +79 -0
  59. package/FrameGraph/Node/Blocks/Rendering/cullObjectsBlock.js.map +1 -0
  60. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.d.ts +119 -0
  61. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js +451 -0
  62. package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.js.map +1 -0
  63. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.d.ts +63 -0
  64. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js +154 -0
  65. package/FrameGraph/Node/Blocks/Rendering/objectRendererBlock.js.map +1 -0
  66. package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.d.ts +59 -0
  67. package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.js +131 -0
  68. package/FrameGraph/Node/Blocks/Teleport/teleportInBlock.js.map +1 -0
  69. package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.d.ts +49 -0
  70. package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.js +107 -0
  71. package/FrameGraph/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -0
  72. package/FrameGraph/Node/Blocks/Textures/clearBlock.d.ts +50 -0
  73. package/FrameGraph/Node/Blocks/Textures/clearBlock.js +125 -0
  74. package/FrameGraph/Node/Blocks/Textures/clearBlock.js.map +1 -0
  75. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.d.ts +38 -0
  76. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js +71 -0
  77. package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.js.map +1 -0
  78. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.d.ts +34 -0
  79. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js +59 -0
  80. package/FrameGraph/Node/Blocks/Textures/generateMipmapsBlock.js.map +1 -0
  81. package/FrameGraph/Node/Blocks/elbowBlock.d.ts +28 -0
  82. package/FrameGraph/Node/Blocks/elbowBlock.js +47 -0
  83. package/FrameGraph/Node/Blocks/elbowBlock.js.map +1 -0
  84. package/FrameGraph/Node/Blocks/index.d.ts +17 -0
  85. package/FrameGraph/Node/Blocks/index.js +18 -0
  86. package/FrameGraph/Node/Blocks/index.js.map +1 -0
  87. package/FrameGraph/Node/Blocks/inputBlock.d.ts +94 -0
  88. package/FrameGraph/Node/Blocks/inputBlock.js +270 -0
  89. package/FrameGraph/Node/Blocks/inputBlock.js.map +1 -0
  90. package/FrameGraph/Node/Blocks/outputBlock.d.ts +30 -0
  91. package/FrameGraph/Node/Blocks/outputBlock.js +51 -0
  92. package/FrameGraph/Node/Blocks/outputBlock.js.map +1 -0
  93. package/FrameGraph/Node/Types/nodeRenderGraphTypes.d.ts +110 -0
  94. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js +78 -0
  95. package/FrameGraph/Node/Types/nodeRenderGraphTypes.js.map +1 -0
  96. package/FrameGraph/Node/nodeRenderGraph.d.ts +196 -0
  97. package/FrameGraph/Node/nodeRenderGraph.js +614 -0
  98. package/FrameGraph/Node/nodeRenderGraph.js.map +1 -0
  99. package/FrameGraph/Node/nodeRenderGraphBlock.d.ts +190 -0
  100. package/FrameGraph/Node/nodeRenderGraphBlock.js +495 -0
  101. package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -0
  102. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.d.ts +143 -0
  103. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js +275 -0
  104. package/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.js.map +1 -0
  105. package/FrameGraph/Node/nodeRenderGraphBuildState.d.ts +21 -0
  106. package/FrameGraph/Node/nodeRenderGraphBuildState.js +35 -0
  107. package/FrameGraph/Node/nodeRenderGraphBuildState.js.map +1 -0
  108. package/FrameGraph/Passes/cullPass.d.ts +28 -0
  109. package/FrameGraph/Passes/cullPass.js +38 -0
  110. package/FrameGraph/Passes/cullPass.js.map +1 -0
  111. package/FrameGraph/Passes/pass.d.ts +14 -0
  112. package/FrameGraph/Passes/pass.js +20 -0
  113. package/FrameGraph/Passes/pass.js.map +1 -0
  114. package/FrameGraph/Passes/renderPass.d.ts +49 -0
  115. package/FrameGraph/Passes/renderPass.js +72 -0
  116. package/FrameGraph/Passes/renderPass.js.map +1 -0
  117. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.d.ts +16 -0
  118. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js +17 -0
  119. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js.map +1 -0
  120. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.d.ts +12 -0
  121. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js +21 -0
  122. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js.map +1 -0
  123. package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +54 -0
  124. package/FrameGraph/Tasks/PostProcesses/bloomTask.js +114 -0
  125. package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -0
  126. package/FrameGraph/Tasks/PostProcesses/blurTask.d.ts +17 -0
  127. package/FrameGraph/Tasks/PostProcesses/blurTask.js +24 -0
  128. package/FrameGraph/Tasks/PostProcesses/blurTask.js.map +1 -0
  129. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.d.ts +30 -0
  130. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +35 -0
  131. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -0
  132. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.d.ts +12 -0
  133. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +26 -0
  134. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -0
  135. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.d.ts +12 -0
  136. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +29 -0
  137. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -0
  138. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +65 -0
  139. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +134 -0
  140. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -0
  141. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.d.ts +16 -0
  142. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js +17 -0
  143. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js.map +1 -0
  144. package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +41 -0
  145. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +64 -0
  146. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -0
  147. package/FrameGraph/Tasks/Rendering/cullObjectsTask.d.ts +28 -0
  148. package/FrameGraph/Tasks/Rendering/cullObjectsTask.js +52 -0
  149. package/FrameGraph/Tasks/Rendering/cullObjectsTask.js.map +1 -0
  150. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +145 -0
  151. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +259 -0
  152. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -0
  153. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +66 -0
  154. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +127 -0
  155. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -0
  156. package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +34 -0
  157. package/FrameGraph/Tasks/Texture/clearTextureTask.js +42 -0
  158. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -0
  159. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.d.ts +12 -0
  160. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js +23 -0
  161. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js.map +1 -0
  162. package/FrameGraph/Tasks/Texture/copyToTextureTask.d.ts +26 -0
  163. package/FrameGraph/Tasks/Texture/copyToTextureTask.js +31 -0
  164. package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -0
  165. package/FrameGraph/Tasks/Texture/generateMipMapsTask.d.ts +22 -0
  166. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js +34 -0
  167. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js.map +1 -0
  168. package/FrameGraph/frameGraph.d.ts +143 -0
  169. package/FrameGraph/frameGraph.js +275 -0
  170. package/FrameGraph/frameGraph.js.map +1 -0
  171. package/FrameGraph/frameGraphContext.d.ts +5 -0
  172. package/FrameGraph/frameGraphContext.js +6 -0
  173. package/FrameGraph/frameGraphContext.js.map +1 -0
  174. package/FrameGraph/frameGraphObjectList.d.ts +15 -0
  175. package/FrameGraph/frameGraphObjectList.js +7 -0
  176. package/FrameGraph/frameGraphObjectList.js.map +1 -0
  177. package/FrameGraph/frameGraphRenderContext.d.ts +110 -0
  178. package/FrameGraph/frameGraphRenderContext.js +237 -0
  179. package/FrameGraph/frameGraphRenderContext.js.map +1 -0
  180. package/FrameGraph/frameGraphTask.d.ts +49 -0
  181. package/FrameGraph/frameGraphTask.js +117 -0
  182. package/FrameGraph/frameGraphTask.js.map +1 -0
  183. package/FrameGraph/frameGraphTextureManager.d.ts +50 -0
  184. package/FrameGraph/frameGraphTextureManager.js +277 -0
  185. package/FrameGraph/frameGraphTextureManager.js.map +1 -0
  186. package/FrameGraph/frameGraphTypes.d.ts +59 -0
  187. package/FrameGraph/frameGraphTypes.js +9 -0
  188. package/FrameGraph/frameGraphTypes.js.map +1 -0
  189. package/FrameGraph/index.d.ts +28 -0
  190. package/FrameGraph/index.js +30 -0
  191. package/FrameGraph/index.js.map +1 -0
  192. package/Gamepads/gamepadSceneComponent.d.ts +0 -1
  193. package/Gamepads/gamepadSceneComponent.js +1 -7
  194. package/Gamepads/gamepadSceneComponent.js.map +1 -1
  195. package/Gizmos/boundingBoxGizmo.d.ts +7 -0
  196. package/Gizmos/boundingBoxGizmo.js +19 -6
  197. package/Gizmos/boundingBoxGizmo.js.map +1 -1
  198. package/Inputs/scene.inputManager.d.ts +3 -1
  199. package/Inputs/scene.inputManager.js +20 -8
  200. package/Inputs/scene.inputManager.js.map +1 -1
  201. package/Layers/layer.d.ts +1 -1
  202. package/Layers/layer.js +1 -1
  203. package/Layers/layer.js.map +1 -1
  204. package/Materials/PBR/pbrBaseMaterial.d.ts +4 -0
  205. package/Materials/PBR/pbrBaseMaterial.js +8 -0
  206. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  207. package/Materials/Textures/dynamicTexture.d.ts +32 -2
  208. package/Materials/Textures/dynamicTexture.js +13 -18
  209. package/Materials/Textures/dynamicTexture.js.map +1 -1
  210. package/Materials/Textures/index.d.ts +1 -0
  211. package/Materials/Textures/index.js +1 -0
  212. package/Materials/Textures/index.js.map +1 -1
  213. package/Materials/Textures/mirrorTexture.js +0 -6
  214. package/Materials/Textures/mirrorTexture.js.map +1 -1
  215. package/Materials/Textures/multiRenderTarget.d.ts +20 -8
  216. package/Materials/Textures/multiRenderTarget.js +2 -0
  217. package/Materials/Textures/multiRenderTarget.js.map +1 -1
  218. package/Materials/Textures/renderTargetTexture.d.ts +8 -1
  219. package/Materials/Textures/renderTargetTexture.js +28 -10
  220. package/Materials/Textures/renderTargetTexture.js.map +1 -1
  221. package/Materials/Textures/textureCreationOptions.d.ts +20 -2
  222. package/Materials/Textures/textureCreationOptions.js +20 -1
  223. package/Materials/Textures/textureCreationOptions.js.map +1 -1
  224. package/Materials/effectRenderer.d.ts +132 -14
  225. package/Materials/effectRenderer.js +229 -33
  226. package/Materials/effectRenderer.js.map +1 -1
  227. package/Materials/index.d.ts +1 -0
  228. package/Materials/index.js +1 -0
  229. package/Materials/index.js.map +1 -1
  230. package/Materials/materialHelper.functions.js +2 -0
  231. package/Materials/materialHelper.functions.js.map +1 -1
  232. package/Materials/materialHelper.geometryrendering.d.ts +122 -0
  233. package/Materials/materialHelper.geometryrendering.js +259 -0
  234. package/Materials/materialHelper.geometryrendering.js.map +1 -0
  235. package/Materials/standardMaterial.d.ts +4 -0
  236. package/Materials/standardMaterial.js +8 -0
  237. package/Materials/standardMaterial.js.map +1 -1
  238. package/Maths/index.d.ts +1 -0
  239. package/Maths/index.js +1 -0
  240. package/Maths/index.js.map +1 -1
  241. package/Meshes/Builders/greasedLineBuilder.d.ts +1 -1
  242. package/Meshes/Node/Blocks/geometryOptimizeBlock.d.ts +22 -1
  243. package/Meshes/Node/Blocks/geometryOptimizeBlock.js +39 -0
  244. package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
  245. package/Misc/copyTextureToTexture.d.ts +3 -2
  246. package/Misc/copyTextureToTexture.js +11 -5
  247. package/Misc/copyTextureToTexture.js.map +1 -1
  248. package/PostProcesses/blackAndWhitePostProcess.d.ts +5 -3
  249. package/PostProcesses/blackAndWhitePostProcess.js +24 -19
  250. package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
  251. package/PostProcesses/bloomEffect.d.ts +7 -5
  252. package/PostProcesses/bloomEffect.js +49 -23
  253. package/PostProcesses/bloomEffect.js.map +1 -1
  254. package/PostProcesses/bloomMergePostProcess.d.ts +5 -5
  255. package/PostProcesses/bloomMergePostProcess.js +28 -19
  256. package/PostProcesses/bloomMergePostProcess.js.map +1 -1
  257. package/PostProcesses/blurPostProcess.d.ts +7 -43
  258. package/PostProcesses/blurPostProcess.js +47 -185
  259. package/PostProcesses/blurPostProcess.js.map +1 -1
  260. package/PostProcesses/circleOfConfusionPostProcess.d.ts +13 -6
  261. package/PostProcesses/circleOfConfusionPostProcess.js +59 -38
  262. package/PostProcesses/circleOfConfusionPostProcess.js.map +1 -1
  263. package/PostProcesses/depthOfFieldBlurPostProcess.d.ts +2 -6
  264. package/PostProcesses/depthOfFieldBlurPostProcess.js +14 -11
  265. package/PostProcesses/depthOfFieldBlurPostProcess.js.map +1 -1
  266. package/PostProcesses/depthOfFieldEffect.d.ts +5 -2
  267. package/PostProcesses/depthOfFieldEffect.js +53 -45
  268. package/PostProcesses/depthOfFieldEffect.js.map +1 -1
  269. package/PostProcesses/depthOfFieldMergePostProcess.d.ts +0 -1
  270. package/PostProcesses/depthOfFieldMergePostProcess.js +18 -12
  271. package/PostProcesses/depthOfFieldMergePostProcess.js.map +1 -1
  272. package/PostProcesses/extractHighlightsPostProcess.d.ts +8 -4
  273. package/PostProcesses/extractHighlightsPostProcess.js +35 -22
  274. package/PostProcesses/extractHighlightsPostProcess.js.map +1 -1
  275. package/PostProcesses/index.d.ts +6 -0
  276. package/PostProcesses/index.js +6 -0
  277. package/PostProcesses/index.js.map +1 -1
  278. package/PostProcesses/postProcess.d.ts +15 -70
  279. package/PostProcesses/postProcess.js +80 -97
  280. package/PostProcesses/postProcess.js.map +1 -1
  281. package/PostProcesses/thinBlackAndWhitePostProcess.d.ts +28 -0
  282. package/PostProcesses/thinBlackAndWhitePostProcess.js +50 -0
  283. package/PostProcesses/thinBlackAndWhitePostProcess.js.map +1 -0
  284. package/PostProcesses/thinBloomEffect.d.ts +49 -0
  285. package/PostProcesses/thinBloomEffect.js +59 -0
  286. package/PostProcesses/thinBloomEffect.js.map +1 -0
  287. package/PostProcesses/thinBloomMergePostProcess.d.ts +15 -0
  288. package/PostProcesses/thinBloomMergePostProcess.js +38 -0
  289. package/PostProcesses/thinBloomMergePostProcess.js.map +1 -0
  290. package/PostProcesses/thinBlurPostProcess.d.ts +89 -0
  291. package/PostProcesses/thinBlurPostProcess.js +242 -0
  292. package/PostProcesses/thinBlurPostProcess.js.map +1 -0
  293. package/PostProcesses/thinCircleOfConfusionPostProcess.d.ts +62 -0
  294. package/PostProcesses/thinCircleOfConfusionPostProcess.js +81 -0
  295. package/PostProcesses/thinCircleOfConfusionPostProcess.js.map +1 -0
  296. package/PostProcesses/thinDepthOfFieldBlurPostProcess.d.ts +8 -0
  297. package/PostProcesses/thinDepthOfFieldBlurPostProcess.js +13 -0
  298. package/PostProcesses/thinDepthOfFieldBlurPostProcess.js.map +1 -0
  299. package/PostProcesses/thinDepthOfFieldEffect.d.ts +70 -0
  300. package/PostProcesses/thinDepthOfFieldEffect.js +115 -0
  301. package/PostProcesses/thinDepthOfFieldEffect.js.map +1 -0
  302. package/PostProcesses/thinDepthOfFieldMergePostProcess.d.ts +11 -0
  303. package/PostProcesses/thinDepthOfFieldMergePostProcess.js +30 -0
  304. package/PostProcesses/thinDepthOfFieldMergePostProcess.js.map +1 -0
  305. package/PostProcesses/thinExtractHighlightsPostProcess.d.ts +30 -0
  306. package/PostProcesses/thinExtractHighlightsPostProcess.js +55 -0
  307. package/PostProcesses/thinExtractHighlightsPostProcess.js.map +1 -0
  308. package/Rendering/depthPeelingRenderer.js +2 -2
  309. package/Rendering/depthPeelingRenderer.js.map +1 -1
  310. package/Rendering/fluidRenderer/fluidRenderingObject.js +4 -4
  311. package/Rendering/fluidRenderer/fluidRenderingObject.js.map +1 -1
  312. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js +1 -1
  313. package/Rendering/fluidRenderer/fluidRenderingObjectCustomParticles.js.map +1 -1
  314. package/Shaders/ShadersInclude/pbrBlockPrePass.d.ts +5 -0
  315. package/Shaders/ShadersInclude/pbrBlockPrePass.js +75 -0
  316. package/Shaders/ShadersInclude/pbrBlockPrePass.js.map +1 -0
  317. package/Shaders/ShadersInclude/prePassVertex.js +1 -2
  318. package/Shaders/ShadersInclude/prePassVertex.js.map +1 -1
  319. package/Shaders/circleOfConfusion.fragment.js +9 -1
  320. package/Shaders/circleOfConfusion.fragment.js.map +1 -1
  321. package/Shaders/colorCorrection.fragment.js +1 -0
  322. package/Shaders/colorCorrection.fragment.js.map +1 -1
  323. package/Shaders/default.fragment.js +17 -25
  324. package/Shaders/default.fragment.js.map +1 -1
  325. package/Shaders/default.vertex.js +4 -6
  326. package/Shaders/default.vertex.js.map +1 -1
  327. package/Shaders/pbr.fragment.d.ts +1 -0
  328. package/Shaders/pbr.fragment.js +2 -74
  329. package/Shaders/pbr.fragment.js.map +1 -1
  330. package/Shaders/pbr.vertex.js +3 -3
  331. package/Shaders/pbr.vertex.js.map +1 -1
  332. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.d.ts +5 -0
  333. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js +100 -0
  334. package/ShadersWGSL/ShadersInclude/pbrBlockPrePass.js.map +1 -0
  335. package/ShadersWGSL/ShadersInclude/prePassVertex.js +1 -2
  336. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  337. package/ShadersWGSL/background.vertex.js +1 -1
  338. package/ShadersWGSL/background.vertex.js.map +1 -1
  339. package/ShadersWGSL/circleOfConfusion.fragment.js +10 -2
  340. package/ShadersWGSL/circleOfConfusion.fragment.js.map +1 -1
  341. package/ShadersWGSL/default.fragment.js +20 -31
  342. package/ShadersWGSL/default.fragment.js.map +1 -1
  343. package/ShadersWGSL/default.vertex.js +4 -5
  344. package/ShadersWGSL/default.vertex.js.map +1 -1
  345. package/ShadersWGSL/glowMapGeneration.fragment.js +1 -1
  346. package/ShadersWGSL/glowMapGeneration.fragment.js.map +1 -1
  347. package/ShadersWGSL/glowMapGeneration.vertex.js +1 -1
  348. package/ShadersWGSL/glowMapGeneration.vertex.js.map +1 -1
  349. package/ShadersWGSL/pbr.fragment.d.ts +1 -0
  350. package/ShadersWGSL/pbr.fragment.js +2 -100
  351. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  352. package/ShadersWGSL/pbr.vertex.js +4 -2
  353. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  354. package/XR/features/WebXRRawCameraAccess.js +1 -1
  355. package/XR/features/WebXRRawCameraAccess.js.map +1 -1
  356. package/index.d.ts +1 -0
  357. package/index.js +1 -0
  358. package/index.js.map +1 -1
  359. package/package.json +1 -1
  360. package/scene.d.ts +19 -2
  361. package/scene.js +110 -13
  362. package/scene.js.map +1 -1
  363. package/sceneComponent.d.ts +0 -1
  364. package/sceneComponent.js +0 -1
  365. package/sceneComponent.js.map +1 -1
  366. package/types.d.ts +12 -0
  367. package/types.js.map +1 -1
@@ -0,0 +1,143 @@
1
+ import type { Nullable, NodeRenderGraphBlock, NodeRenderGraphBlockConnectionPointValueType } from "../../index.js";
2
+ import { Observable } from "../../Misc/observable";
3
+ import { NodeRenderGraphBlockConnectionPointTypes, NodeRenderGraphConnectionPointCompatibilityStates, NodeRenderGraphConnectionPointDirection } from "./Types/nodeRenderGraphTypes";
4
+ /**
5
+ * Defines a connection point for a block
6
+ */
7
+ export declare class NodeRenderGraphConnectionPoint {
8
+ private readonly _ownerBlock;
9
+ private _connectedPoint;
10
+ /** @internal */
11
+ _acceptedConnectionPointType: Nullable<NodeRenderGraphConnectionPoint>;
12
+ private _endpoints;
13
+ private readonly _direction;
14
+ private _type;
15
+ /** @internal */
16
+ _linkedConnectionSource: Nullable<NodeRenderGraphConnectionPoint>;
17
+ /** @internal */
18
+ _typeConnectionSource: Nullable<NodeRenderGraphConnectionPoint | (() => NodeRenderGraphConnectionPoint)>;
19
+ /** @internal */
20
+ _defaultConnectionPointType: Nullable<NodeRenderGraphBlockConnectionPointTypes>;
21
+ /** Gets the direction of the point */
22
+ get direction(): NodeRenderGraphConnectionPointDirection;
23
+ /**
24
+ * The value stored in this connection point
25
+ */
26
+ value: NodeRenderGraphBlockConnectionPointValueType | undefined;
27
+ /**
28
+ * Gets or sets the additional types supported by this connection point
29
+ */
30
+ acceptedConnectionPointTypes: NodeRenderGraphBlockConnectionPointTypes[];
31
+ /**
32
+ * Gets or sets the additional types excluded by this connection point
33
+ */
34
+ excludedConnectionPointTypes: NodeRenderGraphBlockConnectionPointTypes[];
35
+ /**
36
+ * Observable triggered when this point is connected
37
+ */
38
+ onConnectionObservable: Observable<NodeRenderGraphConnectionPoint>;
39
+ /**
40
+ * Observable triggered when this point is disconnected
41
+ */
42
+ onDisconnectionObservable: Observable<NodeRenderGraphConnectionPoint>;
43
+ /**
44
+ * Gets or sets a boolean indicating that this connection point is exposed on a frame
45
+ */
46
+ isExposedOnFrame: boolean;
47
+ /**
48
+ * Gets or sets number indicating the position that the port is exposed to on a frame
49
+ */
50
+ exposedPortPosition: number;
51
+ /**
52
+ * Gets or sets the connection point type (default is Undefined)
53
+ */
54
+ get type(): NodeRenderGraphBlockConnectionPointTypes;
55
+ set type(value: NodeRenderGraphBlockConnectionPointTypes);
56
+ /**
57
+ * Gets or sets the connection point name
58
+ */
59
+ name: string;
60
+ /**
61
+ * Gets or sets the connection point display name
62
+ */
63
+ displayName: string;
64
+ /**
65
+ * Gets or sets a boolean indicating that this connection point can be omitted
66
+ */
67
+ isOptional: boolean;
68
+ /**
69
+ * Gets a boolean indicating that the current point is connected to another NodeRenderGraphBlock
70
+ */
71
+ get isConnected(): boolean;
72
+ /** Get the other side of the connection (if any) */
73
+ get connectedPoint(): Nullable<NodeRenderGraphConnectionPoint>;
74
+ /** Get the block that owns this connection point */
75
+ get ownerBlock(): NodeRenderGraphBlock;
76
+ /** Get the block connected on the other side of this connection (if any) */
77
+ get sourceBlock(): Nullable<NodeRenderGraphBlock>;
78
+ /** Get the block connected on the endpoints of this connection (if any) */
79
+ get connectedBlocks(): Array<NodeRenderGraphBlock>;
80
+ /** Gets the list of connected endpoints */
81
+ get endpoints(): NodeRenderGraphConnectionPoint[];
82
+ /** Gets a boolean indicating if that output point is connected to at least one input */
83
+ get hasEndpoints(): boolean;
84
+ /** Get the inner type (ie AutoDetect for instance instead of the inferred one) */
85
+ get innerType(): NodeRenderGraphBlockConnectionPointTypes;
86
+ /**
87
+ * Creates a new connection point
88
+ * @param name defines the connection point name
89
+ * @param ownerBlock defines the block hosting this connection point
90
+ * @param direction defines the direction of the connection point
91
+ */
92
+ constructor(name: string, ownerBlock: NodeRenderGraphBlock, direction: NodeRenderGraphConnectionPointDirection);
93
+ /**
94
+ * Gets the current class name e.g. "NodeRenderGraphConnectionPoint"
95
+ * @returns the class name
96
+ */
97
+ getClassName(): string;
98
+ /**
99
+ * Gets a boolean indicating if the current point can be connected to another point
100
+ * @param connectionPoint defines the other connection point
101
+ * @returns a boolean
102
+ */
103
+ canConnectTo(connectionPoint: NodeRenderGraphConnectionPoint): boolean;
104
+ /**
105
+ * Gets a number indicating if the current point can be connected to another point
106
+ * @param connectionPoint defines the other connection point
107
+ * @returns a number defining the compatibility state
108
+ */
109
+ checkCompatibilityState(connectionPoint: NodeRenderGraphConnectionPoint): NodeRenderGraphConnectionPointCompatibilityStates;
110
+ /**
111
+ * Connect this point to another connection point
112
+ * @param connectionPoint defines the other connection point
113
+ * @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)
114
+ * @returns the current connection point
115
+ */
116
+ connectTo(connectionPoint: NodeRenderGraphConnectionPoint, ignoreConstraints?: boolean): NodeRenderGraphConnectionPoint;
117
+ /**
118
+ * Disconnect this point from one of his endpoint
119
+ * @param endpoint defines the other connection point
120
+ * @returns the current connection point
121
+ */
122
+ disconnectFrom(endpoint: NodeRenderGraphConnectionPoint): NodeRenderGraphConnectionPoint;
123
+ /**
124
+ * Fills the list of excluded connection point types with all types other than those passed in the parameter
125
+ * @param mask Types (ORed values of NodeRenderGraphBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list
126
+ */
127
+ addExcludedConnectionPointFromAllowedTypes(mask: number): void;
128
+ /**
129
+ * Adds accepted connection point types
130
+ * @param mask Types (ORed values of NodeRenderGraphBlockConnectionPointTypes) that are allowed to connect to this point
131
+ */
132
+ addAcceptedConnectionPointTypes(mask: number): void;
133
+ /**
134
+ * Serializes this point in a JSON representation
135
+ * @param isInput defines if the connection point is an input (default is true)
136
+ * @returns the serialized point object
137
+ */
138
+ serialize(isInput?: boolean): any;
139
+ /**
140
+ * Release resources
141
+ */
142
+ dispose(): void;
143
+ }
@@ -0,0 +1,275 @@
1
+ import { Observable } from "../../Misc/observable.js";
2
+ import { NodeRenderGraphBlockConnectionPointTypes } from "./Types/nodeRenderGraphTypes.js";
3
+ /**
4
+ * Defines a connection point for a block
5
+ */
6
+ export class NodeRenderGraphConnectionPoint {
7
+ /** Gets the direction of the point */
8
+ get direction() {
9
+ return this._direction;
10
+ }
11
+ /**
12
+ * Gets or sets the connection point type (default is Undefined)
13
+ */
14
+ get type() {
15
+ if (this._type === NodeRenderGraphBlockConnectionPointTypes.AutoDetect) {
16
+ if (this._ownerBlock.isInput) {
17
+ return this._ownerBlock.type;
18
+ }
19
+ if (this._connectedPoint) {
20
+ return this._connectedPoint.type;
21
+ }
22
+ if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {
23
+ return this._linkedConnectionSource.type;
24
+ }
25
+ }
26
+ if (this._type === NodeRenderGraphBlockConnectionPointTypes.BasedOnInput) {
27
+ if (this._typeConnectionSource) {
28
+ const typeConnectionSource = typeof this._typeConnectionSource === "function" ? this._typeConnectionSource() : this._typeConnectionSource;
29
+ if (!typeConnectionSource.isConnected) {
30
+ return this._defaultConnectionPointType ?? typeConnectionSource.type;
31
+ }
32
+ return typeConnectionSource._connectedPoint.type;
33
+ }
34
+ else if (this._defaultConnectionPointType) {
35
+ return this._defaultConnectionPointType;
36
+ }
37
+ }
38
+ return this._type;
39
+ }
40
+ set type(value) {
41
+ this._type = value;
42
+ }
43
+ /**
44
+ * Gets a boolean indicating that the current point is connected to another NodeRenderGraphBlock
45
+ */
46
+ get isConnected() {
47
+ return this.connectedPoint !== null || this.hasEndpoints;
48
+ }
49
+ /** Get the other side of the connection (if any) */
50
+ get connectedPoint() {
51
+ return this._connectedPoint;
52
+ }
53
+ /** Get the block that owns this connection point */
54
+ get ownerBlock() {
55
+ return this._ownerBlock;
56
+ }
57
+ /** Get the block connected on the other side of this connection (if any) */
58
+ get sourceBlock() {
59
+ if (!this._connectedPoint) {
60
+ return null;
61
+ }
62
+ return this._connectedPoint.ownerBlock;
63
+ }
64
+ /** Get the block connected on the endpoints of this connection (if any) */
65
+ get connectedBlocks() {
66
+ if (this._endpoints.length === 0) {
67
+ return [];
68
+ }
69
+ return this._endpoints.map((e) => e.ownerBlock);
70
+ }
71
+ /** Gets the list of connected endpoints */
72
+ get endpoints() {
73
+ return this._endpoints;
74
+ }
75
+ /** Gets a boolean indicating if that output point is connected to at least one input */
76
+ get hasEndpoints() {
77
+ return this._endpoints && this._endpoints.length > 0;
78
+ }
79
+ /** Get the inner type (ie AutoDetect for instance instead of the inferred one) */
80
+ get innerType() {
81
+ if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {
82
+ return this.type;
83
+ }
84
+ return this._type;
85
+ }
86
+ /**
87
+ * Creates a new connection point
88
+ * @param name defines the connection point name
89
+ * @param ownerBlock defines the block hosting this connection point
90
+ * @param direction defines the direction of the connection point
91
+ */
92
+ constructor(name, ownerBlock, direction) {
93
+ this._connectedPoint = null;
94
+ /** @internal */
95
+ this._acceptedConnectionPointType = null;
96
+ this._endpoints = new Array();
97
+ this._type = NodeRenderGraphBlockConnectionPointTypes.Undefined;
98
+ /** @internal */
99
+ this._linkedConnectionSource = null;
100
+ /** @internal */
101
+ this._typeConnectionSource = null;
102
+ /** @internal */
103
+ this._defaultConnectionPointType = null;
104
+ /**
105
+ * Gets or sets the additional types supported by this connection point
106
+ */
107
+ this.acceptedConnectionPointTypes = [];
108
+ /**
109
+ * Gets or sets the additional types excluded by this connection point
110
+ */
111
+ this.excludedConnectionPointTypes = [];
112
+ /**
113
+ * Observable triggered when this point is connected
114
+ */
115
+ this.onConnectionObservable = new Observable();
116
+ /**
117
+ * Observable triggered when this point is disconnected
118
+ */
119
+ this.onDisconnectionObservable = new Observable();
120
+ /**
121
+ * Gets or sets a boolean indicating that this connection point is exposed on a frame
122
+ */
123
+ this.isExposedOnFrame = false;
124
+ /**
125
+ * Gets or sets number indicating the position that the port is exposed to on a frame
126
+ */
127
+ this.exposedPortPosition = -1;
128
+ this._ownerBlock = ownerBlock;
129
+ this.name = name;
130
+ this._direction = direction;
131
+ }
132
+ /**
133
+ * Gets the current class name e.g. "NodeRenderGraphConnectionPoint"
134
+ * @returns the class name
135
+ */
136
+ getClassName() {
137
+ return "NodeRenderGraphConnectionPoint";
138
+ }
139
+ /**
140
+ * Gets a boolean indicating if the current point can be connected to another point
141
+ * @param connectionPoint defines the other connection point
142
+ * @returns a boolean
143
+ */
144
+ canConnectTo(connectionPoint) {
145
+ return this.checkCompatibilityState(connectionPoint) === 0 /* NodeRenderGraphConnectionPointCompatibilityStates.Compatible */;
146
+ }
147
+ /**
148
+ * Gets a number indicating if the current point can be connected to another point
149
+ * @param connectionPoint defines the other connection point
150
+ * @returns a number defining the compatibility state
151
+ */
152
+ checkCompatibilityState(connectionPoint) {
153
+ const ownerBlock = this._ownerBlock;
154
+ const otherBlock = connectionPoint.ownerBlock;
155
+ if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeRenderGraphBlockConnectionPointTypes.AutoDetect) {
156
+ // Accepted types
157
+ if (connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1) {
158
+ return 0 /* NodeRenderGraphConnectionPointCompatibilityStates.Compatible */;
159
+ }
160
+ else {
161
+ return 1 /* NodeRenderGraphConnectionPointCompatibilityStates.TypeIncompatible */;
162
+ }
163
+ }
164
+ // Excluded
165
+ if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {
166
+ return 1 /* NodeRenderGraphConnectionPointCompatibilityStates.TypeIncompatible */;
167
+ }
168
+ // Check hierarchy
169
+ let targetBlock = otherBlock;
170
+ let sourceBlock = ownerBlock;
171
+ if (this.direction === 0 /* NodeRenderGraphConnectionPointDirection.Input */) {
172
+ targetBlock = ownerBlock;
173
+ sourceBlock = otherBlock;
174
+ }
175
+ if (targetBlock.isAnAncestorOf(sourceBlock)) {
176
+ return 2 /* NodeRenderGraphConnectionPointCompatibilityStates.HierarchyIssue */;
177
+ }
178
+ return 0 /* NodeRenderGraphConnectionPointCompatibilityStates.Compatible */;
179
+ }
180
+ /**
181
+ * Connect this point to another connection point
182
+ * @param connectionPoint defines the other connection point
183
+ * @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)
184
+ * @returns the current connection point
185
+ */
186
+ connectTo(connectionPoint, ignoreConstraints = false) {
187
+ if (!ignoreConstraints && !this.canConnectTo(connectionPoint)) {
188
+ // eslint-disable-next-line no-throw-literal
189
+ throw "Cannot connect these two connectors.";
190
+ }
191
+ this._endpoints.push(connectionPoint);
192
+ connectionPoint._connectedPoint = this;
193
+ this.onConnectionObservable.notifyObservers(connectionPoint);
194
+ connectionPoint.onConnectionObservable.notifyObservers(this);
195
+ return this;
196
+ }
197
+ /**
198
+ * Disconnect this point from one of his endpoint
199
+ * @param endpoint defines the other connection point
200
+ * @returns the current connection point
201
+ */
202
+ disconnectFrom(endpoint) {
203
+ const index = this._endpoints.indexOf(endpoint);
204
+ if (index === -1) {
205
+ return this;
206
+ }
207
+ this._endpoints.splice(index, 1);
208
+ endpoint._connectedPoint = null;
209
+ this.onDisconnectionObservable.notifyObservers(endpoint);
210
+ endpoint.onDisconnectionObservable.notifyObservers(this);
211
+ return this;
212
+ }
213
+ /**
214
+ * Fills the list of excluded connection point types with all types other than those passed in the parameter
215
+ * @param mask Types (ORed values of NodeRenderGraphBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list
216
+ */
217
+ addExcludedConnectionPointFromAllowedTypes(mask) {
218
+ let bitmask = 0;
219
+ let val = 2 ** bitmask;
220
+ // Note: don't use 1 << bitmask instead of 2 ** bitmask, as it will cause an infinite loop because 1 << 31 is negative!
221
+ while (val < NodeRenderGraphBlockConnectionPointTypes.All) {
222
+ if (!(mask & val)) {
223
+ this.excludedConnectionPointTypes.push(val);
224
+ }
225
+ bitmask++;
226
+ val = 2 ** bitmask;
227
+ }
228
+ }
229
+ /**
230
+ * Adds accepted connection point types
231
+ * @param mask Types (ORed values of NodeRenderGraphBlockConnectionPointTypes) that are allowed to connect to this point
232
+ */
233
+ addAcceptedConnectionPointTypes(mask) {
234
+ let bitmask = 0;
235
+ let val = 2 ** bitmask;
236
+ // Note: don't use 1 << bitmask instead of 2 ** bitmask, as it will cause an infinite loop because 1 << 31 is negative!
237
+ while (val < NodeRenderGraphBlockConnectionPointTypes.All) {
238
+ if (mask & val && this.acceptedConnectionPointTypes.indexOf(val) === -1) {
239
+ this.acceptedConnectionPointTypes.push(val);
240
+ }
241
+ bitmask++;
242
+ val = 2 ** bitmask;
243
+ }
244
+ }
245
+ /**
246
+ * Serializes this point in a JSON representation
247
+ * @param isInput defines if the connection point is an input (default is true)
248
+ * @returns the serialized point object
249
+ */
250
+ serialize(isInput = true) {
251
+ const serializationObject = {};
252
+ serializationObject.name = this.name;
253
+ serializationObject.displayName = this.displayName;
254
+ if (isInput && this.connectedPoint) {
255
+ serializationObject.inputName = this.name;
256
+ serializationObject.targetBlockId = this.connectedPoint.ownerBlock.uniqueId;
257
+ serializationObject.targetConnectionName = this.connectedPoint.name;
258
+ serializationObject.isExposedOnFrame = true;
259
+ serializationObject.exposedPortPosition = this.exposedPortPosition;
260
+ }
261
+ if (this.isExposedOnFrame || this.exposedPortPosition >= 0) {
262
+ serializationObject.isExposedOnFrame = true;
263
+ serializationObject.exposedPortPosition = this.exposedPortPosition;
264
+ }
265
+ return serializationObject;
266
+ }
267
+ /**
268
+ * Release resources
269
+ */
270
+ dispose() {
271
+ this.onConnectionObservable.clear();
272
+ this.onDisconnectionObservable.clear();
273
+ }
274
+ }
275
+ //# sourceMappingURL=nodeRenderGraphBlockConnectionPoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeRenderGraphBlockConnectionPoint.js","sourceRoot":"","sources":["../../../../../dev/core/src/FrameGraph/Node/nodeRenderGraphBlockConnectionPoint.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,wC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C,IAAI,CAAC;QACrC,mBAAmB,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAEnD,IAAI,OAAO,IAAI,IAAI,CAAC,cAAc,EAAE;YAChC,mBAAmB,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC;YAC1C,mBAAmB,CAAC,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC5E,mBAAmB,CAAC,oBAAoB,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;YACpE,mBAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC5C,mBAAmB,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;SACtE;QAED,IAAI,IAAI,CAAC,gBAAgB,IAAI,IAAI,CAAC,mBAAmB,IAAI,CAAC,EAAE;YACxD,mBAAmB,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC5C,mBAAmB,CAAC,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,CAAC;SACtE;QAED,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,CAAC;QACpC,IAAI,CAAC,yBAAyB,CAAC,KAAK,EAAE,CAAC;IAC3C,CAAC;CACJ","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Nullable, NodeRenderGraphBlock, NodeRenderGraphBlockConnectionPointValueType, NodeRenderGraphInputBlock } from \"core/index\";\r\nimport { Observable } from \"../../Misc/observable\";\r\nimport { NodeRenderGraphBlockConnectionPointTypes, NodeRenderGraphConnectionPointCompatibilityStates, NodeRenderGraphConnectionPointDirection } from \"./Types/nodeRenderGraphTypes\";\r\n\r\n/**\r\n * Defines a connection point for a block\r\n */\r\nexport class NodeRenderGraphConnectionPoint {\r\n private readonly _ownerBlock: NodeRenderGraphBlock;\r\n private _connectedPoint: Nullable<NodeRenderGraphConnectionPoint> = null;\r\n\r\n /** @internal */\r\n public _acceptedConnectionPointType: Nullable<NodeRenderGraphConnectionPoint> = null;\r\n\r\n private _endpoints = new Array<NodeRenderGraphConnectionPoint>();\r\n private readonly _direction: NodeRenderGraphConnectionPointDirection;\r\n private _type = NodeRenderGraphBlockConnectionPointTypes.Undefined;\r\n\r\n /** @internal */\r\n public _linkedConnectionSource: Nullable<NodeRenderGraphConnectionPoint> = null;\r\n\r\n /** @internal */\r\n public _typeConnectionSource: Nullable<NodeRenderGraphConnectionPoint | (() => NodeRenderGraphConnectionPoint)> = null;\r\n\r\n /** @internal */\r\n public _defaultConnectionPointType: Nullable<NodeRenderGraphBlockConnectionPointTypes> = null;\r\n\r\n /** Gets the direction of the point */\r\n public get direction() {\r\n return this._direction;\r\n }\r\n\r\n /**\r\n * The value stored in this connection point\r\n */\r\n public value: NodeRenderGraphBlockConnectionPointValueType | undefined;\r\n\r\n /**\r\n * Gets or sets the additional types supported by this connection point\r\n */\r\n public acceptedConnectionPointTypes: NodeRenderGraphBlockConnectionPointTypes[] = [];\r\n\r\n /**\r\n * Gets or sets the additional types excluded by this connection point\r\n */\r\n public excludedConnectionPointTypes: NodeRenderGraphBlockConnectionPointTypes[] = [];\r\n\r\n /**\r\n * Observable triggered when this point is connected\r\n */\r\n public onConnectionObservable = new Observable<NodeRenderGraphConnectionPoint>();\r\n\r\n /**\r\n * Observable triggered when this point is disconnected\r\n */\r\n public onDisconnectionObservable = new Observable<NodeRenderGraphConnectionPoint>();\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is exposed on a frame\r\n */\r\n public isExposedOnFrame: boolean = false;\r\n\r\n /**\r\n * Gets or sets number indicating the position that the port is exposed to on a frame\r\n */\r\n public exposedPortPosition: number = -1;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is Undefined)\r\n */\r\n public get type(): NodeRenderGraphBlockConnectionPointTypes {\r\n if (this._type === NodeRenderGraphBlockConnectionPointTypes.AutoDetect) {\r\n if (this._ownerBlock.isInput) {\r\n return (this._ownerBlock as NodeRenderGraphInputBlock).type;\r\n }\r\n\r\n if (this._connectedPoint) {\r\n return this._connectedPoint.type;\r\n }\r\n\r\n if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {\r\n return this._linkedConnectionSource.type;\r\n }\r\n }\r\n\r\n if (this._type === NodeRenderGraphBlockConnectionPointTypes.BasedOnInput) {\r\n if (this._typeConnectionSource) {\r\n const typeConnectionSource = typeof this._typeConnectionSource === \"function\" ? this._typeConnectionSource() : this._typeConnectionSource;\r\n if (!typeConnectionSource.isConnected) {\r\n return this._defaultConnectionPointType ?? typeConnectionSource.type;\r\n }\r\n return typeConnectionSource._connectedPoint!.type;\r\n } else if (this._defaultConnectionPointType) {\r\n return this._defaultConnectionPointType;\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n public set type(value: NodeRenderGraphBlockConnectionPointTypes) {\r\n this._type = value;\r\n }\r\n\r\n /**\r\n * Gets or sets the connection point name\r\n */\r\n public name: string;\r\n\r\n /**\r\n * Gets or sets the connection point display name\r\n */\r\n public displayName: string;\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point can be omitted\r\n */\r\n public isOptional: boolean;\r\n\r\n /**\r\n * Gets a boolean indicating that the current point is connected to another NodeRenderGraphBlock\r\n */\r\n public get isConnected(): boolean {\r\n return this.connectedPoint !== null || this.hasEndpoints;\r\n }\r\n\r\n /** Get the other side of the connection (if any) */\r\n public get connectedPoint(): Nullable<NodeRenderGraphConnectionPoint> {\r\n return this._connectedPoint;\r\n }\r\n\r\n /** Get the block that owns this connection point */\r\n public get ownerBlock(): NodeRenderGraphBlock {\r\n return this._ownerBlock;\r\n }\r\n\r\n /** Get the block connected on the other side of this connection (if any) */\r\n public get sourceBlock(): Nullable<NodeRenderGraphBlock> {\r\n if (!this._connectedPoint) {\r\n return null;\r\n }\r\n\r\n return this._connectedPoint.ownerBlock;\r\n }\r\n\r\n /** Get the block connected on the endpoints of this connection (if any) */\r\n public get connectedBlocks(): Array<NodeRenderGraphBlock> {\r\n if (this._endpoints.length === 0) {\r\n return [];\r\n }\r\n\r\n return this._endpoints.map((e) => e.ownerBlock);\r\n }\r\n\r\n /** Gets the list of connected endpoints */\r\n public get endpoints() {\r\n return this._endpoints;\r\n }\r\n\r\n /** Gets a boolean indicating if that output point is connected to at least one input */\r\n public get hasEndpoints(): boolean {\r\n return this._endpoints && this._endpoints.length > 0;\r\n }\r\n\r\n /** Get the inner type (ie AutoDetect for instance instead of the inferred one) */\r\n public get innerType() {\r\n if (this._linkedConnectionSource && this._linkedConnectionSource.isConnected) {\r\n return this.type;\r\n }\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Creates a new connection point\r\n * @param name defines the connection point name\r\n * @param ownerBlock defines the block hosting this connection point\r\n * @param direction defines the direction of the connection point\r\n */\r\n public constructor(name: string, ownerBlock: NodeRenderGraphBlock, direction: NodeRenderGraphConnectionPointDirection) {\r\n this._ownerBlock = ownerBlock;\r\n this.name = name;\r\n this._direction = direction;\r\n }\r\n\r\n /**\r\n * Gets the current class name e.g. \"NodeRenderGraphConnectionPoint\"\r\n * @returns the class name\r\n */\r\n public getClassName(): string {\r\n return \"NodeRenderGraphConnectionPoint\";\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating if the current point can be connected to another point\r\n * @param connectionPoint defines the other connection point\r\n * @returns a boolean\r\n */\r\n public canConnectTo(connectionPoint: NodeRenderGraphConnectionPoint) {\r\n return this.checkCompatibilityState(connectionPoint) === NodeRenderGraphConnectionPointCompatibilityStates.Compatible;\r\n }\r\n\r\n /**\r\n * Gets a number indicating if the current point can be connected to another point\r\n * @param connectionPoint defines the other connection point\r\n * @returns a number defining the compatibility state\r\n */\r\n public checkCompatibilityState(connectionPoint: NodeRenderGraphConnectionPoint): NodeRenderGraphConnectionPointCompatibilityStates {\r\n const ownerBlock = this._ownerBlock;\r\n const otherBlock = connectionPoint.ownerBlock;\r\n\r\n if (this.type !== connectionPoint.type && connectionPoint.innerType !== NodeRenderGraphBlockConnectionPointTypes.AutoDetect) {\r\n // Accepted types\r\n if (connectionPoint.acceptedConnectionPointTypes && connectionPoint.acceptedConnectionPointTypes.indexOf(this.type) !== -1) {\r\n return NodeRenderGraphConnectionPointCompatibilityStates.Compatible;\r\n } else {\r\n return NodeRenderGraphConnectionPointCompatibilityStates.TypeIncompatible;\r\n }\r\n }\r\n\r\n // Excluded\r\n if (connectionPoint.excludedConnectionPointTypes && connectionPoint.excludedConnectionPointTypes.indexOf(this.type) !== -1) {\r\n return NodeRenderGraphConnectionPointCompatibilityStates.TypeIncompatible;\r\n }\r\n\r\n // Check hierarchy\r\n let targetBlock = otherBlock;\r\n let sourceBlock = ownerBlock;\r\n if (this.direction === NodeRenderGraphConnectionPointDirection.Input) {\r\n targetBlock = ownerBlock;\r\n sourceBlock = otherBlock;\r\n }\r\n\r\n if (targetBlock.isAnAncestorOf(sourceBlock)) {\r\n return NodeRenderGraphConnectionPointCompatibilityStates.HierarchyIssue;\r\n }\r\n\r\n return NodeRenderGraphConnectionPointCompatibilityStates.Compatible;\r\n }\r\n\r\n /**\r\n * Connect this point to another connection point\r\n * @param connectionPoint defines the other connection point\r\n * @param ignoreConstraints defines if the system will ignore connection type constraints (default is false)\r\n * @returns the current connection point\r\n */\r\n public connectTo(connectionPoint: NodeRenderGraphConnectionPoint, ignoreConstraints = false): NodeRenderGraphConnectionPoint {\r\n if (!ignoreConstraints && !this.canConnectTo(connectionPoint)) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \"Cannot connect these two connectors.\";\r\n }\r\n\r\n this._endpoints.push(connectionPoint);\r\n connectionPoint._connectedPoint = this;\r\n\r\n this.onConnectionObservable.notifyObservers(connectionPoint);\r\n connectionPoint.onConnectionObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Disconnect this point from one of his endpoint\r\n * @param endpoint defines the other connection point\r\n * @returns the current connection point\r\n */\r\n public disconnectFrom(endpoint: NodeRenderGraphConnectionPoint): NodeRenderGraphConnectionPoint {\r\n const index = this._endpoints.indexOf(endpoint);\r\n\r\n if (index === -1) {\r\n return this;\r\n }\r\n\r\n this._endpoints.splice(index, 1);\r\n endpoint._connectedPoint = null;\r\n\r\n this.onDisconnectionObservable.notifyObservers(endpoint);\r\n endpoint.onDisconnectionObservable.notifyObservers(this);\r\n\r\n return this;\r\n }\r\n\r\n /**\r\n * Fills the list of excluded connection point types with all types other than those passed in the parameter\r\n * @param mask Types (ORed values of NodeRenderGraphBlockConnectionPointTypes) that are allowed, and thus will not be pushed to the excluded list\r\n */\r\n public addExcludedConnectionPointFromAllowedTypes(mask: number): void {\r\n let bitmask = 0;\r\n let val = 2 ** bitmask;\r\n // Note: don't use 1 << bitmask instead of 2 ** bitmask, as it will cause an infinite loop because 1 << 31 is negative!\r\n while (val < NodeRenderGraphBlockConnectionPointTypes.All) {\r\n if (!(mask & val)) {\r\n this.excludedConnectionPointTypes.push(val);\r\n }\r\n bitmask++;\r\n val = 2 ** bitmask;\r\n }\r\n }\r\n\r\n /**\r\n * Adds accepted connection point types\r\n * @param mask Types (ORed values of NodeRenderGraphBlockConnectionPointTypes) that are allowed to connect to this point\r\n */\r\n public addAcceptedConnectionPointTypes(mask: number): void {\r\n let bitmask = 0;\r\n let val = 2 ** bitmask;\r\n // Note: don't use 1 << bitmask instead of 2 ** bitmask, as it will cause an infinite loop because 1 << 31 is negative!\r\n while (val < NodeRenderGraphBlockConnectionPointTypes.All) {\r\n if (mask & val && this.acceptedConnectionPointTypes.indexOf(val) === -1) {\r\n this.acceptedConnectionPointTypes.push(val);\r\n }\r\n bitmask++;\r\n val = 2 ** bitmask;\r\n }\r\n }\r\n\r\n /**\r\n * Serializes this point in a JSON representation\r\n * @param isInput defines if the connection point is an input (default is true)\r\n * @returns the serialized point object\r\n */\r\n public serialize(isInput = true): any {\r\n const serializationObject: any = {};\r\n\r\n serializationObject.name = this.name;\r\n serializationObject.displayName = this.displayName;\r\n\r\n if (isInput && this.connectedPoint) {\r\n serializationObject.inputName = this.name;\r\n serializationObject.targetBlockId = this.connectedPoint.ownerBlock.uniqueId;\r\n serializationObject.targetConnectionName = this.connectedPoint.name;\r\n serializationObject.isExposedOnFrame = true;\r\n serializationObject.exposedPortPosition = this.exposedPortPosition;\r\n }\r\n\r\n if (this.isExposedOnFrame || this.exposedPortPosition >= 0) {\r\n serializationObject.isExposedOnFrame = true;\r\n serializationObject.exposedPortPosition = this.exposedPortPosition;\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /**\r\n * Release resources\r\n */\r\n public dispose() {\r\n this.onConnectionObservable.clear();\r\n this.onDisconnectionObservable.clear();\r\n }\r\n}\r\n"]}
@@ -0,0 +1,21 @@
1
+ import type { Nullable, NodeRenderGraphConnectionPoint, Observable } from "../../index.js";
2
+ /**
3
+ * Class used to store node based render graph build state
4
+ */
5
+ export declare class NodeRenderGraphBuildState {
6
+ /** Gets or sets the build identifier */
7
+ buildId: number;
8
+ /** Gets or sets a boolean indicating that verbose mode is on */
9
+ verbose: boolean;
10
+ /**
11
+ * Gets or sets the list of non connected mandatory inputs
12
+ * @internal
13
+ */
14
+ _notConnectedNonOptionalInputs: NodeRenderGraphConnectionPoint[];
15
+ /**
16
+ * Emits console errors and exceptions if there is a failing check
17
+ * @param errorObservable defines an Observable to send the error message
18
+ * @returns true if all checks pass
19
+ */
20
+ emitErrors(errorObservable?: Nullable<Observable<string>>): boolean;
21
+ }
@@ -0,0 +1,35 @@
1
+ import { Logger } from "../../Misc/logger.js";
2
+ /**
3
+ * Class used to store node based render graph build state
4
+ */
5
+ export class NodeRenderGraphBuildState {
6
+ constructor() {
7
+ /** Gets or sets a boolean indicating that verbose mode is on */
8
+ this.verbose = false;
9
+ /**
10
+ * Gets or sets the list of non connected mandatory inputs
11
+ * @internal
12
+ */
13
+ this._notConnectedNonOptionalInputs = [];
14
+ }
15
+ /**
16
+ * Emits console errors and exceptions if there is a failing check
17
+ * @param errorObservable defines an Observable to send the error message
18
+ * @returns true if all checks pass
19
+ */
20
+ emitErrors(errorObservable = null) {
21
+ let errorMessage = "";
22
+ for (const notConnectedInput of this._notConnectedNonOptionalInputs) {
23
+ errorMessage += `input "${notConnectedInput.name}" from block "${notConnectedInput.ownerBlock.name}"[${notConnectedInput.ownerBlock.getClassName()}] is not connected and is not optional.\n`;
24
+ }
25
+ if (errorMessage) {
26
+ if (errorObservable) {
27
+ errorObservable.notifyObservers(errorMessage);
28
+ }
29
+ Logger.Error("Build of node render graph failed:\n" + errorMessage);
30
+ return false;
31
+ }
32
+ return true;
33
+ }
34
+ }
35
+ //# sourceMappingURL=nodeRenderGraphBuildState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeRenderGraphBuildState.js","sourceRoot":"","sources":["../../../../../dev/core/src/FrameGraph/Node/nodeRenderGraphBuildState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;;GAEG;AACH,MAAM,OAAO,yBAAyB;IAAtC;QAII,gEAAgE;QACzD,YAAO,GAAG,KAAK,CAAC;QAEvB;;;WAGG;QACI,mCAA8B,GAAqC,EAAE,CAAC;IAwBjF,CAAC;IAtBG;;;;OAIG;IACI,UAAU,CAAC,kBAAgD,IAAI;QAClE,IAAI,YAAY,GAAG,EAAE,CAAC;QACtB,KAAK,MAAM,iBAAiB,IAAI,IAAI,CAAC,8BAA8B,EAAE;YACjE,YAAY,IAAI,UAAU,iBAAiB,CAAC,IAAI,iBAC5C,iBAAiB,CAAC,UAAU,CAAC,IACjC,KAAK,iBAAiB,CAAC,UAAU,CAAC,YAAY,EAAE,2CAA2C,CAAC;SAC/F;QACD,IAAI,YAAY,EAAE;YACd,IAAI,eAAe,EAAE;gBACjB,eAAe,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;aACjD;YACD,MAAM,CAAC,KAAK,CAAC,sCAAsC,GAAG,YAAY,CAAC,CAAC;YAEpE,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Nullable, NodeRenderGraphConnectionPoint, Observable } from \"core/index\";\r\nimport { Logger } from \"../../Misc/logger\";\r\n\r\n/**\r\n * Class used to store node based render graph build state\r\n */\r\nexport class NodeRenderGraphBuildState {\r\n /** Gets or sets the build identifier */\r\n public buildId: number;\r\n\r\n /** Gets or sets a boolean indicating that verbose mode is on */\r\n public verbose = false;\r\n\r\n /**\r\n * Gets or sets the list of non connected mandatory inputs\r\n * @internal\r\n */\r\n public _notConnectedNonOptionalInputs: NodeRenderGraphConnectionPoint[] = [];\r\n\r\n /**\r\n * Emits console errors and exceptions if there is a failing check\r\n * @param errorObservable defines an Observable to send the error message\r\n * @returns true if all checks pass\r\n */\r\n public emitErrors(errorObservable: Nullable<Observable<string>> = null): boolean {\r\n let errorMessage = \"\";\r\n for (const notConnectedInput of this._notConnectedNonOptionalInputs) {\r\n errorMessage += `input \"${notConnectedInput.name}\" from block \"${\r\n notConnectedInput.ownerBlock.name\r\n }\"[${notConnectedInput.ownerBlock.getClassName()}] is not connected and is not optional.\\n`;\r\n }\r\n if (errorMessage) {\r\n if (errorObservable) {\r\n errorObservable.notifyObservers(errorMessage);\r\n }\r\n Logger.Error(\"Build of node render graph failed:\\n\" + errorMessage);\r\n\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n"]}
@@ -0,0 +1,28 @@
1
+ import type { Nullable, AbstractEngine, IFrameGraphPass, FrameGraphContext, FrameGraphObjectList, FrameGraphTask } from "../../index.js";
2
+ import { FrameGraphPass } from "./pass";
3
+ /**
4
+ * Cull pass used to filter objects that are not visible.
5
+ */
6
+ export declare class FrameGraphCullPass extends FrameGraphPass<FrameGraphContext> {
7
+ protected _engine: AbstractEngine;
8
+ protected _objectList: FrameGraphObjectList;
9
+ /**
10
+ * Checks if a pass is a cull pass.
11
+ * @param pass The pass to check.
12
+ * @returns True if the pass is a cull pass, else false.
13
+ */
14
+ static IsCullPass(pass: IFrameGraphPass): pass is FrameGraphCullPass;
15
+ /**
16
+ * Gets the object list used by the cull pass.
17
+ */
18
+ get objectList(): FrameGraphObjectList;
19
+ /**
20
+ * Sets the object list to use for culling.
21
+ * @param objectList The object list to use for culling.
22
+ */
23
+ setObjectList(objectList: FrameGraphObjectList): void;
24
+ /** @internal */
25
+ constructor(name: string, parentTask: FrameGraphTask, context: FrameGraphContext, engine: AbstractEngine);
26
+ /** @internal */
27
+ _isValid(): Nullable<string>;
28
+ }
@@ -0,0 +1,38 @@
1
+ import { FrameGraphPass } from "./pass.js";
2
+ /**
3
+ * Cull pass used to filter objects that are not visible.
4
+ */
5
+ export class FrameGraphCullPass extends FrameGraphPass {
6
+ /**
7
+ * Checks if a pass is a cull pass.
8
+ * @param pass The pass to check.
9
+ * @returns True if the pass is a cull pass, else false.
10
+ */
11
+ static IsCullPass(pass) {
12
+ return pass.setObjectList !== undefined;
13
+ }
14
+ /**
15
+ * Gets the object list used by the cull pass.
16
+ */
17
+ get objectList() {
18
+ return this._objectList;
19
+ }
20
+ /**
21
+ * Sets the object list to use for culling.
22
+ * @param objectList The object list to use for culling.
23
+ */
24
+ setObjectList(objectList) {
25
+ this._objectList = objectList;
26
+ }
27
+ /** @internal */
28
+ constructor(name, parentTask, context, engine) {
29
+ super(name, parentTask, context);
30
+ this._engine = engine;
31
+ }
32
+ /** @internal */
33
+ _isValid() {
34
+ const errMsg = super._isValid();
35
+ return errMsg ? errMsg : this._objectList !== undefined ? null : "Object list is not set (call setObjectList to set it)";
36
+ }
37
+ }
38
+ //# sourceMappingURL=cullPass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cullPass.js","sourceRoot":"","sources":["../../../../../dev/core/src/FrameGraph/Passes/cullPass.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,cAAiC;IAIrE;;;;OAIG;IACI,MAAM,CAAC,UAAU,CAAC,IAAqB;QAC1C,OAAQ,IAA2B,CAAC,aAAa,KAAK,SAAS,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,IAAW,UAAU;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,UAAgC;QACjD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;IAClC,CAAC;IAED,gBAAgB;IAChB,YAAY,IAAY,EAAE,UAA0B,EAAE,OAA0B,EAAE,MAAsB;QACpG,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAED,gBAAgB;IACA,QAAQ;QACpB,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAChC,OAAO,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,uDAAuD,CAAC;IAC7H,CAAC;CACJ","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Nullable, AbstractEngine, IFrameGraphPass, FrameGraphContext, FrameGraphObjectList, FrameGraphTask } from \"core/index\";\r\nimport { FrameGraphPass } from \"./pass\";\r\n\r\n/**\r\n * Cull pass used to filter objects that are not visible.\r\n */\r\nexport class FrameGraphCullPass extends FrameGraphPass<FrameGraphContext> {\r\n protected _engine: AbstractEngine;\r\n protected _objectList: FrameGraphObjectList;\r\n\r\n /**\r\n * Checks if a pass is a cull pass.\r\n * @param pass The pass to check.\r\n * @returns True if the pass is a cull pass, else false.\r\n */\r\n public static IsCullPass(pass: IFrameGraphPass): pass is FrameGraphCullPass {\r\n return (pass as FrameGraphCullPass).setObjectList !== undefined;\r\n }\r\n\r\n /**\r\n * Gets the object list used by the cull pass.\r\n */\r\n public get objectList(): FrameGraphObjectList {\r\n return this._objectList;\r\n }\r\n\r\n /**\r\n * Sets the object list to use for culling.\r\n * @param objectList The object list to use for culling.\r\n */\r\n public setObjectList(objectList: FrameGraphObjectList) {\r\n this._objectList = objectList;\r\n }\r\n\r\n /** @internal */\r\n constructor(name: string, parentTask: FrameGraphTask, context: FrameGraphContext, engine: AbstractEngine) {\r\n super(name, parentTask, context);\r\n this._engine = engine;\r\n }\r\n\r\n /** @internal */\r\n public override _isValid(): Nullable<string> {\r\n const errMsg = super._isValid();\r\n return errMsg ? errMsg : this._objectList !== undefined ? null : \"Object list is not set (call setObjectList to set it)\";\r\n }\r\n}\r\n"]}
@@ -0,0 +1,14 @@
1
+ import type { Nullable, FrameGraphContext, IFrameGraphPass, FrameGraphTask } from "../../index.js";
2
+ /**
3
+ * @internal
4
+ */
5
+ export declare class FrameGraphPass<T extends FrameGraphContext> implements IFrameGraphPass {
6
+ name: string;
7
+ protected readonly _parentTask: FrameGraphTask;
8
+ protected readonly _context: T;
9
+ private _executeFunc;
10
+ constructor(name: string, _parentTask: FrameGraphTask, _context: T);
11
+ setExecuteFunc(func: (context: T) => void): void;
12
+ _execute(): void;
13
+ _isValid(): Nullable<string>;
14
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export class FrameGraphPass {
5
+ constructor(name, _parentTask, _context) {
6
+ this.name = name;
7
+ this._parentTask = _parentTask;
8
+ this._context = _context;
9
+ }
10
+ setExecuteFunc(func) {
11
+ this._executeFunc = func;
12
+ }
13
+ _execute() {
14
+ this._executeFunc(this._context);
15
+ }
16
+ _isValid() {
17
+ return this._executeFunc !== undefined ? null : "Execute function is not set (call setExecuteFunc to set it)";
18
+ }
19
+ }
20
+ //# sourceMappingURL=pass.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pass.js","sourceRoot":"","sources":["../../../../../dev/core/src/FrameGraph/Passes/pass.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,OAAO,cAAc;IAGvB,YACW,IAAY,EACA,WAA2B,EAC3B,QAAW;QAFvB,SAAI,GAAJ,IAAI,CAAQ;QACA,gBAAW,GAAX,WAAW,CAAgB;QAC3B,aAAQ,GAAR,QAAQ,CAAG;IAC/B,CAAC;IAEG,cAAc,CAAC,IAA0B;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;IAC7B,CAAC;IAEM,QAAQ;QACX,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IAEM,QAAQ;QACX,OAAO,IAAI,CAAC,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,6DAA6D,CAAC;IAClH,CAAC;CACJ","sourcesContent":["// eslint-disable-next-line import/no-internal-modules\r\nimport type { Nullable, FrameGraphContext, IFrameGraphPass, FrameGraphTask } from \"core/index\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class FrameGraphPass<T extends FrameGraphContext> implements IFrameGraphPass {\r\n private _executeFunc: (context: T) => void;\r\n\r\n constructor(\r\n public name: string,\r\n protected readonly _parentTask: FrameGraphTask,\r\n protected readonly _context: T\r\n ) {}\r\n\r\n public setExecuteFunc(func: (context: T) => void) {\r\n this._executeFunc = func;\r\n }\r\n\r\n public _execute() {\r\n this._executeFunc(this._context);\r\n }\r\n\r\n public _isValid(): Nullable<string> {\r\n return this._executeFunc !== undefined ? null : \"Execute function is not set (call setExecuteFunc to set it)\";\r\n }\r\n}\r\n"]}