laymur 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/{src/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.ts → dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts} +2 -3
  2. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +22 -0
  3. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +41 -0
  4. package/dist/core/constraints/UIConstraint.d.ts +12 -0
  5. package/dist/core/constraints/UIConstraint.js +11 -0
  6. package/dist/core/constraints/UICustomConstraint.d.ts +28 -0
  7. package/dist/core/constraints/UICustomConstraint.js +37 -0
  8. package/{src/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.ts → dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts} +2 -3
  9. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +20 -0
  10. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +34 -0
  11. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +11 -0
  12. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +3 -0
  13. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +36 -0
  14. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +100 -0
  15. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +14 -0
  16. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +4 -0
  17. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +44 -0
  18. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +136 -0
  19. package/{src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.ts → dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts} +2 -3
  20. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +22 -0
  21. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +40 -0
  22. package/{src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.ts → dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts} +8 -9
  23. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +43 -0
  24. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +71 -0
  25. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +11 -0
  26. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +3 -0
  27. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +32 -0
  28. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +100 -0
  29. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +14 -0
  30. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +4 -0
  31. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +44 -0
  32. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +136 -0
  33. package/{src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.ts → dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts} +2 -3
  34. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +22 -0
  35. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +40 -0
  36. package/{src/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.ts → dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts} +2 -3
  37. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +20 -0
  38. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +34 -0
  39. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +64 -0
  40. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +19 -0
  41. package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +46 -0
  42. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +138 -0
  43. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +13 -0
  44. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +3 -0
  45. package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +29 -0
  46. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +63 -0
  47. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +13 -0
  48. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +3 -0
  49. package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +29 -0
  50. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +63 -0
  51. package/dist/core/elements/UIAnchor/UIAnchor.Internal.d.ts +12 -0
  52. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +5 -0
  53. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +32 -0
  54. package/dist/core/elements/UIAnchor/UIAnchor.js +49 -0
  55. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +27 -0
  56. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +15 -0
  57. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +77 -0
  58. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +259 -0
  59. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +30 -0
  60. package/dist/core/elements/UIDummy/UIDummy.Internal.js +8 -0
  61. package/dist/core/elements/UIDummy/UIDummy.d.ts +82 -0
  62. package/dist/core/elements/UIDummy/UIDummy.js +173 -0
  63. package/{src/core/elements/UIElement/UIElement.Internal.ts → dist/core/elements/UIElement/UIElement.Internal.d.ts} +5 -7
  64. package/dist/core/elements/UIElement/UIElement.Internal.js +5 -0
  65. package/dist/core/elements/UIElement/UIElement.d.ts +38 -0
  66. package/dist/core/elements/UIElement/UIElement.js +74 -0
  67. package/{src/core/elements/UIGraphics/UIGraphics.Internal.ts → dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts} +5 -7
  68. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +7 -0
  69. package/dist/core/elements/UIGraphics/UIGraphics.d.ts +51 -0
  70. package/dist/core/elements/UIGraphics/UIGraphics.js +126 -0
  71. package/{src/core/elements/UIImage/UIImage.Internal.ts → dist/core/elements/UIImage/UIImage.Internal.d.ts} +2 -3
  72. package/dist/core/elements/UIImage/UIImage.d.ts +32 -0
  73. package/dist/core/elements/UIImage/UIImage.js +85 -0
  74. package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +23 -0
  75. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +12 -0
  76. package/dist/core/elements/UINineSlice/UINineSlice.d.ts +60 -0
  77. package/dist/core/elements/UINineSlice/UINineSlice.js +188 -0
  78. package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +14 -0
  79. package/dist/core/elements/UIProgress/UIProgress.Internal.js +3 -0
  80. package/dist/core/elements/UIProgress/UIProgress.d.ts +45 -0
  81. package/dist/core/elements/UIProgress/UIProgress.js +165 -0
  82. package/dist/core/elements/UIScene/UIScene.Internal.d.ts +43 -0
  83. package/dist/core/elements/UIScene/UIScene.Internal.js +27 -0
  84. package/dist/core/elements/UIScene/UIScene.d.ts +59 -0
  85. package/dist/core/elements/UIScene/UIScene.js +157 -0
  86. package/{src/core/elements/UIText/UIText.Interfaces.ts → dist/core/elements/UIText/UIText.Interfaces.d.ts} +16 -21
  87. package/dist/core/elements/UIText/UIText.Internal.d.ts +26 -0
  88. package/dist/core/elements/UIText/UIText.Internal.js +12 -0
  89. package/dist/core/elements/UIText/UIText.Measuring.d.ts +50 -0
  90. package/dist/core/elements/UIText/UIText.Measuring.js +153 -0
  91. package/dist/core/elements/UIText/UIText.Rendering.d.ts +20 -0
  92. package/dist/core/elements/UIText/UIText.Rendering.js +61 -0
  93. package/dist/core/elements/UIText/UIText.d.ts +71 -0
  94. package/dist/core/elements/UIText/UIText.js +265 -0
  95. package/{src/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.ts → dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts} +11 -14
  96. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +5 -0
  97. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +63 -0
  98. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +147 -0
  99. package/{src/core/layers/UILayer/UILayer.Internal.ts → dist/core/layers/UILayer/UILayer.Internal.d.ts} +11 -15
  100. package/dist/core/layers/UILayer/UILayer.Internal.js +7 -0
  101. package/dist/core/layers/UILayer/UILayer.d.ts +49 -0
  102. package/dist/core/layers/UILayer/UILayer.js +113 -0
  103. package/dist/core/miscellaneous/UIExpression.d.ts +69 -0
  104. package/dist/core/miscellaneous/UIExpression.js +128 -0
  105. package/dist/core/miscellaneous/UIMode.d.ts +23 -0
  106. package/dist/core/miscellaneous/UIMode.js +30 -0
  107. package/dist/core/miscellaneous/UIOrientation.d.ts +15 -0
  108. package/dist/core/miscellaneous/UIOrientation.js +20 -0
  109. package/dist/core/miscellaneous/UIPriority.d.ts +32 -0
  110. package/dist/core/miscellaneous/UIPriority.js +63 -0
  111. package/dist/core/miscellaneous/UIRelation.d.ts +23 -0
  112. package/dist/core/miscellaneous/UIRelation.js +40 -0
  113. package/dist/core/miscellaneous/UITransparencyMode.d.ts +9 -0
  114. package/dist/core/miscellaneous/UITransparencyMode.js +12 -0
  115. package/dist/core/miscellaneous/area/UIArea.d.ts +3 -0
  116. package/dist/core/miscellaneous/area/UIArea.js +5 -0
  117. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +15 -0
  118. package/dist/core/miscellaneous/area/UIAreaCircle.js +32 -0
  119. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +12 -0
  120. package/dist/core/miscellaneous/area/UIAreaPolygon.js +40 -0
  121. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +17 -0
  122. package/dist/core/miscellaneous/area/UIAreaRectangle.js +36 -0
  123. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +21 -0
  124. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +72 -0
  125. package/dist/core/miscellaneous/asserts.d.ts +43 -0
  126. package/dist/core/miscellaneous/asserts.js +163 -0
  127. package/dist/core/miscellaneous/canvas.d.ts +31 -0
  128. package/dist/core/miscellaneous/canvas.js +37 -0
  129. package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +7 -0
  130. package/dist/core/miscellaneous/color/UIColor.Internal.js +42 -0
  131. package/dist/core/miscellaneous/color/UIColor.d.ts +234 -0
  132. package/dist/core/miscellaneous/color/UIColor.js +636 -0
  133. package/dist/core/miscellaneous/computeTransform.d.ts +18 -0
  134. package/dist/core/miscellaneous/computeTransform.js +82 -0
  135. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +19 -0
  136. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +168 -0
  137. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +1 -0
  138. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +349 -0
  139. package/{src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.ts → dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts} +8 -10
  140. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +1 -0
  141. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +357 -0
  142. package/dist/core/miscellaneous/generic-plane/shared.d.ts +38 -0
  143. package/dist/core/miscellaneous/generic-plane/shared.js +228 -0
  144. package/dist/core/miscellaneous/insets/UIInsets.Internal.d.ts +11 -0
  145. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +3 -0
  146. package/dist/core/miscellaneous/insets/UIInsets.d.ts +48 -0
  147. package/dist/core/miscellaneous/insets/UIInsets.js +224 -0
  148. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +9 -0
  149. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +19 -0
  150. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +21 -0
  151. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +51 -0
  152. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +16 -0
  153. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +48 -0
  154. package/dist/core/miscellaneous/math.d.ts +7 -0
  155. package/dist/core/miscellaneous/math.js +11 -0
  156. package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +31 -0
  157. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +15 -0
  158. package/dist/core/miscellaneous/micro/UIMicro.d.ts +59 -0
  159. package/dist/core/miscellaneous/micro/UIMicro.js +181 -0
  160. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +3 -0
  161. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +9 -0
  162. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +22 -0
  163. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +50 -0
  164. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +22 -0
  165. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +52 -0
  166. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +22 -0
  167. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +52 -0
  168. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +22 -0
  169. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +50 -0
  170. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +22 -0
  171. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +52 -0
  172. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +22 -0
  173. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +52 -0
  174. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +5 -0
  175. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +13 -0
  176. package/dist/core/miscellaneous/shared.d.ts +46 -0
  177. package/dist/core/miscellaneous/shared.js +37 -0
  178. package/{src/core/miscellaneous/text-span/UITextSpan.Internal.ts → dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts} +4 -5
  179. package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +14 -0
  180. package/dist/core/miscellaneous/text-span/UITextSpan.js +36 -0
  181. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.d.ts +48 -0
  182. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +17 -0
  183. package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +85 -0
  184. package/dist/core/miscellaneous/text-style/UITextStyle.js +372 -0
  185. package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +49 -0
  186. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +6 -0
  187. package/dist/core/miscellaneous/texture/UITextureView.d.ts +67 -0
  188. package/dist/core/miscellaneous/texture/UITextureView.js +234 -0
  189. package/dist/core/miscellaneous/webglCapabilities.d.ts +2 -0
  190. package/dist/core/miscellaneous/webglCapabilities.js +103 -0
  191. package/dist/core/shaders/UIImage.glsl.js +3 -0
  192. package/dist/core/shaders/UINineSlice.glsl.js +3 -0
  193. package/dist/core/shaders/UIProgress.glsl.js +3 -0
  194. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +3 -0
  195. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +3 -0
  196. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +17 -0
  197. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +13 -0
  198. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +108 -0
  199. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +13 -0
  200. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +20 -0
  201. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +75 -0
  202. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +49 -0
  203. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +215 -0
  204. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +505 -0
  205. package/dist/index.js +51 -0
  206. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +21 -0
  207. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +47 -0
  208. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +14 -0
  209. package/dist/particles/behaviorModules/UIBehaviorModule.js +9 -0
  210. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +39 -0
  211. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +110 -0
  212. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +22 -0
  213. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +66 -0
  214. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +20 -0
  215. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +48 -0
  216. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +26 -0
  217. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +66 -0
  218. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +20 -0
  219. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +49 -0
  220. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +26 -0
  221. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +70 -0
  222. package/dist/particles/elements/UIEmitter.Internal.d.ts +15 -0
  223. package/dist/particles/elements/UIEmitter.Internal.js +11 -0
  224. package/dist/particles/elements/UIEmitter.d.ts +68 -0
  225. package/dist/particles/elements/UIEmitter.js +203 -0
  226. package/dist/particles/index.js +18 -0
  227. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +13 -0
  228. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +211 -0
  229. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +17 -0
  230. package/dist/particles/instancedParticle/UIInstancedParticle.js +93 -0
  231. package/dist/particles/miscellaneous/miscellaneous.d.ts +32 -0
  232. package/dist/particles/miscellaneous/miscellaneous.js +67 -0
  233. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +14 -0
  234. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +32 -0
  235. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +15 -0
  236. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +37 -0
  237. package/dist/particles/renderingModules/UIRenderingModule.d.ts +8 -0
  238. package/dist/particles/renderingModules/UIRenderingModule.js +9 -0
  239. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +14 -0
  240. package/dist/particles/renderingModules/UIRenderingTexture.js +26 -0
  241. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +3 -0
  242. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +3 -0
  243. package/dist/particles/shaders/UIRenderingTexture.glsl.js +3 -0
  244. package/dist/particles/spawnModules/UISpawnModule.d.ts +9 -0
  245. package/dist/particles/spawnModules/UISpawnModule.js +9 -0
  246. package/dist/particles/spawnModules/UISpawnOffset.d.ts +21 -0
  247. package/dist/particles/spawnModules/UISpawnOffset.js +46 -0
  248. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +20 -0
  249. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +47 -0
  250. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +20 -0
  251. package/dist/particles/spawnModules/UISpawnRandomRotation.js +45 -0
  252. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +26 -0
  253. package/dist/particles/spawnModules/UISpawnRandomScale.js +60 -0
  254. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +20 -0
  255. package/dist/particles/spawnModules/UISpawnRandomTorque.js +45 -0
  256. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +26 -0
  257. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +64 -0
  258. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +27 -0
  259. package/dist/particles/spawnModules/UISpawnRectangle.js +62 -0
  260. package/package.json +8 -1
  261. package/.claude/settings.local.json +0 -9
  262. package/.editorconfig +0 -14
  263. package/CLAUDE.md +0 -181
  264. package/assets/logotype.png +0 -0
  265. package/eslint.config.js +0 -111
  266. package/rollup.config.js +0 -52
  267. package/src/core/constraints/UIAspectConstraint/UIAspectConstraint.ts +0 -60
  268. package/src/core/constraints/UIConstraint.ts +0 -20
  269. package/src/core/constraints/UICustomConstraint.ts +0 -62
  270. package/src/core/constraints/UIHeightConstraint/UIHeightConstraint.ts +0 -52
  271. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.ts +0 -13
  272. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.ts +0 -139
  273. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.ts +0 -16
  274. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.ts +0 -189
  275. package/src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.ts +0 -68
  276. package/src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.ts +0 -94
  277. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.ts +0 -13
  278. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.ts +0 -135
  279. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.ts +0 -16
  280. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.ts +0 -189
  281. package/src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.ts +0 -68
  282. package/src/core/constraints/UIWidthConstraint/UIWidthConstraint.ts +0 -52
  283. package/src/core/constraints/builders/UIConstraint2DBuilder.Internal.ts +0 -84
  284. package/src/core/constraints/builders/UIConstraint2DBuilder.ts +0 -168
  285. package/src/core/constraints/builders/UICoverConstraintBuilder.Internal.ts +0 -15
  286. package/src/core/constraints/builders/UICoverConstraintBuilder.ts +0 -84
  287. package/src/core/constraints/builders/UIFitConstraintBuilder.Internal.ts +0 -15
  288. package/src/core/constraints/builders/UIFitConstraintBuilder.ts +0 -84
  289. package/src/core/elements/UIAnchor/UIAnchor.Internal.ts +0 -13
  290. package/src/core/elements/UIAnchor/UIAnchor.ts +0 -70
  291. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.ts +0 -30
  292. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.ts +0 -355
  293. package/src/core/elements/UIDummy/UIDummy.Internal.ts +0 -33
  294. package/src/core/elements/UIDummy/UIDummy.ts +0 -244
  295. package/src/core/elements/UIElement/UIElement.ts +0 -127
  296. package/src/core/elements/UIGraphics/UIGraphics.ts +0 -168
  297. package/src/core/elements/UIImage/UIImage.ts +0 -138
  298. package/src/core/elements/UINineSlice/UINineSlice.Internal.ts +0 -26
  299. package/src/core/elements/UINineSlice/UINineSlice.ts +0 -296
  300. package/src/core/elements/UIProgress/UIProgress.Internal.ts +0 -24
  301. package/src/core/elements/UIProgress/UIProgress.ts +0 -259
  302. package/src/core/elements/UIScene/UIScene.Internal.ts +0 -46
  303. package/src/core/elements/UIScene/UIScene.ts +0 -259
  304. package/src/core/elements/UIText/UIText.Internal.ts +0 -29
  305. package/src/core/elements/UIText/UIText.Measuring.ts +0 -183
  306. package/src/core/elements/UIText/UIText.Rendering.ts +0 -83
  307. package/src/core/elements/UIText/UIText.ts +0 -376
  308. package/src/core/layers/UIFullscreenLayer/UIFullscreenLayer.ts +0 -233
  309. package/src/core/layers/UILayer/UILayer.ts +0 -156
  310. package/src/core/miscellaneous/UIExpression.ts +0 -142
  311. package/src/core/miscellaneous/UIMode.ts +0 -29
  312. package/src/core/miscellaneous/UIOrientation.ts +0 -18
  313. package/src/core/miscellaneous/UIPriority.ts +0 -63
  314. package/src/core/miscellaneous/UIRelation.ts +0 -39
  315. package/src/core/miscellaneous/UITransparencyMode.ts +0 -9
  316. package/src/core/miscellaneous/area/UIArea.ts +0 -5
  317. package/src/core/miscellaneous/area/UIAreaCircle.ts +0 -32
  318. package/src/core/miscellaneous/area/UIAreaPolygon.ts +0 -50
  319. package/src/core/miscellaneous/area/UIAreaRectangle.ts +0 -38
  320. package/src/core/miscellaneous/area/UIAreaRoundedRectangle.ts +0 -78
  321. package/src/core/miscellaneous/asserts.ts +0 -187
  322. package/src/core/miscellaneous/canvas.ts +0 -73
  323. package/src/core/miscellaneous/color/UIColor.Internal.ts +0 -89
  324. package/src/core/miscellaneous/color/UIColor.ts +0 -844
  325. package/src/core/miscellaneous/computeTransform.ts +0 -127
  326. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.ts +0 -235
  327. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.ts +0 -524
  328. package/src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.ts +0 -448
  329. package/src/core/miscellaneous/generic-plane/shared.ts +0 -323
  330. package/src/core/miscellaneous/insets/UIInsets.Internal.ts +0 -9
  331. package/src/core/miscellaneous/insets/UIInsets.ts +0 -248
  332. package/src/core/miscellaneous/mask-function/UIProgressMaskFunction.ts +0 -24
  333. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.ts +0 -58
  334. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.ts +0 -52
  335. package/src/core/miscellaneous/math.ts +0 -16
  336. package/src/core/miscellaneous/micro/UIMicro.Internal.ts +0 -33
  337. package/src/core/miscellaneous/micro/UIMicro.ts +0 -222
  338. package/src/core/miscellaneous/resize-policy/UIResizePolicy.ts +0 -8
  339. package/src/core/miscellaneous/resize-policy/UIResizePolicyCover.ts +0 -57
  340. package/src/core/miscellaneous/resize-policy/UIResizePolicyCross.ts +0 -65
  341. package/src/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.ts +0 -65
  342. package/src/core/miscellaneous/resize-policy/UIResizePolicyFit.ts +0 -57
  343. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.ts +0 -65
  344. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.ts +0 -65
  345. package/src/core/miscellaneous/resize-policy/UIResizePolicyNone.ts +0 -11
  346. package/src/core/miscellaneous/shared.ts +0 -73
  347. package/src/core/miscellaneous/text-span/UITextSpan.ts +0 -43
  348. package/src/core/miscellaneous/text-style/UITextStyle.Internal.ts +0 -52
  349. package/src/core/miscellaneous/text-style/UITextStyle.ts +0 -479
  350. package/src/core/miscellaneous/texture/UITextureView.Internal.ts +0 -55
  351. package/src/core/miscellaneous/texture/UITextureView.ts +0 -308
  352. package/src/core/miscellaneous/webglCapabilities.ts +0 -129
  353. package/src/core/shaders/UIImage.glsl +0 -10
  354. package/src/core/shaders/UINineSlice.glsl +0 -53
  355. package/src/core/shaders/UIProgress.glsl +0 -15
  356. package/src/core/shaders/UIProgressMaskFunctionCircular.glsl +0 -13
  357. package/src/core/shaders/UIProgressMaskFunctionDirectional.glsl +0 -12
  358. package/src/core/shaders/glsl.d.ts +0 -27
  359. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.ts +0 -23
  360. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.ts +0 -124
  361. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.ts +0 -22
  362. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.ts +0 -101
  363. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.ts +0 -58
  364. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.ts +0 -605
  365. package/src/particles/behaviorModules/UIBehaviorDirectionalGravity.ts +0 -70
  366. package/src/particles/behaviorModules/UIBehaviorModule.ts +0 -20
  367. package/src/particles/behaviorModules/UIBehaviorPointGravity.ts +0 -173
  368. package/src/particles/behaviorModules/UIBehaviorScaleOverLife.ts +0 -104
  369. package/src/particles/behaviorModules/UIBehaviorTorqueDamping.ts +0 -75
  370. package/src/particles/behaviorModules/UIBehaviorTorqueNoise.ts +0 -115
  371. package/src/particles/behaviorModules/UIBehaviorVelocityDamping.ts +0 -77
  372. package/src/particles/behaviorModules/UIBehaviorVelocityNoise.ts +0 -118
  373. package/src/particles/elements/UIEmitter.Internal.ts +0 -22
  374. package/src/particles/elements/UIEmitter.ts +0 -313
  375. package/src/particles/instancedParticle/UIInstancedParticle.Internal.ts +0 -263
  376. package/src/particles/instancedParticle/UIInstancedParticle.ts +0 -138
  377. package/src/particles/miscellaneous/miscellaneous.ts +0 -115
  378. package/src/particles/renderingModules/UIRenderingColorOverLife.ts +0 -39
  379. package/src/particles/renderingModules/UIRenderingColorOverVelocity.ts +0 -49
  380. package/src/particles/renderingModules/UIRenderingModule.ts +0 -17
  381. package/src/particles/renderingModules/UIRenderingTexture.ts +0 -30
  382. package/src/particles/shaders/UIRenderingColorOverLife.glsl +0 -4
  383. package/src/particles/shaders/UIRenderingColorOverVelocity.glsl +0 -6
  384. package/src/particles/shaders/UIRenderingTexture.glsl +0 -4
  385. package/src/particles/spawnModules/UISpawnModule.ts +0 -22
  386. package/src/particles/spawnModules/UISpawnOffset.ts +0 -62
  387. package/src/particles/spawnModules/UISpawnRandomLifetime.ts +0 -68
  388. package/src/particles/spawnModules/UISpawnRandomRotation.ts +0 -60
  389. package/src/particles/spawnModules/UISpawnRandomScale.ts +0 -81
  390. package/src/particles/spawnModules/UISpawnRandomTorque.ts +0 -62
  391. package/src/particles/spawnModules/UISpawnRandomVelocity.ts +0 -92
  392. package/src/particles/spawnModules/UISpawnRectangle.ts +0 -81
  393. package/tsconfig.json +0 -29
  394. /package/{src/core/index.ts → dist/core/index.d.ts} +0 -0
  395. /package/{src/particles/index.ts → dist/particles/index.d.ts} +0 -0
@@ -0,0 +1,67 @@
1
+ import { Texture, DataTexture, RGBAFormat, UnsignedByteType, UVMapping, ClampToEdgeWrapping, LinearFilter, SRGBColorSpace } from 'three';
2
+
3
+ function resolveUIRangeConfig(config) {
4
+ if (typeof config === "number") {
5
+ return { min: config, max: config };
6
+ }
7
+ if (Array.isArray(config)) {
8
+ return { min: config[0], max: config[1] };
9
+ }
10
+ return config;
11
+ }
12
+ function resolveUIVector2Config(config) {
13
+ if (typeof config === "number") {
14
+ return { x: config, y: config };
15
+ }
16
+ if (Array.isArray(config)) {
17
+ return { x: config[0], y: config[1] };
18
+ }
19
+ return config;
20
+ }
21
+ function resolveAspect(config) {
22
+ if (typeof config === "number") {
23
+ return config;
24
+ }
25
+ if (config instanceof Texture) {
26
+ return config.image.naturalWidth / config.image.naturalHeight;
27
+ }
28
+ return config.sourceSize.w / config.sourceSize.h;
29
+ }
30
+ function generateNoise2D(x, y) {
31
+ const noise = Math.sin(x * 12.9898 + y * 78.233) * 43758.5453123;
32
+ return (noise - Math.floor(noise)) * 2 - 1;
33
+ }
34
+ function buildGradientTexture(colors) {
35
+ const width = colors.length;
36
+ const height = 1;
37
+ const data = new Uint8Array(width * height * 4);
38
+ for (let i = 0; i < width; i++) {
39
+ const color = colors[i];
40
+ const index = i * 4;
41
+ data[index] = Math.round(color.r * 255);
42
+ data[index + 1] = Math.round(color.g * 255);
43
+ data[index + 2] = Math.round(color.b * 255);
44
+ data[index + 3] = Math.round(color.a * 255);
45
+ }
46
+ const texture = new DataTexture(data, width, height, RGBAFormat, UnsignedByteType, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, LinearFilter, 1, SRGBColorSpace);
47
+ texture.needsUpdate = true;
48
+ return texture;
49
+ }
50
+ const BUILTIN_OFFSET_POSITION_X = 0;
51
+ const BUILTIN_OFFSET_POSITION_Y = 1;
52
+ const BUILTIN_OFFSET_VELOCITY_X = 2;
53
+ const BUILTIN_OFFSET_VELOCITY_Y = 3;
54
+ const BUILTIN_OFFSET_SCALE_X = 4;
55
+ const BUILTIN_OFFSET_SCALE_Y = 5;
56
+ const BUILTIN_OFFSET_ROTATION = 6;
57
+ const BUILTIN_OFFSET_TORQUE = 7;
58
+ const BUILTIN_OFFSET_LIFETIME = 8;
59
+ const BUILTIN_OFFSET_AGE = 9;
60
+ const BUILTIN_OFFSET_RANDOM_A = 10;
61
+ const BUILTIN_OFFSET_RANDOM_B = 11;
62
+ const BUILTIN_OFFSET_RANDOM_C = 12;
63
+ const BUILTIN_OFFSET_RANDOM_D = 13;
64
+ const BUILTIN_OFFSET_RANDOM_E = 14;
65
+ const BUILTIN_OFFSET_RANDOM_F = 15;
66
+
67
+ export { BUILTIN_OFFSET_AGE, BUILTIN_OFFSET_LIFETIME, BUILTIN_OFFSET_POSITION_X, BUILTIN_OFFSET_POSITION_Y, BUILTIN_OFFSET_RANDOM_A, BUILTIN_OFFSET_RANDOM_B, BUILTIN_OFFSET_RANDOM_C, BUILTIN_OFFSET_RANDOM_D, BUILTIN_OFFSET_RANDOM_E, BUILTIN_OFFSET_RANDOM_F, BUILTIN_OFFSET_ROTATION, BUILTIN_OFFSET_SCALE_X, BUILTIN_OFFSET_SCALE_Y, BUILTIN_OFFSET_TORQUE, BUILTIN_OFFSET_VELOCITY_X, BUILTIN_OFFSET_VELOCITY_Y, buildGradientTexture, generateNoise2D, resolveAspect, resolveUIRangeConfig, resolveUIVector2Config };
@@ -0,0 +1,14 @@
1
+ import type { UIColor } from "../../core";
2
+ import { UIRenderingModule } from "./UIRenderingModule";
3
+ /**
4
+ * Colors particles based on lifetime progression.
5
+ *
6
+ * Interpolates through color gradient as particles age from birth to death.
7
+ */
8
+ export declare class UIRenderingColorOverLife extends UIRenderingModule {
9
+ /**
10
+ * @param colors - Color gradient stops from birth to death
11
+ */
12
+ constructor(colors: UIColor[]);
13
+ destroy(): void;
14
+ }
@@ -0,0 +1,32 @@
1
+ import { buildGradientTexture } from '../miscellaneous/miscellaneous.js';
2
+ import source from '../shaders/UIRenderingColorOverLife.glsl.js';
3
+ import { UIRenderingModule } from './UIRenderingModule.js';
4
+
5
+ /**
6
+ * Colors particles based on lifetime progression.
7
+ *
8
+ * Interpolates through color gradient as particles age from birth to death.
9
+ */
10
+ class UIRenderingColorOverLife extends UIRenderingModule {
11
+ /**
12
+ * @param colors - Color gradient stops from birth to death
13
+ */
14
+ constructor(colors) {
15
+ super();
16
+ /** @internal */
17
+ this.requiredProperties = {
18
+ builtin: "Matrix4",
19
+ };
20
+ /** @internal */
21
+ this.source = source;
22
+ if (colors.length === 0) {
23
+ throw new Error("UIRenderingColorOverLife: colors array cannot be empty");
24
+ }
25
+ this.requiredUniforms = { colorOverLifeTexture: buildGradientTexture(colors) };
26
+ }
27
+ destroy() {
28
+ this.requiredUniforms.colorOverLifeTexture.dispose();
29
+ }
30
+ }
31
+
32
+ export { UIRenderingColorOverLife };
@@ -0,0 +1,15 @@
1
+ import type { UIColor } from "../../core";
2
+ import { UIRenderingModule } from "./UIRenderingModule";
3
+ /**
4
+ * Colors particles based on velocity magnitude.
5
+ *
6
+ * Maps velocity from 0 to maxVelocity across the color gradient.
7
+ */
8
+ export declare class UIRenderingColorOverVelocity extends UIRenderingModule {
9
+ /**
10
+ * @param colors - Color gradient from slow to fast
11
+ * @param maxVelocity - Velocity mapped to final color
12
+ */
13
+ constructor(colors: UIColor[], maxVelocity: number);
14
+ destroy(): void;
15
+ }
@@ -0,0 +1,37 @@
1
+ import { buildGradientTexture } from '../miscellaneous/miscellaneous.js';
2
+ import source from '../shaders/UIRenderingColorOverVelocity.glsl.js';
3
+ import { UIRenderingModule } from './UIRenderingModule.js';
4
+
5
+ /**
6
+ * Colors particles based on velocity magnitude.
7
+ *
8
+ * Maps velocity from 0 to maxVelocity across the color gradient.
9
+ */
10
+ class UIRenderingColorOverVelocity extends UIRenderingModule {
11
+ /**
12
+ * @param colors - Color gradient from slow to fast
13
+ * @param maxVelocity - Velocity mapped to final color
14
+ */
15
+ constructor(colors, maxVelocity) {
16
+ super();
17
+ /** @internal */
18
+ this.requiredProperties = {
19
+ builtin: "Matrix4",
20
+ };
21
+ /** @internal */
22
+ this.source = source;
23
+ if (colors.length === 0) {
24
+ throw new Error("UIRenderingColorOverVelocity: colors array cannot be empty");
25
+ }
26
+ if (maxVelocity <= 0) {
27
+ throw new Error("UIRenderingColorOverVelocity: maxVelocity must be greater than 0");
28
+ }
29
+ this.source = source.replace("COLOR_OVER_VELOCITY_MAX", `COLOR_OVER_VELOCITY_MAX ${maxVelocity.toFixed(2)}`);
30
+ this.requiredUniforms = { colorOverVelocityTexture: buildGradientTexture(colors) };
31
+ }
32
+ destroy() {
33
+ this.requiredUniforms.colorOverVelocityTexture.dispose();
34
+ }
35
+ }
36
+
37
+ export { UIRenderingColorOverVelocity };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Base class for particle rendering modules.
3
+ *
4
+ * Rendering modules provide fragment shader code and uniforms for particle appearance.
5
+ */
6
+ export declare abstract class UIRenderingModule {
7
+ destroy?(): void;
8
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Base class for particle rendering modules.
3
+ *
4
+ * Rendering modules provide fragment shader code and uniforms for particle appearance.
5
+ */
6
+ class UIRenderingModule {
7
+ }
8
+
9
+ export { UIRenderingModule };
@@ -0,0 +1,14 @@
1
+ import type { UITextureConfig } from "../../core/miscellaneous/texture/UITextureView.Internal";
2
+ import { UIRenderingModule } from "./UIRenderingModule";
3
+ /**
4
+ * Renders particles with a texture.
5
+ *
6
+ * Samples the texture using particle UV coordinates.
7
+ */
8
+ export declare class UITextureRenderingModule extends UIRenderingModule {
9
+ private readonly texture;
10
+ /**
11
+ * @param config - Texture configuration
12
+ */
13
+ constructor(config: UITextureConfig);
14
+ }
@@ -0,0 +1,26 @@
1
+ import { UITextureView } from '../../core/miscellaneous/texture/UITextureView.js';
2
+ import source from '../shaders/UIRenderingTexture.glsl.js';
3
+ import { UIRenderingModule } from './UIRenderingModule.js';
4
+
5
+ /**
6
+ * Renders particles with a texture.
7
+ *
8
+ * Samples the texture using particle UV coordinates.
9
+ */
10
+ class UITextureRenderingModule extends UIRenderingModule {
11
+ /**
12
+ * @param config - Texture configuration
13
+ */
14
+ constructor(config) {
15
+ super();
16
+ /** @internal */
17
+ this.source = source;
18
+ this._private_texture = new UITextureView(config);
19
+ this.requiredUniforms = {
20
+ texture: this._private_texture.texture,
21
+ textureTransform: this._private_texture.calculateUVTransform(),
22
+ };
23
+ }
24
+ }
25
+
26
+ export { UITextureRenderingModule };
@@ -0,0 +1,3 @@
1
+ var source = "vec4 draw(){float t=clamp(PARTICLE_AGE/PARTICLE_LIFETIME,0.0,1.0);return srgbTexture2D(p_colorOverLifeTexture,vec2(t,0.5));}";
2
+
3
+ export { source as default };
@@ -0,0 +1,3 @@
1
+ var source = "#define COLOR_OVER_VELOCITY_MAX vec4 draw(){float t=clamp(length(vec2(PARTICLE_VELOCITY_X,PARTICLE_VELOCITY_Y))/COLOR_OVER_VELOCITY_MAX,0.0,1.0);return srgbTexture2D(p_colorOverVelocityTexture,vec2(t,0.5));}";
2
+
3
+ export { source as default };
@@ -0,0 +1,3 @@
1
+ var source = "vec4 draw(){vec2 transformedUV=(p_textureTransform*vec3(p_uv,1.0)).xy;return srgbTexture2D(p_texture,transformedUV);}";
2
+
3
+ export { source as default };
@@ -0,0 +1,9 @@
1
+ import type { UIPropertyName } from "../../core/miscellaneous/generic-plane/shared";
2
+ /**
3
+ * Base class for particle spawn modules.
4
+ *
5
+ * Spawn modules initialize particle properties when particles are created.
6
+ */
7
+ export declare abstract class UISpawnModule<T extends Record<string, UIPropertyName> = Record<string, UIPropertyName>> {
8
+ destroy?(): void;
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Base class for particle spawn modules.
3
+ *
4
+ * Spawn modules initialize particle properties when particles are created.
5
+ */
6
+ class UISpawnModule {
7
+ }
8
+
9
+ export { UISpawnModule };
@@ -0,0 +1,21 @@
1
+ import type { Vector2Like } from "../../core/miscellaneous/math";
2
+ import { type UIVector2Config } from "../miscellaneous/miscellaneous";
3
+ import { UISpawnModule } from "./UISpawnModule";
4
+ /**
5
+ * Sets particle spawn position offset.
6
+ *
7
+ * All particles spawned with this module start at the specified position.
8
+ */
9
+ export declare class UISpawnOffset extends UISpawnModule<{
10
+ builtin: "Matrix4";
11
+ }> {
12
+ private offsetInternal;
13
+ /**
14
+ * @param offset - Initial particle position offset
15
+ */
16
+ constructor(offset?: UIVector2Config);
17
+ /** Particle position offset */
18
+ get offset(): Vector2Like;
19
+ /** Particle position offset */
20
+ set offset(value: UIVector2Config);
21
+ }
@@ -0,0 +1,46 @@
1
+ import { assertValidNumber } from '../../core/miscellaneous/asserts.js';
2
+ import { resolveUIVector2Config, BUILTIN_OFFSET_POSITION_X, BUILTIN_OFFSET_POSITION_Y } from '../miscellaneous/miscellaneous.js';
3
+ import { UISpawnModule } from './UISpawnModule.js';
4
+
5
+ /**
6
+ * Sets particle spawn position offset.
7
+ *
8
+ * All particles spawned with this module start at the specified position.
9
+ */
10
+ class UISpawnOffset extends UISpawnModule {
11
+ /**
12
+ * @param offset - Initial particle position offset
13
+ */
14
+ constructor(offset = { x: 0, y: 0 }) {
15
+ super();
16
+ /** @internal */
17
+ this.requiredProperties = { builtin: "Matrix4" };
18
+ this._private_offsetInternal = resolveUIVector2Config(offset);
19
+ assertValidNumber(this._private_offsetInternal.x, "UISpawnOffset.constructor.offset.x");
20
+ assertValidNumber(this._private_offsetInternal.y, "UISpawnOffset.constructor.offset.y");
21
+ }
22
+ /** Particle position offset */
23
+ get offset() {
24
+ return this._private_offsetInternal;
25
+ }
26
+ /** Particle position offset */
27
+ set offset(value) {
28
+ this._private_offsetInternal = resolveUIVector2Config(value);
29
+ assertValidNumber(this._private_offsetInternal.x, "UISpawnOffset.offset.x");
30
+ assertValidNumber(this._private_offsetInternal.y, "UISpawnOffset.offset.y");
31
+ }
32
+ /** @internal */
33
+ spawn(properties, instanceBegin, instanceEnd) {
34
+ const { builtin } = properties;
35
+ const { array, itemSize } = builtin;
36
+ const { x: offsetX, y: offsetY } = this._private_offsetInternal;
37
+ for (let i = instanceBegin; i < instanceEnd; i++) {
38
+ const itemOffset = i * itemSize;
39
+ array[itemOffset + BUILTIN_OFFSET_POSITION_X] = offsetX;
40
+ array[itemOffset + BUILTIN_OFFSET_POSITION_Y] = offsetY;
41
+ }
42
+ builtin.needsUpdate = true;
43
+ }
44
+ }
45
+
46
+ export { UISpawnOffset };
@@ -0,0 +1,20 @@
1
+ import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous";
2
+ import { UISpawnModule } from "./UISpawnModule";
3
+ /**
4
+ * Assigns random lifetime to particles.
5
+ *
6
+ * Lifetime is chosen uniformly from the specified range. Age is set to 0.
7
+ */
8
+ export declare class UISpawnRandomLifetime extends UISpawnModule<{
9
+ builtin: "Matrix4";
10
+ }> {
11
+ private lifetimeInternal;
12
+ /**
13
+ * @param lifetime - Lifetime range in seconds. Accepts number, tuple, or range object
14
+ */
15
+ constructor(lifetime?: UIRangeConfig);
16
+ /** Lifetime range in seconds */
17
+ get lifetime(): UIRange;
18
+ /** Lifetime range in seconds */
19
+ set lifetime(value: UIRangeConfig);
20
+ }
@@ -0,0 +1,47 @@
1
+ import { MathUtils } from 'three';
2
+ import { assertValidPositiveNumber } from '../../core/miscellaneous/asserts.js';
3
+ import { resolveUIRangeConfig, BUILTIN_OFFSET_LIFETIME, BUILTIN_OFFSET_AGE } from '../miscellaneous/miscellaneous.js';
4
+ import { UISpawnModule } from './UISpawnModule.js';
5
+
6
+ /**
7
+ * Assigns random lifetime to particles.
8
+ *
9
+ * Lifetime is chosen uniformly from the specified range. Age is set to 0.
10
+ */
11
+ class UISpawnRandomLifetime extends UISpawnModule {
12
+ /**
13
+ * @param lifetime - Lifetime range in seconds. Accepts number, tuple, or range object
14
+ */
15
+ constructor(lifetime = { min: 4, max: 8 }) {
16
+ super();
17
+ /** @internal */
18
+ this.requiredProperties = { builtin: "Matrix4" };
19
+ this._private_lifetimeInternal = resolveUIRangeConfig(lifetime);
20
+ assertValidPositiveNumber(this._private_lifetimeInternal.min, "UISpawnRandomLifetime.constructor.lifetime.min");
21
+ assertValidPositiveNumber(this._private_lifetimeInternal.max, "UISpawnRandomLifetime.constructor.lifetime.max");
22
+ }
23
+ /** Lifetime range in seconds */
24
+ get lifetime() {
25
+ return this._private_lifetimeInternal;
26
+ }
27
+ /** Lifetime range in seconds */
28
+ set lifetime(value) {
29
+ this._private_lifetimeInternal = resolveUIRangeConfig(value);
30
+ assertValidPositiveNumber(this._private_lifetimeInternal.min, "UISpawnRandomLifetime.lifetime.min");
31
+ assertValidPositiveNumber(this._private_lifetimeInternal.max, "UISpawnRandomLifetime.lifetime.max");
32
+ }
33
+ /** @internal */
34
+ spawn(properties, instanceBegin, instanceEnd) {
35
+ const { builtin } = properties;
36
+ const { array, itemSize } = builtin;
37
+ const { min: lifetimeMin, max: lifetimeMax } = this._private_lifetimeInternal;
38
+ for (let i = instanceBegin; i < instanceEnd; i++) {
39
+ const itemOffset = i * itemSize;
40
+ array[itemOffset + BUILTIN_OFFSET_LIFETIME] = MathUtils.randFloat(lifetimeMin, lifetimeMax);
41
+ array[itemOffset + BUILTIN_OFFSET_AGE] = 0;
42
+ }
43
+ builtin.needsUpdate = true;
44
+ }
45
+ }
46
+
47
+ export { UISpawnRandomLifetime };
@@ -0,0 +1,20 @@
1
+ import { type UIRange, type UIRangeConfig } from "../miscellaneous/miscellaneous";
2
+ import { UISpawnModule } from "./UISpawnModule";
3
+ /**
4
+ * Assigns random rotation to particles.
5
+ *
6
+ * Initial rotation is chosen uniformly from the specified range.
7
+ */
8
+ export declare class UISpawnRandomRotation extends UISpawnModule<{
9
+ builtin: "Matrix4";
10
+ }> {
11
+ private rotationInternal;
12
+ /**
13
+ * @param rotation - Rotation range in radians. Accepts number, tuple, or range object
14
+ */
15
+ constructor(rotation?: UIRangeConfig);
16
+ /** Rotation range in radians */
17
+ get rotation(): UIRange;
18
+ /** Rotation range in radians */
19
+ set rotation(value: UIRangeConfig);
20
+ }
@@ -0,0 +1,45 @@
1
+ import { MathUtils } from 'three';
2
+ import { assertValidNumber } from '../../core/miscellaneous/asserts.js';
3
+ import { resolveUIRangeConfig, BUILTIN_OFFSET_ROTATION } from '../miscellaneous/miscellaneous.js';
4
+ import { UISpawnModule } from './UISpawnModule.js';
5
+
6
+ /**
7
+ * Assigns random rotation to particles.
8
+ *
9
+ * Initial rotation is chosen uniformly from the specified range.
10
+ */
11
+ class UISpawnRandomRotation extends UISpawnModule {
12
+ /**
13
+ * @param rotation - Rotation range in radians. Accepts number, tuple, or range object
14
+ */
15
+ constructor(rotation = { min: -Math.PI, max: Math.PI }) {
16
+ super();
17
+ /** @internal */
18
+ this.requiredProperties = { builtin: "Matrix4" };
19
+ this._private_rotationInternal = resolveUIRangeConfig(rotation);
20
+ assertValidNumber(this._private_rotationInternal.min, "UISpawnRandomRotation.constructor.rotation.min");
21
+ assertValidNumber(this._private_rotationInternal.max, "UISpawnRandomRotation.constructor.rotation.max");
22
+ }
23
+ /** Rotation range in radians */
24
+ get rotation() {
25
+ return this._private_rotationInternal;
26
+ }
27
+ /** Rotation range in radians */
28
+ set rotation(value) {
29
+ this._private_rotationInternal = resolveUIRangeConfig(value);
30
+ assertValidNumber(this._private_rotationInternal.min, "UISpawnRandomRotation.rotation.min");
31
+ assertValidNumber(this._private_rotationInternal.max, "UISpawnRandomRotation.rotation.max");
32
+ }
33
+ /** @internal */
34
+ spawn(properties, instanceBegin, instanceEnd) {
35
+ const { builtin } = properties;
36
+ const { array, itemSize } = builtin;
37
+ const { min: rotationMin, max: rotationMax } = this._private_rotationInternal;
38
+ for (let i = instanceBegin; i < instanceEnd; i++) {
39
+ array[i * itemSize + BUILTIN_OFFSET_ROTATION] = MathUtils.randFloat(rotationMin, rotationMax);
40
+ }
41
+ builtin.needsUpdate = true;
42
+ }
43
+ }
44
+
45
+ export { UISpawnRandomRotation };
@@ -0,0 +1,26 @@
1
+ import { type UIAspectConfig, type UIRange, type UIRangeConfig } from "../miscellaneous/miscellaneous";
2
+ import { UISpawnModule } from "./UISpawnModule";
3
+ /**
4
+ * Assigns random scale to particles.
5
+ *
6
+ * Base scale is chosen uniformly from the range. Aspect ratio is applied to X scale.
7
+ */
8
+ export declare class UISpawnRandomScale extends UISpawnModule<{
9
+ builtin: "Matrix4";
10
+ }> {
11
+ private scaleInternal;
12
+ private aspectInternal;
13
+ /**
14
+ * @param scale - Base scale range. Accepts number, tuple, or range object
15
+ * @param aspect - Width/height ratio. Accepts number or texture
16
+ */
17
+ constructor(scale?: UIRangeConfig, aspect?: UIAspectConfig);
18
+ /** Base scale range */
19
+ get scale(): UIRange;
20
+ /** Width/height aspect ratio */
21
+ get aspect(): number;
22
+ /** Base scale range */
23
+ set scale(value: UIRangeConfig);
24
+ /** Width/height aspect ratio */
25
+ set aspect(value: UIAspectConfig);
26
+ }
@@ -0,0 +1,60 @@
1
+ import { MathUtils } from 'three';
2
+ import { assertValidPositiveNumber } from '../../core/miscellaneous/asserts.js';
3
+ import { resolveUIRangeConfig, resolveAspect, BUILTIN_OFFSET_SCALE_X, BUILTIN_OFFSET_SCALE_Y } from '../miscellaneous/miscellaneous.js';
4
+ import { UISpawnModule } from './UISpawnModule.js';
5
+
6
+ /**
7
+ * Assigns random scale to particles.
8
+ *
9
+ * Base scale is chosen uniformly from the range. Aspect ratio is applied to X scale.
10
+ */
11
+ class UISpawnRandomScale extends UISpawnModule {
12
+ /**
13
+ * @param scale - Base scale range. Accepts number, tuple, or range object
14
+ * @param aspect - Width/height ratio. Accepts number or texture
15
+ */
16
+ constructor(scale = { min: 50, max: 100 }, aspect = 1) {
17
+ super();
18
+ /** @internal */
19
+ this.requiredProperties = { builtin: "Matrix4" };
20
+ this._private_scaleInternal = resolveUIRangeConfig(scale);
21
+ this._private_aspectInternal = resolveAspect(aspect);
22
+ assertValidPositiveNumber(this._private_scaleInternal.min, "UISpawnRandomScale.constructor.scale.min");
23
+ assertValidPositiveNumber(this._private_scaleInternal.max, "UISpawnRandomScale.constructor.scale.max");
24
+ assertValidPositiveNumber(this._private_aspectInternal, "UISpawnRandomScale.constructor.aspect");
25
+ }
26
+ /** Base scale range */
27
+ get scale() {
28
+ return this._private_scaleInternal;
29
+ }
30
+ /** Width/height aspect ratio */
31
+ get aspect() {
32
+ return this._private_aspectInternal;
33
+ }
34
+ /** Base scale range */
35
+ set scale(value) {
36
+ this._private_scaleInternal = resolveUIRangeConfig(value);
37
+ assertValidPositiveNumber(this._private_scaleInternal.min, "UISpawnRandomScale.scale.min");
38
+ assertValidPositiveNumber(this._private_scaleInternal.max, "UISpawnRandomScale.scale.max");
39
+ }
40
+ /** Width/height aspect ratio */
41
+ set aspect(value) {
42
+ this._private_aspectInternal = resolveAspect(value);
43
+ assertValidPositiveNumber(this._private_aspectInternal, "UISpawnRandomScale.aspect");
44
+ }
45
+ /** @internal */
46
+ spawn(properties, instanceBegin, instanceEnd) {
47
+ const { builtin } = properties;
48
+ const { array, itemSize } = builtin;
49
+ const { min: scaleMin, max: scaleMax } = this._private_scaleInternal;
50
+ for (let i = instanceBegin; i < instanceEnd; i++) {
51
+ const itemOffset = i * itemSize;
52
+ const randomScale = MathUtils.randFloat(scaleMin, scaleMax);
53
+ array[itemOffset + BUILTIN_OFFSET_SCALE_X] = randomScale * this._private_aspectInternal;
54
+ array[itemOffset + BUILTIN_OFFSET_SCALE_Y] = randomScale;
55
+ }
56
+ builtin.needsUpdate = true;
57
+ }
58
+ }
59
+
60
+ export { UISpawnRandomScale };
@@ -0,0 +1,20 @@
1
+ import { type UIRange, type UIRangeConfig } from "../miscellaneous/miscellaneous";
2
+ import { UISpawnModule } from "./UISpawnModule";
3
+ /**
4
+ * Assigns random angular velocity to particles.
5
+ *
6
+ * Torque (rotation speed) is chosen uniformly from the specified range.
7
+ */
8
+ export declare class UISpawnRandomTorque extends UISpawnModule<{
9
+ builtin: "Matrix4";
10
+ }> {
11
+ private torqueInternal;
12
+ /**
13
+ * @param torque - Angular velocity range in radians/second. Accepts number, tuple, or range object
14
+ */
15
+ constructor(torque?: UIRangeConfig);
16
+ /** Angular velocity range in radians/second */
17
+ get torque(): UIRange;
18
+ /** Angular velocity range in radians/second */
19
+ set torque(value: UIRangeConfig);
20
+ }
@@ -0,0 +1,45 @@
1
+ import { MathUtils } from 'three';
2
+ import { assertValidNumber } from '../../core/miscellaneous/asserts.js';
3
+ import { resolveUIRangeConfig, BUILTIN_OFFSET_TORQUE } from '../miscellaneous/miscellaneous.js';
4
+ import { UISpawnModule } from './UISpawnModule.js';
5
+
6
+ /**
7
+ * Assigns random angular velocity to particles.
8
+ *
9
+ * Torque (rotation speed) is chosen uniformly from the specified range.
10
+ */
11
+ class UISpawnRandomTorque extends UISpawnModule {
12
+ /**
13
+ * @param torque - Angular velocity range in radians/second. Accepts number, tuple, or range object
14
+ */
15
+ constructor(torque = { min: -Math.PI, max: Math.PI }) {
16
+ super();
17
+ /** @internal */
18
+ this.requiredProperties = { builtin: "Matrix4" };
19
+ this._private_torqueInternal = resolveUIRangeConfig(torque);
20
+ assertValidNumber(this._private_torqueInternal.min, "UISpawnRandomTorque.constructor.torque.min");
21
+ assertValidNumber(this._private_torqueInternal.max, "UISpawnRandomTorque.constructor.torque.max");
22
+ }
23
+ /** Angular velocity range in radians/second */
24
+ get torque() {
25
+ return this._private_torqueInternal;
26
+ }
27
+ /** Angular velocity range in radians/second */
28
+ set torque(value) {
29
+ this._private_torqueInternal = resolveUIRangeConfig(value);
30
+ assertValidNumber(this._private_torqueInternal.min, "UISpawnRandomTorque.torque.min");
31
+ assertValidNumber(this._private_torqueInternal.max, "UISpawnRandomTorque.torque.max");
32
+ }
33
+ /** @internal */
34
+ spawn(properties, instanceBegin, instanceEnd) {
35
+ const { builtin } = properties;
36
+ const { array, itemSize } = builtin;
37
+ const { min: torqueMin, max: torqueMax } = this._private_torqueInternal;
38
+ for (let i = instanceBegin; i < instanceEnd; i++) {
39
+ array[i * itemSize + BUILTIN_OFFSET_TORQUE] = MathUtils.randFloat(torqueMin, torqueMax);
40
+ }
41
+ builtin.needsUpdate = true;
42
+ }
43
+ }
44
+
45
+ export { UISpawnRandomTorque };
@@ -0,0 +1,26 @@
1
+ import { type UIRange, type UIRangeConfig } from "../miscellaneous/miscellaneous";
2
+ import { UISpawnModule } from "./UISpawnModule";
3
+ /**
4
+ * Assigns random velocity to particles.
5
+ *
6
+ * Direction and magnitude are chosen independently from their respective ranges.
7
+ */
8
+ export declare class UISpawnRandomVelocity extends UISpawnModule<{
9
+ builtin: "Matrix4";
10
+ }> {
11
+ private angleInternal;
12
+ private magnitudeInternal;
13
+ /**
14
+ * @param angle - Direction range in radians. Accepts number, tuple, or range object
15
+ * @param magnitude - Speed range in units/second. Accepts number, tuple, or range object
16
+ */
17
+ constructor(angle?: UIRangeConfig, magnitude?: UIRangeConfig);
18
+ /** Direction range in radians */
19
+ get angle(): UIRange;
20
+ /** Speed range in units/second */
21
+ get magnitude(): UIRange;
22
+ /** Direction range in radians */
23
+ set angle(value: UIRangeConfig);
24
+ /** Speed range in units/second */
25
+ set magnitude(value: UIRangeConfig);
26
+ }