laymur 0.12.0 → 0.13.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/dist/constraints/UIConstraint.d.ts +1 -1
- package/dist/elements/UIAnchor/UIAnchor.d.ts +1 -1
- package/dist/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +3 -3
- package/dist/elements/UIAnimatedImage/UIAnimatedImage.d.ts +16 -12
- package/dist/elements/UIElement/UIElement.Internal.d.ts +1 -1
- package/dist/elements/UIElement/UIElement.d.ts +4 -4
- package/dist/elements/UIGraphics/UIGraphics.Internal.d.ts +4 -0
- package/dist/elements/UIGraphics/UIGraphics.d.ts +11 -7
- package/dist/elements/UIImage/UIImage.d.ts +6 -2
- package/dist/elements/UIInputDummy/UIInputDummy.Internal.d.ts +1 -1
- package/dist/elements/UIInputDummy/UIInputDummy.d.ts +3 -3
- package/dist/elements/UINineSlice/UINineSlice.d.ts +18 -7
- package/dist/elements/UIProgress/UIProgress.d.ts +13 -5
- package/dist/elements/UIScene/UIScene.Internal.d.ts +1 -1
- package/dist/elements/UIScene/UIScene.d.ts +18 -11
- package/dist/elements/UIText/UIText.d.ts +12 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +836 -556
- 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.d.ts +5 -3
- package/dist/layers/UILayer/UILayer.d.ts +1 -1
- package/dist/miscellaneous/color/UIColor.d.ts +37 -1
- package/dist/miscellaneous/generic-plane/{UIGenericInstancedPlane.Internal.d.ts → UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts} +6 -6
- package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +1 -0
- package/dist/miscellaneous/generic-plane/UIGenericPlane/UIGenericPlane.Internal.d.ts +6 -0
- package/dist/miscellaneous/generic-plane/UIGenericPlane/UIGenericPlane.d.ts +1 -0
- package/dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +12 -0
- package/dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +1 -0
- package/dist/miscellaneous/generic-plane/shared.d.ts +21 -10
- package/dist/miscellaneous/insets/UIInsets.Internal.d.ts +1 -1
- package/dist/miscellaneous/insets/UIInsets.d.ts +2 -0
- package/dist/wrappers/{UISceneWrapper.Internal.d.ts → UISceneWrapper/UISceneWrapper.Internal.d.ts} +4 -4
- package/dist/wrappers/{UISceneWrapper.d.ts → UISceneWrapper/UISceneWrapper.d.ts} +7 -6
- package/dist/wrappers/{UISolverWrapper.Internal.d.ts → UISolverWrapper/UISolverWrapper.Internal.d.ts} +3 -3
- package/dist/wrappers/{UISolverWrapper.d.ts → UISolverWrapper/UISolverWrapper.d.ts} +3 -3
- package/package.json +1 -1
- package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane.d.ts +0 -36
- package/dist/miscellaneous/generic-plane/UIGenericPlane.Internal.d.ts +0 -5
- package/dist/miscellaneous/generic-plane/UIGenericPlane.d.ts +0 -23
- package/dist/miscellaneous/generic-plane/UIGenericPlaneRegistry.Internal.d.ts +0 -6
- package/dist/miscellaneous/generic-plane/UIGenericPlaneRegistry.d.ts +0 -27
- /package/dist/wrappers/{UIInputWrapper.Internal.d.ts → UIInputWrapper/UIInputWrapper.Internal.d.ts} +0 -0
- /package/dist/wrappers/{UIInputWrapper.d.ts → UIInputWrapper/UIInputWrapper.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { UILayer } from "../layers/UILayer/UILayer";
|
|
2
|
-
import type { UISolverWrapperInterface } from "../wrappers/UISolverWrapper.Internal";
|
|
2
|
+
import type { UISolverWrapperInterface } from "../wrappers/UISolverWrapper/UISolverWrapper.Internal";
|
|
3
3
|
/** Base class for layout constraints */
|
|
4
4
|
export declare abstract class UIConstraint {
|
|
5
5
|
readonly layer: UILayer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Eventail } from "eventail";
|
|
2
2
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import type { UILayerElement, UIPointElement } from "../../miscellaneous/shared";
|
|
4
|
-
import type { UISolverWrapperInterface } from "../../wrappers/UISolverWrapper.Internal";
|
|
4
|
+
import type { UISolverWrapperInterface } from "../../wrappers/UISolverWrapper/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 {
|
|
@@ -10,7 +10,7 @@ export declare enum UIAnimatedImageEvent {
|
|
|
10
10
|
STOPPED = 2
|
|
11
11
|
}
|
|
12
12
|
/** Animation loop behavior */
|
|
13
|
-
export declare enum
|
|
13
|
+
export declare enum UIAnimatedImageLoopMode {
|
|
14
14
|
/** No looping, stops at boundary frame */
|
|
15
15
|
NONE = 0,
|
|
16
16
|
/** Loops back to opposite frame */
|
|
@@ -27,10 +27,10 @@ export interface UIAnimatedImageOptions extends UIElementOptions {
|
|
|
27
27
|
/** Playback speed multiplier. Can be negative for reverse playback. */
|
|
28
28
|
timeScale: number;
|
|
29
29
|
/** Loop behavior */
|
|
30
|
-
loopMode:
|
|
30
|
+
loopMode: UIAnimatedImageLoopMode;
|
|
31
31
|
/** Whether to start playing immediately */
|
|
32
32
|
playByDefault: boolean;
|
|
33
33
|
}
|
|
34
34
|
export declare const ANIMATED_IMAGE_DEFAULT_FRAME_RATE = 24;
|
|
35
35
|
export declare const ANIMATED_IMAGE_DEFAULT_TIME_SCALE = 1;
|
|
36
|
-
export declare const ANIMATED_IMAGE_DEFAULT_LOOP_MODE =
|
|
36
|
+
export declare const ANIMATED_IMAGE_DEFAULT_LOOP_MODE = UIAnimatedImageLoopMode.LOOP;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
2
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
4
5
|
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
5
6
|
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
6
7
|
import { UIElement } from "../UIElement/UIElement";
|
|
7
8
|
import type { UIAnimatedImageOptions } from "./UIAnimatedImage.Internal";
|
|
8
|
-
import {
|
|
9
|
+
import { UIAnimatedImageLoopMode } from "./UIAnimatedImage.Internal";
|
|
9
10
|
/** Frame-based texture animation element */
|
|
10
11
|
export declare class UIAnimatedImage extends UIElement {
|
|
11
|
-
|
|
12
|
-
readonly color: UIColor;
|
|
12
|
+
private readonly colorInternal;
|
|
13
13
|
private readonly sequenceInternal;
|
|
14
14
|
private frameRateInternal;
|
|
15
15
|
private timeScaleInternal;
|
|
@@ -29,24 +29,28 @@ export declare class UIAnimatedImage extends UIElement {
|
|
|
29
29
|
* @param options - Configuration options
|
|
30
30
|
*/
|
|
31
31
|
constructor(layer: UILayer, sequence: UITextureConfig[], options?: Partial<UIAnimatedImageOptions>);
|
|
32
|
-
/**
|
|
33
|
-
get
|
|
32
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
33
|
+
get color(): UIColor;
|
|
34
|
+
/** Total animation duration in seconds */
|
|
35
|
+
get duration(): number;
|
|
34
36
|
/** Animation speed in frames per second */
|
|
35
37
|
get frameRate(): number;
|
|
38
|
+
/** Loop behavior */
|
|
39
|
+
get loopMode(): UIAnimatedImageLoopMode;
|
|
40
|
+
/** Animation frames as readonly array */
|
|
41
|
+
get sequence(): readonly UITextureView[];
|
|
36
42
|
/** Playback speed multiplier. Can be negative for reverse playback. */
|
|
37
43
|
get timeScale(): number;
|
|
44
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
45
|
+
set color(value: UIColorConfig);
|
|
46
|
+
/** Animation speed in frames per second */
|
|
47
|
+
set frameRate(value: number);
|
|
38
48
|
/** Loop behavior */
|
|
39
|
-
|
|
40
|
-
/** Total animation duration in seconds */
|
|
41
|
-
get duration(): number;
|
|
49
|
+
set loopMode(value: UIAnimatedImageLoopMode);
|
|
42
50
|
/** Replaces animation frames. Stops playback. */
|
|
43
51
|
set sequence(sequence: UITextureConfig[]);
|
|
44
|
-
/** Animation speed in frames per second */
|
|
45
|
-
set frameRate(value: number);
|
|
46
52
|
/** Playback speed multiplier. Can be negative for reverse playback. */
|
|
47
53
|
set timeScale(value: number);
|
|
48
|
-
/** Loop behavior */
|
|
49
|
-
set loopMode(value: UILoopMode);
|
|
50
54
|
/** Removes element and frees resources */
|
|
51
55
|
destroy(): void;
|
|
52
56
|
/** Starts or resumes animation playback */
|
|
@@ -4,7 +4,7 @@ import type { UIInputDummyOptions } from "../UIInputDummy/UIInputDummy.Internal"
|
|
|
4
4
|
/** Configuration options for UIElement */
|
|
5
5
|
export interface UIElementOptions extends UIInputDummyOptions {
|
|
6
6
|
/** Transforms that don't affect constraints */
|
|
7
|
-
micro: UIMicroConfig
|
|
7
|
+
micro: Partial<UIMicroConfig>;
|
|
8
8
|
/** Alpha blending mode */
|
|
9
9
|
transparencyMode: UITransparencyMode;
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
2
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
|
-
import type {
|
|
3
|
+
import type { UIProperty } from "../../miscellaneous/generic-plane/shared";
|
|
4
4
|
import { UIMicro } from "../../miscellaneous/micro/UIMicro";
|
|
5
5
|
import type { UIMode } from "../../miscellaneous/UIMode";
|
|
6
6
|
import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
|
|
7
|
-
import type { UISceneWrapperInterface } from "../../wrappers/UISceneWrapper.Internal";
|
|
7
|
+
import type { UISceneWrapperInterface } from "../../wrappers/UISceneWrapper/UISceneWrapper.Internal";
|
|
8
8
|
import { UIInputDummy } from "../UIInputDummy/UIInputDummy";
|
|
9
9
|
import type { UIElementOptions } from "./UIElement.Internal";
|
|
10
10
|
/** Base class for renderable UI elements */
|
|
@@ -12,7 +12,7 @@ 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;
|
|
15
|
-
protected
|
|
15
|
+
protected planeHandler: number;
|
|
16
16
|
private transparencyModeInternal;
|
|
17
17
|
private transparencyModeDirty;
|
|
18
18
|
private visibilityDirty;
|
|
@@ -24,7 +24,7 @@ export declare abstract class UIElement extends UIInputDummy {
|
|
|
24
24
|
* @param properties - Shader uniform properties
|
|
25
25
|
* @param options - Configuration options
|
|
26
26
|
*/
|
|
27
|
-
constructor(layer: UILayer, source: string, properties: Record<string,
|
|
27
|
+
constructor(layer: UILayer, source: string, properties: Record<string, UIProperty>, options?: Partial<UIElementOptions>);
|
|
28
28
|
/** Alpha blending mode */
|
|
29
29
|
get transparencyMode(): UITransparencyMode;
|
|
30
30
|
/** Alpha blending mode */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
1
2
|
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
3
|
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
3
4
|
/** Configuration options for UIGraphics */
|
|
@@ -5,3 +6,6 @@ export interface UIGraphicsOptions extends UIElementOptions {
|
|
|
5
6
|
/** Multiplicative tint */
|
|
6
7
|
color: UIColorConfig;
|
|
7
8
|
}
|
|
9
|
+
export declare const GRAPHICS_DEFAULT_WIDTH = 2;
|
|
10
|
+
export declare const GRAPHICS_DEFAULT_HEIGHT = 2;
|
|
11
|
+
export declare const GRAPHICS_TEMP_COLOR: UIColor;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
2
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
4
5
|
import { UIElement } from "../UIElement/UIElement";
|
|
5
|
-
import type
|
|
6
|
+
import { type UIGraphicsOptions } from "./UIGraphics.Internal";
|
|
6
7
|
/** Canvas-based 2D drawing element */
|
|
7
8
|
export declare class UIGraphics extends UIElement {
|
|
8
|
-
|
|
9
|
-
readonly color: UIColor;
|
|
9
|
+
private readonly colorInternal;
|
|
10
10
|
private readonly canvas;
|
|
11
11
|
private readonly context;
|
|
12
12
|
private readonly texture;
|
|
@@ -17,23 +17,27 @@ export declare class UIGraphics extends UIElement {
|
|
|
17
17
|
* @param options - Configuration options
|
|
18
18
|
*/
|
|
19
19
|
constructor(layer: UILayer, options?: Partial<UIGraphicsOptions>);
|
|
20
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
21
|
+
get color(): UIColor;
|
|
22
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
23
|
+
set color(value: UIColorConfig);
|
|
20
24
|
/**
|
|
21
25
|
* Clears canvas. Optionally fills with color.
|
|
22
26
|
*
|
|
23
27
|
* @param color - Fill color after clearing
|
|
24
28
|
*/
|
|
25
|
-
clear(color?:
|
|
29
|
+
clear(color?: UIColorConfig): this;
|
|
26
30
|
/** Draws filled rectangle */
|
|
27
|
-
drawRect(x: number, y: number, width: number, height: number, color:
|
|
31
|
+
drawRect(x: number, y: number, width: number, height: number, color: UIColorConfig): this;
|
|
28
32
|
/** Draws filled circle */
|
|
29
|
-
drawCircle(x: number, y: number, radius: number, color:
|
|
33
|
+
drawCircle(x: number, y: number, radius: number, color: UIColorConfig): this;
|
|
30
34
|
/**
|
|
31
35
|
* Draws filled arc.
|
|
32
36
|
*
|
|
33
37
|
* @param startAngle - Start angle in radians
|
|
34
38
|
* @param endAngle - End angle in radians
|
|
35
39
|
*/
|
|
36
|
-
drawArc(x: number, y: number, radius: number, startAngle: number, endAngle: number, color:
|
|
40
|
+
drawArc(x: number, y: number, radius: number, startAngle: number, endAngle: number, color: UIColorConfig): this;
|
|
37
41
|
/**
|
|
38
42
|
* Draws connected line segments.
|
|
39
43
|
*
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
2
2
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
3
4
|
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
4
5
|
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
5
6
|
import { UIElement } from "../UIElement/UIElement";
|
|
@@ -8,8 +9,7 @@ import type { UIImageOptions } from "./UIImage.Internal";
|
|
|
8
9
|
export declare class UIImage extends UIElement {
|
|
9
10
|
/** Texture displayed by this image */
|
|
10
11
|
readonly texture: UITextureView;
|
|
11
|
-
|
|
12
|
-
readonly color: UIColor;
|
|
12
|
+
private readonly colorInternal;
|
|
13
13
|
private readonly textureTransform;
|
|
14
14
|
/**
|
|
15
15
|
* Creates a new UIImage instance.
|
|
@@ -21,6 +21,10 @@ export declare class UIImage extends UIElement {
|
|
|
21
21
|
* @param options - Configuration options
|
|
22
22
|
*/
|
|
23
23
|
constructor(layer: UILayer, texture: UITextureConfig, options?: Partial<UIImageOptions>);
|
|
24
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
25
|
+
get color(): UIColor;
|
|
26
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
27
|
+
set color(value: UIColorConfig);
|
|
24
28
|
/** Removes image and frees resources */
|
|
25
29
|
destroy(): void;
|
|
26
30
|
protected setPlaneTransform(): void;
|
|
@@ -7,7 +7,7 @@ export interface UIInputDummyOptions extends UIAnchorOptions {
|
|
|
7
7
|
width: number;
|
|
8
8
|
/** Height in world units */
|
|
9
9
|
height: number;
|
|
10
|
-
/** Shape defining interactive region in
|
|
10
|
+
/** Shape defining interactive region in element-local space (0,0 = bottom-left, 1,1 = top-right) */
|
|
11
11
|
interactionArea: UIArea;
|
|
12
12
|
/** Controls visibility and interactivity */
|
|
13
13
|
mode: UIMode;
|
|
@@ -3,12 +3,12 @@ import type { UIArea } from "../../miscellaneous/area/UIArea";
|
|
|
3
3
|
import type { UIPlaneElement } from "../../miscellaneous/shared";
|
|
4
4
|
import { UIInputEvent } from "../../miscellaneous/UIInputEvent";
|
|
5
5
|
import { UIMode } from "../../miscellaneous/UIMode";
|
|
6
|
-
import type { UIInputWrapperInterface } from "../../wrappers/UIInputWrapper.Internal";
|
|
6
|
+
import type { UIInputWrapperInterface } from "../../wrappers/UIInputWrapper/UIInputWrapper.Internal";
|
|
7
7
|
import { UIAnchor } from "../UIAnchor/UIAnchor";
|
|
8
8
|
import type { UIInputDummyOptions } from "./UIInputDummy.Internal";
|
|
9
9
|
/** Rectangular area with dimensions but no rendering */
|
|
10
10
|
export declare class UIInputDummy extends UIAnchor implements UIPlaneElement {
|
|
11
|
-
/** Shape defining interactive region in
|
|
11
|
+
/** Shape defining interactive region in element-local space (0,0 = bottom-left, 1,1 = top-right) */
|
|
12
12
|
interactionArea: UIArea;
|
|
13
13
|
/** Solver variable for width */
|
|
14
14
|
readonly wVariable: number;
|
|
@@ -17,7 +17,7 @@ export declare class UIInputDummy extends UIAnchor implements UIPlaneElement {
|
|
|
17
17
|
protected modeInternal: UIMode;
|
|
18
18
|
protected readonly inputWrapper: UIInputWrapperInterface;
|
|
19
19
|
private readonly catcherHandler;
|
|
20
|
-
private
|
|
20
|
+
private wasPointerInside;
|
|
21
21
|
/**
|
|
22
22
|
* Creates a new UIInputDummy instance.
|
|
23
23
|
*
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
2
2
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
3
4
|
import { UIInsets } from "../../miscellaneous/insets/UIInsets";
|
|
5
|
+
import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal";
|
|
4
6
|
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
5
|
-
import {
|
|
7
|
+
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
6
8
|
import { UIElement } from "../UIElement/UIElement";
|
|
7
9
|
import type { UINineSliceOptions } from "./UINineSlice.Internal";
|
|
8
10
|
import { UINineSliceRegionMode } from "./UINineSlice.Internal";
|
|
@@ -10,12 +12,9 @@ import { UINineSliceRegionMode } from "./UINineSlice.Internal";
|
|
|
10
12
|
export declare class UINineSlice extends UIElement {
|
|
11
13
|
/** Texture displayed by this element */
|
|
12
14
|
readonly texture: UITextureView;
|
|
13
|
-
|
|
14
|
-
readonly
|
|
15
|
-
|
|
16
|
-
readonly sliceBorders: UIInsets;
|
|
17
|
-
/** Region size. Interpretation depends on regionMode. */
|
|
18
|
-
readonly sliceRegions: UIInsets;
|
|
15
|
+
private readonly colorInternal;
|
|
16
|
+
private readonly sliceBordersInternal;
|
|
17
|
+
private readonly sliceRegionsInternal;
|
|
19
18
|
private regionModeInternal;
|
|
20
19
|
private regionModeDirty;
|
|
21
20
|
private readonly textureTransform;
|
|
@@ -34,10 +33,22 @@ export declare class UINineSlice extends UIElement {
|
|
|
34
33
|
* @param options - Configuration options
|
|
35
34
|
*/
|
|
36
35
|
constructor(layer: UILayer, texture: UITextureConfig, options?: Partial<UINineSliceOptions>);
|
|
36
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
37
|
+
get color(): UIColor;
|
|
37
38
|
/** Controls how sliceRegions values are interpreted */
|
|
38
39
|
get regionMode(): UINineSliceRegionMode;
|
|
40
|
+
/** Border size in normalized texture coordinates (0 to 1) */
|
|
41
|
+
get sliceBorders(): UIInsets;
|
|
42
|
+
/** Region size. Interpretation depends on regionMode. */
|
|
43
|
+
get sliceRegions(): UIInsets;
|
|
44
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
45
|
+
set color(value: UIColorConfig);
|
|
39
46
|
/** Controls how sliceRegions values are interpreted */
|
|
40
47
|
set regionMode(value: UINineSliceRegionMode);
|
|
48
|
+
/** Border size in normalized texture coordinates (0 to 1) */
|
|
49
|
+
set sliceBorders(value: UIInsetsConfig);
|
|
50
|
+
/** Region size. Interpretation depends on regionMode. */
|
|
51
|
+
set sliceRegions(value: UIInsetsConfig);
|
|
41
52
|
/** Removes nine slice and frees resources */
|
|
42
53
|
destroy(): void;
|
|
43
54
|
protected setPlaneTransform(): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Texture } from "three";
|
|
2
2
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
4
5
|
import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction";
|
|
5
6
|
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
6
7
|
import { UIElement } from "../UIElement/UIElement";
|
|
@@ -9,12 +10,10 @@ import type { UIProgressOptions } from "./UIProgress.Internal";
|
|
|
9
10
|
export declare class UIProgress extends UIElement {
|
|
10
11
|
/** Texture displayed by this element */
|
|
11
12
|
readonly texture: UITextureView;
|
|
12
|
-
|
|
13
|
-
readonly color: UIColor;
|
|
14
|
-
/** Function controlling fill direction and shape */
|
|
15
|
-
readonly maskFunction: UIProgressMaskFunction;
|
|
13
|
+
private readonly colorInternal;
|
|
16
14
|
private readonly textureTransform;
|
|
17
15
|
private readonly textureResolution;
|
|
16
|
+
private maskFunctionInternal;
|
|
18
17
|
private progressInternal;
|
|
19
18
|
private progressDirty;
|
|
20
19
|
private textureResolutionDirty;
|
|
@@ -28,10 +27,19 @@ export declare class UIProgress extends UIElement {
|
|
|
28
27
|
* @param options - Configuration options
|
|
29
28
|
*/
|
|
30
29
|
constructor(layer: UILayer, texture: Texture, options?: Partial<UIProgressOptions>);
|
|
30
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
31
|
+
get color(): UIColor;
|
|
32
|
+
/** Function controlling fill direction and shape */
|
|
33
|
+
get maskFunction(): UIProgressMaskFunction;
|
|
31
34
|
/** Progress from 0 (empty) to 1 (full) */
|
|
32
35
|
get progress(): number;
|
|
36
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
37
|
+
set color(value: UIColorConfig);
|
|
38
|
+
/** Function controlling fill direction and shape */
|
|
39
|
+
set maskFunction(value: UIProgressMaskFunction);
|
|
33
40
|
/** Progress from 0 (empty) to 1 (full). Clamped. */
|
|
34
41
|
set progress(value: number);
|
|
35
42
|
protected setPlaneTransform(): void;
|
|
36
43
|
private readonly onTextureDimensionsChanged;
|
|
44
|
+
private rebuildPlane;
|
|
37
45
|
}
|
|
@@ -5,7 +5,7 @@ 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 */
|
|
8
|
-
|
|
8
|
+
EVERY_FRAME = 1,
|
|
9
9
|
/** Re-render every other frame */
|
|
10
10
|
EVERY_SECOND_FRAME = 2,
|
|
11
11
|
/** Re-render when scene, camera, or updateMode changes */
|
|
@@ -2,15 +2,14 @@ import type { Camera, WebGLRenderer } from "three";
|
|
|
2
2
|
import { Scene } from "three";
|
|
3
3
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
4
4
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
5
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
5
6
|
import { UIElement } from "../UIElement/UIElement";
|
|
6
7
|
import type { UISceneOptions } from "./UIScene.Internal";
|
|
7
8
|
import { UISceneUpdateMode } from "./UIScene.Internal";
|
|
8
9
|
/** Renders Three.js scene to texture */
|
|
9
10
|
export declare class UIScene extends UIElement {
|
|
10
|
-
|
|
11
|
-
readonly
|
|
12
|
-
/** Background color for render target */
|
|
13
|
-
readonly clearColor: UIColor;
|
|
11
|
+
private readonly colorInternal;
|
|
12
|
+
private readonly clearColorInternal;
|
|
14
13
|
private readonly renderTarget;
|
|
15
14
|
private sceneInternal;
|
|
16
15
|
private cameraInternal;
|
|
@@ -28,22 +27,30 @@ export declare class UIScene extends UIElement {
|
|
|
28
27
|
* @throws If resolutionFactor outside range 0.1 to 2.0
|
|
29
28
|
*/
|
|
30
29
|
constructor(layer: UILayer, options?: Partial<UISceneOptions>);
|
|
31
|
-
/** Three.js scene to render */
|
|
32
|
-
get scene(): Scene;
|
|
33
30
|
/** Camera used for rendering */
|
|
34
31
|
get camera(): Camera;
|
|
35
|
-
/**
|
|
36
|
-
get
|
|
32
|
+
/** Background color for render target */
|
|
33
|
+
get clearColor(): UIColor;
|
|
34
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
35
|
+
get color(): UIColor;
|
|
37
36
|
/** Render target resolution multiplier. Range 0.1 to 2.0. */
|
|
38
37
|
get resolutionFactor(): number;
|
|
39
38
|
/** Three.js scene to render */
|
|
40
|
-
|
|
39
|
+
get scene(): Scene;
|
|
40
|
+
/** Controls when scene re-renders */
|
|
41
|
+
get updateMode(): UISceneUpdateMode;
|
|
41
42
|
/** Camera used for rendering */
|
|
42
43
|
set camera(value: Camera);
|
|
43
|
-
/**
|
|
44
|
-
set
|
|
44
|
+
/** Background color for render target */
|
|
45
|
+
set clearColor(value: UIColorConfig);
|
|
46
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
47
|
+
set color(value: UIColorConfig);
|
|
45
48
|
/** Render target resolution multiplier. Range 0.1 to 2.0. */
|
|
46
49
|
set resolutionFactor(value: number);
|
|
50
|
+
/** Three.js scene to render */
|
|
51
|
+
set scene(value: Scene);
|
|
52
|
+
/** Controls when scene re-renders */
|
|
53
|
+
set updateMode(value: UISceneUpdateMode);
|
|
47
54
|
/** Removes element and frees resources */
|
|
48
55
|
destroy(): void;
|
|
49
56
|
/** Triggers re-render on next frame. Useful in MANUAL mode. */
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { WebGLRenderer } from "three";
|
|
2
2
|
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
3
|
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
+
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
4
5
|
import { UIInsets } from "../../miscellaneous/insets/UIInsets";
|
|
6
|
+
import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal";
|
|
5
7
|
import { UITextSpan } from "../../miscellaneous/text-span/UITextSpan";
|
|
6
8
|
import { UITextStyle } from "../../miscellaneous/text-style/UITextStyle";
|
|
7
9
|
import { UIElement } from "../UIElement/UIElement";
|
|
@@ -10,12 +12,10 @@ import type { UITextOptions } from "./UIText.Internal";
|
|
|
10
12
|
import { UITextResizeMode } from "./UIText.Internal";
|
|
11
13
|
/** Canvas-based text rendering element */
|
|
12
14
|
export declare class UIText extends UIElement {
|
|
13
|
-
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
14
|
-
readonly color: UIColor;
|
|
15
|
-
/** Text padding in world units */
|
|
16
|
-
readonly padding: UIInsets;
|
|
17
15
|
/** Default style applied to all text spans */
|
|
18
16
|
readonly commonStyle: UITextStyle;
|
|
17
|
+
private readonly colorInternal;
|
|
18
|
+
private readonly paddingInternal;
|
|
19
19
|
private readonly canvas;
|
|
20
20
|
private readonly context;
|
|
21
21
|
private texture;
|
|
@@ -37,16 +37,24 @@ export declare class UIText extends UIElement {
|
|
|
37
37
|
* @param options - Configuration options
|
|
38
38
|
*/
|
|
39
39
|
constructor(layer: UILayer, content: UITextContent, options?: Partial<UITextOptions>);
|
|
40
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
41
|
+
get color(): UIColor;
|
|
40
42
|
/** Text content as array of styled spans */
|
|
41
43
|
get content(): UITextSpan[];
|
|
42
44
|
/** Maximum line width before wrapping in pixels */
|
|
43
45
|
get maxLineWidth(): number;
|
|
46
|
+
/** Text padding in world units */
|
|
47
|
+
get padding(): UIInsets;
|
|
44
48
|
/** Controls how text adapts to element size */
|
|
45
49
|
get resizeMode(): UITextResizeMode;
|
|
50
|
+
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
51
|
+
set color(value: UIColorConfig);
|
|
46
52
|
/** Text content as string, span config, or array */
|
|
47
53
|
set content(value: UITextContent);
|
|
48
54
|
/** Maximum line width before wrapping in pixels */
|
|
49
55
|
set maxLineWidth(value: number);
|
|
56
|
+
/** Text padding in world units */
|
|
57
|
+
set padding(value: UIInsetsConfig);
|
|
50
58
|
/** Controls how text adapts to size constraints */
|
|
51
59
|
set resizeMode(value: UITextResizeMode);
|
|
52
60
|
/** Removes element and frees resources */
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProporti
|
|
|
14
14
|
export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint";
|
|
15
15
|
export { UIAnchor } from "./elements/UIAnchor/UIAnchor";
|
|
16
16
|
export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage";
|
|
17
|
-
export {
|
|
17
|
+
export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal";
|
|
18
18
|
export { UIGraphics } from "./elements/UIGraphics/UIGraphics";
|
|
19
19
|
export { UIImage } from "./elements/UIImage/UIImage";
|
|
20
20
|
export { UIInputDummy } from "./elements/UIInputDummy/UIInputDummy";
|