laymur 0.15.1 → 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 (248) 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/src/core/elements/UIElement/UIElement.Internal.ts +13 -0
  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/index.d.ts → src/core/index.ts} +2 -1
  61. package/{dist/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts → src/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.ts} +14 -11
  62. package/src/core/layers/UIFullscreenLayer/UIFullscreenLayer.ts +233 -0
  63. package/{dist/layers/UILayer/UILayer.Internal.d.ts → src/core/layers/UILayer/UILayer.Internal.ts} +15 -11
  64. package/src/core/layers/UILayer/UILayer.ts +156 -0
  65. package/src/core/miscellaneous/UIExpression.ts +142 -0
  66. package/src/core/miscellaneous/UIMode.ts +29 -0
  67. package/src/core/miscellaneous/UIOrientation.ts +18 -0
  68. package/src/core/miscellaneous/UIPriority.ts +63 -0
  69. package/src/core/miscellaneous/UIRelation.ts +39 -0
  70. package/src/core/miscellaneous/UITransparencyMode.ts +9 -0
  71. package/src/core/miscellaneous/area/UIArea.ts +5 -0
  72. package/src/core/miscellaneous/area/UIAreaCircle.ts +32 -0
  73. package/src/core/miscellaneous/area/UIAreaPolygon.ts +50 -0
  74. package/src/core/miscellaneous/area/UIAreaRectangle.ts +38 -0
  75. package/src/core/miscellaneous/area/UIAreaRoundedRectangle.ts +78 -0
  76. package/src/core/miscellaneous/asserts.ts +187 -0
  77. package/src/core/miscellaneous/canvas.ts +73 -0
  78. package/src/core/miscellaneous/color/UIColor.Internal.ts +89 -0
  79. package/src/core/miscellaneous/color/UIColor.ts +844 -0
  80. package/src/core/miscellaneous/computeTransform.ts +127 -0
  81. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.ts +235 -0
  82. package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.ts +524 -0
  83. package/{dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts → src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.ts} +10 -8
  84. package/src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.ts +448 -0
  85. package/src/core/miscellaneous/generic-plane/shared.ts +323 -0
  86. package/src/core/miscellaneous/insets/UIInsets.Internal.ts +9 -0
  87. package/src/core/miscellaneous/insets/UIInsets.ts +248 -0
  88. package/src/core/miscellaneous/mask-function/UIProgressMaskFunction.ts +24 -0
  89. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.ts +58 -0
  90. package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.ts +52 -0
  91. package/src/core/miscellaneous/math.ts +16 -0
  92. package/src/core/miscellaneous/micro/UIMicro.Internal.ts +33 -0
  93. package/src/core/miscellaneous/micro/UIMicro.ts +222 -0
  94. package/src/core/miscellaneous/resize-policy/UIResizePolicy.ts +8 -0
  95. package/src/core/miscellaneous/resize-policy/UIResizePolicyCover.ts +57 -0
  96. package/src/core/miscellaneous/resize-policy/UIResizePolicyCross.ts +65 -0
  97. package/src/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.ts +65 -0
  98. package/src/core/miscellaneous/resize-policy/UIResizePolicyFit.ts +57 -0
  99. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.ts +65 -0
  100. package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.ts +65 -0
  101. package/src/core/miscellaneous/resize-policy/UIResizePolicyNone.ts +11 -0
  102. package/src/core/miscellaneous/shared.ts +73 -0
  103. package/{dist/miscellaneous/text-span/UITextSpan.Internal.d.ts → src/core/miscellaneous/text-span/UITextSpan.Internal.ts} +5 -4
  104. package/src/core/miscellaneous/text-span/UITextSpan.ts +43 -0
  105. package/src/core/miscellaneous/text-style/UITextStyle.Internal.ts +52 -0
  106. package/src/core/miscellaneous/text-style/UITextStyle.ts +479 -0
  107. package/src/core/miscellaneous/texture/UITextureView.Internal.ts +55 -0
  108. package/src/core/miscellaneous/texture/UITextureView.ts +308 -0
  109. package/src/core/miscellaneous/webglCapabilities.ts +129 -0
  110. package/src/core/shaders/UIImage.glsl +10 -0
  111. package/src/core/shaders/UINineSlice.glsl +53 -0
  112. package/src/core/shaders/UIProgress.glsl +15 -0
  113. package/src/core/shaders/UIProgressMaskFunctionCircular.glsl +13 -0
  114. package/src/core/shaders/UIProgressMaskFunctionDirectional.glsl +12 -0
  115. package/src/core/shaders/glsl.d.ts +27 -0
  116. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.ts +23 -0
  117. package/src/core/wrappers/UIInputWrapper/UIInputWrapper.ts +124 -0
  118. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.ts +22 -0
  119. package/src/core/wrappers/UISceneWrapper/UISceneWrapper.ts +101 -0
  120. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.ts +58 -0
  121. package/src/core/wrappers/UISolverWrapper/UISolverWrapper.ts +605 -0
  122. package/src/particles/behaviorModules/UIBehaviorDirectionalGravity.ts +70 -0
  123. package/src/particles/behaviorModules/UIBehaviorModule.ts +20 -0
  124. package/src/particles/behaviorModules/UIBehaviorPointGravity.ts +173 -0
  125. package/src/particles/behaviorModules/UIBehaviorScaleOverLife.ts +104 -0
  126. package/src/particles/behaviorModules/UIBehaviorTorqueDamping.ts +75 -0
  127. package/src/particles/behaviorModules/UIBehaviorTorqueNoise.ts +115 -0
  128. package/src/particles/behaviorModules/UIBehaviorVelocityDamping.ts +77 -0
  129. package/src/particles/behaviorModules/UIBehaviorVelocityNoise.ts +118 -0
  130. package/src/particles/elements/UIEmitter.Internal.ts +22 -0
  131. package/src/particles/elements/UIEmitter.ts +313 -0
  132. package/src/particles/index.ts +18 -0
  133. package/src/particles/instancedParticle/UIInstancedParticle.Internal.ts +263 -0
  134. package/src/particles/instancedParticle/UIInstancedParticle.ts +138 -0
  135. package/src/particles/miscellaneous/miscellaneous.ts +115 -0
  136. package/src/particles/renderingModules/UIRenderingColorOverLife.ts +39 -0
  137. package/src/particles/renderingModules/UIRenderingColorOverVelocity.ts +49 -0
  138. package/src/particles/renderingModules/UIRenderingModule.ts +17 -0
  139. package/src/particles/renderingModules/UIRenderingTexture.ts +30 -0
  140. package/src/particles/shaders/UIRenderingColorOverLife.glsl +4 -0
  141. package/src/particles/shaders/UIRenderingColorOverVelocity.glsl +6 -0
  142. package/src/particles/shaders/UIRenderingTexture.glsl +4 -0
  143. package/src/particles/spawnModules/UISpawnModule.ts +22 -0
  144. package/src/particles/spawnModules/UISpawnOffset.ts +62 -0
  145. package/src/particles/spawnModules/UISpawnRandomLifetime.ts +68 -0
  146. package/src/particles/spawnModules/UISpawnRandomRotation.ts +60 -0
  147. package/src/particles/spawnModules/UISpawnRandomScale.ts +81 -0
  148. package/src/particles/spawnModules/UISpawnRandomTorque.ts +62 -0
  149. package/src/particles/spawnModules/UISpawnRandomVelocity.ts +92 -0
  150. package/src/particles/spawnModules/UISpawnRectangle.ts +81 -0
  151. package/tsconfig.json +29 -0
  152. package/dist/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +0 -22
  153. package/dist/constraints/UIConstraint.d.ts +0 -12
  154. package/dist/constraints/UICustomConstraint.d.ts +0 -28
  155. package/dist/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +0 -20
  156. package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +0 -11
  157. package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +0 -36
  158. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +0 -14
  159. package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +0 -44
  160. package/dist/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +0 -22
  161. package/dist/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +0 -43
  162. package/dist/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +0 -11
  163. package/dist/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +0 -32
  164. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +0 -14
  165. package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +0 -44
  166. package/dist/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +0 -22
  167. package/dist/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +0 -20
  168. package/dist/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +0 -64
  169. package/dist/constraints/builders/UIConstraint2DBuilder.d.ts +0 -46
  170. package/dist/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +0 -13
  171. package/dist/constraints/builders/UICoverConstraintBuilder.d.ts +0 -29
  172. package/dist/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +0 -13
  173. package/dist/constraints/builders/UIFitConstraintBuilder.d.ts +0 -29
  174. package/dist/elements/UIAnchor/UIAnchor.Internal.d.ts +0 -9
  175. package/dist/elements/UIAnchor/UIAnchor.d.ts +0 -32
  176. package/dist/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +0 -27
  177. package/dist/elements/UIAnimatedImage/UIAnimatedImage.d.ts +0 -77
  178. package/dist/elements/UIElement/UIElement.Internal.d.ts +0 -11
  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/UIInputDummy/UIInputDummy.Internal.d.ts +0 -30
  183. package/dist/elements/UIInputDummy/UIInputDummy.d.ts +0 -82
  184. package/dist/elements/UINineSlice/UINineSlice.Internal.d.ts +0 -23
  185. package/dist/elements/UINineSlice/UINineSlice.d.ts +0 -60
  186. package/dist/elements/UIProgress/UIProgress.Internal.d.ts +0 -14
  187. package/dist/elements/UIProgress/UIProgress.d.ts +0 -45
  188. package/dist/elements/UIScene/UIScene.Internal.d.ts +0 -43
  189. package/dist/elements/UIScene/UIScene.d.ts +0 -59
  190. package/dist/elements/UIText/UIText.Internal.d.ts +0 -26
  191. package/dist/elements/UIText/UIText.Measuring.d.ts +0 -50
  192. package/dist/elements/UIText/UIText.Rendering.d.ts +0 -20
  193. package/dist/elements/UIText/UIText.d.ts +0 -71
  194. package/dist/index.js +0 -9236
  195. package/dist/index.js.map +0 -1
  196. package/dist/index.min.js +0 -2
  197. package/dist/index.min.js.map +0 -1
  198. package/dist/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -63
  199. package/dist/layers/UILayer/UILayer.d.ts +0 -49
  200. package/dist/miscellaneous/UIExpression.d.ts +0 -69
  201. package/dist/miscellaneous/UIMode.d.ts +0 -23
  202. package/dist/miscellaneous/UIOrientation.d.ts +0 -15
  203. package/dist/miscellaneous/UIPriority.d.ts +0 -32
  204. package/dist/miscellaneous/UIRelation.d.ts +0 -23
  205. package/dist/miscellaneous/UITransparencyMode.d.ts +0 -9
  206. package/dist/miscellaneous/area/UIArea.d.ts +0 -3
  207. package/dist/miscellaneous/area/UIAreaCircle.d.ts +0 -15
  208. package/dist/miscellaneous/area/UIAreaPolygon.d.ts +0 -12
  209. package/dist/miscellaneous/area/UIAreaRectangle.d.ts +0 -17
  210. package/dist/miscellaneous/area/UIAreaRoundedRectangle.d.ts +0 -21
  211. package/dist/miscellaneous/asserts.d.ts +0 -43
  212. package/dist/miscellaneous/canvas.d.ts +0 -31
  213. package/dist/miscellaneous/color/UIColor.Internal.d.ts +0 -7
  214. package/dist/miscellaneous/color/UIColor.d.ts +0 -234
  215. package/dist/miscellaneous/computeTransform.d.ts +0 -18
  216. package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +0 -19
  217. package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +0 -1
  218. package/dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +0 -1
  219. package/dist/miscellaneous/generic-plane/shared.d.ts +0 -38
  220. package/dist/miscellaneous/insets/UIInsets.Internal.d.ts +0 -11
  221. package/dist/miscellaneous/insets/UIInsets.d.ts +0 -48
  222. package/dist/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +0 -9
  223. package/dist/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +0 -21
  224. package/dist/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +0 -16
  225. package/dist/miscellaneous/math.d.ts +0 -5
  226. package/dist/miscellaneous/micro/UIMicro.Internal.d.ts +0 -31
  227. package/dist/miscellaneous/micro/UIMicro.d.ts +0 -59
  228. package/dist/miscellaneous/resize-policy/UIResizePolicy.d.ts +0 -3
  229. package/dist/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +0 -22
  230. package/dist/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +0 -22
  231. package/dist/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +0 -22
  232. package/dist/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +0 -22
  233. package/dist/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +0 -22
  234. package/dist/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +0 -22
  235. package/dist/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +0 -5
  236. package/dist/miscellaneous/shared.d.ts +0 -46
  237. package/dist/miscellaneous/text-span/UITextSpan.d.ts +0 -14
  238. package/dist/miscellaneous/text-style/UITextStyle.Internal.d.ts +0 -48
  239. package/dist/miscellaneous/text-style/UITextStyle.d.ts +0 -85
  240. package/dist/miscellaneous/texture/UITextureView.Internal.d.ts +0 -49
  241. package/dist/miscellaneous/texture/UITextureView.d.ts +0 -67
  242. package/dist/miscellaneous/webglCapabilities.d.ts +0 -2
  243. package/dist/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +0 -17
  244. package/dist/wrappers/UIInputWrapper/UIInputWrapper.d.ts +0 -13
  245. package/dist/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +0 -13
  246. package/dist/wrappers/UISceneWrapper/UISceneWrapper.d.ts +0 -20
  247. package/dist/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +0 -49
  248. package/dist/wrappers/UISolverWrapper/UISolverWrapper.d.ts +0 -215
@@ -1,63 +0,0 @@
1
- import type { FerrsignView1 } from "ferrsign";
2
- import type { Camera, Vector2, WebGLRenderer } from "three";
3
- import { Ray, Vector3 } from "three";
4
- import type { UIResizePolicy } from "../../miscellaneous/resize-policy/UIResizePolicy";
5
- import { UILayer } from "../UILayer/UILayer";
6
- import type { UIFullscreenLayerInputEventData, UIFullscreenLayerOptions } from "./UIFullscreenLayer.Internal";
7
- /** Layer that automatically handles browser window resizing and input events */
8
- export declare class UIFullscreenLayer extends UILayer {
9
- private resizePolicyInternal;
10
- private resizePolicyDirty;
11
- private readonly signalPressedInternal;
12
- private readonly signalMovedInternal;
13
- private readonly signalReleasedInternal;
14
- constructor(options?: Partial<UIFullscreenLayerOptions>);
15
- /** Current resize policy */
16
- get resizePolicy(): UIResizePolicy;
17
- /** Signal fired when pointer is pressed */
18
- get signalPressed(): FerrsignView1<UIFullscreenLayerInputEventData>;
19
- /** Signal fired when pointer is moved */
20
- get signalMoved(): FerrsignView1<UIFullscreenLayerInputEventData>;
21
- /** Signal fired when pointer is released */
22
- get signalReleased(): FerrsignView1<UIFullscreenLayerInputEventData>;
23
- /** Updates resize policy */
24
- set resizePolicy(value: UIResizePolicy);
25
- /** Removes event listeners and frees resources */
26
- destroy(): void;
27
- /**
28
- * Renders layer and all visible elements
29
- * @param renderer Three.js WebGL renderer
30
- * @param deltaTime Time since last frame in seconds
31
- */
32
- render(renderer: WebGLRenderer, deltaTime: number): void;
33
- /**
34
- * Projects 3D world position to 2D layer coordinates
35
- * @param position World position
36
- * @param camera Three.js camera
37
- * @param result Reusable vector instance
38
- * @returns Layer coordinates
39
- */
40
- projectWorldPosition(position: Vector3, camera: Camera, result?: Vector3): Vector3;
41
- /**
42
- * Projects 2D layer coordinates to 3D world position
43
- * @param position Layer coordinates
44
- * @param camera Three.js camera
45
- * @param z Depth coordinate
46
- * @param result Reusable vector instance
47
- * @returns World position
48
- */
49
- projectLayerPosition(position: Vector2, camera: Camera, z?: number, result?: Vector3): Vector3;
50
- /**
51
- * Builds ray from layer position through camera
52
- * @param position Layer coordinates
53
- * @param camera Three.js camera
54
- * @param result Reusable ray instance
55
- * @returns Ray from near to far plane
56
- */
57
- buildRay(position: Vector2, camera: Camera, result?: Ray): Ray;
58
- private readonly onResize;
59
- private readonly onPointerDown;
60
- private readonly onPointerMove;
61
- private readonly onPointerUp;
62
- private handleWindowInput;
63
- }
@@ -1,49 +0,0 @@
1
- import type { FerrsignView2, FerrsignView3 } from "ferrsign";
2
- import type { WebGLRenderer } from "three";
3
- import type { UIPlaneElement } from "../../miscellaneous/shared";
4
- import { UIInputWrapper } from "../../wrappers/UIInputWrapper/UIInputWrapper";
5
- import type { UILayerMode, UILayerOptions, UILayerOrientation } from "./UILayer.Internal";
6
- /** Base layer for UI rendering and layout management */
7
- export declare abstract class UILayer implements UIPlaneElement {
8
- /** Optional layer name */
9
- name: string;
10
- /** Solver variable for x coordinate */
11
- readonly xVariable: number;
12
- /** Solver variable for y coordinate */
13
- readonly yVariable: number;
14
- /** Solver variable for width */
15
- readonly wVariable: number;
16
- /** Solver variable for height */
17
- readonly hVariable: number;
18
- protected readonly inputWrapperInternal: UIInputWrapper;
19
- private readonly solverWrapperInternal;
20
- private readonly sceneWrapperInternal;
21
- private modeInternal;
22
- private orientationInternal;
23
- private readonly signalOrientationChangedInternal;
24
- private readonly signalModeChangedInternal;
25
- private readonly signalRenderingInternal;
26
- constructor(options: Partial<UILayerOptions>);
27
- /** X coordinate in world units (always 0 for layers) */
28
- get x(): number;
29
- /** Y coordinate in world units (always 0 for layers) */
30
- get y(): number;
31
- /** Layer width in world units */
32
- get width(): number;
33
- /** Layer height in world units */
34
- get height(): number;
35
- /** Current visibility and interactivity mode */
36
- get mode(): UILayerMode;
37
- /** Current orientation based on aspect ratio */
38
- get orientation(): UILayerOrientation;
39
- /** Signal fired when orientation changes */
40
- get signalOrientationChanged(): FerrsignView2<UILayerOrientation, UILayer>;
41
- /** Signal fired when mode changes */
42
- get signalModeChanged(): FerrsignView2<UILayerMode, UILayer>;
43
- /** Signal fired during rendering */
44
- get signalRendering(): FerrsignView3<WebGLRenderer, number, UILayer>;
45
- /** Updates visibility and interactivity mode */
46
- set mode(value: UILayerMode);
47
- protected resizeInternal(width: number, height: number): void;
48
- protected renderInternal(renderer: WebGLRenderer, deltaTime: number): void;
49
- }
@@ -1,69 +0,0 @@
1
- /** Linear expression for constraint equations */
2
- export declare class UIExpression {
3
- /** Constant term */
4
- constant: number;
5
- /** Variable coefficients */
6
- private readonly terms;
7
- /**
8
- * @param constant Constant term
9
- * @param terms Variable-coefficient pairs
10
- */
11
- constructor(constant?: number, terms?: [number, number][]);
12
- /**
13
- * Creates expression representing a + b.
14
- * @param a First expression
15
- * @param b Second expression
16
- * @returns Sum of expressions
17
- */
18
- static plus(a: UIExpression, b: UIExpression): UIExpression;
19
- /**
20
- * Creates expression representing a - b.
21
- * @param a First expression
22
- * @param b Second expression
23
- * @returns Difference of expressions
24
- */
25
- static minus(a: UIExpression, b: UIExpression): UIExpression;
26
- /**
27
- * Adds variable term to expression.
28
- * @param variableIndex Variable descriptor
29
- * @param coefficient Coefficient to add
30
- * @returns This instance for chaining
31
- */
32
- plus(variableIndex: number, coefficient: number): this;
33
- /**
34
- * Subtracts variable term from expression.
35
- * @param variableIndex Variable descriptor
36
- * @param coefficient Coefficient to subtract
37
- * @returns This instance for chaining
38
- */
39
- minus(variableIndex: number, coefficient: number): this;
40
- /**
41
- * Multiplies all terms by scalar.
42
- * @param value Scalar multiplier
43
- * @returns This instance for chaining
44
- */
45
- multiply(value: number): this;
46
- /**
47
- * Divides all terms by scalar.
48
- * @param value Scalar divisor
49
- * @returns This instance for chaining
50
- */
51
- divide(value: number): this;
52
- /**
53
- * Checks if expression contains variable term.
54
- * @param variableIndex Variable descriptor
55
- * @returns True if variable has term
56
- */
57
- hasTerm(variableIndex: number): boolean;
58
- /**
59
- * Copies from another expression.
60
- * @param expression Source expression
61
- * @returns This instance for chaining
62
- */
63
- copy(expression: UIExpression): this;
64
- /**
65
- * Creates independent copy.
66
- * @returns New expression with same content
67
- */
68
- clone(): UIExpression;
69
- }
@@ -1,23 +0,0 @@
1
- /** Visibility and interactivity state */
2
- export declare enum UIMode {
3
- /** Not rendered, no input */
4
- HIDDEN = 0,
5
- /** Rendered, no input */
6
- VISIBLE = 1,
7
- /** Rendered, receives input, blocks input to elements behind */
8
- INTERACTIVE = 2,
9
- /** Rendered, receives input, passes input to elements behind */
10
- INTERACTIVE_TRANSPARENT = 3
11
- }
12
- /**
13
- * Checks if mode allows input events.
14
- * @param mode Mode to check
15
- * @returns True if interactive
16
- */
17
- export declare function isUIModeInteractive(mode: UIMode): boolean;
18
- /**
19
- * Checks if mode is rendered.
20
- * @param mode Mode to check
21
- * @returns True if visible
22
- */
23
- export declare function isUIModeVisible(mode: UIMode): boolean;
@@ -1,15 +0,0 @@
1
- /** Screen orientation for conditional constraints */
2
- export declare enum UIOrientation {
3
- /** Landscape (width > height) */
4
- HORIZONTAL = 0,
5
- /** Portrait (height > width) */
6
- VERTICAL = 1,
7
- /** Active in any orientation */
8
- ALWAYS = 2
9
- }
10
- /**
11
- * Resolves optional orientation.
12
- * @param orientation Orientation to resolve
13
- * @returns Orientation or ALWAYS if undefined
14
- */
15
- export declare function resolveOrientation(orientation?: UIOrientation): UIOrientation;
@@ -1,32 +0,0 @@
1
- /** Constraint solver priority levels */
2
- export declare enum UIPriority {
3
- /** Highest priority */
4
- P0 = 0,
5
- /** High priority */
6
- P1 = 1,
7
- /** Medium-high priority */
8
- P2 = 2,
9
- /** Medium priority */
10
- P3 = 3,
11
- /** Medium-low priority */
12
- P4 = 4,
13
- /** Low priority */
14
- P5 = 5,
15
- /** Very low priority */
16
- P6 = 6,
17
- /** Lowest priority */
18
- P7 = 7
19
- }
20
- /**
21
- * Converts priority to solver strength.
22
- * @param priority Priority level
23
- * @returns Solver strength value
24
- * @throws If priority is invalid
25
- */
26
- export declare function convertPriority(priority: UIPriority): number;
27
- /**
28
- * Resolves optional priority.
29
- * @param priority Priority to resolve
30
- * @returns Priority or P0 if undefined
31
- */
32
- export declare function resolvePriority(priority?: UIPriority): UIPriority;
@@ -1,23 +0,0 @@
1
- import { Operator } from "@lume/kiwi";
2
- /** Relational operators for constraints */
3
- export declare enum UIRelation {
4
- /** Equality: LHS = RHS */
5
- EQUAL = 0,
6
- /** Less than or equal: LHS ≤ RHS */
7
- LESS_THAN = 1,
8
- /** Greater than or equal: LHS ≥ RHS */
9
- GREATER_THAN = 2
10
- }
11
- /**
12
- * Converts relation to solver operator.
13
- * @param relation Relation type
14
- * @returns Solver operator
15
- * @throws If relation is invalid
16
- */
17
- export declare function convertRelation(relation: UIRelation): Operator;
18
- /**
19
- * Resolves optional relation.
20
- * @param relation Relation to resolve
21
- * @returns Relation or EQUAL if undefined
22
- */
23
- export declare function resolveRelation(relation?: UIRelation): UIRelation;
@@ -1,9 +0,0 @@
1
- /** Transparency rendering modes */
2
- export declare enum UITransparencyMode {
3
- /** Binary transparency. Best performance. */
4
- CLIP = 0,
5
- /** Dithered transparency. Good performance. */
6
- HASH = 1,
7
- /** Alpha blending. Best quality, requires depth sorting. */
8
- BLEND = 2
9
- }
@@ -1,3 +0,0 @@
1
- /** Base class for interaction area shapes */
2
- export declare abstract class UIArea {
3
- }
@@ -1,15 +0,0 @@
1
- import { UIArea } from "./UIArea";
2
- /** Circular interaction area */
3
- export declare class UIAreaCircle extends UIArea {
4
- centerX: number;
5
- centerY: number;
6
- radius: number;
7
- /**
8
- * Creates circular area.
9
- *
10
- * @param centerX - Center X in normalized coordinates (0 to 1)
11
- * @param centerY - Center Y in normalized coordinates (0 to 1)
12
- * @param radius - Radius in normalized coordinates (0 to 1)
13
- */
14
- constructor(centerX: number, centerY: number, radius: number);
15
- }
@@ -1,12 +0,0 @@
1
- import type { Vector2Like } from "../math";
2
- import { UIArea } from "./UIArea";
3
- /** Polygonal interaction area using ray casting */
4
- export declare class UIAreaPolygon extends UIArea {
5
- vertices: Vector2Like[];
6
- /**
7
- * Creates polygonal area.
8
- *
9
- * @param vertices - Vertices in normalized coordinates (0 to 1)
10
- */
11
- constructor(vertices: Vector2Like[]);
12
- }
@@ -1,17 +0,0 @@
1
- import { UIArea } from "./UIArea";
2
- /** Rectangular interaction area */
3
- export declare class UIAreaRectangle extends UIArea {
4
- x: number;
5
- y: number;
6
- width: number;
7
- height: number;
8
- /**
9
- * Creates rectangular area.
10
- *
11
- * @param x - X position in normalized coordinates (0 to 1)
12
- * @param y - Y position in normalized coordinates (0 to 1)
13
- * @param width - Width in normalized coordinates (0 to 1)
14
- * @param height - Height in normalized coordinates (0 to 1)
15
- */
16
- constructor(x: number, y: number, width: number, height: number);
17
- }
@@ -1,21 +0,0 @@
1
- import { UIArea } from "./UIArea";
2
- /** Rectangular interaction area with rounded corners */
3
- export declare class UIAreaRoundedRectangle extends UIArea {
4
- x: number;
5
- y: number;
6
- width: number;
7
- height: number;
8
- radius: number;
9
- /**
10
- * Creates rounded rectangular area.
11
- *
12
- * Radius clamped to half of smallest dimension.
13
- *
14
- * @param x - X position in normalized coordinates (0 to 1)
15
- * @param y - Y position in normalized coordinates (0 to 1)
16
- * @param width - Width in normalized coordinates (0 to 1)
17
- * @param height - Height in normalized coordinates (0 to 1)
18
- * @param radius - Corner radius in normalized coordinates (0 to 1)
19
- */
20
- constructor(x: number, y: number, width: number, height: number, radius: number);
21
- }
@@ -1,43 +0,0 @@
1
- import { UILayer } from "../layers/UILayer/UILayer";
2
- /**
3
- * Validates value is finite number within safe range.
4
- * @param value Number to validate
5
- * @param subject Value name for error messages
6
- * @throws If value is not finite or exceeds safe range
7
- */
8
- export declare function assertValidNumber(value: number, subject: string): void;
9
- /**
10
- * Validates value is positive (>= EPSILON).
11
- * @param value Number to validate
12
- * @param subject Value name for error messages
13
- * @throws If value is invalid or below EPSILON
14
- */
15
- export declare function assertValidPositiveNumber(value: number, subject: string): void;
16
- /**
17
- * Validates value is non-negative (>= 0).
18
- * @param value Number to validate
19
- * @param subject Value name for error messages
20
- * @throws If value is invalid or negative
21
- */
22
- export declare function assertValidNonNegativeNumber(value: number, subject: string): void;
23
- /**
24
- * Validates constraint arguments are from same layer.
25
- * @param a First constraint subject
26
- * @param b Second constraint subject
27
- * @param subject Constraint name for error messages
28
- * @returns Common layer for both subjects
29
- * @throws If subjects are invalid or from different layers
30
- */
31
- export declare function assertValidConstraintArguments(a: unknown, b: unknown, subject: string): UILayer;
32
- /**
33
- * Validates interpolation constraint subjects.
34
- * @param subject Constraint name for error messages
35
- * @param a First element
36
- * @param b Second element
37
- * @param c Element to interpolate
38
- * @param anchorA Anchor on element A
39
- * @param anchorB Anchor on element B
40
- * @returns Common layer for all subjects
41
- * @throws If subjects violate interpolation constraints
42
- */
43
- export declare function assertValidInterpolationConstraintArguments(subject: string, a: unknown, b: unknown, c: unknown, anchorA: number, anchorB: number): UILayer;
@@ -1,31 +0,0 @@
1
- import { CanvasTexture } from "three";
2
- /** Canvas type that works both in main thread and workers */
3
- export type UICanvas = HTMLCanvasElement | OffscreenCanvas;
4
- /** 2D rendering context type for UICanvas */
5
- export type UICanvasRenderingContext2D = CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D;
6
- /**
7
- * Creates a canvas using OffscreenCanvas if available, otherwise falls back to HTMLCanvasElement.
8
- *
9
- * @param width - Canvas width in pixels
10
- * @param height - Canvas height in pixels
11
- * @returns Canvas instance
12
- */
13
- export declare function createCanvas(width: number, height: number): UICanvas;
14
- /**
15
- * Gets the 2D rendering context for a UICanvas.
16
- *
17
- * @param canvas - Canvas instance
18
- * @returns 2D rendering context or null
19
- */
20
- export declare function getCanvas2DContext(canvas: UICanvas): UICanvasRenderingContext2D | null;
21
- /**
22
- * Creates a CanvasTexture with maximum WebGL1/WebGL2 compatibility.
23
- * - ClampToEdge wrapping (required for NPOT in WebGL1)
24
- * - Linear filtering without mipmaps (NPOT-safe)
25
- * - RGBA/UnsignedByte format (no extensions needed)
26
- * - sRGB colorspace only if supported
27
- *
28
- * @param canvas - Source canvas
29
- * @returns Configured CanvasTexture
30
- */
31
- export declare function createCanvasTexture(canvas: UICanvas): CanvasTexture;
@@ -1,7 +0,0 @@
1
- import type { Color } from "three";
2
- import type { UIColor } from "./UIColor";
3
- /** Color configuration as Three.js Color, hex number, hex string, or UIColor */
4
- export type UIColorConfig = Color | number | string | UIColor;
5
- /** Predefined color names */
6
- export type UIColorName = "black" | "white" | "red" | "green" | "blue" | "yellow" | "cyan" | "magenta" | "gray" | "grey" | "silver" | "maroon" | "olive" | "lime" | "aqua" | "teal" | "navy" | "fuchsia" | "purple" | "orange" | "pink" | "brown" | "gold" | "violet" | "indigo" | "coral" | "salmon" | "khaki" | "plum" | "orchid" | "tan" | "beige" | "mint" | "lavender" | "crimson" | "azure" | "ivory" | "snow";
7
- export declare const COLORS: Record<string, number | undefined>;