@onerjs/core 8.41.4 → 8.41.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +16 -0
  2. package/Cameras/Inputs/geospatialCameraPointersInput.js +19 -3
  3. package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
  4. package/Cameras/Limits/geospatialLimits.d.ts +0 -6
  5. package/Cameras/Limits/geospatialLimits.js +0 -6
  6. package/Cameras/Limits/geospatialLimits.js.map +1 -1
  7. package/Cameras/geospatialCamera.d.ts +5 -0
  8. package/Cameras/geospatialCamera.js +38 -10
  9. package/Cameras/geospatialCamera.js.map +1 -1
  10. package/Engines/abstractEngine.d.ts +2 -2
  11. package/Engines/abstractEngine.js +2 -2
  12. package/Engines/abstractEngine.js.map +1 -1
  13. package/Engines/webgpuEngine.d.ts +1 -4
  14. package/Engines/webgpuEngine.js +8 -6
  15. package/Engines/webgpuEngine.js.map +1 -1
  16. package/FrameGraph/frameGraphContext.js +1 -1
  17. package/FrameGraph/frameGraphContext.js.map +1 -1
  18. package/FrameGraph/frameGraphRenderContext.js +2 -2
  19. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  20. package/Lights/Shadows/cascadedShadowGenerator.js +1 -1
  21. package/Lights/Shadows/cascadedShadowGenerator.js.map +1 -1
  22. package/Lights/Shadows/shadowGenerator.js +1 -1
  23. package/Lights/Shadows/shadowGenerator.js.map +1 -1
  24. package/Lights/lightingVolume.js +1 -1
  25. package/Lights/lightingVolume.js.map +1 -1
  26. package/Materials/Textures/Procedurals/proceduralTexture.js +1 -1
  27. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  28. package/Maths/math.path.js +3 -3
  29. package/Maths/math.path.js.map +1 -1
  30. package/Meshes/Builders/capsuleBuilder.js +0 -3
  31. package/Meshes/Builders/capsuleBuilder.js.map +1 -1
  32. package/Meshes/Builders/cylinderBuilder.d.ts +1 -1
  33. package/Meshes/Builders/cylinderBuilder.js +1 -2
  34. package/Meshes/Builders/cylinderBuilder.js.map +1 -1
  35. package/Meshes/Builders/decalBuilder.js +2 -0
  36. package/Meshes/Builders/decalBuilder.js.map +1 -1
  37. package/Meshes/Builders/discBuilder.js +0 -1
  38. package/Meshes/Builders/discBuilder.js.map +1 -1
  39. package/Meshes/Builders/groundBuilder.d.ts +50 -54
  40. package/Meshes/Builders/groundBuilder.js +50 -54
  41. package/Meshes/Builders/groundBuilder.js.map +1 -1
  42. package/Meshes/Builders/tiledBoxBuilder.d.ts +0 -26
  43. package/Meshes/Builders/tiledBoxBuilder.js +0 -26
  44. package/Meshes/Builders/tiledBoxBuilder.js.map +1 -1
  45. package/Meshes/Builders/tiledPlaneBuilder.d.ts +0 -25
  46. package/Meshes/Builders/tiledPlaneBuilder.js +0 -25
  47. package/Meshes/Builders/tiledPlaneBuilder.js.map +1 -1
  48. package/Meshes/Builders/torusBuilder.d.ts +0 -13
  49. package/Meshes/Builders/torusBuilder.js +0 -13
  50. package/Meshes/Builders/torusBuilder.js.map +1 -1
  51. package/Meshes/Builders/torusKnotBuilder.d.ts +0 -19
  52. package/Meshes/Builders/torusKnotBuilder.js +0 -19
  53. package/Meshes/Builders/torusKnotBuilder.js.map +1 -1
  54. package/Meshes/Compression/dracoCompressionWorker.js.map +1 -1
  55. package/Meshes/Compression/dracoDecoder.js.map +1 -1
  56. package/Meshes/Compression/dracoDecoder.types.d.ts +11 -0
  57. package/Meshes/Compression/dracoDecoder.types.js.map +1 -1
  58. package/Meshes/Compression/dracoEncoder.js.map +1 -1
  59. package/Meshes/Compression/meshoptCompression.js +0 -2
  60. package/Meshes/Compression/meshoptCompression.js.map +1 -1
  61. package/Meshes/GreasedLine/greasedLineRibbonMesh.js +0 -8
  62. package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
  63. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.d.ts +1 -0
  64. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +1 -0
  65. package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
  66. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.d.ts +1 -0
  67. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js +1 -0
  68. package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js.map +1 -1
  69. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.d.ts +1 -0
  70. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js +1 -0
  71. package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js.map +1 -1
  72. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.d.ts +1 -0
  73. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js +1 -0
  74. package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js.map +1 -1
  75. package/Meshes/Node/Blocks/Matrices/scalingBlock.d.ts +1 -0
  76. package/Meshes/Node/Blocks/Matrices/scalingBlock.js +1 -0
  77. package/Meshes/Node/Blocks/Matrices/scalingBlock.js.map +1 -1
  78. package/Meshes/Node/Blocks/Matrices/translationBlock.d.ts +1 -0
  79. package/Meshes/Node/Blocks/Matrices/translationBlock.js +1 -0
  80. package/Meshes/Node/Blocks/Matrices/translationBlock.js.map +1 -1
  81. package/Meshes/Node/Blocks/Set/aggregatorBlock.d.ts +1 -0
  82. package/Meshes/Node/Blocks/Set/aggregatorBlock.js +1 -0
  83. package/Meshes/Node/Blocks/Set/aggregatorBlock.js.map +1 -1
  84. package/Meshes/Node/Blocks/Set/latticeBlock.d.ts +1 -0
  85. package/Meshes/Node/Blocks/Set/latticeBlock.js +1 -0
  86. package/Meshes/Node/Blocks/Set/latticeBlock.js.map +1 -1
  87. package/Meshes/Node/Blocks/Set/setColorsBlock.d.ts +1 -0
  88. package/Meshes/Node/Blocks/Set/setColorsBlock.js +1 -0
  89. package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
  90. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.d.ts +1 -0
  91. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js +1 -0
  92. package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js.map +1 -1
  93. package/Meshes/Node/Blocks/Set/setNormalsBlock.d.ts +1 -0
  94. package/Meshes/Node/Blocks/Set/setNormalsBlock.js +1 -0
  95. package/Meshes/Node/Blocks/Set/setNormalsBlock.js.map +1 -1
  96. package/Meshes/Node/Blocks/Set/setPositionsBlock.d.ts +1 -0
  97. package/Meshes/Node/Blocks/Set/setPositionsBlock.js +1 -0
  98. package/Meshes/Node/Blocks/Set/setPositionsBlock.js.map +1 -1
  99. package/Meshes/Node/Blocks/Set/setTangentsBlock.d.ts +1 -0
  100. package/Meshes/Node/Blocks/Set/setTangentsBlock.js +1 -0
  101. package/Meshes/Node/Blocks/Set/setTangentsBlock.js.map +1 -1
  102. package/Meshes/Node/Blocks/Set/setUVsBlock.d.ts +1 -0
  103. package/Meshes/Node/Blocks/Set/setUVsBlock.js +1 -0
  104. package/Meshes/Node/Blocks/Set/setUVsBlock.js.map +1 -1
  105. package/Meshes/Node/Blocks/Sources/boxBlock.d.ts +2 -0
  106. package/Meshes/Node/Blocks/Sources/boxBlock.js +2 -0
  107. package/Meshes/Node/Blocks/Sources/boxBlock.js.map +1 -1
  108. package/Meshes/Node/Blocks/Sources/capsuleBlock.d.ts +2 -0
  109. package/Meshes/Node/Blocks/Sources/capsuleBlock.js +2 -0
  110. package/Meshes/Node/Blocks/Sources/capsuleBlock.js.map +1 -1
  111. package/Meshes/Node/Blocks/Sources/cylinderBlock.d.ts +2 -0
  112. package/Meshes/Node/Blocks/Sources/cylinderBlock.js +2 -0
  113. package/Meshes/Node/Blocks/Sources/cylinderBlock.js.map +1 -1
  114. package/Meshes/Node/Blocks/Sources/discBlock.d.ts +2 -0
  115. package/Meshes/Node/Blocks/Sources/discBlock.js +2 -0
  116. package/Meshes/Node/Blocks/Sources/discBlock.js.map +1 -1
  117. package/Meshes/Node/Blocks/Sources/gridBlock.d.ts +2 -0
  118. package/Meshes/Node/Blocks/Sources/gridBlock.js +2 -0
  119. package/Meshes/Node/Blocks/Sources/gridBlock.js.map +1 -1
  120. package/Meshes/Node/Blocks/Sources/icoSphereBlock.d.ts +2 -0
  121. package/Meshes/Node/Blocks/Sources/icoSphereBlock.js +2 -0
  122. package/Meshes/Node/Blocks/Sources/icoSphereBlock.js.map +1 -1
  123. package/Meshes/Node/Blocks/Sources/meshBlock.d.ts +1 -0
  124. package/Meshes/Node/Blocks/Sources/meshBlock.js +1 -0
  125. package/Meshes/Node/Blocks/Sources/meshBlock.js.map +1 -1
  126. package/Meshes/Node/Blocks/Sources/planeBlock.d.ts +2 -0
  127. package/Meshes/Node/Blocks/Sources/planeBlock.js +2 -0
  128. package/Meshes/Node/Blocks/Sources/planeBlock.js.map +1 -1
  129. package/Meshes/Node/Blocks/Sources/pointListBlock.d.ts +2 -1
  130. package/Meshes/Node/Blocks/Sources/pointListBlock.js +2 -1
  131. package/Meshes/Node/Blocks/Sources/pointListBlock.js.map +1 -1
  132. package/Meshes/Node/Blocks/Sources/sphereBlock.d.ts +2 -0
  133. package/Meshes/Node/Blocks/Sources/sphereBlock.js +2 -0
  134. package/Meshes/Node/Blocks/Sources/sphereBlock.js.map +1 -1
  135. package/Meshes/Node/Blocks/Sources/torusBlock.d.ts +2 -0
  136. package/Meshes/Node/Blocks/Sources/torusBlock.js +2 -0
  137. package/Meshes/Node/Blocks/Sources/torusBlock.js.map +1 -1
  138. package/Meshes/Node/Blocks/Teleport/teleportInBlock.d.ts +1 -0
  139. package/Meshes/Node/Blocks/Teleport/teleportInBlock.js +1 -0
  140. package/Meshes/Node/Blocks/Teleport/teleportInBlock.js.map +1 -1
  141. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.d.ts +3 -0
  142. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js +3 -0
  143. package/Meshes/Node/Blocks/Teleport/teleportOutBlock.js.map +1 -1
  144. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.d.ts +1 -0
  145. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +1 -1
  146. package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
  147. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.d.ts +1 -0
  148. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +1 -0
  149. package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
  150. package/Meshes/Node/Blocks/booleanGeometryBlock.d.ts +1 -0
  151. package/Meshes/Node/Blocks/booleanGeometryBlock.js +1 -1
  152. package/Meshes/Node/Blocks/booleanGeometryBlock.js.map +1 -1
  153. package/Meshes/Node/Blocks/cleanGeometryBlock.d.ts +1 -0
  154. package/Meshes/Node/Blocks/cleanGeometryBlock.js +1 -0
  155. package/Meshes/Node/Blocks/cleanGeometryBlock.js.map +1 -1
  156. package/Meshes/Node/Blocks/conditionBlock.d.ts +2 -0
  157. package/Meshes/Node/Blocks/conditionBlock.js +2 -0
  158. package/Meshes/Node/Blocks/conditionBlock.js.map +1 -1
  159. package/Meshes/Node/Blocks/geometryClampBlock.d.ts +1 -0
  160. package/Meshes/Node/Blocks/geometryClampBlock.js +1 -0
  161. package/Meshes/Node/Blocks/geometryClampBlock.js.map +1 -1
  162. package/Meshes/Node/Blocks/geometryCollectionBlock.d.ts +1 -0
  163. package/Meshes/Node/Blocks/geometryCollectionBlock.js +1 -0
  164. package/Meshes/Node/Blocks/geometryCollectionBlock.js.map +1 -1
  165. package/Meshes/Node/Blocks/geometryCurveBlock.d.ts +2 -0
  166. package/Meshes/Node/Blocks/geometryCurveBlock.js +2 -0
  167. package/Meshes/Node/Blocks/geometryCurveBlock.js.map +1 -1
  168. package/Meshes/Node/Blocks/geometryEaseBlock.d.ts +2 -0
  169. package/Meshes/Node/Blocks/geometryEaseBlock.js +2 -0
  170. package/Meshes/Node/Blocks/geometryEaseBlock.js.map +1 -1
  171. package/Meshes/Node/Blocks/geometryInputBlock.d.ts +3 -0
  172. package/Meshes/Node/Blocks/geometryInputBlock.js +3 -0
  173. package/Meshes/Node/Blocks/geometryInputBlock.js.map +1 -1
  174. package/Meshes/Node/Blocks/geometryOptimizeBlock.d.ts +1 -0
  175. package/Meshes/Node/Blocks/geometryOptimizeBlock.js +1 -0
  176. package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
  177. package/Meshes/Node/Blocks/geometryTransformBlock.d.ts +1 -0
  178. package/Meshes/Node/Blocks/geometryTransformBlock.js +1 -0
  179. package/Meshes/Node/Blocks/geometryTransformBlock.js.map +1 -1
  180. package/Meshes/Node/Blocks/geometryTrigonometryBlock.d.ts +2 -0
  181. package/Meshes/Node/Blocks/geometryTrigonometryBlock.js +2 -0
  182. package/Meshes/Node/Blocks/geometryTrigonometryBlock.js.map +1 -1
  183. package/Meshes/Node/Blocks/mappingBlock.d.ts +1 -0
  184. package/Meshes/Node/Blocks/mappingBlock.js +1 -0
  185. package/Meshes/Node/Blocks/mappingBlock.js.map +1 -1
  186. package/Meshes/Node/Blocks/mathBlock.d.ts +1 -0
  187. package/Meshes/Node/Blocks/mathBlock.js +1 -0
  188. package/Meshes/Node/Blocks/mathBlock.js.map +1 -1
  189. package/Meshes/Node/Blocks/mergeGeometryBlock.d.ts +1 -0
  190. package/Meshes/Node/Blocks/mergeGeometryBlock.js +1 -0
  191. package/Meshes/Node/Blocks/mergeGeometryBlock.js.map +1 -1
  192. package/Meshes/Node/Blocks/randomBlock.d.ts +2 -0
  193. package/Meshes/Node/Blocks/randomBlock.js +2 -0
  194. package/Meshes/Node/Blocks/randomBlock.js.map +1 -1
  195. package/Meshes/Node/Blocks/subdivideBlock.d.ts +1 -0
  196. package/Meshes/Node/Blocks/subdivideBlock.js +1 -0
  197. package/Meshes/Node/Blocks/subdivideBlock.js.map +1 -1
  198. package/Meshes/Node/Interfaces/nodeGeometryTextureData.d.ts +3 -0
  199. package/Meshes/Node/Interfaces/nodeGeometryTextureData.js.map +1 -1
  200. package/Meshes/Node/nodeGeometry.js +0 -2
  201. package/Meshes/Node/nodeGeometry.js.map +1 -1
  202. package/Meshes/Node/nodeGeometryBlockConnectionPoint.js +0 -1
  203. package/Meshes/Node/nodeGeometryBlockConnectionPoint.js.map +1 -1
  204. package/Meshes/Node/nodeGeometryBuildState.js +0 -1
  205. package/Meshes/Node/nodeGeometryBuildState.js.map +1 -1
  206. package/Meshes/WebGL/webGLDataBuffer.d.ts +2 -0
  207. package/Meshes/WebGL/webGLDataBuffer.js +2 -0
  208. package/Meshes/WebGL/webGLDataBuffer.js.map +1 -1
  209. package/Meshes/WebGPU/webgpuDataBuffer.d.ts +4 -0
  210. package/Meshes/WebGPU/webgpuDataBuffer.js +4 -0
  211. package/Meshes/WebGPU/webgpuDataBuffer.js.map +1 -1
  212. package/Meshes/abstractMesh.d.ts +1 -0
  213. package/Meshes/abstractMesh.decalMap.d.ts +1 -0
  214. package/Meshes/abstractMesh.decalMap.js.map +1 -1
  215. package/Meshes/abstractMesh.js +1 -6
  216. package/Meshes/abstractMesh.js.map +1 -1
  217. package/Meshes/csg.js +0 -6
  218. package/Meshes/csg.js.map +1 -1
  219. package/Meshes/csg2.js +1 -2
  220. package/Meshes/csg2.js.map +1 -1
  221. package/Meshes/geodesicMesh.d.ts +26 -0
  222. package/Meshes/geodesicMesh.js +18 -3
  223. package/Meshes/geodesicMesh.js.map +1 -1
  224. package/Meshes/groundMesh.d.ts +1 -0
  225. package/Meshes/groundMesh.js +1 -0
  226. package/Meshes/groundMesh.js.map +1 -1
  227. package/Meshes/index.js +0 -2
  228. package/Meshes/index.js.map +1 -1
  229. package/Meshes/instancedMesh.d.ts +18 -3
  230. package/Meshes/instancedMesh.js +10 -3
  231. package/Meshes/instancedMesh.js.map +1 -1
  232. package/Meshes/mesh.d.ts +286 -204
  233. package/Meshes/mesh.js +251 -197
  234. package/Meshes/mesh.js.map +1 -1
  235. package/Meshes/mesh.vertexData.d.ts +15 -19
  236. package/Meshes/mesh.vertexData.js +15 -19
  237. package/Meshes/mesh.vertexData.js.map +1 -1
  238. package/Meshes/meshSimplification.d.ts +0 -1
  239. package/Meshes/meshSimplification.js +6 -1
  240. package/Meshes/meshSimplification.js.map +1 -1
  241. package/Meshes/meshSimplificationSceneComponent.d.ts +2 -0
  242. package/Meshes/meshSimplificationSceneComponent.js.map +1 -1
  243. package/Meshes/meshUVSpaceRenderer.d.ts +1 -0
  244. package/Meshes/meshUVSpaceRenderer.js.map +1 -1
  245. package/Meshes/polygonMesh.js +4 -0
  246. package/Meshes/polygonMesh.js.map +1 -1
  247. package/Meshes/subMesh.project.d.ts +1 -0
  248. package/Meshes/subMesh.project.js.map +1 -1
  249. package/Meshes/thinInstanceMesh.d.ts +5 -0
  250. package/Meshes/thinInstanceMesh.js.map +1 -1
  251. package/Meshes/transformNode.d.ts +1 -1
  252. package/Meshes/transformNode.js +1 -1
  253. package/Meshes/transformNode.js.map +1 -1
  254. package/Physics/v2/Plugins/havokPlugin.d.ts +75 -2
  255. package/Physics/v2/Plugins/havokPlugin.js +243 -52
  256. package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
  257. package/Probes/reflectionProbe.js +1 -1
  258. package/Probes/reflectionProbe.js.map +1 -1
  259. package/Rendering/depthRenderer.js +1 -1
  260. package/Rendering/depthRenderer.js.map +1 -1
  261. package/package.json +1 -1
  262. package/scene.d.ts +0 -3
  263. package/scene.js +18 -5
  264. package/scene.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"geometryClampBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryClampBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAElG,OAAO,EAAE,O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CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;gBAC3H,CAAC;YACL,CAAC;YAED,OAAO,CAAC,CAAC;QACb,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC/C,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\n\r\n/**\r\n * Block used to clamp a float\r\n */\r\nexport class GeometryClampBlock extends NodeGeometryBlock {\r\n /** Gets or sets the minimum range */\r\n public get minimum() {\r\n return this.min.value;\r\n }\r\n\r\n public set minimum(value: number) {\r\n this.min.value = value;\r\n }\r\n\r\n /** Gets or sets the maximum range */\r\n public get maximum() {\r\n return this.max.value;\r\n }\r\n\r\n public set maximum(value: number) {\r\n this.max.value = value;\r\n }\r\n\r\n /**\r\n * Creates a new GeometryClampBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"min\", NodeGeometryBlockConnectionPointTypes.Float, true, 0);\r\n this.registerInput(\"max\", NodeGeometryBlockConnectionPointTypes.Float, true, 1);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryClampBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the min input component\r\n */\r\n public get min(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the max input component\r\n */\r\n public get max(): NodeGeometryConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.value.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n const func = (value: number, min: number, max: number) => {\r\n return Math.max(min, Math.min(value, max));\r\n };\r\n\r\n this.output._storedFunction = (state) => {\r\n const value = this.value.getConnectedValue(state);\r\n const min = this.min.isConnected ? this.min.getConnectedValue(state) : this.minimum;\r\n const max = this.max.isConnected ? this.max.getConnectedValue(state) : this.maximum;\r\n\r\n switch (this.value.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func(value, min, max);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func(value.x, min, max), func(value.y, min, max));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func(value.x, min, max), func(value.y, min, max), func(value.z, min, max));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func(value.x, min, max), func(value.y, min, max), func(value.z, min, max), func(value.w, min, max));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.minimum = serializationObject.minimum;\r\n this.maximum = serializationObject.maximum;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryClampBlock\", GeometryClampBlock);\r\n"]}
1
+ {"version":3,"file":"geometryClampBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryClampBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAElG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AAEnE;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IACrD,qCAAqC;IACrC,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,IAAW,OAAO,CAAC,KAAa;QAC5B,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED,qCAAqC;IACrC,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;IAC1B,CAAC;IAED,IAAW,OAAO,CAAC,KAAa;QAC5B,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAEZ,IAAI,CAAC,aAAa,CAAC,OAAO,EA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AAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;gBACzE,CAAC;gBACD,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC,CAAC;oBACjD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;gBAClG,CAAC;gBACD,KAAK,qCAAqC,CAAC,OAAO,CAAC,CAAC,CAAC;oBACjD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;gBAC3H,CAAC;YACL,CAAC;YAED,OAAO,CAAC,CAAC;QACb,CAAC,CAAC;QAEF,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,gBAAgB;IACA,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;QAC3C,IAAI,CAAC,OAAO,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC/C,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\n\r\n/**\r\n * Block used to clamp a float\r\n */\r\nexport class GeometryClampBlock extends NodeGeometryBlock {\r\n /** Gets or sets the minimum range */\r\n public get minimum() {\r\n return this.min.value;\r\n }\r\n\r\n public set minimum(value: number) {\r\n this.min.value = value;\r\n }\r\n\r\n /** Gets or sets the maximum range */\r\n public get maximum() {\r\n return this.max.value;\r\n }\r\n\r\n public set maximum(value: number) {\r\n this.max.value = value;\r\n }\r\n\r\n /**\r\n * Creates a new GeometryClampBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"value\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerInput(\"min\", NodeGeometryBlockConnectionPointTypes.Float, true, 0);\r\n this.registerInput(\"max\", NodeGeometryBlockConnectionPointTypes.Float, true, 1);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryClampBlock\";\r\n }\r\n\r\n /**\r\n * Gets the value input component\r\n */\r\n public get value(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the min input component\r\n */\r\n public get min(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the max input component\r\n */\r\n public get max(): NodeGeometryConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.value.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n const func = (value: number, min: number, max: number) => {\r\n return Math.max(min, Math.min(value, max));\r\n };\r\n\r\n this.output._storedFunction = (state) => {\r\n const value = this.value.getConnectedValue(state);\r\n const min = this.min.isConnected ? this.min.getConnectedValue(state) : this.minimum;\r\n const max = this.max.isConnected ? this.max.getConnectedValue(state) : this.maximum;\r\n\r\n switch (this.value.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func(value, min, max);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func(value.x, min, max), func(value.y, min, max));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func(value.x, min, max), func(value.y, min, max), func(value.z, min, max));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func(value.x, min, max), func(value.y, min, max), func(value.z, min, max), func(value.w, min, max));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n /** @internal */\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.minimum = serializationObject.minimum;\r\n this.maximum = serializationObject.maximum;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryClampBlock\", GeometryClampBlock);\r\n"]}
@@ -72,5 +72,6 @@ export declare class GeometryCollectionBlock extends NodeGeometryBlock {
72
72
  * @returns the serialized block object
73
73
  */
74
74
  serialize(): any;
75
+ /** @internal */
75
76
  _deserialize(serializationObject: any): void;
76
77
  }
@@ -155,6 +155,7 @@ export class GeometryCollectionBlock extends NodeGeometryBlock {
155
155
  serializationObject.evaluateContext = this.evaluateContext;
156
156
  return serializationObject;
157
157
  }
158
+ /** @internal */
158
159
  _deserialize(serializationObject) {
159
160
  super._deserialize(serializationObject);
160
161
  this.evaluateContext = serializationObject.evaluateContext;
@@ -1 +1 @@
1
- {"version":3,"file":"geometryCollectionBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCollectionBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAGlG,OAAO,EAA0B,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEnG;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,iBAAiB;IAQ1D;;;OAGG;IACH,YAAmB,IAAY;QAC3B,KAAK,CAAC,IAAI,CAAC,CAAC;QAZhB;;;WAGG;QAEI,oBAAe,GAAG,IAAI,CAAC;QAS1B,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,qCAAqC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QACtF,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,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;QAC3C,CAAC;IACL,CAAC;IAEkB,mBAAmB;QAClC,MAAM,UAAU,GAAG,KAAK,CAAC,mBAAmB,EAAE,GAAG,GAAG,IAAI,CAAC,iBAAiB,sBAAsB,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC;QAC7I,OAAO,UAAU,CAAC;IACtB,CAAC;IAED;;;OAGG;IACa,SAAS;QACrB,MAAM,mBAAmB,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QAE9C,mBAAmB,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAE3D,OAAO,mBAAmB,CAAC;IAC/B,CAAC;IAEe,YAAY,CAAC,mBAAwB;QACjD,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QAExC,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;IAC/D,CAAC;CACJ;AA9KU;IADN,sBAAsB,CAAC,kBAAkB,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;gEAC3G;AAgLlC,aAAa,CAAC,iCAAiC,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { VertexData } from \"../../mesh.vertexData\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Block used to randomly pick a geometry from a collection\r\n */\r\nexport class GeometryCollectionBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets a boolean indicating that this block can evaluate context\r\n * Build performance is improved when this value is set to false as the system will cache values instead of reevaluating everything per context change\r\n */\r\n @editableInPropertyPage(\"Evaluate context\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public evaluateContext = true;\r\n\r\n /**\r\n * Create a new GeometryCollectionBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"geometry0\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry1\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry2\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry3\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry4\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry5\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry6\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry7\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry8\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry9\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryCollectionBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry0 input component\r\n */\r\n public get geometry0(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the geometry1 input component\r\n */\r\n public get geometry1(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the geometry2 input component\r\n */\r\n public get geometry2(): NodeGeometryConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the geometry3 input component\r\n */\r\n public get geometry3(): NodeGeometryConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the geometry4 input component\r\n */\r\n public get geometry4(): NodeGeometryConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the geometry5 input component\r\n */\r\n public get geometry5(): NodeGeometryConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the geometry6 input component\r\n */\r\n public get geometry6(): NodeGeometryConnectionPoint {\r\n return this._inputs[6];\r\n }\r\n\r\n /**\r\n * Gets the geometry7 input component\r\n */\r\n public get geometry7(): NodeGeometryConnectionPoint {\r\n return this._inputs[7];\r\n }\r\n\r\n /**\r\n * Gets the geometry8 input component\r\n */\r\n public get geometry8(): NodeGeometryConnectionPoint {\r\n return this._inputs[8];\r\n }\r\n\r\n /**\r\n * Gets the geometry9 input component\r\n */\r\n public get geometry9(): NodeGeometryConnectionPoint {\r\n return this._inputs[9];\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n private _storeGeometry(input: NodeGeometryConnectionPoint, state: NodeGeometryBuildState, index: number, availables: VertexData[]) {\r\n if (input.isConnected) {\r\n const vertexData = input.getConnectedValue(state) as VertexData;\r\n if (!vertexData) {\r\n return;\r\n }\r\n vertexData.metadata = vertexData.metadata || {};\r\n vertexData.metadata.collectionId = index;\r\n availables.push(vertexData);\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n const func = (state: NodeGeometryBuildState) => {\r\n const availables: VertexData[] = [];\r\n\r\n this._storeGeometry(this.geometry0, state, 0, availables);\r\n this._storeGeometry(this.geometry1, state, 1, availables);\r\n this._storeGeometry(this.geometry2, state, 2, availables);\r\n this._storeGeometry(this.geometry3, state, 3, availables);\r\n this._storeGeometry(this.geometry4, state, 4, availables);\r\n this._storeGeometry(this.geometry5, state, 5, availables);\r\n this._storeGeometry(this.geometry6, state, 6, availables);\r\n this._storeGeometry(this.geometry7, state, 7, availables);\r\n this._storeGeometry(this.geometry8, state, 8, availables);\r\n this._storeGeometry(this.geometry9, state, 9, availables);\r\n\r\n if (!availables.length) {\r\n return null;\r\n }\r\n return availables[Math.round(Math.random() * (availables.length - 1))];\r\n };\r\n\r\n if (this.evaluateContext) {\r\n this.output._storedFunction = func;\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = func(state);\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.evaluateContext = ${this.evaluateContext ? \"true\" : \"false\"};\\n`;\r\n return codeString;\r\n }\r\n\r\n /**\r\n * Serializes this block in a JSON representation\r\n * @returns the serialized block object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.evaluateContext = this.evaluateContext;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.evaluateContext = serializationObject.evaluateContext;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCollectionBlock\", GeometryCollectionBlock);\r\n"]}
1
+ {"version":3,"file":"geometryCollectionBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCollectionBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAGlG,OAAO,EAA0B,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEnG;;GAEG;AACH,MAAM,OAAO,uBAAwB,SAAQ,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eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;IAC/D,CAAC;CACJ;AA/KU;IADN,sBAAsB,CAAC,kBAAkB,0CAAkC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC;gEAC3G;AAiLlC,aAAa,CAAC,iCAAiC,EAAE,uBAAuB,CAAC,CAAC","sourcesContent":["import { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { VertexData } from \"../../mesh.vertexData\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Block used to randomly pick a geometry from a collection\r\n */\r\nexport class GeometryCollectionBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets a boolean indicating that this block can evaluate context\r\n * Build performance is improved when this value is set to false as the system will cache values instead of reevaluating everything per context change\r\n */\r\n @editableInPropertyPage(\"Evaluate context\", PropertyTypeForEdition.Boolean, \"ADVANCED\", { embedded: true, notifiers: { rebuild: true } })\r\n public evaluateContext = true;\r\n\r\n /**\r\n * Create a new GeometryCollectionBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"geometry0\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry1\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry2\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry3\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry4\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry5\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry6\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry7\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry8\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n this.registerInput(\"geometry9\", NodeGeometryBlockConnectionPointTypes.Geometry, true);\r\n\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.Geometry);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._linkConnectionTypes(0, 1);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryCollectionBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry0 input component\r\n */\r\n public get geometry0(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the geometry1 input component\r\n */\r\n public get geometry1(): NodeGeometryConnectionPoint {\r\n return this._inputs[1];\r\n }\r\n\r\n /**\r\n * Gets the geometry2 input component\r\n */\r\n public get geometry2(): NodeGeometryConnectionPoint {\r\n return this._inputs[2];\r\n }\r\n\r\n /**\r\n * Gets the geometry3 input component\r\n */\r\n public get geometry3(): NodeGeometryConnectionPoint {\r\n return this._inputs[3];\r\n }\r\n\r\n /**\r\n * Gets the geometry4 input component\r\n */\r\n public get geometry4(): NodeGeometryConnectionPoint {\r\n return this._inputs[4];\r\n }\r\n\r\n /**\r\n * Gets the geometry5 input component\r\n */\r\n public get geometry5(): NodeGeometryConnectionPoint {\r\n return this._inputs[5];\r\n }\r\n\r\n /**\r\n * Gets the geometry6 input component\r\n */\r\n public get geometry6(): NodeGeometryConnectionPoint {\r\n return this._inputs[6];\r\n }\r\n\r\n /**\r\n * Gets the geometry7 input component\r\n */\r\n public get geometry7(): NodeGeometryConnectionPoint {\r\n return this._inputs[7];\r\n }\r\n\r\n /**\r\n * Gets the geometry8 input component\r\n */\r\n public get geometry8(): NodeGeometryConnectionPoint {\r\n return this._inputs[8];\r\n }\r\n\r\n /**\r\n * Gets the geometry9 input component\r\n */\r\n public get geometry9(): NodeGeometryConnectionPoint {\r\n return this._inputs[9];\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n private _storeGeometry(input: NodeGeometryConnectionPoint, state: NodeGeometryBuildState, index: number, availables: VertexData[]) {\r\n if (input.isConnected) {\r\n const vertexData = input.getConnectedValue(state) as VertexData;\r\n if (!vertexData) {\r\n return;\r\n }\r\n vertexData.metadata = vertexData.metadata || {};\r\n vertexData.metadata.collectionId = index;\r\n availables.push(vertexData);\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n const func = (state: NodeGeometryBuildState) => {\r\n const availables: VertexData[] = [];\r\n\r\n this._storeGeometry(this.geometry0, state, 0, availables);\r\n this._storeGeometry(this.geometry1, state, 1, availables);\r\n this._storeGeometry(this.geometry2, state, 2, availables);\r\n this._storeGeometry(this.geometry3, state, 3, availables);\r\n this._storeGeometry(this.geometry4, state, 4, availables);\r\n this._storeGeometry(this.geometry5, state, 5, availables);\r\n this._storeGeometry(this.geometry6, state, 6, availables);\r\n this._storeGeometry(this.geometry7, state, 7, availables);\r\n this._storeGeometry(this.geometry8, state, 8, availables);\r\n this._storeGeometry(this.geometry9, state, 9, availables);\r\n\r\n if (!availables.length) {\r\n return null;\r\n }\r\n return availables[Math.round(Math.random() * (availables.length - 1))];\r\n };\r\n\r\n if (this.evaluateContext) {\r\n this.output._storedFunction = func;\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = func(state);\r\n }\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.evaluateContext = ${this.evaluateContext ? \"true\" : \"false\"};\\n`;\r\n return codeString;\r\n }\r\n\r\n /**\r\n * Serializes this block in a JSON representation\r\n * @returns the serialized block object\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.evaluateContext = this.evaluateContext;\r\n\r\n return serializationObject;\r\n }\r\n\r\n /** @internal */\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.evaluateContext = serializationObject.evaluateContext;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCollectionBlock\", GeometryCollectionBlock);\r\n"]}
@@ -86,7 +86,9 @@ export declare class GeometryCurveBlock extends NodeGeometryBlock {
86
86
  */
87
87
  get output(): NodeGeometryConnectionPoint;
88
88
  protected _buildBlock(): this | undefined;
89
+ /** @internal */
89
90
  serialize(): any;
91
+ /** @internal */
90
92
  _deserialize(serializationObject: any): void;
91
93
  protected _dumpPropertiesCode(): string;
92
94
  }
@@ -240,11 +240,13 @@ export class GeometryCurveBlock extends NodeGeometryBlock {
240
240
  };
241
241
  return this;
242
242
  }
243
+ /** @internal */
243
244
  serialize() {
244
245
  const serializationObject = super.serialize();
245
246
  serializationObject.curveType = this.type;
246
247
  return serializationObject;
247
248
  }
249
+ /** @internal */
248
250
  _deserialize(serializationObject) {
249
251
  super._deserialize(serializationObject);
250
252
  this.type = serializationObject.curveType;
@@ -1 +1 @@
1
- {"version":3,"file":"geometryCurveBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCurveBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAGlG,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,sCAA+B;AACnE,OAAO,EAA0B,sBAAsB,EAAE,6CAAsC;AAE/F;;GAEG;A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KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,CAAC,UAAU,EAAE;YAClE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uBAAuB,CAAC,WAAW,EAAE;YACpE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,uBAAuB,CAAC,cAAc,EAAE;YAC1E,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,uBAAuB,CAAC,gBAAgB,EAAE;SACjF;KACJ,CAAC;gDACkD;AA8MxD,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { float } from \"core/types\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"core/Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Types of curves supported by the Curve block\r\n */\r\nexport enum GeometryCurveBlockTypes {\r\n /** EaseInSine */\r\n EaseInSine,\r\n /** EaseOutSine */\r\n EaseOutSine,\r\n /** EaseInOutSine */\r\n EaseInOutSine,\r\n /** EaseInQuad */\r\n EaseInQuad,\r\n /** EaseOutQuad */\r\n EaseOutQuad,\r\n /** EaseInOutQuad */\r\n EaseInOutQuad,\r\n /** EaseInCubic */\r\n EaseInCubic,\r\n /** EaseOutCubic */\r\n EaseOutCubic,\r\n /** EaseInOutCubic */\r\n EaseInOutCubic,\r\n /** EaseInQuart */\r\n EaseInQuart,\r\n /** EaseOutQuart */\r\n EaseOutQuart,\r\n /** EaseInOutQuart */\r\n EaseInOutQuart,\r\n /** EaseInQuint */\r\n EaseInQuint,\r\n /** EaseOutQuint */\r\n EaseOutQuint,\r\n /** EaseInOutQuint */\r\n EaseInOutQuint,\r\n /** EaseInExpo */\r\n EaseInExpo,\r\n /** EaseOutExpo */\r\n EaseOutExpo,\r\n /** EaseInOutExpo */\r\n EaseInOutExpo,\r\n /** EaseInCirc */\r\n EaseInCirc,\r\n /** EaseOutCirc */\r\n EaseOutCirc,\r\n /** EaseInOutCirc */\r\n EaseInOutCirc,\r\n /** EaseInBack */\r\n EaseInBack,\r\n /** EaseOutBack */\r\n EaseOutBack,\r\n /** EaseInOutBack */\r\n EaseInOutBack,\r\n /** EaseInElastic */\r\n EaseInElastic,\r\n /** EaseOutElastic */\r\n EaseOutElastic,\r\n /** EaseInOutElastic */\r\n EaseInOutElastic,\r\n}\r\n\r\n/**\r\n * Block used to apply curve operation\r\n */\r\nexport class GeometryCurveBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets the type of the curve applied by the block\r\n */\r\n @editableInPropertyPage(\"Type\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"EaseInSine\", value: GeometryCurveBlockTypes.EaseInSine },\r\n { label: \"EaseOutSine\", value: GeometryCurveBlockTypes.EaseOutSine },\r\n { label: \"EaseInOutSine\", value: GeometryCurveBlockTypes.EaseInOutSine },\r\n { label: \"EaseInQuad\", value: GeometryCurveBlockTypes.EaseInQuad },\r\n { label: \"EaseOutQuad\", value: GeometryCurveBlockTypes.EaseOutQuad },\r\n { label: \"EaseInOutQuad\", value: GeometryCurveBlockTypes.EaseInOutQuad },\r\n { label: \"EaseInCubic\", value: GeometryCurveBlockTypes.EaseInCubic },\r\n { label: \"EaseOutCubic\", value: GeometryCurveBlockTypes.EaseOutCubic },\r\n { label: \"EaseInOutCubic\", value: GeometryCurveBlockTypes.EaseInOutCubic },\r\n { label: \"EaseInQuart\", value: GeometryCurveBlockTypes.EaseInQuart },\r\n { label: \"EaseOutQuart\", value: GeometryCurveBlockTypes.EaseOutQuart },\r\n { label: \"EaseInOutQuart\", value: GeometryCurveBlockTypes.EaseInOutQuart },\r\n { label: \"EaseInQuint\", value: GeometryCurveBlockTypes.EaseInQuint },\r\n { label: \"EaseOutQuint\", value: GeometryCurveBlockTypes.EaseOutQuint },\r\n { label: \"EaseInOutQuint\", value: GeometryCurveBlockTypes.EaseInOutQuint },\r\n { label: \"EaseInExpo\", value: GeometryCurveBlockTypes.EaseInExpo },\r\n { label: \"EaseOutExpo\", value: GeometryCurveBlockTypes.EaseOutExpo },\r\n { label: \"EaseInOutExpo\", value: GeometryCurveBlockTypes.EaseInOutExpo },\r\n { label: \"EaseInCirc\", value: GeometryCurveBlockTypes.EaseInCirc },\r\n { label: \"EaseOutCirc\", value: GeometryCurveBlockTypes.EaseOutCirc },\r\n { label: \"EaseInOutCirc\", value: GeometryCurveBlockTypes.EaseInOutCirc },\r\n { label: \"EaseInBack\", value: GeometryCurveBlockTypes.EaseInBack },\r\n { label: \"EaseOutBack\", value: GeometryCurveBlockTypes.EaseOutBack },\r\n { label: \"EaseInOutBack\", value: GeometryCurveBlockTypes.EaseInOutBack },\r\n { label: \"EaseInElastic\", value: GeometryCurveBlockTypes.EaseInElastic },\r\n { label: \"EaseOutElastic\", value: GeometryCurveBlockTypes.EaseOutElastic },\r\n { label: \"EaseInOutElastic\", value: GeometryCurveBlockTypes.EaseInOutElastic },\r\n ],\r\n })\r\n public type = GeometryCurveBlockTypes.EaseInOutSine;\r\n\r\n /**\r\n * Creates a new CurveBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryCurveBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n let func: (v: float) => any;\r\n\r\n switch (this.type) {\r\n case GeometryCurveBlockTypes.EaseInSine:\r\n func = (v: float) => 1.0 - Math.cos((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutSine:\r\n func = (v: float) => Math.sin((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutSine:\r\n func = (v: float) => -(Math.cos(v * 3.1415) - 1.0) / 2.0;\r\n break;\r\n case GeometryCurveBlockTypes.EaseInQuad:\r\n func = (v: float) => v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuad:\r\n func = (v: float) => (1.0 - v) * (1.0 - v);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutQuad: {\r\n func = (v: float) => (v < 0.5 ? 2.0 * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 2.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCubic:\r\n func = (v: float) => v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutCubic: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 3.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCubic: {\r\n func = (v: float) => (v < 0.5 ? 4.0 * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 3.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuart:\r\n func = (v: float) => v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuart: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 4.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuart: {\r\n func = (v: float) => (v < 0.5 ? 8.0 * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 4.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuint:\r\n func = (v: float) => v * v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuint: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 5.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuint: {\r\n func = (v: float) => (v < 0.5 ? 16.0 * v * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 5.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : Math.pow(2.0, 10.0 * v - 10.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutExpo: {\r\n func = (v: float) => (v === 1.0 ? 1.0 : 1.0 - Math.pow(2.0, -10.0 * v));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : v < 0.5 ? Math.pow(2.0, 20.0 * v - 10.0) / 2.0 : (2.0 - Math.pow(2.0, -20.0 * v + 10.0)) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCirc: {\r\n func = (v: float) => 1.0 - Math.sqrt(1.0 - Math.pow(v, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutCirc: {\r\n func = (v: float) => Math.sqrt(1.0 - Math.pow(v - 1.0, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCirc: {\r\n func = (v: float) => (v < 0.5 ? (1.0 - Math.sqrt(1.0 - Math.pow(2.0 * v, 2.0))) / 2.0 : (Math.sqrt(1.0 - Math.pow(-2.0 * v + 2.0, 2.0)) + 1.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInBack: {\r\n func = (v: float) => 2.70158 * v * v * v - 1.70158 * v * v;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutBack: {\r\n func = (v: float) => 2.70158 * Math.pow(v - 1.0, 3.0) + 1.70158 * Math.pow(v - 1.0, 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutBack: {\r\n func = (v: float) =>\r\n v < 0.5\r\n ? (Math.pow(2.0 * v, 2.0) * (3.5949095 * 2.0 * v - 2.5949095)) / 2.0\r\n : (Math.pow(2.0 * v - 2.0, 2.0) * (3.5949095 * (v * 2.0 - 2.0) + 3.5949095) + 2.0) / 2.0;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : -Math.pow(2.0, 10.0 * v - 10.0) * Math.sin((v * 10.0 - 10.75) * ((2.0 * 3.1415) / 3.0)));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : Math.pow(2.0, -10.0 * v) * Math.sin((v * 10.0 - 0.75) * ((2.0 * 3.1415) / 3.0)) + 1.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutElastic: {\r\n func = (v: float) =>\r\n v === 0.0\r\n ? 0.0\r\n : v == 1.0\r\n ? 1.0\r\n : v < 0.5\r\n ? -(Math.pow(2.0, 20.0 * v - 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0\r\n : (Math.pow(2.0, -20.0 * v + 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0 + 1.0;\r\n break;\r\n }\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const input = this.input.getConnectedValue(state);\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func(input);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func(input.x), func(input.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func(input.x), func(input.y), func(input.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func(input.x), func(input.y), func(input.z), func(input.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.curveType = this.type;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.type = serializationObject.curveType;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryCurveBlockTypes.${GeometryCurveBlockTypes[this.type]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCurveBlock\", GeometryCurveBlock);\r\n"]}
1
+ {"version":3,"file":"geometryCurveBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryCurveBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,E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YACxE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,CAAC,UAAU,EAAE;YAClE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uBAAuB,CAAC,WAAW,EAAE;YACpE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,uBAAuB,CAAC,UAAU,EAAE;YAClE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,uBAAuB,CAAC,WAAW,EAAE;YACpE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,uBAAuB,CAAC,aAAa,EAAE;YACxE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,uBAAuB,CAAC,cAAc,EAAE;YAC1E,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,uBAAuB,CAAC,gBAAgB,EAAE;SACjF;KACJ,CAAC;gDACkD;AAgNxD,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { float } from \"core/types\";\r\nimport { Vector2, Vector3, Vector4 } from \"core/Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"core/Decorators/nodeDecorator\";\r\n\r\n/**\r\n * Types of curves supported by the Curve block\r\n */\r\nexport enum GeometryCurveBlockTypes {\r\n /** EaseInSine */\r\n EaseInSine,\r\n /** EaseOutSine */\r\n EaseOutSine,\r\n /** EaseInOutSine */\r\n EaseInOutSine,\r\n /** EaseInQuad */\r\n EaseInQuad,\r\n /** EaseOutQuad */\r\n EaseOutQuad,\r\n /** EaseInOutQuad */\r\n EaseInOutQuad,\r\n /** EaseInCubic */\r\n EaseInCubic,\r\n /** EaseOutCubic */\r\n EaseOutCubic,\r\n /** EaseInOutCubic */\r\n EaseInOutCubic,\r\n /** EaseInQuart */\r\n EaseInQuart,\r\n /** EaseOutQuart */\r\n EaseOutQuart,\r\n /** EaseInOutQuart */\r\n EaseInOutQuart,\r\n /** EaseInQuint */\r\n EaseInQuint,\r\n /** EaseOutQuint */\r\n EaseOutQuint,\r\n /** EaseInOutQuint */\r\n EaseInOutQuint,\r\n /** EaseInExpo */\r\n EaseInExpo,\r\n /** EaseOutExpo */\r\n EaseOutExpo,\r\n /** EaseInOutExpo */\r\n EaseInOutExpo,\r\n /** EaseInCirc */\r\n EaseInCirc,\r\n /** EaseOutCirc */\r\n EaseOutCirc,\r\n /** EaseInOutCirc */\r\n EaseInOutCirc,\r\n /** EaseInBack */\r\n EaseInBack,\r\n /** EaseOutBack */\r\n EaseOutBack,\r\n /** EaseInOutBack */\r\n EaseInOutBack,\r\n /** EaseInElastic */\r\n EaseInElastic,\r\n /** EaseOutElastic */\r\n EaseOutElastic,\r\n /** EaseInOutElastic */\r\n EaseInOutElastic,\r\n}\r\n\r\n/**\r\n * Block used to apply curve operation\r\n */\r\nexport class GeometryCurveBlock extends NodeGeometryBlock {\r\n /**\r\n * Gets or sets the type of the curve applied by the block\r\n */\r\n @editableInPropertyPage(\"Type\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"EaseInSine\", value: GeometryCurveBlockTypes.EaseInSine },\r\n { label: \"EaseOutSine\", value: GeometryCurveBlockTypes.EaseOutSine },\r\n { label: \"EaseInOutSine\", value: GeometryCurveBlockTypes.EaseInOutSine },\r\n { label: \"EaseInQuad\", value: GeometryCurveBlockTypes.EaseInQuad },\r\n { label: \"EaseOutQuad\", value: GeometryCurveBlockTypes.EaseOutQuad },\r\n { label: \"EaseInOutQuad\", value: GeometryCurveBlockTypes.EaseInOutQuad },\r\n { label: \"EaseInCubic\", value: GeometryCurveBlockTypes.EaseInCubic },\r\n { label: \"EaseOutCubic\", value: GeometryCurveBlockTypes.EaseOutCubic },\r\n { label: \"EaseInOutCubic\", value: GeometryCurveBlockTypes.EaseInOutCubic },\r\n { label: \"EaseInQuart\", value: GeometryCurveBlockTypes.EaseInQuart },\r\n { label: \"EaseOutQuart\", value: GeometryCurveBlockTypes.EaseOutQuart },\r\n { label: \"EaseInOutQuart\", value: GeometryCurveBlockTypes.EaseInOutQuart },\r\n { label: \"EaseInQuint\", value: GeometryCurveBlockTypes.EaseInQuint },\r\n { label: \"EaseOutQuint\", value: GeometryCurveBlockTypes.EaseOutQuint },\r\n { label: \"EaseInOutQuint\", value: GeometryCurveBlockTypes.EaseInOutQuint },\r\n { label: \"EaseInExpo\", value: GeometryCurveBlockTypes.EaseInExpo },\r\n { label: \"EaseOutExpo\", value: GeometryCurveBlockTypes.EaseOutExpo },\r\n { label: \"EaseInOutExpo\", value: GeometryCurveBlockTypes.EaseInOutExpo },\r\n { label: \"EaseInCirc\", value: GeometryCurveBlockTypes.EaseInCirc },\r\n { label: \"EaseOutCirc\", value: GeometryCurveBlockTypes.EaseOutCirc },\r\n { label: \"EaseInOutCirc\", value: GeometryCurveBlockTypes.EaseInOutCirc },\r\n { label: \"EaseInBack\", value: GeometryCurveBlockTypes.EaseInBack },\r\n { label: \"EaseOutBack\", value: GeometryCurveBlockTypes.EaseOutBack },\r\n { label: \"EaseInOutBack\", value: GeometryCurveBlockTypes.EaseInOutBack },\r\n { label: \"EaseInElastic\", value: GeometryCurveBlockTypes.EaseInElastic },\r\n { label: \"EaseOutElastic\", value: GeometryCurveBlockTypes.EaseOutElastic },\r\n { label: \"EaseInOutElastic\", value: GeometryCurveBlockTypes.EaseInOutElastic },\r\n ],\r\n })\r\n public type = GeometryCurveBlockTypes.EaseInOutSine;\r\n\r\n /**\r\n * Creates a new CurveBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Int);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryCurveBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock() {\r\n if (!this.input.isConnected) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n let func: (v: float) => any;\r\n\r\n switch (this.type) {\r\n case GeometryCurveBlockTypes.EaseInSine:\r\n func = (v: float) => 1.0 - Math.cos((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutSine:\r\n func = (v: float) => Math.sin((v * 3.1415) / 2.0);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutSine:\r\n func = (v: float) => -(Math.cos(v * 3.1415) - 1.0) / 2.0;\r\n break;\r\n case GeometryCurveBlockTypes.EaseInQuad:\r\n func = (v: float) => v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuad:\r\n func = (v: float) => (1.0 - v) * (1.0 - v);\r\n break;\r\n case GeometryCurveBlockTypes.EaseInOutQuad: {\r\n func = (v: float) => (v < 0.5 ? 2.0 * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 2.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCubic:\r\n func = (v: float) => v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutCubic: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 3.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCubic: {\r\n func = (v: float) => (v < 0.5 ? 4.0 * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 3.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuart:\r\n func = (v: float) => v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuart: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 4.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuart: {\r\n func = (v: float) => (v < 0.5 ? 8.0 * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 4.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInQuint:\r\n func = (v: float) => v * v * v * v * v;\r\n break;\r\n case GeometryCurveBlockTypes.EaseOutQuint: {\r\n func = (v: float) => 1.0 - Math.pow(1.0 - v, 5.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutQuint: {\r\n func = (v: float) => (v < 0.5 ? 16.0 * v * v * v * v * v : 1.0 - Math.pow(-2.0 * v + 2.0, 5.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : Math.pow(2.0, 10.0 * v - 10.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutExpo: {\r\n func = (v: float) => (v === 1.0 ? 1.0 : 1.0 - Math.pow(2.0, -10.0 * v));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutExpo: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : v < 0.5 ? Math.pow(2.0, 20.0 * v - 10.0) / 2.0 : (2.0 - Math.pow(2.0, -20.0 * v + 10.0)) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInCirc: {\r\n func = (v: float) => 1.0 - Math.sqrt(1.0 - Math.pow(v, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutCirc: {\r\n func = (v: float) => Math.sqrt(1.0 - Math.pow(v - 1.0, 2.0));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutCirc: {\r\n func = (v: float) => (v < 0.5 ? (1.0 - Math.sqrt(1.0 - Math.pow(2.0 * v, 2.0))) / 2.0 : (Math.sqrt(1.0 - Math.pow(-2.0 * v + 2.0, 2.0)) + 1.0) / 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInBack: {\r\n func = (v: float) => 2.70158 * v * v * v - 1.70158 * v * v;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutBack: {\r\n func = (v: float) => 2.70158 * Math.pow(v - 1.0, 3.0) + 1.70158 * Math.pow(v - 1.0, 2.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutBack: {\r\n func = (v: float) =>\r\n v < 0.5\r\n ? (Math.pow(2.0 * v, 2.0) * (3.5949095 * 2.0 * v - 2.5949095)) / 2.0\r\n : (Math.pow(2.0 * v - 2.0, 2.0) * (3.5949095 * (v * 2.0 - 2.0) + 3.5949095) + 2.0) / 2.0;\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : -Math.pow(2.0, 10.0 * v - 10.0) * Math.sin((v * 10.0 - 10.75) * ((2.0 * 3.1415) / 3.0)));\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseOutElastic: {\r\n func = (v: float) => (v === 0.0 ? 0.0 : v === 1.0 ? 1.0 : Math.pow(2.0, -10.0 * v) * Math.sin((v * 10.0 - 0.75) * ((2.0 * 3.1415) / 3.0)) + 1.0);\r\n break;\r\n }\r\n case GeometryCurveBlockTypes.EaseInOutElastic: {\r\n func = (v: float) =>\r\n v === 0.0\r\n ? 0.0\r\n : v == 1.0\r\n ? 1.0\r\n : v < 0.5\r\n ? -(Math.pow(2.0, 20.0 * v - 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0\r\n : (Math.pow(2.0, -20.0 * v + 10.0) * Math.sin((20.0 * v - 11.125) * ((2.0 * 3.1415) / 4.5))) / 2.0 + 1.0;\r\n break;\r\n }\r\n }\r\n\r\n this.output._storedFunction = (state) => {\r\n const input = this.input.getConnectedValue(state);\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n return func(input);\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n return new Vector2(func(input.x), func(input.y));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n return new Vector3(func(input.x), func(input.y), func(input.z));\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n return new Vector4(func(input.x), func(input.y), func(input.z), func(input.w));\r\n }\r\n }\r\n\r\n return 0;\r\n };\r\n\r\n return this;\r\n }\r\n\r\n /** @internal */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.curveType = this.type;\r\n\r\n return serializationObject;\r\n }\r\n\r\n /** @internal */\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.type = serializationObject.curveType;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryCurveBlockTypes.${GeometryCurveBlockTypes[this.type]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryCurveBlock\", GeometryCurveBlock);\r\n"]}
@@ -90,7 +90,9 @@ export declare class GeometryEaseBlock extends NodeGeometryBlock {
90
90
  */
91
91
  get output(): NodeGeometryConnectionPoint;
92
92
  protected _buildBlock(state: NodeGeometryBuildState): this | undefined;
93
+ /** @internal */
93
94
  serialize(): any;
95
+ /** @internal */
94
96
  _deserialize(serializationObject: any): void;
95
97
  protected _dumpPropertiesCode(): string;
96
98
  }
@@ -265,11 +265,13 @@ export class GeometryEaseBlock extends NodeGeometryBlock {
265
265
  }
266
266
  return this;
267
267
  }
268
+ /** @internal */
268
269
  serialize() {
269
270
  const serializationObject = super.serialize();
270
271
  serializationObject.type = this.type;
271
272
  return serializationObject;
272
273
  }
274
+ /** @internal */
273
275
  _deserialize(serializationObject) {
274
276
  super._deserialize(serializationObject);
275
277
  this.type = serializationObject.type;
@@ -1 +1 @@
1
- {"version":3,"file":"geometryEaseBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryEaseBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAA0B,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEnG,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,sCAA+B;AAE1J;;GAEG;AACH,MAAM,CAAN,IAAY,sBAuDX;AAvDD,WAAY,sBAAsB;IAC9B,iBAAiB;IACjB,+EAAU,CAAA;IACV,kBAAkB;IAClB,iFAAW,CAAA;IACX,oBAAoB;IACpB,qFAAa,CAAA;IACb,iBAAiB;IACjB,+EAAU,CAAA;IACV,kBAA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AAY,EAAE,KAAK,EAAE,sBAAsB,CAAC,UAAU,EAAE;YACjE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,sBAAsB,CAAC,WAAW,EAAE;YACnE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,sBAAsB,CAAC,UAAU,EAAE;YACjE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,sBAAsB,CAAC,WAAW,EAAE;YACnE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,sBAAsB,CAAC,cAAc,EAAE;YACzE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,sBAAsB,CAAC,gBAAgB,EAAE;SAChF;KACJ,CAAC;6CAGD;AAmOL,aAAa,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\nimport type { EasingFunction } from \"core/Animations/easing\";\r\nimport { BackEase, CircleEase, CubicEase, ElasticEase, ExponentialEase, QuadraticEase, QuarticEase, QuinticEase, SineEase } from \"core/Animations/easing\";\r\n\r\n/**\r\n * Types of easing function supported by the Ease block\r\n */\r\nexport enum GeometryEaseBlockTypes {\r\n /** EaseInSine */\r\n EaseInSine,\r\n /** EaseOutSine */\r\n EaseOutSine,\r\n /** EaseInOutSine */\r\n EaseInOutSine,\r\n /** EaseInQuad */\r\n EaseInQuad,\r\n /** EaseOutQuad */\r\n EaseOutQuad,\r\n /** EaseInOutQuad */\r\n EaseInOutQuad,\r\n /** EaseInCubic */\r\n EaseInCubic,\r\n /** EaseOutCubic */\r\n EaseOutCubic,\r\n /** EaseInOutCubic */\r\n EaseInOutCubic,\r\n /** EaseInQuart */\r\n EaseInQuart,\r\n /** EaseOutQuart */\r\n EaseOutQuart,\r\n /** EaseInOutQuart */\r\n EaseInOutQuart,\r\n /** EaseInQuint */\r\n EaseInQuint,\r\n /** EaseOutQuint */\r\n EaseOutQuint,\r\n /** EaseInOutQuint */\r\n EaseInOutQuint,\r\n /** EaseInExpo */\r\n EaseInExpo,\r\n /** EaseOutExpo */\r\n EaseOutExpo,\r\n /** EaseInOutExpo */\r\n EaseInOutExpo,\r\n /** EaseInCirc */\r\n EaseInCirc,\r\n /** EaseOutCirc */\r\n EaseOutCirc,\r\n /** EaseInOutCirc */\r\n EaseInOutCirc,\r\n /** EaseInBack */\r\n EaseInBack,\r\n /** EaseOutBack */\r\n EaseOutBack,\r\n /** EaseInOutBack */\r\n EaseInOutBack,\r\n /** EaseInElastic */\r\n EaseInElastic,\r\n /** EaseOutElastic */\r\n EaseOutElastic,\r\n /** EaseInOutElastic */\r\n EaseInOutElastic,\r\n}\r\n\r\n/**\r\n * Block used to apply an easing function to floats\r\n */\r\nexport class GeometryEaseBlock extends NodeGeometryBlock {\r\n private _easingFunction: EasingFunction = new SineEase();\r\n private _type = GeometryEaseBlockTypes.EaseInOutSine;\r\n /**\r\n * Gets or sets the type of the easing functions applied by the block\r\n */\r\n @editableInPropertyPage(\"Type\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"EaseInSine\", value: GeometryEaseBlockTypes.EaseInSine },\r\n { label: \"EaseOutSine\", value: GeometryEaseBlockTypes.EaseOutSine },\r\n { label: \"EaseInOutSine\", value: GeometryEaseBlockTypes.EaseInOutSine },\r\n { label: \"EaseInQuad\", value: GeometryEaseBlockTypes.EaseInQuad },\r\n { label: \"EaseOutQuad\", value: GeometryEaseBlockTypes.EaseOutQuad },\r\n { label: \"EaseInOutQuad\", value: GeometryEaseBlockTypes.EaseInOutQuad },\r\n { label: \"EaseInCubic\", value: GeometryEaseBlockTypes.EaseInCubic },\r\n { label: \"EaseOutCubic\", value: GeometryEaseBlockTypes.EaseOutCubic },\r\n { label: \"EaseInOutCubic\", value: GeometryEaseBlockTypes.EaseInOutCubic },\r\n { label: \"EaseInQuart\", value: GeometryEaseBlockTypes.EaseInQuart },\r\n { label: \"EaseOutQuart\", value: GeometryEaseBlockTypes.EaseOutQuart },\r\n { label: \"EaseInOutQuart\", value: GeometryEaseBlockTypes.EaseInOutQuart },\r\n { label: \"EaseInQuint\", value: GeometryEaseBlockTypes.EaseInQuint },\r\n { label: \"EaseOutQuint\", value: GeometryEaseBlockTypes.EaseOutQuint },\r\n { label: \"EaseInOutQuint\", value: GeometryEaseBlockTypes.EaseInOutQuint },\r\n { label: \"EaseInExpo\", value: GeometryEaseBlockTypes.EaseInExpo },\r\n { label: \"EaseOutExpo\", value: GeometryEaseBlockTypes.EaseOutExpo },\r\n { label: \"EaseInOutExpo\", value: GeometryEaseBlockTypes.EaseInOutExpo },\r\n { label: \"EaseInCirc\", value: GeometryEaseBlockTypes.EaseInCirc },\r\n { label: \"EaseOutCirc\", value: GeometryEaseBlockTypes.EaseOutCirc },\r\n { label: \"EaseInOutCirc\", value: GeometryEaseBlockTypes.EaseInOutCirc },\r\n { label: \"EaseInBack\", value: GeometryEaseBlockTypes.EaseInBack },\r\n { label: \"EaseOutBack\", value: GeometryEaseBlockTypes.EaseOutBack },\r\n { label: \"EaseInOutBack\", value: GeometryEaseBlockTypes.EaseInOutBack },\r\n { label: \"EaseInElastic\", value: GeometryEaseBlockTypes.EaseInElastic },\r\n { label: \"EaseOutElastic\", value: GeometryEaseBlockTypes.EaseOutElastic },\r\n { label: \"EaseInOutElastic\", value: GeometryEaseBlockTypes.EaseInOutElastic },\r\n ],\r\n })\r\n public get type() {\r\n return this._type;\r\n }\r\n\r\n public set type(value: GeometryEaseBlockTypes) {\r\n if (this._type === value) {\r\n return;\r\n }\r\n this._type = value;\r\n\r\n switch (this._type) {\r\n case GeometryEaseBlockTypes.EaseInSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new GeometryEaseBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryEaseBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (!this._easingFunction) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return this._easingFunction.ease(source);\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector2(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector3(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y), this._easingFunction.ease(source.z));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector4(\r\n this._easingFunction.ease(source.x),\r\n this._easingFunction.ease(source.y),\r\n this._easingFunction.ease(source.z),\r\n this._easingFunction.ease(source.w)\r\n );\r\n };\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.type = serializationObject.type;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryEaseBlockTypes.${GeometryEaseBlockTypes[this.type]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryEaseBlock\", GeometryEaseBlock);\r\n"]}
1
+ {"version":3,"file":"geometryEaseBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryEaseBlock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,EAA0B,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEnG,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,sCAA+B;AAE1J;;GAEG;AACH,MAAM,CAAN,IAAY,sBAuDX;AAvDD,WAAY,sBAAsB;IAC9B,iBAAiB;IACjB,+EAAU,CAAA;IACV,kBAAkB;IAClB,iFAAW,CAAA;IACX,oBAAoB;IACpB,qFAAa,CAAA;IACb,iBAAiB;IACjB,+EAAU,CAAA;IACV,kBAAkB;IAClB,iFAAW,CAAA;IACX,oBAAoB;IACpB,qFAAa,CAAA;IACb,kBAAkB;IAClB,iFAAW,CAAA;IACX,mBA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aAAa,EAAE,KAAK,EAAE,sBAAsB,CAAC,WAAW,EAAE;YACnE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,sBAAsB,CAAC,UAAU,EAAE;YACjE,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,sBAAsB,CAAC,WAAW,EAAE;YACnE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,sBAAsB,CAAC,aAAa,EAAE;YACvE,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,sBAAsB,CAAC,cAAc,EAAE;YACzE,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,sBAAsB,CAAC,gBAAgB,EAAE;SAChF;KACJ,CAAC;6CAGD;AAqOL,aAAa,CAAC,2BAA2B,EAAE,iBAAiB,CAAC,CAAC","sourcesContent":["import { RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport { PropertyTypeForEdition, editableInPropertyPage } from \"../../../Decorators/nodeDecorator\";\r\nimport type { EasingFunction } from \"core/Animations/easing\";\r\nimport { BackEase, CircleEase, CubicEase, ElasticEase, ExponentialEase, QuadraticEase, QuarticEase, QuinticEase, SineEase } from \"core/Animations/easing\";\r\n\r\n/**\r\n * Types of easing function supported by the Ease block\r\n */\r\nexport enum GeometryEaseBlockTypes {\r\n /** EaseInSine */\r\n EaseInSine,\r\n /** EaseOutSine */\r\n EaseOutSine,\r\n /** EaseInOutSine */\r\n EaseInOutSine,\r\n /** EaseInQuad */\r\n EaseInQuad,\r\n /** EaseOutQuad */\r\n EaseOutQuad,\r\n /** EaseInOutQuad */\r\n EaseInOutQuad,\r\n /** EaseInCubic */\r\n EaseInCubic,\r\n /** EaseOutCubic */\r\n EaseOutCubic,\r\n /** EaseInOutCubic */\r\n EaseInOutCubic,\r\n /** EaseInQuart */\r\n EaseInQuart,\r\n /** EaseOutQuart */\r\n EaseOutQuart,\r\n /** EaseInOutQuart */\r\n EaseInOutQuart,\r\n /** EaseInQuint */\r\n EaseInQuint,\r\n /** EaseOutQuint */\r\n EaseOutQuint,\r\n /** EaseInOutQuint */\r\n EaseInOutQuint,\r\n /** EaseInExpo */\r\n EaseInExpo,\r\n /** EaseOutExpo */\r\n EaseOutExpo,\r\n /** EaseInOutExpo */\r\n EaseInOutExpo,\r\n /** EaseInCirc */\r\n EaseInCirc,\r\n /** EaseOutCirc */\r\n EaseOutCirc,\r\n /** EaseInOutCirc */\r\n EaseInOutCirc,\r\n /** EaseInBack */\r\n EaseInBack,\r\n /** EaseOutBack */\r\n EaseOutBack,\r\n /** EaseInOutBack */\r\n EaseInOutBack,\r\n /** EaseInElastic */\r\n EaseInElastic,\r\n /** EaseOutElastic */\r\n EaseOutElastic,\r\n /** EaseInOutElastic */\r\n EaseInOutElastic,\r\n}\r\n\r\n/**\r\n * Block used to apply an easing function to floats\r\n */\r\nexport class GeometryEaseBlock extends NodeGeometryBlock {\r\n private _easingFunction: EasingFunction = new SineEase();\r\n private _type = GeometryEaseBlockTypes.EaseInOutSine;\r\n /**\r\n * Gets or sets the type of the easing functions applied by the block\r\n */\r\n @editableInPropertyPage(\"Type\", PropertyTypeForEdition.List, \"ADVANCED\", {\r\n notifiers: { rebuild: true },\r\n embedded: true,\r\n options: [\r\n { label: \"EaseInSine\", value: GeometryEaseBlockTypes.EaseInSine },\r\n { label: \"EaseOutSine\", value: GeometryEaseBlockTypes.EaseOutSine },\r\n { label: \"EaseInOutSine\", value: GeometryEaseBlockTypes.EaseInOutSine },\r\n { label: \"EaseInQuad\", value: GeometryEaseBlockTypes.EaseInQuad },\r\n { label: \"EaseOutQuad\", value: GeometryEaseBlockTypes.EaseOutQuad },\r\n { label: \"EaseInOutQuad\", value: GeometryEaseBlockTypes.EaseInOutQuad },\r\n { label: \"EaseInCubic\", value: GeometryEaseBlockTypes.EaseInCubic },\r\n { label: \"EaseOutCubic\", value: GeometryEaseBlockTypes.EaseOutCubic },\r\n { label: \"EaseInOutCubic\", value: GeometryEaseBlockTypes.EaseInOutCubic },\r\n { label: \"EaseInQuart\", value: GeometryEaseBlockTypes.EaseInQuart },\r\n { label: \"EaseOutQuart\", value: GeometryEaseBlockTypes.EaseOutQuart },\r\n { label: \"EaseInOutQuart\", value: GeometryEaseBlockTypes.EaseInOutQuart },\r\n { label: \"EaseInQuint\", value: GeometryEaseBlockTypes.EaseInQuint },\r\n { label: \"EaseOutQuint\", value: GeometryEaseBlockTypes.EaseOutQuint },\r\n { label: \"EaseInOutQuint\", value: GeometryEaseBlockTypes.EaseInOutQuint },\r\n { label: \"EaseInExpo\", value: GeometryEaseBlockTypes.EaseInExpo },\r\n { label: \"EaseOutExpo\", value: GeometryEaseBlockTypes.EaseOutExpo },\r\n { label: \"EaseInOutExpo\", value: GeometryEaseBlockTypes.EaseInOutExpo },\r\n { label: \"EaseInCirc\", value: GeometryEaseBlockTypes.EaseInCirc },\r\n { label: \"EaseOutCirc\", value: GeometryEaseBlockTypes.EaseOutCirc },\r\n { label: \"EaseInOutCirc\", value: GeometryEaseBlockTypes.EaseInOutCirc },\r\n { label: \"EaseInBack\", value: GeometryEaseBlockTypes.EaseInBack },\r\n { label: \"EaseOutBack\", value: GeometryEaseBlockTypes.EaseOutBack },\r\n { label: \"EaseInOutBack\", value: GeometryEaseBlockTypes.EaseInOutBack },\r\n { label: \"EaseInElastic\", value: GeometryEaseBlockTypes.EaseInElastic },\r\n { label: \"EaseOutElastic\", value: GeometryEaseBlockTypes.EaseOutElastic },\r\n { label: \"EaseInOutElastic\", value: GeometryEaseBlockTypes.EaseInOutElastic },\r\n ],\r\n })\r\n public get type() {\r\n return this._type;\r\n }\r\n\r\n public set type(value: GeometryEaseBlockTypes) {\r\n if (this._type === value) {\r\n return;\r\n }\r\n this._type = value;\r\n\r\n switch (this._type) {\r\n case GeometryEaseBlockTypes.EaseInSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutSine:\r\n this._easingFunction = new SineEase();\r\n this._easingFunction.setEasingMode(SineEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuad:\r\n this._easingFunction = new QuadraticEase();\r\n this._easingFunction.setEasingMode(QuadraticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutCubic:\r\n this._easingFunction = new CubicEase();\r\n this._easingFunction.setEasingMode(CubicEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuart:\r\n this._easingFunction = new QuarticEase();\r\n this._easingFunction.setEasingMode(QuarticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutQuint:\r\n this._easingFunction = new QuinticEase();\r\n this._easingFunction.setEasingMode(QuinticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutExpo:\r\n this._easingFunction = new ExponentialEase();\r\n this._easingFunction.setEasingMode(ExponentialEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutCirc:\r\n this._easingFunction = new CircleEase();\r\n this._easingFunction.setEasingMode(CircleEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutBack:\r\n this._easingFunction = new BackEase();\r\n this._easingFunction.setEasingMode(BackEase.EASINGMODE_EASEINOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEIN);\r\n break;\r\n case GeometryEaseBlockTypes.EaseOutElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEOUT);\r\n break;\r\n case GeometryEaseBlockTypes.EaseInOutElastic:\r\n this._easingFunction = new ElasticEase();\r\n this._easingFunction.setEasingMode(ElasticEase.EASINGMODE_EASEINOUT);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new GeometryEaseBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name);\r\n\r\n this.registerInput(\"input\", NodeGeometryBlockConnectionPointTypes.AutoDetect);\r\n this.registerOutput(\"output\", NodeGeometryBlockConnectionPointTypes.BasedOnInput);\r\n\r\n this._outputs[0]._typeConnectionSource = this._inputs[0];\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Matrix);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Geometry);\r\n this._inputs[0].excludedConnectionPointTypes.push(NodeGeometryBlockConnectionPointTypes.Texture);\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryEaseBlock\";\r\n }\r\n\r\n /**\r\n * Gets the input component\r\n */\r\n public get input(): NodeGeometryConnectionPoint {\r\n return this._inputs[0];\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (!this._easingFunction) {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = null;\r\n return;\r\n }\r\n\r\n switch (this.input.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return this._easingFunction.ease(source);\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector2: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector2(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector3: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector3(this._easingFunction.ease(source.x), this._easingFunction.ease(source.y), this._easingFunction.ease(source.z));\r\n };\r\n break;\r\n }\r\n case NodeGeometryBlockConnectionPointTypes.Vector4: {\r\n this.output._storedFunction = (state) => {\r\n const source = this.input.getConnectedValue(state);\r\n return new Vector4(\r\n this._easingFunction.ease(source.x),\r\n this._easingFunction.ease(source.y),\r\n this._easingFunction.ease(source.z),\r\n this._easingFunction.ease(source.w)\r\n );\r\n };\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n /** @internal */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n\r\n return serializationObject;\r\n }\r\n\r\n /** @internal */\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this.type = serializationObject.type;\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const codeString = super._dumpPropertiesCode() + `${this._codeVariableName}.type = BABYLON.GeometryEaseBlockTypes.${GeometryEaseBlockTypes[this.type]};\\n`;\r\n return codeString;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryEaseBlock\", GeometryEaseBlock);\r\n"]}
@@ -69,8 +69,11 @@ export declare class GeometryInputBlock extends NodeGeometryBlock {
69
69
  */
70
70
  setDefaultValue(): void;
71
71
  protected _buildBlock(state: NodeGeometryBuildState): void;
72
+ /** @internal */
72
73
  dispose(): void;
73
74
  protected _dumpPropertiesCode(): string;
75
+ /** @internal */
74
76
  serialize(): any;
77
+ /** @internal */
75
78
  _deserialize(serializationObject: any): void;
76
79
  }
@@ -185,6 +185,7 @@ export class GeometryInputBlock extends NodeGeometryBlock {
185
185
  this.output._storedValue = this.value;
186
186
  }
187
187
  }
188
+ /** @internal */
188
189
  dispose() {
189
190
  this.onValueChangedObservable.clear();
190
191
  super.dispose();
@@ -220,6 +221,7 @@ export class GeometryInputBlock extends NodeGeometryBlock {
220
221
  codes.push("");
221
222
  return super._dumpPropertiesCode() + codes.join(";\n");
222
223
  }
224
+ /** @internal */
223
225
  serialize() {
224
226
  const serializationObject = super.serialize();
225
227
  serializationObject.type = this.type;
@@ -240,6 +242,7 @@ export class GeometryInputBlock extends NodeGeometryBlock {
240
242
  }
241
243
  return serializationObject;
242
244
  }
245
+ /** @internal */
243
246
  _deserialize(serializationObject) {
244
247
  super._deserialize(serializationObject);
245
248
  this._type = serializationObject.type;
@@ -1 +1 @@
1
- {"version":3,"file":"geometryInputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryInputBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UA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I,CAAC,mBAAmB,CAAC,SAAS,EAAE,CAAC;YACjC,OAAO;QACX,CAAC;QAED,IAAI,mBAAmB,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;YAC7C,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAAC;QAClD,CAAC;aAAM,CAAC;YACJ,MAAM,SAAS,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAE1D,IAAI,SAAS,EAAE,CAAC;gBACZ,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;YACvE,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { Observable } from \"../../../Misc/observable\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { GetClass, RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { Matrix, Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { NodeGeometryContextualSources } from \"../Enums/nodeGeometryContextualSources\";\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class GeometryInputBlock extends NodeGeometryBlock {\r\n private _storedValue: any;\r\n private _valueCallback: () => any;\r\n private _type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.Undefined;\r\n private _contextualSource = NodeGeometryContextualSources.None;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public min: number = 0;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public max: number = 0;\r\n\r\n /** Gets or sets the group to use to display this block in the Inspector */\r\n public groupInInspector = \"\";\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this input is displayed in the Inspector\r\n */\r\n public displayInInspector = true;\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<GeometryInputBlock>();\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeGeometryBlockConnectionPointTypes {\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n if (this.value != null) {\r\n if (!isNaN(this.value)) {\r\n this._type = NodeGeometryBlockConnectionPointTypes.Float;\r\n return this._type;\r\n }\r\n\r\n switch (this.value.getClassName()) {\r\n case \"Vector2\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"Vector3\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"Vector4\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"Matrix\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n }\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the current connection point is a contextual value\r\n */\r\n public get isContextual(): boolean {\r\n return this._contextualSource !== NodeGeometryContextualSources.None;\r\n }\r\n\r\n /**\r\n * Gets or sets the current contextual value\r\n */\r\n public get contextualValue(): NodeGeometryContextualSources {\r\n return this._contextualSource;\r\n }\r\n\r\n public set contextualValue(value: NodeGeometryContextualSources) {\r\n this._contextualSource = value;\r\n\r\n switch (value) {\r\n case NodeGeometryContextualSources.Positions:\r\n case NodeGeometryContextualSources.Normals:\r\n case NodeGeometryContextualSources.LatticeID:\r\n case NodeGeometryContextualSources.LatticeControl:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n break;\r\n case NodeGeometryContextualSources.Colors:\r\n case NodeGeometryContextualSources.Tangents:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n break;\r\n case NodeGeometryContextualSources.UV:\r\n case NodeGeometryContextualSources.UV2:\r\n case NodeGeometryContextualSources.UV3:\r\n case NodeGeometryContextualSources.UV4:\r\n case NodeGeometryContextualSources.UV5:\r\n case NodeGeometryContextualSources.UV6:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n break;\r\n case NodeGeometryContextualSources.VertexID:\r\n case NodeGeometryContextualSources.GeometryID:\r\n case NodeGeometryContextualSources.CollectionID:\r\n case NodeGeometryContextualSources.FaceID:\r\n case NodeGeometryContextualSources.LoopID:\r\n case NodeGeometryContextualSources.InstanceID:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Int;\r\n break;\r\n }\r\n\r\n if (this.output) {\r\n this.output.type = this._type;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new InputBlock\r\n * @param name defines the block name\r\n * @param type defines the type of the input (can be set to NodeGeometryBlockConnectionPointTypes.AutoDetect)\r\n */\r\n public constructor(name: string, type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n super(name);\r\n\r\n this._type = type;\r\n this._isInput = true;\r\n\r\n this.setDefaultValue();\r\n\r\n this.registerOutput(\"output\", type);\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n * Please note that this value will be ignored if valueCallback is defined\r\n */\r\n public get value(): any {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: any) {\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float) {\r\n if (this.min !== this.max) {\r\n value = Math.max(this.min, value);\r\n value = Math.min(this.max, value);\r\n }\r\n }\r\n\r\n this._storedValue = value;\r\n\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets or sets a callback used to get the value of that point.\r\n * Please note that setting this value will force the connection point to ignore the value property\r\n */\r\n public get valueCallback(): () => any {\r\n return this._valueCallback;\r\n }\r\n\r\n public set valueCallback(value: () => any) {\r\n this._valueCallback = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryInputBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n this.contextualValue = NodeGeometryContextualSources.None;\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n this.value = 0;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n this.value = Vector2.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n this.value = Vector3.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n this.value = Vector4.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Matrix:\r\n this.value = Matrix.Identity();\r\n break;\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isContextual) {\r\n this.output._storedValue = null;\r\n this.output._storedFunction = (state) => {\r\n return state.getContextualValue(this._contextualSource);\r\n };\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = this.value;\r\n }\r\n }\r\n\r\n public override dispose() {\r\n this.onValueChangedObservable.clear();\r\n\r\n super.dispose();\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const variableName = this._codeVariableName;\r\n\r\n if (this.isContextual) {\r\n return (\r\n super._dumpPropertiesCode() + `${variableName}.contextualValue = BABYLON.NodeGeometryContextualSources.${NodeGeometryContextualSources[this._contextualSource]};\\n`\r\n );\r\n }\r\n const codes: string[] = [];\r\n\r\n let valueString = \"\";\r\n\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n valueString = `${this.value}`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n valueString = `new BABYLON.Vector2(${this.value.x}, ${this.value.y})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n valueString = `new BABYLON.Vector3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n valueString = `new BABYLON.Vector4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n break;\r\n }\r\n\r\n // Common Property \"Value\"\r\n codes.push(`${variableName}.value = ${valueString}`);\r\n\r\n // Float-Value-Specific Properties\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float || this.type === NodeGeometryBlockConnectionPointTypes.Int) {\r\n codes.push(`${variableName}.min = ${this.min}`, `${variableName}.max = ${this.max}`);\r\n }\r\n\r\n codes.push(\"\");\r\n\r\n return super._dumpPropertiesCode() + codes.join(\";\\n\");\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n serializationObject.contextualValue = this.contextualValue;\r\n serializationObject.min = this.min;\r\n serializationObject.max = this.max;\r\n serializationObject.groupInInspector = this.groupInInspector;\r\n serializationObject.displayInInspector = this.displayInInspector;\r\n\r\n if (this._storedValue !== null && !this.isContextual) {\r\n if (this._storedValue.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this._storedValue.getClassName();\r\n serializationObject.value = this._storedValue.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this._storedValue;\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this._type = serializationObject.type;\r\n\r\n this.contextualValue = serializationObject.contextualValue;\r\n this.min = serializationObject.min || 0;\r\n this.max = serializationObject.max || 0;\r\n this.groupInInspector = serializationObject.groupInInspector || \"\";\r\n if (serializationObject.displayInInspector !== undefined) {\r\n this.displayInInspector = serializationObject.displayInInspector;\r\n }\r\n\r\n if (!serializationObject.valueType) {\r\n return;\r\n }\r\n\r\n if (serializationObject.valueType === \"number\") {\r\n this._storedValue = serializationObject.value;\r\n } else {\r\n const valueType = GetClass(serializationObject.valueType);\r\n\r\n if (valueType) {\r\n this._storedValue = valueType.FromArray(serializationObject.value);\r\n }\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryInputBlock\", GeometryInputBlock);\r\n"]}
1
+ {"version":3,"file":"geometryInputBlock.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Meshes/Node/Blocks/geometryInputBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,qCAAqC,EAAE,MAAM,2CAA2C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAEvF;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,iBAAiB;IAuBrD;;OAEG;IACH,IAAW,IAAI;QACX,IAAI,IAAI,CAAC,KAAK,KAAK,qCAAqC,CAAC,UAAU,EAAE,CAAC;YAClE,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE,CAAC;gBACrB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;oBACrB,IAAI,CAAC,KAAK,GAAG,qCAAqC,CAAC,KAAK,CAAC;oBACzD,OAAO,IAAI,CAAC,KAAK,CAAC;gBACtB,CAAC;gBAED,QAAQ,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,EAAE,CAAC;oBAChC,KAAK,SAAS;wBACV,IAAI,CAAC,KAAK,GAAG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mB,CAAC,IAAI,CAAC;QAEtC,IAAI,CAAC,eAAe,GAAG,mBAAmB,CAAC,eAAe,CAAC;QAC3D,IAAI,CAAC,GAAG,GAAG,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,GAAG,GAAG,mBAAmB,CAAC,GAAG,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,gBAAgB,IAAI,EAAE,CAAC;QACnE,IAAI,mBAAmB,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YACvD,IAAI,CAAC,kBAAkB,GAAG,mBAAmB,CAAC,kBAAkB,CAAC;QACrE,CAAC;QAED,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,CAAC;YACjC,OAAO;QACX,CAAC;QAED,IAAI,mBAAmB,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;YAC7C,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAAC;QAClD,CAAC;aAAM,CAAC;YACJ,MAAM,SAAS,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAE1D,IAAI,SAAS,EAAE,CAAC;gBACZ,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;YACvE,CAAC;QACL,CAAC;IACL,CAAC;CACJ;AAED,aAAa,CAAC,4BAA4B,EAAE,kBAAkB,CAAC,CAAC","sourcesContent":["import { Observable } from \"../../../Misc/observable\";\r\nimport { NodeGeometryBlockConnectionPointTypes } from \"../Enums/nodeGeometryConnectionPointTypes\";\r\nimport { NodeGeometryBlock } from \"../nodeGeometryBlock\";\r\nimport type { NodeGeometryConnectionPoint } from \"../nodeGeometryBlockConnectionPoint\";\r\nimport { GetClass, RegisterClass } from \"../../../Misc/typeStore\";\r\nimport { Matrix, Vector2, Vector3, Vector4 } from \"../../../Maths/math.vector\";\r\nimport type { NodeGeometryBuildState } from \"../nodeGeometryBuildState\";\r\nimport { NodeGeometryContextualSources } from \"../Enums/nodeGeometryContextualSources\";\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class GeometryInputBlock extends NodeGeometryBlock {\r\n private _storedValue: any;\r\n private _valueCallback: () => any;\r\n private _type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.Undefined;\r\n private _contextualSource = NodeGeometryContextualSources.None;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public min: number = 0;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public max: number = 0;\r\n\r\n /** Gets or sets the group to use to display this block in the Inspector */\r\n public groupInInspector = \"\";\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this input is displayed in the Inspector\r\n */\r\n public displayInInspector = true;\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<GeometryInputBlock>();\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeGeometryBlockConnectionPointTypes {\r\n if (this._type === NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n if (this.value != null) {\r\n if (!isNaN(this.value)) {\r\n this._type = NodeGeometryBlockConnectionPointTypes.Float;\r\n return this._type;\r\n }\r\n\r\n switch (this.value.getClassName()) {\r\n case \"Vector2\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"Vector3\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"Vector4\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"Matrix\":\r\n this._type = NodeGeometryBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n }\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the current connection point is a contextual value\r\n */\r\n public get isContextual(): boolean {\r\n return this._contextualSource !== NodeGeometryContextualSources.None;\r\n }\r\n\r\n /**\r\n * Gets or sets the current contextual value\r\n */\r\n public get contextualValue(): NodeGeometryContextualSources {\r\n return this._contextualSource;\r\n }\r\n\r\n public set contextualValue(value: NodeGeometryContextualSources) {\r\n this._contextualSource = value;\r\n\r\n switch (value) {\r\n case NodeGeometryContextualSources.Positions:\r\n case NodeGeometryContextualSources.Normals:\r\n case NodeGeometryContextualSources.LatticeID:\r\n case NodeGeometryContextualSources.LatticeControl:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector3;\r\n break;\r\n case NodeGeometryContextualSources.Colors:\r\n case NodeGeometryContextualSources.Tangents:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector4;\r\n break;\r\n case NodeGeometryContextualSources.UV:\r\n case NodeGeometryContextualSources.UV2:\r\n case NodeGeometryContextualSources.UV3:\r\n case NodeGeometryContextualSources.UV4:\r\n case NodeGeometryContextualSources.UV5:\r\n case NodeGeometryContextualSources.UV6:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Vector2;\r\n break;\r\n case NodeGeometryContextualSources.VertexID:\r\n case NodeGeometryContextualSources.GeometryID:\r\n case NodeGeometryContextualSources.CollectionID:\r\n case NodeGeometryContextualSources.FaceID:\r\n case NodeGeometryContextualSources.LoopID:\r\n case NodeGeometryContextualSources.InstanceID:\r\n this._type = NodeGeometryBlockConnectionPointTypes.Int;\r\n break;\r\n }\r\n\r\n if (this.output) {\r\n this.output.type = this._type;\r\n }\r\n }\r\n\r\n /**\r\n * Creates a new InputBlock\r\n * @param name defines the block name\r\n * @param type defines the type of the input (can be set to NodeGeometryBlockConnectionPointTypes.AutoDetect)\r\n */\r\n public constructor(name: string, type: NodeGeometryBlockConnectionPointTypes = NodeGeometryBlockConnectionPointTypes.AutoDetect) {\r\n super(name);\r\n\r\n this._type = type;\r\n this._isInput = true;\r\n\r\n this.setDefaultValue();\r\n\r\n this.registerOutput(\"output\", type);\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n * Please note that this value will be ignored if valueCallback is defined\r\n */\r\n public get value(): any {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: any) {\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float) {\r\n if (this.min !== this.max) {\r\n value = Math.max(this.min, value);\r\n value = Math.min(this.max, value);\r\n }\r\n }\r\n\r\n this._storedValue = value;\r\n\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets or sets a callback used to get the value of that point.\r\n * Please note that setting this value will force the connection point to ignore the value property\r\n */\r\n public get valueCallback(): () => any {\r\n return this._valueCallback;\r\n }\r\n\r\n public set valueCallback(value: () => any) {\r\n this._valueCallback = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"GeometryInputBlock\";\r\n }\r\n\r\n /**\r\n * Gets the geometry output component\r\n */\r\n public get output(): NodeGeometryConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n this.contextualValue = NodeGeometryContextualSources.None;\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n this.value = 0;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n this.value = Vector2.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n this.value = Vector3.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n this.value = Vector4.Zero();\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Matrix:\r\n this.value = Matrix.Identity();\r\n break;\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeGeometryBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isContextual) {\r\n this.output._storedValue = null;\r\n this.output._storedFunction = (state) => {\r\n return state.getContextualValue(this._contextualSource);\r\n };\r\n } else {\r\n this.output._storedFunction = null;\r\n this.output._storedValue = this.value;\r\n }\r\n }\r\n\r\n /** @internal */\r\n public override dispose() {\r\n this.onValueChangedObservable.clear();\r\n\r\n super.dispose();\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const variableName = this._codeVariableName;\r\n\r\n if (this.isContextual) {\r\n return (\r\n super._dumpPropertiesCode() + `${variableName}.contextualValue = BABYLON.NodeGeometryContextualSources.${NodeGeometryContextualSources[this._contextualSource]};\\n`\r\n );\r\n }\r\n const codes: string[] = [];\r\n\r\n let valueString = \"\";\r\n\r\n switch (this.type) {\r\n case NodeGeometryBlockConnectionPointTypes.Float:\r\n case NodeGeometryBlockConnectionPointTypes.Int:\r\n valueString = `${this.value}`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector2:\r\n valueString = `new BABYLON.Vector2(${this.value.x}, ${this.value.y})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector3:\r\n valueString = `new BABYLON.Vector3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n break;\r\n case NodeGeometryBlockConnectionPointTypes.Vector4:\r\n valueString = `new BABYLON.Vector4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n break;\r\n }\r\n\r\n // Common Property \"Value\"\r\n codes.push(`${variableName}.value = ${valueString}`);\r\n\r\n // Float-Value-Specific Properties\r\n if (this.type === NodeGeometryBlockConnectionPointTypes.Float || this.type === NodeGeometryBlockConnectionPointTypes.Int) {\r\n codes.push(`${variableName}.min = ${this.min}`, `${variableName}.max = ${this.max}`);\r\n }\r\n\r\n codes.push(\"\");\r\n\r\n return super._dumpPropertiesCode() + codes.join(\";\\n\");\r\n }\r\n\r\n /** @internal */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n serializationObject.contextualValue = this.contextualValue;\r\n serializationObject.min = this.min;\r\n serializationObject.max = this.max;\r\n serializationObject.groupInInspector = this.groupInInspector;\r\n serializationObject.displayInInspector = this.displayInInspector;\r\n\r\n if (this._storedValue !== null && !this.isContextual) {\r\n if (this._storedValue.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this._storedValue.getClassName();\r\n serializationObject.value = this._storedValue.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this._storedValue;\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n /** @internal */\r\n public override _deserialize(serializationObject: any) {\r\n super._deserialize(serializationObject);\r\n\r\n this._type = serializationObject.type;\r\n\r\n this.contextualValue = serializationObject.contextualValue;\r\n this.min = serializationObject.min || 0;\r\n this.max = serializationObject.max || 0;\r\n this.groupInInspector = serializationObject.groupInInspector || \"\";\r\n if (serializationObject.displayInInspector !== undefined) {\r\n this.displayInInspector = serializationObject.displayInInspector;\r\n }\r\n\r\n if (!serializationObject.valueType) {\r\n return;\r\n }\r\n\r\n if (serializationObject.valueType === \"number\") {\r\n this._storedValue = serializationObject.value;\r\n } else {\r\n const valueType = GetClass(serializationObject.valueType);\r\n\r\n if (valueType) {\r\n this._storedValue = valueType.FromArray(serializationObject.value);\r\n }\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.GeometryInputBlock\", GeometryInputBlock);\r\n"]}
@@ -64,5 +64,6 @@ export declare class GeometryOptimizeBlock extends NodeGeometryBlock implements
64
64
  * @returns the serialized block object
65
65
  */
66
66
  serialize(): any;
67
+ /** @internal */
67
68
  _deserialize(serializationObject: any): void;
68
69
  }
@@ -192,6 +192,7 @@ export class GeometryOptimizeBlock extends NodeGeometryBlock {
192
192
  serializationObject.optimizeFaces = this.optimizeFaces;
193
193
  return serializationObject;
194
194
  }
195
+ /** @internal */
195
196
  _deserialize(serializationObject) {
196
197
  super._deserialize(serializationObject);
197
198
  this.evaluateContext = serializationObject.evaluateContext;