laymur 0.0.1

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 (39) hide show
  1. package/LICENSE +21 -0
  2. package/dist/Builders/UICommonDoubleElementConstraintDescriptionInterfaces.d.ts +55 -0
  3. package/dist/Builders/UICommonSingleElementConstraintDescriptionInterfaces.d.ts +27 -0
  4. package/dist/Builders/UIConstraint2DBuilder.d.ts +6 -0
  5. package/dist/Builders/UIConstraint2DBuilderInterfaces.d.ts +62 -0
  6. package/dist/Builders/UIConstraintBuilder.d.ts +14 -0
  7. package/dist/Builders/UIElementBuilder.d.ts +7 -0
  8. package/dist/Builders/UIElementBuilderInterfaces.d.ts +22 -0
  9. package/dist/Builders/UIStackConstraintBuilder.d.ts +31 -0
  10. package/dist/Constraints/UIAspectConstraint.d.ts +23 -0
  11. package/dist/Constraints/UIConstraint.d.ts +13 -0
  12. package/dist/Constraints/UIConstraintPower.d.ts +13 -0
  13. package/dist/Constraints/UIConstraintRule.d.ts +9 -0
  14. package/dist/Constraints/UICoverConstraint.d.ts +27 -0
  15. package/dist/Constraints/UIFitConstraint.d.ts +27 -0
  16. package/dist/Constraints/UIHeightConstraint.d.ts +23 -0
  17. package/dist/Constraints/UIHorizontalDistanceConstraint.d.ts +27 -0
  18. package/dist/Constraints/UIHorizontalProportionConstraint.d.ts +25 -0
  19. package/dist/Constraints/UIVerticalDistanceConstraint.d.ts +27 -0
  20. package/dist/Constraints/UIVerticalProportionConstraint.d.ts +25 -0
  21. package/dist/Constraints/UIWidthConstraint.d.ts +23 -0
  22. package/dist/Elements/UIDummy.d.ts +8 -0
  23. package/dist/Elements/UIElement.d.ts +29 -0
  24. package/dist/Elements/UIImage.d.ts +9 -0
  25. package/dist/Elements/UIText.d.ts +20 -0
  26. package/dist/Elements/UITextInterfaces.d.ts +49 -0
  27. package/dist/Layers/UIFullScreenLayer.d.ts +3 -0
  28. package/dist/Layers/UILayer.d.ts +55 -0
  29. package/dist/Miscellaneous/UIMicroTransformations.d.ts +31 -0
  30. package/dist/Miscellaneous/UIOrientation.d.ts +7 -0
  31. package/dist/Miscellaneous/asserts.d.ts +4 -0
  32. package/dist/Miscellaneous/microTransformationTools.d.ts +3 -0
  33. package/dist/Miscellaneous/symbols.d.ts +17 -0
  34. package/dist/Miscellaneous/textTools.d.ts +9 -0
  35. package/dist/Miscellaneous/threeInstances.d.ts +2 -0
  36. package/dist/index.d.ts +20 -0
  37. package/dist/index.js +2 -0
  38. package/dist/index.js.map +1 -0
  39. package/package.json +48 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jango
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,55 @@
1
+ import type { UIConstraintPower } from "../Constraints/UIConstraintPower";
2
+ import type { UIConstraintRule } from "../Constraints/UIConstraintRule";
3
+ import { UIElement } from "../Elements/UIElement";
4
+ import { UILayer } from "../Layers/UILayer";
5
+ import type { UIOrientation } from "../Miscellaneous/UIOrientation";
6
+ export type AtLeastOneNumber = {
7
+ x?: number;
8
+ y: number;
9
+ } | {
10
+ x: number;
11
+ y?: number;
12
+ };
13
+ export type AtLeastOnePower = {
14
+ x?: UIConstraintPower;
15
+ y: UIConstraintPower;
16
+ } | {
17
+ x: UIConstraintPower;
18
+ y?: UIConstraintPower;
19
+ };
20
+ export type AtLeastOneRule = {
21
+ x?: UIConstraintRule;
22
+ y: UIConstraintRule;
23
+ } | {
24
+ x: UIConstraintRule;
25
+ y?: UIConstraintRule;
26
+ };
27
+ export interface UICommonDoubleElementConstraintDescription {
28
+ elementOne: UIElement | UILayer;
29
+ elementTwo: UIElement;
30
+ }
31
+ export interface UICommonProportionalConstraintDescription extends UICommonDoubleElementConstraintDescription {
32
+ proportion: AtLeastOneNumber;
33
+ power?: AtLeastOnePower;
34
+ rule?: AtLeastOneRule;
35
+ orientation?: UIOrientation;
36
+ }
37
+ export interface UICommonDistanceConstraintDescription extends UICommonDoubleElementConstraintDescription {
38
+ distance: AtLeastOneNumber;
39
+ anchorOne?: AtLeastOneNumber;
40
+ anchorTwo?: AtLeastOneNumber;
41
+ power?: AtLeastOnePower;
42
+ rule?: AtLeastOneRule;
43
+ orientation?: UIOrientation;
44
+ }
45
+ export interface UICommonCoverConstraintDescription extends UICommonDoubleElementConstraintDescription {
46
+ isStrict: boolean;
47
+ anchor?: AtLeastOneNumber;
48
+ }
49
+ export declare function isAtLeastOneNumber(obj: unknown): obj is AtLeastOneNumber;
50
+ export declare function isAtLeastOnePower(obj: unknown): obj is AtLeastOnePower;
51
+ export declare function isAtLeastOneRule(obj: unknown): obj is AtLeastOneRule;
52
+ export declare function isUICommonDoubleElementConstraintDescription(obj: unknown): obj is UICommonDoubleElementConstraintDescription;
53
+ export declare function isUICommonDistanceConstraintDescription(obj: unknown): obj is UICommonDistanceConstraintDescription;
54
+ export declare function isUICommonProportionalConstraintDescription(obj: unknown): obj is UICommonProportionalConstraintDescription;
55
+ export declare function isUICommonCoverConstraintDescription(obj: unknown): obj is UICommonCoverConstraintDescription;
@@ -0,0 +1,27 @@
1
+ import type { UIConstraintPower } from "../Constraints/UIConstraintPower";
2
+ import type { UIConstraintRule } from "../Constraints/UIConstraintRule";
3
+ import { UIElement } from "../Elements/UIElement";
4
+ import type { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ export interface UICommonSingleElementConstraintDescription {
6
+ element: UIElement;
7
+ power?: UIConstraintPower;
8
+ rule?: UIConstraintRule;
9
+ orientation?: UIOrientation;
10
+ }
11
+ export interface UIWidthConstraintDescription extends UICommonSingleElementConstraintDescription {
12
+ width: number;
13
+ }
14
+ export interface UIHeightConstraintDescription extends UICommonSingleElementConstraintDescription {
15
+ height: number;
16
+ }
17
+ export interface UIKeepAspectConstraintDescription extends UICommonSingleElementConstraintDescription {
18
+ keepAspect: boolean;
19
+ }
20
+ export interface UIKeepSizeConstraintDescription extends UICommonSingleElementConstraintDescription {
21
+ keepSize: boolean;
22
+ }
23
+ export declare function isUICommonSingleElementConstraintDescription(obj: unknown): obj is UICommonSingleElementConstraintDescription;
24
+ export declare function isUIWidthConstraintDescription(obj: unknown): obj is UIWidthConstraintDescription;
25
+ export declare function isUIHeightConstraintDescription(obj: unknown): obj is UIHeightConstraintDescription;
26
+ export declare function isUIKeepAspectConstraintDescription(obj: unknown): obj is UIKeepAspectConstraintDescription;
27
+ export declare function isUIKeepSizeConstraintDescription(obj: unknown): obj is UIKeepSizeConstraintDescription;
@@ -0,0 +1,6 @@
1
+ import type { UIDistance2DConstraint, UIDistance2DConstraintParameters, UIProportion2DConstraintParameters, UIProprtion2DConstraint, UISize2DConstraint, UISize2DConstraintParameters } from "./UIConstraint2DBuilderInterfaces";
2
+ export declare class UIConstraintBuilder2D {
3
+ static size2D(parameters: UISize2DConstraintParameters): UISize2DConstraint;
4
+ static distance2D(parameters: UIDistance2DConstraintParameters): UIDistance2DConstraint;
5
+ static proportional2D(parameters: UIProportion2DConstraintParameters): UIProprtion2DConstraint;
6
+ }
@@ -0,0 +1,62 @@
1
+ import type { UIConstraintPower } from "../Constraints/UIConstraintPower";
2
+ import type { UIConstraintRule } from "../Constraints/UIConstraintRule";
3
+ import type { UIHeightConstraint } from "../Constraints/UIHeightConstraint";
4
+ import type { UIHorizontalDistanceConstraint } from "../Constraints/UIHorizontalDistanceConstraint";
5
+ import type { UIHorizontalProportionConstraint } from "../Constraints/UIHorizontalProportionConstraint";
6
+ import type { UIVerticalDistanceConstraint } from "../Constraints/UIVerticalDistanceConstraint";
7
+ import type { UIVerticalProportionConstraint } from "../Constraints/UIVerticalProportionConstraint";
8
+ import type { UIWidthConstraint } from "../Constraints/UIWidthConstraint";
9
+ import type { UIElement } from "../Elements/UIElement";
10
+ import type { UILayer } from "../Layers/UILayer";
11
+ import type { UIOrientation } from "../Miscellaneous/UIOrientation";
12
+ export interface UISize2DConstraintParameters {
13
+ element: UIElement;
14
+ width: number;
15
+ height: number;
16
+ powerHorizontal?: UIConstraintPower;
17
+ powerVertical?: UIConstraintPower;
18
+ ruleHorizontal?: UIConstraintRule;
19
+ ruleVertical?: UIConstraintRule;
20
+ orientationHorizontal?: UIOrientation;
21
+ orientationVertical?: UIOrientation;
22
+ }
23
+ export interface UIDistance2DConstraintParameters {
24
+ elementOne: UIElement | UILayer;
25
+ elementTwo: UIElement;
26
+ anchorHorizontalOne?: number;
27
+ anchorVerticalOne?: number;
28
+ anchorHorizontalTwo?: number;
29
+ anchorVerticalTwo?: number;
30
+ distanceHorizontal?: number;
31
+ distanceVertical?: number;
32
+ powerHorizontal?: UIConstraintPower;
33
+ powerVertical?: UIConstraintPower;
34
+ ruleHorizontal?: UIConstraintRule;
35
+ ruleVertical?: UIConstraintRule;
36
+ orientationHorizontal?: UIOrientation;
37
+ orientationVertical?: UIOrientation;
38
+ }
39
+ export interface UIProportion2DConstraintParameters {
40
+ elementOne: UIElement | UILayer;
41
+ elementTwo: UIElement;
42
+ proportionHorizontal?: number;
43
+ proportionVertical?: number;
44
+ powerHorizontal?: UIConstraintPower;
45
+ powerVertical?: UIConstraintPower;
46
+ ruleHorizontal?: UIConstraintRule;
47
+ ruleVertical?: UIConstraintRule;
48
+ orientationHorizontal?: UIOrientation;
49
+ orientationVertical?: UIOrientation;
50
+ }
51
+ export interface UISize2DConstraint {
52
+ width: UIWidthConstraint;
53
+ height: UIHeightConstraint;
54
+ }
55
+ export interface UIDistance2DConstraint {
56
+ horizontal: UIHorizontalDistanceConstraint;
57
+ vertical: UIVerticalDistanceConstraint;
58
+ }
59
+ export interface UIProprtion2DConstraint {
60
+ horizontal: UIHorizontalProportionConstraint;
61
+ vertical: UIVerticalProportionConstraint;
62
+ }
@@ -0,0 +1,14 @@
1
+ import type { UIConstraint } from "../Constraints/UIConstraint";
2
+ import type { UICommonCoverConstraintDescription, UICommonDistanceConstraintDescription, UICommonProportionalConstraintDescription } from "./UICommonDoubleElementConstraintDescriptionInterfaces";
3
+ import type { UIHeightConstraintDescription, UIKeepAspectConstraintDescription, UIKeepSizeConstraintDescription, UIWidthConstraintDescription } from "./UICommonSingleElementConstraintDescriptionInterfaces";
4
+ export type UIAnyCommonConstraintDescription = UICommonProportionalConstraintDescription | UICommonDistanceConstraintDescription | UICommonCoverConstraintDescription | UIWidthConstraintDescription | UIHeightConstraintDescription | UIKeepAspectConstraintDescription | UIKeepSizeConstraintDescription;
5
+ export declare class UIConstraintBuilder {
6
+ static fromDescription(description: Map<string, UIAnyCommonConstraintDescription> | Record<string, UIAnyCommonConstraintDescription>): Record<string, UIConstraint>;
7
+ private static buildWidthConstraint;
8
+ private static buildHeightConstraint;
9
+ private static buildKeepAspectConstraint;
10
+ private static buildKeepSizeConstraint;
11
+ private static buildDistanceConstraint;
12
+ private static buildProportionalConstraint;
13
+ private static buildCoverConstraint;
14
+ }
@@ -0,0 +1,7 @@
1
+ import { Texture } from "three";
2
+ import type { UIElement } from "../Elements/UIElement";
3
+ import type { UILayer } from "../Layers/UILayer";
4
+ import type { UIAnyElementDescription } from "./UIElementBuilderInterfaces";
5
+ export declare class UIElementBuilder {
6
+ static fromDescription(layer: UILayer, description: Map<string, UIAnyElementDescription | Texture | String> | Record<string, UIAnyElementDescription | Texture | String>): Record<string, UIElement>;
7
+ }
@@ -0,0 +1,22 @@
1
+ import { Texture } from "three";
2
+ import type { UITextSpan, UITextStyle } from "../Elements/UITextInterfaces";
3
+ export interface UIImageDescription {
4
+ texture: Texture;
5
+ }
6
+ export interface UITextDescription {
7
+ text: string;
8
+ style?: Partial<UITextStyle>;
9
+ }
10
+ export interface UITextEnancedDescription {
11
+ spans: (UITextSpan | string)[];
12
+ defaultStyle?: Partial<UITextStyle>;
13
+ }
14
+ export interface UIDummyDescription {
15
+ width?: number;
16
+ height?: number;
17
+ }
18
+ export type UIAnyElementDescription = UIImageDescription | UITextDescription | UITextEnancedDescription | UIDummyDescription;
19
+ export declare function isUIImageDescription(obj: unknown): obj is UIImageDescription;
20
+ export declare function isUITextDescription(obj: unknown): obj is UITextDescription;
21
+ export declare function isUITextEnhancedDescription(obj: unknown): obj is UITextEnancedDescription;
22
+ export declare function isUIDummyDescription(obj: unknown): obj is UIDummyDescription;
@@ -0,0 +1,31 @@
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 { UIDummy } from "../Elements/UIDummy";
7
+ import type { UIElement } from "../Elements/UIElement";
8
+ export interface UIStackConstraintBuilderParameters {
9
+ offset: number;
10
+ elements: UIElement[];
11
+ power?: UIConstraintPower;
12
+ createDummy?: boolean;
13
+ keepAlignment?: boolean;
14
+ }
15
+ export interface UIStackConstraintBuilderHorizontalResult {
16
+ dummy?: UIDummy;
17
+ distanceConstraints: UIHorizontalDistanceConstraint[];
18
+ proportionConstraints: UIHorizontalProportionConstraint[];
19
+ centerConstraints: UIVerticalDistanceConstraint[];
20
+ }
21
+ export interface UIStackConstraintBuilderVerticalResult {
22
+ dummy?: UIDummy;
23
+ distanceConstraints: UIVerticalDistanceConstraint[];
24
+ proportionConstraints: UIVerticalProportionConstraint[];
25
+ centerConstraints: UIHorizontalDistanceConstraint[];
26
+ }
27
+ export declare class UIStackConstraintBuilder {
28
+ static buildHorizontal(parameters: UIStackConstraintBuilderParameters): UIStackConstraintBuilderHorizontalResult;
29
+ static buildVertical(parameters: UIStackConstraintBuilderParameters): UIStackConstraintBuilderVerticalResult;
30
+ private static createDummy;
31
+ }
@@ -0,0 +1,23 @@
1
+ import type { UIElement } from "../Elements/UIElement";
2
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
3
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
4
+ import { UIConstraint } from "./UIConstraint";
5
+ import type { UIConstraintPower } from "./UIConstraintPower";
6
+ import type { UIConstraintRule } from "./UIConstraintRule";
7
+ export interface UIAspectParameters {
8
+ aspect: number;
9
+ power: UIConstraintPower;
10
+ rule: UIConstraintRule;
11
+ orientation: UIOrientation;
12
+ }
13
+ export declare class UIAspectConstraint extends UIConstraint {
14
+ private readonly element;
15
+ private readonly parameters;
16
+ private constraint?;
17
+ constructor(element: UIElement, parameters?: Partial<UIAspectParameters>);
18
+ destroy(): void;
19
+ [disableConstraintSymbol](newOrientation: UIOrientation): void;
20
+ [enableConstraintSymbol](newOrientation: UIOrientation): void;
21
+ protected buildConstraints(): void;
22
+ protected destroyConstraints(): void;
23
+ }
@@ -0,0 +1,13 @@
1
+ import type { UIElement } from "../Elements/UIElement";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
4
+ import type { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ export declare abstract class UIConstraint {
6
+ readonly layer: UILayer;
7
+ constructor(layer: UILayer, elements: Set<UIElement>);
8
+ destroy(): void;
9
+ abstract [disableConstraintSymbol](orientation: UIOrientation): void;
10
+ abstract [enableConstraintSymbol](orientation: UIOrientation): void;
11
+ protected abstract buildConstraints(): void;
12
+ protected abstract destroyConstraints(): void;
13
+ }
@@ -0,0 +1,13 @@
1
+ export declare enum UIConstraintPower {
2
+ P0 = 0,
3
+ P1 = 1,
4
+ P2 = 2,
5
+ P3 = 3,
6
+ P4 = 4,
7
+ P5 = 5,
8
+ P6 = 6,
9
+ P7 = 7
10
+ }
11
+ export declare function isUIConstraintPower(obj: unknown): obj is UIConstraintPower;
12
+ export declare function resolvePower(power?: UIConstraintPower): UIConstraintPower;
13
+ export declare function convertPowerToStrength(power?: UIConstraintPower): number;
@@ -0,0 +1,9 @@
1
+ import { Operator } from "kiwi.js";
2
+ export declare enum UIConstraintRule {
3
+ EQUAL = 2,
4
+ LESS = 0,
5
+ GREATER = 1
6
+ }
7
+ export declare function isUIConstraintRule(obj: unknown): obj is UIConstraintRule;
8
+ export declare function resolveRule(rule?: UIConstraintRule): UIConstraintRule;
9
+ export declare function convertRuleToOperator(rule?: UIConstraintRule): Operator;
@@ -0,0 +1,27 @@
1
+ import { UIElement } from "../Elements/UIElement";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
4
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ import { UIConstraint } from "./UIConstraint";
6
+ export interface UICoverParameters {
7
+ isStrict: boolean;
8
+ horizontalAnchor: number;
9
+ verticalAnchor: number;
10
+ orientation: UIOrientation;
11
+ }
12
+ export declare class UICoverConstraint extends UIConstraint {
13
+ private readonly elementOne;
14
+ private readonly elementTwo;
15
+ private readonly parameters;
16
+ private constraintX?;
17
+ private constraintY?;
18
+ private constraintW?;
19
+ private constraintH?;
20
+ private constraintStrict?;
21
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UICoverParameters>);
22
+ destroy(): void;
23
+ [disableConstraintSymbol](orientation: UIOrientation): void;
24
+ [enableConstraintSymbol](orientation: UIOrientation): void;
25
+ protected buildConstraints(): void;
26
+ protected destroyConstraints(): void;
27
+ }
@@ -0,0 +1,27 @@
1
+ import { UIElement } from "../Elements/UIElement";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
4
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ import { UIConstraint } from "./UIConstraint";
6
+ export interface UIFitParameters {
7
+ isStrict: boolean;
8
+ horizontalAnchor: number;
9
+ verticalAnchor: number;
10
+ orientation: UIOrientation;
11
+ }
12
+ export declare class UIFitConstraint extends UIConstraint {
13
+ private readonly elementOne;
14
+ private readonly elementTwo;
15
+ private readonly parameters;
16
+ private constraintX?;
17
+ private constraintY?;
18
+ private constraintW?;
19
+ private constraintH?;
20
+ private constraintStrict?;
21
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIFitParameters>);
22
+ destroy(): void;
23
+ [disableConstraintSymbol](orientation: UIOrientation): void;
24
+ [enableConstraintSymbol](orientation: UIOrientation): void;
25
+ protected buildConstraints(): void;
26
+ protected destroyConstraints(): void;
27
+ }
@@ -0,0 +1,23 @@
1
+ import type { UIElement } from "../Elements/UIElement";
2
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
3
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
4
+ import { UIConstraint } from "./UIConstraint";
5
+ import type { UIConstraintPower } from "./UIConstraintPower";
6
+ import type { UIConstraintRule } from "./UIConstraintRule";
7
+ export interface UIHeightParameters {
8
+ height: number;
9
+ power: UIConstraintPower;
10
+ rule: UIConstraintRule;
11
+ orientation: UIOrientation;
12
+ }
13
+ export declare class UIHeightConstraint extends UIConstraint {
14
+ private readonly element;
15
+ private readonly parameters;
16
+ private constraint?;
17
+ constructor(element: UIElement, parameters?: Partial<UIHeightParameters>);
18
+ destroy(): void;
19
+ [disableConstraintSymbol](orientation: UIOrientation): void;
20
+ [enableConstraintSymbol](orientation: UIOrientation): void;
21
+ protected buildConstraints(): void;
22
+ protected destroyConstraints(): void;
23
+ }
@@ -0,0 +1,27 @@
1
+ import { UIElement } from "../Elements/UIElement";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
4
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ import { UIConstraint } from "./UIConstraint";
6
+ import type { UIConstraintPower } from "./UIConstraintPower";
7
+ import type { UIConstraintRule } from "./UIConstraintRule";
8
+ export interface UIHorizontalDistanceParameters {
9
+ anchorOne: number;
10
+ anchorTwo: number;
11
+ distance: number;
12
+ power: UIConstraintPower;
13
+ rule: UIConstraintRule;
14
+ orientation: UIOrientation;
15
+ }
16
+ export declare class UIHorizontalDistanceConstraint extends UIConstraint {
17
+ private readonly elementOne;
18
+ private readonly elementTwo;
19
+ private readonly parameters;
20
+ private constraint?;
21
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIHorizontalDistanceParameters>);
22
+ destroy(): void;
23
+ [disableConstraintSymbol](orientation: UIOrientation): void;
24
+ [enableConstraintSymbol](orientation: UIOrientation): void;
25
+ protected buildConstraints(): void;
26
+ protected destroyConstraints(): void;
27
+ }
@@ -0,0 +1,25 @@
1
+ import { UIElement } from "../Elements/UIElement";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
4
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ import { UIConstraint } from "./UIConstraint";
6
+ import type { UIConstraintPower } from "./UIConstraintPower";
7
+ import type { UIConstraintRule } from "./UIConstraintRule";
8
+ export interface UIHorizontalProportionParameters {
9
+ proportion: number;
10
+ power: UIConstraintPower;
11
+ rule: UIConstraintRule;
12
+ orientation: UIOrientation;
13
+ }
14
+ export declare class UIHorizontalProportionConstraint extends UIConstraint {
15
+ private readonly elementOne;
16
+ private readonly elementTwo;
17
+ private readonly parameters;
18
+ private constraint?;
19
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIHorizontalProportionParameters>);
20
+ destroy(): void;
21
+ [disableConstraintSymbol](orientation: UIOrientation): void;
22
+ [enableConstraintSymbol](orientation: UIOrientation): void;
23
+ protected buildConstraints(): void;
24
+ protected destroyConstraints(): void;
25
+ }
@@ -0,0 +1,27 @@
1
+ import { UIElement } from "../Elements/UIElement";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
4
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ import { UIConstraint } from "./UIConstraint";
6
+ import type { UIConstraintPower } from "./UIConstraintPower";
7
+ import type { UIConstraintRule } from "./UIConstraintRule";
8
+ export interface UIVerticalDistanceParameters {
9
+ anchorOne: number;
10
+ anchorTwo: number;
11
+ distance: number;
12
+ power: UIConstraintPower;
13
+ rule: UIConstraintRule;
14
+ orientation: UIOrientation;
15
+ }
16
+ export declare class UIVerticalDistanceConstraint extends UIConstraint {
17
+ private readonly elementOne;
18
+ private readonly elementTwo;
19
+ private readonly parameters;
20
+ private constraint?;
21
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIVerticalDistanceParameters>);
22
+ destroy(): void;
23
+ [disableConstraintSymbol](orientation: UIOrientation): void;
24
+ [enableConstraintSymbol](orientation: UIOrientation): void;
25
+ protected buildConstraints(): void;
26
+ protected destroyConstraints(): void;
27
+ }
@@ -0,0 +1,25 @@
1
+ import { UIElement } from "../Elements/UIElement";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
4
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
5
+ import { UIConstraint } from "./UIConstraint";
6
+ import type { UIConstraintPower } from "./UIConstraintPower";
7
+ import type { UIConstraintRule } from "./UIConstraintRule";
8
+ export interface UIVerticalProportionParameters {
9
+ proportion: number;
10
+ power: UIConstraintPower;
11
+ rule: UIConstraintRule;
12
+ orientation: UIOrientation;
13
+ }
14
+ export declare class UIVerticalProportionConstraint extends UIConstraint {
15
+ private readonly elementOne;
16
+ private readonly elementTwo;
17
+ private readonly parameters;
18
+ private constraint?;
19
+ constructor(elementOne: UIElement | UILayer, elementTwo: UIElement, parameters?: Partial<UIVerticalProportionParameters>);
20
+ destroy(): void;
21
+ [disableConstraintSymbol](orientation: UIOrientation): void;
22
+ [enableConstraintSymbol](orientation: UIOrientation): void;
23
+ protected buildConstraints(): void;
24
+ protected destroyConstraints(): void;
25
+ }
@@ -0,0 +1,23 @@
1
+ import type { UIElement } from "../Elements/UIElement";
2
+ import { disableConstraintSymbol, enableConstraintSymbol } from "../Miscellaneous/symbols";
3
+ import { UIOrientation } from "../Miscellaneous/UIOrientation";
4
+ import { UIConstraint } from "./UIConstraint";
5
+ import type { UIConstraintPower } from "./UIConstraintPower";
6
+ import type { UIConstraintRule } from "./UIConstraintRule";
7
+ export interface UIWidthParameters {
8
+ width: number;
9
+ power: UIConstraintPower;
10
+ rule: UIConstraintRule;
11
+ orientation: UIOrientation;
12
+ }
13
+ export declare class UIWidthConstraint extends UIConstraint {
14
+ private readonly element;
15
+ private readonly parameters;
16
+ private constraint?;
17
+ constructor(element: UIElement, parameters?: Partial<UIWidthParameters>);
18
+ destroy(): void;
19
+ [disableConstraintSymbol](orientation: UIOrientation): void;
20
+ [enableConstraintSymbol](orientation: UIOrientation): void;
21
+ protected buildConstraints(): void;
22
+ protected destroyConstraints(): void;
23
+ }
@@ -0,0 +1,8 @@
1
+ import type { UILayer } from "../Layers/UILayer";
2
+ import { readMicroSymbol, readVariablesSymbol } from "../Miscellaneous/symbols";
3
+ import { UIElement } from "./UIElement";
4
+ export declare class UIDummy extends UIElement {
5
+ constructor(layer: UILayer, width?: number, height?: number);
6
+ [readVariablesSymbol](): void;
7
+ [readMicroSymbol](): void;
8
+ }
@@ -0,0 +1,29 @@
1
+ import { Variable } from "kiwi.js";
2
+ import type { Object3D } from "three";
3
+ import type { UILayer } from "../Layers/UILayer";
4
+ import { heightSymbol, readMicroSymbol, readVariablesSymbol, widthSymbol, xSymbol, ySymbol } from "../Miscellaneous/symbols";
5
+ import type { UIMicroTransformable } from "../Miscellaneous/UIMicroTransformations";
6
+ import { UIMicroTransformations } from "../Miscellaneous/UIMicroTransformations";
7
+ export declare abstract class UIElement implements UIMicroTransformable {
8
+ readonly layer: UILayer;
9
+ protected readonly object: Object3D;
10
+ readonly micro: UIMicroTransformations;
11
+ [xSymbol]: Variable;
12
+ [ySymbol]: Variable;
13
+ [widthSymbol]: Variable;
14
+ [heightSymbol]: Variable;
15
+ constructor(layer: UILayer, object: Object3D, x: number, y: number, w: number, h: number);
16
+ get x(): number;
17
+ get y(): number;
18
+ get width(): number;
19
+ get height(): number;
20
+ get zIndex(): number;
21
+ set x(value: number);
22
+ set y(value: number);
23
+ set width(value: number);
24
+ set height(value: number);
25
+ set zIndex(value: number);
26
+ destroy(): void;
27
+ abstract [readVariablesSymbol](): void;
28
+ abstract [readMicroSymbol](): void;
29
+ }
@@ -0,0 +1,9 @@
1
+ import type { Texture } from "three";
2
+ import type { UILayer } from "../Layers/UILayer";
3
+ import { readMicroSymbol, readVariablesSymbol } from "../Miscellaneous/symbols";
4
+ import { UIElement } from "./UIElement";
5
+ export declare class UIImage extends UIElement {
6
+ constructor(layer: UILayer, texture: Texture);
7
+ [readVariablesSymbol](): void;
8
+ [readMicroSymbol](): void;
9
+ }
@@ -0,0 +1,20 @@
1
+ import type { UILayer } from "../Layers/UILayer";
2
+ import { readMicroSymbol, readVariablesSymbol } from "../Miscellaneous/symbols";
3
+ import { UIElement } from "./UIElement";
4
+ import type { UITextPadding, UITextSpan, UITextStyle } from "./UITextInterfaces";
5
+ export interface UITextParameters {
6
+ maxWidth: number;
7
+ padding: Partial<UITextPadding>;
8
+ defaultStyle: Partial<UITextStyle>;
9
+ }
10
+ export declare class UIText extends UIElement {
11
+ private readonly context;
12
+ private readonly texture;
13
+ private readonly textBlockSize;
14
+ private readonly padding;
15
+ private lastSuggestedAspect;
16
+ constructor(layer: UILayer, spans: (UITextSpan | string)[], parameters?: Partial<UITextParameters>);
17
+ destroy(): void;
18
+ [readVariablesSymbol](): void;
19
+ [readMicroSymbol](): void;
20
+ }