laymur 0.11.5 → 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/UIAspectConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +1 -1
- package/dist/constraints/UIConstraint.d.ts +2 -2
- package/dist/constraints/UICustomConstraint.d.ts +3 -3
- package/dist/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +1 -1
- package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +1 -1
- package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +1 -1
- package/dist/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +1 -1
- 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/UIVerticalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +1 -1
- package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +1 -1
- package/dist/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +1 -1
- package/dist/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +1 -1
- package/dist/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +1 -1
- package/dist/elements/UIAnchor/UIAnchor.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/elements/UIImage/UIImage.d.ts +1 -1
- package/dist/elements/UIInputDummy/UIInputDummy.d.ts +1 -1
- package/dist/elements/UINineSlice/UINineSlice.d.ts +10 -6
- package/dist/elements/UIProgress/UIProgress.d.ts +1 -1
- package/dist/elements/UIScene/UIScene.d.ts +1 -1
- package/dist/elements/UIText/UIText.d.ts +2 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +185 -98
- 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 +1 -1
- package/dist/miscellaneous/shared.d.ts +1 -1
- package/package.json +1 -1
- package/dist/layers/UILayer.Internal.d.ts +0 -15
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { UIResizePolicy } from "../../miscellaneous/resize-policy/UIResizePolicy";
|
|
2
|
+
import { UIResizePolicyNone } from "../../miscellaneous/resize-policy/UIResizePolicyNone";
|
|
3
|
+
import type { UILayerOptions } from "../UILayer/UILayer.Internal";
|
|
4
|
+
/** Configuration for fullscreen layer */
|
|
5
|
+
export interface UIFullscreenLayerOptions extends Omit<UILayerOptions, "width" | "height"> {
|
|
6
|
+
/** Strategy for handling window resize */
|
|
7
|
+
resizePolicy: UIResizePolicy;
|
|
8
|
+
}
|
|
9
|
+
export declare const FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY: UIResizePolicyNone;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import type { Camera, Vector2, WebGLRenderer } from "three";
|
|
2
2
|
import { Ray, Vector3 } from "three";
|
|
3
|
-
import type { UIResizePolicy } from "
|
|
4
|
-
import { UILayer } from "
|
|
5
|
-
import type
|
|
3
|
+
import type { UIResizePolicy } from "../../miscellaneous/resize-policy/UIResizePolicy";
|
|
4
|
+
import { UILayer } from "../UILayer/UILayer";
|
|
5
|
+
import { type UIFullscreenLayerOptions } from "./UIFullscreenLayer.Internal";
|
|
6
6
|
/** Layer that automatically handles browser window resizing and input events */
|
|
7
7
|
export declare class UIFullscreenLayer extends UILayer {
|
|
8
8
|
private resizePolicyInternal;
|
|
9
9
|
private resizePolicyDirty;
|
|
10
|
-
|
|
11
|
-
* @param resizePolicy Strategy for handling window resize
|
|
12
|
-
* @param mode Initial visibility and interactivity mode
|
|
13
|
-
*/
|
|
14
|
-
constructor(resizePolicy?: UIResizePolicy, mode?: UILayerMode);
|
|
10
|
+
constructor(options?: Partial<UIFullscreenLayerOptions>);
|
|
15
11
|
/** Current resize policy */
|
|
16
12
|
get resizePolicy(): UIResizePolicy;
|
|
17
13
|
/** Updates resize policy */
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { UIMode } from "../../miscellaneous/UIMode";
|
|
2
|
+
import type { UIOrientation } from "../../miscellaneous/UIOrientation";
|
|
3
|
+
/** Layer lifecycle and state events */
|
|
4
|
+
export declare enum UILayerEvent {
|
|
5
|
+
/** Fired when orientation changes */
|
|
6
|
+
ORIENTATION_CHANGED = "orientation_changed",
|
|
7
|
+
/** Fired when mode changes */
|
|
8
|
+
MODE_CHANGED = "mode_changed",
|
|
9
|
+
/** Fired during rendering */
|
|
10
|
+
RENDERING = "rendering"
|
|
11
|
+
}
|
|
12
|
+
/** Layer visibility and interactivity state */
|
|
13
|
+
export type UILayerMode = UIMode.HIDDEN | UIMode.VISIBLE | UIMode.INTERACTIVE;
|
|
14
|
+
/** Layer orientation state */
|
|
15
|
+
export type UILayerOrientation = UIOrientation.VERTICAL | UIOrientation.HORIZONTAL;
|
|
16
|
+
/** Configuration options for UILayer */
|
|
17
|
+
export interface UILayerOptions {
|
|
18
|
+
/** Initial width */
|
|
19
|
+
width: number;
|
|
20
|
+
/** Initial height */
|
|
21
|
+
height: number;
|
|
22
|
+
/** Optional layer name */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Initial visibility and interactivity mode */
|
|
25
|
+
mode: UILayerMode;
|
|
26
|
+
}
|
|
27
|
+
export declare const LAYER_DEFAULT_SIZE = 1024;
|
|
28
|
+
export declare const LAYER_DEFAULT_NAME = "";
|
|
29
|
+
export declare const LAYER_DEFAULT_MODE: UILayerMode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Eventail } from "eventail";
|
|
2
2
|
import type { WebGLRenderer } from "three";
|
|
3
|
-
import type { UIPlaneElement } from "
|
|
4
|
-
import { UIInputWrapper } from "
|
|
5
|
-
import type { UILayerMode, UILayerOrientation } from "./UILayer.Internal";
|
|
3
|
+
import type { UIPlaneElement } from "../../miscellaneous/shared";
|
|
4
|
+
import { UIInputWrapper } from "../../wrappers/UIInputWrapper";
|
|
5
|
+
import type { UILayerMode, UILayerOptions, UILayerOrientation } from "./UILayer.Internal";
|
|
6
6
|
/** Base layer for UI rendering and layout management */
|
|
7
7
|
export declare abstract class UILayer extends Eventail implements UIPlaneElement {
|
|
8
8
|
/** Optional layer name */
|
|
@@ -20,12 +20,7 @@ export declare abstract class UILayer extends Eventail implements UIPlaneElement
|
|
|
20
20
|
private readonly sceneWrapperInternal;
|
|
21
21
|
private modeInternal;
|
|
22
22
|
private orientationInternal;
|
|
23
|
-
|
|
24
|
-
* @param w Initial width in world units
|
|
25
|
-
* @param h Initial height in world units
|
|
26
|
-
* @param mode Initial visibility and interactivity mode
|
|
27
|
-
*/
|
|
28
|
-
constructor(w: number, h: number, mode: UILayerMode);
|
|
23
|
+
constructor(options: Partial<UILayerOptions>);
|
|
29
24
|
/** X coordinate in world units (always 0 for layers) */
|
|
30
25
|
get x(): number;
|
|
31
26
|
/** Y coordinate in world units (always 0 for layers) */
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { UIMode } from "../miscellaneous/UIMode";
|
|
2
|
-
import type { UIOrientation } from "../miscellaneous/UIOrientation";
|
|
3
|
-
/** Layer lifecycle and state events */
|
|
4
|
-
export declare enum UILayerEvent {
|
|
5
|
-
/** Fired when orientation changes */
|
|
6
|
-
ORIENTATION_CHANGED = "orientation_changed",
|
|
7
|
-
/** Fired when mode changes */
|
|
8
|
-
MODE_CHANGED = "mode_changed",
|
|
9
|
-
/** Fired during rendering */
|
|
10
|
-
RENDERING = "rendering"
|
|
11
|
-
}
|
|
12
|
-
/** Layer visibility and interactivity state */
|
|
13
|
-
export type UILayerMode = UIMode.HIDDEN | UIMode.VISIBLE | UIMode.INTERACTIVE;
|
|
14
|
-
/** Layer orientation state */
|
|
15
|
-
export type UILayerOrientation = UIOrientation.VERTICAL | UIOrientation.HORIZONTAL;
|