laymur 0.16.0 → 0.17.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 (247) hide show
  1. package/.claude/settings.local.json +9 -0
  2. package/.editorconfig +14 -0
  3. package/CLAUDE.md +181 -0
  4. package/README.md +84 -208
  5. package/assets/logotype.png +0 -0
  6. package/eslint.config.js +111 -0
  7. package/package.json +20 -36
  8. package/rollup.config.js +52 -0
  9. package/{dist/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts → src/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.ts} +3 -2
  10. package/src/core/constraints/UIAspectConstraint/UIAspectConstraint.ts +60 -0
  11. package/src/core/constraints/UIConstraint.ts +20 -0
  12. package/src/core/constraints/UICustomConstraint.ts +62 -0
  13. package/{dist/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts → src/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.ts} +3 -2
  14. package/src/core/constraints/UIHeightConstraint/UIHeightConstraint.ts +52 -0
  15. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.ts +13 -0
  16. package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.ts +139 -0
  17. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.ts +16 -0
  18. package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.ts +189 -0
  19. package/{dist/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts → src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.ts} +3 -2
  20. package/src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.ts +68 -0
  21. package/{dist/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts → src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.ts} +9 -8
  22. package/src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.ts +94 -0
  23. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.ts +13 -0
  24. package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.ts +135 -0
  25. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.ts +16 -0
  26. package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.ts +189 -0
  27. package/{dist/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts → src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.ts} +3 -2
  28. package/src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.ts +68 -0
  29. package/{dist/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts → src/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.ts} +3 -2
  30. package/src/core/constraints/UIWidthConstraint/UIWidthConstraint.ts +52 -0
  31. package/src/core/constraints/builders/UIConstraint2DBuilder.Internal.ts +84 -0
  32. package/src/core/constraints/builders/UIConstraint2DBuilder.ts +168 -0
  33. package/src/core/constraints/builders/UICoverConstraintBuilder.Internal.ts +15 -0
  34. package/src/core/constraints/builders/UICoverConstraintBuilder.ts +84 -0
  35. package/src/core/constraints/builders/UIFitConstraintBuilder.Internal.ts +15 -0
  36. package/src/core/constraints/builders/UIFitConstraintBuilder.ts +84 -0
  37. package/src/core/elements/UIAnchor/UIAnchor.Internal.ts +13 -0
  38. package/src/core/elements/UIAnchor/UIAnchor.ts +70 -0
  39. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.ts +30 -0
  40. package/src/core/elements/UIAnimatedImage/UIAnimatedImage.ts +355 -0
  41. package/src/core/elements/UIDummy/UIDummy.Internal.ts +33 -0
  42. package/src/core/elements/UIDummy/UIDummy.ts +244 -0
  43. package/{dist/elements/UIElement/UIElement.Internal.d.ts → src/core/elements/UIElement/UIElement.Internal.ts} +7 -5
  44. package/src/core/elements/UIElement/UIElement.ts +127 -0
  45. package/{dist/elements/UIGraphics/UIGraphics.Internal.d.ts → src/core/elements/UIGraphics/UIGraphics.Internal.ts} +7 -5
  46. package/src/core/elements/UIGraphics/UIGraphics.ts +168 -0
  47. package/{dist/elements/UIImage/UIImage.Internal.d.ts → src/core/elements/UIImage/UIImage.Internal.ts} +3 -2
  48. package/src/core/elements/UIImage/UIImage.ts +138 -0
  49. package/src/core/elements/UINineSlice/UINineSlice.Internal.ts +26 -0
  50. package/src/core/elements/UINineSlice/UINineSlice.ts +296 -0
  51. package/src/core/elements/UIProgress/UIProgress.Internal.ts +24 -0
  52. package/src/core/elements/UIProgress/UIProgress.ts +259 -0
  53. package/src/core/elements/UIScene/UIScene.Internal.ts +46 -0
  54. package/src/core/elements/UIScene/UIScene.ts +259 -0
  55. package/{dist/elements/UIText/UIText.Interfaces.d.ts → src/core/elements/UIText/UIText.Interfaces.ts} +21 -16
  56. package/src/core/elements/UIText/UIText.Internal.ts +29 -0
  57. package/src/core/elements/UIText/UIText.Measuring.ts +183 -0
  58. package/src/core/elements/UIText/UIText.Rendering.ts +83 -0
  59. package/src/core/elements/UIText/UIText.ts +376 -0
  60. package/{dist/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts → src/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.ts} +14 -11
  61. package/src/core/layers/UIFullscreenLayer/UIFullscreenLayer.ts +233 -0
  62. package/{dist/layers/UILayer/UILayer.Internal.d.ts → src/core/layers/UILayer/UILayer.Internal.ts} +15 -11
  63. package/src/core/layers/UILayer/UILayer.ts +156 -0
  64. package/src/core/miscellaneous/UIExpression.ts +142 -0
  65. package/src/core/miscellaneous/UIMode.ts +29 -0
  66. package/src/core/miscellaneous/UIOrientation.ts +18 -0
  67. package/src/core/miscellaneous/UIPriority.ts +63 -0
  68. package/src/core/miscellaneous/UIRelation.ts +39 -0
  69. package/src/core/miscellaneous/UITransparencyMode.ts +9 -0
  70. package/src/core/miscellaneous/area/UIArea.ts +5 -0
  71. package/src/core/miscellaneous/area/UIAreaCircle.ts +32 -0
  72. package/src/core/miscellaneous/area/UIAreaPolygon.ts +50 -0
  73. package/src/core/miscellaneous/area/UIAreaRectangle.ts +38 -0
  74. package/src/core/miscellaneous/area/UIAreaRoundedRectangle.ts +78 -0
  75. package/src/core/miscellaneous/asserts.ts +187 -0
  76. package/src/core/miscellaneous/canvas.ts +73 -0
  77. package/src/core/miscellaneous/color/UIColor.Internal.ts +89 -0
  78. package/src/core/miscellaneous/color/UIColor.ts +844 -0
  79. package/src/core/miscellaneous/computeTransform.ts +127 -0
  80. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.ts +235 -0
  81. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.ts +524 -0
  82. package/{dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts → src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.ts} +10 -8
  83. package/src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.ts +448 -0
  84. package/src/core/miscellaneous/generic-plane/shared.ts +323 -0
  85. package/src/core/miscellaneous/insets/UIInsets.Internal.ts +9 -0
  86. package/src/core/miscellaneous/insets/UIInsets.ts +248 -0
  87. package/src/core/miscellaneous/mask-function/UIProgressMaskFunction.ts +24 -0
  88. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.ts +58 -0
  89. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.ts +52 -0
  90. package/src/core/miscellaneous/math.ts +16 -0
  91. package/src/core/miscellaneous/micro/UIMicro.Internal.ts +33 -0
  92. package/src/core/miscellaneous/micro/UIMicro.ts +222 -0
  93. package/src/core/miscellaneous/resize-policy/UIResizePolicy.ts +8 -0
  94. package/src/core/miscellaneous/resize-policy/UIResizePolicyCover.ts +57 -0
  95. package/src/core/miscellaneous/resize-policy/UIResizePolicyCross.ts +65 -0
  96. package/src/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.ts +65 -0
  97. package/src/core/miscellaneous/resize-policy/UIResizePolicyFit.ts +57 -0
  98. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.ts +65 -0
  99. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.ts +65 -0
  100. package/src/core/miscellaneous/resize-policy/UIResizePolicyNone.ts +11 -0
  101. package/src/core/miscellaneous/shared.ts +73 -0
  102. package/{dist/miscellaneous/text-span/UITextSpan.Internal.d.ts → src/core/miscellaneous/text-span/UITextSpan.Internal.ts} +5 -4
  103. package/src/core/miscellaneous/text-span/UITextSpan.ts +43 -0
  104. package/src/core/miscellaneous/text-style/UITextStyle.Internal.ts +52 -0
  105. package/src/core/miscellaneous/text-style/UITextStyle.ts +479 -0
  106. package/src/core/miscellaneous/texture/UITextureView.Internal.ts +55 -0
  107. package/src/core/miscellaneous/texture/UITextureView.ts +308 -0
  108. package/src/core/miscellaneous/webglCapabilities.ts +129 -0
  109. package/src/core/shaders/UIImage.glsl +10 -0
  110. package/src/core/shaders/UINineSlice.glsl +53 -0
  111. package/src/core/shaders/UIProgress.glsl +15 -0
  112. package/src/core/shaders/UIProgressMaskFunctionCircular.glsl +13 -0
  113. package/src/core/shaders/UIProgressMaskFunctionDirectional.glsl +12 -0
  114. package/src/core/shaders/glsl.d.ts +27 -0
  115. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.ts +23 -0
  116. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.ts +124 -0
  117. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.ts +22 -0
  118. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.ts +101 -0
  119. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.ts +58 -0
  120. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.ts +605 -0
  121. package/src/particles/behaviorModules/UIBehaviorDirectionalGravity.ts +70 -0
  122. package/src/particles/behaviorModules/UIBehaviorModule.ts +20 -0
  123. package/src/particles/behaviorModules/UIBehaviorPointGravity.ts +173 -0
  124. package/src/particles/behaviorModules/UIBehaviorScaleOverLife.ts +104 -0
  125. package/src/particles/behaviorModules/UIBehaviorTorqueDamping.ts +75 -0
  126. package/src/particles/behaviorModules/UIBehaviorTorqueNoise.ts +115 -0
  127. package/src/particles/behaviorModules/UIBehaviorVelocityDamping.ts +77 -0
  128. package/src/particles/behaviorModules/UIBehaviorVelocityNoise.ts +118 -0
  129. package/src/particles/elements/UIEmitter.Internal.ts +22 -0
  130. package/src/particles/elements/UIEmitter.ts +313 -0
  131. package/src/particles/index.ts +18 -0
  132. package/src/particles/instancedParticle/UIInstancedParticle.Internal.ts +263 -0
  133. package/src/particles/instancedParticle/UIInstancedParticle.ts +138 -0
  134. package/src/particles/miscellaneous/miscellaneous.ts +115 -0
  135. package/src/particles/renderingModules/UIRenderingColorOverLife.ts +39 -0
  136. package/src/particles/renderingModules/UIRenderingColorOverVelocity.ts +49 -0
  137. package/src/particles/renderingModules/UIRenderingModule.ts +17 -0
  138. package/src/particles/renderingModules/UIRenderingTexture.ts +30 -0
  139. package/src/particles/shaders/UIRenderingColorOverLife.glsl +4 -0
  140. package/src/particles/shaders/UIRenderingColorOverVelocity.glsl +6 -0
  141. package/src/particles/shaders/UIRenderingTexture.glsl +4 -0
  142. package/src/particles/spawnModules/UISpawnModule.ts +22 -0
  143. package/src/particles/spawnModules/UISpawnOffset.ts +62 -0
  144. package/src/particles/spawnModules/UISpawnRandomLifetime.ts +68 -0
  145. package/src/particles/spawnModules/UISpawnRandomRotation.ts +60 -0
  146. package/src/particles/spawnModules/UISpawnRandomScale.ts +81 -0
  147. package/src/particles/spawnModules/UISpawnRandomTorque.ts +62 -0
  148. package/src/particles/spawnModules/UISpawnRandomVelocity.ts +92 -0
  149. package/src/particles/spawnModules/UISpawnRectangle.ts +81 -0
  150. package/tsconfig.json +29 -0
  151. package/dist/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +0 -22
  152. package/dist/constraints/UIConstraint.d.ts +0 -12
  153. package/dist/constraints/UICustomConstraint.d.ts +0 -28
  154. package/dist/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +0 -20
  155. package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +0 -11
  156. package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +0 -36
  157. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +0 -14
  158. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +0 -44
  159. package/dist/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +0 -22
  160. package/dist/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +0 -43
  161. package/dist/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +0 -11
  162. package/dist/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +0 -32
  163. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +0 -14
  164. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +0 -44
  165. package/dist/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +0 -22
  166. package/dist/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +0 -20
  167. package/dist/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +0 -64
  168. package/dist/constraints/builders/UIConstraint2DBuilder.d.ts +0 -46
  169. package/dist/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +0 -13
  170. package/dist/constraints/builders/UICoverConstraintBuilder.d.ts +0 -29
  171. package/dist/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +0 -13
  172. package/dist/constraints/builders/UIFitConstraintBuilder.d.ts +0 -29
  173. package/dist/elements/UIAnchor/UIAnchor.Internal.d.ts +0 -9
  174. package/dist/elements/UIAnchor/UIAnchor.d.ts +0 -32
  175. package/dist/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +0 -27
  176. package/dist/elements/UIAnimatedImage/UIAnimatedImage.d.ts +0 -77
  177. package/dist/elements/UIDummy/UIDummy.Internal.d.ts +0 -30
  178. package/dist/elements/UIDummy/UIDummy.d.ts +0 -82
  179. package/dist/elements/UIElement/UIElement.d.ts +0 -38
  180. package/dist/elements/UIGraphics/UIGraphics.d.ts +0 -51
  181. package/dist/elements/UIImage/UIImage.d.ts +0 -32
  182. package/dist/elements/UINineSlice/UINineSlice.Internal.d.ts +0 -23
  183. package/dist/elements/UINineSlice/UINineSlice.d.ts +0 -60
  184. package/dist/elements/UIProgress/UIProgress.Internal.d.ts +0 -14
  185. package/dist/elements/UIProgress/UIProgress.d.ts +0 -45
  186. package/dist/elements/UIScene/UIScene.Internal.d.ts +0 -43
  187. package/dist/elements/UIScene/UIScene.d.ts +0 -59
  188. package/dist/elements/UIText/UIText.Internal.d.ts +0 -26
  189. package/dist/elements/UIText/UIText.Measuring.d.ts +0 -50
  190. package/dist/elements/UIText/UIText.Rendering.d.ts +0 -20
  191. package/dist/elements/UIText/UIText.d.ts +0 -71
  192. package/dist/index.js +0 -9246
  193. package/dist/index.js.map +0 -1
  194. package/dist/index.min.js +0 -2
  195. package/dist/index.min.js.map +0 -1
  196. package/dist/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -63
  197. package/dist/layers/UILayer/UILayer.d.ts +0 -49
  198. package/dist/miscellaneous/UIExpression.d.ts +0 -69
  199. package/dist/miscellaneous/UIMode.d.ts +0 -23
  200. package/dist/miscellaneous/UIOrientation.d.ts +0 -15
  201. package/dist/miscellaneous/UIPriority.d.ts +0 -32
  202. package/dist/miscellaneous/UIRelation.d.ts +0 -23
  203. package/dist/miscellaneous/UITransparencyMode.d.ts +0 -9
  204. package/dist/miscellaneous/area/UIArea.d.ts +0 -3
  205. package/dist/miscellaneous/area/UIAreaCircle.d.ts +0 -15
  206. package/dist/miscellaneous/area/UIAreaPolygon.d.ts +0 -12
  207. package/dist/miscellaneous/area/UIAreaRectangle.d.ts +0 -17
  208. package/dist/miscellaneous/area/UIAreaRoundedRectangle.d.ts +0 -21
  209. package/dist/miscellaneous/asserts.d.ts +0 -43
  210. package/dist/miscellaneous/canvas.d.ts +0 -31
  211. package/dist/miscellaneous/color/UIColor.Internal.d.ts +0 -7
  212. package/dist/miscellaneous/color/UIColor.d.ts +0 -234
  213. package/dist/miscellaneous/computeTransform.d.ts +0 -18
  214. package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +0 -19
  215. package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +0 -1
  216. package/dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +0 -1
  217. package/dist/miscellaneous/generic-plane/shared.d.ts +0 -38
  218. package/dist/miscellaneous/insets/UIInsets.Internal.d.ts +0 -11
  219. package/dist/miscellaneous/insets/UIInsets.d.ts +0 -48
  220. package/dist/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +0 -9
  221. package/dist/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +0 -21
  222. package/dist/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +0 -16
  223. package/dist/miscellaneous/math.d.ts +0 -5
  224. package/dist/miscellaneous/micro/UIMicro.Internal.d.ts +0 -31
  225. package/dist/miscellaneous/micro/UIMicro.d.ts +0 -59
  226. package/dist/miscellaneous/resize-policy/UIResizePolicy.d.ts +0 -3
  227. package/dist/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +0 -22
  228. package/dist/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +0 -22
  229. package/dist/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +0 -22
  230. package/dist/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +0 -22
  231. package/dist/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +0 -22
  232. package/dist/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +0 -22
  233. package/dist/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +0 -5
  234. package/dist/miscellaneous/shared.d.ts +0 -46
  235. package/dist/miscellaneous/text-span/UITextSpan.d.ts +0 -14
  236. package/dist/miscellaneous/text-style/UITextStyle.Internal.d.ts +0 -48
  237. package/dist/miscellaneous/text-style/UITextStyle.d.ts +0 -85
  238. package/dist/miscellaneous/texture/UITextureView.Internal.d.ts +0 -49
  239. package/dist/miscellaneous/texture/UITextureView.d.ts +0 -67
  240. package/dist/miscellaneous/webglCapabilities.d.ts +0 -2
  241. package/dist/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +0 -17
  242. package/dist/wrappers/UIInputWrapper/UIInputWrapper.d.ts +0 -13
  243. package/dist/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +0 -13
  244. package/dist/wrappers/UISceneWrapper/UISceneWrapper.d.ts +0 -20
  245. package/dist/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +0 -49
  246. package/dist/wrappers/UISolverWrapper/UISolverWrapper.d.ts +0 -215
  247. /package/{dist/index.d.ts → src/core/index.ts} +0 -0
@@ -1,14 +0,0 @@
1
- import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal";
2
- export declare const DEFAULT_ANCHOR = 0.5;
3
- export declare const DEFAULT_T = 0.5;
4
- /** Vertical interpolation constraint options */
5
- export interface UIVerticalInterpolationConstraintOptions extends UISingleParameterConstraintOptions {
6
- /** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
7
- anchorA: number;
8
- /** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
9
- anchorB: number;
10
- /** Anchor on element C (0 = bottom, 0.5 = center, 1 = top) */
11
- anchorC: number;
12
- /** Interpolation factor (0 = A position, 1 = B position) */
13
- t: number;
14
- }
@@ -1,44 +0,0 @@
1
- import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
2
- import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
3
- import type { UIVerticalInterpolationConstraintOptions } from "./UIVerticalInterpolationConstraint.Internal";
4
- /** Positions element C vertically between A and B based on interpolation factor */
5
- export declare class UIVerticalInterpolationConstraint extends UISingleParameterConstraint {
6
- private readonly a;
7
- private readonly b;
8
- private readonly c;
9
- /** Solver constraint descriptor */
10
- protected readonly constraint: number;
11
- /** Anchor on element A */
12
- private anchorAInternal;
13
- /** Anchor on element B */
14
- private anchorBInternal;
15
- /** Anchor on element C */
16
- private anchorCInternal;
17
- /** Interpolation factor */
18
- private tInternal;
19
- /**
20
- * @param a First element
21
- * @param b Second element
22
- * @param c Element to position between A and B
23
- * @param options Interpolation configuration
24
- */
25
- constructor(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, c: UIPointElement | UIPlaneElement, options?: Partial<UIVerticalInterpolationConstraintOptions>);
26
- /** Interpolation factor (0 = A position, 1 = B position) */
27
- get t(): number;
28
- /** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
29
- get anchorA(): number;
30
- /** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
31
- get anchorB(): number;
32
- /** Anchor on element C (0 = bottom, 0.5 = center, 1 = top) */
33
- get anchorC(): number;
34
- /** Updates interpolation factor */
35
- set t(value: number);
36
- /** Updates anchor on element A */
37
- set anchorA(value: number);
38
- /** Updates anchor on element B */
39
- set anchorB(value: number);
40
- /** Updates anchor on element C */
41
- set anchorC(value: number);
42
- /** Builds constraint expression: C - A*(1-t) - B*t = 0 */
43
- private buildLHS;
44
- }
@@ -1,22 +0,0 @@
1
- import type { UIPlaneElement } from "../../miscellaneous/shared";
2
- import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
3
- import type { UIVerticalProportionConstraintOptions } from "./UIVerticalProportionConstraint.Internal";
4
- /** Maintains proportional height relationship (A.height * proportion = B.height) */
5
- export declare class UIVerticalProportionConstraint extends UISingleParameterConstraint {
6
- private readonly a;
7
- private readonly b;
8
- protected readonly constraint: number;
9
- private proportionInternal;
10
- /**
11
- * @param a First element
12
- * @param b Second element
13
- * @param options Proportion configuration
14
- */
15
- constructor(a: UIPlaneElement, b: UIPlaneElement, options?: Partial<UIVerticalProportionConstraintOptions>);
16
- /** Current proportion multiplier */
17
- get proportion(): number;
18
- /** Updates proportion multiplier */
19
- set proportion(value: number);
20
- /** Builds constraint expression for proportional relationship */
21
- private buildRHS;
22
- }
@@ -1,20 +0,0 @@
1
- import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
- import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
3
- import type { UIWidthConstraintOptions } from "./UIWidthConstraint.Internal";
4
- /** Fixes element width to constant value */
5
- export declare class UIWidthConstraint extends UISingleParameterConstraint {
6
- private readonly element;
7
- /** Solver constraint descriptor */
8
- protected readonly constraint: number;
9
- /** Current width value */
10
- private widthInternal;
11
- /**
12
- * @param element Element to constrain
13
- * @param options Width configuration. Defaults to element's current width.
14
- */
15
- constructor(element: UIPlaneElement & UILayerElement, options?: Partial<UIWidthConstraintOptions>);
16
- /** Current width in world units */
17
- get width(): number;
18
- /** Updates width */
19
- set width(value: number);
20
- }
@@ -1,64 +0,0 @@
1
- import type { UIOrientation } from "../../miscellaneous/UIOrientation";
2
- import type { UIPriority } from "../../miscellaneous/UIPriority";
3
- import type { UIRelation } from "../../miscellaneous/UIRelation";
4
- /** Horizontal and vertical values object */
5
- export interface UIType2DObject<T> {
6
- /** Horizontal value */
7
- h?: T;
8
- /** Vertical value */
9
- v?: T;
10
- }
11
- /** Horizontal and vertical values as object, tuple, or single value */
12
- export type UIType2D<T> = UIType2DObject<T> | [T, T] | T;
13
- /**
14
- * Normalizes UIType2D input to object form.
15
- * @param value Object, tuple, or single value
16
- * @returns Normalized object with h and v properties
17
- */
18
- export declare function normalizeUIType2D<T>(value: UIType2D<T> | undefined): UIType2DObject<T>;
19
- /** Base 2D constraint options */
20
- export interface UIConstraint2DOptions {
21
- /** Priority for each axis */
22
- priority: UIType2D<UIPriority>;
23
- /** Relation for each axis */
24
- relation: UIType2D<UIRelation>;
25
- /** Orientation for each axis */
26
- orientation: UIType2D<UIOrientation>;
27
- }
28
- /** 2D size constraint options */
29
- export interface UIConstraintSize2DOptions extends UIConstraint2DOptions {
30
- /** Width and height */
31
- size: UIType2D<number>;
32
- }
33
- /** 2D distance constraint options */
34
- export interface UIConstraintDistance2DOptions extends UIConstraint2DOptions {
35
- /** Anchor on element A for each axis */
36
- anchorA: UIType2D<number>;
37
- /** Anchor on element B for each axis */
38
- anchorB: UIType2D<number>;
39
- /** Distance for each axis */
40
- distance: UIType2D<number>;
41
- }
42
- /** 2D proportion constraint options */
43
- export interface UIConstraintProportion2DOptions extends UIConstraint2DOptions {
44
- /** Proportion for each axis */
45
- proportion: UIType2D<number>;
46
- }
47
- /** 2D interpolation constraint options */
48
- export interface UIConstraintInterpolation2DOptions extends UIConstraint2DOptions {
49
- /** Anchor on element A for each axis */
50
- anchorA: UIType2D<number>;
51
- /** Anchor on element B for each axis */
52
- anchorB: UIType2D<number>;
53
- /** Anchor on element C for each axis */
54
- anchorC: UIType2D<number>;
55
- /** Interpolation factor for each axis */
56
- t: UIType2D<number>;
57
- }
58
- /** Horizontal and vertical constraint pair */
59
- export interface UIConstraint2DResult<TH, TV> {
60
- /** Horizontal constraint */
61
- h: TH;
62
- /** Vertical constraint */
63
- v: TV;
64
- }
@@ -1,46 +0,0 @@
1
- import type { UIElement } from "../../elements/UIElement/UIElement";
2
- import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
3
- import { UIHeightConstraint } from "../UIHeightConstraint/UIHeightConstraint";
4
- import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
5
- import { UIHorizontalInterpolationConstraint } from "../UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint";
6
- import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
7
- import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
8
- import { UIVerticalInterpolationConstraint } from "../UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint";
9
- import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
10
- import { UIWidthConstraint } from "../UIWidthConstraint/UIWidthConstraint";
11
- import type { UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintInterpolation2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions } from "./UIConstraint2DBuilder.Internal";
12
- /** Builder for paired horizontal and vertical constraints */
13
- export declare class UIConstraint2DBuilder {
14
- /**
15
- * Creates width and height constraints.
16
- * @param element Element to constrain
17
- * @param options Size configuration for both axes
18
- * @returns Width and height constraints
19
- */
20
- static size(element: UIElement, options?: Partial<UIConstraintSize2DOptions>): UIConstraint2DResult<UIWidthConstraint, UIHeightConstraint>;
21
- /**
22
- * Creates horizontal and vertical distance constraints.
23
- * @param a First element
24
- * @param b Second element
25
- * @param options Distance configuration for both axes
26
- * @returns Horizontal and vertical distance constraints
27
- */
28
- static distance(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, options?: Partial<UIConstraintDistance2DOptions>): UIConstraint2DResult<UIHorizontalDistanceConstraint, UIVerticalDistanceConstraint>;
29
- /**
30
- * Creates horizontal and vertical proportion constraints.
31
- * @param a Element with proportional dimensions
32
- * @param b Target element
33
- * @param options Proportion configuration for both axes
34
- * @returns Horizontal and vertical proportion constraints
35
- */
36
- static proportion(a: UIPlaneElement, b: UIPlaneElement, options?: Partial<UIConstraintProportion2DOptions>): UIConstraint2DResult<UIHorizontalProportionConstraint, UIVerticalProportionConstraint>;
37
- /**
38
- * Creates horizontal and vertical interpolation constraints.
39
- * @param a First element
40
- * @param b Second element
41
- * @param c Element to position between A and B
42
- * @param options Interpolation configuration for both axes
43
- * @returns Horizontal and vertical interpolation constraints
44
- */
45
- static interpolation(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, c: UIPointElement | UIPlaneElement, options?: Partial<UIConstraintInterpolation2DOptions>): UIConstraint2DResult<UIHorizontalInterpolationConstraint, UIVerticalInterpolationConstraint>;
46
- }
@@ -1,13 +0,0 @@
1
- import type { UIOrientation } from "../../miscellaneous/UIOrientation";
2
- export declare const COVER_CONSTRAINT_DEFAULT_ANCHOR = 0.5;
3
- /** Cover constraint builder options */
4
- export interface UICoverConstraintBuilderOptions {
5
- /** Whether to maintain active element aspect ratio */
6
- keepActiveAspect: boolean;
7
- /** Horizontal anchor (0 = left, 0.5 = center, 1 = right) */
8
- anchorH: number;
9
- /** Vertical anchor (0 = bottom, 0.5 = center, 1 = top) */
10
- anchorV: number;
11
- /** Orientation for constraints */
12
- orientation: UIOrientation;
13
- }
@@ -1,29 +0,0 @@
1
- import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
- import { UIAspectConstraint } from "../UIAspectConstraint/UIAspectConstraint";
3
- import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
4
- import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
5
- import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
6
- import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
7
- import type { UICoverConstraintBuilderOptions } from "./UICoverConstraintBuilder.Internal";
8
- /** Builder for cover layout (like CSS object-fit: cover) */
9
- export declare class UICoverConstraintBuilder {
10
- /**
11
- * Creates cover layout constraints.
12
- * @param passive Container element
13
- * @param active Content element that covers container
14
- * @param options Cover configuration
15
- * @returns Created constraints
16
- */
17
- static build(passive: UIPlaneElement, active: UIPlaneElement & UILayerElement, options?: Partial<UICoverConstraintBuilderOptions>): {
18
- /** Aspect constraint if keepActiveAspect is true */
19
- activeAspectConstraint?: UIAspectConstraint;
20
- /** Horizontal position constraint */
21
- xConstraint: UIHorizontalDistanceConstraint;
22
- /** Vertical position constraint */
23
- yConstraint: UIVerticalDistanceConstraint;
24
- /** Width constraint (ensures coverage) */
25
- widthConstraint: UIHorizontalProportionConstraint;
26
- /** Height constraint (ensures coverage) */
27
- heightConstraint: UIVerticalProportionConstraint;
28
- };
29
- }
@@ -1,13 +0,0 @@
1
- import type { UIOrientation } from "../../miscellaneous/UIOrientation";
2
- export declare const DEFAULT_ANCHOR = 0.5;
3
- /** Fit constraint builder options */
4
- export interface UIFitConstraintBuilderOptions {
5
- /** Whether to maintain active element aspect ratio */
6
- keepActiveAspect: boolean;
7
- /** Horizontal anchor (0 = left, 0.5 = center, 1 = right) */
8
- anchorH: number;
9
- /** Vertical anchor (0 = bottom, 0.5 = center, 1 = top) */
10
- anchorV: number;
11
- /** Orientation for constraints */
12
- orientation: UIOrientation;
13
- }
@@ -1,29 +0,0 @@
1
- import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
2
- import { UIAspectConstraint } from "../UIAspectConstraint/UIAspectConstraint";
3
- import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
4
- import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
5
- import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
6
- import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
7
- import type { UIFitConstraintBuilderOptions } from "./UIFitConstraintBuilder.Internal";
8
- /** Builder for fit layout (like CSS object-fit: contain) */
9
- export declare class UIFitConstraintBuilder {
10
- /**
11
- * Creates fit layout constraints.
12
- * @param passive Container element
13
- * @param active Content element that fits within container
14
- * @param options Fit configuration
15
- * @returns Created constraints
16
- */
17
- static build(passive: UIPlaneElement, active: UIPlaneElement & UILayerElement, options?: Partial<UIFitConstraintBuilderOptions>): {
18
- /** Aspect constraint if keepActiveAspect is true */
19
- activeAspectConstraint?: UIAspectConstraint;
20
- /** Horizontal position constraint */
21
- xConstraint: UIHorizontalDistanceConstraint;
22
- /** Vertical position constraint */
23
- yConstraint: UIVerticalDistanceConstraint;
24
- /** Width constraint (ensures fitting) */
25
- widthConstraint: UIHorizontalProportionConstraint;
26
- /** Height constraint (ensures fitting) */
27
- heightConstraint: UIVerticalProportionConstraint;
28
- };
29
- }
@@ -1,9 +0,0 @@
1
- /** Configuration options for UIAnchor */
2
- export interface UIAnchorOptions {
3
- /** X coordinate in world units */
4
- x: number;
5
- /** Y coordinate in world units */
6
- y: number;
7
- }
8
- export declare const ANCHOR_DEFAULT_X = 0;
9
- export declare const ANCHOR_DEFAULT_Y = 0;
@@ -1,32 +0,0 @@
1
- import type { UILayer } from "../../layers/UILayer/UILayer";
2
- import type { UILayerElement, UIPointElement } from "../../miscellaneous/shared";
3
- import type { UISolverWrapperInterface } from "../../wrappers/UISolverWrapper/UISolverWrapper.Internal";
4
- import type { UIAnchorOptions } from "./UIAnchor.Internal";
5
- /** Point in 2D space with constraint-based positioning */
6
- export declare class UIAnchor implements UILayerElement, UIPointElement {
7
- readonly layer: UILayer;
8
- /** Optional identifier for debugging */
9
- name: string;
10
- /** Solver variable for x coordinate */
11
- readonly xVariable: number;
12
- /** Solver variable for y coordinate */
13
- readonly yVariable: number;
14
- protected readonly solverWrapper: UISolverWrapperInterface;
15
- /**
16
- * Creates a new UIAnchor instance.
17
- *
18
- * @param layer - Layer containing this anchor
19
- * @param options - Configuration options
20
- */
21
- constructor(layer: UILayer, options?: Partial<UIAnchorOptions>);
22
- /** X coordinate relative to layer origin (bottom-left) */
23
- get x(): number;
24
- /** Y coordinate relative to layer origin (bottom-left) */
25
- get y(): number;
26
- /** X coordinate relative to layer origin (bottom-left) */
27
- set x(value: number);
28
- /** Y coordinate relative to layer origin (bottom-left) */
29
- set y(value: number);
30
- /** Removes anchor and frees resources */
31
- destroy(): void;
32
- }
@@ -1,27 +0,0 @@
1
- import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
2
- import type { UIElementOptions } from "../UIElement/UIElement.Internal";
3
- /** Animation loop behavior */
4
- export declare enum UIAnimatedImageLoopMode {
5
- /** No looping, stops at boundary frame */
6
- NONE = 0,
7
- /** Loops back to opposite frame */
8
- LOOP = 1,
9
- /** Reverses direction at boundaries */
10
- PING_PONG = 2
11
- }
12
- /** Configuration options for UIAnimatedImage */
13
- export interface UIAnimatedImageOptions extends UIElementOptions {
14
- /** Multiplicative tint */
15
- color: UIColorConfig;
16
- /** Animation speed in frames per second */
17
- frameRate: number;
18
- /** Playback speed multiplier. Can be negative for reverse playback. */
19
- timeScale: number;
20
- /** Loop behavior */
21
- loopMode: UIAnimatedImageLoopMode;
22
- /** Whether to start playing immediately */
23
- playByDefault: boolean;
24
- }
25
- export declare const ANIMATED_IMAGE_DEFAULT_FRAME_RATE = 24;
26
- export declare const ANIMATED_IMAGE_DEFAULT_TIME_SCALE = 1;
27
- export declare const ANIMATED_IMAGE_DEFAULT_LOOP_MODE = UIAnimatedImageLoopMode.LOOP;
@@ -1,77 +0,0 @@
1
- import type { FerrsignView0 } from "ferrsign";
2
- import type { WebGLRenderer } from "three";
3
- import type { UILayer } from "../../layers/UILayer/UILayer";
4
- import { UIColor } from "../../miscellaneous/color/UIColor";
5
- import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
6
- import { UITextureView } from "../../miscellaneous/texture/UITextureView";
7
- import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
8
- import { UIElement } from "../UIElement/UIElement";
9
- import type { UIAnimatedImageOptions } from "./UIAnimatedImage.Internal";
10
- import { UIAnimatedImageLoopMode } from "./UIAnimatedImage.Internal";
11
- /** Frame-based texture animation element */
12
- export declare class UIAnimatedImage extends UIElement {
13
- private readonly colorInternal;
14
- private readonly sequenceInternal;
15
- private frameRateInternal;
16
- private timeScaleInternal;
17
- private loopModeInternal;
18
- private readonly textureTransform;
19
- private isPlaying;
20
- private sequenceFrameIndex;
21
- private currentFrameIndexDirty;
22
- private accumulatedTime;
23
- private readonly signalPlayedInternal;
24
- private readonly signalPausedInternal;
25
- private readonly signalStoppedInternal;
26
- /**
27
- * Creates a new UIAnimatedImage instance.
28
- *
29
- * Defaults size to first frame dimensions if width and height not provided.
30
- *
31
- * @param layer - Layer containing this element
32
- * @param sequence - Array of textures forming animation
33
- * @param options - Configuration options
34
- */
35
- constructor(layer: UILayer, sequence: UITextureConfig[], options?: Partial<UIAnimatedImageOptions>);
36
- /** Multiplicative tint. Alpha channel controls opacity. */
37
- get color(): UIColor;
38
- /** Total animation duration in seconds */
39
- get duration(): number;
40
- /** Animation speed in frames per second */
41
- get frameRate(): number;
42
- /** Loop behavior */
43
- get loopMode(): UIAnimatedImageLoopMode;
44
- /** Animation frames as readonly array */
45
- get sequence(): readonly UITextureView[];
46
- /** Playback speed multiplier. Can be negative for reverse playback. */
47
- get timeScale(): number;
48
- /** Signal fired when animation starts or resumes */
49
- get signalPlayed(): FerrsignView0;
50
- /** Signal fired when animation pauses */
51
- get signalPaused(): FerrsignView0;
52
- /** Signal fired when animation stops and resets */
53
- get signalStopped(): FerrsignView0;
54
- /** Multiplicative tint. Alpha channel controls opacity. */
55
- set color(value: UIColorConfig);
56
- /** Animation speed in frames per second */
57
- set frameRate(value: number);
58
- /** Loop behavior */
59
- set loopMode(value: UIAnimatedImageLoopMode);
60
- /** Replaces animation frames. Stops playback. */
61
- set sequence(sequence: UITextureConfig[]);
62
- /** Playback speed multiplier. Can be negative for reverse playback. */
63
- set timeScale(value: number);
64
- /** Removes element and frees resources */
65
- destroy(): void;
66
- /** Starts or resumes animation playback */
67
- play(): void;
68
- /** Pauses animation at current frame */
69
- pause(): void;
70
- /** Stops animation and resets to first frame */
71
- stop(): void;
72
- protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
73
- protected setPlaneTransform(): void;
74
- private readonly onTextureDimensionsChanged;
75
- private subscribeSequenceEvents;
76
- private unsubscribeSequenceEvents;
77
- }
@@ -1,30 +0,0 @@
1
- import type { UIArea } from "../../miscellaneous/area/UIArea";
2
- import { UIMode } from "../../miscellaneous/UIMode";
3
- import type { UIAnchorOptions } from "../UIAnchor/UIAnchor.Internal";
4
- import type { UIDummy } from "./UIDummy";
5
- /** Input event data */
6
- export interface UIInputEventData {
7
- /** X coordinate */
8
- x: number;
9
- /** Y coordinate */
10
- y: number;
11
- /** Pointer identifier */
12
- identifier: number;
13
- /** Element that emitted the event */
14
- element: UIDummy;
15
- }
16
- /** Configuration options for UIDummy */
17
- export interface UIDummyOptions extends UIAnchorOptions {
18
- /** Width in world units */
19
- width: number;
20
- /** Height in world units */
21
- height: number;
22
- /** Shape defining interactive region in element-local space (0,0 = bottom-left, 1,1 = top-right) */
23
- interactionArea: UIArea;
24
- /** Controls visibility and interactivity */
25
- mode: UIMode;
26
- }
27
- export declare const DUMMY_DEFAULT_WIDTH = 64;
28
- export declare const DUMMY_DEFAULT_HEIGHT = 32;
29
- export declare const DUMMY_DEFAULT_MODE = UIMode.VISIBLE;
30
- export declare const DUMMY_DEFAULT_Z_INDEX = 0;
@@ -1,82 +0,0 @@
1
- import type { FerrsignView1 } from "ferrsign";
2
- import { Ferrsign1 } from "ferrsign";
3
- import type { UILayer } from "../../layers/UILayer/UILayer";
4
- import type { UIArea } from "../../miscellaneous/area/UIArea";
5
- import type { UIPlaneElement } from "../../miscellaneous/shared";
6
- import { UIMode } from "../../miscellaneous/UIMode";
7
- import type { UIInputWrapperInterface } from "../../wrappers/UIInputWrapper/UIInputWrapper.Internal";
8
- import { UIAnchor } from "../UIAnchor/UIAnchor";
9
- import type { UIDummyOptions, UIInputEventData } from "./UIDummy.Internal";
10
- /** Rectangular area with dimensions but no rendering */
11
- export declare class UIDummy extends UIAnchor implements UIPlaneElement {
12
- /** Shape defining interactive region in element-local space (0,0 = bottom-left, 1,1 = top-right) */
13
- interactionArea: UIArea;
14
- /** Solver variable for width */
15
- readonly wVariable: number;
16
- /** Solver variable for height */
17
- readonly hVariable: number;
18
- protected modeInternal: UIMode;
19
- protected readonly inputWrapper: UIInputWrapperInterface;
20
- private readonly catcherHandler;
21
- private wasPointerInside;
22
- private readonly signalPointerPressedInternal;
23
- private readonly signalPointerMovedInternal;
24
- private readonly signalPointerReleasedInternal;
25
- private readonly signalPointerEnteredInternal;
26
- private readonly signalPointerLeftInternal;
27
- /**
28
- * Creates a new UIDummy instance.
29
- *
30
- * @param layer - Layer containing this element
31
- * @param options - Configuration options
32
- */
33
- constructor(layer: UILayer, options?: Partial<UIDummyOptions>);
34
- /** Width in world units */
35
- get width(): number;
36
- /** Height in world units */
37
- get height(): number;
38
- /** X coordinate of right edge */
39
- get oppositeX(): number;
40
- /** Y coordinate of top edge */
41
- get oppositeY(): number;
42
- /** X coordinate of horizontal center */
43
- get centerX(): number;
44
- /** Y coordinate of vertical center */
45
- get centerY(): number;
46
- /** Controls visibility and interactivity */
47
- get mode(): UIMode;
48
- /** Rendering and input priority. Higher values on top. */
49
- get zIndex(): number;
50
- /** Signal fired when pointer is pressed */
51
- get signalPointerPressed(): FerrsignView1<UIInputEventData>;
52
- /** Signal fired when pointer is moved */
53
- get signalPointerMoved(): FerrsignView1<UIInputEventData>;
54
- /** Signal fired when pointer is released */
55
- get signalPointerReleased(): FerrsignView1<UIInputEventData>;
56
- /** Signal fired when pointer enters element */
57
- get signalPointerEntered(): FerrsignView1<UIInputEventData>;
58
- /** Signal fired when pointer leaves element */
59
- get signalPointerLeft(): FerrsignView1<UIInputEventData>;
60
- /** Width in world units */
61
- set width(value: number);
62
- /** Height in world units */
63
- set height(value: number);
64
- /** X coordinate of right edge */
65
- set oppositeX(value: number);
66
- /** Y coordinate of top edge */
67
- set oppositeY(value: number);
68
- /** X coordinate of horizontal center */
69
- set centerX(value: number);
70
- /** Y coordinate of vertical center */
71
- set centerY(value: number);
72
- /** Controls visibility and interactivity */
73
- set mode(value: UIMode);
74
- /** Rendering and input priority. Higher values on top. */
75
- set zIndex(value: number);
76
- /** Removes element and frees resources */
77
- destroy(): void;
78
- protected readonly catchPointerDown: (x: number, y: number, identifier: number) => boolean;
79
- protected readonly catchPointerMove: (x: number, y: number, identifier: number) => boolean;
80
- protected readonly catchPointerUp: (x: number, y: number, identifier: number) => boolean;
81
- protected handleInputEvent(x: number, y: number, identifier: number, signal: Ferrsign1<UIInputEventData>): boolean;
82
- }
@@ -1,38 +0,0 @@
1
- import type { WebGLRenderer } from "three";
2
- import type { UILayer } from "../../layers/UILayer/UILayer";
3
- import type { UIProperty } from "../../miscellaneous/generic-plane/shared";
4
- import { UIMicro } from "../../miscellaneous/micro/UIMicro";
5
- import type { UIMode } from "../../miscellaneous/UIMode";
6
- import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
7
- import type { UISceneWrapperInterface } from "../../wrappers/UISceneWrapper/UISceneWrapper.Internal";
8
- import { UIDummy } from "../UIDummy/UIDummy";
9
- import type { UIElementOptions } from "./UIElement.Internal";
10
- /** Base class for renderable UI elements */
11
- export declare abstract class UIElement extends UIDummy {
12
- /** Transforms that don't affect constraints */
13
- readonly micro: UIMicro;
14
- protected readonly sceneWrapper: UISceneWrapperInterface;
15
- protected planeHandler: number;
16
- private transparencyModeInternal;
17
- private transparencyModeDirty;
18
- private visibilityDirty;
19
- /**
20
- * Creates a new UIElement instance.
21
- *
22
- * @param layer - Layer containing this element
23
- * @param source - GLSL shader source code
24
- * @param properties - Shader uniform properties
25
- * @param options - Configuration options
26
- */
27
- constructor(layer: UILayer, source: string, properties: Record<string, UIProperty>, options?: Partial<UIElementOptions>);
28
- /** Alpha blending mode */
29
- get transparencyMode(): UITransparencyMode;
30
- /** Alpha blending mode */
31
- set transparencyMode(value: UITransparencyMode);
32
- set mode(value: UIMode);
33
- /** Removes element and frees resources */
34
- destroy(): void;
35
- protected setPlaneTransform(): void;
36
- protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
37
- private readonly handleWillRender;
38
- }