laymur 0.1.73 → 0.2.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 (45) hide show
  1. package/README.md +16 -0
  2. package/dist/Passes/UIPass.d.ts +2 -2
  3. package/dist/{Builders → builders}/UIConstraint2DBuilder.d.ts +14 -14
  4. package/dist/{Builders → builders}/UIConstraintContainerBuilder.d.ts +5 -5
  5. package/dist/{Builders → builders}/UIConstraintStackBuilder.d.ts +7 -7
  6. package/dist/{Constraints → constraints}/UIAspectConstraint.d.ts +5 -5
  7. package/dist/{Constraints → constraints}/UIConstraint.d.ts +3 -3
  8. package/dist/{Constraints → constraints}/UIConstraintRule.d.ts +1 -1
  9. package/dist/{Constraints → constraints}/UICoverConstraint.d.ts +6 -6
  10. package/dist/{Constraints → constraints}/UIFitConstraint.d.ts +6 -6
  11. package/dist/{Constraints → constraints}/UIHeightConstraint.d.ts +2 -2
  12. package/dist/{Constraints → constraints}/UIHorizontalDistanceConstraint.d.ts +7 -7
  13. package/dist/{Constraints → constraints}/UIHorizontalProportionConstraint.d.ts +6 -6
  14. package/dist/{Constraints → constraints}/UIVerticalDistanceConstraint.d.ts +7 -7
  15. package/dist/{Constraints → constraints}/UIVerticalProportionConstraint.d.ts +6 -6
  16. package/dist/{Constraints → constraints}/UIWidthConstraint.d.ts +2 -2
  17. package/dist/{Elements → elements}/UIAnchor.d.ts +5 -6
  18. package/dist/{Elements → elements}/UIDummy.d.ts +1 -1
  19. package/dist/{Elements → elements}/UIElement.d.ts +9 -10
  20. package/dist/{Elements → elements}/UIImage.d.ts +2 -2
  21. package/dist/{Elements → elements}/UIProgress.d.ts +1 -1
  22. package/dist/{Elements → elements}/UIScene.d.ts +1 -1
  23. package/dist/{Elements → elements}/UIText.d.ts +4 -4
  24. package/dist/index.d.ts +28 -29
  25. package/dist/index.js +782 -862
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.min.js +1 -1
  28. package/dist/index.min.js.map +1 -1
  29. package/dist/{Layers → layers}/UILayer.d.ts +20 -21
  30. package/dist/{Materials → materials}/UIMaterial.d.ts +1 -1
  31. package/dist/{Miscellaneous → miscellaneous}/UIMicro.d.ts +1 -1
  32. package/dist/{Miscellaneous → miscellaneous}/asserts.d.ts +3 -3
  33. package/package.json +3 -3
  34. package/dist/Miscellaneous/symbols.d.ts +0 -1
  35. /package/dist/{Constraints → constraints}/UIConstraintPower.d.ts +0 -0
  36. /package/dist/{Layers → layers}/UIFullScreenLayer.d.ts +0 -0
  37. /package/dist/{Materials → materials}/UIProgressMaterial.d.ts +0 -0
  38. /package/dist/{Miscellaneous → miscellaneous}/UIBlending.d.ts +0 -0
  39. /package/dist/{Miscellaneous → miscellaneous}/UIMode.d.ts +0 -0
  40. /package/dist/{Miscellaneous → miscellaneous}/UIOrientation.d.ts +0 -0
  41. /package/dist/{Miscellaneous → miscellaneous}/UITextInterfaces.d.ts +0 -0
  42. /package/dist/{Miscellaneous → miscellaneous}/math.d.ts +0 -0
  43. /package/dist/{Miscellaneous → miscellaneous}/microTransformationTools.d.ts +0 -0
  44. /package/dist/{Miscellaneous → miscellaneous}/textTools.d.ts +0 -0
  45. /package/dist/{Miscellaneous → miscellaneous}/threeInstances.d.ts +0 -0
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # Laymur
2
+
3
+ ⚠️ **Early Alpha / Work in Progress** ⚠️
4
+
5
+ This library is in very early development stage. APIs may change significantly.
6
+
7
+ A TypeScript Three.js UI layout library with constraint-based positioning.
8
+
9
+ ## License
10
+
11
+ Laymur is licensed under the [MIT License](./LICENSE).
12
+
13
+ It uses [Kiwi.js](https://github.com/lume/kiwi) as its constraint solving engine — a fast and lightweight Cassowary implementation in TypeScript.
14
+
15
+ Kiwi.js is licensed under the [BSD-3-Clause License](https://github.com/lume/kiwi/blob/main/LICENSE).
16
+ The MIT and BSD-3-Clause licenses are [compatible](https://opensource.org/license/bsd-3-clause/) and permissive.
@@ -37,7 +37,7 @@ export declare abstract class UIPass {
37
37
  *
38
38
  * @param renderer - The WebGL renderer to use
39
39
  * @param texture - The input texture from the previous pass
40
- * @param parameters - Render options including dimensions and padding
40
+ * @param options - Render options including dimensions and padding
41
41
  */
42
- abstract render(renderer: WebGLRenderer, texture: Texture, parameters: UIPassRenderOptions): void;
42
+ abstract render(renderer: WebGLRenderer, texture: Texture, options: UIPassRenderOptions): void;
43
43
  }
@@ -1,18 +1,18 @@
1
- import type { UIConstraintPower } from "../Constraints/UIConstraintPower";
2
- import type { UIConstraintRule } from "../Constraints/UIConstraintRule";
3
- import { UIHeightConstraint } from "../Constraints/UIHeightConstraint";
4
- import { UIHorizontalDistanceConstraint } from "../Constraints/UIHorizontalDistanceConstraint";
5
- import { UIHorizontalProportionConstraint } from "../Constraints/UIHorizontalProportionConstraint";
6
- import { UIVerticalDistanceConstraint } from "../Constraints/UIVerticalDistanceConstraint";
7
- import { UIVerticalProportionConstraint } from "../Constraints/UIVerticalProportionConstraint";
8
- import { UIWidthConstraint } from "../Constraints/UIWidthConstraint";
9
- import type { UIAnchor } from "../Elements/UIAnchor";
10
- import type { UIElement } from "../Elements/UIElement";
11
- import type { UILayer } from "../Layers/UILayer";
12
- import type { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import type { UIConstraintPower } from "../constraints/UIConstraintPower";
2
+ import type { UIConstraintRule } from "../constraints/UIConstraintRule";
3
+ import { UIHeightConstraint } from "../constraints/UIHeightConstraint";
4
+ import { UIHorizontalDistanceConstraint } from "../constraints/UIHorizontalDistanceConstraint";
5
+ import { UIHorizontalProportionConstraint } from "../constraints/UIHorizontalProportionConstraint";
6
+ import { UIVerticalDistanceConstraint } from "../constraints/UIVerticalDistanceConstraint";
7
+ import { UIVerticalProportionConstraint } from "../constraints/UIVerticalProportionConstraint";
8
+ import { UIWidthConstraint } from "../constraints/UIWidthConstraint";
9
+ import type { UIAnchor } from "../elements/UIAnchor";
10
+ import type { UIElement } from "../elements/UIElement";
11
+ import type { UILayer } from "../layers/UILayer";
12
+ import type { UIOrientation } from "../miscellaneous/UIOrientation";
13
13
  export interface UIType2D<T> {
14
- x?: T;
15
- y?: T;
14
+ h?: T;
15
+ v?: T;
16
16
  }
17
17
  interface UIConstraint2DOptions {
18
18
  power: UIType2D<UIConstraintPower>;
@@ -1,8 +1,8 @@
1
- import type { UIConstraintPower } from "../Constraints/UIConstraintPower";
2
- import { UIHorizontalDistanceConstraint } from "../Constraints/UIHorizontalDistanceConstraint";
3
- import { UIVerticalDistanceConstraint } from "../Constraints/UIVerticalDistanceConstraint";
4
- import type { UIElement } from "../Elements/UIElement";
5
- import type { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import type { UIConstraintPower } from "../constraints/UIConstraintPower";
2
+ import { UIHorizontalDistanceConstraint } from "../constraints/UIHorizontalDistanceConstraint";
3
+ import { UIVerticalDistanceConstraint } from "../constraints/UIVerticalDistanceConstraint";
4
+ import type { UIElement } from "../elements/UIElement";
5
+ import type { UIOrientation } from "../miscellaneous/UIOrientation";
6
6
  export declare enum UIConstraintContainerDirection {
7
7
  FROM_LEFT_TOP = 0,
8
8
  FROM_LEFT_BOTTOM = 1
@@ -1,10 +1,10 @@
1
- import type { UIConstraintPower } from "../Constraints/UIConstraintPower";
2
- import { UIHorizontalDistanceConstraint } from "../Constraints/UIHorizontalDistanceConstraint";
3
- import { UIHorizontalProportionConstraint } from "../Constraints/UIHorizontalProportionConstraint";
4
- import { UIVerticalDistanceConstraint } from "../Constraints/UIVerticalDistanceConstraint";
5
- import { UIVerticalProportionConstraint } from "../Constraints/UIVerticalProportionConstraint";
6
- import type { UIElement } from "../Elements/UIElement";
7
- import type { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import type { UIConstraintPower } from "../constraints/UIConstraintPower";
2
+ import { UIHorizontalDistanceConstraint } from "../constraints/UIHorizontalDistanceConstraint";
3
+ import { UIHorizontalProportionConstraint } from "../constraints/UIHorizontalProportionConstraint";
4
+ import { UIVerticalDistanceConstraint } from "../constraints/UIVerticalDistanceConstraint";
5
+ import { UIVerticalProportionConstraint } from "../constraints/UIVerticalProportionConstraint";
6
+ import type { UIElement } from "../elements/UIElement";
7
+ import type { UIOrientation } from "../miscellaneous/UIOrientation";
8
8
  export interface UIConstraintStackBuilderOptions {
9
9
  distance: number;
10
10
  keepProportions: boolean;
@@ -1,5 +1,5 @@
1
- import type { UIElement } from "../Elements/UIElement";
2
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import type { UIElement } from "../elements/UIElement";
2
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
3
3
  import { UIConstraint } from "./UIConstraint";
4
4
  import type { UIConstraintPower } from "./UIConstraintPower";
5
5
  import type { UIConstraintRule } from "./UIConstraintRule";
@@ -26,16 +26,16 @@ export interface UIAspectOptions {
26
26
  export declare class UIAspectConstraint extends UIConstraint {
27
27
  private readonly element;
28
28
  /** The configuration options for this constraint */
29
- private readonly parameters;
29
+ private readonly options;
30
30
  /** The Kiwi.js constraint object */
31
31
  private constraint?;
32
32
  /**
33
33
  * Creates a new aspect ratio constraint.
34
34
  *
35
35
  * @param element - The UI element to constrain
36
- * @param parameters - Configuration options
36
+ * @param options - Configuration options
37
37
  */
38
- constructor(element: UIElement, parameters?: Partial<UIAspectOptions>);
38
+ constructor(element: UIElement, options?: Partial<UIAspectOptions>);
39
39
  /**
40
40
  * Destroys this constraint, removing it from the constraint system.
41
41
  */
@@ -1,6 +1,6 @@
1
- import type { UIAnchor } from "../Elements/UIAnchor";
2
- import type { UIElement } from "../Elements/UIElement";
3
- import type { UILayer } from "../Layers/UILayer";
1
+ import type { UIAnchor } from "../elements/UIAnchor";
2
+ import type { UIElement } from "../elements/UIElement";
3
+ import type { UILayer } from "../layers/UILayer";
4
4
  /**
5
5
  * Abstract base class for all UI constraints in the system.
6
6
  *
@@ -1,4 +1,4 @@
1
- import { Operator } from "kiwi.js";
1
+ import { Operator } from "@lume/kiwi";
2
2
  /**
3
3
  * Defines the type of relationship between values in a constraint.
4
4
  *
@@ -1,6 +1,6 @@
1
- import { UIElement } from "../Elements/UIElement";
2
- import type { UILayer } from "../Layers/UILayer";
3
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import { UIElement } from "../elements/UIElement";
2
+ import type { UILayer } from "../layers/UILayer";
3
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
4
4
  import { UIConstraint } from "./UIConstraint";
5
5
  /**
6
6
  * Configuration options for cover constraints.
@@ -29,7 +29,7 @@ export declare class UICoverConstraint extends UIConstraint {
29
29
  private readonly elementOne;
30
30
  private readonly elementTwo;
31
31
  /** The configuration options for this constraint */
32
- private readonly parameters;
32
+ private readonly options;
33
33
  /** Constraint for X-axis alignment */
34
34
  private constraintX?;
35
35
  /** Constraint for Y-axis alignment */
@@ -45,9 +45,9 @@ export declare class UICoverConstraint extends UIConstraint {
45
45
  *
46
46
  * @param elementOne - The element or layer to be covered (the reference)
47
47
  * @param elementTwo - The element that will cover the reference
48
- * @param parameters - Configuration options
48
+ * @param options - Configuration options
49
49
  */
50
- constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UICoverOptions>);
50
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, options?: Partial<UICoverOptions>);
51
51
  /**
52
52
  * Destroys this constraint, removing it from the constraint system.
53
53
  */
@@ -1,6 +1,6 @@
1
- import { UIElement } from "../Elements/UIElement";
2
- import type { UILayer } from "../Layers/UILayer";
3
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import { UIElement } from "../elements/UIElement";
2
+ import type { UILayer } from "../layers/UILayer";
3
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
4
4
  import { UIConstraint } from "./UIConstraint";
5
5
  /**
6
6
  * Configuration options for fit constraints.
@@ -29,7 +29,7 @@ export declare class UIFitConstraint extends UIConstraint {
29
29
  private readonly elementOne;
30
30
  private readonly elementTwo;
31
31
  /** The configuration options for this constraint */
32
- private readonly parameters;
32
+ private readonly options;
33
33
  /** Constraint for X-axis alignment */
34
34
  private constraintX?;
35
35
  /** Constraint for Y-axis alignment */
@@ -45,9 +45,9 @@ export declare class UIFitConstraint extends UIConstraint {
45
45
  *
46
46
  * @param elementOne - The element or layer that contains the fitting element (the container)
47
47
  * @param elementTwo - The element that will fit within the container
48
- * @param parameters - Configuration options
48
+ * @param options - Configuration options
49
49
  */
50
- constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIFitOptions>);
50
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, options?: Partial<UIFitOptions>);
51
51
  /**
52
52
  * Destroys this constraint, removing it from the constraint system.
53
53
  */
@@ -1,5 +1,5 @@
1
- import type { UIElement } from "../Elements/UIElement";
2
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import type { UIElement } from "../elements/UIElement";
2
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
3
3
  import { UIConstraint } from "./UIConstraint";
4
4
  import type { UIConstraintPower } from "./UIConstraintPower";
5
5
  import type { UIConstraintRule } from "./UIConstraintRule";
@@ -1,7 +1,7 @@
1
- import { UIAnchor } from "../Elements/UIAnchor";
2
- import { UIElement } from "../Elements/UIElement";
3
- import { UILayer } from "../Layers/UILayer";
4
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import { UIAnchor } from "../elements/UIAnchor";
2
+ import { UIElement } from "../elements/UIElement";
3
+ import { UILayer } from "../layers/UILayer";
4
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
5
5
  import { UIConstraint } from "./UIConstraint";
6
6
  import type { UIConstraintPower } from "./UIConstraintPower";
7
7
  import type { UIConstraintRule } from "./UIConstraintRule";
@@ -32,7 +32,7 @@ export declare class UIHorizontalDistanceConstraint extends UIConstraint {
32
32
  private readonly elementOne;
33
33
  private readonly elementTwo;
34
34
  /** The configuration options for this constraint */
35
- private readonly parameters;
35
+ private readonly options;
36
36
  /** The Kiwi.js constraint object */
37
37
  private constraint?;
38
38
  /**
@@ -40,9 +40,9 @@ export declare class UIHorizontalDistanceConstraint extends UIConstraint {
40
40
  *
41
41
  * @param elementOne - The first element or layer
42
42
  * @param elementTwo - The second element
43
- * @param parameters - Configuration options
43
+ * @param options - Configuration options
44
44
  */
45
- constructor(elementOne: UIElement | UIAnchor | UILayer, elementTwo: UIElement | UIAnchor, parameters?: Partial<UIHorizontalDistanceOptions>);
45
+ constructor(elementOne: UIElement | UIAnchor | UILayer, elementTwo: UIElement | UIAnchor, options?: Partial<UIHorizontalDistanceOptions>);
46
46
  /**
47
47
  * Destroys this constraint, removing it from the constraint system.
48
48
  */
@@ -1,6 +1,6 @@
1
- import { UIElement } from "../Elements/UIElement";
2
- import type { UILayer } from "../Layers/UILayer";
3
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import { UIElement } from "../elements/UIElement";
2
+ import type { UILayer } from "../layers/UILayer";
3
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
4
4
  import { UIConstraint } from "./UIConstraint";
5
5
  import type { UIConstraintPower } from "./UIConstraintPower";
6
6
  import type { UIConstraintRule } from "./UIConstraintRule";
@@ -27,7 +27,7 @@ export declare class UIHorizontalProportionConstraint extends UIConstraint {
27
27
  private readonly elementOne;
28
28
  private readonly elementTwo;
29
29
  /** The configuration options for this constraint */
30
- private readonly parameters;
30
+ private readonly options;
31
31
  /** The Kiwi.js constraint object */
32
32
  private constraint?;
33
33
  /**
@@ -35,9 +35,9 @@ export declare class UIHorizontalProportionConstraint extends UIConstraint {
35
35
  *
36
36
  * @param elementOne - The reference element or layer
37
37
  * @param elementTwo - The element to constrain proportionally
38
- * @param parameters - Configuration options
38
+ * @param options - Configuration options
39
39
  */
40
- constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIHorizontalProportionOptions>);
40
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, options?: Partial<UIHorizontalProportionOptions>);
41
41
  /**
42
42
  * Destroys this constraint, removing it from the constraint system.
43
43
  */
@@ -1,7 +1,7 @@
1
- import { UIAnchor } from "../Elements/UIAnchor";
2
- import { UIElement } from "../Elements/UIElement";
3
- import { UILayer } from "../Layers/UILayer";
4
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import { UIAnchor } from "../elements/UIAnchor";
2
+ import { UIElement } from "../elements/UIElement";
3
+ import { UILayer } from "../layers/UILayer";
4
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
5
5
  import { UIConstraint } from "./UIConstraint";
6
6
  import type { UIConstraintPower } from "./UIConstraintPower";
7
7
  import type { UIConstraintRule } from "./UIConstraintRule";
@@ -32,7 +32,7 @@ export declare class UIVerticalDistanceConstraint extends UIConstraint {
32
32
  private readonly elementOne;
33
33
  private readonly elementTwo;
34
34
  /** The configuration options for this constraint */
35
- private readonly parameters;
35
+ private readonly options;
36
36
  /** The Kiwi.js constraint object */
37
37
  private constraint?;
38
38
  /**
@@ -40,9 +40,9 @@ export declare class UIVerticalDistanceConstraint extends UIConstraint {
40
40
  *
41
41
  * @param elementOne - The first element or layer
42
42
  * @param elementTwo - The second element
43
- * @param parameters - Configuration options
43
+ * @param options - Configuration options
44
44
  */
45
- constructor(elementOne: UIElement | UIAnchor | UILayer, elementTwo: UIElement | UIAnchor, parameters?: Partial<UIVerticalDistanceOptions>);
45
+ constructor(elementOne: UIElement | UIAnchor | UILayer, elementTwo: UIElement | UIAnchor, options?: Partial<UIVerticalDistanceOptions>);
46
46
  /**
47
47
  * Destroys this constraint, removing it from the constraint system.
48
48
  */
@@ -1,6 +1,6 @@
1
- import { UIElement } from "../Elements/UIElement";
2
- import type { UILayer } from "../Layers/UILayer";
3
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import { UIElement } from "../elements/UIElement";
2
+ import type { UILayer } from "../layers/UILayer";
3
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
4
4
  import { UIConstraint } from "./UIConstraint";
5
5
  import type { UIConstraintPower } from "./UIConstraintPower";
6
6
  import type { UIConstraintRule } from "./UIConstraintRule";
@@ -27,7 +27,7 @@ export declare class UIVerticalProportionConstraint extends UIConstraint {
27
27
  private readonly elementOne;
28
28
  private readonly elementTwo;
29
29
  /** The configuration options for this constraint */
30
- private readonly parameters;
30
+ private readonly options;
31
31
  /** The Kiwi.js constraint object */
32
32
  private constraint?;
33
33
  /**
@@ -35,9 +35,9 @@ export declare class UIVerticalProportionConstraint extends UIConstraint {
35
35
  *
36
36
  * @param elementOne - The reference element or layer
37
37
  * @param elementTwo - The element to constrain proportionally
38
- * @param parameters - Configuration options
38
+ * @param options - Configuration options
39
39
  */
40
- constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIVerticalProportionOptions>);
40
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, options?: Partial<UIVerticalProportionOptions>);
41
41
  /**
42
42
  * Destroys this constraint, removing it from the constraint system.
43
43
  */
@@ -1,5 +1,5 @@
1
- import type { UIElement } from "../Elements/UIElement";
2
- import { UIOrientation } from "../Miscellaneous/UIOrientation";
1
+ import type { UIElement } from "../elements/UIElement";
2
+ import { UIOrientation } from "../miscellaneous/UIOrientation";
3
3
  import { UIConstraint } from "./UIConstraint";
4
4
  import type { UIConstraintPower } from "./UIConstraintPower";
5
5
  import type { UIConstraintRule } from "./UIConstraintRule";
@@ -1,17 +1,16 @@
1
+ import { Variable } from "@lume/kiwi";
1
2
  import { Eventail } from "eventail";
2
- import { Variable } from "kiwi.js";
3
3
  import type { Object3D, WebGLRenderer } from "three";
4
- import type { UILayer } from "../Layers/UILayer";
5
- import { needsRecalculation, xSymbol, ySymbol } from "../Miscellaneous/symbols";
4
+ import type { UILayer } from "../layers/UILayer";
6
5
  export declare abstract class UIAnchor extends Eventail {
7
6
  readonly layer: UILayer;
8
7
  protected readonly object?: Object3D | undefined;
9
8
  /** X position variable for constraint system */
10
- [xSymbol]: Variable;
9
+ ["xInternal"]: Variable;
11
10
  /** Y position variable for constraint system */
12
- [ySymbol]: Variable;
11
+ ["yInternal"]: Variable;
13
12
  /** Flag indicating whether the element needs recalculation */
14
- [needsRecalculation]: boolean;
13
+ ["needsRecalculationInternal"]: boolean;
15
14
  /** Unique identifier for the element */
16
15
  name: string;
17
16
  /**
@@ -1,4 +1,4 @@
1
- import type { UILayer } from "../Layers/UILayer";
1
+ import type { UILayer } from "../layers/UILayer";
2
2
  import { UIElement } from "./UIElement";
3
3
  /**
4
4
  * A minimal UI element with no visual representation.
@@ -1,11 +1,10 @@
1
+ import { Variable } from "@lume/kiwi";
1
2
  import { Eventail } from "eventail";
2
- import { Variable } from "kiwi.js";
3
3
  import type { WebGLRenderer } from "three";
4
4
  import { type Object3D } from "three";
5
- import type { UILayer } from "../Layers/UILayer";
6
- import { heightSymbol, needsRecalculation, widthSymbol, xSymbol, ySymbol } from "../Miscellaneous/symbols";
7
- import { UIMicro, UIMicroInternal } from "../Miscellaneous/UIMicro";
8
- import { UIMode } from "../Miscellaneous/UIMode";
5
+ import type { UILayer } from "../layers/UILayer";
6
+ import { UIMicro, UIMicroInternal } from "../miscellaneous/UIMicro";
7
+ import { UIMode } from "../miscellaneous/UIMode";
9
8
  import { UIComposer, UIComposerInternal } from "../Passes/UIComposer";
10
9
  /**
11
10
  * Events that can be emitted by UI elements.
@@ -29,15 +28,15 @@ export declare abstract class UIElement extends Eventail {
29
28
  readonly layer: UILayer;
30
29
  protected readonly object: Object3D;
31
30
  /** X position variable for constraint system */
32
- [xSymbol]: Variable;
31
+ ["xInternal"]: Variable;
33
32
  /** Y position variable for constraint system */
34
- [ySymbol]: Variable;
33
+ ["yInternal"]: Variable;
35
34
  /** Width variable for constraint system */
36
- [widthSymbol]: Variable;
35
+ ["widthInternal"]: Variable;
37
36
  /** Height variable for constraint system */
38
- [heightSymbol]: Variable;
37
+ ["heightInternal"]: Variable;
39
38
  /** Flag indicating whether the element needs recalculation */
40
- [needsRecalculation]: boolean;
39
+ ["needsRecalculationInternal"]: boolean;
41
40
  /** Unique identifier for the element */
42
41
  name: string;
43
42
  /** Micro transformation interface for the element */
@@ -1,6 +1,6 @@
1
1
  import type { Texture, WebGLRenderer } from "three";
2
- import type { UILayer } from "../Layers/UILayer";
3
- import { UIBlending } from "../Miscellaneous/UIBlending";
2
+ import type { UILayer } from "../layers/UILayer";
3
+ import { UIBlending } from "../miscellaneous/UIBlending";
4
4
  import { UIElement } from "./UIElement";
5
5
  /**
6
6
  * A UI element that displays an image texture.
@@ -1,5 +1,5 @@
1
1
  import type { Texture, WebGLRenderer } from "three";
2
- import type { UILayer } from "../Layers/UILayer";
2
+ import type { UILayer } from "../layers/UILayer";
3
3
  import { UIElement } from "./UIElement";
4
4
  /**
5
5
  * Options for customizing the UIProgress element.
@@ -1,6 +1,6 @@
1
1
  import type { Camera, WebGLRenderer } from "three";
2
2
  import { Scene } from "three";
3
- import type { UILayer } from "../Layers/UILayer";
3
+ import type { UILayer } from "../layers/UILayer";
4
4
  import { UIElement } from "./UIElement";
5
5
  /**
6
6
  * Defines when a UIScene should be rendered/updated.
@@ -1,6 +1,6 @@
1
1
  import type { WebGLRenderer } from "three";
2
- import type { UILayer } from "../Layers/UILayer";
3
- import type { UITextPadding, UITextSpan, UITextStyle } from "../Miscellaneous/UITextInterfaces";
2
+ import type { UILayer } from "../layers/UILayer";
3
+ import type { UITextPadding, UITextSpan, UITextStyle } from "../miscellaneous/UITextInterfaces";
4
4
  import { UIElement } from "./UIElement";
5
5
  /**
6
6
  * Options for customizing the UIText element.
@@ -37,10 +37,10 @@ export declare class UIText extends UIElement {
37
37
  *
38
38
  * @param layer - The UI layer that contains this element
39
39
  * @param spans - Text content to display, either as a string, text span, or array of text spans/strings
40
- * @param parameters - Options to customize the text rendering
40
+ * @param options - Options to customize the text rendering
41
41
  * @throws Error if canvas context creation fails
42
42
  */
43
- constructor(layer: UILayer, spans: (UITextSpan | string)[] | UITextSpan | string, parameters?: Partial<UITextOptions>);
43
+ constructor(layer: UILayer, spans: (UITextSpan | string)[] | UITextSpan | string, options?: Partial<UITextOptions>);
44
44
  /** Gets the color tint applied to the text */
45
45
  get color(): number;
46
46
  /** Gets the opacity of the text */
package/dist/index.d.ts CHANGED
@@ -1,31 +1,30 @@
1
- export * from "./Builders/UIConstraint2DBuilder";
2
- export * from "./Builders/UIConstraintContainerBuilder";
3
- export * from "./Builders/UIConstraintStackBuilder";
4
- export * from "./Constraints/UIAspectConstraint";
5
- export * from "./Constraints/UIConstraint";
6
- export * from "./Constraints/UIConstraintPower";
7
- export * from "./Constraints/UIConstraintRule";
8
- export * from "./Constraints/UICoverConstraint";
9
- export * from "./Constraints/UIFitConstraint";
10
- export * from "./Constraints/UIHeightConstraint";
11
- export * from "./Constraints/UIHorizontalDistanceConstraint";
12
- export * from "./Constraints/UIHorizontalProportionConstraint";
13
- export * from "./Constraints/UIVerticalDistanceConstraint";
14
- export * from "./Constraints/UIVerticalProportionConstraint";
15
- export * from "./Constraints/UIWidthConstraint";
16
- export * from "./Elements/UIAnchor";
17
- export * from "./Elements/UIDummy";
18
- export * from "./Elements/UIElement";
19
- export * from "./Elements/UIImage";
20
- export * from "./Elements/UIProgress";
21
- export * from "./Elements/UIScene";
22
- export * from "./Elements/UIText";
23
- export * from "./Layers/UIFullScreenLayer";
24
- export * from "./Layers/UILayer";
25
- export * from "./Miscellaneous/symbols";
26
- export * from "./Miscellaneous/UIBlending";
27
- export * from "./Miscellaneous/UIMode";
28
- export * from "./Miscellaneous/UIOrientation";
29
- export * from "./Miscellaneous/UITextInterfaces";
1
+ export * from "./builders/UIConstraint2DBuilder";
2
+ export * from "./builders/UIConstraintContainerBuilder";
3
+ export * from "./builders/UIConstraintStackBuilder";
4
+ export * from "./constraints/UIAspectConstraint";
5
+ export * from "./constraints/UIConstraint";
6
+ export * from "./constraints/UIConstraintPower";
7
+ export * from "./constraints/UIConstraintRule";
8
+ export * from "./constraints/UICoverConstraint";
9
+ export * from "./constraints/UIFitConstraint";
10
+ export * from "./constraints/UIHeightConstraint";
11
+ export * from "./constraints/UIHorizontalDistanceConstraint";
12
+ export * from "./constraints/UIHorizontalProportionConstraint";
13
+ export * from "./constraints/UIVerticalDistanceConstraint";
14
+ export * from "./constraints/UIVerticalProportionConstraint";
15
+ export * from "./constraints/UIWidthConstraint";
16
+ export * from "./elements/UIAnchor";
17
+ export * from "./elements/UIDummy";
18
+ export * from "./elements/UIElement";
19
+ export * from "./elements/UIImage";
20
+ export * from "./elements/UIProgress";
21
+ export * from "./elements/UIScene";
22
+ export * from "./elements/UIText";
23
+ export * from "./layers/UIFullScreenLayer";
24
+ export * from "./layers/UILayer";
25
+ export * from "./miscellaneous/UIBlending";
26
+ export * from "./miscellaneous/UIMode";
27
+ export * from "./miscellaneous/UIOrientation";
28
+ export * from "./miscellaneous/UITextInterfaces";
30
29
  export * from "./Passes/UIFullScreenQuad";
31
30
  export * from "./Passes/UIPass";