@babylonjs/core 7.51.1 → 7.51.3

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 (343) hide show
  1. package/Animations/animation.js +2 -1
  2. package/Animations/animation.js.map +1 -1
  3. package/Buffers/bufferUtils.d.ts +7 -5
  4. package/Buffers/bufferUtils.js +13 -9
  5. package/Buffers/bufferUtils.js.map +1 -1
  6. package/Engines/ICanvas.d.ts +96 -1
  7. package/Engines/ICanvas.js.map +1 -1
  8. package/Engines/Native/nativeInterfaces.d.ts +7 -1
  9. package/Engines/Native/nativeInterfaces.js.map +1 -1
  10. package/Engines/WebGPU/webgpuTextureManager.js +3 -3
  11. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  12. package/Engines/abstractEngine.d.ts +7 -1
  13. package/Engines/abstractEngine.js +10 -2
  14. package/Engines/abstractEngine.js.map +1 -1
  15. package/Engines/constants.d.ts +32 -0
  16. package/Engines/constants.js +33 -0
  17. package/Engines/constants.js.map +1 -1
  18. package/Engines/nativeEngine.d.ts +7 -1
  19. package/Engines/nativeEngine.js +12 -0
  20. package/Engines/nativeEngine.js.map +1 -1
  21. package/Engines/webgpuEngine.js +6 -3
  22. package/Engines/webgpuEngine.js.map +1 -1
  23. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.d.ts +148 -465
  24. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js +394 -691
  25. package/FlowGraph/Blocks/Data/Math/flowGraphMathBlocks.js.map +1 -1
  26. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.d.ts +142 -0
  27. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.js +342 -0
  28. package/FlowGraph/Blocks/Data/Math/flowGraphMathCombineExtractBlocks.js.map +1 -0
  29. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.d.ts +111 -0
  30. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js +141 -0
  31. package/FlowGraph/Blocks/Data/Math/flowGraphMatrixMathBlocks.js.map +1 -0
  32. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.d.ts +77 -0
  33. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js +139 -0
  34. package/FlowGraph/Blocks/Data/Math/flowGraphVectorMathBlocks.js.map +1 -0
  35. package/FlowGraph/Blocks/Data/Math/index.d.ts +3 -0
  36. package/FlowGraph/Blocks/Data/Math/index.js +3 -0
  37. package/FlowGraph/Blocks/Data/Math/index.js.map +1 -1
  38. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.d.ts +85 -0
  39. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js +133 -0
  40. package/FlowGraph/Blocks/Data/Transformers/flowGraphJsonPointerParserBlock.js.map +1 -0
  41. package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.d.ts +49 -0
  42. package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.js +71 -0
  43. package/FlowGraph/Blocks/Data/Transformers/flowGraphTypeToTypeBlocks.js.map +1 -0
  44. package/FlowGraph/Blocks/Data/Transformers/index.d.ts +2 -0
  45. package/FlowGraph/Blocks/Data/Transformers/index.js +3 -0
  46. package/FlowGraph/Blocks/Data/Transformers/index.js.map +1 -0
  47. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.d.ts +39 -0
  48. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.js +46 -0
  49. package/FlowGraph/Blocks/Data/Utils/flowGraphArrayIndexBlock.js.map +1 -0
  50. package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.d.ts +35 -0
  51. package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.js +34 -0
  52. package/FlowGraph/Blocks/Data/Utils/flowGraphCodeExecutionBlock.js.map +1 -0
  53. package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.d.ts +20 -0
  54. package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.js +25 -0
  55. package/FlowGraph/Blocks/Data/Utils/flowGraphContextBlock.js.map +1 -0
  56. package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.d.ts +34 -0
  57. package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.js +35 -0
  58. package/FlowGraph/Blocks/Data/Utils/flowGraphFunctionReferenceBlock.js.map +1 -0
  59. package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.d.ts +39 -0
  60. package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.js +42 -0
  61. package/FlowGraph/Blocks/Data/Utils/flowGraphIndexOfBlock.js.map +1 -0
  62. package/FlowGraph/Blocks/Data/Utils/index.d.ts +5 -0
  63. package/FlowGraph/Blocks/Data/Utils/index.js +6 -0
  64. package/FlowGraph/Blocks/Data/Utils/index.js.map +1 -0
  65. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.d.ts +0 -1
  66. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js +3 -2
  67. package/FlowGraph/Blocks/Data/flowGraphBinaryOperationBlock.js.map +1 -1
  68. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.d.ts +1 -1
  69. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js +4 -4
  70. package/FlowGraph/Blocks/Data/flowGraphCachedOperationBlock.js.map +1 -1
  71. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.d.ts +6 -3
  72. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js +12 -6
  73. package/FlowGraph/Blocks/Data/flowGraphConditionalDataBlock.js.map +1 -1
  74. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.d.ts +0 -2
  75. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js +2 -3
  76. package/FlowGraph/Blocks/Data/flowGraphConstantBlock.js.map +1 -1
  77. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.d.ts +5 -4
  78. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js +5 -4
  79. package/FlowGraph/Blocks/Data/flowGraphConstantOperationBlock.js.map +1 -1
  80. package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.d.ts +62 -0
  81. package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.js +41 -0
  82. package/FlowGraph/Blocks/Data/flowGraphGetAssetBlock.js.map +1 -0
  83. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.d.ts +38 -33
  84. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js +42 -25
  85. package/FlowGraph/Blocks/Data/flowGraphGetPropertyBlock.js.map +1 -1
  86. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.d.ts +11 -16
  87. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js +9 -17
  88. package/FlowGraph/Blocks/Data/flowGraphGetVariableBlock.js.map +1 -1
  89. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.d.ts +1 -1
  90. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js +1 -1
  91. package/FlowGraph/Blocks/Data/flowGraphTernaryOperationBlock.js.map +1 -1
  92. package/FlowGraph/Blocks/Data/{flowGraphCoordinateTransformBlock.d.ts → flowGraphTransformCoordinatesSystemBlock.d.ts} +1 -2
  93. package/FlowGraph/Blocks/Data/{flowGraphCoordinateTransformBlock.js → flowGraphTransformCoordinatesSystemBlock.js} +4 -5
  94. package/FlowGraph/Blocks/Data/flowGraphTransformCoordinatesSystemBlock.js.map +1 -0
  95. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.d.ts +1 -1
  96. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js +1 -1
  97. package/FlowGraph/Blocks/Data/flowGraphUnaryOperationBlock.js.map +1 -1
  98. package/FlowGraph/Blocks/Data/index.d.ts +7 -3
  99. package/FlowGraph/Blocks/Data/index.js +9 -4
  100. package/FlowGraph/Blocks/Data/index.js.map +1 -1
  101. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +45 -24
  102. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +45 -51
  103. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  104. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.d.ts +61 -0
  105. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.js +39 -0
  106. package/FlowGraph/Blocks/Event/flowGraphPointerOutEventBlock.js.map +1 -0
  107. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.d.ts +61 -0
  108. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.js +40 -0
  109. package/FlowGraph/Blocks/Event/flowGraphPointerOverEventBlock.js.map +1 -0
  110. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.d.ts +12 -14
  111. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js +19 -26
  112. package/FlowGraph/Blocks/Event/flowGraphReceiveCustomEventBlock.js.map +1 -1
  113. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.d.ts +6 -12
  114. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js +13 -24
  115. package/FlowGraph/Blocks/Event/flowGraphSceneReadyEventBlock.js.map +1 -1
  116. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.d.ts +31 -7
  117. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js +22 -20
  118. package/FlowGraph/Blocks/Event/flowGraphSceneTickEventBlock.js.map +1 -1
  119. package/FlowGraph/Blocks/{Execution → Event}/flowGraphSendCustomEventBlock.d.ts +12 -7
  120. package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.js +39 -0
  121. package/FlowGraph/Blocks/Event/flowGraphSendCustomEventBlock.js.map +1 -0
  122. package/FlowGraph/Blocks/Event/index.d.ts +3 -0
  123. package/FlowGraph/Blocks/Event/index.js +3 -0
  124. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  125. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.d.ts +44 -0
  126. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.js +46 -0
  127. package/FlowGraph/Blocks/Execution/Animation/flowGraphBezierCurveEasingBlock.js.map +1 -0
  128. package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.d.ts +60 -0
  129. package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.js +93 -0
  130. package/FlowGraph/Blocks/Execution/Animation/flowGraphEasingBlock.js.map +1 -0
  131. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.d.ts +82 -0
  132. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.js +105 -0
  133. package/FlowGraph/Blocks/Execution/Animation/flowGraphInterpolationBlock.js.map +1 -0
  134. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.d.ts +2 -2
  135. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js +2 -2
  136. package/FlowGraph/Blocks/Execution/Animation/flowGraphPauseAnimationBlock.js.map +1 -1
  137. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.d.ts +40 -42
  138. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js +116 -50
  139. package/FlowGraph/Blocks/Execution/Animation/flowGraphPlayAnimationBlock.js.map +1 -1
  140. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.d.ts +12 -4
  141. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js +86 -8
  142. package/FlowGraph/Blocks/Execution/Animation/flowGraphStopAnimationBlock.js.map +1 -1
  143. package/FlowGraph/Blocks/Execution/Animation/index.d.ts +3 -0
  144. package/FlowGraph/Blocks/Execution/Animation/index.js +3 -0
  145. package/FlowGraph/Blocks/Execution/Animation/index.js.map +1 -1
  146. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.d.ts +1 -2
  147. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js +3 -4
  148. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphBranchBlock.js.map +1 -1
  149. package/FlowGraph/Blocks/Execution/{Audio/flowGraphStopAudioBlock.d.ts → ControlFlow/flowGraphCancelDelayBlock.d.ts} +6 -8
  150. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js +31 -0
  151. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCancelDelayBlock.js.map +1 -0
  152. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.d.ts +2 -2
  153. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js +5 -5
  154. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphCounterBlock.js.map +1 -1
  155. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.d.ts +0 -1
  156. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js +2 -3
  157. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDebounceBlock.js.map +1 -1
  158. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.d.ts +5 -10
  159. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js +11 -15
  160. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphDoNBlock.js.map +1 -1
  161. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.d.ts +11 -3
  162. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js +5 -6
  163. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphFlipFlopBlock.js.map +1 -1
  164. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.d.ts +27 -7
  165. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js +28 -30
  166. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphForLoopBlock.js.map +1 -1
  167. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.d.ts +13 -16
  168. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js +50 -52
  169. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphMultiGateBlock.js.map +1 -1
  170. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.d.ts +8 -9
  171. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js +26 -13
  172. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSequenceBlock.js.map +1 -1
  173. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.d.ts +32 -0
  174. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js +84 -0
  175. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSetDelayBlock.js.map +1 -0
  176. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.d.ts +20 -6
  177. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js +55 -16
  178. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphSwitchBlock.js.map +1 -1
  179. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.d.ts +3 -4
  180. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js +36 -13
  181. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphThrottleBlock.js.map +1 -1
  182. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.d.ts +13 -5
  183. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js +22 -17
  184. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWaitAllBlock.js.map +1 -1
  185. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.d.ts +12 -16
  186. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js +21 -21
  187. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphWhileLoopBlock.js.map +1 -1
  188. package/FlowGraph/Blocks/Execution/ControlFlow/index.d.ts +2 -1
  189. package/FlowGraph/Blocks/Execution/ControlFlow/index.js +2 -1
  190. package/FlowGraph/Blocks/Execution/ControlFlow/index.js.map +1 -1
  191. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.d.ts +4 -5
  192. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js +13 -8
  193. package/FlowGraph/Blocks/Execution/flowGraphConsoleLogBlock.js.map +1 -1
  194. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.d.ts +33 -36
  195. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js +42 -26
  196. package/FlowGraph/Blocks/Execution/flowGraphSetPropertyBlock.js.map +1 -1
  197. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.d.ts +10 -25
  198. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js +38 -24
  199. package/FlowGraph/Blocks/Execution/flowGraphSetVariableBlock.js.map +1 -1
  200. package/FlowGraph/Blocks/Execution/index.d.ts +0 -3
  201. package/FlowGraph/Blocks/Execution/index.js +0 -3
  202. package/FlowGraph/Blocks/Execution/index.js.map +1 -1
  203. package/FlowGraph/Blocks/flowGraphBlockFactory.d.ts +16 -0
  204. package/FlowGraph/Blocks/flowGraphBlockFactory.js +292 -0
  205. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -0
  206. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +145 -0
  207. package/FlowGraph/Blocks/flowGraphBlockNames.js +147 -0
  208. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -0
  209. package/FlowGraph/Blocks/index.d.ts +2 -0
  210. package/FlowGraph/Blocks/index.js +2 -0
  211. package/FlowGraph/Blocks/index.js.map +1 -1
  212. package/FlowGraph/{flowGraphInteger.d.ts → CustomTypes/flowGraphInteger.d.ts} +2 -3
  213. package/FlowGraph/{flowGraphInteger.js → CustomTypes/flowGraphInteger.js} +4 -5
  214. package/FlowGraph/CustomTypes/flowGraphInteger.js.map +1 -0
  215. package/FlowGraph/CustomTypes/flowGraphMatrix.d.ts +196 -0
  216. package/FlowGraph/CustomTypes/flowGraphMatrix.js +272 -0
  217. package/FlowGraph/CustomTypes/flowGraphMatrix.js.map +1 -0
  218. package/FlowGraph/CustomTypes/index.d.ts +2 -0
  219. package/FlowGraph/CustomTypes/index.js +3 -0
  220. package/FlowGraph/CustomTypes/index.js.map +1 -0
  221. package/FlowGraph/flowGraph.d.ts +29 -34
  222. package/FlowGraph/flowGraph.js +120 -104
  223. package/FlowGraph/flowGraph.js.map +1 -1
  224. package/FlowGraph/flowGraphAssetsContext.d.ts +29 -0
  225. package/FlowGraph/flowGraphAssetsContext.js +52 -0
  226. package/FlowGraph/flowGraphAssetsContext.js.map +1 -0
  227. package/FlowGraph/flowGraphAsyncExecutionBlock.d.ts +15 -8
  228. package/FlowGraph/flowGraphAsyncExecutionBlock.js +25 -5
  229. package/FlowGraph/flowGraphAsyncExecutionBlock.js.map +1 -1
  230. package/FlowGraph/flowGraphBlock.d.ts +22 -15
  231. package/FlowGraph/flowGraphBlock.js +31 -52
  232. package/FlowGraph/flowGraphBlock.js.map +1 -1
  233. package/FlowGraph/flowGraphConnection.d.ts +13 -12
  234. package/FlowGraph/flowGraphConnection.js +31 -16
  235. package/FlowGraph/flowGraphConnection.js.map +1 -1
  236. package/FlowGraph/flowGraphContext.d.ts +89 -13
  237. package/FlowGraph/flowGraphContext.js +210 -23
  238. package/FlowGraph/flowGraphContext.js.map +1 -1
  239. package/FlowGraph/flowGraphCoordinator.d.ts +4 -10
  240. package/FlowGraph/flowGraphCoordinator.js +4 -16
  241. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  242. package/FlowGraph/flowGraphDataConnection.d.ts +52 -14
  243. package/FlowGraph/flowGraphDataConnection.js +73 -26
  244. package/FlowGraph/flowGraphDataConnection.js.map +1 -1
  245. package/FlowGraph/flowGraphEventBlock.d.ts +17 -1
  246. package/FlowGraph/flowGraphEventBlock.js +13 -2
  247. package/FlowGraph/flowGraphEventBlock.js.map +1 -1
  248. package/FlowGraph/flowGraphEventType.d.ts +16 -0
  249. package/FlowGraph/flowGraphEventType.js +18 -0
  250. package/FlowGraph/flowGraphEventType.js.map +1 -0
  251. package/FlowGraph/flowGraphExecutionBlock.d.ts +11 -1
  252. package/FlowGraph/flowGraphExecutionBlock.js +21 -2
  253. package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
  254. package/FlowGraph/flowGraphExecutionBlockWithOutSignal.d.ts +2 -2
  255. package/FlowGraph/flowGraphExecutionBlockWithOutSignal.js +0 -1
  256. package/FlowGraph/flowGraphExecutionBlockWithOutSignal.js.map +1 -1
  257. package/FlowGraph/flowGraphLogger.d.ts +60 -0
  258. package/FlowGraph/flowGraphLogger.js +53 -0
  259. package/FlowGraph/flowGraphLogger.js.map +1 -0
  260. package/FlowGraph/flowGraphParser.d.ts +85 -0
  261. package/FlowGraph/flowGraphParser.js +271 -0
  262. package/FlowGraph/flowGraphParser.js.map +1 -0
  263. package/FlowGraph/flowGraphPathConverter.d.ts +1 -1
  264. package/FlowGraph/flowGraphPathConverter.js +3 -2
  265. package/FlowGraph/flowGraphPathConverter.js.map +1 -1
  266. package/FlowGraph/flowGraphPathConverterComponent.d.ts +8 -1
  267. package/FlowGraph/flowGraphPathConverterComponent.js +18 -2
  268. package/FlowGraph/flowGraphPathConverterComponent.js.map +1 -1
  269. package/FlowGraph/flowGraphRichTypes.d.ts +51 -9
  270. package/FlowGraph/flowGraphRichTypes.js +160 -50
  271. package/FlowGraph/flowGraphRichTypes.js.map +1 -1
  272. package/FlowGraph/flowGraphSceneEventCoordinator.d.ts +45 -0
  273. package/FlowGraph/flowGraphSceneEventCoordinator.js +77 -0
  274. package/FlowGraph/flowGraphSceneEventCoordinator.js.map +1 -0
  275. package/FlowGraph/flowGraphSignalConnection.d.ts +8 -5
  276. package/FlowGraph/flowGraphSignalConnection.js +26 -9
  277. package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
  278. package/FlowGraph/index.d.ts +6 -1
  279. package/FlowGraph/index.js +7 -1
  280. package/FlowGraph/index.js.map +1 -1
  281. package/FlowGraph/serialization.d.ts +5 -2
  282. package/FlowGraph/serialization.js +94 -22
  283. package/FlowGraph/serialization.js.map +1 -1
  284. package/FlowGraph/typeDefinitions.d.ts +74 -12
  285. package/FlowGraph/typeDefinitions.js.map +1 -1
  286. package/FlowGraph/utils.d.ts +47 -0
  287. package/FlowGraph/utils.js +55 -0
  288. package/FlowGraph/utils.js.map +1 -1
  289. package/Layers/effectLayer.d.ts +5 -0
  290. package/Layers/effectLayer.js +7 -0
  291. package/Layers/effectLayer.js.map +1 -1
  292. package/Loading/sceneLoader.d.ts +25 -11
  293. package/Loading/sceneLoader.js +28 -11
  294. package/Loading/sceneLoader.js.map +1 -1
  295. package/Materials/material.js +1 -0
  296. package/Materials/material.js.map +1 -1
  297. package/Maths/math.path.js +3 -0
  298. package/Maths/math.path.js.map +1 -1
  299. package/Meshes/csg2.d.ts +2 -2
  300. package/Meshes/csg2.js +2 -2
  301. package/Meshes/csg2.js.map +1 -1
  302. package/Meshes/geometry.d.ts +2 -1
  303. package/Meshes/geometry.js +8 -2
  304. package/Meshes/geometry.js.map +1 -1
  305. package/Meshes/instancedMesh.d.ts +5 -0
  306. package/Meshes/instancedMesh.js +6 -0
  307. package/Meshes/instancedMesh.js.map +1 -1
  308. package/Meshes/mesh.d.ts +2 -1
  309. package/Meshes/mesh.js +3 -2
  310. package/Meshes/mesh.js.map +1 -1
  311. package/Misc/environmentTextureTools.js +2 -2
  312. package/Misc/environmentTextureTools.js.map +1 -1
  313. package/ObjectModel/objectModelInterfaces.d.ts +2 -2
  314. package/ObjectModel/objectModelInterfaces.js.map +1 -1
  315. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +26 -18
  316. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
  317. package/package.json +1 -1
  318. package/scene.js +8 -0
  319. package/scene.js.map +1 -1
  320. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.d.ts +0 -24
  321. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js +0 -39
  322. package/FlowGraph/Blocks/Data/Logic/flowGraphLogicBlocks.js.map +0 -1
  323. package/FlowGraph/Blocks/Data/Logic/index.d.ts +0 -1
  324. package/FlowGraph/Blocks/Data/Logic/index.js +0 -2
  325. package/FlowGraph/Blocks/Data/Logic/index.js.map +0 -1
  326. package/FlowGraph/Blocks/Data/flowGraphCoordinateTransformBlock.js.map +0 -1
  327. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.d.ts +0 -19
  328. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js +0 -26
  329. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlayAudioBlock.js.map +0 -1
  330. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js +0 -25
  331. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopAudioBlock.js.map +0 -1
  332. package/FlowGraph/Blocks/Execution/Audio/index.d.ts +0 -2
  333. package/FlowGraph/Blocks/Execution/Audio/index.js +0 -3
  334. package/FlowGraph/Blocks/Execution/Audio/index.js.map +0 -1
  335. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.d.ts +0 -31
  336. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js +0 -69
  337. package/FlowGraph/Blocks/Execution/ControlFlow/flowGraphTimerBlock.js.map +0 -1
  338. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js +0 -38
  339. package/FlowGraph/Blocks/Execution/flowGraphSendCustomEventBlock.js.map +0 -1
  340. package/FlowGraph/flowGraphContextLogger.d.ts +0 -9
  341. package/FlowGraph/flowGraphContextLogger.js +0 -14
  342. package/FlowGraph/flowGraphContextLogger.js.map +0 -1
  343. package/FlowGraph/flowGraphInteger.js.map +0 -1
@@ -8,4 +8,59 @@
8
8
  export function _isADescendantOf(mesh1, mesh2) {
9
9
  return !!(mesh1.parent && (mesh1.parent === mesh2 || _isADescendantOf(mesh1.parent, mesh2)));
10
10
  }
11
+ /**
12
+ * @internal
13
+ */
14
+ export function _getClassNameOf(v) {
15
+ if (v.getClassName) {
16
+ return v.getClassName();
17
+ }
18
+ return;
19
+ }
20
+ /**
21
+ * @internal
22
+ * Check if two classname are the same and are vector classes.
23
+ * @param className the first class name
24
+ * @param className2 the second class name
25
+ * @returns whether the two class names are the same and are vector classes.
26
+ */
27
+ export function _areSameVectorClass(className, className2) {
28
+ return className === className2 && (className === "Vector2" /* FlowGraphTypes.Vector2 */ || className === "Vector3" /* FlowGraphTypes.Vector3 */ || className === "Vector4" /* FlowGraphTypes.Vector4 */);
29
+ }
30
+ /**
31
+ * @internal
32
+ * Check if two classname are the same and are matrix classes.
33
+ * @param className the first class name
34
+ * @param className2 the second class name
35
+ * @returns whether the two class names are the same and are matrix classes.
36
+ */
37
+ export function _areSameMatrixClass(className, className2) {
38
+ return className === className2 && (className === "Matrix" /* FlowGraphTypes.Matrix */ || className === "Matrix2D" /* FlowGraphTypes.Matrix2D */ || className === "Matrix3D" /* FlowGraphTypes.Matrix3D */);
39
+ }
40
+ /**
41
+ * @internal
42
+ * Check if two classname are the same and are integer classes.
43
+ * @param className the first class name
44
+ * @param className2 the second class name
45
+ * @returns whether the two class names are the same and are integer classes.
46
+ */
47
+ export function _areSameIntegerClass(className, className2) {
48
+ return className === "FlowGraphInteger" && className2 === "FlowGraphInteger";
49
+ }
50
+ /**
51
+ * Check if an object has a numeric value.
52
+ * @param a the object to check if it is a number.
53
+ * @returns whether a is a FlowGraphNumber (Integer or number).
54
+ */
55
+ export function isNumeric(a) {
56
+ return typeof a === "number" || typeof a?.value === "number";
57
+ }
58
+ /**
59
+ * Get the numeric value of a FlowGraphNumber.
60
+ * @param a the object to get the numeric value from.
61
+ * @returns the numeric value.
62
+ */
63
+ export function getNumericValue(a) {
64
+ return typeof a === "number" ? a : a.value;
65
+ }
11
66
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/utils.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAW,EAAE,KAAW;IACrD,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,KAAK,IAAI,gBAAgB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACjG,CAAC","sourcesContent":["import type { Node } from \"../node\";\r\n\r\n/**\r\n * @internal\r\n * Returns if mesh1 is a descendant of mesh2\r\n * @param mesh1\r\n * @param mesh2\r\n * @returns\r\n */\r\nexport function _isADescendantOf(mesh1: Node, mesh2: Node): boolean {\r\n return !!(mesh1.parent && (mesh1.parent === mesh2 || _isADescendantOf(mesh1.parent, mesh2)));\r\n}\r\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../dev/core/src/FlowGraph/utils.ts"],"names":[],"mappings":"AAMA;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAW,EAAE,KAAW;IACrD,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,KAAK,IAAI,gBAAgB,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC;AACjG,CAAC;AAOD;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,CAAM;IAClC,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC;QACjB,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO;AACX,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,UAAkB;IACrE,OAAO,SAAS,KAAK,UAAU,IAAI,CAAC,SAAS,2CAA2B,IAAI,SAAS,2CAA2B,IAAI,SAAS,2CAA2B,CAAC,CAAC;AAC9J,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,UAAkB;IACrE,OAAO,SAAS,KAAK,UAAU,IAAI,CAAC,SAAS,yCAA0B,IAAI,SAAS,6CAA4B,IAAI,SAAS,6CAA4B,CAAC,CAAC;AAC/J,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAAiB,EAAE,UAAkB;IACtE,OAAO,SAAS,KAAK,kBAAkB,IAAI,UAAU,KAAK,kBAAkB,CAAC;AACjF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,CAA6B;IACnD,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAQ,CAAsB,EAAE,KAAK,KAAK,QAAQ,CAAC;AACvF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,CAAkB;IAC9C,OAAO,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/C,CAAC","sourcesContent":["import type { Matrix, Quaternion, Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\nimport type { Node } from \"../node\";\r\nimport type { FlowGraphInteger } from \"./CustomTypes/flowGraphInteger\";\r\nimport type { FlowGraphMatrix2D, FlowGraphMatrix3D } from \"./CustomTypes/flowGraphMatrix\";\r\nimport { FlowGraphTypes } from \"./flowGraphRichTypes\";\r\n\r\n/**\r\n * @internal\r\n * Returns if mesh1 is a descendant of mesh2\r\n * @param mesh1\r\n * @param mesh2\r\n * @returns\r\n */\r\nexport function _isADescendantOf(mesh1: Node, mesh2: Node): boolean {\r\n return !!(mesh1.parent && (mesh1.parent === mesh2 || _isADescendantOf(mesh1.parent, mesh2)));\r\n}\r\n\r\nexport type FlowGraphNumber = number | FlowGraphInteger;\r\nexport type FlowGraphVector = Vector2 | Vector3 | Vector4 | Quaternion;\r\nexport type FlowGraphMatrix = Matrix | FlowGraphMatrix2D | FlowGraphMatrix3D;\r\nexport type FlowGraphMathOperationType = FlowGraphNumber | FlowGraphVector | FlowGraphMatrix | boolean;\r\n\r\n/**\r\n * @internal\r\n */\r\nexport function _getClassNameOf(v: any) {\r\n if (v.getClassName) {\r\n return v.getClassName();\r\n }\r\n return;\r\n}\r\n\r\n/**\r\n * @internal\r\n * Check if two classname are the same and are vector classes.\r\n * @param className the first class name\r\n * @param className2 the second class name\r\n * @returns whether the two class names are the same and are vector classes.\r\n */\r\nexport function _areSameVectorClass(className: string, className2: string) {\r\n return className === className2 && (className === FlowGraphTypes.Vector2 || className === FlowGraphTypes.Vector3 || className === FlowGraphTypes.Vector4);\r\n}\r\n\r\n/**\r\n * @internal\r\n * Check if two classname are the same and are matrix classes.\r\n * @param className the first class name\r\n * @param className2 the second class name\r\n * @returns whether the two class names are the same and are matrix classes.\r\n */\r\nexport function _areSameMatrixClass(className: string, className2: string) {\r\n return className === className2 && (className === FlowGraphTypes.Matrix || className === FlowGraphTypes.Matrix2D || className === FlowGraphTypes.Matrix3D);\r\n}\r\n\r\n/**\r\n * @internal\r\n * Check if two classname are the same and are integer classes.\r\n * @param className the first class name\r\n * @param className2 the second class name\r\n * @returns whether the two class names are the same and are integer classes.\r\n */\r\nexport function _areSameIntegerClass(className: string, className2: string) {\r\n return className === \"FlowGraphInteger\" && className2 === \"FlowGraphInteger\";\r\n}\r\n\r\n/**\r\n * Check if an object has a numeric value.\r\n * @param a the object to check if it is a number.\r\n * @returns whether a is a FlowGraphNumber (Integer or number).\r\n */\r\nexport function isNumeric(a: FlowGraphMathOperationType): a is FlowGraphNumber {\r\n return typeof a === \"number\" || typeof (a as FlowGraphInteger)?.value === \"number\";\r\n}\r\n\r\n/**\r\n * Get the numeric value of a FlowGraphNumber.\r\n * @param a the object to get the numeric value from.\r\n * @returns the numeric value.\r\n */\r\nexport function getNumericValue(a: FlowGraphNumber): number {\r\n return typeof a === \"number\" ? a : a.value;\r\n}\r\n"]}
@@ -273,6 +273,11 @@ export declare abstract class EffectLayer {
273
273
  protected _isReady(subMesh: SubMesh, useInstances: boolean, emissiveTexture: Nullable<BaseTexture>): boolean;
274
274
  protected _importShadersAsync(): Promise<void>;
275
275
  protected _arePostProcessAndMergeReady(): boolean;
276
+ /**
277
+ * Checks if the layer is ready to be used.
278
+ * @returns true if the layer is ready to be used
279
+ */
280
+ isLayerReady(): boolean;
276
281
  /**
277
282
  * Renders the glowing part of the scene by blending the blurred glowing meshes on top of the rendered scene.
278
283
  */
@@ -325,6 +325,13 @@ export class EffectLayer {
325
325
  _arePostProcessAndMergeReady() {
326
326
  return this._internalThinEffectLayer ? this._thinEffectLayer._internalIsLayerReady() : this._thinEffectLayer.isLayerReady();
327
327
  }
328
+ /**
329
+ * Checks if the layer is ready to be used.
330
+ * @returns true if the layer is ready to be used
331
+ */
332
+ isLayerReady() {
333
+ return this._arePostProcessAndMergeReady() && this._mainTexture.isReady();
334
+ }
328
335
  /**
329
336
  * Renders the glowing part of the scene by blending the blurred glowing meshes on top of the rendered scene.
330
337
  */
@@ -1 +1 @@
1
- {"version":3,"file":"effectLayer.js","sourceRoot":"","sources":["../../../../dev/core/src/Layers/effectLayer.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOhD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAMrD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EA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AAC;IAED;;;OAGG;IACI,YAAY;QACf,OAAO,aAAa,CAAC;IACzB,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,KAAK,CAAC,iBAAsB,EAAE,KAAY,EAAE,OAAe;QACrE,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAExE,OAAO,eAAe,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;;AA/aD;;GAEG;AACW,yCAA6B,GAA2B,CAAC,CAAC,EAAE,EAAE;IACxE,MAAM,WAAW,CAAC,2BAA2B,CAAC,CAAC;AACnD,CAAC,AAF0C,CAEzC;AAzHF;IADC,SAAS,EAAE;uCAGX;AAUD;IADC,iBAAiB,EAAE;+CAGnB;AAUD;IADC,SAAS,EAAE;4CAGX;AAUD;IADC,0BAA0B,EAAE;yCAG5B;AAMD;IADC,SAAS,EAAE;mDAGX;AASD;IADC,SAAS,EAAE;sEAGX","sourcesContent":["import { serialize, serializeAsColor4, serializeAsCameraReference } from \"../Misc/decorators\";\r\nimport { Tools } from \"../Misc/tools\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { ISize } from \"../Maths/math.size\";\r\nimport type { Color4 } from \"../Maths/math.color\";\r\nimport type { AbstractEngine } from \"../Engines/abstractEngine\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\nimport type { SubMesh } from \"../Meshes/subMesh\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { Mesh } from \"../Meshes/mesh\";\r\nimport type { PostProcess } from \"../PostProcesses/postProcess\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport { Texture } from \"../Materials/Textures/texture\";\r\nimport { RenderTargetTexture } from \"../Materials/Textures/renderTargetTexture\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport type { Material } from \"../Materials/material\";\r\nimport { Constants } from \"../Engines/constants\";\r\n\r\nimport { _WarnImport } from \"../Misc/devTools\";\r\nimport { GetExponentOfTwo } from \"../Misc/tools.functions\";\r\nimport type { ShaderLanguage } from \"core/Materials/shaderLanguage\";\r\nimport { ThinEffectLayer } from \"./thinEffectLayer\";\r\n\r\n/**\r\n * Effect layer options. This helps customizing the behaviour\r\n * of the effect layer.\r\n */\r\nexport interface IEffectLayerOptions {\r\n /**\r\n * Multiplication factor apply to the canvas size to compute the render target size\r\n * used to generated the objects (the smaller the faster). Default: 0.5\r\n */\r\n mainTextureRatio: number;\r\n\r\n /**\r\n * Enforces a fixed size texture to ensure effect stability across devices. Default: undefined\r\n */\r\n mainTextureFixedSize?: number;\r\n\r\n /**\r\n * Alpha blending mode used to apply the blur. Default depends of the implementation. Default: ALPHA_COMBINE\r\n */\r\n alphaBlendingMode: number;\r\n\r\n /**\r\n * The camera attached to the layer. Default: null\r\n */\r\n camera: Nullable<Camera>;\r\n\r\n /**\r\n * The rendering group to draw the layer in. Default: -1\r\n */\r\n renderingGroupId: number;\r\n\r\n /**\r\n * The type of the main texture. Default: TEXTURETYPE_UNSIGNED_BYTE\r\n */\r\n mainTextureType: number;\r\n\r\n /**\r\n * Whether or not to generate a stencil buffer. Default: false\r\n */\r\n generateStencilBuffer: boolean;\r\n}\r\n\r\n/**\r\n * The effect layer Helps adding post process effect blended with the main pass.\r\n *\r\n * This can be for instance use to generate glow or highlight effects on the scene.\r\n *\r\n * The effect layer class can not be used directly and is intented to inherited from to be\r\n * customized per effects.\r\n */\r\nexport abstract class EffectLayer {\r\n private _effectLayerOptions: IEffectLayerOptions;\r\n\r\n protected _scene: Scene;\r\n protected _engine: AbstractEngine;\r\n protected _maxSize: number = 0;\r\n protected _mainTextureDesiredSize: ISize = { width: 0, height: 0 };\r\n protected _mainTexture: RenderTargetTexture;\r\n protected get _shouldRender() {\r\n return this._thinEffectLayer._shouldRender;\r\n }\r\n protected set _shouldRender(value) {\r\n this._thinEffectLayer._shouldRender = value;\r\n }\r\n protected _postProcesses: PostProcess[] = [];\r\n protected _textures: BaseTexture[] = [];\r\n protected get _emissiveTextureAndColor(): { texture: Nullable<BaseTexture>; color: Color4 } {\r\n return this._thinEffectLayer._emissiveTextureAndColor;\r\n }\r\n protected set _emissiveTextureAndColor(value) {\r\n this._thinEffectLayer._emissiveTextureAndColor = value;\r\n }\r\n protected get _effectIntensity(): { [meshUniqueId: number]: number } {\r\n return this._thinEffectLayer._effectIntensity;\r\n }\r\n protected set _effectIntensity(value) {\r\n this._thinEffectLayer._effectIntensity = value;\r\n }\r\n protected readonly _thinEffectLayer: ThinEffectLayer;\r\n private readonly _internalThinEffectLayer: boolean;\r\n\r\n /**\r\n * Force all the effect layers to compile to glsl even on WebGPU engines.\r\n * False by default. This is mostly meant for backward compatibility.\r\n */\r\n public static get ForceGLSL() {\r\n return ThinEffectLayer.ForceGLSL;\r\n }\r\n\r\n public static set ForceGLSL(value: boolean) {\r\n ThinEffectLayer.ForceGLSL = value;\r\n }\r\n\r\n /**\r\n * The name of the layer\r\n */\r\n @serialize()\r\n public get name() {\r\n return this._thinEffectLayer.name;\r\n }\r\n\r\n public set name(value: string) {\r\n this._thinEffectLayer.name = value;\r\n }\r\n\r\n /**\r\n * The clear color of the texture used to generate the glow map.\r\n */\r\n @serializeAsColor4()\r\n public get neutralColor(): Color4 {\r\n return this._thinEffectLayer.neutralColor;\r\n }\r\n\r\n public set neutralColor(value: Color4) {\r\n this._thinEffectLayer.neutralColor = value;\r\n }\r\n\r\n /**\r\n * Specifies whether the highlight layer is enabled or not.\r\n */\r\n @serialize()\r\n public get isEnabled(): boolean {\r\n return this._thinEffectLayer.isEnabled;\r\n }\r\n\r\n public set isEnabled(value: boolean) {\r\n this._thinEffectLayer.isEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets the camera attached to the layer.\r\n */\r\n @serializeAsCameraReference()\r\n public get camera(): Nullable<Camera> {\r\n return this._thinEffectLayer.camera;\r\n }\r\n\r\n /**\r\n * Gets the rendering group id the layer should render in.\r\n */\r\n @serialize()\r\n public get renderingGroupId(): number {\r\n return this._thinEffectLayer.renderingGroupId;\r\n }\r\n public set renderingGroupId(renderingGroupId: number) {\r\n this._thinEffectLayer.renderingGroupId = renderingGroupId;\r\n }\r\n\r\n /**\r\n * Specifies if the bounding boxes should be rendered normally or if they should undergo the effect of the layer\r\n */\r\n @serialize()\r\n public get disableBoundingBoxesFromEffectLayer() {\r\n return this._thinEffectLayer.disableBoundingBoxesFromEffectLayer;\r\n }\r\n\r\n public set disableBoundingBoxesFromEffectLayer(value: boolean) {\r\n this._thinEffectLayer.disableBoundingBoxesFromEffectLayer = value;\r\n }\r\n\r\n /**\r\n * An event triggered when the effect layer has been disposed.\r\n */\r\n public onDisposeObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the effect layer is about rendering the main texture with the glowy parts.\r\n */\r\n public onBeforeRenderMainTextureObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the generated texture is being merged in the scene.\r\n */\r\n public onBeforeComposeObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the mesh is rendered into the effect render target.\r\n */\r\n public onBeforeRenderMeshToEffect = new Observable<AbstractMesh>();\r\n\r\n /**\r\n * An event triggered after the mesh has been rendered into the effect render target.\r\n */\r\n public onAfterRenderMeshToEffect = new Observable<AbstractMesh>();\r\n\r\n /**\r\n * An event triggered when the generated texture has been merged in the scene.\r\n */\r\n public onAfterComposeObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the effect layer changes its size.\r\n */\r\n public onSizeChangedObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * Gets the main texture where the effect is rendered\r\n */\r\n public get mainTexture() {\r\n return this._mainTexture;\r\n }\r\n\r\n protected get _shaderLanguage(): ShaderLanguage {\r\n return this._thinEffectLayer.shaderLanguage;\r\n }\r\n\r\n /**\r\n * Gets the shader language used in this material.\r\n */\r\n public get shaderLanguage(): ShaderLanguage {\r\n return this._thinEffectLayer.shaderLanguage;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _SceneComponentInitialization: (scene: Scene) => void = (_) => {\r\n throw _WarnImport(\"EffectLayerSceneComponent\");\r\n };\r\n /**\r\n * Sets a specific material to be used to render a mesh/a list of meshes in the layer\r\n * @param mesh mesh or array of meshes\r\n * @param material material to use by the layer when rendering the mesh(es). If undefined is passed, the specific material created by the layer will be used.\r\n */\r\n public setMaterialForRendering(mesh: AbstractMesh | AbstractMesh[], material?: Material): void {\r\n this._thinEffectLayer.setMaterialForRendering(mesh, material);\r\n }\r\n\r\n /**\r\n * Gets the intensity of the effect for a specific mesh.\r\n * @param mesh The mesh to get the effect intensity for\r\n * @returns The intensity of the effect for the mesh\r\n */\r\n public getEffectIntensity(mesh: AbstractMesh) {\r\n return this._thinEffectLayer.getEffectIntensity(mesh);\r\n }\r\n\r\n /**\r\n * Sets the intensity of the effect for a specific mesh.\r\n * @param mesh The mesh to set the effect intensity for\r\n * @param intensity The intensity of the effect for the mesh\r\n */\r\n public setEffectIntensity(mesh: AbstractMesh, intensity: number): void {\r\n this._thinEffectLayer.setEffectIntensity(mesh, intensity);\r\n }\r\n\r\n /**\r\n * Instantiates a new effect Layer and references it in the scene.\r\n * @param name The name of the layer\r\n * @param scene The scene to use the layer in\r\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\r\n * @param thinEffectLayer The thin instance of the effect layer (optional)\r\n */\r\n constructor(\r\n /** The Friendly of the effect in the scene */\r\n name: string,\r\n scene?: Scene,\r\n forceGLSL = false,\r\n thinEffectLayer?: ThinEffectLayer\r\n ) {\r\n this._internalThinEffectLayer = !thinEffectLayer;\r\n if (!thinEffectLayer) {\r\n thinEffectLayer = new ThinEffectLayer(name, scene, forceGLSL, false, this._importShadersAsync.bind(this));\r\n thinEffectLayer.getEffectName = this.getEffectName.bind(this);\r\n thinEffectLayer.isReady = this.isReady.bind(this);\r\n thinEffectLayer._createMergeEffect = this._createMergeEffect.bind(this);\r\n thinEffectLayer._createTextureAndPostProcesses = this._createTextureAndPostProcesses.bind(this);\r\n thinEffectLayer._internalCompose = this._internalRender.bind(this);\r\n thinEffectLayer._setEmissiveTextureAndColor = this._setEmissiveTextureAndColor.bind(this);\r\n thinEffectLayer._numInternalDraws = this._numInternalDraws.bind(this);\r\n thinEffectLayer._addCustomEffectDefines = this._addCustomEffectDefines.bind(this);\r\n thinEffectLayer.hasMesh = this.hasMesh.bind(this);\r\n thinEffectLayer.shouldRender = this.shouldRender.bind(this);\r\n thinEffectLayer._shouldRenderMesh = this._shouldRenderMesh.bind(this);\r\n thinEffectLayer._canRenderMesh = this._canRenderMesh.bind(this);\r\n thinEffectLayer._useMeshMaterial = this._useMeshMaterial.bind(this);\r\n }\r\n\r\n this._thinEffectLayer = thinEffectLayer;\r\n this.name = name;\r\n\r\n this._scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n EffectLayer._SceneComponentInitialization(this._scene);\r\n\r\n this._engine = this._scene.getEngine();\r\n this._maxSize = this._engine.getCaps().maxTextureSize;\r\n this._scene.effectLayers.push(this);\r\n\r\n this._thinEffectLayer.onDisposeObservable.add(() => {\r\n this.onDisposeObservable.notifyObservers(this);\r\n });\r\n\r\n this._thinEffectLayer.onBeforeRenderLayerObservable.add(() => {\r\n this.onBeforeRenderMainTextureObservable.notifyObservers(this);\r\n });\r\n\r\n this._thinEffectLayer.onBeforeComposeObservable.add(() => {\r\n this.onBeforeComposeObservable.notifyObservers(this);\r\n });\r\n\r\n this._thinEffectLayer.onBeforeRenderMeshToEffect.add((mesh) => {\r\n this.onBeforeRenderMeshToEffect.notifyObservers(mesh);\r\n });\r\n\r\n this._thinEffectLayer.onAfterRenderMeshToEffect.add((mesh) => {\r\n this.onAfterRenderMeshToEffect.notifyObservers(mesh);\r\n });\r\n\r\n this._thinEffectLayer.onAfterComposeObservable.add(() => {\r\n this.onAfterComposeObservable.notifyObservers(this);\r\n });\r\n }\r\n\r\n protected get _shadersLoaded() {\r\n return this._thinEffectLayer._shadersLoaded;\r\n }\r\n\r\n protected set _shadersLoaded(value: boolean) {\r\n this._thinEffectLayer._shadersLoaded = value;\r\n }\r\n\r\n /**\r\n * Get the effect name of the layer.\r\n * @returns The effect name\r\n */\r\n public abstract getEffectName(): string;\r\n\r\n /**\r\n * Checks for the readiness of the element composing the layer.\r\n * @param subMesh the mesh to check for\r\n * @param useInstances specify whether or not to use instances to render the mesh\r\n * @returns true if ready otherwise, false\r\n */\r\n public abstract isReady(subMesh: SubMesh, useInstances: boolean): boolean;\r\n\r\n /**\r\n * Returns whether or not the layer needs stencil enabled during the mesh rendering.\r\n * @returns true if the effect requires stencil during the main canvas render pass.\r\n */\r\n public abstract needStencil(): boolean;\r\n\r\n /**\r\n * Create the merge effect. This is the shader use to blit the information back\r\n * to the main canvas at the end of the scene rendering.\r\n * @returns The effect containing the shader used to merge the effect on the main canvas\r\n */\r\n protected abstract _createMergeEffect(): Effect;\r\n\r\n /**\r\n * Creates the render target textures and post processes used in the effect layer.\r\n */\r\n protected abstract _createTextureAndPostProcesses(): void;\r\n\r\n /**\r\n * Implementation specific of rendering the generating effect on the main canvas.\r\n * @param effect The effect used to render through\r\n * @param renderNum Index of the _internalRender call (0 for the first time _internalRender is called, 1 for the second time, etc. _internalRender is called the number of times returned by _numInternalDraws())\r\n */\r\n protected abstract _internalRender(effect: Effect, renderIndex: number): void;\r\n\r\n /**\r\n * Sets the required values for both the emissive texture and and the main color.\r\n */\r\n protected abstract _setEmissiveTextureAndColor(mesh: Mesh, subMesh: SubMesh, material: Material): void;\r\n\r\n /**\r\n * Free any resources and references associated to a mesh.\r\n * Internal use\r\n * @param mesh The mesh to free.\r\n */\r\n public abstract _disposeMesh(mesh: Mesh): void;\r\n\r\n /**\r\n * Serializes this layer (Glow or Highlight for example)\r\n * @returns a serialized layer object\r\n */\r\n public abstract serialize?(): any;\r\n\r\n /**\r\n * Number of times _internalRender will be called. Some effect layers need to render the mesh several times, so they should override this method with the number of times the mesh should be rendered\r\n * @returns Number of times a mesh must be rendered in the layer\r\n */\r\n protected _numInternalDraws(): number {\r\n return this._internalThinEffectLayer ? 1 : this._thinEffectLayer._numInternalDraws();\r\n }\r\n\r\n /**\r\n * Initializes the effect layer with the required options.\r\n * @param options Sets of none mandatory options to use with the layer (see IEffectLayerOptions for more information)\r\n */\r\n protected _init(options: Partial<IEffectLayerOptions>): void {\r\n // Adapt options\r\n this._effectLayerOptions = {\r\n mainTextureRatio: 0.5,\r\n alphaBlendingMode: Constants.ALPHA_COMBINE,\r\n camera: null,\r\n renderingGroupId: -1,\r\n mainTextureType: Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n generateStencilBuffer: false,\r\n ...options,\r\n };\r\n\r\n this._setMainTextureSize();\r\n this._thinEffectLayer._init(options);\r\n this._createMainTexture();\r\n this._createTextureAndPostProcesses();\r\n }\r\n\r\n /**\r\n * Sets the main texture desired size which is the closest power of two\r\n * of the engine canvas size.\r\n */\r\n private _setMainTextureSize(): void {\r\n if (this._effectLayerOptions.mainTextureFixedSize) {\r\n this._mainTextureDesiredSize.width = this._effectLayerOptions.mainTextureFixedSize;\r\n this._mainTextureDesiredSize.height = this._effectLayerOptions.mainTextureFixedSize;\r\n } else {\r\n this._mainTextureDesiredSize.width = this._engine.getRenderWidth() * this._effectLayerOptions.mainTextureRatio;\r\n this._mainTextureDesiredSize.height = this._engine.getRenderHeight() * this._effectLayerOptions.mainTextureRatio;\r\n\r\n this._mainTextureDesiredSize.width = this._engine.needPOTTextures\r\n ? GetExponentOfTwo(this._mainTextureDesiredSize.width, this._maxSize)\r\n : this._mainTextureDesiredSize.width;\r\n this._mainTextureDesiredSize.height = this._engine.needPOTTextures\r\n ? GetExponentOfTwo(this._mainTextureDesiredSize.height, this._maxSize)\r\n : this._mainTextureDesiredSize.height;\r\n }\r\n\r\n this._mainTextureDesiredSize.width = Math.floor(this._mainTextureDesiredSize.width);\r\n this._mainTextureDesiredSize.height = Math.floor(this._mainTextureDesiredSize.height);\r\n }\r\n\r\n /**\r\n * Creates the main texture for the effect layer.\r\n */\r\n protected _createMainTexture(): void {\r\n this._mainTexture = new RenderTargetTexture(\r\n \"EffectLayerMainRTT\",\r\n {\r\n width: this._mainTextureDesiredSize.width,\r\n height: this._mainTextureDesiredSize.height,\r\n },\r\n this._scene,\r\n {\r\n type: this._effectLayerOptions.mainTextureType,\r\n samplingMode: Texture.TRILINEAR_SAMPLINGMODE,\r\n generateStencilBuffer: this._effectLayerOptions.generateStencilBuffer,\r\n existingObjectRenderer: this._thinEffectLayer.objectRenderer,\r\n }\r\n );\r\n this._mainTexture.activeCamera = this._effectLayerOptions.camera;\r\n this._mainTexture.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n this._mainTexture.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n this._mainTexture.anisotropicFilteringLevel = 1;\r\n this._mainTexture.updateSamplingMode(Texture.BILINEAR_SAMPLINGMODE);\r\n this._mainTexture.renderParticles = false;\r\n this._mainTexture.renderList = null;\r\n this._mainTexture.ignoreCameraViewport = true;\r\n\r\n this._mainTexture.onClearObservable.add((engine: AbstractEngine) => {\r\n engine.clear(this.neutralColor, true, true, true);\r\n });\r\n }\r\n\r\n /**\r\n * Adds specific effects defines.\r\n * @param defines The defines to add specifics to.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected _addCustomEffectDefines(defines: string[]): void {\r\n // Nothing to add by default.\r\n }\r\n\r\n /**\r\n * Checks for the readiness of the element composing the layer.\r\n * @param subMesh the mesh to check for\r\n * @param useInstances specify whether or not to use instances to render the mesh\r\n * @param emissiveTexture the associated emissive texture used to generate the glow\r\n * @returns true if ready otherwise, false\r\n */\r\n protected _isReady(subMesh: SubMesh, useInstances: boolean, emissiveTexture: Nullable<BaseTexture>): boolean {\r\n return this._internalThinEffectLayer\r\n ? this._thinEffectLayer._internalIsSubMeshReady(subMesh, useInstances, emissiveTexture)\r\n : this._thinEffectLayer._isSubMeshReady(subMesh, useInstances, emissiveTexture);\r\n }\r\n\r\n protected async _importShadersAsync(): Promise<void> {}\r\n\r\n protected _arePostProcessAndMergeReady(): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalIsLayerReady() : this._thinEffectLayer.isLayerReady();\r\n }\r\n\r\n /**\r\n * Renders the glowing part of the scene by blending the blurred glowing meshes on top of the rendered scene.\r\n */\r\n public render(): void {\r\n if (!this._thinEffectLayer.compose()) {\r\n return;\r\n }\r\n\r\n // Handle size changes.\r\n const size = this._mainTexture.getSize();\r\n this._setMainTextureSize();\r\n if (\r\n (size.width !== this._mainTextureDesiredSize.width || size.height !== this._mainTextureDesiredSize.height) &&\r\n this._mainTextureDesiredSize.width !== 0 &&\r\n this._mainTextureDesiredSize.height !== 0\r\n ) {\r\n // Recreate RTT and post processes on size change.\r\n this.onSizeChangedObservable.notifyObservers(this);\r\n this._disposeTextureAndPostProcesses();\r\n this._createMainTexture();\r\n this._createTextureAndPostProcesses();\r\n }\r\n }\r\n\r\n /**\r\n * Determine if a given mesh will be used in the current effect.\r\n * @param mesh mesh to test\r\n * @returns true if the mesh will be used\r\n */\r\n public hasMesh(mesh: AbstractMesh): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalHasMesh(mesh) : this._thinEffectLayer.hasMesh(mesh);\r\n }\r\n\r\n /**\r\n * Returns true if the layer contains information to display, otherwise false.\r\n * @returns true if the glow layer should be rendered\r\n */\r\n public shouldRender(): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalShouldRender() : this._thinEffectLayer.shouldRender();\r\n }\r\n\r\n /**\r\n * Returns true if the mesh should render, otherwise false.\r\n * @param mesh The mesh to render\r\n * @returns true if it should render otherwise false\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected _shouldRenderMesh(mesh: AbstractMesh): boolean {\r\n return this._internalThinEffectLayer ? true : this._thinEffectLayer._shouldRenderMesh(mesh);\r\n }\r\n\r\n /**\r\n * Returns true if the mesh can be rendered, otherwise false.\r\n * @param mesh The mesh to render\r\n * @param material The material used on the mesh\r\n * @returns true if it can be rendered otherwise false\r\n */\r\n protected _canRenderMesh(mesh: AbstractMesh, material: Material): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalCanRenderMesh(mesh, material) : this._thinEffectLayer._canRenderMesh(mesh, material);\r\n }\r\n\r\n /**\r\n * Returns true if the mesh should render, otherwise false.\r\n * @returns true if it should render otherwise false\r\n */\r\n protected _shouldRenderEmissiveTextureForMesh(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Defines whether the current material of the mesh should be use to render the effect.\r\n * @param mesh defines the current mesh to render\r\n * @returns true if the mesh material should be use\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected _useMeshMaterial(mesh: AbstractMesh): boolean {\r\n return this._internalThinEffectLayer ? false : this._thinEffectLayer._useMeshMaterial(mesh);\r\n }\r\n\r\n /**\r\n * Rebuild the required buffers.\r\n * @internal Internal use only.\r\n */\r\n public _rebuild(): void {\r\n this._thinEffectLayer._rebuild();\r\n }\r\n\r\n /**\r\n * Dispose only the render target textures and post process.\r\n */\r\n private _disposeTextureAndPostProcesses(): void {\r\n this._mainTexture.dispose();\r\n\r\n for (let i = 0; i < this._postProcesses.length; i++) {\r\n if (this._postProcesses[i]) {\r\n this._postProcesses[i].dispose();\r\n }\r\n }\r\n this._postProcesses = [];\r\n\r\n for (let i = 0; i < this._textures.length; i++) {\r\n if (this._textures[i]) {\r\n this._textures[i].dispose();\r\n }\r\n }\r\n this._textures = [];\r\n }\r\n\r\n /**\r\n * Dispose the highlight layer and free resources.\r\n */\r\n public dispose(): void {\r\n this._thinEffectLayer.dispose();\r\n\r\n // Clean textures and post processes\r\n this._disposeTextureAndPostProcesses();\r\n\r\n // Remove from scene\r\n const index = this._scene.effectLayers.indexOf(this, 0);\r\n if (index > -1) {\r\n this._scene.effectLayers.splice(index, 1);\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.clear();\r\n this.onBeforeRenderMainTextureObservable.clear();\r\n this.onBeforeComposeObservable.clear();\r\n this.onBeforeRenderMeshToEffect.clear();\r\n this.onAfterRenderMeshToEffect.clear();\r\n this.onAfterComposeObservable.clear();\r\n this.onSizeChangedObservable.clear();\r\n }\r\n\r\n /**\r\n * Gets the class name of the effect layer\r\n * @returns the string with the class name of the effect layer\r\n */\r\n public getClassName(): string {\r\n return \"EffectLayer\";\r\n }\r\n\r\n /**\r\n * Creates an effect layer from parsed effect layer data\r\n * @param parsedEffectLayer defines effect layer data\r\n * @param scene defines the current scene\r\n * @param rootUrl defines the root URL containing the effect layer information\r\n * @returns a parsed effect Layer\r\n */\r\n public static Parse(parsedEffectLayer: any, scene: Scene, rootUrl: string): EffectLayer {\r\n const effectLayerType = Tools.Instantiate(parsedEffectLayer.customType);\r\n\r\n return effectLayerType.Parse(parsedEffectLayer, scene, rootUrl);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"effectLayer.js","sourceRoot":"","sources":["../../../../dev/core/src/Layers/effectLayer.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC9F,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOhD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAMrD,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAGhF,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,EAAE,eAAe,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AAK,CAAC,iBAAsB,EAAE,KAAY,EAAE,OAAe;QACrE,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QAExE,OAAO,eAAe,CAAC,KAAK,CAAC,iBAAiB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;;AAvbD;;GAEG;AACW,yCAA6B,GAA2B,CAAC,CAAC,EAAE,EAAE;IACxE,MAAM,WAAW,CAAC,2BAA2B,CAAC,CAAC;AACnD,CAAC,AAF0C,CAEzC;AAzHF;IADC,SAAS,EAAE;uCAGX;AAUD;IADC,iBAAiB,EAAE;+CAGnB;AAUD;IADC,SAAS,EAAE;4CAGX;AAUD;IADC,0BAA0B,EAAE;yCAG5B;AAMD;IADC,SAAS,EAAE;mDAGX;AASD;IADC,SAAS,EAAE;sEAGX","sourcesContent":["import { serialize, serializeAsColor4, serializeAsCameraReference } from \"../Misc/decorators\";\r\nimport { Tools } from \"../Misc/tools\";\r\nimport { Observable } from \"../Misc/observable\";\r\nimport type { Nullable } from \"../types\";\r\nimport type { Camera } from \"../Cameras/camera\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { ISize } from \"../Maths/math.size\";\r\nimport type { Color4 } from \"../Maths/math.color\";\r\nimport type { AbstractEngine } from \"../Engines/abstractEngine\";\r\nimport { EngineStore } from \"../Engines/engineStore\";\r\nimport type { SubMesh } from \"../Meshes/subMesh\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { Mesh } from \"../Meshes/mesh\";\r\nimport type { PostProcess } from \"../PostProcesses/postProcess\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport { Texture } from \"../Materials/Textures/texture\";\r\nimport { RenderTargetTexture } from \"../Materials/Textures/renderTargetTexture\";\r\nimport type { Effect } from \"../Materials/effect\";\r\nimport type { Material } from \"../Materials/material\";\r\nimport { Constants } from \"../Engines/constants\";\r\n\r\nimport { _WarnImport } from \"../Misc/devTools\";\r\nimport { GetExponentOfTwo } from \"../Misc/tools.functions\";\r\nimport type { ShaderLanguage } from \"core/Materials/shaderLanguage\";\r\nimport { ThinEffectLayer } from \"./thinEffectLayer\";\r\n\r\n/**\r\n * Effect layer options. This helps customizing the behaviour\r\n * of the effect layer.\r\n */\r\nexport interface IEffectLayerOptions {\r\n /**\r\n * Multiplication factor apply to the canvas size to compute the render target size\r\n * used to generated the objects (the smaller the faster). Default: 0.5\r\n */\r\n mainTextureRatio: number;\r\n\r\n /**\r\n * Enforces a fixed size texture to ensure effect stability across devices. Default: undefined\r\n */\r\n mainTextureFixedSize?: number;\r\n\r\n /**\r\n * Alpha blending mode used to apply the blur. Default depends of the implementation. Default: ALPHA_COMBINE\r\n */\r\n alphaBlendingMode: number;\r\n\r\n /**\r\n * The camera attached to the layer. Default: null\r\n */\r\n camera: Nullable<Camera>;\r\n\r\n /**\r\n * The rendering group to draw the layer in. Default: -1\r\n */\r\n renderingGroupId: number;\r\n\r\n /**\r\n * The type of the main texture. Default: TEXTURETYPE_UNSIGNED_BYTE\r\n */\r\n mainTextureType: number;\r\n\r\n /**\r\n * Whether or not to generate a stencil buffer. Default: false\r\n */\r\n generateStencilBuffer: boolean;\r\n}\r\n\r\n/**\r\n * The effect layer Helps adding post process effect blended with the main pass.\r\n *\r\n * This can be for instance use to generate glow or highlight effects on the scene.\r\n *\r\n * The effect layer class can not be used directly and is intented to inherited from to be\r\n * customized per effects.\r\n */\r\nexport abstract class EffectLayer {\r\n private _effectLayerOptions: IEffectLayerOptions;\r\n\r\n protected _scene: Scene;\r\n protected _engine: AbstractEngine;\r\n protected _maxSize: number = 0;\r\n protected _mainTextureDesiredSize: ISize = { width: 0, height: 0 };\r\n protected _mainTexture: RenderTargetTexture;\r\n protected get _shouldRender() {\r\n return this._thinEffectLayer._shouldRender;\r\n }\r\n protected set _shouldRender(value) {\r\n this._thinEffectLayer._shouldRender = value;\r\n }\r\n protected _postProcesses: PostProcess[] = [];\r\n protected _textures: BaseTexture[] = [];\r\n protected get _emissiveTextureAndColor(): { texture: Nullable<BaseTexture>; color: Color4 } {\r\n return this._thinEffectLayer._emissiveTextureAndColor;\r\n }\r\n protected set _emissiveTextureAndColor(value) {\r\n this._thinEffectLayer._emissiveTextureAndColor = value;\r\n }\r\n protected get _effectIntensity(): { [meshUniqueId: number]: number } {\r\n return this._thinEffectLayer._effectIntensity;\r\n }\r\n protected set _effectIntensity(value) {\r\n this._thinEffectLayer._effectIntensity = value;\r\n }\r\n protected readonly _thinEffectLayer: ThinEffectLayer;\r\n private readonly _internalThinEffectLayer: boolean;\r\n\r\n /**\r\n * Force all the effect layers to compile to glsl even on WebGPU engines.\r\n * False by default. This is mostly meant for backward compatibility.\r\n */\r\n public static get ForceGLSL() {\r\n return ThinEffectLayer.ForceGLSL;\r\n }\r\n\r\n public static set ForceGLSL(value: boolean) {\r\n ThinEffectLayer.ForceGLSL = value;\r\n }\r\n\r\n /**\r\n * The name of the layer\r\n */\r\n @serialize()\r\n public get name() {\r\n return this._thinEffectLayer.name;\r\n }\r\n\r\n public set name(value: string) {\r\n this._thinEffectLayer.name = value;\r\n }\r\n\r\n /**\r\n * The clear color of the texture used to generate the glow map.\r\n */\r\n @serializeAsColor4()\r\n public get neutralColor(): Color4 {\r\n return this._thinEffectLayer.neutralColor;\r\n }\r\n\r\n public set neutralColor(value: Color4) {\r\n this._thinEffectLayer.neutralColor = value;\r\n }\r\n\r\n /**\r\n * Specifies whether the highlight layer is enabled or not.\r\n */\r\n @serialize()\r\n public get isEnabled(): boolean {\r\n return this._thinEffectLayer.isEnabled;\r\n }\r\n\r\n public set isEnabled(value: boolean) {\r\n this._thinEffectLayer.isEnabled = value;\r\n }\r\n\r\n /**\r\n * Gets the camera attached to the layer.\r\n */\r\n @serializeAsCameraReference()\r\n public get camera(): Nullable<Camera> {\r\n return this._thinEffectLayer.camera;\r\n }\r\n\r\n /**\r\n * Gets the rendering group id the layer should render in.\r\n */\r\n @serialize()\r\n public get renderingGroupId(): number {\r\n return this._thinEffectLayer.renderingGroupId;\r\n }\r\n public set renderingGroupId(renderingGroupId: number) {\r\n this._thinEffectLayer.renderingGroupId = renderingGroupId;\r\n }\r\n\r\n /**\r\n * Specifies if the bounding boxes should be rendered normally or if they should undergo the effect of the layer\r\n */\r\n @serialize()\r\n public get disableBoundingBoxesFromEffectLayer() {\r\n return this._thinEffectLayer.disableBoundingBoxesFromEffectLayer;\r\n }\r\n\r\n public set disableBoundingBoxesFromEffectLayer(value: boolean) {\r\n this._thinEffectLayer.disableBoundingBoxesFromEffectLayer = value;\r\n }\r\n\r\n /**\r\n * An event triggered when the effect layer has been disposed.\r\n */\r\n public onDisposeObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the effect layer is about rendering the main texture with the glowy parts.\r\n */\r\n public onBeforeRenderMainTextureObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the generated texture is being merged in the scene.\r\n */\r\n public onBeforeComposeObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the mesh is rendered into the effect render target.\r\n */\r\n public onBeforeRenderMeshToEffect = new Observable<AbstractMesh>();\r\n\r\n /**\r\n * An event triggered after the mesh has been rendered into the effect render target.\r\n */\r\n public onAfterRenderMeshToEffect = new Observable<AbstractMesh>();\r\n\r\n /**\r\n * An event triggered when the generated texture has been merged in the scene.\r\n */\r\n public onAfterComposeObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * An event triggered when the effect layer changes its size.\r\n */\r\n public onSizeChangedObservable = new Observable<EffectLayer>();\r\n\r\n /**\r\n * Gets the main texture where the effect is rendered\r\n */\r\n public get mainTexture() {\r\n return this._mainTexture;\r\n }\r\n\r\n protected get _shaderLanguage(): ShaderLanguage {\r\n return this._thinEffectLayer.shaderLanguage;\r\n }\r\n\r\n /**\r\n * Gets the shader language used in this material.\r\n */\r\n public get shaderLanguage(): ShaderLanguage {\r\n return this._thinEffectLayer.shaderLanguage;\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public static _SceneComponentInitialization: (scene: Scene) => void = (_) => {\r\n throw _WarnImport(\"EffectLayerSceneComponent\");\r\n };\r\n /**\r\n * Sets a specific material to be used to render a mesh/a list of meshes in the layer\r\n * @param mesh mesh or array of meshes\r\n * @param material material to use by the layer when rendering the mesh(es). If undefined is passed, the specific material created by the layer will be used.\r\n */\r\n public setMaterialForRendering(mesh: AbstractMesh | AbstractMesh[], material?: Material): void {\r\n this._thinEffectLayer.setMaterialForRendering(mesh, material);\r\n }\r\n\r\n /**\r\n * Gets the intensity of the effect for a specific mesh.\r\n * @param mesh The mesh to get the effect intensity for\r\n * @returns The intensity of the effect for the mesh\r\n */\r\n public getEffectIntensity(mesh: AbstractMesh) {\r\n return this._thinEffectLayer.getEffectIntensity(mesh);\r\n }\r\n\r\n /**\r\n * Sets the intensity of the effect for a specific mesh.\r\n * @param mesh The mesh to set the effect intensity for\r\n * @param intensity The intensity of the effect for the mesh\r\n */\r\n public setEffectIntensity(mesh: AbstractMesh, intensity: number): void {\r\n this._thinEffectLayer.setEffectIntensity(mesh, intensity);\r\n }\r\n\r\n /**\r\n * Instantiates a new effect Layer and references it in the scene.\r\n * @param name The name of the layer\r\n * @param scene The scene to use the layer in\r\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\r\n * @param thinEffectLayer The thin instance of the effect layer (optional)\r\n */\r\n constructor(\r\n /** The Friendly of the effect in the scene */\r\n name: string,\r\n scene?: Scene,\r\n forceGLSL = false,\r\n thinEffectLayer?: ThinEffectLayer\r\n ) {\r\n this._internalThinEffectLayer = !thinEffectLayer;\r\n if (!thinEffectLayer) {\r\n thinEffectLayer = new ThinEffectLayer(name, scene, forceGLSL, false, this._importShadersAsync.bind(this));\r\n thinEffectLayer.getEffectName = this.getEffectName.bind(this);\r\n thinEffectLayer.isReady = this.isReady.bind(this);\r\n thinEffectLayer._createMergeEffect = this._createMergeEffect.bind(this);\r\n thinEffectLayer._createTextureAndPostProcesses = this._createTextureAndPostProcesses.bind(this);\r\n thinEffectLayer._internalCompose = this._internalRender.bind(this);\r\n thinEffectLayer._setEmissiveTextureAndColor = this._setEmissiveTextureAndColor.bind(this);\r\n thinEffectLayer._numInternalDraws = this._numInternalDraws.bind(this);\r\n thinEffectLayer._addCustomEffectDefines = this._addCustomEffectDefines.bind(this);\r\n thinEffectLayer.hasMesh = this.hasMesh.bind(this);\r\n thinEffectLayer.shouldRender = this.shouldRender.bind(this);\r\n thinEffectLayer._shouldRenderMesh = this._shouldRenderMesh.bind(this);\r\n thinEffectLayer._canRenderMesh = this._canRenderMesh.bind(this);\r\n thinEffectLayer._useMeshMaterial = this._useMeshMaterial.bind(this);\r\n }\r\n\r\n this._thinEffectLayer = thinEffectLayer;\r\n this.name = name;\r\n\r\n this._scene = scene || <Scene>EngineStore.LastCreatedScene;\r\n EffectLayer._SceneComponentInitialization(this._scene);\r\n\r\n this._engine = this._scene.getEngine();\r\n this._maxSize = this._engine.getCaps().maxTextureSize;\r\n this._scene.effectLayers.push(this);\r\n\r\n this._thinEffectLayer.onDisposeObservable.add(() => {\r\n this.onDisposeObservable.notifyObservers(this);\r\n });\r\n\r\n this._thinEffectLayer.onBeforeRenderLayerObservable.add(() => {\r\n this.onBeforeRenderMainTextureObservable.notifyObservers(this);\r\n });\r\n\r\n this._thinEffectLayer.onBeforeComposeObservable.add(() => {\r\n this.onBeforeComposeObservable.notifyObservers(this);\r\n });\r\n\r\n this._thinEffectLayer.onBeforeRenderMeshToEffect.add((mesh) => {\r\n this.onBeforeRenderMeshToEffect.notifyObservers(mesh);\r\n });\r\n\r\n this._thinEffectLayer.onAfterRenderMeshToEffect.add((mesh) => {\r\n this.onAfterRenderMeshToEffect.notifyObservers(mesh);\r\n });\r\n\r\n this._thinEffectLayer.onAfterComposeObservable.add(() => {\r\n this.onAfterComposeObservable.notifyObservers(this);\r\n });\r\n }\r\n\r\n protected get _shadersLoaded() {\r\n return this._thinEffectLayer._shadersLoaded;\r\n }\r\n\r\n protected set _shadersLoaded(value: boolean) {\r\n this._thinEffectLayer._shadersLoaded = value;\r\n }\r\n\r\n /**\r\n * Get the effect name of the layer.\r\n * @returns The effect name\r\n */\r\n public abstract getEffectName(): string;\r\n\r\n /**\r\n * Checks for the readiness of the element composing the layer.\r\n * @param subMesh the mesh to check for\r\n * @param useInstances specify whether or not to use instances to render the mesh\r\n * @returns true if ready otherwise, false\r\n */\r\n public abstract isReady(subMesh: SubMesh, useInstances: boolean): boolean;\r\n\r\n /**\r\n * Returns whether or not the layer needs stencil enabled during the mesh rendering.\r\n * @returns true if the effect requires stencil during the main canvas render pass.\r\n */\r\n public abstract needStencil(): boolean;\r\n\r\n /**\r\n * Create the merge effect. This is the shader use to blit the information back\r\n * to the main canvas at the end of the scene rendering.\r\n * @returns The effect containing the shader used to merge the effect on the main canvas\r\n */\r\n protected abstract _createMergeEffect(): Effect;\r\n\r\n /**\r\n * Creates the render target textures and post processes used in the effect layer.\r\n */\r\n protected abstract _createTextureAndPostProcesses(): void;\r\n\r\n /**\r\n * Implementation specific of rendering the generating effect on the main canvas.\r\n * @param effect The effect used to render through\r\n * @param renderNum Index of the _internalRender call (0 for the first time _internalRender is called, 1 for the second time, etc. _internalRender is called the number of times returned by _numInternalDraws())\r\n */\r\n protected abstract _internalRender(effect: Effect, renderIndex: number): void;\r\n\r\n /**\r\n * Sets the required values for both the emissive texture and and the main color.\r\n */\r\n protected abstract _setEmissiveTextureAndColor(mesh: Mesh, subMesh: SubMesh, material: Material): void;\r\n\r\n /**\r\n * Free any resources and references associated to a mesh.\r\n * Internal use\r\n * @param mesh The mesh to free.\r\n */\r\n public abstract _disposeMesh(mesh: Mesh): void;\r\n\r\n /**\r\n * Serializes this layer (Glow or Highlight for example)\r\n * @returns a serialized layer object\r\n */\r\n public abstract serialize?(): any;\r\n\r\n /**\r\n * Number of times _internalRender will be called. Some effect layers need to render the mesh several times, so they should override this method with the number of times the mesh should be rendered\r\n * @returns Number of times a mesh must be rendered in the layer\r\n */\r\n protected _numInternalDraws(): number {\r\n return this._internalThinEffectLayer ? 1 : this._thinEffectLayer._numInternalDraws();\r\n }\r\n\r\n /**\r\n * Initializes the effect layer with the required options.\r\n * @param options Sets of none mandatory options to use with the layer (see IEffectLayerOptions for more information)\r\n */\r\n protected _init(options: Partial<IEffectLayerOptions>): void {\r\n // Adapt options\r\n this._effectLayerOptions = {\r\n mainTextureRatio: 0.5,\r\n alphaBlendingMode: Constants.ALPHA_COMBINE,\r\n camera: null,\r\n renderingGroupId: -1,\r\n mainTextureType: Constants.TEXTURETYPE_UNSIGNED_BYTE,\r\n generateStencilBuffer: false,\r\n ...options,\r\n };\r\n\r\n this._setMainTextureSize();\r\n this._thinEffectLayer._init(options);\r\n this._createMainTexture();\r\n this._createTextureAndPostProcesses();\r\n }\r\n\r\n /**\r\n * Sets the main texture desired size which is the closest power of two\r\n * of the engine canvas size.\r\n */\r\n private _setMainTextureSize(): void {\r\n if (this._effectLayerOptions.mainTextureFixedSize) {\r\n this._mainTextureDesiredSize.width = this._effectLayerOptions.mainTextureFixedSize;\r\n this._mainTextureDesiredSize.height = this._effectLayerOptions.mainTextureFixedSize;\r\n } else {\r\n this._mainTextureDesiredSize.width = this._engine.getRenderWidth() * this._effectLayerOptions.mainTextureRatio;\r\n this._mainTextureDesiredSize.height = this._engine.getRenderHeight() * this._effectLayerOptions.mainTextureRatio;\r\n\r\n this._mainTextureDesiredSize.width = this._engine.needPOTTextures\r\n ? GetExponentOfTwo(this._mainTextureDesiredSize.width, this._maxSize)\r\n : this._mainTextureDesiredSize.width;\r\n this._mainTextureDesiredSize.height = this._engine.needPOTTextures\r\n ? GetExponentOfTwo(this._mainTextureDesiredSize.height, this._maxSize)\r\n : this._mainTextureDesiredSize.height;\r\n }\r\n\r\n this._mainTextureDesiredSize.width = Math.floor(this._mainTextureDesiredSize.width);\r\n this._mainTextureDesiredSize.height = Math.floor(this._mainTextureDesiredSize.height);\r\n }\r\n\r\n /**\r\n * Creates the main texture for the effect layer.\r\n */\r\n protected _createMainTexture(): void {\r\n this._mainTexture = new RenderTargetTexture(\r\n \"EffectLayerMainRTT\",\r\n {\r\n width: this._mainTextureDesiredSize.width,\r\n height: this._mainTextureDesiredSize.height,\r\n },\r\n this._scene,\r\n {\r\n type: this._effectLayerOptions.mainTextureType,\r\n samplingMode: Texture.TRILINEAR_SAMPLINGMODE,\r\n generateStencilBuffer: this._effectLayerOptions.generateStencilBuffer,\r\n existingObjectRenderer: this._thinEffectLayer.objectRenderer,\r\n }\r\n );\r\n this._mainTexture.activeCamera = this._effectLayerOptions.camera;\r\n this._mainTexture.wrapU = Texture.CLAMP_ADDRESSMODE;\r\n this._mainTexture.wrapV = Texture.CLAMP_ADDRESSMODE;\r\n this._mainTexture.anisotropicFilteringLevel = 1;\r\n this._mainTexture.updateSamplingMode(Texture.BILINEAR_SAMPLINGMODE);\r\n this._mainTexture.renderParticles = false;\r\n this._mainTexture.renderList = null;\r\n this._mainTexture.ignoreCameraViewport = true;\r\n\r\n this._mainTexture.onClearObservable.add((engine: AbstractEngine) => {\r\n engine.clear(this.neutralColor, true, true, true);\r\n });\r\n }\r\n\r\n /**\r\n * Adds specific effects defines.\r\n * @param defines The defines to add specifics to.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected _addCustomEffectDefines(defines: string[]): void {\r\n // Nothing to add by default.\r\n }\r\n\r\n /**\r\n * Checks for the readiness of the element composing the layer.\r\n * @param subMesh the mesh to check for\r\n * @param useInstances specify whether or not to use instances to render the mesh\r\n * @param emissiveTexture the associated emissive texture used to generate the glow\r\n * @returns true if ready otherwise, false\r\n */\r\n protected _isReady(subMesh: SubMesh, useInstances: boolean, emissiveTexture: Nullable<BaseTexture>): boolean {\r\n return this._internalThinEffectLayer\r\n ? this._thinEffectLayer._internalIsSubMeshReady(subMesh, useInstances, emissiveTexture)\r\n : this._thinEffectLayer._isSubMeshReady(subMesh, useInstances, emissiveTexture);\r\n }\r\n\r\n protected async _importShadersAsync(): Promise<void> {}\r\n\r\n protected _arePostProcessAndMergeReady(): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalIsLayerReady() : this._thinEffectLayer.isLayerReady();\r\n }\r\n\r\n /**\r\n * Checks if the layer is ready to be used.\r\n * @returns true if the layer is ready to be used\r\n */\r\n public isLayerReady(): boolean {\r\n return this._arePostProcessAndMergeReady() && this._mainTexture.isReady();\r\n }\r\n\r\n /**\r\n * Renders the glowing part of the scene by blending the blurred glowing meshes on top of the rendered scene.\r\n */\r\n public render(): void {\r\n if (!this._thinEffectLayer.compose()) {\r\n return;\r\n }\r\n\r\n // Handle size changes.\r\n const size = this._mainTexture.getSize();\r\n this._setMainTextureSize();\r\n if (\r\n (size.width !== this._mainTextureDesiredSize.width || size.height !== this._mainTextureDesiredSize.height) &&\r\n this._mainTextureDesiredSize.width !== 0 &&\r\n this._mainTextureDesiredSize.height !== 0\r\n ) {\r\n // Recreate RTT and post processes on size change.\r\n this.onSizeChangedObservable.notifyObservers(this);\r\n this._disposeTextureAndPostProcesses();\r\n this._createMainTexture();\r\n this._createTextureAndPostProcesses();\r\n }\r\n }\r\n\r\n /**\r\n * Determine if a given mesh will be used in the current effect.\r\n * @param mesh mesh to test\r\n * @returns true if the mesh will be used\r\n */\r\n public hasMesh(mesh: AbstractMesh): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalHasMesh(mesh) : this._thinEffectLayer.hasMesh(mesh);\r\n }\r\n\r\n /**\r\n * Returns true if the layer contains information to display, otherwise false.\r\n * @returns true if the glow layer should be rendered\r\n */\r\n public shouldRender(): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalShouldRender() : this._thinEffectLayer.shouldRender();\r\n }\r\n\r\n /**\r\n * Returns true if the mesh should render, otherwise false.\r\n * @param mesh The mesh to render\r\n * @returns true if it should render otherwise false\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected _shouldRenderMesh(mesh: AbstractMesh): boolean {\r\n return this._internalThinEffectLayer ? true : this._thinEffectLayer._shouldRenderMesh(mesh);\r\n }\r\n\r\n /**\r\n * Returns true if the mesh can be rendered, otherwise false.\r\n * @param mesh The mesh to render\r\n * @param material The material used on the mesh\r\n * @returns true if it can be rendered otherwise false\r\n */\r\n protected _canRenderMesh(mesh: AbstractMesh, material: Material): boolean {\r\n return this._internalThinEffectLayer ? this._thinEffectLayer._internalCanRenderMesh(mesh, material) : this._thinEffectLayer._canRenderMesh(mesh, material);\r\n }\r\n\r\n /**\r\n * Returns true if the mesh should render, otherwise false.\r\n * @returns true if it should render otherwise false\r\n */\r\n protected _shouldRenderEmissiveTextureForMesh(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Defines whether the current material of the mesh should be use to render the effect.\r\n * @param mesh defines the current mesh to render\r\n * @returns true if the mesh material should be use\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n protected _useMeshMaterial(mesh: AbstractMesh): boolean {\r\n return this._internalThinEffectLayer ? false : this._thinEffectLayer._useMeshMaterial(mesh);\r\n }\r\n\r\n /**\r\n * Rebuild the required buffers.\r\n * @internal Internal use only.\r\n */\r\n public _rebuild(): void {\r\n this._thinEffectLayer._rebuild();\r\n }\r\n\r\n /**\r\n * Dispose only the render target textures and post process.\r\n */\r\n private _disposeTextureAndPostProcesses(): void {\r\n this._mainTexture.dispose();\r\n\r\n for (let i = 0; i < this._postProcesses.length; i++) {\r\n if (this._postProcesses[i]) {\r\n this._postProcesses[i].dispose();\r\n }\r\n }\r\n this._postProcesses = [];\r\n\r\n for (let i = 0; i < this._textures.length; i++) {\r\n if (this._textures[i]) {\r\n this._textures[i].dispose();\r\n }\r\n }\r\n this._textures = [];\r\n }\r\n\r\n /**\r\n * Dispose the highlight layer and free resources.\r\n */\r\n public dispose(): void {\r\n this._thinEffectLayer.dispose();\r\n\r\n // Clean textures and post processes\r\n this._disposeTextureAndPostProcesses();\r\n\r\n // Remove from scene\r\n const index = this._scene.effectLayers.indexOf(this, 0);\r\n if (index > -1) {\r\n this._scene.effectLayers.splice(index, 1);\r\n }\r\n\r\n // Callback\r\n this.onDisposeObservable.clear();\r\n this.onBeforeRenderMainTextureObservable.clear();\r\n this.onBeforeComposeObservable.clear();\r\n this.onBeforeRenderMeshToEffect.clear();\r\n this.onAfterRenderMeshToEffect.clear();\r\n this.onAfterComposeObservable.clear();\r\n this.onSizeChangedObservable.clear();\r\n }\r\n\r\n /**\r\n * Gets the class name of the effect layer\r\n * @returns the string with the class name of the effect layer\r\n */\r\n public getClassName(): string {\r\n return \"EffectLayer\";\r\n }\r\n\r\n /**\r\n * Creates an effect layer from parsed effect layer data\r\n * @param parsedEffectLayer defines effect layer data\r\n * @param scene defines the current scene\r\n * @param rootUrl defines the root URL containing the effect layer information\r\n * @returns a parsed effect Layer\r\n */\r\n public static Parse(parsedEffectLayer: any, scene: Scene, rootUrl: string): EffectLayer {\r\n const effectLayerType = Tools.Instantiate(parsedEffectLayer.customType);\r\n\r\n return effectLayerType.Parse(parsedEffectLayer, scene, rootUrl);\r\n }\r\n}\r\n"]}
@@ -354,7 +354,7 @@ export interface ImportAnimationsOptions extends SceneLoaderOptions {
354
354
  export declare function RegisterSceneLoaderPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync | ISceneLoaderPluginFactory): void;
355
355
  /**
356
356
  * Adds a new plugin to the list of registered plugins
357
- * @deprecated Please use `RegisterSceneLoaderPlugin` instead.
357
+ * @deprecated Please use {@link RegisterSceneLoaderPlugin} instead.
358
358
  * @param plugin defines the plugin to add
359
359
  */
360
360
  export declare function registerSceneLoaderPlugin(plugin: ISceneLoaderPlugin | ISceneLoaderPluginAsync | ISceneLoaderPluginFactory): void;
@@ -373,6 +373,14 @@ export declare function GetRegisteredSceneLoaderPluginMetadata(): DeepImmutable<
373
373
  extension: string;
374
374
  } & ISceneLoaderPluginExtensions[string])[];
375
375
  }>>;
376
+ /**
377
+ * Import meshes into a scene
378
+ * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
379
+ * @param scene the instance of BABYLON.Scene to append to
380
+ * @param options an object that configures aspects of how the scene is loaded
381
+ * @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups
382
+ */
383
+ export declare function ImportMeshAsync(source: SceneSource, scene: Scene, options?: ImportMeshOptions): Promise<ISceneLoaderAsyncResult>;
376
384
  /**
377
385
  * Load a scene
378
386
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
@@ -383,7 +391,7 @@ export declare function GetRegisteredSceneLoaderPluginMetadata(): DeepImmutable<
383
391
  export declare function LoadSceneAsync(source: SceneSource, engine: AbstractEngine, options?: LoadOptions): Promise<Scene>;
384
392
  /**
385
393
  * Load a scene
386
- * @deprecated Please use `LoadSceneAsync` instead.
394
+ * @deprecated Please use {@link LoadSceneAsync} instead.
387
395
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
388
396
  * @param engine is the instance of BABYLON.Engine to use to create the scene
389
397
  * @param options an object that configures aspects of how the scene is loaded
@@ -400,7 +408,7 @@ export declare function loadSceneAsync(source: SceneSource, engine: AbstractEngi
400
408
  export declare function AppendSceneAsync(source: SceneSource, scene: Scene, options?: AppendOptions): Promise<void>;
401
409
  /**
402
410
  * Append a scene
403
- * @deprecated Please use `AppendSceneAsync` instead.
411
+ * @deprecated Please use {@link AppendSceneAsync} instead.
404
412
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
405
413
  * @param scene is the instance of BABYLON.Scene to append to
406
414
  * @param options an object that configures aspects of how the scene is loaded
@@ -417,7 +425,7 @@ export declare function appendSceneAsync(source: SceneSource, scene: Scene, opti
417
425
  export declare function LoadAssetContainerAsync(source: SceneSource, scene: Scene, options?: LoadAssetContainerOptions): Promise<AssetContainer>;
418
426
  /**
419
427
  * Load a scene into an asset container
420
- * @deprecated Please use `LoadAssetContainerAsync` instead.
428
+ * @deprecated Please use {@link LoadAssetContainerAsync} instead.
421
429
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
422
430
  * @param scene is the instance of Scene to append to
423
431
  * @param options an object that configures aspects of how the scene is loaded
@@ -434,7 +442,7 @@ export declare function loadAssetContainerAsync(source: SceneSource, scene: Scen
434
442
  export declare function ImportAnimationsAsync(source: SceneSource, scene: Scene, options?: ImportAnimationsOptions): Promise<void>;
435
443
  /**
436
444
  * Import animations from a file into a scene
437
- * @deprecated Please use `ImportAnimationsAsync` instead.
445
+ * @deprecated Please use {@link ImportAnimationsAsync} instead.
438
446
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
439
447
  * @param scene is the instance of BABYLON.Scene to append to
440
448
  * @param options an object that configures aspects of how the scene is loaded
@@ -444,7 +452,8 @@ export declare function importAnimationsAsync(source: SceneSource, scene: Scene,
444
452
  /**
445
453
  * Class used to load scene from various file formats using registered plugins
446
454
  * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes
447
- * @deprecated The module level functions (such as LoadAssetContainerAsync) are more efficient for bundler tree shaking and allow plugin options to be passed through. Future improvements to scene loading will primarily be in the module level functions. The SceneLoader class will remain available, but it will be beneficial to prefer the module level functions.
455
+ * @deprecated The module level functions are more efficient for bundler tree shaking and allow plugin options to be passed through. Future improvements to scene loading will primarily be in the module level functions. The SceneLoader class will remain available, but it will be beneficial to prefer the module level functions.
456
+ * @see {@link ImportMeshAsync}, {@link LoadSceneAsync}, {@link AppendSceneAsync}, {@link ImportAnimationsAsync}, {@link LoadAssetContainerAsync}
448
457
  */
449
458
  export declare class SceneLoader {
450
459
  /**
@@ -521,7 +530,7 @@ export declare class SceneLoader {
521
530
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
522
531
  * @param pluginExtension the extension used to determine the plugin
523
532
  * @param name defines the name of the file, if the data is binary
524
- * @deprecated Please use ImportMeshAsync instead
533
+ * @deprecated Please use the module level {@link ImportMeshAsync} instead
525
534
  */
526
535
  static ImportMesh(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onSuccess?: Nullable<SceneLoaderSuccessCallback>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): void;
527
536
  /**
@@ -534,6 +543,7 @@ export declare class SceneLoader {
534
543
  * @param pluginExtension the extension used to determine the plugin
535
544
  * @param name defines the name of the file
536
545
  * @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups
546
+ * @deprecated Please use the module level {@link ImportMeshAsync} instead
537
547
  */
538
548
  static ImportMeshAsync(meshNames: string | readonly string[] | null | undefined, rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<ISceneLoaderAsyncResult>;
539
549
  /**
@@ -546,7 +556,7 @@ export declare class SceneLoader {
546
556
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
547
557
  * @param pluginExtension the extension used to determine the plugin
548
558
  * @param name defines the filename, if the data is binary
549
- * @deprecated Please use LoadAsync instead
559
+ * @deprecated Please use the module level {@link LoadSceneAsync} instead
550
560
  */
551
561
  static Load(rootUrl: string, sceneFilename?: SceneSource, engine?: Nullable<AbstractEngine>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): void;
552
562
  /**
@@ -558,6 +568,7 @@ export declare class SceneLoader {
558
568
  * @param pluginExtension the extension used to determine the plugin
559
569
  * @param name defines the filename, if the data is binary
560
570
  * @returns The loaded scene
571
+ * @deprecated Please use the module level {@link LoadSceneAsync} instead
561
572
  */
562
573
  static LoadAsync(rootUrl: string, sceneFilename?: SceneSource, engine?: Nullable<AbstractEngine>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<Scene>;
563
574
  /**
@@ -570,7 +581,7 @@ export declare class SceneLoader {
570
581
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
571
582
  * @param pluginExtension the extension used to determine the plugin
572
583
  * @param name defines the name of the file, if the data is binary
573
- * @deprecated Please use AppendAsync instead
584
+ * @deprecated Please use the module level {@link AppendSceneAsync} instead
574
585
  */
575
586
  static Append(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): void;
576
587
  /**
@@ -582,6 +593,7 @@ export declare class SceneLoader {
582
593
  * @param pluginExtension the extension used to determine the plugin
583
594
  * @param name defines the name of the file, if the data is binary
584
595
  * @returns The given scene
596
+ * @deprecated Please use the module level {@link AppendSceneAsync} instead
585
597
  */
586
598
  static AppendAsync(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<Scene>;
587
599
  /**
@@ -594,7 +606,7 @@ export declare class SceneLoader {
594
606
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
595
607
  * @param pluginExtension the extension used to determine the plugin
596
608
  * @param name defines the filename, if the data is binary
597
- * @deprecated Please use LoadAssetContainerAsync instead
609
+ * @deprecated Please use the module level {@link LoadAssetContainerAsync} instead
598
610
  */
599
611
  static LoadAssetContainer(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onSuccess?: Nullable<(assets: AssetContainer) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): void;
600
612
  /**
@@ -606,6 +618,7 @@ export declare class SceneLoader {
606
618
  * @param pluginExtension the extension used to determine the plugin
607
619
  * @param name defines the filename, if the data is binary
608
620
  * @returns The loaded asset container
621
+ * @deprecated Please use the module level {@link LoadAssetContainerAsync} instead
609
622
  */
610
623
  static LoadAssetContainerAsync(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<AssetContainer>;
611
624
  /**
@@ -621,7 +634,7 @@ export declare class SceneLoader {
621
634
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
622
635
  * @param pluginExtension the extension used to determine the plugin
623
636
  * @param name defines the filename, if the data is binary
624
- * @deprecated Please use ImportAnimationsAsync instead
637
+ * @deprecated Please use the module level {@link ImportAnimationsAsync} instead
625
638
  */
626
639
  static ImportAnimations(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, overwriteAnimations?: boolean, animationGroupLoadingMode?: SceneLoaderAnimationGroupLoadingMode, targetConverter?: Nullable<(target: any) => any>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): void;
627
640
  /**
@@ -638,6 +651,7 @@ export declare class SceneLoader {
638
651
  * @param pluginExtension the extension used to determine the plugin
639
652
  * @param name defines the filename, if the data is binary
640
653
  * @returns the updated scene with imported animations
654
+ * @deprecated Please use the module level {@link ImportAnimationsAsync} instead
641
655
  */
642
656
  static ImportAnimationsAsync(rootUrl: string, sceneFilename?: SceneSource, scene?: Nullable<Scene>, overwriteAnimations?: boolean, animationGroupLoadingMode?: SceneLoaderAnimationGroupLoadingMode, targetConverter?: Nullable<(target: any) => any>, onSuccess?: Nullable<(scene: Scene) => void>, onProgress?: Nullable<(event: ISceneLoaderProgressEvent) => void>, onError?: Nullable<(scene: Scene, message: string, exception?: any) => void>, pluginExtension?: Nullable<string>, name?: string): Promise<Scene>;
643
657
  }
@@ -315,7 +315,7 @@ export function RegisterSceneLoaderPlugin(plugin) {
315
315
  }
316
316
  /**
317
317
  * Adds a new plugin to the list of registered plugins
318
- * @deprecated Please use `RegisterSceneLoaderPlugin` instead.
318
+ * @deprecated Please use {@link RegisterSceneLoaderPlugin} instead.
319
319
  * @param plugin defines the plugin to add
320
320
  */
321
321
  export function registerSceneLoaderPlugin(plugin) {
@@ -335,6 +335,17 @@ export function GetRegisteredSceneLoaderPluginMetadata() {
335
335
  return pluginMap;
336
336
  }, new Map())).map(([name, extensions]) => ({ name, extensions }));
337
337
  }
338
+ /**
339
+ * Import meshes into a scene
340
+ * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
341
+ * @param scene the instance of BABYLON.Scene to append to
342
+ * @param options an object that configures aspects of how the scene is loaded
343
+ * @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups
344
+ */
345
+ export function ImportMeshAsync(source, scene, options) {
346
+ const { meshNames, rootUrl = "", onProgress, pluginExtension, name, pluginOptions } = options ?? {};
347
+ return importMeshAsyncCore(meshNames, rootUrl, source, scene, onProgress, pluginExtension, name, pluginOptions);
348
+ }
338
349
  async function importMeshAsync(meshNames, rootUrl, sceneFilename = "", scene = EngineStore.LastCreatedScene, onSuccess = null, onProgress = null, onError = null, pluginExtension = null, name = "", pluginOptions = {}) {
339
350
  if (!scene) {
340
351
  Logger.Error("No scene available to import mesh to");
@@ -455,7 +466,7 @@ export function LoadSceneAsync(source, engine, options) {
455
466
  }
456
467
  /**
457
468
  * Load a scene
458
- * @deprecated Please use `LoadSceneAsync` instead.
469
+ * @deprecated Please use {@link LoadSceneAsync} instead.
459
470
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
460
471
  * @param engine is the instance of BABYLON.Engine to use to create the scene
461
472
  * @param options an object that configures aspects of how the scene is loaded
@@ -565,7 +576,7 @@ export async function AppendSceneAsync(source, scene, options) {
565
576
  }
566
577
  /**
567
578
  * Append a scene
568
- * @deprecated Please use `AppendSceneAsync` instead.
579
+ * @deprecated Please use {@link AppendSceneAsync} instead.
569
580
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
570
581
  * @param scene is the instance of BABYLON.Scene to append to
571
582
  * @param options an object that configures aspects of how the scene is loaded
@@ -678,7 +689,7 @@ export function LoadAssetContainerAsync(source, scene, options) {
678
689
  }
679
690
  /**
680
691
  * Load a scene into an asset container
681
- * @deprecated Please use `LoadAssetContainerAsync` instead.
692
+ * @deprecated Please use {@link LoadAssetContainerAsync} instead.
682
693
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
683
694
  * @param scene is the instance of Scene to append to
684
695
  * @param options an object that configures aspects of how the scene is loaded
@@ -774,7 +785,7 @@ export async function ImportAnimationsAsync(source, scene, options) {
774
785
  }
775
786
  /**
776
787
  * Import animations from a file into a scene
777
- * @deprecated Please use `ImportAnimationsAsync` instead.
788
+ * @deprecated Please use {@link ImportAnimationsAsync} instead.
778
789
  * @param source a string that defines the name of the scene file, or starts with "data:" following by the stringified version of the scene, or a File object, or an ArrayBufferView
779
790
  * @param scene is the instance of BABYLON.Scene to append to
780
791
  * @param options an object that configures aspects of how the scene is loaded
@@ -801,7 +812,8 @@ function importAnimationsSharedAsync(rootUrl, sceneFilename, scene, overwriteAni
801
812
  /**
802
813
  * Class used to load scene from various file formats using registered plugins
803
814
  * @see https://doc.babylonjs.com/features/featuresDeepDive/importers/loadingFileTypes
804
- * @deprecated The module level functions (such as LoadAssetContainerAsync) are more efficient for bundler tree shaking and allow plugin options to be passed through. Future improvements to scene loading will primarily be in the module level functions. The SceneLoader class will remain available, but it will be beneficial to prefer the module level functions.
815
+ * @deprecated The module level functions are more efficient for bundler tree shaking and allow plugin options to be passed through. Future improvements to scene loading will primarily be in the module level functions. The SceneLoader class will remain available, but it will be beneficial to prefer the module level functions.
816
+ * @see {@link ImportMeshAsync}, {@link LoadSceneAsync}, {@link AppendSceneAsync}, {@link ImportAnimationsAsync}, {@link LoadAssetContainerAsync}
805
817
  */
806
818
  export class SceneLoader {
807
819
  /**
@@ -885,7 +897,7 @@ export class SceneLoader {
885
897
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
886
898
  * @param pluginExtension the extension used to determine the plugin
887
899
  * @param name defines the name of the file, if the data is binary
888
- * @deprecated Please use ImportMeshAsync instead
900
+ * @deprecated Please use the module level {@link ImportMeshAsync} instead
889
901
  */
890
902
  static ImportMesh(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {
891
903
  importMeshAsync(meshNames, rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.(EngineStore.LastCreatedScene, error?.message, error));
@@ -900,6 +912,7 @@ export class SceneLoader {
900
912
  * @param pluginExtension the extension used to determine the plugin
901
913
  * @param name defines the name of the file
902
914
  * @returns The loaded list of imported meshes, particle systems, skeletons, and animation groups
915
+ * @deprecated Please use the module level {@link ImportMeshAsync} instead
903
916
  */
904
917
  static ImportMeshAsync(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {
905
918
  return importMeshAsyncCore(meshNames, rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
@@ -914,7 +927,7 @@ export class SceneLoader {
914
927
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
915
928
  * @param pluginExtension the extension used to determine the plugin
916
929
  * @param name defines the filename, if the data is binary
917
- * @deprecated Please use LoadAsync instead
930
+ * @deprecated Please use the module level {@link LoadSceneAsync} instead
918
931
  */
919
932
  static Load(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name) {
920
933
  loadSceneImplAsync(rootUrl, sceneFilename, engine, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.(EngineStore.LastCreatedScene, error?.message, error));
@@ -928,6 +941,7 @@ export class SceneLoader {
928
941
  * @param pluginExtension the extension used to determine the plugin
929
942
  * @param name defines the filename, if the data is binary
930
943
  * @returns The loaded scene
944
+ * @deprecated Please use the module level {@link LoadSceneAsync} instead
931
945
  */
932
946
  static LoadAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name) {
933
947
  return loadSceneSharedAsync(rootUrl, sceneFilename, engine, onProgress, pluginExtension, name);
@@ -942,7 +956,7 @@ export class SceneLoader {
942
956
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
943
957
  * @param pluginExtension the extension used to determine the plugin
944
958
  * @param name defines the name of the file, if the data is binary
945
- * @deprecated Please use AppendAsync instead
959
+ * @deprecated Please use the module level {@link AppendSceneAsync} instead
946
960
  */
947
961
  static Append(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {
948
962
  appendSceneImplAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.((scene ?? EngineStore.LastCreatedScene), error?.message, error));
@@ -956,6 +970,7 @@ export class SceneLoader {
956
970
  * @param pluginExtension the extension used to determine the plugin
957
971
  * @param name defines the name of the file, if the data is binary
958
972
  * @returns The given scene
973
+ * @deprecated Please use the module level {@link AppendSceneAsync} instead
959
974
  */
960
975
  static AppendAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {
961
976
  return appendSceneSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
@@ -970,7 +985,7 @@ export class SceneLoader {
970
985
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
971
986
  * @param pluginExtension the extension used to determine the plugin
972
987
  * @param name defines the filename, if the data is binary
973
- * @deprecated Please use LoadAssetContainerAsync instead
988
+ * @deprecated Please use the module level {@link LoadAssetContainerAsync} instead
974
989
  */
975
990
  static LoadAssetContainer(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name) {
976
991
  loadAssetContainerImplAsync(rootUrl, sceneFilename, scene, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.((scene ?? EngineStore.LastCreatedScene), error?.message, error));
@@ -984,6 +999,7 @@ export class SceneLoader {
984
999
  * @param pluginExtension the extension used to determine the plugin
985
1000
  * @param name defines the filename, if the data is binary
986
1001
  * @returns The loaded asset container
1002
+ * @deprecated Please use the module level {@link LoadAssetContainerAsync} instead
987
1003
  */
988
1004
  static LoadAssetContainerAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name) {
989
1005
  return loadAssetContainerSharedAsync(rootUrl, sceneFilename, scene, onProgress, pluginExtension, name);
@@ -1001,7 +1017,7 @@ export class SceneLoader {
1001
1017
  * @param onError a callback with the scene, a message, and possibly an exception when import fails
1002
1018
  * @param pluginExtension the extension used to determine the plugin
1003
1019
  * @param name defines the filename, if the data is binary
1004
- * @deprecated Please use ImportAnimationsAsync instead
1020
+ * @deprecated Please use the module level {@link ImportAnimationsAsync} instead
1005
1021
  */
1006
1022
  static ImportAnimations(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name) {
1007
1023
  importAnimationsImplAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter, onSuccess, onProgress, onError, pluginExtension, name).catch((error) => onError?.((scene ?? EngineStore.LastCreatedScene), error?.message, error));
@@ -1020,6 +1036,7 @@ export class SceneLoader {
1020
1036
  * @param pluginExtension the extension used to determine the plugin
1021
1037
  * @param name defines the filename, if the data is binary
1022
1038
  * @returns the updated scene with imported animations
1039
+ * @deprecated Please use the module level {@link ImportAnimationsAsync} instead
1023
1040
  */
1024
1041
  static ImportAnimationsAsync(rootUrl, sceneFilename, scene, overwriteAnimations, animationGroupLoadingMode, targetConverter,
1025
1042
  // eslint-disable-next-line @typescript-eslint/no-unused-vars