laymur 0.11.2 → 0.11.4
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 +0 -1
- package/dist/constraints/builders/UIConstraint2DBuilder.d.ts +1 -1
- package/dist/elements/{UIAnchor.d.ts → UIAnchor/UIAnchor.d.ts} +3 -3
- package/dist/elements/{UIAnimatedImage.Internal.d.ts → UIAnimatedImage/UIAnimatedImage.Internal.d.ts} +2 -2
- package/dist/elements/{UIAnimatedImage.d.ts → UIAnimatedImage/UIAnimatedImage.d.ts} +6 -6
- package/dist/elements/UIElement/UIElement.Internal.d.ts +11 -0
- package/dist/elements/{UIElement.d.ts → UIElement/UIElement.d.ts} +9 -9
- package/dist/elements/UIGraphics/UIGraphics.Internal.d.ts +9 -0
- package/dist/elements/{UIGraphics.d.ts → UIGraphics/UIGraphics.d.ts} +4 -4
- package/dist/elements/UIImage/UIImage.Internal.d.ts +9 -0
- package/dist/elements/{UIImage.d.ts → UIImage/UIImage.d.ts} +7 -7
- package/dist/elements/{UIDummy.Internal.d.ts → UIInputDummy/UIInputDummy.Internal.d.ts} +5 -5
- package/dist/elements/{UIDummy.d.ts → UIInputDummy/UIInputDummy.d.ts} +11 -11
- package/dist/elements/{UINineSlice.Internal.d.ts → UINineSlice/UINineSlice.Internal.d.ts} +5 -5
- package/dist/elements/{UINineSlice.d.ts → UINineSlice/UINineSlice.d.ts} +9 -9
- package/dist/elements/{UIProgress.Internal.d.ts → UIProgress/UIProgress.Internal.d.ts} +5 -3
- package/dist/elements/{UIProgress.d.ts → UIProgress/UIProgress.d.ts} +8 -7
- package/dist/elements/{UIScene.Internal.d.ts → UIScene/UIScene.Internal.d.ts} +3 -3
- package/dist/elements/{UIScene.d.ts → UIScene/UIScene.d.ts} +3 -3
- package/dist/elements/UIText/UIText.Internal.d.ts +3 -3
- package/dist/elements/UIText/UIText.d.ts +3 -3
- package/dist/index.d.ts +10 -10
- package/dist/index.js +293 -179
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/miscellaneous/insets/UIInsets.Internal.d.ts +11 -0
- package/dist/miscellaneous/{padding/UIPadding.d.ts → insets/UIInsets.d.ts} +15 -15
- package/dist/miscellaneous/texture/UITextureView.d.ts +13 -9
- package/package.json +1 -1
- package/dist/elements/UIElement.Internal.d.ts +0 -11
- package/dist/elements/UIGraphics.Internal.d.ts +0 -7
- package/dist/elements/UIImage.Internal.d.ts +0 -7
- package/dist/miscellaneous/padding/UIPadding.Internal.d.ts +0 -11
- /package/dist/elements/{UIAnchor.Internal.d.ts → UIAnchor/UIAnchor.Internal.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -77,7 +77,6 @@ animate();
|
|
|
77
77
|
- **UIProgress** - Progress bars
|
|
78
78
|
- **UINineSlice** - Scalable UI panels with border preservation
|
|
79
79
|
- **UIAnchor** - Positioning points
|
|
80
|
-
- **UIDummy** - Invisible layout helpers
|
|
81
80
|
|
|
82
81
|
### Constraints
|
|
83
82
|
- **UIWidthConstraint** / **UIHeightConstraint** - Fixed sizes
|
|
@@ -4,7 +4,7 @@ import { UIHorizontalProportionConstraint } from "../../constraints/UIHorizontal
|
|
|
4
4
|
import { UIVerticalDistanceConstraint } from "../../constraints/UIVerticalDistanceConstraint";
|
|
5
5
|
import { UIVerticalProportionConstraint } from "../../constraints/UIVerticalProportionConstraint";
|
|
6
6
|
import { UIWidthConstraint } from "../../constraints/UIWidthConstraint";
|
|
7
|
-
import type { UIElement } from "../../elements/UIElement";
|
|
7
|
+
import type { UIElement } from "../../elements/UIElement/UIElement";
|
|
8
8
|
import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/asserts";
|
|
9
9
|
import type { UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions } from "./UIConstraint2DBuilder.Internal";
|
|
10
10
|
/** Builder for paired horizontal and vertical constraints */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Eventail } from "eventail";
|
|
2
|
-
import type { UILayer } from "
|
|
3
|
-
import type { UILayerElement, UIPointElement } from "
|
|
4
|
-
import type { UISolverWrapperInterface } from "
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
3
|
+
import type { UILayerElement, UIPointElement } from "../../miscellaneous/asserts";
|
|
4
|
+
import type { UISolverWrapperInterface } from "../../wrappers/UISolverWrapper.Internal";
|
|
5
5
|
import type { UIAnchorOptions } from "./UIAnchor.Internal";
|
|
6
6
|
/** Point in 2D space with constraint-based positioning */
|
|
7
7
|
export declare class UIAnchor extends Eventail implements UILayerElement, UIPointElement {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UIColorConfig } from "
|
|
2
|
-
import type { UIElementOptions } from "
|
|
1
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
+
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
3
3
|
/** Animation playback events */
|
|
4
4
|
export declare enum UIAnimatedImageEvent {
|
|
5
5
|
/** Animation started or resumed */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
|
-
import type { UILayer } from "
|
|
3
|
-
import { UIColor } from "
|
|
4
|
-
import { UITextureView } from "
|
|
5
|
-
import type { UITextureConfig } from "
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
3
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
+
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
5
|
+
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
6
|
+
import { UIElement } from "../UIElement/UIElement";
|
|
6
7
|
import type { UIAnimatedImageOptions } from "./UIAnimatedImage.Internal";
|
|
7
|
-
import { UIElement } from "./UIElement";
|
|
8
8
|
/** Frame-based texture animation element */
|
|
9
9
|
export declare class UIAnimatedImage extends UIElement {
|
|
10
10
|
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
@@ -50,7 +50,7 @@ export declare class UIAnimatedImage extends UIElement {
|
|
|
50
50
|
/** Stops animation and resets to first frame */
|
|
51
51
|
stop(): void;
|
|
52
52
|
protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
|
|
53
|
-
protected
|
|
53
|
+
protected setPlaneTransform(): void;
|
|
54
54
|
private readonly onTextureDimensionsChanged;
|
|
55
55
|
private subscribeSequenceEvents;
|
|
56
56
|
private unsubscribeSequenceEvents;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UIMicroConfig } from "../../miscellaneous/micro/UIMicro.Internal";
|
|
2
|
+
import { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
|
|
3
|
+
import type { UIInputDummyOptions } from "../UIInputDummy/UIInputDummy.Internal";
|
|
4
|
+
/** Configuration options for UIElement */
|
|
5
|
+
export interface UIElementOptions extends UIInputDummyOptions {
|
|
6
|
+
/** Transforms that don't affect constraints */
|
|
7
|
+
micro: UIMicroConfig;
|
|
8
|
+
/** Alpha blending mode */
|
|
9
|
+
transparencyMode: UITransparencyMode;
|
|
10
|
+
}
|
|
11
|
+
export declare const ELEMENT_DEFAULT_TRANSPARENCY_MODE = UITransparencyMode.BLEND;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
|
-
import type { UILayer } from "
|
|
3
|
-
import type { UIPropertyType } from "
|
|
4
|
-
import { UIMicro } from "
|
|
5
|
-
import type { UIMode } from "
|
|
6
|
-
import type { UITransparencyMode } from "
|
|
7
|
-
import type { UISceneWrapperInterface } from "
|
|
8
|
-
import {
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
3
|
+
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
4
|
+
import { UIMicro } from "../../miscellaneous/micro/UIMicro";
|
|
5
|
+
import type { UIMode } from "../../miscellaneous/UIMode";
|
|
6
|
+
import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
|
|
7
|
+
import type { UISceneWrapperInterface } from "../../wrappers/UISceneWrapper.Internal";
|
|
8
|
+
import { UIInputDummy } from "../UIInputDummy/UIInputDummy";
|
|
9
9
|
import type { UIElementOptions } from "./UIElement.Internal";
|
|
10
10
|
/** Base class for renderable UI elements */
|
|
11
|
-
export declare abstract class UIElement extends
|
|
11
|
+
export declare abstract class UIElement extends UIInputDummy {
|
|
12
12
|
/** Transforms that don't affect constraints */
|
|
13
13
|
readonly micro: UIMicro;
|
|
14
14
|
protected readonly sceneWrapper: UISceneWrapperInterface;
|
|
@@ -32,6 +32,6 @@ export declare abstract class UIElement extends UIDummy {
|
|
|
32
32
|
set mode(value: UIMode);
|
|
33
33
|
/** Removes element and frees resources */
|
|
34
34
|
destroy(): void;
|
|
35
|
-
protected
|
|
35
|
+
protected setPlaneTransform(): void;
|
|
36
36
|
protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
|
|
37
37
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
+
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
3
|
+
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
4
|
+
/** Configuration options for UIGraphics */
|
|
5
|
+
export interface UIGraphicsOptions extends UIElementOptions {
|
|
6
|
+
/** Multiplicative tint */
|
|
7
|
+
color: UIColorConfig;
|
|
8
|
+
}
|
|
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 "
|
|
3
|
-
import { UIColor } from "
|
|
4
|
-
import { UIElement } from "
|
|
5
|
-
import type
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
3
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
+
import { UIElement } from "../UIElement/UIElement";
|
|
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. */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
+
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
3
|
+
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
4
|
+
/** Configuration options for UIImage */
|
|
5
|
+
export interface UIImageOptions extends UIElementOptions {
|
|
6
|
+
/** Multiplicative tint */
|
|
7
|
+
color: UIColorConfig;
|
|
8
|
+
}
|
|
9
|
+
export declare const IMAGE_TEMP_PROPERTIES: Record<string, UIPropertyType>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { UILayer } from "
|
|
2
|
-
import { UIColor } from "
|
|
3
|
-
import { UITextureView } from "
|
|
4
|
-
import type { UITextureConfig } from "
|
|
5
|
-
import { UIElement } from "
|
|
6
|
-
import type
|
|
1
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
2
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
|
+
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
4
|
+
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
5
|
+
import { UIElement } from "../UIElement/UIElement";
|
|
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 */
|
|
@@ -23,6 +23,6 @@ export declare class UIImage extends UIElement {
|
|
|
23
23
|
constructor(layer: UILayer, texture: UITextureConfig, options?: Partial<UIImageOptions>);
|
|
24
24
|
/** Removes image and frees resources */
|
|
25
25
|
destroy(): void;
|
|
26
|
-
protected
|
|
26
|
+
protected setPlaneTransform(): void;
|
|
27
27
|
private readonly onTextureDimensionsChanged;
|
|
28
28
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { UIArea } from "
|
|
2
|
-
import { UIMode } from "
|
|
3
|
-
import type { UIAnchorOptions } from "
|
|
4
|
-
/** Configuration options for
|
|
5
|
-
export interface
|
|
1
|
+
import type { UIArea } from "../../miscellaneous/area/UIArea";
|
|
2
|
+
import { UIMode } from "../../miscellaneous/UIMode";
|
|
3
|
+
import type { UIAnchorOptions } from "../UIAnchor/UIAnchor.Internal";
|
|
4
|
+
/** Configuration options for UIInputDummy */
|
|
5
|
+
export interface UIInputDummyOptions extends UIAnchorOptions {
|
|
6
6
|
/** Width in world units */
|
|
7
7
|
width: number;
|
|
8
8
|
/** Height in world units */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { UILayer } from "
|
|
2
|
-
import type { UIArea } from "
|
|
3
|
-
import type { UIPlaneElement } from "
|
|
4
|
-
import { UIInputEvent } from "
|
|
5
|
-
import { UIMode } from "
|
|
6
|
-
import type { UIInputWrapperInterface } from "
|
|
7
|
-
import { UIAnchor } from "
|
|
8
|
-
import type {
|
|
1
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
2
|
+
import type { UIArea } from "../../miscellaneous/area/UIArea";
|
|
3
|
+
import type { UIPlaneElement } from "../../miscellaneous/asserts";
|
|
4
|
+
import { UIInputEvent } from "../../miscellaneous/UIInputEvent";
|
|
5
|
+
import { UIMode } from "../../miscellaneous/UIMode";
|
|
6
|
+
import type { UIInputWrapperInterface } from "../../wrappers/UIInputWrapper.Internal";
|
|
7
|
+
import { UIAnchor } from "../UIAnchor/UIAnchor";
|
|
8
|
+
import type { UIInputDummyOptions } from "./UIInputDummy.Internal";
|
|
9
9
|
/** Rectangular area with dimensions but no rendering */
|
|
10
|
-
export declare class
|
|
10
|
+
export declare class UIInputDummy extends UIAnchor implements UIPlaneElement {
|
|
11
11
|
/** Shape defining interactive region in normalized coordinates */
|
|
12
12
|
interactionArea: UIArea;
|
|
13
13
|
/** Solver variable for width */
|
|
@@ -19,12 +19,12 @@ export declare class UIDummy extends UIAnchor implements UIPlaneElement {
|
|
|
19
19
|
private readonly catcherHandler;
|
|
20
20
|
private lastPointerInside;
|
|
21
21
|
/**
|
|
22
|
-
* Creates a new
|
|
22
|
+
* Creates a new UIInputDummy instance.
|
|
23
23
|
*
|
|
24
24
|
* @param layer - Layer containing this element
|
|
25
25
|
* @param options - Configuration options
|
|
26
26
|
*/
|
|
27
|
-
constructor(layer: UILayer, options?: Partial<
|
|
27
|
+
constructor(layer: UILayer, options?: Partial<UIInputDummyOptions>);
|
|
28
28
|
/** Width in world units */
|
|
29
29
|
get width(): number;
|
|
30
30
|
/** Height in world units */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UIColorConfig } from "
|
|
2
|
-
import type {
|
|
3
|
-
import type { UIElementOptions } from "
|
|
1
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
+
import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal";
|
|
3
|
+
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
4
4
|
/** Controls how sliceRegions values are interpreted */
|
|
5
5
|
export declare enum UINineSliceRegionMode {
|
|
6
6
|
/** sliceRegions in normalized coordinates (0 to 1) */
|
|
@@ -13,9 +13,9 @@ export interface UINineSliceOptions extends UIElementOptions {
|
|
|
13
13
|
/** Multiplicative tint */
|
|
14
14
|
color: UIColorConfig;
|
|
15
15
|
/** Border size in normalized texture coordinates (0 to 1) */
|
|
16
|
-
sliceBorders:
|
|
16
|
+
sliceBorders: UIInsetsConfig;
|
|
17
17
|
/** Region size. Interpretation depends on regionMode. */
|
|
18
|
-
sliceRegions:
|
|
18
|
+
sliceRegions: UIInsetsConfig;
|
|
19
19
|
/** How sliceRegions values are interpreted */
|
|
20
20
|
regionMode: UINineSliceRegionMode;
|
|
21
21
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { UILayer } from "
|
|
2
|
-
import { UIColor } from "
|
|
3
|
-
import {
|
|
4
|
-
import { UITextureView } from "
|
|
5
|
-
import type { UITextureConfig } from "
|
|
6
|
-
import { UIElement } from "
|
|
1
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
2
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
|
+
import { UIInsets } from "../../miscellaneous/insets/UIInsets";
|
|
4
|
+
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
5
|
+
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
6
|
+
import { UIElement } from "../UIElement/UIElement";
|
|
7
7
|
import type { UINineSliceOptions } from "./UINineSlice.Internal";
|
|
8
8
|
import { UINineSliceRegionMode } from "./UINineSlice.Internal";
|
|
9
9
|
/** Scalable textured image preserving border regions */
|
|
@@ -13,9 +13,9 @@ export declare class UINineSlice extends UIElement {
|
|
|
13
13
|
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
14
14
|
readonly color: UIColor;
|
|
15
15
|
/** Border size in normalized texture coordinates (0 to 1) */
|
|
16
|
-
readonly sliceBorders:
|
|
16
|
+
readonly sliceBorders: UIInsets;
|
|
17
17
|
/** Region size. Interpretation depends on regionMode. */
|
|
18
|
-
readonly sliceRegions:
|
|
18
|
+
readonly sliceRegions: UIInsets;
|
|
19
19
|
private regionModeInternal;
|
|
20
20
|
private regionModeDirty;
|
|
21
21
|
private readonly textureTransform;
|
|
@@ -37,7 +37,7 @@ export declare class UINineSlice extends UIElement {
|
|
|
37
37
|
get regionMode(): UINineSliceRegionMode;
|
|
38
38
|
/** Controls how sliceRegions values are interpreted */
|
|
39
39
|
set regionMode(value: UINineSliceRegionMode);
|
|
40
|
-
protected
|
|
40
|
+
protected setPlaneTransform(): void;
|
|
41
41
|
private calculateSliceBordersForShader;
|
|
42
42
|
private calculateSliceRegionsForShader;
|
|
43
43
|
private checkDimensionsDirty;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { UIColorConfig } from "
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
+
import type { UIPropertyType } from "../../miscellaneous/generic-plane/shared";
|
|
3
|
+
import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
|
|
4
|
+
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
4
5
|
/** Configuration options for UIProgress */
|
|
5
6
|
export interface UIProgressOptions extends UIElementOptions {
|
|
6
7
|
/** Multiplicative tint */
|
|
@@ -11,4 +12,5 @@ export interface UIProgressOptions extends UIElementOptions {
|
|
|
11
12
|
progress: number;
|
|
12
13
|
}
|
|
13
14
|
export declare const PROGRESS_DEFAULT_VALUE = 1;
|
|
15
|
+
export declare const PROGRESS_TEMP_PROPERTIES: Record<string, UIPropertyType>;
|
|
14
16
|
export declare function simplifyGLSLSource(source: string): string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Texture } from "three";
|
|
2
|
-
import type { UILayer } from "
|
|
3
|
-
import { UIColor } from "
|
|
4
|
-
import type { UIProgressMaskFunction } from "
|
|
5
|
-
import { UITextureView } from "
|
|
6
|
-
import { UIElement } from "
|
|
2
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
3
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
+
import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
|
|
5
|
+
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
6
|
+
import { UIElement } from "../UIElement/UIElement";
|
|
7
7
|
import type { UIProgressOptions } from "./UIProgress.Internal";
|
|
8
8
|
/** Progress bar with customizable fill direction */
|
|
9
9
|
export declare class UIProgress extends UIElement {
|
|
@@ -16,7 +16,8 @@ export declare class UIProgress extends UIElement {
|
|
|
16
16
|
private readonly textureTransform;
|
|
17
17
|
private readonly textureResolution;
|
|
18
18
|
private progressInternal;
|
|
19
|
-
private
|
|
19
|
+
private progressDirty;
|
|
20
|
+
private textureResolutionDirty;
|
|
20
21
|
/**
|
|
21
22
|
* Creates a new UIProgress instance.
|
|
22
23
|
*
|
|
@@ -31,6 +32,6 @@ export declare class UIProgress extends UIElement {
|
|
|
31
32
|
get progress(): number;
|
|
32
33
|
/** Progress from 0 (empty) to 1 (full). Clamped by shader. */
|
|
33
34
|
set progress(value: number);
|
|
34
|
-
protected
|
|
35
|
+
protected setPlaneTransform(): void;
|
|
35
36
|
private readonly onTextureDimensionsChanged;
|
|
36
37
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Camera, Scene } from "three";
|
|
2
|
-
import { UIColor } from "
|
|
3
|
-
import type { UIColorConfig } from "
|
|
4
|
-
import type { UIElementOptions } from "
|
|
2
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
4
|
+
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
5
5
|
/** Controls when scene re-renders */
|
|
6
6
|
export declare enum UISceneUpdateMode {
|
|
7
7
|
/** Re-render every frame */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Camera, WebGLRenderer } from "three";
|
|
2
2
|
import { Scene } from "three";
|
|
3
|
-
import type { UILayer } from "
|
|
4
|
-
import { UIColor } from "
|
|
5
|
-
import { UIElement } from "
|
|
3
|
+
import type { UILayer } from "../../layers/UILayer";
|
|
4
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
5
|
+
import { UIElement } from "../UIElement/UIElement";
|
|
6
6
|
import type { UISceneOptions } from "./UIScene.Internal";
|
|
7
7
|
import { UISceneUpdateMode } from "./UIScene.Internal";
|
|
8
8
|
/** Renders Three.js scene to texture */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
-
import type {
|
|
2
|
+
import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal";
|
|
3
3
|
import type { UITextStyleConfig } from "../../miscellaneous/text-style/UITextStyle.Internal";
|
|
4
|
-
import type { UIElementOptions } from "../UIElement.Internal";
|
|
4
|
+
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
5
5
|
/** Controls how text adapts to element size */
|
|
6
6
|
export declare enum UITextResizeMode {
|
|
7
7
|
/** Break text into multiple lines when narrower than content*/
|
|
@@ -14,7 +14,7 @@ export interface UITextOptions extends UIElementOptions {
|
|
|
14
14
|
/** Multiplicative tint */
|
|
15
15
|
color: UIColorConfig;
|
|
16
16
|
/** Text padding in world units */
|
|
17
|
-
padding:
|
|
17
|
+
padding: UIInsetsConfig;
|
|
18
18
|
/** Default style applied to all spans */
|
|
19
19
|
commonStyle: Partial<UITextStyleConfig>;
|
|
20
20
|
/** How text adapts to size constraints */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
2
|
import type { UILayer } from "../../layers/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
-
import {
|
|
4
|
+
import { UIInsets } from "../../miscellaneous/insets/UIInsets";
|
|
5
5
|
import { UITextSpan } from "../../miscellaneous/text-span/UITextSpan";
|
|
6
6
|
import { UITextStyle } from "../../miscellaneous/text-style/UITextStyle";
|
|
7
|
-
import { UIElement } from "../UIElement";
|
|
7
|
+
import { UIElement } from "../UIElement/UIElement";
|
|
8
8
|
import type { UITextContent } from "./UIText.Interfaces";
|
|
9
9
|
import type { UITextOptions } from "./UIText.Internal";
|
|
10
10
|
import { UITextResizeMode } from "./UIText.Internal";
|
|
@@ -13,7 +13,7 @@ export declare class UIText extends UIElement {
|
|
|
13
13
|
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
14
14
|
readonly color: UIColor;
|
|
15
15
|
/** Text padding in world units */
|
|
16
|
-
readonly padding:
|
|
16
|
+
readonly padding: UIInsets;
|
|
17
17
|
/** Default style applied to all text spans */
|
|
18
18
|
readonly commonStyle: UITextStyle;
|
|
19
19
|
private readonly canvas;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,16 +10,16 @@ export { UISingleParameterConstraint } from "./constraints/UISingleParameterCons
|
|
|
10
10
|
export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint";
|
|
11
11
|
export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint";
|
|
12
12
|
export { UIWidthConstraint } from "./constraints/UIWidthConstraint";
|
|
13
|
-
export { UIAnchor } from "./elements/UIAnchor";
|
|
14
|
-
export { UIAnimatedImage } from "./elements/UIAnimatedImage";
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export { UINineSlice } from "./elements/UINineSlice";
|
|
19
|
-
export { UINineSliceRegionMode } from "./elements/UINineSlice.Internal";
|
|
20
|
-
export { UIProgress } from "./elements/UIProgress";
|
|
21
|
-
export { UIScene } from "./elements/UIScene";
|
|
22
|
-
export { UISceneUpdateMode } from "./elements/UIScene.Internal";
|
|
13
|
+
export { UIAnchor } from "./elements/UIAnchor/UIAnchor";
|
|
14
|
+
export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage";
|
|
15
|
+
export { UIGraphics } from "./elements/UIGraphics/UIGraphics";
|
|
16
|
+
export { UIImage } from "./elements/UIImage/UIImage";
|
|
17
|
+
export { UIInputDummy } from "./elements/UIInputDummy/UIInputDummy";
|
|
18
|
+
export { UINineSlice } from "./elements/UINineSlice/UINineSlice";
|
|
19
|
+
export { UINineSliceRegionMode } from "./elements/UINineSlice/UINineSlice.Internal";
|
|
20
|
+
export { UIProgress } from "./elements/UIProgress/UIProgress";
|
|
21
|
+
export { UIScene } from "./elements/UIScene/UIScene";
|
|
22
|
+
export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal";
|
|
23
23
|
export { UIText } from "./elements/UIText/UIText";
|
|
24
24
|
export { UITextResizeMode } from "./elements/UIText/UIText.Internal";
|
|
25
25
|
export { UIFullscreenLayer } from "./layers/UIFullscreenLayer";
|