laymur 0.22.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 +25 -17
  72. package/dist/core/elements/UIElement/UIElement.js +76 -69
  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 -8
  88. package/dist/core/elements/UIProgress/UIProgress.js +60 -58
  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 +14 -17
  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 +3 -3
  187. package/dist/core/miscellaneous/texture/UITextureView.js +114 -118
  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 +27 -4
  210. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +162 -123
  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,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal.js";
2
2
  /** Horizontal proportion constraint options */
3
3
  export interface UIHorizontalProportionConstraintOptions extends UISingleParameterConstraintOptions {
4
4
  /** Proportion multiplier (A.width * proportion = B.width) */
@@ -1,6 +1,6 @@
1
- import type { UIPlaneElement } from "../../miscellaneous/shared";
2
- import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
3
- import type { UIHorizontalProportionConstraintOptions } from "./UIHorizontalProportionConstraint.Internal";
1
+ import type { UIPlaneElement } from "../../miscellaneous/shared.js";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint.js";
3
+ import type { UIHorizontalProportionConstraintOptions } from "./UIHorizontalProportionConstraint.Internal.js";
4
4
  /** Maintains proportional width relationship (A.width * proportion = B.width) */
5
5
  export declare class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
6
6
  readonly a: UIPlaneElement;
@@ -1,9 +1,8 @@
1
- import { assertValidPositiveNumber, assertValidConstraintArguments } from '../../miscellaneous/asserts.js';
2
- import { UIExpression } from '../../miscellaneous/UIExpression.js';
3
- import { UISingleParameterConstraint } from '../UISingleParameterConstraint/UISingleParameterConstraint.js';
4
-
1
+ import { assertValidConstraintArguments, assertValidPositiveNumber, } from "../../miscellaneous/asserts.js";
2
+ import { UIExpression } from "../../miscellaneous/UIExpression.js";
3
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint.js";
5
4
  /** Maintains proportional width relationship (A.width * proportion = B.width) */
6
- class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
5
+ export class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
7
6
  /**
8
7
  * @param a First element
9
8
  * @param b Second element
@@ -16,25 +15,24 @@ class UIHorizontalProportionConstraint extends UISingleParameterConstraint {
16
15
  super(assertValidConstraintArguments(a, b, "UIHorizontalProportionConstraint.constructor"), options);
17
16
  this.a = a;
18
17
  this.b = b;
19
- this._private_proportionInternal = options.proportion ?? 1;
20
- this.constraint = this.solverWrapper.createConstraint(new UIExpression(0), this._private_buildRHS(), this.relation, this.priority, this.isConstraintEnabled());
18
+ this.proportionInternal = options.proportion ?? 1;
19
+ this.constraint = this.solverWrapper.createConstraint(new UIExpression(0), this.buildRHS(), this.relation, this.priority, this.isConstraintEnabled());
21
20
  }
22
21
  /** Current proportion multiplier */
23
22
  get proportion() {
24
- return this._private_proportionInternal;
23
+ return this.proportionInternal;
25
24
  }
26
25
  /** Updates proportion multiplier */
27
26
  set proportion(value) {
27
+ this.assertNotDestroyed("UIHorizontalProportionConstraint.proportion");
28
28
  assertValidPositiveNumber(value, "UIHorizontalProportionConstraint.proportion");
29
- if (this._private_proportionInternal !== value) {
30
- this._private_proportionInternal = value;
31
- this.solverWrapper.setConstraintRHS(this.constraint, this._private_buildRHS());
29
+ if (this.proportionInternal !== value) {
30
+ this.proportionInternal = value;
31
+ this.solverWrapper.setConstraintRHS(this.constraint, this.buildRHS());
32
32
  }
33
33
  }
34
34
  /** Builds constraint expression for proportional relationship */
35
- _private_buildRHS() {
36
- return UIExpression.minus(new UIExpression(0, [[this.a.wVariable, this._private_proportionInternal]]), new UIExpression(0, [[this.b.wVariable, 1]]));
35
+ buildRHS() {
36
+ return UIExpression.minus(new UIExpression(0, [[this.a.wVariable, this.proportionInternal]]), new UIExpression(0, [[this.b.wVariable, 1]]));
37
37
  }
38
38
  }
39
-
40
- export { UIHorizontalProportionConstraint };
@@ -1,6 +1,6 @@
1
- import type { UIOrientation } from "../../miscellaneous/UIOrientation";
2
- import type { UIPriority } from "../../miscellaneous/UIPriority";
3
- import type { UIRelation } from "../../miscellaneous/UIRelation";
1
+ import type { UIOrientation } from "../../miscellaneous/UIOrientation.js";
2
+ import type { UIPriority } from "../../miscellaneous/UIPriority.js";
3
+ import type { UIRelation } from "../../miscellaneous/UIRelation.js";
4
4
  /** Single parameter constraint options */
5
5
  export interface UISingleParameterConstraintOptions {
6
6
  /** Constraint name */
@@ -1,9 +1,9 @@
1
- import type { UILayer } from "../../layers/UILayer/UILayer";
2
- import { UIOrientation } from "../../miscellaneous/UIOrientation";
3
- import type { UIPriority } from "../../miscellaneous/UIPriority";
4
- import type { UIRelation } from "../../miscellaneous/UIRelation";
5
- import { UIConstraint } from "../UIConstraint";
6
- import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal";
1
+ import type { UILayer } from "../../layers/UILayer/UILayer.js";
2
+ import { UIOrientation } from "../../miscellaneous/UIOrientation.js";
3
+ import type { UIPriority } from "../../miscellaneous/UIPriority.js";
4
+ import type { UIRelation } from "../../miscellaneous/UIRelation.js";
5
+ import { UIConstraint } from "../UIConstraint.js";
6
+ import type { UISingleParameterConstraintOptions } from "./UISingleParameterConstraint.Internal.js";
7
7
  /** Base class for constraints with priority, relation, and orientation */
8
8
  export declare abstract class UISingleParameterConstraint extends UIConstraint {
9
9
  /** Constraint priority */
@@ -31,8 +31,14 @@ export declare abstract class UISingleParameterConstraint extends UIConstraint {
31
31
  set relation(value: UIRelation);
32
32
  /** Updates when constraint is active */
33
33
  set orientation(value: UIOrientation);
34
+ /**
35
+ * Checks whether the constraint refers to a solver variable.
36
+ * @param index Solver variable index
37
+ * @returns True if the variable is used by the constraint
38
+ */
39
+ isUsingVariable(index: number): boolean;
34
40
  /** Removes constraint from solver and cleans up listeners */
35
- destroy(): void;
41
+ protected destroyInternal(): void;
36
42
  /**
37
43
  * Checks if constraint should be active for current orientation.
38
44
  * @returns True if orientation is ALWAYS or matches layer orientation
@@ -1,10 +1,9 @@
1
- import { resolveOrientation, UIOrientation } from '../../miscellaneous/UIOrientation.js';
2
- import { resolvePriority } from '../../miscellaneous/UIPriority.js';
3
- import { resolveRelation } from '../../miscellaneous/UIRelation.js';
4
- import { UIConstraint } from '../UIConstraint.js';
5
-
1
+ import { resolveOrientation, UIOrientation } from "../../miscellaneous/UIOrientation.js";
2
+ import { resolvePriority } from "../../miscellaneous/UIPriority.js";
3
+ import { resolveRelation } from "../../miscellaneous/UIRelation.js";
4
+ import { UIConstraint } from "../UIConstraint.js";
6
5
  /** Base class for constraints with priority, relation, and orientation */
7
- class UISingleParameterConstraint extends UIConstraint {
6
+ export class UISingleParameterConstraint extends UIConstraint {
8
7
  /**
9
8
  * @param layer Layer containing this constraint
10
9
  * @param options Constraint configuration
@@ -12,61 +11,69 @@ class UISingleParameterConstraint extends UIConstraint {
12
11
  constructor(layer, options) {
13
12
  super(layer, options?.name);
14
13
  /** Updates constraint enabled state when layer orientation changes */
15
- this._private_onOrientationChange = () => {
14
+ this.onOrientationChange = () => {
16
15
  this.solverWrapper.setConstraintEnabled(this.constraint, this.isConstraintEnabled());
17
16
  };
18
- this._private_priorityInternal = resolvePriority(options?.priority);
19
- this._private_relationInternal = resolveRelation(options?.relation);
20
- this._private_orientationInternal = resolveOrientation(options?.orientation);
21
- this.layer.signalOrientationChanged.on(this._private_onOrientationChange);
17
+ this.priorityInternal = resolvePriority(options?.priority);
18
+ this.relationInternal = resolveRelation(options?.relation);
19
+ this.orientationInternal = resolveOrientation(options?.orientation);
20
+ this.layer.signalOrientationChanged.on(this.onOrientationChange);
22
21
  }
23
22
  /** Constraint priority */
24
23
  get priority() {
25
- return this._private_priorityInternal;
24
+ return this.priorityInternal;
26
25
  }
27
26
  /** Constraint relation */
28
27
  get relation() {
29
- return this._private_relationInternal;
28
+ return this.relationInternal;
30
29
  }
31
30
  /** When constraint is active */
32
31
  get orientation() {
33
- return this._private_orientationInternal;
32
+ return this.orientationInternal;
34
33
  }
35
34
  /** Updates constraint priority */
36
35
  set priority(value) {
37
- if (value !== this._private_priorityInternal) {
38
- this._private_priorityInternal = value;
39
- this.solverWrapper.setConstraintPriority(this.constraint, this._private_priorityInternal);
36
+ this.assertNotDestroyed("UISingleParameterConstraint.priority");
37
+ if (value !== this.priorityInternal) {
38
+ this.priorityInternal = value;
39
+ this.solverWrapper.setConstraintPriority(this.constraint, this.priorityInternal);
40
40
  }
41
41
  }
42
42
  /** Updates constraint relation */
43
43
  set relation(value) {
44
- if (value !== this._private_relationInternal) {
45
- this._private_relationInternal = value;
46
- this.solverWrapper.setConstraintRelation(this.constraint, this._private_relationInternal);
44
+ this.assertNotDestroyed("UISingleParameterConstraint.relation");
45
+ if (value !== this.relationInternal) {
46
+ this.relationInternal = value;
47
+ this.solverWrapper.setConstraintRelation(this.constraint, this.relationInternal);
47
48
  }
48
49
  }
49
50
  /** Updates when constraint is active */
50
51
  set orientation(value) {
51
- if (value !== this._private_orientationInternal) {
52
- this._private_orientationInternal = value;
53
- this._private_onOrientationChange();
52
+ this.assertNotDestroyed("UISingleParameterConstraint.orientation");
53
+ if (value !== this.orientationInternal) {
54
+ this.orientationInternal = value;
55
+ this.onOrientationChange();
54
56
  }
55
57
  }
58
+ /**
59
+ * Checks whether the constraint refers to a solver variable.
60
+ * @param index Solver variable index
61
+ * @returns True if the variable is used by the constraint
62
+ */
63
+ isUsingVariable(index) {
64
+ return !this.destroyed && this.solverWrapper.isConstraintUsingVariable(this.constraint, index);
65
+ }
56
66
  /** Removes constraint from solver and cleans up listeners */
57
- destroy() {
58
- this.layer.signalOrientationChanged.off(this._private_onOrientationChange);
67
+ destroyInternal() {
68
+ this.layer.signalOrientationChanged.off(this.onOrientationChange);
59
69
  this.solverWrapper.removeConstraint(this.constraint);
60
- super.destroy();
61
70
  }
62
71
  /**
63
72
  * Checks if constraint should be active for current orientation.
64
73
  * @returns True if orientation is ALWAYS or matches layer orientation
65
74
  */
66
75
  isConstraintEnabled() {
67
- return (this._private_orientationInternal === UIOrientation.ALWAYS ||
68
- this._private_orientationInternal === this.layer.orientation);
76
+ return (this.orientationInternal === UIOrientation.ALWAYS ||
77
+ this.orientationInternal === this.layer.orientation);
69
78
  }
70
79
  }
71
-
72
- export { UISingleParameterConstraint };
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal.js";
2
2
  export declare const DEFAULT_ANCHOR = 0.5;
3
3
  /** Vertical distance constraint options */
4
4
  export interface UIVerticalDistanceConstraintOptions extends UISingleParameterConstraintOptions {
@@ -1,3 +1 @@
1
- const DEFAULT_ANCHOR = 0.5;
2
-
3
- export { DEFAULT_ANCHOR };
1
+ export const DEFAULT_ANCHOR = 0.5;
@@ -1,6 +1,6 @@
1
- import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
2
- import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
3
- import type { UIVerticalDistanceConstraintOptions } from "./UIVerticalDistanceConstraint.Internal";
1
+ import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared.js";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint.js";
3
+ import type { UIVerticalDistanceConstraintOptions } from "./UIVerticalDistanceConstraint.Internal.js";
4
4
  /** Maintains vertical distance between elements with configurable anchors */
5
5
  export declare class UIVerticalDistanceConstraint extends UISingleParameterConstraint {
6
6
  readonly a: UIPointElement | UIPlaneElement;
@@ -1,11 +1,10 @@
1
- import { assertValidNumber, assertValidConstraintArguments } from '../../miscellaneous/asserts.js';
2
- import { isUIPlaneElement, isUIPointElement } from '../../miscellaneous/shared.js';
3
- import { UIExpression } from '../../miscellaneous/UIExpression.js';
4
- import { UISingleParameterConstraint } from '../UISingleParameterConstraint/UISingleParameterConstraint.js';
5
- import { DEFAULT_ANCHOR } from './UIVerticalDistanceConstraint.Internal.js';
6
-
1
+ import { assertValidConstraintArguments, assertValidNumber } from "../../miscellaneous/asserts.js";
2
+ import { isUIPlaneElement, isUIPointElement } from "../../miscellaneous/shared.js";
3
+ import { UIExpression } from "../../miscellaneous/UIExpression.js";
4
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint.js";
5
+ import { DEFAULT_ANCHOR } from "./UIVerticalDistanceConstraint.Internal.js";
7
6
  /** Maintains vertical distance between elements with configurable anchors */
8
- class UIVerticalDistanceConstraint extends UISingleParameterConstraint {
7
+ export class UIVerticalDistanceConstraint extends UISingleParameterConstraint {
9
8
  /**
10
9
  * @param a First element
11
10
  * @param b Second element
@@ -24,77 +23,78 @@ class UIVerticalDistanceConstraint extends UISingleParameterConstraint {
24
23
  super(assertValidConstraintArguments(a, b, "UIVerticalDistanceConstraint.constructor"), options);
25
24
  this.a = a;
26
25
  this.b = b;
27
- this._private_anchorAInternal = options.anchorA ?? DEFAULT_ANCHOR;
28
- this._private_anchorBInternal = options.anchorB ?? DEFAULT_ANCHOR;
29
- this._private_distanceInternal = options.distance ?? 0;
30
- this.constraint = this.solverWrapper.createConstraint(this._private_buildLHS(), new UIExpression(this._private_distanceInternal), this.relation, this.priority, this.isConstraintEnabled());
26
+ this.anchorAInternal = options.anchorA ?? DEFAULT_ANCHOR;
27
+ this.anchorBInternal = options.anchorB ?? DEFAULT_ANCHOR;
28
+ this.distanceInternal = options.distance ?? 0;
29
+ this.constraint = this.solverWrapper.createConstraint(this.buildLHS(), new UIExpression(this.distanceInternal), this.relation, this.priority, this.isConstraintEnabled());
31
30
  }
32
31
  /** Current distance in world units */
33
32
  get distance() {
34
- return this._private_distanceInternal;
33
+ return this.distanceInternal;
35
34
  }
36
35
  /** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
37
36
  get anchorA() {
38
- return this._private_anchorAInternal;
37
+ return this.anchorAInternal;
39
38
  }
40
39
  /** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
41
40
  get anchorB() {
42
- return this._private_anchorBInternal;
41
+ return this.anchorBInternal;
43
42
  }
44
43
  /** Updates distance */
45
44
  set distance(value) {
45
+ this.assertNotDestroyed("UIVerticalDistanceConstraint.distance");
46
46
  assertValidNumber(value, "UIVerticalDistanceConstraint.distance");
47
- if (this._private_distanceInternal !== value) {
48
- this._private_distanceInternal = value;
49
- this.solverWrapper.setConstraintRHS(this.constraint, new UIExpression(this._private_distanceInternal));
47
+ if (this.distanceInternal !== value) {
48
+ this.distanceInternal = value;
49
+ this.solverWrapper.setConstraintRHS(this.constraint, new UIExpression(this.distanceInternal));
50
50
  }
51
51
  }
52
52
  /** Updates anchor on element A */
53
53
  set anchorA(value) {
54
+ this.assertNotDestroyed("UIVerticalDistanceConstraint.anchorA");
54
55
  assertValidNumber(value, "UIVerticalDistanceConstraint.anchorA");
55
- if (this._private_anchorAInternal !== value) {
56
- this._private_anchorAInternal = value;
57
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
56
+ if (this.anchorAInternal !== value) {
57
+ this.anchorAInternal = value;
58
+ this.solverWrapper.setConstraintLHS(this.constraint, this.buildLHS());
58
59
  }
59
60
  }
60
61
  /** Updates anchor on element B */
61
62
  set anchorB(value) {
63
+ this.assertNotDestroyed("UIVerticalDistanceConstraint.anchorB");
62
64
  assertValidNumber(value, "UIVerticalDistanceConstraint.anchorB");
63
- if (this._private_anchorBInternal !== value) {
64
- this._private_anchorBInternal = value;
65
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
65
+ if (this.anchorBInternal !== value) {
66
+ this.anchorBInternal = value;
67
+ this.solverWrapper.setConstraintLHS(this.constraint, this.buildLHS());
66
68
  }
67
69
  }
68
70
  /** Builds constraint expression for distance between anchored positions */
69
- _private_buildLHS() {
71
+ buildLHS() {
70
72
  let aExpression;
71
73
  let bExpression;
72
74
  if (isUIPlaneElement(this.a)) {
73
75
  aExpression = new UIExpression(0, [
74
76
  [this.a.yVariable, 1],
75
- [this.a.hVariable, this._private_anchorAInternal],
77
+ [this.a.hVariable, this.anchorAInternal],
76
78
  ]);
77
79
  }
78
80
  else if (isUIPointElement(this.a)) {
79
81
  aExpression = new UIExpression().plus(this.a.yVariable, 1);
80
82
  }
81
83
  else {
82
- throw new Error("UIVerticalDistanceConstraint.buildLHS.a: invalid element type");
84
+ throw new Error("UIVerticalDistanceConstraint.buildLHS.a: A is neither a point nor a plane element");
83
85
  }
84
86
  if (isUIPlaneElement(this.b)) {
85
87
  bExpression = new UIExpression(0, [
86
88
  [this.b.yVariable, 1],
87
- [this.b.hVariable, this._private_anchorBInternal],
89
+ [this.b.hVariable, this.anchorBInternal],
88
90
  ]);
89
91
  }
90
92
  else if (isUIPointElement(this.b)) {
91
93
  bExpression = new UIExpression().plus(this.b.yVariable, 1);
92
94
  }
93
95
  else {
94
- throw new Error("UIVerticalDistanceConstraint.buildLHS.b: invalid element type");
96
+ throw new Error("UIVerticalDistanceConstraint.buildLHS.b: B is neither a point nor a plane element");
95
97
  }
96
98
  return UIExpression.minus(bExpression, aExpression);
97
99
  }
98
100
  }
99
-
100
- export { UIVerticalDistanceConstraint };
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal.js";
2
2
  export declare const DEFAULT_ANCHOR = 0.5;
3
3
  export declare const DEFAULT_T = 0.5;
4
4
  /** Vertical interpolation constraint options */
@@ -1,4 +1,2 @@
1
- const DEFAULT_ANCHOR = 0.5;
2
- const DEFAULT_T = 0.5;
3
-
4
- export { DEFAULT_ANCHOR, DEFAULT_T };
1
+ export const DEFAULT_ANCHOR = 0.5;
2
+ export const DEFAULT_T = 0.5;
@@ -1,6 +1,6 @@
1
- import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
2
- import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
3
- import type { UIVerticalInterpolationConstraintOptions } from "./UIVerticalInterpolationConstraint.Internal";
1
+ import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared.js";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint.js";
3
+ import type { UIVerticalInterpolationConstraintOptions } from "./UIVerticalInterpolationConstraint.Internal.js";
4
4
  /** Positions element C vertically between A and B based on interpolation factor */
5
5
  export declare class UIVerticalInterpolationConstraint extends UISingleParameterConstraint {
6
6
  readonly a: UIPointElement | UIPlaneElement;
@@ -1,11 +1,10 @@
1
- import { assertValidNumber, assertValidInterpolationConstraintArguments } from '../../miscellaneous/asserts.js';
2
- import { isUIPlaneElement, isUIPointElement } from '../../miscellaneous/shared.js';
3
- import { UIExpression } from '../../miscellaneous/UIExpression.js';
4
- import { UISingleParameterConstraint } from '../UISingleParameterConstraint/UISingleParameterConstraint.js';
5
- import { DEFAULT_ANCHOR, DEFAULT_T } from './UIVerticalInterpolationConstraint.Internal.js';
6
-
1
+ import { assertValidInterpolationConstraintArguments, assertValidNumber, } from "../../miscellaneous/asserts.js";
2
+ import { isUIPlaneElement, isUIPointElement } from "../../miscellaneous/shared.js";
3
+ import { UIExpression } from "../../miscellaneous/UIExpression.js";
4
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint.js";
5
+ import { DEFAULT_ANCHOR, DEFAULT_T } from "./UIVerticalInterpolationConstraint.Internal.js";
7
6
  /** Positions element C vertically between A and B based on interpolation factor */
8
- class UIVerticalInterpolationConstraint extends UISingleParameterConstraint {
7
+ export class UIVerticalInterpolationConstraint extends UISingleParameterConstraint {
9
8
  /**
10
9
  * @param a First element
11
10
  * @param b Second element
@@ -31,105 +30,107 @@ class UIVerticalInterpolationConstraint extends UISingleParameterConstraint {
31
30
  this.a = a;
32
31
  this.b = b;
33
32
  this.c = c;
34
- this._private_anchorAInternal = anchorA;
35
- this._private_anchorBInternal = anchorA;
36
- this._private_anchorCInternal = options.anchorC ?? DEFAULT_ANCHOR;
37
- this._private_tInternal = options.t ?? DEFAULT_T;
38
- this.constraint = this.solverWrapper.createConstraint(this._private_buildLHS(), new UIExpression(0), this.relation, this.priority, this.isConstraintEnabled());
33
+ this.anchorAInternal = anchorA;
34
+ this.anchorBInternal = anchorA;
35
+ this.anchorCInternal = options.anchorC ?? DEFAULT_ANCHOR;
36
+ this.tInternal = options.t ?? DEFAULT_T;
37
+ this.constraint = this.solverWrapper.createConstraint(this.buildLHS(), new UIExpression(0), this.relation, this.priority, this.isConstraintEnabled());
39
38
  }
40
39
  /** Interpolation factor (0 = A position, 1 = B position) */
41
40
  get t() {
42
- return this._private_tInternal;
41
+ return this.tInternal;
43
42
  }
44
43
  /** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
45
44
  get anchorA() {
46
- return this._private_anchorAInternal;
45
+ return this.anchorAInternal;
47
46
  }
48
47
  /** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
49
48
  get anchorB() {
50
- return this._private_anchorBInternal;
49
+ return this.anchorBInternal;
51
50
  }
52
51
  /** Anchor on element C (0 = bottom, 0.5 = center, 1 = top) */
53
52
  get anchorC() {
54
- return this._private_anchorCInternal;
53
+ return this.anchorCInternal;
55
54
  }
56
55
  /** Updates interpolation factor */
57
56
  set t(value) {
57
+ this.assertNotDestroyed("UIVerticalInterpolationConstraint.t");
58
58
  assertValidNumber(value, "UIVerticalInterpolationConstraint.t");
59
- if (this._private_tInternal !== value) {
60
- this._private_tInternal = value;
61
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
59
+ if (this.tInternal !== value) {
60
+ this.tInternal = value;
61
+ this.solverWrapper.setConstraintLHS(this.constraint, this.buildLHS());
62
62
  }
63
63
  }
64
64
  /** Updates anchor on element A */
65
65
  set anchorA(value) {
66
+ this.assertNotDestroyed("UIVerticalInterpolationConstraint.anchorA");
66
67
  assertValidNumber(value, "UIVerticalInterpolationConstraint.anchorA");
67
- if (this._private_anchorAInternal !== value) {
68
- this._private_anchorAInternal = value;
69
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
68
+ if (this.anchorAInternal !== value) {
69
+ this.anchorAInternal = value;
70
+ this.solverWrapper.setConstraintLHS(this.constraint, this.buildLHS());
70
71
  }
71
72
  }
72
73
  /** Updates anchor on element B */
73
74
  set anchorB(value) {
75
+ this.assertNotDestroyed("UIVerticalInterpolationConstraint.anchorB");
74
76
  assertValidNumber(value, "UIVerticalInterpolationConstraint.anchorB");
75
- if (this._private_anchorBInternal !== value) {
76
- this._private_anchorBInternal = value;
77
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
77
+ if (this.anchorBInternal !== value) {
78
+ this.anchorBInternal = value;
79
+ this.solverWrapper.setConstraintLHS(this.constraint, this.buildLHS());
78
80
  }
79
81
  }
80
82
  /** Updates anchor on element C */
81
83
  set anchorC(value) {
84
+ this.assertNotDestroyed("UIVerticalInterpolationConstraint.anchorC");
82
85
  assertValidNumber(value, "UIVerticalInterpolationConstraint.anchorC");
83
- if (this._private_anchorCInternal !== value) {
84
- this._private_anchorCInternal = value;
85
- this.solverWrapper.setConstraintLHS(this.constraint, this._private_buildLHS());
86
+ if (this.anchorCInternal !== value) {
87
+ this.anchorCInternal = value;
88
+ this.solverWrapper.setConstraintLHS(this.constraint, this.buildLHS());
86
89
  }
87
90
  }
88
91
  /** Builds constraint expression: C - A*(1-t) - B*t = 0 */
89
- _private_buildLHS() {
92
+ buildLHS() {
90
93
  let aExpression;
91
94
  let bExpression;
92
95
  let cExpression;
93
96
  if (isUIPlaneElement(this.a)) {
94
97
  aExpression = new UIExpression(0, [
95
98
  [this.a.yVariable, 1],
96
- [this.a.hVariable, this._private_anchorAInternal],
99
+ [this.a.hVariable, this.anchorAInternal],
97
100
  ]);
98
101
  }
99
102
  else if (isUIPointElement(this.a)) {
100
103
  aExpression = new UIExpression().plus(this.a.yVariable, 1);
101
104
  }
102
105
  else {
103
- throw new Error("UIVerticalInterpolationConstraint.buildLHS.a: invalid element type");
106
+ throw new Error("UIVerticalInterpolationConstraint.buildLHS.a: A is neither a point nor a plane element");
104
107
  }
105
108
  if (isUIPlaneElement(this.b)) {
106
109
  bExpression = new UIExpression(0, [
107
110
  [this.b.yVariable, 1],
108
- [this.b.hVariable, this._private_anchorBInternal],
111
+ [this.b.hVariable, this.anchorBInternal],
109
112
  ]);
110
113
  }
111
114
  else if (isUIPointElement(this.b)) {
112
115
  bExpression = new UIExpression().plus(this.b.yVariable, 1);
113
116
  }
114
117
  else {
115
- throw new Error("UIVerticalInterpolationConstraint.buildLHS.b: invalid element type");
118
+ throw new Error("UIVerticalInterpolationConstraint.buildLHS.b: B is neither a point nor a plane element");
116
119
  }
117
120
  if (isUIPlaneElement(this.c)) {
118
121
  cExpression = new UIExpression(0, [
119
122
  [this.c.yVariable, 1],
120
- [this.c.hVariable, this._private_anchorCInternal],
123
+ [this.c.hVariable, this.anchorCInternal],
121
124
  ]);
122
125
  }
123
126
  else if (isUIPointElement(this.c)) {
124
127
  cExpression = new UIExpression().plus(this.c.yVariable, 1);
125
128
  }
126
129
  else {
127
- throw new Error("UIVerticalInterpolationConstraint.buildLHS.c: invalid element type");
130
+ throw new Error("UIVerticalInterpolationConstraint.buildLHS.c: C is neither a point nor a plane element");
128
131
  }
129
- const aScaled = aExpression.clone().multiply(1 - this._private_tInternal);
130
- const bScaled = bExpression.clone().multiply(this._private_tInternal);
132
+ const aScaled = aExpression.clone().multiply(1 - this.tInternal);
133
+ const bScaled = bExpression.clone().multiply(this.tInternal);
131
134
  return UIExpression.minus(UIExpression.minus(cExpression, aScaled), bScaled);
132
135
  }
133
136
  }
134
-
135
- export { UIVerticalInterpolationConstraint };
@@ -1,4 +1,4 @@
1
- import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal";
1
+ import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal.js";
2
2
  /** Vertical proportion constraint options */
3
3
  export interface UIVerticalProportionConstraintOptions extends UISingleParameterConstraintOptions {
4
4
  /** Proportion multiplier (A.height * proportion = B.height) */
@@ -1,6 +1,6 @@
1
- import type { UIPlaneElement } from "../../miscellaneous/shared";
2
- import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
3
- import type { UIVerticalProportionConstraintOptions } from "./UIVerticalProportionConstraint.Internal";
1
+ import type { UIPlaneElement } from "../../miscellaneous/shared.js";
2
+ import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint.js";
3
+ import type { UIVerticalProportionConstraintOptions } from "./UIVerticalProportionConstraint.Internal.js";
4
4
  /** Maintains proportional height relationship (A.height * proportion = B.height) */
5
5
  export declare class UIVerticalProportionConstraint extends UISingleParameterConstraint {
6
6
  readonly a: UIPlaneElement;