laymur 0.11.4 → 0.12.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 +33 -29
- package/dist/constraints/{UIAspectConstraint.Internal.d.ts → UIAspectConstraint/UIAspectConstraint.Internal.d.ts} +1 -1
- package/dist/constraints/{UIAspectConstraint.d.ts → UIAspectConstraint/UIAspectConstraint.d.ts} +2 -2
- package/dist/constraints/UIConstraint.d.ts +2 -2
- package/dist/constraints/UICustomConstraint.d.ts +3 -3
- package/dist/constraints/{UIHeightConstraint.Internal.d.ts → UIHeightConstraint/UIHeightConstraint.Internal.d.ts} +1 -1
- package/dist/constraints/{UIHeightConstraint.d.ts → UIHeightConstraint/UIHeightConstraint.d.ts} +2 -2
- package/dist/constraints/{UIHorizontalDistanceConstraint.Internal.d.ts → UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts} +1 -1
- package/dist/constraints/{UIHorizontalDistanceConstraint.d.ts → UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts} +2 -2
- package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +14 -0
- package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +44 -0
- package/dist/constraints/{UIHorizontalProportionConstraint.Internal.d.ts → UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts} +1 -1
- package/dist/constraints/{UIHorizontalProportionConstraint.d.ts → UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts} +2 -2
- package/dist/constraints/{UISingleParameterConstraint.Internal.d.ts → UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts} +5 -3
- package/dist/constraints/{UISingleParameterConstraint.d.ts → UISingleParameterConstraint/UISingleParameterConstraint.d.ts} +5 -5
- package/dist/constraints/{UIVerticalDistanceConstraint.Internal.d.ts → UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts} +1 -1
- package/dist/constraints/{UIVerticalDistanceConstraint.d.ts → UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts} +2 -2
- package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +14 -0
- package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +44 -0
- package/dist/constraints/{UIVerticalProportionConstraint.Internal.d.ts → UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts} +1 -1
- package/dist/constraints/{UIVerticalProportionConstraint.d.ts → UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts} +2 -2
- package/dist/constraints/{UIWidthConstraint.Internal.d.ts → UIWidthConstraint/UIWidthConstraint.Internal.d.ts} +1 -1
- package/dist/constraints/{UIWidthConstraint.d.ts → UIWidthConstraint/UIWidthConstraint.d.ts} +2 -2
- package/dist/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +21 -2
- package/dist/constraints/builders/UIConstraint2DBuilder.d.ts +19 -8
- package/dist/constraints/builders/UICoverConstraintBuilder.d.ts +6 -6
- package/dist/constraints/builders/UIFitConstraintBuilder.d.ts +6 -6
- package/dist/elements/UIAnchor/UIAnchor.d.ts +2 -2
- package/dist/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +15 -3
- package/dist/elements/UIAnimatedImage/UIAnimatedImage.d.ts +12 -6
- package/dist/elements/UIElement/UIElement.d.ts +1 -1
- package/dist/elements/UIGraphics/UIGraphics.Internal.d.ts +0 -2
- package/dist/elements/UIGraphics/UIGraphics.d.ts +2 -2
- package/dist/elements/UIImage/UIImage.Internal.d.ts +0 -2
- package/dist/elements/UIImage/UIImage.d.ts +2 -2
- package/dist/elements/UIInputDummy/UIInputDummy.d.ts +2 -2
- package/dist/elements/UINineSlice/UINineSlice.d.ts +10 -6
- package/dist/elements/UIProgress/UIProgress.Internal.d.ts +0 -2
- package/dist/elements/UIProgress/UIProgress.d.ts +3 -3
- package/dist/elements/UIScene/UIScene.d.ts +1 -1
- package/dist/elements/UIText/UIText.d.ts +2 -2
- package/dist/index.d.ts +12 -9
- package/dist/index.js +851 -277
- 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/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +9 -0
- package/dist/layers/{UIFullscreenLayer.d.ts → UIFullscreenLayer/UIFullscreenLayer.d.ts} +4 -8
- package/dist/layers/UILayer/UILayer.Internal.d.ts +29 -0
- package/dist/layers/{UILayer.d.ts → UILayer/UILayer.d.ts} +4 -9
- package/dist/miscellaneous/asserts.d.ts +22 -55
- package/dist/miscellaneous/color/UIColor.d.ts +1 -0
- package/dist/miscellaneous/shared.d.ts +46 -0
- package/package.json +6 -3
- package/dist/layers/UILayer.Internal.d.ts +0 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
|
-
import type { UILayer } from "../../layers/UILayer";
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
4
4
|
import { UIMicro } from "../../miscellaneous/micro/UIMicro";
|
|
5
5
|
import type { UIMode } from "../../miscellaneous/UIMode";
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
-
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
3
2
|
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
4
3
|
/** Configuration options for UIGraphics */
|
|
5
4
|
export interface UIGraphicsOptions extends UIElementOptions {
|
|
6
5
|
/** Multiplicative tint */
|
|
7
6
|
color: UIColorConfig;
|
|
8
7
|
}
|
|
9
|
-
export declare const GRAPHICS_TEMP_PROPERTIES: Record<string, UIPropertyType>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
|
-
import type { UILayer } from "../../layers/UILayer";
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
4
|
import { UIElement } from "../UIElement/UIElement";
|
|
5
|
-
import {
|
|
5
|
+
import type { UIGraphicsOptions } from "./UIGraphics.Internal";
|
|
6
6
|
/** Canvas-based 2D drawing element */
|
|
7
7
|
export declare class UIGraphics extends UIElement {
|
|
8
8
|
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
-
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
3
2
|
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
4
3
|
/** Configuration options for UIImage */
|
|
5
4
|
export interface UIImageOptions extends UIElementOptions {
|
|
6
5
|
/** Multiplicative tint */
|
|
7
6
|
color: UIColorConfig;
|
|
8
7
|
}
|
|
9
|
-
export declare const IMAGE_TEMP_PROPERTIES: Record<string, UIPropertyType>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { UILayer } from "../../layers/UILayer";
|
|
1
|
+
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
2
2
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
3
|
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
4
4
|
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
5
5
|
import { UIElement } from "../UIElement/UIElement";
|
|
6
|
-
import {
|
|
6
|
+
import type { UIImageOptions } from "./UIImage.Internal";
|
|
7
7
|
/** Textured image element */
|
|
8
8
|
export declare class UIImage extends UIElement {
|
|
9
9
|
/** Texture displayed by this image */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UILayer } from "../../layers/UILayer";
|
|
1
|
+
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
2
2
|
import type { UIArea } from "../../miscellaneous/area/UIArea";
|
|
3
|
-
import type { UIPlaneElement } from "../../miscellaneous/
|
|
3
|
+
import type { UIPlaneElement } from "../../miscellaneous/shared";
|
|
4
4
|
import { UIInputEvent } from "../../miscellaneous/UIInputEvent";
|
|
5
5
|
import { UIMode } from "../../miscellaneous/UIMode";
|
|
6
6
|
import type { UIInputWrapperInterface } from "../../wrappers/UIInputWrapper.Internal";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { UILayer } from "../../layers/UILayer";
|
|
1
|
+
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
2
2
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
3
|
import { UIInsets } from "../../miscellaneous/insets/UIInsets";
|
|
4
4
|
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
5
|
-
import type
|
|
5
|
+
import { type UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
6
6
|
import { UIElement } from "../UIElement/UIElement";
|
|
7
7
|
import type { UINineSliceOptions } from "./UINineSlice.Internal";
|
|
8
8
|
import { UINineSliceRegionMode } from "./UINineSlice.Internal";
|
|
@@ -21,8 +21,9 @@ export declare class UINineSlice extends UIElement {
|
|
|
21
21
|
private readonly textureTransform;
|
|
22
22
|
private readonly sliceBordersVector;
|
|
23
23
|
private readonly sliceRegionsVector;
|
|
24
|
-
private
|
|
25
|
-
private
|
|
24
|
+
private lastElementWidth;
|
|
25
|
+
private lastElementHeight;
|
|
26
|
+
private textureDimensionsDirty;
|
|
26
27
|
/**
|
|
27
28
|
* Creates a new UINineSlice instance.
|
|
28
29
|
*
|
|
@@ -37,9 +38,12 @@ export declare class UINineSlice extends UIElement {
|
|
|
37
38
|
get regionMode(): UINineSliceRegionMode;
|
|
38
39
|
/** Controls how sliceRegions values are interpreted */
|
|
39
40
|
set regionMode(value: UINineSliceRegionMode);
|
|
41
|
+
/** Removes nine slice and frees resources */
|
|
42
|
+
destroy(): void;
|
|
40
43
|
protected setPlaneTransform(): void;
|
|
41
44
|
private calculateSliceBordersForShader;
|
|
42
45
|
private calculateSliceRegionsForShader;
|
|
43
|
-
private
|
|
44
|
-
private
|
|
46
|
+
private checkElementDimensionsDirty;
|
|
47
|
+
private setElementDimensionsDirtyFalse;
|
|
48
|
+
private readonly onTextureDimensionsChanged;
|
|
45
49
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
-
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
3
2
|
import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
|
|
4
3
|
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
5
4
|
/** Configuration options for UIProgress */
|
|
@@ -12,5 +11,4 @@ export interface UIProgressOptions extends UIElementOptions {
|
|
|
12
11
|
progress: number;
|
|
13
12
|
}
|
|
14
13
|
export declare const PROGRESS_DEFAULT_VALUE = 1;
|
|
15
|
-
export declare const PROGRESS_TEMP_PROPERTIES: Record<string, UIPropertyType>;
|
|
16
14
|
export declare function simplifyGLSLSource(source: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { UILayer } from "../../layers/UILayer";
|
|
1
|
+
import { type Texture } from "three";
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
4
|
import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
|
|
5
5
|
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
@@ -30,7 +30,7 @@ export declare class UIProgress extends UIElement {
|
|
|
30
30
|
constructor(layer: UILayer, texture: Texture, options?: Partial<UIProgressOptions>);
|
|
31
31
|
/** Progress from 0 (empty) to 1 (full) */
|
|
32
32
|
get progress(): number;
|
|
33
|
-
/** Progress from 0 (empty) to 1 (full). Clamped
|
|
33
|
+
/** Progress from 0 (empty) to 1 (full). Clamped. */
|
|
34
34
|
set progress(value: number);
|
|
35
35
|
protected setPlaneTransform(): void;
|
|
36
36
|
private readonly onTextureDimensionsChanged;
|
|
@@ -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/UILayer";
|
|
4
4
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
5
5
|
import { UIElement } from "../UIElement/UIElement";
|
|
6
6
|
import type { UISceneOptions } from "./UIScene.Internal";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
|
-
import type { UILayer } from "../../layers/UILayer";
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
4
|
import { UIInsets } from "../../miscellaneous/insets/UIInsets";
|
|
5
5
|
import { UITextSpan } from "../../miscellaneous/text-span/UITextSpan";
|
|
@@ -54,7 +54,7 @@ export declare class UIText extends UIElement {
|
|
|
54
54
|
protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
|
|
55
55
|
private tryToRenderTextScaleMode;
|
|
56
56
|
private tryToRenderTextBreakMode;
|
|
57
|
-
private
|
|
57
|
+
private updateProperties;
|
|
58
58
|
private buildTextChunks;
|
|
59
59
|
private checkDimensionsDirty;
|
|
60
60
|
private setDimensionsDirtyFalse;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
export { UIConstraint2DBuilder } from "./constraints/builders/UIConstraint2DBuilder";
|
|
2
2
|
export { UICoverConstraintBuilder } from "./constraints/builders/UICoverConstraintBuilder";
|
|
3
3
|
export { UIFitConstraintBuilder } from "./constraints/builders/UIFitConstraintBuilder";
|
|
4
|
-
export { UIAspectConstraint } from "./constraints/UIAspectConstraint";
|
|
4
|
+
export { UIAspectConstraint } from "./constraints/UIAspectConstraint/UIAspectConstraint";
|
|
5
5
|
export { UICustomConstraint } from "./constraints/UICustomConstraint";
|
|
6
|
-
export { UIHeightConstraint } from "./constraints/UIHeightConstraint";
|
|
7
|
-
export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint";
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
6
|
+
export { UIHeightConstraint } from "./constraints/UIHeightConstraint/UIHeightConstraint";
|
|
7
|
+
export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
|
|
8
|
+
export { UIHorizontalInterpolationConstraint } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint";
|
|
9
|
+
export { UIHorizontalProportionConstraint } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
|
|
10
|
+
export { UISingleParameterConstraint } from "./constraints/UISingleParameterConstraint/UISingleParameterConstraint";
|
|
11
|
+
export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
|
|
12
|
+
export { UIVerticalInterpolationConstraint } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint";
|
|
13
|
+
export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint";
|
|
14
|
+
export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint";
|
|
13
15
|
export { UIAnchor } from "./elements/UIAnchor/UIAnchor";
|
|
14
16
|
export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage";
|
|
17
|
+
export { UILoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal";
|
|
15
18
|
export { UIGraphics } from "./elements/UIGraphics/UIGraphics";
|
|
16
19
|
export { UIImage } from "./elements/UIImage/UIImage";
|
|
17
20
|
export { UIInputDummy } from "./elements/UIInputDummy/UIInputDummy";
|
|
@@ -22,7 +25,7 @@ export { UIScene } from "./elements/UIScene/UIScene";
|
|
|
22
25
|
export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal";
|
|
23
26
|
export { UIText } from "./elements/UIText/UIText";
|
|
24
27
|
export { UITextResizeMode } from "./elements/UIText/UIText.Internal";
|
|
25
|
-
export { UIFullscreenLayer } from "./layers/UIFullscreenLayer";
|
|
28
|
+
export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer";
|
|
26
29
|
export { UIAreaCircle } from "./miscellaneous/area/UIAreaCircle";
|
|
27
30
|
export { UIAreaPolygon } from "./miscellaneous/area/UIAreaPolygon";
|
|
28
31
|
export { UIAreaRectangle } from "./miscellaneous/area/UIAreaRectangle";
|