laymur 0.23.0 → 0.25.0

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 (314) hide show
  1. package/README.md +1 -1
  2. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +1 -1
  3. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.js +1 -0
  4. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +3 -3
  5. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +14 -16
  6. package/dist/core/constraints/UIConstraint.d.ts +22 -2
  7. package/dist/core/constraints/UIConstraint.js +26 -3
  8. package/dist/core/constraints/UICustomConstraint.d.ts +4 -4
  9. package/dist/core/constraints/UICustomConstraint.js +15 -15
  10. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +1 -1
  11. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.js +1 -0
  12. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +3 -3
  13. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +11 -13
  14. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +1 -1
  15. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +1 -3
  16. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +3 -3
  17. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +30 -30
  18. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +1 -1
  19. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +2 -4
  20. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +3 -3
  21. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +40 -39
  22. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +1 -1
  23. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js +1 -0
  24. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +3 -3
  25. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +13 -15
  26. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +3 -3
  27. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js +1 -0
  28. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +13 -7
  29. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +37 -30
  30. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +1 -1
  31. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +1 -3
  32. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +3 -3
  33. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +30 -30
  34. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +1 -1
  35. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +2 -4
  36. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +3 -3
  37. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +40 -39
  38. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +1 -1
  39. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js +1 -0
  40. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +3 -3
  41. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +13 -15
  42. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +1 -1
  43. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.js +1 -0
  44. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +3 -3
  45. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +11 -13
  46. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +3 -3
  47. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +1 -3
  48. package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +11 -11
  49. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +10 -13
  50. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +1 -1
  51. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +1 -3
  52. package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +7 -7
  53. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +10 -13
  54. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +1 -1
  55. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +1 -3
  56. package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +7 -7
  57. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +10 -13
  58. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +3 -5
  59. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +23 -5
  60. package/dist/core/elements/UIAnchor/UIAnchor.js +42 -8
  61. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +2 -2
  62. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +4 -6
  63. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +10 -10
  64. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +108 -111
  65. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +4 -4
  66. package/dist/core/elements/UIDummy/UIDummy.Internal.js +5 -8
  67. package/dist/core/elements/UIDummy/UIDummy.d.ts +19 -11
  68. package/dist/core/elements/UIDummy/UIDummy.js +59 -42
  69. package/dist/core/elements/UIElement/UIElement.Internal.d.ts +5 -5
  70. package/dist/core/elements/UIElement/UIElement.Internal.js +9 -12
  71. package/dist/core/elements/UIElement/UIElement.d.ts +11 -11
  72. package/dist/core/elements/UIElement/UIElement.js +57 -60
  73. package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +3 -3
  74. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +4 -7
  75. package/dist/core/elements/UIGraphics/UIGraphics.d.ts +7 -7
  76. package/dist/core/elements/UIGraphics/UIGraphics.js +44 -47
  77. package/dist/core/elements/UIImage/UIImage.Internal.d.ts +2 -2
  78. package/dist/core/elements/UIImage/UIImage.Internal.js +1 -0
  79. package/dist/core/elements/UIImage/UIImage.d.ts +9 -9
  80. package/dist/core/elements/UIImage/UIImage.js +21 -24
  81. package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +3 -3
  82. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +3 -5
  83. package/dist/core/elements/UINineSlice/UINineSlice.d.ts +12 -12
  84. package/dist/core/elements/UINineSlice/UINineSlice.js +71 -73
  85. package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +3 -4
  86. package/dist/core/elements/UIProgress/UIProgress.Internal.js +1 -3
  87. package/dist/core/elements/UIProgress/UIProgress.d.ts +10 -10
  88. package/dist/core/elements/UIProgress/UIProgress.js +59 -62
  89. package/dist/core/elements/UIScene/UIScene.Internal.d.ts +3 -3
  90. package/dist/core/elements/UIScene/UIScene.Internal.js +11 -14
  91. package/dist/core/elements/UIScene/UIScene.d.ts +8 -8
  92. package/dist/core/elements/UIScene/UIScene.js +68 -69
  93. package/dist/core/elements/UIText/UIText.Bidi.d.ts +2 -2
  94. package/dist/core/elements/UIText/UIText.Bidi.js +3 -5
  95. package/dist/core/elements/UIText/UIText.Interfaces.d.ts +6 -2
  96. package/dist/core/elements/UIText/UIText.Interfaces.js +1 -0
  97. package/dist/core/elements/UIText/UIText.Internal.d.ts +4 -4
  98. package/dist/core/elements/UIText/UIText.Internal.js +5 -7
  99. package/dist/core/elements/UIText/UIText.Measuring.d.ts +14 -7
  100. package/dist/core/elements/UIText/UIText.Measuring.js +115 -55
  101. package/dist/core/elements/UIText/UIText.Rendering.d.ts +3 -3
  102. package/dist/core/elements/UIText/UIText.Rendering.js +6 -9
  103. package/dist/core/elements/UIText/UIText.d.ts +28 -14
  104. package/dist/core/elements/UIText/UIText.js +181 -141
  105. package/dist/core/index.d.ts +55 -54
  106. package/dist/core/index.js +53 -0
  107. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +4 -4
  108. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +2 -5
  109. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +4 -4
  110. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +43 -42
  111. package/dist/core/layers/UILayer/UILayer.Internal.d.ts +2 -2
  112. package/dist/core/layers/UILayer/UILayer.Internal.js +4 -7
  113. package/dist/core/layers/UILayer/UILayer.d.ts +19 -4
  114. package/dist/core/layers/UILayer/UILayer.js +125 -62
  115. package/dist/core/miscellaneous/UIBlendMode.js +1 -3
  116. package/dist/core/miscellaneous/UIExpression.js +16 -19
  117. package/dist/core/miscellaneous/UIMode.js +3 -5
  118. package/dist/core/miscellaneous/UIOrientation.js +2 -4
  119. package/dist/core/miscellaneous/UIPriority.js +5 -8
  120. package/dist/core/miscellaneous/UIRelation.js +5 -8
  121. package/dist/core/miscellaneous/UITransparencyMode.js +1 -3
  122. package/dist/core/miscellaneous/area/UIArea.js +1 -3
  123. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -1
  124. package/dist/core/miscellaneous/area/UIAreaCircle.js +3 -6
  125. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +2 -2
  126. package/dist/core/miscellaneous/area/UIAreaPolygon.js +3 -6
  127. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -1
  128. package/dist/core/miscellaneous/area/UIAreaRectangle.js +3 -6
  129. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -1
  130. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +3 -6
  131. package/dist/core/miscellaneous/asserts.d.ts +20 -1
  132. package/dist/core/miscellaneous/asserts.js +71 -19
  133. package/dist/core/miscellaneous/canvas.js +13 -7
  134. package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +1 -1
  135. package/dist/core/miscellaneous/color/UIColor.Internal.js +1 -3
  136. package/dist/core/miscellaneous/color/UIColor.d.ts +1 -1
  137. package/dist/core/miscellaneous/color/UIColor.js +202 -205
  138. package/dist/core/miscellaneous/computeTransform.d.ts +1 -1
  139. package/dist/core/miscellaneous/computeTransform.js +4 -7
  140. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +2 -2
  141. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +13 -16
  142. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +115 -118
  143. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +3 -3
  144. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.js +1 -0
  145. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +208 -114
  146. package/dist/core/miscellaneous/generic-plane/shared.d.ts +2 -2
  147. package/dist/core/miscellaneous/generic-plane/shared.js +16 -19
  148. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +1 -3
  149. package/dist/core/miscellaneous/insets/UIInsets.d.ts +1 -1
  150. package/dist/core/miscellaneous/insets/UIInsets.js +96 -99
  151. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +1 -3
  152. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +1 -1
  153. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +14 -17
  154. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -2
  155. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +13 -16
  156. package/dist/core/miscellaneous/math.js +3 -5
  157. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +6 -8
  158. package/dist/core/miscellaneous/micro/UIMicro.d.ts +1 -1
  159. package/dist/core/miscellaneous/micro/UIMicro.js +91 -94
  160. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +1 -3
  161. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +1 -1
  162. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +12 -15
  163. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +1 -1
  164. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +13 -16
  165. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +1 -1
  166. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +13 -16
  167. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +1 -1
  168. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +12 -15
  169. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +1 -1
  170. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +13 -16
  171. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +1 -1
  172. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +13 -16
  173. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +1 -1
  174. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +3 -6
  175. package/dist/core/miscellaneous/shared.d.ts +1 -1
  176. package/dist/core/miscellaneous/shared.js +4 -7
  177. package/dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts +1 -1
  178. package/dist/core/miscellaneous/text-span/UITextSpan.Internal.js +1 -0
  179. package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +2 -2
  180. package/dist/core/miscellaneous/text-span/UITextSpan.js +10 -13
  181. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +15 -17
  182. package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +13 -2
  183. package/dist/core/miscellaneous/text-style/UITextStyle.js +222 -207
  184. package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +7 -0
  185. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +16 -6
  186. package/dist/core/miscellaneous/texture/UITextureView.d.ts +1 -1
  187. package/dist/core/miscellaneous/texture/UITextureView.js +113 -117
  188. package/dist/core/miscellaneous/webglCapabilities.js +3 -4
  189. package/dist/core/shaders/UIImage.d.ts +9 -0
  190. package/dist/core/shaders/UIImage.js +14 -0
  191. package/dist/core/shaders/UINineSlice.d.ts +11 -0
  192. package/dist/core/shaders/UINineSlice.js +57 -0
  193. package/dist/core/shaders/UIProgress.d.ts +14 -0
  194. package/dist/core/shaders/UIProgress.js +21 -0
  195. package/dist/core/shaders/UIProgressMaskFunctionCircular.d.ts +2 -0
  196. package/dist/core/shaders/UIProgressMaskFunctionCircular.js +16 -0
  197. package/dist/core/shaders/UIProgressMaskFunctionDirectional.d.ts +2 -0
  198. package/dist/core/shaders/UIProgressMaskFunctionDirectional.js +15 -0
  199. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +4 -0
  200. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.js +1 -0
  201. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +7 -1
  202. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +50 -47
  203. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +5 -2
  204. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.js +1 -0
  205. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +11 -3
  206. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +42 -26
  207. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +5 -3
  208. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.js +1 -0
  209. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +20 -4
  210. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +138 -117
  211. package/dist/debug/UIAspectDebug.d.ts +3 -3
  212. package/dist/debug/UIAspectDebug.js +64 -68
  213. package/dist/debug/UIConstraintDebug.d.ts +1 -1
  214. package/dist/debug/UIConstraintDebug.js +1 -0
  215. package/dist/debug/UIHeightDebug.d.ts +3 -3
  216. package/dist/debug/UIHeightDebug.js +63 -67
  217. package/dist/debug/UIHorizontalDistanceDebug.d.ts +3 -3
  218. package/dist/debug/UIHorizontalDistanceDebug.js +76 -81
  219. package/dist/debug/UIHorizontalInterpolationDebug.d.ts +3 -3
  220. package/dist/debug/UIHorizontalInterpolationDebug.js +74 -78
  221. package/dist/debug/UILayerDebug.d.ts +1 -1
  222. package/dist/debug/UILayerDebug.js +55 -64
  223. package/dist/debug/UIVerticalDistanceDebug.d.ts +3 -3
  224. package/dist/debug/UIVerticalDistanceDebug.js +76 -81
  225. package/dist/debug/UIVerticalInterpolationDebug.d.ts +3 -3
  226. package/dist/debug/UIVerticalInterpolationDebug.js +74 -78
  227. package/dist/debug/UIWidthDebug.d.ts +3 -3
  228. package/dist/debug/UIWidthDebug.js +63 -67
  229. package/dist/debug/index.d.ts +8 -8
  230. package/dist/debug/index.js +8 -8
  231. package/dist/debug/miscellaneous.js +8 -11
  232. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +3 -3
  233. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +13 -16
  234. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +1 -1
  235. package/dist/particles/behaviorModules/UIBehaviorModule.js +1 -3
  236. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +3 -3
  237. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +37 -40
  238. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +41 -0
  239. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +87 -0
  240. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +2 -2
  241. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +17 -20
  242. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +2 -2
  243. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +13 -16
  244. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +2 -2
  245. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +21 -24
  246. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +2 -2
  247. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +13 -16
  248. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +2 -2
  249. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +21 -24
  250. package/dist/particles/elements/UIEmitter.Internal.d.ts +2 -2
  251. package/dist/particles/elements/UIEmitter.Internal.js +6 -9
  252. package/dist/particles/elements/UIEmitter.d.ts +17 -11
  253. package/dist/particles/elements/UIEmitter.js +100 -88
  254. package/dist/particles/index.d.ts +20 -18
  255. package/dist/particles/index.js +19 -18
  256. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +1 -1
  257. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +14 -15
  258. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +1 -1
  259. package/dist/particles/instancedParticle/UIInstancedParticle.js +29 -32
  260. package/dist/particles/miscellaneous/miscellaneous.d.ts +3 -3
  261. package/dist/particles/miscellaneous/miscellaneous.js +26 -27
  262. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +2 -2
  263. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +5 -8
  264. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +2 -2
  265. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +6 -9
  266. package/dist/particles/renderingModules/UIRenderingModule.js +1 -3
  267. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +2 -2
  268. package/dist/particles/renderingModules/UIRenderingTexture.js +4 -7
  269. package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +2 -0
  270. package/dist/particles/shaders/UIRenderingColorOverLife.js +7 -0
  271. package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +9 -0
  272. package/dist/particles/shaders/UIRenderingColorOverVelocity.js +16 -0
  273. package/dist/particles/shaders/UIRenderingTexture.d.ts +2 -0
  274. package/dist/particles/shaders/UIRenderingTexture.js +7 -0
  275. package/dist/particles/spawnModules/UISpawnModule.d.ts +1 -1
  276. package/dist/particles/spawnModules/UISpawnModule.js +1 -3
  277. package/dist/particles/spawnModules/UISpawnOffset.d.ts +3 -3
  278. package/dist/particles/spawnModules/UISpawnOffset.js +12 -15
  279. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +2 -2
  280. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +13 -16
  281. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +2 -2
  282. package/dist/particles/spawnModules/UISpawnRandomRotation.js +13 -16
  283. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +2 -2
  284. package/dist/particles/spawnModules/UISpawnRandomScale.js +19 -22
  285. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +2 -2
  286. package/dist/particles/spawnModules/UISpawnRandomTorque.js +13 -16
  287. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +2 -2
  288. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +21 -24
  289. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +3 -3
  290. package/dist/particles/spawnModules/UISpawnRectangle.js +21 -24
  291. package/package.json +13 -17
  292. package/dist/_virtual/2d.js +0 -3
  293. package/dist/_virtual/3d.js +0 -3
  294. package/dist/_virtual/4d.js +0 -3
  295. package/dist/_virtual/mod.js +0 -5
  296. package/dist/_virtual/mod2.js +0 -3
  297. package/dist/core/shaders/UIImage.glsl.js +0 -3
  298. package/dist/core/shaders/UINineSlice.glsl.js +0 -3
  299. package/dist/core/shaders/UIProgress.glsl.js +0 -3
  300. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +0 -3
  301. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +0 -3
  302. package/dist/index.js +0 -52
  303. package/dist/node_modules/fast-simplex-noise/lib/2d.js +0 -93
  304. package/dist/node_modules/fast-simplex-noise/lib/3d.js +0 -142
  305. package/dist/node_modules/fast-simplex-noise/lib/4d.js +0 -196
  306. package/dist/node_modules/fast-simplex-noise/lib/mod.js +0 -24
  307. package/dist/node_modules/three/examples/jsm/lines/Line2.js +0 -56
  308. package/dist/node_modules/three/examples/jsm/lines/LineGeometry.js +0 -157
  309. package/dist/node_modules/three/examples/jsm/lines/LineMaterial.js +0 -691
  310. package/dist/node_modules/three/examples/jsm/lines/LineSegments2.js +0 -415
  311. package/dist/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -289
  312. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +0 -3
  313. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +0 -3
  314. package/dist/particles/shaders/UIRenderingTexture.glsl.js +0 -3
@@ -1,5 +1,5 @@
1
- import type { UIAspectConfig, UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous";
2
- import { UISpawnModule } from "./UISpawnModule";
1
+ import type { UIAspectConfig, UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous.js";
2
+ import { UISpawnModule } from "./UISpawnModule.js";
3
3
  /**
4
4
  * Assigns random scale to particles.
5
5
  *
@@ -1,14 +1,13 @@
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
-
1
+ import { MathUtils } from "three";
2
+ import { assertValidPositiveNumber } from "../../core/miscellaneous/asserts.js";
3
+ import { BUILTIN_OFFSET_SCALE_X, BUILTIN_OFFSET_SCALE_Y, resolveAspect, resolveUIRangeConfig, } from "../miscellaneous/miscellaneous.js";
4
+ import { UISpawnModule } from "./UISpawnModule.js";
6
5
  /**
7
6
  * Assigns random scale to particles.
8
7
  *
9
8
  * Base scale is chosen uniformly from the range. Aspect ratio is applied to X scale.
10
9
  */
11
- class UISpawnRandomScale extends UISpawnModule {
10
+ export class UISpawnRandomScale extends UISpawnModule {
12
11
  /**
13
12
  * @param scale - Base scale range. Accepts number, tuple, or range object
14
13
  * @param aspect - Width/height ratio. Accepts number or texture
@@ -17,44 +16,42 @@ class UISpawnRandomScale extends UISpawnModule {
17
16
  super();
18
17
  /** @internal */
19
18
  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");
19
+ this.scaleInternal = resolveUIRangeConfig(scale);
20
+ this.aspectInternal = resolveAspect(aspect);
21
+ assertValidPositiveNumber(this.scaleInternal.min, "UISpawnRandomScale.constructor.scale.min");
22
+ assertValidPositiveNumber(this.scaleInternal.max, "UISpawnRandomScale.constructor.scale.max");
23
+ assertValidPositiveNumber(this.aspectInternal, "UISpawnRandomScale.constructor.aspect");
25
24
  }
26
25
  /** Base scale range */
27
26
  get scale() {
28
- return this._private_scaleInternal;
27
+ return this.scaleInternal;
29
28
  }
30
29
  /** Width/height aspect ratio */
31
30
  get aspect() {
32
- return this._private_aspectInternal;
31
+ return this.aspectInternal;
33
32
  }
34
33
  /** Base scale range */
35
34
  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");
35
+ this.scaleInternal = resolveUIRangeConfig(value);
36
+ assertValidPositiveNumber(this.scaleInternal.min, "UISpawnRandomScale.scale.min");
37
+ assertValidPositiveNumber(this.scaleInternal.max, "UISpawnRandomScale.scale.max");
39
38
  }
40
39
  /** Width/height aspect ratio */
41
40
  set aspect(value) {
42
- this._private_aspectInternal = resolveAspect(value);
43
- assertValidPositiveNumber(this._private_aspectInternal, "UISpawnRandomScale.aspect");
41
+ this.aspectInternal = resolveAspect(value);
42
+ assertValidPositiveNumber(this.aspectInternal, "UISpawnRandomScale.aspect");
44
43
  }
45
44
  /** @internal */
46
45
  spawn(properties, instanceBegin, instanceEnd) {
47
46
  const { builtin } = properties;
48
47
  const { array, itemSize } = builtin;
49
- const { min: scaleMin, max: scaleMax } = this._private_scaleInternal;
48
+ const { min: scaleMin, max: scaleMax } = this.scaleInternal;
50
49
  for (let i = instanceBegin; i < instanceEnd; i++) {
51
50
  const itemOffset = i * itemSize;
52
51
  const randomScale = MathUtils.randFloat(scaleMin, scaleMax);
53
- array[itemOffset + BUILTIN_OFFSET_SCALE_X] = randomScale * this._private_aspectInternal;
52
+ array[itemOffset + BUILTIN_OFFSET_SCALE_X] = randomScale * this.aspectInternal;
54
53
  array[itemOffset + BUILTIN_OFFSET_SCALE_Y] = randomScale;
55
54
  }
56
55
  builtin.needsUpdate = true;
57
56
  }
58
57
  }
59
-
60
- export { UISpawnRandomScale };
@@ -1,5 +1,5 @@
1
- import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous";
2
- import { UISpawnModule } from "./UISpawnModule";
1
+ import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous.js";
2
+ import { UISpawnModule } from "./UISpawnModule.js";
3
3
  /**
4
4
  * Assigns random angular velocity to particles.
5
5
  *
@@ -1,14 +1,13 @@
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
-
1
+ import { MathUtils } from "three";
2
+ import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
3
+ import { BUILTIN_OFFSET_TORQUE, resolveUIRangeConfig } from "../miscellaneous/miscellaneous.js";
4
+ import { UISpawnModule } from "./UISpawnModule.js";
6
5
  /**
7
6
  * Assigns random angular velocity to particles.
8
7
  *
9
8
  * Torque (rotation speed) is chosen uniformly from the specified range.
10
9
  */
11
- class UISpawnRandomTorque extends UISpawnModule {
10
+ export class UISpawnRandomTorque extends UISpawnModule {
12
11
  /**
13
12
  * @param torque - Angular velocity range in radians/second. Accepts number, tuple, or range object
14
13
  */
@@ -16,30 +15,28 @@ class UISpawnRandomTorque extends UISpawnModule {
16
15
  super();
17
16
  /** @internal */
18
17
  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");
18
+ this.torqueInternal = resolveUIRangeConfig(torque);
19
+ assertValidNumber(this.torqueInternal.min, "UISpawnRandomTorque.constructor.torque.min");
20
+ assertValidNumber(this.torqueInternal.max, "UISpawnRandomTorque.constructor.torque.max");
22
21
  }
23
22
  /** Angular velocity range in radians/second */
24
23
  get torque() {
25
- return this._private_torqueInternal;
24
+ return this.torqueInternal;
26
25
  }
27
26
  /** Angular velocity range in radians/second */
28
27
  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");
28
+ this.torqueInternal = resolveUIRangeConfig(value);
29
+ assertValidNumber(this.torqueInternal.min, "UISpawnRandomTorque.torque.min");
30
+ assertValidNumber(this.torqueInternal.max, "UISpawnRandomTorque.torque.max");
32
31
  }
33
32
  /** @internal */
34
33
  spawn(properties, instanceBegin, instanceEnd) {
35
34
  const { builtin } = properties;
36
35
  const { array, itemSize } = builtin;
37
- const { min: torqueMin, max: torqueMax } = this._private_torqueInternal;
36
+ const { min: torqueMin, max: torqueMax } = this.torqueInternal;
38
37
  for (let i = instanceBegin; i < instanceEnd; i++) {
39
38
  array[i * itemSize + BUILTIN_OFFSET_TORQUE] = MathUtils.randFloat(torqueMin, torqueMax);
40
39
  }
41
40
  builtin.needsUpdate = true;
42
41
  }
43
42
  }
44
-
45
- export { UISpawnRandomTorque };
@@ -1,5 +1,5 @@
1
- import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous";
2
- import { UISpawnModule } from "./UISpawnModule";
1
+ import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous.js";
2
+ import { UISpawnModule } from "./UISpawnModule.js";
3
3
  /**
4
4
  * Assigns random velocity to particles.
5
5
  *
@@ -1,14 +1,13 @@
1
- import { MathUtils } from 'three';
2
- import { assertValidNumber } from '../../core/miscellaneous/asserts.js';
3
- import { resolveUIRangeConfig, BUILTIN_OFFSET_VELOCITY_X, BUILTIN_OFFSET_VELOCITY_Y } from '../miscellaneous/miscellaneous.js';
4
- import { UISpawnModule } from './UISpawnModule.js';
5
-
1
+ import { MathUtils } from "three";
2
+ import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
3
+ import { BUILTIN_OFFSET_VELOCITY_X, BUILTIN_OFFSET_VELOCITY_Y, resolveUIRangeConfig, } from "../miscellaneous/miscellaneous.js";
4
+ import { UISpawnModule } from "./UISpawnModule.js";
6
5
  /**
7
6
  * Assigns random velocity to particles.
8
7
  *
9
8
  * Direction and magnitude are chosen independently from their respective ranges.
10
9
  */
11
- class UISpawnRandomVelocity extends UISpawnModule {
10
+ export class UISpawnRandomVelocity extends UISpawnModule {
12
11
  /**
13
12
  * @param angle - Direction range in radians. Accepts number, tuple, or range object
14
13
  * @param magnitude - Speed range in units/second. Accepts number, tuple, or range object
@@ -17,39 +16,39 @@ class UISpawnRandomVelocity extends UISpawnModule {
17
16
  super();
18
17
  /** @internal */
19
18
  this.requiredProperties = { builtin: "Matrix4" };
20
- this._private_angleInternal = resolveUIRangeConfig(angle);
21
- this._private_magnitudeInternal = resolveUIRangeConfig(magnitude);
22
- assertValidNumber(this._private_angleInternal.min, "UISpawnRandomVelocity.constructor.angle.min");
23
- assertValidNumber(this._private_angleInternal.max, "UISpawnRandomVelocity.constructor.angle.max");
24
- assertValidNumber(this._private_magnitudeInternal.min, "UISpawnRandomVelocity.constructor.magnitude.min");
25
- assertValidNumber(this._private_magnitudeInternal.max, "UISpawnRandomVelocity.constructor.magnitude.max");
19
+ this.angleInternal = resolveUIRangeConfig(angle);
20
+ this.magnitudeInternal = resolveUIRangeConfig(magnitude);
21
+ assertValidNumber(this.angleInternal.min, "UISpawnRandomVelocity.constructor.angle.min");
22
+ assertValidNumber(this.angleInternal.max, "UISpawnRandomVelocity.constructor.angle.max");
23
+ assertValidNumber(this.magnitudeInternal.min, "UISpawnRandomVelocity.constructor.magnitude.min");
24
+ assertValidNumber(this.magnitudeInternal.max, "UISpawnRandomVelocity.constructor.magnitude.max");
26
25
  }
27
26
  /** Direction range in radians */
28
27
  get angle() {
29
- return this._private_angleInternal;
28
+ return this.angleInternal;
30
29
  }
31
30
  /** Speed range in units/second */
32
31
  get magnitude() {
33
- return this._private_magnitudeInternal;
32
+ return this.magnitudeInternal;
34
33
  }
35
34
  /** Direction range in radians */
36
35
  set angle(value) {
37
- this._private_angleInternal = resolveUIRangeConfig(value);
38
- assertValidNumber(this._private_angleInternal.min, "UISpawnRandomVelocity.angle.min");
39
- assertValidNumber(this._private_angleInternal.max, "UISpawnRandomVelocity.angle.max");
36
+ this.angleInternal = resolveUIRangeConfig(value);
37
+ assertValidNumber(this.angleInternal.min, "UISpawnRandomVelocity.angle.min");
38
+ assertValidNumber(this.angleInternal.max, "UISpawnRandomVelocity.angle.max");
40
39
  }
41
40
  /** Speed range in units/second */
42
41
  set magnitude(value) {
43
- this._private_magnitudeInternal = resolveUIRangeConfig(value);
44
- assertValidNumber(this._private_magnitudeInternal.min, "UISpawnRandomVelocity.magnitude.min");
45
- assertValidNumber(this._private_magnitudeInternal.max, "UISpawnRandomVelocity.magnitude.max");
42
+ this.magnitudeInternal = resolveUIRangeConfig(value);
43
+ assertValidNumber(this.magnitudeInternal.min, "UISpawnRandomVelocity.magnitude.min");
44
+ assertValidNumber(this.magnitudeInternal.max, "UISpawnRandomVelocity.magnitude.max");
46
45
  }
47
46
  /** @internal */
48
47
  spawn(properties, instanceBegin, instanceEnd) {
49
48
  const { builtin } = properties;
50
49
  const { array, itemSize } = builtin;
51
- const { min: angleMin, max: angleMax } = this._private_angleInternal;
52
- const { min: magnitudeMin, max: magnitudeMax } = this._private_magnitudeInternal;
50
+ const { min: angleMin, max: angleMax } = this.angleInternal;
51
+ const { min: magnitudeMin, max: magnitudeMax } = this.magnitudeInternal;
53
52
  for (let i = instanceBegin; i < instanceEnd; i++) {
54
53
  const itemOffset = i * itemSize;
55
54
  const angle = MathUtils.randFloat(angleMin, angleMax);
@@ -60,5 +59,3 @@ class UISpawnRandomVelocity extends UISpawnModule {
60
59
  builtin.needsUpdate = true;
61
60
  }
62
61
  }
63
-
64
- export { UISpawnRandomVelocity };
@@ -1,6 +1,6 @@
1
- import type { Vector2Like } from "../../core/miscellaneous/math";
2
- import type { UIVector2Config } from "../miscellaneous/miscellaneous";
3
- import { UISpawnModule } from "./UISpawnModule";
1
+ import type { Vector2Like } from "../../core/miscellaneous/math.js";
2
+ import type { UIVector2Config } from "../miscellaneous/miscellaneous.js";
3
+ import { UISpawnModule } from "./UISpawnModule.js";
4
4
  /**
5
5
  * Spawns particles at random positions within a rectangle.
6
6
  *
@@ -1,14 +1,13 @@
1
- import { MathUtils } from 'three';
2
- import { assertValidNumber } from '../../core/miscellaneous/asserts.js';
3
- import { resolveUIVector2Config, BUILTIN_OFFSET_POSITION_X, BUILTIN_OFFSET_POSITION_Y } from '../miscellaneous/miscellaneous.js';
4
- import { UISpawnModule } from './UISpawnModule.js';
5
-
1
+ import { MathUtils } from "three";
2
+ import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
3
+ import { BUILTIN_OFFSET_POSITION_X, BUILTIN_OFFSET_POSITION_Y, resolveUIVector2Config, } from "../miscellaneous/miscellaneous.js";
4
+ import { UISpawnModule } from "./UISpawnModule.js";
6
5
  /**
7
6
  * Spawns particles at random positions within a rectangle.
8
7
  *
9
8
  * Position is chosen uniformly within the bounds defined by min and max.
10
9
  */
11
- class UISpawnRectangle extends UISpawnModule {
10
+ export class UISpawnRectangle extends UISpawnModule {
12
11
  /**
13
12
  * @param min - Bottom-left corner of spawn area
14
13
  * @param max - Top-right corner of spawn area
@@ -17,39 +16,39 @@ class UISpawnRectangle extends UISpawnModule {
17
16
  super();
18
17
  /** @internal */
19
18
  this.requiredProperties = { builtin: "Matrix4" };
20
- this._private_minInternal = resolveUIVector2Config(min);
21
- this._private_maxInternal = resolveUIVector2Config(max);
22
- assertValidNumber(this._private_minInternal.x, "UISpawnRectangle.constructor.min.x");
23
- assertValidNumber(this._private_minInternal.y, "UISpawnRectangle.constructor.min.y");
24
- assertValidNumber(this._private_maxInternal.x, "UISpawnRectangle.constructor.max.x");
25
- assertValidNumber(this._private_maxInternal.y, "UISpawnRectangle.constructor.max.y");
19
+ this.minInternal = resolveUIVector2Config(min);
20
+ this.maxInternal = resolveUIVector2Config(max);
21
+ assertValidNumber(this.minInternal.x, "UISpawnRectangle.constructor.min.x");
22
+ assertValidNumber(this.minInternal.y, "UISpawnRectangle.constructor.min.y");
23
+ assertValidNumber(this.maxInternal.x, "UISpawnRectangle.constructor.max.x");
24
+ assertValidNumber(this.maxInternal.y, "UISpawnRectangle.constructor.max.y");
26
25
  }
27
26
  /** Bottom-left corner of spawn area */
28
27
  get min() {
29
- return this._private_minInternal;
28
+ return this.minInternal;
30
29
  }
31
30
  /** Top-right corner of spawn area */
32
31
  get max() {
33
- return this._private_maxInternal;
32
+ return this.maxInternal;
34
33
  }
35
34
  /** Bottom-left corner of spawn area */
36
35
  set min(value) {
37
- this._private_minInternal = resolveUIVector2Config(value);
38
- assertValidNumber(this._private_minInternal.x, "UISpawnRectangle.min.x");
39
- assertValidNumber(this._private_minInternal.y, "UISpawnRectangle.min.y");
36
+ this.minInternal = resolveUIVector2Config(value);
37
+ assertValidNumber(this.minInternal.x, "UISpawnRectangle.min.x");
38
+ assertValidNumber(this.minInternal.y, "UISpawnRectangle.min.y");
40
39
  }
41
40
  /** Top-right corner of spawn area */
42
41
  set max(value) {
43
- this._private_maxInternal = resolveUIVector2Config(value);
44
- assertValidNumber(this._private_maxInternal.x, "UISpawnRectangle.max.x");
45
- assertValidNumber(this._private_maxInternal.y, "UISpawnRectangle.max.y");
42
+ this.maxInternal = resolveUIVector2Config(value);
43
+ assertValidNumber(this.maxInternal.x, "UISpawnRectangle.max.x");
44
+ assertValidNumber(this.maxInternal.y, "UISpawnRectangle.max.y");
46
45
  }
47
46
  /** @internal */
48
47
  spawn(properties, instanceBegin, instanceEnd) {
49
48
  const { builtin } = properties;
50
49
  const { array, itemSize } = builtin;
51
- const { x: minX, y: minY } = this._private_minInternal;
52
- const { x: maxX, y: maxY } = this._private_maxInternal;
50
+ const { x: minX, y: minY } = this.minInternal;
51
+ const { x: maxX, y: maxY } = this.maxInternal;
53
52
  for (let i = instanceBegin; i < instanceEnd; i++) {
54
53
  const itemOffset = i * itemSize;
55
54
  array[itemOffset + BUILTIN_OFFSET_POSITION_X] = MathUtils.randFloat(minX, maxX);
@@ -58,5 +57,3 @@ class UISpawnRectangle extends UISpawnModule {
58
57
  builtin.needsUpdate = true;
59
58
  }
60
59
  }
61
-
62
- export { UISpawnRectangle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laymur",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "description": "Constraint-based UI library for Three.js mobile advertisements",
5
5
  "keywords": [
6
6
  "ui",
@@ -21,11 +21,12 @@
21
21
  "sideEffects": false,
22
22
  "scripts": {
23
23
  "clean": "rm -rf dist",
24
- "build": "npm run clean && rollup -c",
24
+ "build": "npm run clean && tsc -p tsconfig.json",
25
25
  "prepublishOnly": "npm run build"
26
26
  },
27
- "main": "./dist/index.js",
28
- "module": "./dist/index.js",
27
+ "main": "./dist/core/index.js",
28
+ "module": "./dist/core/index.js",
29
+ "types": "./dist/core/index.d.ts",
29
30
  "files": [
30
31
  "dist",
31
32
  "README.md",
@@ -33,17 +34,18 @@
33
34
  ],
34
35
  "exports": {
35
36
  ".": {
36
- "import": "./dist/index.js",
37
- "types": "./dist/core/index.d.ts"
37
+ "types": "./dist/core/index.d.ts",
38
+ "import": "./dist/core/index.js"
38
39
  },
39
40
  "./particles": {
40
- "import": "./dist/particles/index.js",
41
- "types": "./dist/particles/index.d.ts"
41
+ "types": "./dist/particles/index.d.ts",
42
+ "import": "./dist/particles/index.js"
42
43
  },
43
44
  "./debug": {
44
- "import": "./dist/debug/index.js",
45
- "types": "./dist/debug/index.d.ts"
46
- }
45
+ "types": "./dist/debug/index.d.ts",
46
+ "import": "./dist/debug/index.js"
47
+ },
48
+ "./package.json": "./package.json"
47
49
  },
48
50
  "peerDependencies": {
49
51
  "@lume/kiwi": "^0.4.4",
@@ -52,17 +54,11 @@
52
54
  "three": ">=0.157.0 <0.180.0"
53
55
  },
54
56
  "devDependencies": {
55
- "@rollup/plugin-commonjs": "^29.0.3",
56
- "@rollup/plugin-node-resolve": "^16.0.1",
57
57
  "@types/node": "^25.0.2",
58
58
  "@types/three": "^0.157.0",
59
59
  "@typescript-eslint/eslint-plugin": "^8.32.0",
60
60
  "@typescript-eslint/parser": "^8.32.0",
61
61
  "eslint": "^9.26.0",
62
- "rollup": "^4.40.2",
63
- "rollup-plugin-string": "^3.0.0",
64
- "rollup-plugin-typescript2": "^0.36.0",
65
- "ts-transformer-minify-privates": "^1.0.0",
66
62
  "typescript": "^5.8.3"
67
63
  }
68
64
  }
@@ -1,3 +0,0 @@
1
- var _2d = {};
2
-
3
- export { _2d as __exports };
@@ -1,3 +0,0 @@
1
- var _3d = {};
2
-
3
- export { _3d as __exports };
@@ -1,3 +0,0 @@
1
- var _4d = {};
2
-
3
- export { _4d as __exports };
@@ -1,5 +0,0 @@
1
- import { __require as requireMod } from '../node_modules/fast-simplex-noise/lib/mod.js';
2
-
3
- var modExports = requireMod();
4
-
5
- export { modExports as m };
@@ -1,3 +0,0 @@
1
- var mod = {};
2
-
3
- export { mod as __exports };
@@ -1,3 +0,0 @@
1
- var source = "vec4 draw(){vec2 transformedUV=(p_textureTransform*vec3(p_uv,1.0)).xy;return srgbTexture2D(p_texture,transformedUV)*p_color;}";
2
-
3
- export { source as default };
@@ -1,3 +0,0 @@
1
- var source = "vec4 draw(){vec2 localUV=p_uv;float left=p_sliceBorders.x;float right=p_sliceBorders.y;float top=p_sliceBorders.z;float bottom=p_sliceBorders.w;float leftFill=p_sliceRegions.x;float rightFill=p_sliceRegions.y;float topFill=p_sliceRegions.z;float bottomFill=p_sliceRegions.w;float lB=leftFill;float rB=1.0-rightFill;float bB=bottomFill;float tB=1.0-topFill;{float regionL=step(p_uv.x,lB);float regionR=step(rB,p_uv.x);float regionM=1.0-regionL-regionR;float xL=(p_uv.x/lB)*left;float xR=1.0-right+((p_uv.x-rB)/rightFill)*right;float xM=left+((p_uv.x-lB)/(rB-lB))*(1.0-left-right);localUV.x=regionL*xL+regionM*xM+regionR*xR;}{float regionB=step(p_uv.y,bB);float regionT=step(tB,p_uv.y);float regionC=1.0-regionB-regionT;float yB=(p_uv.y/bB)*bottom;float yT=1.0-top+((p_uv.y-tB)/topFill)*top;float yC=bottom+((p_uv.y-bB)/(tB-bB))*(1.0-bottom-top);localUV.y=regionB*yB+regionC*yC+regionT*yT;}vec2 transformedUV=(p_textureTransform*vec3(localUV,1.0)).xy;return srgbTexture2D(p_texture,transformedUV)*p_color;}";
2
-
3
- export { source as default };
@@ -1,3 +0,0 @@
1
- var source = "vec4 draw(){vec2 transformedUV=(p_textureTransform*vec3(p_uv,1.0)).xy;vec4 diffuseColor=srgbTexture2D(p_texture,transformedUV)*p_color;diffuseColor.a*=calculateMask();return diffuseColor;}";
2
-
3
- export { source as default };
@@ -1,3 +0,0 @@
1
- var source = "float calculateMask(){float aspect=p_textureResolution.x/p_textureResolution.y;vec2 p=(p_uv-0.5)*vec2(aspect,1.0);float angle=atan(p.y,p.x);angle=(angle+PI)/(2.0*PI);float adjusted=angle-p_startAngle;adjusted=p_direction>0.0 ? adjusted :-adjusted;adjusted=fract(adjusted);return step(adjusted,p_progress);}";
2
-
3
- export { source as default };
@@ -1,3 +0,0 @@
1
- var source = "float calculateMask(){float aspect=p_textureResolution.x/p_textureResolution.y;vec2 halfExtents=vec2(aspect,1.0)*0.5;float maxProjection=dot(halfExtents,abs(p_direction));vec2 correctedUV=(p_uv-0.5)*vec2(aspect,1.0);float projection=dot(correctedUV,p_direction);float offset=(projection/maxProjection+1.0)*0.5;return step(offset,p_progress);}";
2
-
3
- export { source as default };
package/dist/index.js DELETED
@@ -1,52 +0,0 @@
1
- export { UIConstraint2DBuilder } from './core/constraints/builders/UIConstraint2DBuilder.js';
2
- export { UICoverConstraintBuilder } from './core/constraints/builders/UICoverConstraintBuilder.js';
3
- export { UIFitConstraintBuilder } from './core/constraints/builders/UIFitConstraintBuilder.js';
4
- export { UIAspectConstraint } from './core/constraints/UIAspectConstraint/UIAspectConstraint.js';
5
- export { UICustomConstraint } from './core/constraints/UICustomConstraint.js';
6
- export { UIHeightConstraint } from './core/constraints/UIHeightConstraint/UIHeightConstraint.js';
7
- export { UIHorizontalDistanceConstraint } from './core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js';
8
- export { UIHorizontalInterpolationConstraint } from './core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js';
9
- export { UIHorizontalProportionConstraint } from './core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js';
10
- export { UISingleParameterConstraint } from './core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js';
11
- export { UIVerticalDistanceConstraint } from './core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js';
12
- export { UIVerticalInterpolationConstraint } from './core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js';
13
- export { UIVerticalProportionConstraint } from './core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js';
14
- export { UIWidthConstraint } from './core/constraints/UIWidthConstraint/UIWidthConstraint.js';
15
- export { UIAnchor } from './core/elements/UIAnchor/UIAnchor.js';
16
- export { UIAnimatedImage } from './core/elements/UIAnimatedImage/UIAnimatedImage.js';
17
- export { UIAnimatedImageLoopMode } from './core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js';
18
- export { UIDummy } from './core/elements/UIDummy/UIDummy.js';
19
- export { UIGraphics } from './core/elements/UIGraphics/UIGraphics.js';
20
- export { UIImage } from './core/elements/UIImage/UIImage.js';
21
- export { UINineSlice } from './core/elements/UINineSlice/UINineSlice.js';
22
- export { UINineSliceRegionMode } from './core/elements/UINineSlice/UINineSlice.Internal.js';
23
- export { UIProgress } from './core/elements/UIProgress/UIProgress.js';
24
- export { UIScene } from './core/elements/UIScene/UIScene.js';
25
- export { UISceneUpdateMode } from './core/elements/UIScene/UIScene.Internal.js';
26
- export { UIText } from './core/elements/UIText/UIText.js';
27
- export { UITextDirection, UITextResizeMode } from './core/elements/UIText/UIText.Internal.js';
28
- export { UIFullscreenLayer } from './core/layers/UIFullscreenLayer/UIFullscreenLayer.js';
29
- export { UILayer } from './core/layers/UILayer/UILayer.js';
30
- export { UIAreaCircle } from './core/miscellaneous/area/UIAreaCircle.js';
31
- export { UIAreaPolygon } from './core/miscellaneous/area/UIAreaPolygon.js';
32
- export { UIAreaRectangle } from './core/miscellaneous/area/UIAreaRectangle.js';
33
- export { UIAreaRoundedRectangle } from './core/miscellaneous/area/UIAreaRoundedRectangle.js';
34
- export { UIColor } from './core/miscellaneous/color/UIColor.js';
35
- export { UIProgressMaskFunctionCircular } from './core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js';
36
- export { UIProgressMaskFunctionDirectional } from './core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js';
37
- export { UIMicro } from './core/miscellaneous/micro/UIMicro.js';
38
- export { UIMicroAnchorMode } from './core/miscellaneous/micro/UIMicro.Internal.js';
39
- export { UIResizePolicyCover } from './core/miscellaneous/resize-policy/UIResizePolicyCover.js';
40
- export { UIResizePolicyCross } from './core/miscellaneous/resize-policy/UIResizePolicyCross.js';
41
- export { UIResizePolicyCrossInverted } from './core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js';
42
- export { UIResizePolicyFit } from './core/miscellaneous/resize-policy/UIResizePolicyFit.js';
43
- export { UIResizePolicyFixedHeight } from './core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js';
44
- export { UIResizePolicyFixedWidth } from './core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js';
45
- export { UIResizePolicyNone } from './core/miscellaneous/resize-policy/UIResizePolicyNone.js';
46
- export { UIExpression } from './core/miscellaneous/UIExpression.js';
47
- export { UIMode } from './core/miscellaneous/UIMode.js';
48
- export { UIOrientation } from './core/miscellaneous/UIOrientation.js';
49
- export { UIPriority } from './core/miscellaneous/UIPriority.js';
50
- export { UIRelation } from './core/miscellaneous/UIRelation.js';
51
- export { UITransparencyMode } from './core/miscellaneous/UITransparencyMode.js';
52
- export { UIBlendMode } from './core/miscellaneous/UIBlendMode.js';
@@ -1,93 +0,0 @@
1
- import { __exports as _2d } from '../../../_virtual/2d.js';
2
-
3
- var hasRequired_2d;
4
-
5
- function require_2d () {
6
- if (hasRequired_2d) return _2d;
7
- hasRequired_2d = 1;
8
- /*
9
- * Based on example code by Stefan Gustavson (stegu@itn.liu.se).
10
- * Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).
11
- * Better rank ordering method by Stefan Gustavson in 2012.
12
- *
13
- * This code was placed in the public domain by its original author,
14
- * Stefan Gustavson. You may use it as you see fit, but
15
- * attribution is appreciated.
16
- */
17
- Object.defineProperty(_2d, "__esModule", { value: true });
18
- _2d.makeNoise2D = void 0;
19
- var G2 = (3.0 - Math.sqrt(3.0)) / 6.0;
20
- var Grad = [
21
- [1, 1],
22
- [-1, 1],
23
- [1, -1],
24
- [-1, -1],
25
- [1, 0],
26
- [-1, 0],
27
- [1, 0],
28
- [-1, 0],
29
- [0, 1],
30
- [0, -1],
31
- [0, 1],
32
- [0, -1],
33
- ];
34
- function makeNoise2D(random) {
35
- if (random === void 0) { random = Math.random; }
36
- var p = new Uint8Array(256);
37
- for (var i = 0; i < 256; i++)
38
- p[i] = i;
39
- var n;
40
- var q;
41
- for (var i = 255; i > 0; i--) {
42
- n = Math.floor((i + 1) * random());
43
- q = p[i];
44
- p[i] = p[n];
45
- p[n] = q;
46
- }
47
- var perm = new Uint8Array(512);
48
- var permMod12 = new Uint8Array(512);
49
- for (var i = 0; i < 512; i++) {
50
- perm[i] = p[i & 255];
51
- permMod12[i] = perm[i] % 12;
52
- }
53
- return function (x, y) {
54
- // Skew the input space to determine which simplex cell we're in
55
- var s = (x + y) * 0.5 * (Math.sqrt(3.0) - 1.0); // Hairy factor for 2D
56
- var i = Math.floor(x + s);
57
- var j = Math.floor(y + s);
58
- var t = (i + j) * G2;
59
- var X0 = i - t; // Unskew the cell origin back to (x,y) space
60
- var Y0 = j - t;
61
- var x0 = x - X0; // The x,y distances from the cell origin
62
- var y0 = y - Y0;
63
- // Determine which simplex we are in.
64
- var i1 = x0 > y0 ? 1 : 0;
65
- var j1 = x0 > y0 ? 0 : 1;
66
- // Offsets for corners
67
- var x1 = x0 - i1 + G2;
68
- var y1 = y0 - j1 + G2;
69
- var x2 = x0 - 1.0 + 2.0 * G2;
70
- var y2 = y0 - 1.0 + 2.0 * G2;
71
- // Work out the hashed gradient indices of the three simplex corners
72
- var ii = i & 255;
73
- var jj = j & 255;
74
- var g0 = Grad[permMod12[ii + perm[jj]]];
75
- var g1 = Grad[permMod12[ii + i1 + perm[jj + j1]]];
76
- var g2 = Grad[permMod12[ii + 1 + perm[jj + 1]]];
77
- // Calculate the contribution from the three corners
78
- var t0 = 0.5 - x0 * x0 - y0 * y0;
79
- var n0 = t0 < 0 ? 0.0 : Math.pow(t0, 4) * (g0[0] * x0 + g0[1] * y0);
80
- var t1 = 0.5 - x1 * x1 - y1 * y1;
81
- var n1 = t1 < 0 ? 0.0 : Math.pow(t1, 4) * (g1[0] * x1 + g1[1] * y1);
82
- var t2 = 0.5 - x2 * x2 - y2 * y2;
83
- var n2 = t2 < 0 ? 0.0 : Math.pow(t2, 4) * (g2[0] * x2 + g2[1] * y2);
84
- // Add contributions from each corner to get the final noise value.
85
- // The result is scaled to return values in the interval [-1, 1]
86
- return 70.14805770653952 * (n0 + n1 + n2);
87
- };
88
- }
89
- _2d.makeNoise2D = makeNoise2D;
90
- return _2d;
91
- }
92
-
93
- export { require_2d as __require };