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.
- package/README.md +16 -0
- package/dist/Passes/UIPass.d.ts +2 -2
- package/dist/{Builders → builders}/UIConstraint2DBuilder.d.ts +14 -14
- package/dist/{Builders → builders}/UIConstraintContainerBuilder.d.ts +5 -5
- package/dist/{Builders → builders}/UIConstraintStackBuilder.d.ts +7 -7
- package/dist/{Constraints → constraints}/UIAspectConstraint.d.ts +5 -5
- package/dist/{Constraints → constraints}/UIConstraint.d.ts +3 -3
- package/dist/{Constraints → constraints}/UIConstraintRule.d.ts +1 -1
- package/dist/{Constraints → constraints}/UICoverConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIFitConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIHeightConstraint.d.ts +2 -2
- package/dist/{Constraints → constraints}/UIHorizontalDistanceConstraint.d.ts +7 -7
- package/dist/{Constraints → constraints}/UIHorizontalProportionConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIVerticalDistanceConstraint.d.ts +7 -7
- package/dist/{Constraints → constraints}/UIVerticalProportionConstraint.d.ts +6 -6
- package/dist/{Constraints → constraints}/UIWidthConstraint.d.ts +2 -2
- package/dist/{Elements → elements}/UIAnchor.d.ts +5 -6
- package/dist/{Elements → elements}/UIDummy.d.ts +1 -1
- package/dist/{Elements → elements}/UIElement.d.ts +9 -10
- package/dist/{Elements → elements}/UIImage.d.ts +2 -2
- package/dist/{Elements → elements}/UIProgress.d.ts +1 -1
- package/dist/{Elements → elements}/UIScene.d.ts +1 -1
- package/dist/{Elements → elements}/UIText.d.ts +4 -4
- package/dist/index.d.ts +28 -29
- package/dist/index.js +782 -862
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/{Layers → layers}/UILayer.d.ts +20 -21
- package/dist/{Materials → materials}/UIMaterial.d.ts +1 -1
- package/dist/{Miscellaneous → miscellaneous}/UIMicro.d.ts +1 -1
- package/dist/{Miscellaneous → miscellaneous}/asserts.d.ts +3 -3
- package/package.json +3 -3
- package/dist/Miscellaneous/symbols.d.ts +0 -1
- /package/dist/{Constraints → constraints}/UIConstraintPower.d.ts +0 -0
- /package/dist/{Layers → layers}/UIFullScreenLayer.d.ts +0 -0
- /package/dist/{Materials → materials}/UIProgressMaterial.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UIBlending.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UIMode.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UIOrientation.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/UITextInterfaces.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/math.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/microTransformationTools.d.ts +0 -0
- /package/dist/{Miscellaneous → miscellaneous}/textTools.d.ts +0 -0
- /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.
|
package/dist/Passes/UIPass.d.ts
CHANGED
|
@@ -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
|
|
40
|
+
* @param options - Render options including dimensions and padding
|
|
41
41
|
*/
|
|
42
|
-
abstract render(renderer: WebGLRenderer, texture: Texture,
|
|
42
|
+
abstract render(renderer: WebGLRenderer, texture: Texture, options: UIPassRenderOptions): void;
|
|
43
43
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type { UIConstraintPower } from "../
|
|
2
|
-
import type { UIConstraintRule } from "../
|
|
3
|
-
import { UIHeightConstraint } from "../
|
|
4
|
-
import { UIHorizontalDistanceConstraint } from "../
|
|
5
|
-
import { UIHorizontalProportionConstraint } from "../
|
|
6
|
-
import { UIVerticalDistanceConstraint } from "../
|
|
7
|
-
import { UIVerticalProportionConstraint } from "../
|
|
8
|
-
import { UIWidthConstraint } from "../
|
|
9
|
-
import type { UIAnchor } from "../
|
|
10
|
-
import type { UIElement } from "../
|
|
11
|
-
import type { UILayer } from "../
|
|
12
|
-
import type { UIOrientation } from "../
|
|
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
|
-
|
|
15
|
-
|
|
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 "../
|
|
2
|
-
import { UIHorizontalDistanceConstraint } from "../
|
|
3
|
-
import { UIVerticalDistanceConstraint } from "../
|
|
4
|
-
import type { UIElement } from "../
|
|
5
|
-
import type { UIOrientation } from "../
|
|
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 "../
|
|
2
|
-
import { UIHorizontalDistanceConstraint } from "../
|
|
3
|
-
import { UIHorizontalProportionConstraint } from "../
|
|
4
|
-
import { UIVerticalDistanceConstraint } from "../
|
|
5
|
-
import { UIVerticalProportionConstraint } from "../
|
|
6
|
-
import type { UIElement } from "../
|
|
7
|
-
import type { UIOrientation } from "../
|
|
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 "../
|
|
2
|
-
import { UIOrientation } from "../
|
|
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
|
|
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
|
|
36
|
+
* @param options - Configuration options
|
|
37
37
|
*/
|
|
38
|
-
constructor(element: UIElement,
|
|
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 "../
|
|
2
|
-
import type { UIElement } from "../
|
|
3
|
-
import type { UILayer } from "../
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { UIElement } from "../
|
|
2
|
-
import type { UILayer } from "../
|
|
3
|
-
import { UIOrientation } from "../
|
|
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
|
|
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
|
|
48
|
+
* @param options - Configuration options
|
|
49
49
|
*/
|
|
50
|
-
constructor(elementOne: UIElement | UILayer, elementTwo: UIElement,
|
|
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 "../
|
|
2
|
-
import type { UILayer } from "../
|
|
3
|
-
import { UIOrientation } from "../
|
|
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
|
|
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
|
|
48
|
+
* @param options - Configuration options
|
|
49
49
|
*/
|
|
50
|
-
constructor(elementOne: UIElement | UILayer, elementTwo: UIElement,
|
|
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 "../
|
|
2
|
-
import { UIOrientation } from "../
|
|
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 "../
|
|
2
|
-
import { UIElement } from "../
|
|
3
|
-
import { UILayer } from "../
|
|
4
|
-
import { UIOrientation } from "../
|
|
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
|
|
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
|
|
43
|
+
* @param options - Configuration options
|
|
44
44
|
*/
|
|
45
|
-
constructor(elementOne: UIElement | UIAnchor | UILayer, elementTwo: UIElement | UIAnchor,
|
|
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 "../
|
|
2
|
-
import type { UILayer } from "../
|
|
3
|
-
import { UIOrientation } from "../
|
|
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
|
|
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
|
|
38
|
+
* @param options - Configuration options
|
|
39
39
|
*/
|
|
40
|
-
constructor(elementOne: UIElement | UILayer, elementTwo: UIElement,
|
|
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 "../
|
|
2
|
-
import { UIElement } from "../
|
|
3
|
-
import { UILayer } from "../
|
|
4
|
-
import { UIOrientation } from "../
|
|
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
|
|
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
|
|
43
|
+
* @param options - Configuration options
|
|
44
44
|
*/
|
|
45
|
-
constructor(elementOne: UIElement | UIAnchor | UILayer, elementTwo: UIElement | UIAnchor,
|
|
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 "../
|
|
2
|
-
import type { UILayer } from "../
|
|
3
|
-
import { UIOrientation } from "../
|
|
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
|
|
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
|
|
38
|
+
* @param options - Configuration options
|
|
39
39
|
*/
|
|
40
|
-
constructor(elementOne: UIElement | UILayer, elementTwo: UIElement,
|
|
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 "../
|
|
2
|
-
import { UIOrientation } from "../
|
|
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 "../
|
|
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
|
-
[
|
|
9
|
+
["xInternal"]: Variable;
|
|
11
10
|
/** Y position variable for constraint system */
|
|
12
|
-
[
|
|
11
|
+
["yInternal"]: Variable;
|
|
13
12
|
/** Flag indicating whether the element needs recalculation */
|
|
14
|
-
[
|
|
13
|
+
["needsRecalculationInternal"]: boolean;
|
|
15
14
|
/** Unique identifier for the element */
|
|
16
15
|
name: string;
|
|
17
16
|
/**
|
|
@@ -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 "../
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
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
|
-
[
|
|
31
|
+
["xInternal"]: Variable;
|
|
33
32
|
/** Y position variable for constraint system */
|
|
34
|
-
[
|
|
33
|
+
["yInternal"]: Variable;
|
|
35
34
|
/** Width variable for constraint system */
|
|
36
|
-
[
|
|
35
|
+
["widthInternal"]: Variable;
|
|
37
36
|
/** Height variable for constraint system */
|
|
38
|
-
[
|
|
37
|
+
["heightInternal"]: Variable;
|
|
39
38
|
/** Flag indicating whether the element needs recalculation */
|
|
40
|
-
[
|
|
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 "../
|
|
3
|
-
import { UIBlending } from "../
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import type { Camera, WebGLRenderer } from "three";
|
|
2
2
|
import { Scene } from "three";
|
|
3
|
-
import type { UILayer } from "../
|
|
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 "../
|
|
3
|
-
import type { UITextPadding, UITextSpan, UITextStyle } from "../
|
|
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
|
|
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,
|
|
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 "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
9
|
-
export * from "./
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
16
|
-
export * from "./
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
20
|
-
export * from "./
|
|
21
|
-
export * from "./
|
|
22
|
-
export * from "./
|
|
23
|
-
export * from "./
|
|
24
|
-
export * from "./
|
|
25
|
-
export * from "./
|
|
26
|
-
export * from "./
|
|
27
|
-
export * from "./
|
|
28
|
-
export * from "./
|
|
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";
|