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,22 +0,0 @@
1
- import { UIResizePolicy } from "./UIResizePolicy";
2
- /** Scales by width with orientation-specific targets */
3
- export declare class UIResizePolicyFixedWidth extends UIResizePolicy {
4
- private fixedWidthLandscapeInternal;
5
- private fixedWidthPortraitInternal;
6
- /**
7
- * Creates fixed width resize policy.
8
- *
9
- * @param fixedWidthLandscape - Target width when landscape
10
- * @param fixedWidthPortrait - Target width when portrait
11
- */
12
- constructor(fixedWidthLandscape: number, fixedWidthPortrait: number);
13
- /** Target width when landscape */
14
- get fixedWidthLandscape(): number;
15
- /** Target width when portrait */
16
- get fixedWidthPortrait(): number;
17
- /** Target width when landscape */
18
- set fixedWidthLandscape(value: number);
19
- /** Target width when portrait */
20
- set fixedWidthPortrait(value: number);
21
- calculateScale(width: number, height: number): number;
22
- }
@@ -1,5 +0,0 @@
1
- import { UIResizePolicy } from "./UIResizePolicy";
2
- /** No scaling. Always returns 1. */
3
- export declare class UIResizePolicyNone extends UIResizePolicy {
4
- calculateScale(width: number, height: number): number;
5
- }
@@ -1,46 +0,0 @@
1
- import { UILayer } from "../layers/UILayer/UILayer";
2
- /** Objects that belong to a UI layer */
3
- export interface UILayerElement {
4
- /** The UI layer containing this element */
5
- readonly layer: UILayer;
6
- }
7
- /** UI elements with position in 2D space */
8
- export interface UIPointElement {
9
- /** Solver variable for x coordinate */
10
- readonly xVariable: number;
11
- /** Solver variable for y coordinate */
12
- readonly yVariable: number;
13
- /** X coordinate in world units */
14
- readonly x: number;
15
- /** Y coordinate in world units */
16
- readonly y: number;
17
- }
18
- /** UI elements with position and dimensions */
19
- export interface UIPlaneElement extends UIPointElement {
20
- /** Solver variable for width */
21
- readonly wVariable: number;
22
- /** Solver variable for height */
23
- readonly hVariable: number;
24
- /** Width in world units */
25
- readonly width: number;
26
- /** Height in world units */
27
- readonly height: number;
28
- }
29
- /**
30
- * Checks if object implements UILayerElement.
31
- * @param obj Object to check
32
- * @returns True if object has valid layer property
33
- */
34
- export declare function isUILayerElement(obj: unknown): obj is UILayerElement;
35
- /**
36
- * Checks if object implements UIPointElement.
37
- * @param obj Object to check
38
- * @returns True if object has valid position variables
39
- */
40
- export declare function isUIPointElement(obj: unknown): obj is UIPointElement;
41
- /**
42
- * Checks if object implements UIPlaneElement.
43
- * @param obj Object to check
44
- * @returns True if object has valid dimension variables
45
- */
46
- export declare function isUIPlaneElement(obj: unknown): obj is UIPlaneElement;
@@ -1,14 +0,0 @@
1
- import { UITextStyle } from "../text-style/UITextStyle";
2
- import type { UITextSpanConfig } from "./UITextSpan.Internal";
3
- /** Text span with associated style */
4
- export declare class UITextSpan {
5
- /** Text style */
6
- style: UITextStyle;
7
- private textInternal;
8
- private dirtyInternal;
9
- /** @param config Text span configuration */
10
- constructor(config: UITextSpanConfig);
11
- /** Text content */
12
- get text(): string;
13
- set text(value: string);
14
- }
@@ -1,48 +0,0 @@
1
- /** Complete text style configuration with all properties resolved */
2
- export interface UITextStyleConfig {
3
- /** Text color */
4
- color: string;
5
- /** Text alignment */
6
- align: "left" | "center" | "right";
7
- /** Font family name */
8
- fontFamily: string;
9
- /** Font size in pixels */
10
- fontSize: number;
11
- /** Font style */
12
- fontStyle: "normal" | "italic" | "oblique";
13
- /** Font weight */
14
- fontWeight: "normal" | "bold" | "bolder" | "lighter" | number;
15
- /** Line height in pixels */
16
- lineHeight: number;
17
- /** Whether shadow is enabled */
18
- enableShadow: boolean;
19
- /** Shadow horizontal offset in pixels */
20
- shadowOffsetX: number;
21
- /** Shadow vertical offset in pixels */
22
- shadowOffsetY: number;
23
- /** Shadow blur radius in pixels */
24
- shadowBlur: number;
25
- /** Shadow color */
26
- shadowColor: string;
27
- /** Whether stroke is enabled */
28
- enableStroke: boolean;
29
- /** Stroke color */
30
- strokeColor: string;
31
- /** Stroke thickness in pixels */
32
- strokeThickness: number;
33
- }
34
- export declare const TEXT_STYLE_DEFAULT_COLOR = "#000000";
35
- export declare const TEXT_STYLE_DEFAULT_ALIGN: "left";
36
- export declare const TEXT_STYLE_DEFAULT_FONT_FAMILY = "Arial";
37
- export declare const TEXT_STYLE_DEFAULT_FONT_SIZE = 16;
38
- export declare const TEXT_STYLE_DEFAULT_FONT_STYLE: "normal";
39
- export declare const TEXT_STYLE_DEFAULT_FONT_WEIGHT: "normal";
40
- export declare const TEXT_STYLE_DEFAULT_LINE_HEIGHT = 1.2;
41
- export declare const TEXT_STYLE_DEFAULT_ENABLE_SHADOW = false;
42
- export declare const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X = 0;
43
- export declare const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y = 0;
44
- export declare const TEXT_STYLE_DEFAULT_SHADOW_BLUR = 0;
45
- export declare const TEXT_STYLE_DEFAULT_SHADOW_COLOR = "transparent";
46
- export declare const TEXT_STYLE_DEFAULT_ENABLE_STROKE = false;
47
- export declare const TEXT_STYLE_DEFAULT_STROKE_COLOR = "#000000";
48
- export declare const TEXT_STYLE_DEFAULT_STROKE_THICKNESS = 0;
@@ -1,85 +0,0 @@
1
- import type { UITextStyleConfig } from "./UITextStyle.Internal";
2
- /** Text style configuration for UI text rendering */
3
- export declare class UITextStyle {
4
- private colorInternal?;
5
- private alignInternal?;
6
- private fontFamilyInternal?;
7
- private fontSizeInternal?;
8
- private fontStyleInternal?;
9
- private fontWeightInternal?;
10
- private lineHeightInternal?;
11
- private enableShadowInternal?;
12
- private shadowOffsetXInternal?;
13
- private shadowOffsetYInternal?;
14
- private shadowBlurInternal?;
15
- private shadowColorInternal?;
16
- private enableStrokeInternal?;
17
- private strokeColorInternal?;
18
- private strokeThicknessInternal?;
19
- private dirtyInternal;
20
- /** @param config Partial style configuration. Unspecified properties remain undefined. */
21
- constructor(config?: Partial<UITextStyleConfig>);
22
- /** Text color */
23
- get color(): string | undefined;
24
- /** Text alignment */
25
- get align(): "left" | "center" | "right" | undefined;
26
- /** Font family name */
27
- get fontFamily(): string | undefined;
28
- /** Font size in pixels */
29
- get fontSize(): number | undefined;
30
- /** Font style */
31
- get fontStyle(): "normal" | "italic" | "oblique" | undefined;
32
- /** Font weight */
33
- get fontWeight(): "normal" | "bold" | "bolder" | "lighter" | number | undefined;
34
- /** Line height in pixels */
35
- get lineHeight(): number | undefined;
36
- /** Whether shadow is enabled */
37
- get enableShadow(): boolean | undefined;
38
- /** Shadow horizontal offset in pixels */
39
- get shadowOffsetX(): number | undefined;
40
- /** Shadow vertical offset in pixels */
41
- get shadowOffsetY(): number | undefined;
42
- /** Shadow blur radius in pixels */
43
- get shadowBlur(): number | undefined;
44
- /** Shadow color */
45
- get shadowColor(): string | undefined;
46
- /** Whether stroke is enabled */
47
- get enableStroke(): boolean | undefined;
48
- /** Stroke color */
49
- get strokeColor(): string | undefined;
50
- /** Stroke thickness in pixels */
51
- get strokeThickness(): number | undefined;
52
- set color(value: string | undefined);
53
- set align(value: "left" | "center" | "right" | undefined);
54
- set fontFamily(value: string | undefined);
55
- set fontSize(value: number | undefined);
56
- set fontStyle(value: "normal" | "italic" | "oblique" | undefined);
57
- set fontWeight(value: "normal" | "bold" | "bolder" | "lighter" | number | undefined);
58
- set lineHeight(value: number | undefined);
59
- set enableShadow(value: boolean | undefined);
60
- set shadowOffsetX(value: number | undefined);
61
- set shadowOffsetY(value: number | undefined);
62
- set shadowBlur(value: number | undefined);
63
- set shadowColor(value: string | undefined);
64
- set enableStroke(value: boolean | undefined);
65
- set strokeColor(value: string | undefined);
66
- set strokeThickness(value: number | undefined);
67
- /**
68
- * Resolves complete style from primary and fallback sources.
69
- * @param primary First style to check for each property
70
- * @param fallback Second style to check if primary is undefined
71
- * @returns Complete style configuration with all defaults applied
72
- */
73
- static resolve(primary?: UITextStyle, fallback?: UITextStyle): UITextStyleConfig;
74
- /** Sets all properties to default values */
75
- setDefaults(): void;
76
- /** Sets all properties to undefined */
77
- clear(): void;
78
- /** Copies from another style instance */
79
- copy(value: UITextStyle): void;
80
- /**
81
- * Calculates maximum padding required for stroke and shadow.
82
- * @returns Padding in pixels needed on all sides
83
- */
84
- calculatePadding(): number;
85
- }
@@ -1,49 +0,0 @@
1
- import { Texture } from "three";
2
- export declare const TEXTURE_DEFAULT_TEXTURE: Texture;
3
- export declare const TEXTURE_DEFAULT_SIZE = 2;
4
- /** Rectangle coordinates and dimensions in atlas */
5
- export interface UITextureRect {
6
- /** X coordinate in pixels */
7
- x: number;
8
- /** Y coordinate in pixels */
9
- y: number;
10
- /** Width in pixels */
11
- w: number;
12
- /** Height in pixels */
13
- h: number;
14
- }
15
- /** Size dimensions */
16
- export interface UITextureSize {
17
- /** Width in pixels */
18
- w: number;
19
- /** Height in pixels */
20
- h: number;
21
- }
22
- /** Transparent padding around visible content */
23
- export interface UITextureTrim {
24
- /** Left padding in world units */
25
- left: number;
26
- /** Right padding in world units */
27
- right: number;
28
- /** Top padding in world units */
29
- top: number;
30
- /** Bottom padding in world units */
31
- bottom: number;
32
- }
33
- /** Configuration for texture atlas sprite */
34
- export interface UITextureAtlasConfig {
35
- /** Source texture atlas */
36
- texture: Texture;
37
- /** Rectangle in atlas containing sprite */
38
- frame: UITextureRect;
39
- /** Whether sprite is rotated 90 degrees clockwise */
40
- rotated?: boolean;
41
- /** Position and size within original image before trimming */
42
- spriteSourceSize: UITextureRect;
43
- /** Original image dimensions before trimming */
44
- sourceSize: UITextureSize;
45
- /** Scale factor for resolution independence */
46
- scale?: number;
47
- }
48
- /** Texture configuration from direct texture or atlas sprite */
49
- export type UITextureConfig = Texture | UITextureAtlasConfig;
@@ -1,67 +0,0 @@
1
- import type { FerrsignView3 } from "ferrsign";
2
- import { Matrix3, Texture, Vector2 } from "three";
3
- import type { UITextureConfig, UITextureTrim } from "./UITextureView.Internal";
4
- /** Wrapper for Three.js texture with atlas and trim support. Does not own the underlying texture; user must dispose it. */
5
- export declare class UITextureView {
6
- private textureInternal;
7
- private sourceWidth;
8
- private sourceHeight;
9
- private frameX;
10
- private frameY;
11
- private frameWidth;
12
- private frameHeight;
13
- private rotatedInternal;
14
- private scaleInternal;
15
- private trimLeft;
16
- private trimRight;
17
- private trimTop;
18
- private trimBottom;
19
- private textureDirtyInternal;
20
- private uvTransformDirtyInternal;
21
- private trimDirtyInternal;
22
- private readonly signalDiminsionsChangedInternal;
23
- /** @param config Texture or atlas configuration */
24
- constructor(config?: UITextureConfig);
25
- /** Original width before trimming in world units */
26
- get width(): number;
27
- /** Original height before trimming in world units */
28
- get height(): number;
29
- /** Visible width after trimming in world units */
30
- get trimmedWidth(): number;
31
- /** Visible height after trimming in world units */
32
- get trimmedHeight(): number;
33
- /** Underlying Three.js texture */
34
- get texture(): Texture;
35
- /** Whether sprite is rotated in atlas */
36
- get rotated(): boolean;
37
- /** Scale factor for resolution independence */
38
- get scale(): number;
39
- /** Transparent padding around visible content */
40
- get trim(): Readonly<UITextureTrim>;
41
- get textureDirty(): boolean;
42
- /** Whether UV transform inputs changed since last check */
43
- get uvTransformDirty(): boolean;
44
- /** Whether trim values changed since last check */
45
- get trimDirty(): boolean;
46
- get signalDiminsionsChanged(): FerrsignView3<number, number, UITextureView>;
47
- setTextureDirtyFalse(): void;
48
- /**
49
- * Calculates UV transform matrix for shader sampling.
50
- * @param result Matrix to store result in
51
- * @returns UV transform matrix
52
- */
53
- calculateUVTransform(result?: Matrix3): Matrix3;
54
- /**
55
- * Gets original dimensions before trimming.
56
- * @param result Vector to store result in
57
- * @returns Width and height in world units
58
- */
59
- getResolution(result?: Vector2): Vector2;
60
- /**
61
- * Replaces texture with new configuration.
62
- * @param config Texture or atlas configuration
63
- */
64
- set(config: UITextureConfig): void;
65
- private setFromTexture;
66
- private setFromAtlasConfig;
67
- }
@@ -1,2 +0,0 @@
1
- export declare const checkOffscreenCanvasSupport: () => boolean;
2
- export declare const checkSRGBSupport: () => boolean;
@@ -1,17 +0,0 @@
1
- export interface UIInputWrapperInterface {
2
- get dirty(): boolean;
3
- createInputCatcher(catchPointerDown: (x: number, y: number, identifier: number) => boolean, catchPointerMove: (x: number, y: number, identifier: number) => boolean, catchPointerUp: (x: number, y: number, identifier: number) => boolean, zIndex: number): number;
4
- destroyInputCatcher(handler: number): void;
5
- getZIndex(handler: number): number;
6
- setZIndex(handler: number, zIndex: number): void;
7
- getActive(handler: number): boolean;
8
- setActive(handler: number, active: boolean): void;
9
- }
10
- export interface UIInputWrapperCatcher {
11
- handler: number;
12
- catchPointerDown: (x: number, y: number, identifier: number) => boolean;
13
- catchPointerMove: (x: number, y: number, identifier: number) => boolean;
14
- catchPointerUp: (x: number, y: number, identifier: number) => boolean;
15
- zIndex: number;
16
- active: boolean;
17
- }
@@ -1,13 +0,0 @@
1
- import type { UIInputWrapperInterface } from "./UIInputWrapper.Internal";
2
- export declare class UIInputWrapper implements UIInputWrapperInterface {
3
- private zIndicesDirty;
4
- private readonly catchers;
5
- private lastHandler;
6
- createInputCatcher(catchPointerDown: (x: number, y: number, identifier: number) => boolean, catchPointerMove: (x: number, y: number, identifier: number) => boolean, catchPointerUp: (x: number, y: number, identifier: number) => boolean, zIndex: number): number;
7
- destroyInputCatcher(handler: number): void;
8
- getZIndex(handler: number): number;
9
- setZIndex(handler: number, zIndex: number): void;
10
- getActive(handler: number): boolean;
11
- setActive(handler: number, active: boolean): void;
12
- private ensureSorted;
13
- }
@@ -1,13 +0,0 @@
1
- import type { Matrix4, Object3D } from "three";
2
- import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
3
- import type { UIProperty } from "../../miscellaneous/generic-plane/shared";
4
- export interface UISceneWrapperInterface {
5
- createPlane(source: string, properties: Record<string, UIProperty>, transform: Matrix4, visibility: boolean, transparency: UITransparencyMode): number;
6
- destroyPlane(handler: number): void;
7
- setTransform(handler: number, transform: Matrix4): void;
8
- setProperties(handler: number, properties: Record<string, UIProperty>): void;
9
- setVisibility(handler: number, visible: boolean): void;
10
- setTransparency(handler: number, transparency: UITransparencyMode): void;
11
- insertCustomObject(object: Object3D): void;
12
- removeCustomObject(object: Object3D): void;
13
- }
@@ -1,20 +0,0 @@
1
- import type { Matrix4, Object3D, WebGLRenderer } from "three";
2
- import type { UIProperty } from "../../miscellaneous/generic-plane/shared";
3
- import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
4
- import type { UISceneWrapperInterface } from "./UISceneWrapper.Internal";
5
- export declare class UISceneWrapper implements UISceneWrapperInterface {
6
- private readonly scene;
7
- private readonly camera;
8
- private readonly planeRegistry;
9
- constructor(width: number, height: number);
10
- createPlane(source: string, properties: Record<string, UIProperty>, transform: Matrix4, visibility: boolean, transparency: UITransparencyMode): number;
11
- destroyPlane(handler: number): void;
12
- setTransform(handler: number, transform: Matrix4): void;
13
- setProperties(handler: number, properties: Record<string, UIProperty>): void;
14
- setVisibility(handler: number, visible: boolean): void;
15
- setTransparency(handler: number, transparency: UITransparencyMode): void;
16
- insertCustomObject(object: Object3D): this;
17
- removeCustomObject(object: Object3D): this;
18
- resize(width: number, height: number): this;
19
- render(renderer: WebGLRenderer): this;
20
- }
@@ -1,49 +0,0 @@
1
- import type { Constraint, Variable } from "@lume/kiwi";
2
- import type { UIExpression } from "../../miscellaneous/UIExpression";
3
- import type { UIPriority } from "../../miscellaneous/UIPriority";
4
- import type { UIRelation } from "../../miscellaneous/UIRelation";
5
- export interface UISolverWrapperInterface {
6
- get dirty(): boolean;
7
- createVariable(value: number, priority: UIPriority): number;
8
- removeVariable(index: number): void;
9
- suggestVariableValue(index: number, value: number): void;
10
- setVariablePriority(index: number, priority: UIPriority): void;
11
- readVariableValue(index: number): number;
12
- createConstraint(lhs: UIExpression, rhs: UIExpression, relation: UIRelation, priority: UIPriority, enabled: boolean): number;
13
- removeConstraint(index: number): void;
14
- setConstraintLHS(index: number, lhs: UIExpression): void;
15
- setConstraintRHS(index: number, rhs: UIExpression): void;
16
- setConstraintRelation(index: number, relation: UIRelation): void;
17
- setConstraintPriority(index: number, priority: UIPriority): void;
18
- setConstraintEnabled(index: number, enabled: boolean): void;
19
- }
20
- /**
21
- * Internal description of a solver variable with its associated properties.
22
- */
23
- export interface VariableDescription {
24
- /** The underlying Kiwi variable instance. */
25
- variable: Variable;
26
- /** Priority level for constraint solving. */
27
- priority: UIPriority;
28
- /** Current suggested value for the variable. */
29
- value: number;
30
- /** Optional constraint for P0 priority variables (required variables). */
31
- constraint?: Constraint;
32
- }
33
- /**
34
- * Internal description of a solver constraint with its configuration.
35
- */
36
- export interface ConstraintDescription {
37
- /** The underlying Kiwi constraint instance. */
38
- constraint: Constraint;
39
- /** Left-hand side expression of the constraint. */
40
- lhs: UIExpression;
41
- /** Right-hand side expression of the constraint. */
42
- rhs: UIExpression;
43
- /** Priority level for constraint solving. */
44
- priority: UIPriority;
45
- /** Relational operator (equal, less than, greater than). */
46
- relation: UIRelation;
47
- /** Whether the constraint is currently active. */
48
- enabled: boolean;
49
- }