laymur 0.16.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 (266) hide show
  1. package/README.md +84 -208
  2. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +41 -0
  3. package/dist/{constraints → core/constraints}/UIConstraint.d.ts +2 -2
  4. package/dist/core/constraints/UIConstraint.js +11 -0
  5. package/dist/core/constraints/UICustomConstraint.js +37 -0
  6. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +34 -0
  7. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +3 -0
  8. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +100 -0
  9. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +4 -0
  10. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +136 -0
  11. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +40 -0
  12. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +71 -0
  13. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +3 -0
  14. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +100 -0
  15. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +4 -0
  16. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +136 -0
  17. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +40 -0
  18. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +34 -0
  19. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +19 -0
  20. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +138 -0
  21. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +3 -0
  22. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +63 -0
  23. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +3 -0
  24. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +63 -0
  25. package/dist/{elements → core/elements}/UIAnchor/UIAnchor.Internal.d.ts +3 -0
  26. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +5 -0
  27. package/dist/{elements → core/elements}/UIAnchor/UIAnchor.d.ts +3 -3
  28. package/dist/core/elements/UIAnchor/UIAnchor.js +49 -0
  29. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +15 -0
  30. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +259 -0
  31. package/dist/core/elements/UIDummy/UIDummy.Internal.js +8 -0
  32. package/dist/{elements → core/elements}/UIDummy/UIDummy.d.ts +2 -2
  33. package/dist/core/elements/UIDummy/UIDummy.js +173 -0
  34. package/dist/core/elements/UIElement/UIElement.Internal.js +5 -0
  35. package/dist/{elements → core/elements}/UIElement/UIElement.d.ts +2 -2
  36. package/dist/core/elements/UIElement/UIElement.js +74 -0
  37. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +7 -0
  38. package/dist/core/elements/UIGraphics/UIGraphics.js +126 -0
  39. package/dist/core/elements/UIImage/UIImage.js +85 -0
  40. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +12 -0
  41. package/dist/core/elements/UINineSlice/UINineSlice.js +188 -0
  42. package/dist/core/elements/UIProgress/UIProgress.Internal.js +3 -0
  43. package/dist/core/elements/UIProgress/UIProgress.js +165 -0
  44. package/dist/core/elements/UIScene/UIScene.Internal.js +27 -0
  45. package/dist/core/elements/UIScene/UIScene.js +157 -0
  46. package/dist/core/elements/UIText/UIText.Internal.js +12 -0
  47. package/dist/core/elements/UIText/UIText.Measuring.js +153 -0
  48. package/dist/core/elements/UIText/UIText.Rendering.js +61 -0
  49. package/dist/core/elements/UIText/UIText.js +265 -0
  50. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +5 -0
  51. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +147 -0
  52. package/dist/core/layers/UILayer/UILayer.Internal.js +7 -0
  53. package/dist/core/layers/UILayer/UILayer.js +113 -0
  54. package/dist/core/miscellaneous/UIExpression.js +128 -0
  55. package/dist/core/miscellaneous/UIMode.js +30 -0
  56. package/dist/core/miscellaneous/UIOrientation.js +20 -0
  57. package/dist/core/miscellaneous/UIPriority.js +63 -0
  58. package/dist/core/miscellaneous/UIRelation.js +40 -0
  59. package/dist/core/miscellaneous/UITransparencyMode.js +12 -0
  60. package/dist/core/miscellaneous/area/UIArea.js +5 -0
  61. package/dist/core/miscellaneous/area/UIAreaCircle.js +32 -0
  62. package/dist/core/miscellaneous/area/UIAreaPolygon.js +40 -0
  63. package/dist/core/miscellaneous/area/UIAreaRectangle.js +36 -0
  64. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +72 -0
  65. package/dist/core/miscellaneous/asserts.js +163 -0
  66. package/dist/core/miscellaneous/canvas.js +37 -0
  67. package/dist/core/miscellaneous/color/UIColor.Internal.js +42 -0
  68. package/dist/core/miscellaneous/color/UIColor.js +636 -0
  69. package/dist/core/miscellaneous/computeTransform.js +82 -0
  70. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +168 -0
  71. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +349 -0
  72. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +357 -0
  73. package/dist/core/miscellaneous/generic-plane/shared.js +228 -0
  74. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +3 -0
  75. package/dist/core/miscellaneous/insets/UIInsets.js +224 -0
  76. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +19 -0
  77. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +51 -0
  78. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +48 -0
  79. package/dist/{miscellaneous → core/miscellaneous}/math.d.ts +2 -0
  80. package/dist/core/miscellaneous/math.js +11 -0
  81. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +15 -0
  82. package/dist/core/miscellaneous/micro/UIMicro.js +181 -0
  83. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +9 -0
  84. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +50 -0
  85. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +52 -0
  86. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +52 -0
  87. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +50 -0
  88. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +52 -0
  89. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +52 -0
  90. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +13 -0
  91. package/dist/core/miscellaneous/shared.js +37 -0
  92. package/dist/core/miscellaneous/text-span/UITextSpan.js +36 -0
  93. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +17 -0
  94. package/dist/core/miscellaneous/text-style/UITextStyle.js +372 -0
  95. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +6 -0
  96. package/dist/core/miscellaneous/texture/UITextureView.js +234 -0
  97. package/dist/core/miscellaneous/webglCapabilities.js +103 -0
  98. package/dist/core/shaders/UIImage.glsl.js +3 -0
  99. package/dist/core/shaders/UINineSlice.glsl.js +3 -0
  100. package/dist/core/shaders/UIProgress.glsl.js +3 -0
  101. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +3 -0
  102. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +3 -0
  103. package/dist/{wrappers → core/wrappers}/UIInputWrapper/UIInputWrapper.Internal.d.ts +1 -1
  104. package/dist/{wrappers → core/wrappers}/UIInputWrapper/UIInputWrapper.d.ts +2 -2
  105. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +108 -0
  106. package/dist/{wrappers → core/wrappers}/UISceneWrapper/UISceneWrapper.Internal.d.ts +1 -1
  107. package/dist/{wrappers → core/wrappers}/UISceneWrapper/UISceneWrapper.d.ts +2 -2
  108. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +75 -0
  109. package/dist/{wrappers → core/wrappers}/UISolverWrapper/UISolverWrapper.Internal.d.ts +1 -1
  110. package/dist/{wrappers → core/wrappers}/UISolverWrapper/UISolverWrapper.d.ts +2 -2
  111. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +505 -0
  112. package/dist/index.js +51 -9246
  113. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +21 -0
  114. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +47 -0
  115. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +14 -0
  116. package/dist/particles/behaviorModules/UIBehaviorModule.js +9 -0
  117. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +39 -0
  118. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +110 -0
  119. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +22 -0
  120. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +66 -0
  121. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +20 -0
  122. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +48 -0
  123. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +26 -0
  124. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +66 -0
  125. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +20 -0
  126. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +49 -0
  127. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +26 -0
  128. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +70 -0
  129. package/dist/particles/elements/UIEmitter.Internal.d.ts +15 -0
  130. package/dist/particles/elements/UIEmitter.Internal.js +11 -0
  131. package/dist/particles/elements/UIEmitter.d.ts +68 -0
  132. package/dist/particles/elements/UIEmitter.js +203 -0
  133. package/dist/particles/index.d.ts +18 -0
  134. package/dist/particles/index.js +18 -0
  135. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +13 -0
  136. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +211 -0
  137. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +17 -0
  138. package/dist/particles/instancedParticle/UIInstancedParticle.js +93 -0
  139. package/dist/particles/miscellaneous/miscellaneous.d.ts +32 -0
  140. package/dist/particles/miscellaneous/miscellaneous.js +67 -0
  141. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +14 -0
  142. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +32 -0
  143. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +15 -0
  144. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +37 -0
  145. package/dist/particles/renderingModules/UIRenderingModule.d.ts +8 -0
  146. package/dist/particles/renderingModules/UIRenderingModule.js +9 -0
  147. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +14 -0
  148. package/dist/particles/renderingModules/UIRenderingTexture.js +26 -0
  149. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +3 -0
  150. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +3 -0
  151. package/dist/particles/shaders/UIRenderingTexture.glsl.js +3 -0
  152. package/dist/particles/spawnModules/UISpawnModule.d.ts +9 -0
  153. package/dist/particles/spawnModules/UISpawnModule.js +9 -0
  154. package/dist/particles/spawnModules/UISpawnOffset.d.ts +21 -0
  155. package/dist/particles/spawnModules/UISpawnOffset.js +46 -0
  156. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +20 -0
  157. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +47 -0
  158. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +20 -0
  159. package/dist/particles/spawnModules/UISpawnRandomRotation.js +45 -0
  160. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +26 -0
  161. package/dist/particles/spawnModules/UISpawnRandomScale.js +60 -0
  162. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +20 -0
  163. package/dist/particles/spawnModules/UISpawnRandomTorque.js +45 -0
  164. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +26 -0
  165. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +64 -0
  166. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +27 -0
  167. package/dist/particles/spawnModules/UISpawnRectangle.js +62 -0
  168. package/package.json +27 -36
  169. package/dist/index.js.map +0 -1
  170. package/dist/index.min.js +0 -2
  171. package/dist/index.min.js.map +0 -1
  172. /package/dist/{constraints → core/constraints}/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +0 -0
  173. /package/dist/{constraints → core/constraints}/UIAspectConstraint/UIAspectConstraint.d.ts +0 -0
  174. /package/dist/{constraints → core/constraints}/UICustomConstraint.d.ts +0 -0
  175. /package/dist/{constraints → core/constraints}/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +0 -0
  176. /package/dist/{constraints → core/constraints}/UIHeightConstraint/UIHeightConstraint.d.ts +0 -0
  177. /package/dist/{constraints → core/constraints}/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +0 -0
  178. /package/dist/{constraints → core/constraints}/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +0 -0
  179. /package/dist/{constraints → core/constraints}/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +0 -0
  180. /package/dist/{constraints → core/constraints}/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +0 -0
  181. /package/dist/{constraints → core/constraints}/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +0 -0
  182. /package/dist/{constraints → core/constraints}/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +0 -0
  183. /package/dist/{constraints → core/constraints}/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +0 -0
  184. /package/dist/{constraints → core/constraints}/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +0 -0
  185. /package/dist/{constraints → core/constraints}/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +0 -0
  186. /package/dist/{constraints → core/constraints}/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +0 -0
  187. /package/dist/{constraints → core/constraints}/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +0 -0
  188. /package/dist/{constraints → core/constraints}/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +0 -0
  189. /package/dist/{constraints → core/constraints}/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +0 -0
  190. /package/dist/{constraints → core/constraints}/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +0 -0
  191. /package/dist/{constraints → core/constraints}/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +0 -0
  192. /package/dist/{constraints → core/constraints}/UIWidthConstraint/UIWidthConstraint.d.ts +0 -0
  193. /package/dist/{constraints → core/constraints}/builders/UIConstraint2DBuilder.Internal.d.ts +0 -0
  194. /package/dist/{constraints → core/constraints}/builders/UIConstraint2DBuilder.d.ts +0 -0
  195. /package/dist/{constraints → core/constraints}/builders/UICoverConstraintBuilder.Internal.d.ts +0 -0
  196. /package/dist/{constraints → core/constraints}/builders/UICoverConstraintBuilder.d.ts +0 -0
  197. /package/dist/{constraints → core/constraints}/builders/UIFitConstraintBuilder.Internal.d.ts +0 -0
  198. /package/dist/{constraints → core/constraints}/builders/UIFitConstraintBuilder.d.ts +0 -0
  199. /package/dist/{elements → core/elements}/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +0 -0
  200. /package/dist/{elements → core/elements}/UIAnimatedImage/UIAnimatedImage.d.ts +0 -0
  201. /package/dist/{elements → core/elements}/UIDummy/UIDummy.Internal.d.ts +0 -0
  202. /package/dist/{elements → core/elements}/UIElement/UIElement.Internal.d.ts +0 -0
  203. /package/dist/{elements → core/elements}/UIGraphics/UIGraphics.Internal.d.ts +0 -0
  204. /package/dist/{elements → core/elements}/UIGraphics/UIGraphics.d.ts +0 -0
  205. /package/dist/{elements → core/elements}/UIImage/UIImage.Internal.d.ts +0 -0
  206. /package/dist/{elements → core/elements}/UIImage/UIImage.d.ts +0 -0
  207. /package/dist/{elements → core/elements}/UINineSlice/UINineSlice.Internal.d.ts +0 -0
  208. /package/dist/{elements → core/elements}/UINineSlice/UINineSlice.d.ts +0 -0
  209. /package/dist/{elements → core/elements}/UIProgress/UIProgress.Internal.d.ts +0 -0
  210. /package/dist/{elements → core/elements}/UIProgress/UIProgress.d.ts +0 -0
  211. /package/dist/{elements → core/elements}/UIScene/UIScene.Internal.d.ts +0 -0
  212. /package/dist/{elements → core/elements}/UIScene/UIScene.d.ts +0 -0
  213. /package/dist/{elements → core/elements}/UIText/UIText.Interfaces.d.ts +0 -0
  214. /package/dist/{elements → core/elements}/UIText/UIText.Internal.d.ts +0 -0
  215. /package/dist/{elements → core/elements}/UIText/UIText.Measuring.d.ts +0 -0
  216. /package/dist/{elements → core/elements}/UIText/UIText.Rendering.d.ts +0 -0
  217. /package/dist/{elements → core/elements}/UIText/UIText.d.ts +0 -0
  218. /package/dist/{index.d.ts → core/index.d.ts} +0 -0
  219. /package/dist/{layers → core/layers}/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +0 -0
  220. /package/dist/{layers → core/layers}/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -0
  221. /package/dist/{layers → core/layers}/UILayer/UILayer.Internal.d.ts +0 -0
  222. /package/dist/{layers → core/layers}/UILayer/UILayer.d.ts +0 -0
  223. /package/dist/{miscellaneous → core/miscellaneous}/UIExpression.d.ts +0 -0
  224. /package/dist/{miscellaneous → core/miscellaneous}/UIMode.d.ts +0 -0
  225. /package/dist/{miscellaneous → core/miscellaneous}/UIOrientation.d.ts +0 -0
  226. /package/dist/{miscellaneous → core/miscellaneous}/UIPriority.d.ts +0 -0
  227. /package/dist/{miscellaneous → core/miscellaneous}/UIRelation.d.ts +0 -0
  228. /package/dist/{miscellaneous → core/miscellaneous}/UITransparencyMode.d.ts +0 -0
  229. /package/dist/{miscellaneous → core/miscellaneous}/area/UIArea.d.ts +0 -0
  230. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaCircle.d.ts +0 -0
  231. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaPolygon.d.ts +0 -0
  232. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaRectangle.d.ts +0 -0
  233. /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaRoundedRectangle.d.ts +0 -0
  234. /package/dist/{miscellaneous → core/miscellaneous}/asserts.d.ts +0 -0
  235. /package/dist/{miscellaneous → core/miscellaneous}/canvas.d.ts +0 -0
  236. /package/dist/{miscellaneous → core/miscellaneous}/color/UIColor.Internal.d.ts +0 -0
  237. /package/dist/{miscellaneous → core/miscellaneous}/color/UIColor.d.ts +0 -0
  238. /package/dist/{miscellaneous → core/miscellaneous}/computeTransform.d.ts +0 -0
  239. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +0 -0
  240. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +0 -0
  241. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +0 -0
  242. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +0 -0
  243. /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/shared.d.ts +0 -0
  244. /package/dist/{miscellaneous → core/miscellaneous}/insets/UIInsets.Internal.d.ts +0 -0
  245. /package/dist/{miscellaneous → core/miscellaneous}/insets/UIInsets.d.ts +0 -0
  246. /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunction.d.ts +0 -0
  247. /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunctionCircular.d.ts +0 -0
  248. /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunctionDirectional.d.ts +0 -0
  249. /package/dist/{miscellaneous → core/miscellaneous}/micro/UIMicro.Internal.d.ts +0 -0
  250. /package/dist/{miscellaneous → core/miscellaneous}/micro/UIMicro.d.ts +0 -0
  251. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicy.d.ts +0 -0
  252. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCover.d.ts +0 -0
  253. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCross.d.ts +0 -0
  254. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCrossInverted.d.ts +0 -0
  255. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFit.d.ts +0 -0
  256. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFixedHeight.d.ts +0 -0
  257. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFixedWidth.d.ts +0 -0
  258. /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyNone.d.ts +0 -0
  259. /package/dist/{miscellaneous → core/miscellaneous}/shared.d.ts +0 -0
  260. /package/dist/{miscellaneous → core/miscellaneous}/text-span/UITextSpan.Internal.d.ts +0 -0
  261. /package/dist/{miscellaneous → core/miscellaneous}/text-span/UITextSpan.d.ts +0 -0
  262. /package/dist/{miscellaneous → core/miscellaneous}/text-style/UITextStyle.Internal.d.ts +0 -0
  263. /package/dist/{miscellaneous → core/miscellaneous}/text-style/UITextStyle.d.ts +0 -0
  264. /package/dist/{miscellaneous → core/miscellaneous}/texture/UITextureView.Internal.d.ts +0 -0
  265. /package/dist/{miscellaneous → core/miscellaneous}/texture/UITextureView.d.ts +0 -0
  266. /package/dist/{miscellaneous → core/miscellaneous}/webglCapabilities.d.ts +0 -0
@@ -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
+ }
@@ -0,0 +1,64 @@
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
+
6
+ /**
7
+ * Assigns random velocity to particles.
8
+ *
9
+ * Direction and magnitude are chosen independently from their respective ranges.
10
+ */
11
+ class UISpawnRandomVelocity extends UISpawnModule {
12
+ /**
13
+ * @param angle - Direction range in radians. Accepts number, tuple, or range object
14
+ * @param magnitude - Speed range in units/second. Accepts number, tuple, or range object
15
+ */
16
+ constructor(angle = { min: -Math.PI, max: Math.PI }, magnitude = { min: -50, max: 50 }) {
17
+ super();
18
+ /** @internal */
19
+ 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");
26
+ }
27
+ /** Direction range in radians */
28
+ get angle() {
29
+ return this._private_angleInternal;
30
+ }
31
+ /** Speed range in units/second */
32
+ get magnitude() {
33
+ return this._private_magnitudeInternal;
34
+ }
35
+ /** Direction range in radians */
36
+ 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");
40
+ }
41
+ /** Speed range in units/second */
42
+ 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");
46
+ }
47
+ /** @internal */
48
+ spawn(properties, instanceBegin, instanceEnd) {
49
+ const { builtin } = properties;
50
+ const { array, itemSize } = builtin;
51
+ const { min: angleMin, max: angleMax } = this._private_angleInternal;
52
+ const { min: magnitudeMin, max: magnitudeMax } = this._private_magnitudeInternal;
53
+ for (let i = instanceBegin; i < instanceEnd; i++) {
54
+ const itemOffset = i * itemSize;
55
+ const angle = MathUtils.randFloat(angleMin, angleMax);
56
+ const magnitude = MathUtils.randFloat(magnitudeMin, magnitudeMax);
57
+ array[itemOffset + BUILTIN_OFFSET_VELOCITY_X] = Math.cos(angle) * magnitude;
58
+ array[itemOffset + BUILTIN_OFFSET_VELOCITY_Y] = Math.sin(angle) * magnitude;
59
+ }
60
+ builtin.needsUpdate = true;
61
+ }
62
+ }
63
+
64
+ export { UISpawnRandomVelocity };
@@ -0,0 +1,27 @@
1
+ import type { Vector2Like } from "../../core/miscellaneous/math";
2
+ import { type UIVector2Config } from "../miscellaneous/miscellaneous";
3
+ import { UISpawnModule } from "./UISpawnModule";
4
+ /**
5
+ * Spawns particles at random positions within a rectangle.
6
+ *
7
+ * Position is chosen uniformly within the bounds defined by min and max.
8
+ */
9
+ export declare class UISpawnRectangle extends UISpawnModule<{
10
+ builtin: "Matrix4";
11
+ }> {
12
+ private minInternal;
13
+ private maxInternal;
14
+ /**
15
+ * @param min - Bottom-left corner of spawn area
16
+ * @param max - Top-right corner of spawn area
17
+ */
18
+ constructor(min?: UIVector2Config, max?: UIVector2Config);
19
+ /** Bottom-left corner of spawn area */
20
+ get min(): Vector2Like;
21
+ /** Top-right corner of spawn area */
22
+ get max(): Vector2Like;
23
+ /** Bottom-left corner of spawn area */
24
+ set min(value: UIVector2Config);
25
+ /** Top-right corner of spawn area */
26
+ set max(value: UIVector2Config);
27
+ }
@@ -0,0 +1,62 @@
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
+
6
+ /**
7
+ * Spawns particles at random positions within a rectangle.
8
+ *
9
+ * Position is chosen uniformly within the bounds defined by min and max.
10
+ */
11
+ class UISpawnRectangle extends UISpawnModule {
12
+ /**
13
+ * @param min - Bottom-left corner of spawn area
14
+ * @param max - Top-right corner of spawn area
15
+ */
16
+ constructor(min = { x: -50, y: -50 }, max = { x: 50, y: 50 }) {
17
+ super();
18
+ /** @internal */
19
+ 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");
26
+ }
27
+ /** Bottom-left corner of spawn area */
28
+ get min() {
29
+ return this._private_minInternal;
30
+ }
31
+ /** Top-right corner of spawn area */
32
+ get max() {
33
+ return this._private_maxInternal;
34
+ }
35
+ /** Bottom-left corner of spawn area */
36
+ 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");
40
+ }
41
+ /** Top-right corner of spawn area */
42
+ 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");
46
+ }
47
+ /** @internal */
48
+ spawn(properties, instanceBegin, instanceEnd) {
49
+ const { builtin } = properties;
50
+ const { array, itemSize } = builtin;
51
+ const { x: minX, y: minY } = this._private_minInternal;
52
+ const { x: maxX, y: maxY } = this._private_maxInternal;
53
+ for (let i = instanceBegin; i < instanceEnd; i++) {
54
+ const itemOffset = i * itemSize;
55
+ array[itemOffset + BUILTIN_OFFSET_POSITION_X] = MathUtils.randFloat(minX, maxX);
56
+ array[itemOffset + BUILTIN_OFFSET_POSITION_Y] = MathUtils.randFloat(minY, maxY);
57
+ }
58
+ builtin.needsUpdate = true;
59
+ }
60
+ }
61
+
62
+ export { UISpawnRectangle };
package/package.json CHANGED
@@ -1,35 +1,7 @@
1
1
  {
2
2
  "name": "laymur",
3
- "version": "0.16.0",
3
+ "version": "0.17.1",
4
4
  "description": "Constraint-based UI library for Three.js mobile advertisements",
5
- "scripts": {
6
- "clean": "rm -rf dist",
7
- "build": "npm run clean && rollup -c",
8
- "build:prod": "npm run clean && NODE_ENV=production rollup -c",
9
- "prepublishOnly": "npm run build:prod"
10
- },
11
- "main": "dist/index.js",
12
- "module": "dist/index.js",
13
- "types": "dist/index.d.ts",
14
- "exports": {
15
- ".": {
16
- "import": {
17
- "types": "./dist/index.d.ts",
18
- "development": "./dist/index.js",
19
- "production": "./dist/index.min.js",
20
- "default": "./dist/index.min.js"
21
- },
22
- "require": {
23
- "types": "./dist/index.d.ts",
24
- "default": "./dist/index.min.js"
25
- }
26
- },
27
- "./package.json": "./package.json"
28
- },
29
- "files": [
30
- "dist"
31
- ],
32
- "sideEffects": false,
33
5
  "keywords": [
34
6
  "ui",
35
7
  "three.js",
@@ -46,13 +18,36 @@
46
18
  "url": "git+https://github.com/jango-git/laymur.git"
47
19
  },
48
20
  "type": "module",
21
+ "sideEffects": false,
22
+ "scripts": {
23
+ "clean": "rm -rf dist",
24
+ "build": "npm run clean && rollup -c",
25
+ "prepublishOnly": "npm run build"
26
+ },
27
+ "main": "./dist/index.js",
28
+ "module": "./dist/index.js",
29
+ "files": [
30
+ "dist",
31
+ "README.md",
32
+ "LICENSE"
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "import": "./dist/index.js",
37
+ "types": "./dist/core/index.d.ts"
38
+ },
39
+ "./particles": {
40
+ "import": "./dist/particles/index.js",
41
+ "types": "./dist/particles/index.d.ts"
42
+ }
43
+ },
49
44
  "peerDependencies": {
50
- "three": ">=0.157.0 <0.180.0"
45
+ "three": ">=0.157.0 <0.180.0",
46
+ "@lume/kiwi": "^0.4.4",
47
+ "ferrsign": "^0.0.4"
51
48
  },
52
49
  "devDependencies": {
53
50
  "@rollup/plugin-node-resolve": "^16.0.1",
54
- "@rollup/plugin-replace": "^6.0.3",
55
- "@rollup/plugin-terser": "^0.4.4",
56
51
  "@types/node": "^25.0.2",
57
52
  "@types/three": "^0.157.0",
58
53
  "@typescript-eslint/eslint-plugin": "^8.32.0",
@@ -63,9 +58,5 @@
63
58
  "rollup-plugin-typescript2": "^0.36.0",
64
59
  "ts-transformer-minify-privates": "^1.0.0",
65
60
  "typescript": "^5.8.3"
66
- },
67
- "dependencies": {
68
- "@lume/kiwi": "^0.4.4",
69
- "ferrsign": "^0.0.4"
70
61
  }
71
62
  }