laymur 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/{src/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.ts → dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts} +2 -3
  2. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +22 -0
  3. package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +41 -0
  4. package/dist/core/constraints/UIConstraint.d.ts +12 -0
  5. package/dist/core/constraints/UIConstraint.js +11 -0
  6. package/dist/core/constraints/UICustomConstraint.d.ts +28 -0
  7. package/dist/core/constraints/UICustomConstraint.js +37 -0
  8. package/{src/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.ts → dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts} +2 -3
  9. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +20 -0
  10. package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +34 -0
  11. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +11 -0
  12. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +3 -0
  13. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +36 -0
  14. package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +100 -0
  15. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +14 -0
  16. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +4 -0
  17. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +44 -0
  18. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +136 -0
  19. package/{src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.ts → dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts} +2 -3
  20. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +22 -0
  21. package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +40 -0
  22. package/{src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.ts → dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts} +8 -9
  23. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +43 -0
  24. package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +71 -0
  25. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +11 -0
  26. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +3 -0
  27. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +32 -0
  28. package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +100 -0
  29. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +14 -0
  30. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +4 -0
  31. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +44 -0
  32. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +136 -0
  33. package/{src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.ts → dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts} +2 -3
  34. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +22 -0
  35. package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +40 -0
  36. package/{src/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.ts → dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts} +2 -3
  37. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +20 -0
  38. package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +34 -0
  39. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +64 -0
  40. package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +19 -0
  41. package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +46 -0
  42. package/dist/core/constraints/builders/UIConstraint2DBuilder.js +138 -0
  43. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +13 -0
  44. package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +3 -0
  45. package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +29 -0
  46. package/dist/core/constraints/builders/UICoverConstraintBuilder.js +63 -0
  47. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +13 -0
  48. package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +3 -0
  49. package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +29 -0
  50. package/dist/core/constraints/builders/UIFitConstraintBuilder.js +63 -0
  51. package/dist/core/elements/UIAnchor/UIAnchor.Internal.d.ts +12 -0
  52. package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +5 -0
  53. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +32 -0
  54. package/dist/core/elements/UIAnchor/UIAnchor.js +49 -0
  55. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +27 -0
  56. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +15 -0
  57. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +77 -0
  58. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +259 -0
  59. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +30 -0
  60. package/dist/core/elements/UIDummy/UIDummy.Internal.js +8 -0
  61. package/dist/core/elements/UIDummy/UIDummy.d.ts +82 -0
  62. package/dist/core/elements/UIDummy/UIDummy.js +173 -0
  63. package/{src/core/elements/UIElement/UIElement.Internal.ts → dist/core/elements/UIElement/UIElement.Internal.d.ts} +5 -7
  64. package/dist/core/elements/UIElement/UIElement.Internal.js +5 -0
  65. package/dist/core/elements/UIElement/UIElement.d.ts +38 -0
  66. package/dist/core/elements/UIElement/UIElement.js +74 -0
  67. package/{src/core/elements/UIGraphics/UIGraphics.Internal.ts → dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts} +5 -7
  68. package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +7 -0
  69. package/dist/core/elements/UIGraphics/UIGraphics.d.ts +51 -0
  70. package/dist/core/elements/UIGraphics/UIGraphics.js +126 -0
  71. package/{src/core/elements/UIImage/UIImage.Internal.ts → dist/core/elements/UIImage/UIImage.Internal.d.ts} +2 -3
  72. package/dist/core/elements/UIImage/UIImage.d.ts +32 -0
  73. package/dist/core/elements/UIImage/UIImage.js +85 -0
  74. package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +23 -0
  75. package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +12 -0
  76. package/dist/core/elements/UINineSlice/UINineSlice.d.ts +60 -0
  77. package/dist/core/elements/UINineSlice/UINineSlice.js +188 -0
  78. package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +14 -0
  79. package/dist/core/elements/UIProgress/UIProgress.Internal.js +3 -0
  80. package/dist/core/elements/UIProgress/UIProgress.d.ts +45 -0
  81. package/dist/core/elements/UIProgress/UIProgress.js +165 -0
  82. package/dist/core/elements/UIScene/UIScene.Internal.d.ts +43 -0
  83. package/dist/core/elements/UIScene/UIScene.Internal.js +27 -0
  84. package/dist/core/elements/UIScene/UIScene.d.ts +59 -0
  85. package/dist/core/elements/UIScene/UIScene.js +157 -0
  86. package/{src/core/elements/UIText/UIText.Interfaces.ts → dist/core/elements/UIText/UIText.Interfaces.d.ts} +16 -21
  87. package/dist/core/elements/UIText/UIText.Internal.d.ts +26 -0
  88. package/dist/core/elements/UIText/UIText.Internal.js +12 -0
  89. package/dist/core/elements/UIText/UIText.Measuring.d.ts +50 -0
  90. package/dist/core/elements/UIText/UIText.Measuring.js +153 -0
  91. package/dist/core/elements/UIText/UIText.Rendering.d.ts +20 -0
  92. package/dist/core/elements/UIText/UIText.Rendering.js +61 -0
  93. package/dist/core/elements/UIText/UIText.d.ts +71 -0
  94. package/dist/core/elements/UIText/UIText.js +265 -0
  95. package/{src/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.ts → dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts} +11 -14
  96. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +5 -0
  97. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +63 -0
  98. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +147 -0
  99. package/{src/core/layers/UILayer/UILayer.Internal.ts → dist/core/layers/UILayer/UILayer.Internal.d.ts} +11 -15
  100. package/dist/core/layers/UILayer/UILayer.Internal.js +7 -0
  101. package/dist/core/layers/UILayer/UILayer.d.ts +49 -0
  102. package/dist/core/layers/UILayer/UILayer.js +113 -0
  103. package/dist/core/miscellaneous/UIExpression.d.ts +69 -0
  104. package/dist/core/miscellaneous/UIExpression.js +128 -0
  105. package/dist/core/miscellaneous/UIMode.d.ts +23 -0
  106. package/dist/core/miscellaneous/UIMode.js +30 -0
  107. package/dist/core/miscellaneous/UIOrientation.d.ts +15 -0
  108. package/dist/core/miscellaneous/UIOrientation.js +20 -0
  109. package/dist/core/miscellaneous/UIPriority.d.ts +32 -0
  110. package/dist/core/miscellaneous/UIPriority.js +63 -0
  111. package/dist/core/miscellaneous/UIRelation.d.ts +23 -0
  112. package/dist/core/miscellaneous/UIRelation.js +40 -0
  113. package/dist/core/miscellaneous/UITransparencyMode.d.ts +9 -0
  114. package/dist/core/miscellaneous/UITransparencyMode.js +12 -0
  115. package/dist/core/miscellaneous/area/UIArea.d.ts +3 -0
  116. package/dist/core/miscellaneous/area/UIArea.js +5 -0
  117. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +15 -0
  118. package/dist/core/miscellaneous/area/UIAreaCircle.js +32 -0
  119. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +12 -0
  120. package/dist/core/miscellaneous/area/UIAreaPolygon.js +40 -0
  121. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +17 -0
  122. package/dist/core/miscellaneous/area/UIAreaRectangle.js +36 -0
  123. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +21 -0
  124. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +72 -0
  125. package/dist/core/miscellaneous/asserts.d.ts +43 -0
  126. package/dist/core/miscellaneous/asserts.js +163 -0
  127. package/dist/core/miscellaneous/canvas.d.ts +31 -0
  128. package/dist/core/miscellaneous/canvas.js +37 -0
  129. package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +7 -0
  130. package/dist/core/miscellaneous/color/UIColor.Internal.js +42 -0
  131. package/dist/core/miscellaneous/color/UIColor.d.ts +234 -0
  132. package/dist/core/miscellaneous/color/UIColor.js +636 -0
  133. package/dist/core/miscellaneous/computeTransform.d.ts +18 -0
  134. package/dist/core/miscellaneous/computeTransform.js +82 -0
  135. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +19 -0
  136. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +168 -0
  137. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +1 -0
  138. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +349 -0
  139. package/{src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.ts → dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts} +8 -10
  140. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +1 -0
  141. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +357 -0
  142. package/dist/core/miscellaneous/generic-plane/shared.d.ts +38 -0
  143. package/dist/core/miscellaneous/generic-plane/shared.js +228 -0
  144. package/dist/core/miscellaneous/insets/UIInsets.Internal.d.ts +11 -0
  145. package/dist/core/miscellaneous/insets/UIInsets.Internal.js +3 -0
  146. package/dist/core/miscellaneous/insets/UIInsets.d.ts +48 -0
  147. package/dist/core/miscellaneous/insets/UIInsets.js +224 -0
  148. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +9 -0
  149. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +19 -0
  150. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +21 -0
  151. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +51 -0
  152. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +16 -0
  153. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +48 -0
  154. package/dist/core/miscellaneous/math.d.ts +7 -0
  155. package/dist/core/miscellaneous/math.js +11 -0
  156. package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +31 -0
  157. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +15 -0
  158. package/dist/core/miscellaneous/micro/UIMicro.d.ts +59 -0
  159. package/dist/core/miscellaneous/micro/UIMicro.js +181 -0
  160. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +3 -0
  161. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +9 -0
  162. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +22 -0
  163. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +50 -0
  164. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +22 -0
  165. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +52 -0
  166. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +22 -0
  167. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +52 -0
  168. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +22 -0
  169. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +50 -0
  170. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +22 -0
  171. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +52 -0
  172. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +22 -0
  173. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +52 -0
  174. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +5 -0
  175. package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +13 -0
  176. package/dist/core/miscellaneous/shared.d.ts +46 -0
  177. package/dist/core/miscellaneous/shared.js +37 -0
  178. package/{src/core/miscellaneous/text-span/UITextSpan.Internal.ts → dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts} +4 -5
  179. package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +14 -0
  180. package/dist/core/miscellaneous/text-span/UITextSpan.js +36 -0
  181. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.d.ts +48 -0
  182. package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +17 -0
  183. package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +85 -0
  184. package/dist/core/miscellaneous/text-style/UITextStyle.js +372 -0
  185. package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +49 -0
  186. package/dist/core/miscellaneous/texture/UITextureView.Internal.js +6 -0
  187. package/dist/core/miscellaneous/texture/UITextureView.d.ts +67 -0
  188. package/dist/core/miscellaneous/texture/UITextureView.js +234 -0
  189. package/dist/core/miscellaneous/webglCapabilities.d.ts +2 -0
  190. package/dist/core/miscellaneous/webglCapabilities.js +103 -0
  191. package/dist/core/shaders/UIImage.glsl.js +3 -0
  192. package/dist/core/shaders/UINineSlice.glsl.js +3 -0
  193. package/dist/core/shaders/UIProgress.glsl.js +3 -0
  194. package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +3 -0
  195. package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +3 -0
  196. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +17 -0
  197. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +13 -0
  198. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +108 -0
  199. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +13 -0
  200. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +20 -0
  201. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +75 -0
  202. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +49 -0
  203. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +215 -0
  204. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +505 -0
  205. package/dist/index.js +51 -0
  206. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +21 -0
  207. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +47 -0
  208. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +14 -0
  209. package/dist/particles/behaviorModules/UIBehaviorModule.js +9 -0
  210. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +39 -0
  211. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +110 -0
  212. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +22 -0
  213. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +66 -0
  214. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +20 -0
  215. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +48 -0
  216. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +26 -0
  217. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +66 -0
  218. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +20 -0
  219. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +49 -0
  220. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +26 -0
  221. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +70 -0
  222. package/dist/particles/elements/UIEmitter.Internal.d.ts +15 -0
  223. package/dist/particles/elements/UIEmitter.Internal.js +11 -0
  224. package/dist/particles/elements/UIEmitter.d.ts +68 -0
  225. package/dist/particles/elements/UIEmitter.js +203 -0
  226. package/dist/particles/index.js +18 -0
  227. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +13 -0
  228. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +211 -0
  229. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +17 -0
  230. package/dist/particles/instancedParticle/UIInstancedParticle.js +93 -0
  231. package/dist/particles/miscellaneous/miscellaneous.d.ts +32 -0
  232. package/dist/particles/miscellaneous/miscellaneous.js +67 -0
  233. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +14 -0
  234. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +32 -0
  235. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +15 -0
  236. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +37 -0
  237. package/dist/particles/renderingModules/UIRenderingModule.d.ts +8 -0
  238. package/dist/particles/renderingModules/UIRenderingModule.js +9 -0
  239. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +14 -0
  240. package/dist/particles/renderingModules/UIRenderingTexture.js +26 -0
  241. package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +3 -0
  242. package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +3 -0
  243. package/dist/particles/shaders/UIRenderingTexture.glsl.js +3 -0
  244. package/dist/particles/spawnModules/UISpawnModule.d.ts +9 -0
  245. package/dist/particles/spawnModules/UISpawnModule.js +9 -0
  246. package/dist/particles/spawnModules/UISpawnOffset.d.ts +21 -0
  247. package/dist/particles/spawnModules/UISpawnOffset.js +46 -0
  248. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +20 -0
  249. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +47 -0
  250. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +20 -0
  251. package/dist/particles/spawnModules/UISpawnRandomRotation.js +45 -0
  252. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +26 -0
  253. package/dist/particles/spawnModules/UISpawnRandomScale.js +60 -0
  254. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +20 -0
  255. package/dist/particles/spawnModules/UISpawnRandomTorque.js +45 -0
  256. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +26 -0
  257. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +64 -0
  258. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +27 -0
  259. package/dist/particles/spawnModules/UISpawnRectangle.js +62 -0
  260. package/package.json +8 -1
  261. package/.claude/settings.local.json +0 -9
  262. package/.editorconfig +0 -14
  263. package/CLAUDE.md +0 -181
  264. package/assets/logotype.png +0 -0
  265. package/eslint.config.js +0 -111
  266. package/rollup.config.js +0 -52
  267. package/src/core/constraints/UIAspectConstraint/UIAspectConstraint.ts +0 -60
  268. package/src/core/constraints/UIConstraint.ts +0 -20
  269. package/src/core/constraints/UICustomConstraint.ts +0 -62
  270. package/src/core/constraints/UIHeightConstraint/UIHeightConstraint.ts +0 -52
  271. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.ts +0 -13
  272. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.ts +0 -139
  273. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.ts +0 -16
  274. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.ts +0 -189
  275. package/src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.ts +0 -68
  276. package/src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.ts +0 -94
  277. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.ts +0 -13
  278. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.ts +0 -135
  279. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.ts +0 -16
  280. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.ts +0 -189
  281. package/src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.ts +0 -68
  282. package/src/core/constraints/UIWidthConstraint/UIWidthConstraint.ts +0 -52
  283. package/src/core/constraints/builders/UIConstraint2DBuilder.Internal.ts +0 -84
  284. package/src/core/constraints/builders/UIConstraint2DBuilder.ts +0 -168
  285. package/src/core/constraints/builders/UICoverConstraintBuilder.Internal.ts +0 -15
  286. package/src/core/constraints/builders/UICoverConstraintBuilder.ts +0 -84
  287. package/src/core/constraints/builders/UIFitConstraintBuilder.Internal.ts +0 -15
  288. package/src/core/constraints/builders/UIFitConstraintBuilder.ts +0 -84
  289. package/src/core/elements/UIAnchor/UIAnchor.Internal.ts +0 -13
  290. package/src/core/elements/UIAnchor/UIAnchor.ts +0 -70
  291. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.ts +0 -30
  292. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.ts +0 -355
  293. package/src/core/elements/UIDummy/UIDummy.Internal.ts +0 -33
  294. package/src/core/elements/UIDummy/UIDummy.ts +0 -244
  295. package/src/core/elements/UIElement/UIElement.ts +0 -127
  296. package/src/core/elements/UIGraphics/UIGraphics.ts +0 -168
  297. package/src/core/elements/UIImage/UIImage.ts +0 -138
  298. package/src/core/elements/UINineSlice/UINineSlice.Internal.ts +0 -26
  299. package/src/core/elements/UINineSlice/UINineSlice.ts +0 -296
  300. package/src/core/elements/UIProgress/UIProgress.Internal.ts +0 -24
  301. package/src/core/elements/UIProgress/UIProgress.ts +0 -259
  302. package/src/core/elements/UIScene/UIScene.Internal.ts +0 -46
  303. package/src/core/elements/UIScene/UIScene.ts +0 -259
  304. package/src/core/elements/UIText/UIText.Internal.ts +0 -29
  305. package/src/core/elements/UIText/UIText.Measuring.ts +0 -183
  306. package/src/core/elements/UIText/UIText.Rendering.ts +0 -83
  307. package/src/core/elements/UIText/UIText.ts +0 -376
  308. package/src/core/layers/UIFullscreenLayer/UIFullscreenLayer.ts +0 -233
  309. package/src/core/layers/UILayer/UILayer.ts +0 -156
  310. package/src/core/miscellaneous/UIExpression.ts +0 -142
  311. package/src/core/miscellaneous/UIMode.ts +0 -29
  312. package/src/core/miscellaneous/UIOrientation.ts +0 -18
  313. package/src/core/miscellaneous/UIPriority.ts +0 -63
  314. package/src/core/miscellaneous/UIRelation.ts +0 -39
  315. package/src/core/miscellaneous/UITransparencyMode.ts +0 -9
  316. package/src/core/miscellaneous/area/UIArea.ts +0 -5
  317. package/src/core/miscellaneous/area/UIAreaCircle.ts +0 -32
  318. package/src/core/miscellaneous/area/UIAreaPolygon.ts +0 -50
  319. package/src/core/miscellaneous/area/UIAreaRectangle.ts +0 -38
  320. package/src/core/miscellaneous/area/UIAreaRoundedRectangle.ts +0 -78
  321. package/src/core/miscellaneous/asserts.ts +0 -187
  322. package/src/core/miscellaneous/canvas.ts +0 -73
  323. package/src/core/miscellaneous/color/UIColor.Internal.ts +0 -89
  324. package/src/core/miscellaneous/color/UIColor.ts +0 -844
  325. package/src/core/miscellaneous/computeTransform.ts +0 -127
  326. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.ts +0 -235
  327. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.ts +0 -524
  328. package/src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.ts +0 -448
  329. package/src/core/miscellaneous/generic-plane/shared.ts +0 -323
  330. package/src/core/miscellaneous/insets/UIInsets.Internal.ts +0 -9
  331. package/src/core/miscellaneous/insets/UIInsets.ts +0 -248
  332. package/src/core/miscellaneous/mask-function/UIProgressMaskFunction.ts +0 -24
  333. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.ts +0 -58
  334. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.ts +0 -52
  335. package/src/core/miscellaneous/math.ts +0 -16
  336. package/src/core/miscellaneous/micro/UIMicro.Internal.ts +0 -33
  337. package/src/core/miscellaneous/micro/UIMicro.ts +0 -222
  338. package/src/core/miscellaneous/resize-policy/UIResizePolicy.ts +0 -8
  339. package/src/core/miscellaneous/resize-policy/UIResizePolicyCover.ts +0 -57
  340. package/src/core/miscellaneous/resize-policy/UIResizePolicyCross.ts +0 -65
  341. package/src/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.ts +0 -65
  342. package/src/core/miscellaneous/resize-policy/UIResizePolicyFit.ts +0 -57
  343. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.ts +0 -65
  344. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.ts +0 -65
  345. package/src/core/miscellaneous/resize-policy/UIResizePolicyNone.ts +0 -11
  346. package/src/core/miscellaneous/shared.ts +0 -73
  347. package/src/core/miscellaneous/text-span/UITextSpan.ts +0 -43
  348. package/src/core/miscellaneous/text-style/UITextStyle.Internal.ts +0 -52
  349. package/src/core/miscellaneous/text-style/UITextStyle.ts +0 -479
  350. package/src/core/miscellaneous/texture/UITextureView.Internal.ts +0 -55
  351. package/src/core/miscellaneous/texture/UITextureView.ts +0 -308
  352. package/src/core/miscellaneous/webglCapabilities.ts +0 -129
  353. package/src/core/shaders/UIImage.glsl +0 -10
  354. package/src/core/shaders/UINineSlice.glsl +0 -53
  355. package/src/core/shaders/UIProgress.glsl +0 -15
  356. package/src/core/shaders/UIProgressMaskFunctionCircular.glsl +0 -13
  357. package/src/core/shaders/UIProgressMaskFunctionDirectional.glsl +0 -12
  358. package/src/core/shaders/glsl.d.ts +0 -27
  359. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.ts +0 -23
  360. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.ts +0 -124
  361. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.ts +0 -22
  362. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.ts +0 -101
  363. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.ts +0 -58
  364. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.ts +0 -605
  365. package/src/particles/behaviorModules/UIBehaviorDirectionalGravity.ts +0 -70
  366. package/src/particles/behaviorModules/UIBehaviorModule.ts +0 -20
  367. package/src/particles/behaviorModules/UIBehaviorPointGravity.ts +0 -173
  368. package/src/particles/behaviorModules/UIBehaviorScaleOverLife.ts +0 -104
  369. package/src/particles/behaviorModules/UIBehaviorTorqueDamping.ts +0 -75
  370. package/src/particles/behaviorModules/UIBehaviorTorqueNoise.ts +0 -115
  371. package/src/particles/behaviorModules/UIBehaviorVelocityDamping.ts +0 -77
  372. package/src/particles/behaviorModules/UIBehaviorVelocityNoise.ts +0 -118
  373. package/src/particles/elements/UIEmitter.Internal.ts +0 -22
  374. package/src/particles/elements/UIEmitter.ts +0 -313
  375. package/src/particles/instancedParticle/UIInstancedParticle.Internal.ts +0 -263
  376. package/src/particles/instancedParticle/UIInstancedParticle.ts +0 -138
  377. package/src/particles/miscellaneous/miscellaneous.ts +0 -115
  378. package/src/particles/renderingModules/UIRenderingColorOverLife.ts +0 -39
  379. package/src/particles/renderingModules/UIRenderingColorOverVelocity.ts +0 -49
  380. package/src/particles/renderingModules/UIRenderingModule.ts +0 -17
  381. package/src/particles/renderingModules/UIRenderingTexture.ts +0 -30
  382. package/src/particles/shaders/UIRenderingColorOverLife.glsl +0 -4
  383. package/src/particles/shaders/UIRenderingColorOverVelocity.glsl +0 -6
  384. package/src/particles/shaders/UIRenderingTexture.glsl +0 -4
  385. package/src/particles/spawnModules/UISpawnModule.ts +0 -22
  386. package/src/particles/spawnModules/UISpawnOffset.ts +0 -62
  387. package/src/particles/spawnModules/UISpawnRandomLifetime.ts +0 -68
  388. package/src/particles/spawnModules/UISpawnRandomRotation.ts +0 -60
  389. package/src/particles/spawnModules/UISpawnRandomScale.ts +0 -81
  390. package/src/particles/spawnModules/UISpawnRandomTorque.ts +0 -62
  391. package/src/particles/spawnModules/UISpawnRandomVelocity.ts +0 -92
  392. package/src/particles/spawnModules/UISpawnRectangle.ts +0 -81
  393. package/tsconfig.json +0 -29
  394. /package/{src/core/index.ts → dist/core/index.d.ts} +0 -0
  395. /package/{src/particles/index.ts → dist/particles/index.d.ts} +0 -0
@@ -0,0 +1,40 @@
1
+ import { assertValidNumber } from '../asserts.js';
2
+ import { UIArea } from './UIArea.js';
3
+
4
+ /** Polygonal interaction area using ray casting */
5
+ class UIAreaPolygon extends UIArea {
6
+ /**
7
+ * Creates polygonal area.
8
+ *
9
+ * @param vertices - Vertices in normalized coordinates (0 to 1)
10
+ */
11
+ constructor(vertices) {
12
+ super();
13
+ this.vertices = vertices;
14
+ }
15
+ /** @internal */
16
+ contains(pointX, pointY) {
17
+ assertValidNumber(pointX, "UIAreaPolygon.contains.pointX");
18
+ assertValidNumber(pointY, "UIAreaPolygon.contains.pointY");
19
+ const vertexCount = this.vertices.length;
20
+ if (vertexCount < 3) {
21
+ return false;
22
+ }
23
+ let inside = false;
24
+ for (let index = 0, previousIndex = vertexCount - 1; index < vertexCount; previousIndex = index++) {
25
+ const currentVertex = this.vertices[index];
26
+ const previousVertex = this.vertices[previousIndex];
27
+ const currentX = currentVertex.x;
28
+ const currentY = currentVertex.y;
29
+ const previousX = previousVertex.x;
30
+ const previousY = previousVertex.y;
31
+ if (currentY > pointY !== previousY > pointY &&
32
+ pointX < ((previousX - currentX) * (pointY - currentY)) / (previousY - currentY) + currentX) {
33
+ inside = !inside;
34
+ }
35
+ }
36
+ return inside;
37
+ }
38
+ }
39
+
40
+ export { UIAreaPolygon };
@@ -0,0 +1,17 @@
1
+ import { UIArea } from "./UIArea";
2
+ /** Rectangular interaction area */
3
+ export declare class UIAreaRectangle extends UIArea {
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ /**
9
+ * Creates rectangular area.
10
+ *
11
+ * @param x - X position in normalized coordinates (0 to 1)
12
+ * @param y - Y position in normalized coordinates (0 to 1)
13
+ * @param width - Width in normalized coordinates (0 to 1)
14
+ * @param height - Height in normalized coordinates (0 to 1)
15
+ */
16
+ constructor(x: number, y: number, width: number, height: number);
17
+ }
@@ -0,0 +1,36 @@
1
+ import { assertValidNonNegativeNumber, assertValidNumber } from '../asserts.js';
2
+ import { UIArea } from './UIArea.js';
3
+
4
+ /** Rectangular interaction area */
5
+ class UIAreaRectangle extends UIArea {
6
+ /**
7
+ * Creates rectangular area.
8
+ *
9
+ * @param x - X position in normalized coordinates (0 to 1)
10
+ * @param y - Y position in normalized coordinates (0 to 1)
11
+ * @param width - Width in normalized coordinates (0 to 1)
12
+ * @param height - Height in normalized coordinates (0 to 1)
13
+ */
14
+ constructor(x, y, width, height) {
15
+ super();
16
+ this.x = x;
17
+ this.y = y;
18
+ this.width = width;
19
+ this.height = height;
20
+ assertValidNonNegativeNumber(x, "UIAreaRectangle.constructor.x");
21
+ assertValidNonNegativeNumber(y, "UIAreaRectangle.constructor.y");
22
+ assertValidNonNegativeNumber(width, "UIAreaRectangle.constructor.width");
23
+ assertValidNonNegativeNumber(height, "UIAreaRectangle.constructor.height");
24
+ }
25
+ /** @internal */
26
+ contains(pointX, pointY) {
27
+ assertValidNumber(pointX, "UIAreaRectangle.contains.pointX");
28
+ assertValidNumber(pointY, "UIAreaRectangle.contains.pointY");
29
+ return (pointX >= this.x &&
30
+ pointX <= this.x + this.width &&
31
+ pointY >= this.y &&
32
+ pointY <= this.y + this.height);
33
+ }
34
+ }
35
+
36
+ export { UIAreaRectangle };
@@ -0,0 +1,21 @@
1
+ import { UIArea } from "./UIArea";
2
+ /** Rectangular interaction area with rounded corners */
3
+ export declare class UIAreaRoundedRectangle extends UIArea {
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ radius: number;
9
+ /**
10
+ * Creates rounded rectangular area.
11
+ *
12
+ * Radius clamped to half of smallest dimension.
13
+ *
14
+ * @param x - X position in normalized coordinates (0 to 1)
15
+ * @param y - Y position in normalized coordinates (0 to 1)
16
+ * @param width - Width in normalized coordinates (0 to 1)
17
+ * @param height - Height in normalized coordinates (0 to 1)
18
+ * @param radius - Corner radius in normalized coordinates (0 to 1)
19
+ */
20
+ constructor(x: number, y: number, width: number, height: number, radius: number);
21
+ }
@@ -0,0 +1,72 @@
1
+ import { assertValidNonNegativeNumber, assertValidNumber } from '../asserts.js';
2
+ import { UIArea } from './UIArea.js';
3
+
4
+ /** Rectangular interaction area with rounded corners */
5
+ class UIAreaRoundedRectangle extends UIArea {
6
+ /**
7
+ * Creates rounded rectangular area.
8
+ *
9
+ * Radius clamped to half of smallest dimension.
10
+ *
11
+ * @param x - X position in normalized coordinates (0 to 1)
12
+ * @param y - Y position in normalized coordinates (0 to 1)
13
+ * @param width - Width in normalized coordinates (0 to 1)
14
+ * @param height - Height in normalized coordinates (0 to 1)
15
+ * @param radius - Corner radius in normalized coordinates (0 to 1)
16
+ */
17
+ constructor(x, y, width, height, radius) {
18
+ super();
19
+ this.x = x;
20
+ this.y = y;
21
+ this.width = width;
22
+ this.height = height;
23
+ this.radius = radius;
24
+ assertValidNonNegativeNumber(x, "UIAreaRoundedRectangle.constructor.x");
25
+ assertValidNonNegativeNumber(y, "UIAreaRoundedRectangle.constructor.y");
26
+ assertValidNonNegativeNumber(width, "UIAreaRoundedRectangle.constructor.width");
27
+ assertValidNonNegativeNumber(height, "UIAreaRoundedRectangle.constructor.height");
28
+ assertValidNonNegativeNumber(radius, "UIAreaRoundedRectangle.constructor.radius");
29
+ this.radius = Math.min(radius, Math.min(width, height) / 2);
30
+ }
31
+ /** @internal */
32
+ contains(pointX, pointY) {
33
+ assertValidNumber(pointX, "UIAreaRoundedRectangle.contains.pointX");
34
+ assertValidNumber(pointY, "UIAreaRoundedRectangle.contains.pointY");
35
+ const left = this.x;
36
+ const right = this.x + this.width;
37
+ const top = this.y;
38
+ const bottom = this.y + this.height;
39
+ if (pointX < left || pointX > right || pointY < top || pointY > bottom) {
40
+ return false;
41
+ }
42
+ const cornerLeft = left + this.radius;
43
+ const cornerRight = right - this.radius;
44
+ const cornerTop = top + this.radius;
45
+ const cornerBottom = bottom - this.radius;
46
+ if (pointX >= cornerLeft && pointX <= cornerRight) {
47
+ return true;
48
+ }
49
+ if (pointY >= cornerTop && pointY <= cornerBottom) {
50
+ return true;
51
+ }
52
+ let centerX;
53
+ let centerY;
54
+ if (pointX < cornerLeft) {
55
+ centerX = cornerLeft;
56
+ }
57
+ else {
58
+ centerX = cornerRight;
59
+ }
60
+ if (pointY < cornerTop) {
61
+ centerY = cornerTop;
62
+ }
63
+ else {
64
+ centerY = cornerBottom;
65
+ }
66
+ const deltaX = pointX - centerX;
67
+ const deltaY = pointY - centerY;
68
+ return deltaX * deltaX + deltaY * deltaY <= this.radius * this.radius;
69
+ }
70
+ }
71
+
72
+ export { UIAreaRoundedRectangle };
@@ -0,0 +1,43 @@
1
+ import { UILayer } from "../layers/UILayer/UILayer";
2
+ /**
3
+ * Validates value is finite number within safe range.
4
+ * @param value Number to validate
5
+ * @param subject Value name for error messages
6
+ * @throws If value is not finite or exceeds safe range
7
+ */
8
+ export declare function assertValidNumber(value: number, subject: string): void;
9
+ /**
10
+ * Validates value is positive (>= EPSILON).
11
+ * @param value Number to validate
12
+ * @param subject Value name for error messages
13
+ * @throws If value is invalid or below EPSILON
14
+ */
15
+ export declare function assertValidPositiveNumber(value: number, subject: string): void;
16
+ /**
17
+ * Validates value is non-negative (>= 0).
18
+ * @param value Number to validate
19
+ * @param subject Value name for error messages
20
+ * @throws If value is invalid or negative
21
+ */
22
+ export declare function assertValidNonNegativeNumber(value: number, subject: string): void;
23
+ /**
24
+ * Validates constraint arguments are from same layer.
25
+ * @param a First constraint subject
26
+ * @param b Second constraint subject
27
+ * @param subject Constraint name for error messages
28
+ * @returns Common layer for both subjects
29
+ * @throws If subjects are invalid or from different layers
30
+ */
31
+ export declare function assertValidConstraintArguments(a: unknown, b: unknown, subject: string): UILayer;
32
+ /**
33
+ * Validates interpolation constraint subjects.
34
+ * @param subject Constraint name for error messages
35
+ * @param a First element
36
+ * @param b Second element
37
+ * @param c Element to interpolate
38
+ * @param anchorA Anchor on element A
39
+ * @param anchorB Anchor on element B
40
+ * @returns Common layer for all subjects
41
+ * @throws If subjects violate interpolation constraints
42
+ */
43
+ export declare function assertValidInterpolationConstraintArguments(subject: string, a: unknown, b: unknown, c: unknown, anchorA: number, anchorB: number): UILayer;
@@ -0,0 +1,163 @@
1
+ import { UILayer } from '../layers/UILayer/UILayer.js';
2
+ import { EPSILON } from './math.js';
3
+ import { isUILayerElement } from './shared.js';
4
+
5
+ /**
6
+ * Validates value is finite number within safe range.
7
+ * @param value Number to validate
8
+ * @param subject Value name for error messages
9
+ * @throws If value is not finite or exceeds safe range
10
+ */
11
+ function assertValidNumber(value, subject) {
12
+ if (process.env.NODE_ENV !== "production") {
13
+ if (!Number.isFinite(value)) {
14
+ throw new Error(`${subject}: value must be a finite number`);
15
+ }
16
+ if (Math.abs(value) > Number.MAX_SAFE_INTEGER) {
17
+ throw new Error(`${subject}: value exceeds maximum safe integer range`);
18
+ }
19
+ }
20
+ }
21
+ /**
22
+ * Validates value is positive (>= EPSILON).
23
+ * @param value Number to validate
24
+ * @param subject Value name for error messages
25
+ * @throws If value is invalid or below EPSILON
26
+ */
27
+ function assertValidPositiveNumber(value, subject) {
28
+ if (process.env.NODE_ENV !== "production") {
29
+ assertValidNumber(value, subject);
30
+ if (value < EPSILON) {
31
+ throw new Error(`${subject}: value must be greater than or equal to ${EPSILON}`);
32
+ }
33
+ }
34
+ }
35
+ /**
36
+ * Validates value is non-negative (>= 0).
37
+ * @param value Number to validate
38
+ * @param subject Value name for error messages
39
+ * @throws If value is invalid or negative
40
+ */
41
+ function assertValidNonNegativeNumber(value, subject) {
42
+ if (process.env.NODE_ENV !== "production") {
43
+ assertValidNumber(value, subject);
44
+ if (value < 0) {
45
+ throw new Error(`${subject}: value must be greater than or equal to 0`);
46
+ }
47
+ }
48
+ }
49
+ /**
50
+ * Validates constraint arguments are from same layer.
51
+ * @param a First constraint subject
52
+ * @param b Second constraint subject
53
+ * @param subject Constraint name for error messages
54
+ * @returns Common layer for both subjects
55
+ * @throws If subjects are invalid or from different layers
56
+ */
57
+ function assertValidConstraintArguments(a, b, subject) {
58
+ if (process.env.NODE_ENV !== "production") {
59
+ if (a instanceof UILayer && b instanceof UILayer) {
60
+ throw new Error(`${subject}: layer cannot be snapped to another layer`);
61
+ }
62
+ let layerA;
63
+ let layerB;
64
+ if (a instanceof UILayer) {
65
+ layerA = a;
66
+ }
67
+ else if (isUILayerElement(a)) {
68
+ layerA = a.layer;
69
+ }
70
+ else {
71
+ throw new Error(`${subject}: A must be a UILayer or a UILayerElement`);
72
+ }
73
+ if (b instanceof UILayer) {
74
+ layerB = b;
75
+ }
76
+ else if (isUILayerElement(b)) {
77
+ layerB = b.layer;
78
+ }
79
+ else {
80
+ throw new Error(`${subject}: B must be a UILayer or a UILayerElement`);
81
+ }
82
+ if (layerA !== layerB) {
83
+ throw new Error(`${subject}: elements must be on the same layer`);
84
+ }
85
+ return layerA;
86
+ }
87
+ if (a instanceof UILayer) {
88
+ return a;
89
+ }
90
+ if (isUILayerElement(a)) {
91
+ return a.layer;
92
+ }
93
+ if (b instanceof UILayer) {
94
+ return b;
95
+ }
96
+ if (isUILayerElement(b)) {
97
+ return b.layer;
98
+ }
99
+ throw new Error(`${subject}: no valid subjects found`);
100
+ }
101
+ /**
102
+ * Validates interpolation constraint subjects.
103
+ * @param subject Constraint name for error messages
104
+ * @param a First element
105
+ * @param b Second element
106
+ * @param c Element to interpolate
107
+ * @param anchorA Anchor on element A
108
+ * @param anchorB Anchor on element B
109
+ * @returns Common layer for all subjects
110
+ * @throws If subjects violate interpolation constraints
111
+ */
112
+ function assertValidInterpolationConstraintArguments(subject, a, b, c, anchorA, anchorB) {
113
+ if (process.env.NODE_ENV !== "production") {
114
+ if (c instanceof UILayer) {
115
+ throw new Error(`${subject}: C cannot be a layer`);
116
+ }
117
+ if (!isUILayerElement(c)) {
118
+ throw new Error(`${subject}: C must be a UILayerElement`);
119
+ }
120
+ let layerA;
121
+ let layerB;
122
+ if (a instanceof UILayer || isUILayerElement(a)) {
123
+ layerA = a instanceof UILayer ? a : a.layer;
124
+ }
125
+ else {
126
+ throw new Error(`${subject}: A must be UILayer or UILayerElement`);
127
+ }
128
+ if (b instanceof UILayer || isUILayerElement(b)) {
129
+ layerB = b instanceof UILayer ? b : b.layer;
130
+ }
131
+ else {
132
+ throw new Error(`${subject}: B must be UILayer or UILayerElement`);
133
+ }
134
+ const layerC = c.layer;
135
+ if (layerA !== layerB || layerA !== layerC) {
136
+ throw new Error(`${subject}: all elements must be on the same layer`);
137
+ }
138
+ if (c === a || c === b) {
139
+ throw new Error(`${subject}: C cannot be equal to A or B`);
140
+ }
141
+ if (a === b) {
142
+ if (Math.abs(anchorA - anchorB) <= EPSILON) {
143
+ throw new Error(`${subject}: when A and B are the same, anchorA and anchorB must differ by more than ${EPSILON}`);
144
+ }
145
+ }
146
+ return layerA;
147
+ }
148
+ if (isUILayerElement(a)) {
149
+ return a.layer;
150
+ }
151
+ if (isUILayerElement(b)) {
152
+ return b.layer;
153
+ }
154
+ if (a instanceof UILayer) {
155
+ return a;
156
+ }
157
+ if (b instanceof UILayer) {
158
+ return b;
159
+ }
160
+ throw new Error(`${subject}: no valid subjects found`);
161
+ }
162
+
163
+ export { assertValidConstraintArguments, assertValidInterpolationConstraintArguments, assertValidNonNegativeNumber, assertValidNumber, assertValidPositiveNumber };
@@ -0,0 +1,31 @@
1
+ import { CanvasTexture } from "three";
2
+ /** Canvas type that works both in main thread and workers */
3
+ export type UICanvas = HTMLCanvasElement | OffscreenCanvas;
4
+ /** 2D rendering context type for UICanvas */
5
+ export type UICanvasRenderingContext2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
6
+ /**
7
+ * Creates a canvas using OffscreenCanvas if available, otherwise falls back to HTMLCanvasElement.
8
+ *
9
+ * @param width - Canvas width in pixels
10
+ * @param height - Canvas height in pixels
11
+ * @returns Canvas instance
12
+ */
13
+ export declare function createCanvas(width: number, height: number): UICanvas;
14
+ /**
15
+ * Gets the 2D rendering context for a UICanvas.
16
+ *
17
+ * @param canvas - Canvas instance
18
+ * @returns 2D rendering context or null
19
+ */
20
+ export declare function getCanvas2DContext(canvas: UICanvas): UICanvasRenderingContext2D | null;
21
+ /**
22
+ * Creates a CanvasTexture with maximum WebGL1/WebGL2 compatibility.
23
+ * - ClampToEdge wrapping (required for NPOT in WebGL1)
24
+ * - Linear filtering without mipmaps (NPOT-safe)
25
+ * - RGBA/UnsignedByte format (no extensions needed)
26
+ * - sRGB colorspace only if supported
27
+ *
28
+ * @param canvas - Source canvas
29
+ * @returns Configured CanvasTexture
30
+ */
31
+ export declare function createCanvasTexture(canvas: UICanvas): CanvasTexture;
@@ -0,0 +1,37 @@
1
+ import { CanvasTexture, UVMapping, ClampToEdgeWrapping, LinearFilter, RGBAFormat, UnsignedByteType, SRGBColorSpace, NoColorSpace } from 'three';
2
+ import { checkOffscreenCanvasSupport, checkSRGBSupport } from './webglCapabilities.js';
3
+
4
+ /**
5
+ * Creates a canvas using OffscreenCanvas if available, otherwise falls back to HTMLCanvasElement.
6
+ *
7
+ * @param width - Canvas width in pixels
8
+ * @param height - Canvas height in pixels
9
+ * @returns Canvas instance
10
+ */
11
+ function createCanvas(width, height) {
12
+ if (checkOffscreenCanvasSupport()) {
13
+ return new OffscreenCanvas(width, height);
14
+ }
15
+ const canvasElement = document.createElement("canvas");
16
+ canvasElement.width = width;
17
+ canvasElement.height = height;
18
+ return canvasElement;
19
+ }
20
+ /**
21
+ * Creates a CanvasTexture with maximum WebGL1/WebGL2 compatibility.
22
+ * - ClampToEdge wrapping (required for NPOT in WebGL1)
23
+ * - Linear filtering without mipmaps (NPOT-safe)
24
+ * - RGBA/UnsignedByte format (no extensions needed)
25
+ * - sRGB colorspace only if supported
26
+ *
27
+ * @param canvas - Source canvas
28
+ * @returns Configured CanvasTexture
29
+ */
30
+ function createCanvasTexture(canvas) {
31
+ const texture = new CanvasTexture(canvas, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, LinearFilter, RGBAFormat, UnsignedByteType, 1);
32
+ texture.colorSpace = checkSRGBSupport() ? SRGBColorSpace : NoColorSpace;
33
+ texture.generateMipmaps = false;
34
+ return texture;
35
+ }
36
+
37
+ export { createCanvas, createCanvasTexture };
@@ -0,0 +1,7 @@
1
+ import type { Color } from "three";
2
+ import type { UIColor } from "./UIColor";
3
+ /** Color configuration as Three.js Color, hex number, hex string, or UIColor */
4
+ export type UIColorConfig = Color | number | string | UIColor;
5
+ /** Predefined color names */
6
+ export type UIColorName = "black" | "white" | "red" | "green" | "blue" | "yellow" | "cyan" | "magenta" | "gray" | "grey" | "silver" | "maroon" | "olive" | "lime" | "aqua" | "teal" | "navy" | "fuchsia" | "purple" | "orange" | "pink" | "brown" | "gold" | "violet" | "indigo" | "coral" | "salmon" | "khaki" | "plum" | "orchid" | "tan" | "beige" | "mint" | "lavender" | "crimson" | "azure" | "ivory" | "snow";
7
+ export declare const COLORS: Record<string, number | undefined>;
@@ -0,0 +1,42 @@
1
+ const COLORS = {
2
+ black: 0x000000,
3
+ white: 0xffffff,
4
+ red: 0xff0000,
5
+ green: 0x008000,
6
+ blue: 0x0000ff,
7
+ yellow: 0xffff00,
8
+ cyan: 0x00ffff,
9
+ magenta: 0xff00ff,
10
+ gray: 0x808080,
11
+ grey: 0x808080,
12
+ silver: 0xc0c0c0,
13
+ maroon: 0x800000,
14
+ olive: 0x808000,
15
+ lime: 0x00ff00,
16
+ aqua: 0x00ffff,
17
+ teal: 0x008080,
18
+ navy: 0x000080,
19
+ fuchsia: 0xff00ff,
20
+ purple: 0x800080,
21
+ orange: 0xffa500,
22
+ pink: 0xffc0cb,
23
+ brown: 0xa52a2a,
24
+ gold: 0xffd700,
25
+ violet: 0xee82ee,
26
+ indigo: 0x4b0082,
27
+ coral: 0xff7f50,
28
+ salmon: 0xfa8072,
29
+ khaki: 0xf0e68c,
30
+ plum: 0xdda0dd,
31
+ orchid: 0xda70d6,
32
+ tan: 0xd2b48c,
33
+ beige: 0xf5f5dc,
34
+ mint: 0x98fb98,
35
+ lavender: 0xe6e6fa,
36
+ crimson: 0xdc143c,
37
+ azure: 0xf0ffff,
38
+ ivory: 0xfffff0,
39
+ snow: 0xfffafa,
40
+ };
41
+
42
+ export { COLORS };