laymur 0.15.1 → 0.17.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/.claude/settings.local.json +9 -0
- package/.editorconfig +14 -0
- package/CLAUDE.md +181 -0
- package/README.md +84 -208
- package/assets/logotype.png +0 -0
- package/eslint.config.js +111 -0
- package/package.json +20 -36
- package/rollup.config.js +52 -0
- package/{dist/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts → src/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.ts} +3 -2
- package/src/core/constraints/UIAspectConstraint/UIAspectConstraint.ts +60 -0
- package/src/core/constraints/UIConstraint.ts +20 -0
- package/src/core/constraints/UICustomConstraint.ts +62 -0
- package/{dist/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts → src/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.ts} +3 -2
- package/src/core/constraints/UIHeightConstraint/UIHeightConstraint.ts +52 -0
- package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.ts +13 -0
- package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.ts +139 -0
- package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.ts +16 -0
- package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.ts +189 -0
- package/{dist/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts → src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.ts} +3 -2
- package/src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.ts +68 -0
- package/{dist/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts → src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.ts} +9 -8
- package/src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.ts +94 -0
- package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.ts +13 -0
- package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.ts +135 -0
- package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.ts +16 -0
- package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.ts +189 -0
- package/{dist/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts → src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.ts} +3 -2
- package/src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.ts +68 -0
- package/{dist/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts → src/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.ts} +3 -2
- package/src/core/constraints/UIWidthConstraint/UIWidthConstraint.ts +52 -0
- package/src/core/constraints/builders/UIConstraint2DBuilder.Internal.ts +84 -0
- package/src/core/constraints/builders/UIConstraint2DBuilder.ts +168 -0
- package/src/core/constraints/builders/UICoverConstraintBuilder.Internal.ts +15 -0
- package/src/core/constraints/builders/UICoverConstraintBuilder.ts +84 -0
- package/src/core/constraints/builders/UIFitConstraintBuilder.Internal.ts +15 -0
- package/src/core/constraints/builders/UIFitConstraintBuilder.ts +84 -0
- package/src/core/elements/UIAnchor/UIAnchor.Internal.ts +13 -0
- package/src/core/elements/UIAnchor/UIAnchor.ts +70 -0
- package/src/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.ts +30 -0
- package/src/core/elements/UIAnimatedImage/UIAnimatedImage.ts +355 -0
- package/src/core/elements/UIDummy/UIDummy.Internal.ts +33 -0
- package/src/core/elements/UIDummy/UIDummy.ts +244 -0
- package/src/core/elements/UIElement/UIElement.Internal.ts +13 -0
- package/src/core/elements/UIElement/UIElement.ts +127 -0
- package/{dist/elements/UIGraphics/UIGraphics.Internal.d.ts → src/core/elements/UIGraphics/UIGraphics.Internal.ts} +7 -5
- package/src/core/elements/UIGraphics/UIGraphics.ts +168 -0
- package/{dist/elements/UIImage/UIImage.Internal.d.ts → src/core/elements/UIImage/UIImage.Internal.ts} +3 -2
- package/src/core/elements/UIImage/UIImage.ts +138 -0
- package/src/core/elements/UINineSlice/UINineSlice.Internal.ts +26 -0
- package/src/core/elements/UINineSlice/UINineSlice.ts +296 -0
- package/src/core/elements/UIProgress/UIProgress.Internal.ts +24 -0
- package/src/core/elements/UIProgress/UIProgress.ts +259 -0
- package/src/core/elements/UIScene/UIScene.Internal.ts +46 -0
- package/src/core/elements/UIScene/UIScene.ts +259 -0
- package/{dist/elements/UIText/UIText.Interfaces.d.ts → src/core/elements/UIText/UIText.Interfaces.ts} +21 -16
- package/src/core/elements/UIText/UIText.Internal.ts +29 -0
- package/src/core/elements/UIText/UIText.Measuring.ts +183 -0
- package/src/core/elements/UIText/UIText.Rendering.ts +83 -0
- package/src/core/elements/UIText/UIText.ts +376 -0
- package/{dist/index.d.ts → src/core/index.ts} +2 -1
- package/{dist/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts → src/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.ts} +14 -11
- package/src/core/layers/UIFullscreenLayer/UIFullscreenLayer.ts +233 -0
- package/{dist/layers/UILayer/UILayer.Internal.d.ts → src/core/layers/UILayer/UILayer.Internal.ts} +15 -11
- package/src/core/layers/UILayer/UILayer.ts +156 -0
- package/src/core/miscellaneous/UIExpression.ts +142 -0
- package/src/core/miscellaneous/UIMode.ts +29 -0
- package/src/core/miscellaneous/UIOrientation.ts +18 -0
- package/src/core/miscellaneous/UIPriority.ts +63 -0
- package/src/core/miscellaneous/UIRelation.ts +39 -0
- package/src/core/miscellaneous/UITransparencyMode.ts +9 -0
- package/src/core/miscellaneous/area/UIArea.ts +5 -0
- package/src/core/miscellaneous/area/UIAreaCircle.ts +32 -0
- package/src/core/miscellaneous/area/UIAreaPolygon.ts +50 -0
- package/src/core/miscellaneous/area/UIAreaRectangle.ts +38 -0
- package/src/core/miscellaneous/area/UIAreaRoundedRectangle.ts +78 -0
- package/src/core/miscellaneous/asserts.ts +187 -0
- package/src/core/miscellaneous/canvas.ts +73 -0
- package/src/core/miscellaneous/color/UIColor.Internal.ts +89 -0
- package/src/core/miscellaneous/color/UIColor.ts +844 -0
- package/src/core/miscellaneous/computeTransform.ts +127 -0
- package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.ts +235 -0
- package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.ts +524 -0
- package/{dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts → src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.ts} +10 -8
- package/src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.ts +448 -0
- package/src/core/miscellaneous/generic-plane/shared.ts +323 -0
- package/src/core/miscellaneous/insets/UIInsets.Internal.ts +9 -0
- package/src/core/miscellaneous/insets/UIInsets.ts +248 -0
- package/src/core/miscellaneous/mask-function/UIProgressMaskFunction.ts +24 -0
- package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.ts +58 -0
- package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.ts +52 -0
- package/src/core/miscellaneous/math.ts +16 -0
- package/src/core/miscellaneous/micro/UIMicro.Internal.ts +33 -0
- package/src/core/miscellaneous/micro/UIMicro.ts +222 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicy.ts +8 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicyCover.ts +57 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicyCross.ts +65 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.ts +65 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicyFit.ts +57 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.ts +65 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.ts +65 -0
- package/src/core/miscellaneous/resize-policy/UIResizePolicyNone.ts +11 -0
- package/src/core/miscellaneous/shared.ts +73 -0
- package/{dist/miscellaneous/text-span/UITextSpan.Internal.d.ts → src/core/miscellaneous/text-span/UITextSpan.Internal.ts} +5 -4
- package/src/core/miscellaneous/text-span/UITextSpan.ts +43 -0
- package/src/core/miscellaneous/text-style/UITextStyle.Internal.ts +52 -0
- package/src/core/miscellaneous/text-style/UITextStyle.ts +479 -0
- package/src/core/miscellaneous/texture/UITextureView.Internal.ts +55 -0
- package/src/core/miscellaneous/texture/UITextureView.ts +308 -0
- package/src/core/miscellaneous/webglCapabilities.ts +129 -0
- package/src/core/shaders/UIImage.glsl +10 -0
- package/src/core/shaders/UINineSlice.glsl +53 -0
- package/src/core/shaders/UIProgress.glsl +15 -0
- package/src/core/shaders/UIProgressMaskFunctionCircular.glsl +13 -0
- package/src/core/shaders/UIProgressMaskFunctionDirectional.glsl +12 -0
- package/src/core/shaders/glsl.d.ts +27 -0
- package/src/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.ts +23 -0
- package/src/core/wrappers/UIInputWrapper/UIInputWrapper.ts +124 -0
- package/src/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.ts +22 -0
- package/src/core/wrappers/UISceneWrapper/UISceneWrapper.ts +101 -0
- package/src/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.ts +58 -0
- package/src/core/wrappers/UISolverWrapper/UISolverWrapper.ts +605 -0
- package/src/particles/behaviorModules/UIBehaviorDirectionalGravity.ts +70 -0
- package/src/particles/behaviorModules/UIBehaviorModule.ts +20 -0
- package/src/particles/behaviorModules/UIBehaviorPointGravity.ts +173 -0
- package/src/particles/behaviorModules/UIBehaviorScaleOverLife.ts +104 -0
- package/src/particles/behaviorModules/UIBehaviorTorqueDamping.ts +75 -0
- package/src/particles/behaviorModules/UIBehaviorTorqueNoise.ts +115 -0
- package/src/particles/behaviorModules/UIBehaviorVelocityDamping.ts +77 -0
- package/src/particles/behaviorModules/UIBehaviorVelocityNoise.ts +118 -0
- package/src/particles/elements/UIEmitter.Internal.ts +22 -0
- package/src/particles/elements/UIEmitter.ts +313 -0
- package/src/particles/index.ts +18 -0
- package/src/particles/instancedParticle/UIInstancedParticle.Internal.ts +263 -0
- package/src/particles/instancedParticle/UIInstancedParticle.ts +138 -0
- package/src/particles/miscellaneous/miscellaneous.ts +115 -0
- package/src/particles/renderingModules/UIRenderingColorOverLife.ts +39 -0
- package/src/particles/renderingModules/UIRenderingColorOverVelocity.ts +49 -0
- package/src/particles/renderingModules/UIRenderingModule.ts +17 -0
- package/src/particles/renderingModules/UIRenderingTexture.ts +30 -0
- package/src/particles/shaders/UIRenderingColorOverLife.glsl +4 -0
- package/src/particles/shaders/UIRenderingColorOverVelocity.glsl +6 -0
- package/src/particles/shaders/UIRenderingTexture.glsl +4 -0
- package/src/particles/spawnModules/UISpawnModule.ts +22 -0
- package/src/particles/spawnModules/UISpawnOffset.ts +62 -0
- package/src/particles/spawnModules/UISpawnRandomLifetime.ts +68 -0
- package/src/particles/spawnModules/UISpawnRandomRotation.ts +60 -0
- package/src/particles/spawnModules/UISpawnRandomScale.ts +81 -0
- package/src/particles/spawnModules/UISpawnRandomTorque.ts +62 -0
- package/src/particles/spawnModules/UISpawnRandomVelocity.ts +92 -0
- package/src/particles/spawnModules/UISpawnRectangle.ts +81 -0
- package/tsconfig.json +29 -0
- package/dist/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +0 -22
- package/dist/constraints/UIConstraint.d.ts +0 -12
- package/dist/constraints/UICustomConstraint.d.ts +0 -28
- package/dist/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +0 -20
- package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +0 -11
- package/dist/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +0 -36
- package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +0 -14
- package/dist/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +0 -44
- package/dist/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +0 -22
- package/dist/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +0 -43
- package/dist/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +0 -11
- package/dist/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +0 -32
- package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +0 -14
- package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +0 -44
- package/dist/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +0 -22
- package/dist/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +0 -20
- package/dist/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +0 -64
- package/dist/constraints/builders/UIConstraint2DBuilder.d.ts +0 -46
- package/dist/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +0 -13
- package/dist/constraints/builders/UICoverConstraintBuilder.d.ts +0 -29
- package/dist/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +0 -13
- package/dist/constraints/builders/UIFitConstraintBuilder.d.ts +0 -29
- package/dist/elements/UIAnchor/UIAnchor.Internal.d.ts +0 -9
- package/dist/elements/UIAnchor/UIAnchor.d.ts +0 -32
- package/dist/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +0 -27
- package/dist/elements/UIAnimatedImage/UIAnimatedImage.d.ts +0 -77
- package/dist/elements/UIElement/UIElement.Internal.d.ts +0 -11
- package/dist/elements/UIElement/UIElement.d.ts +0 -38
- package/dist/elements/UIGraphics/UIGraphics.d.ts +0 -51
- package/dist/elements/UIImage/UIImage.d.ts +0 -32
- package/dist/elements/UIInputDummy/UIInputDummy.Internal.d.ts +0 -30
- package/dist/elements/UIInputDummy/UIInputDummy.d.ts +0 -82
- package/dist/elements/UINineSlice/UINineSlice.Internal.d.ts +0 -23
- package/dist/elements/UINineSlice/UINineSlice.d.ts +0 -60
- package/dist/elements/UIProgress/UIProgress.Internal.d.ts +0 -14
- package/dist/elements/UIProgress/UIProgress.d.ts +0 -45
- package/dist/elements/UIScene/UIScene.Internal.d.ts +0 -43
- package/dist/elements/UIScene/UIScene.d.ts +0 -59
- package/dist/elements/UIText/UIText.Internal.d.ts +0 -26
- package/dist/elements/UIText/UIText.Measuring.d.ts +0 -50
- package/dist/elements/UIText/UIText.Rendering.d.ts +0 -20
- package/dist/elements/UIText/UIText.d.ts +0 -71
- package/dist/index.js +0 -9236
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/dist/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -63
- package/dist/layers/UILayer/UILayer.d.ts +0 -49
- package/dist/miscellaneous/UIExpression.d.ts +0 -69
- package/dist/miscellaneous/UIMode.d.ts +0 -23
- package/dist/miscellaneous/UIOrientation.d.ts +0 -15
- package/dist/miscellaneous/UIPriority.d.ts +0 -32
- package/dist/miscellaneous/UIRelation.d.ts +0 -23
- package/dist/miscellaneous/UITransparencyMode.d.ts +0 -9
- package/dist/miscellaneous/area/UIArea.d.ts +0 -3
- package/dist/miscellaneous/area/UIAreaCircle.d.ts +0 -15
- package/dist/miscellaneous/area/UIAreaPolygon.d.ts +0 -12
- package/dist/miscellaneous/area/UIAreaRectangle.d.ts +0 -17
- package/dist/miscellaneous/area/UIAreaRoundedRectangle.d.ts +0 -21
- package/dist/miscellaneous/asserts.d.ts +0 -43
- package/dist/miscellaneous/canvas.d.ts +0 -31
- package/dist/miscellaneous/color/UIColor.Internal.d.ts +0 -7
- package/dist/miscellaneous/color/UIColor.d.ts +0 -234
- package/dist/miscellaneous/computeTransform.d.ts +0 -18
- package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +0 -19
- package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +0 -1
- package/dist/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +0 -1
- package/dist/miscellaneous/generic-plane/shared.d.ts +0 -38
- package/dist/miscellaneous/insets/UIInsets.Internal.d.ts +0 -11
- package/dist/miscellaneous/insets/UIInsets.d.ts +0 -48
- package/dist/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +0 -9
- package/dist/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +0 -21
- package/dist/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +0 -16
- package/dist/miscellaneous/math.d.ts +0 -5
- package/dist/miscellaneous/micro/UIMicro.Internal.d.ts +0 -31
- package/dist/miscellaneous/micro/UIMicro.d.ts +0 -59
- package/dist/miscellaneous/resize-policy/UIResizePolicy.d.ts +0 -3
- package/dist/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +0 -22
- package/dist/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +0 -22
- package/dist/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +0 -22
- package/dist/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +0 -22
- package/dist/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +0 -22
- package/dist/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +0 -22
- package/dist/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +0 -5
- package/dist/miscellaneous/shared.d.ts +0 -46
- package/dist/miscellaneous/text-span/UITextSpan.d.ts +0 -14
- package/dist/miscellaneous/text-style/UITextStyle.Internal.d.ts +0 -48
- package/dist/miscellaneous/text-style/UITextStyle.d.ts +0 -85
- package/dist/miscellaneous/texture/UITextureView.Internal.d.ts +0 -49
- package/dist/miscellaneous/texture/UITextureView.d.ts +0 -67
- package/dist/miscellaneous/webglCapabilities.d.ts +0 -2
- package/dist/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +0 -17
- package/dist/wrappers/UIInputWrapper/UIInputWrapper.d.ts +0 -13
- package/dist/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +0 -13
- package/dist/wrappers/UISceneWrapper/UISceneWrapper.d.ts +0 -20
- package/dist/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +0 -49
- package/dist/wrappers/UISolverWrapper/UISolverWrapper.d.ts +0 -215
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { UISingleParameterConstraintOptions } from "../UISingleParameterConstraint/UISingleParameterConstraint.Internal";
|
|
2
|
-
export declare const DEFAULT_ANCHOR = 0.5;
|
|
3
|
-
export declare const DEFAULT_T = 0.5;
|
|
4
|
-
/** Vertical interpolation constraint options */
|
|
5
|
-
export interface UIVerticalInterpolationConstraintOptions extends UISingleParameterConstraintOptions {
|
|
6
|
-
/** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
|
|
7
|
-
anchorA: number;
|
|
8
|
-
/** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
|
|
9
|
-
anchorB: number;
|
|
10
|
-
/** Anchor on element C (0 = bottom, 0.5 = center, 1 = top) */
|
|
11
|
-
anchorC: number;
|
|
12
|
-
/** Interpolation factor (0 = A position, 1 = B position) */
|
|
13
|
-
t: number;
|
|
14
|
-
}
|
package/dist/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
|
|
2
|
-
import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
|
|
3
|
-
import type { UIVerticalInterpolationConstraintOptions } from "./UIVerticalInterpolationConstraint.Internal";
|
|
4
|
-
/** Positions element C vertically between A and B based on interpolation factor */
|
|
5
|
-
export declare class UIVerticalInterpolationConstraint extends UISingleParameterConstraint {
|
|
6
|
-
private readonly a;
|
|
7
|
-
private readonly b;
|
|
8
|
-
private readonly c;
|
|
9
|
-
/** Solver constraint descriptor */
|
|
10
|
-
protected readonly constraint: number;
|
|
11
|
-
/** Anchor on element A */
|
|
12
|
-
private anchorAInternal;
|
|
13
|
-
/** Anchor on element B */
|
|
14
|
-
private anchorBInternal;
|
|
15
|
-
/** Anchor on element C */
|
|
16
|
-
private anchorCInternal;
|
|
17
|
-
/** Interpolation factor */
|
|
18
|
-
private tInternal;
|
|
19
|
-
/**
|
|
20
|
-
* @param a First element
|
|
21
|
-
* @param b Second element
|
|
22
|
-
* @param c Element to position between A and B
|
|
23
|
-
* @param options Interpolation configuration
|
|
24
|
-
*/
|
|
25
|
-
constructor(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, c: UIPointElement | UIPlaneElement, options?: Partial<UIVerticalInterpolationConstraintOptions>);
|
|
26
|
-
/** Interpolation factor (0 = A position, 1 = B position) */
|
|
27
|
-
get t(): number;
|
|
28
|
-
/** Anchor on element A (0 = bottom, 0.5 = center, 1 = top) */
|
|
29
|
-
get anchorA(): number;
|
|
30
|
-
/** Anchor on element B (0 = bottom, 0.5 = center, 1 = top) */
|
|
31
|
-
get anchorB(): number;
|
|
32
|
-
/** Anchor on element C (0 = bottom, 0.5 = center, 1 = top) */
|
|
33
|
-
get anchorC(): number;
|
|
34
|
-
/** Updates interpolation factor */
|
|
35
|
-
set t(value: number);
|
|
36
|
-
/** Updates anchor on element A */
|
|
37
|
-
set anchorA(value: number);
|
|
38
|
-
/** Updates anchor on element B */
|
|
39
|
-
set anchorB(value: number);
|
|
40
|
-
/** Updates anchor on element C */
|
|
41
|
-
set anchorC(value: number);
|
|
42
|
-
/** Builds constraint expression: C - A*(1-t) - B*t = 0 */
|
|
43
|
-
private buildLHS;
|
|
44
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { UIPlaneElement } from "../../miscellaneous/shared";
|
|
2
|
-
import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
|
|
3
|
-
import type { UIVerticalProportionConstraintOptions } from "./UIVerticalProportionConstraint.Internal";
|
|
4
|
-
/** Maintains proportional height relationship (A.height * proportion = B.height) */
|
|
5
|
-
export declare class UIVerticalProportionConstraint extends UISingleParameterConstraint {
|
|
6
|
-
private readonly a;
|
|
7
|
-
private readonly b;
|
|
8
|
-
protected readonly constraint: number;
|
|
9
|
-
private proportionInternal;
|
|
10
|
-
/**
|
|
11
|
-
* @param a First element
|
|
12
|
-
* @param b Second element
|
|
13
|
-
* @param options Proportion configuration
|
|
14
|
-
*/
|
|
15
|
-
constructor(a: UIPlaneElement, b: UIPlaneElement, options?: Partial<UIVerticalProportionConstraintOptions>);
|
|
16
|
-
/** Current proportion multiplier */
|
|
17
|
-
get proportion(): number;
|
|
18
|
-
/** Updates proportion multiplier */
|
|
19
|
-
set proportion(value: number);
|
|
20
|
-
/** Builds constraint expression for proportional relationship */
|
|
21
|
-
private buildRHS;
|
|
22
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
|
|
2
|
-
import { UISingleParameterConstraint } from "../UISingleParameterConstraint/UISingleParameterConstraint";
|
|
3
|
-
import type { UIWidthConstraintOptions } from "./UIWidthConstraint.Internal";
|
|
4
|
-
/** Fixes element width to constant value */
|
|
5
|
-
export declare class UIWidthConstraint extends UISingleParameterConstraint {
|
|
6
|
-
private readonly element;
|
|
7
|
-
/** Solver constraint descriptor */
|
|
8
|
-
protected readonly constraint: number;
|
|
9
|
-
/** Current width value */
|
|
10
|
-
private widthInternal;
|
|
11
|
-
/**
|
|
12
|
-
* @param element Element to constrain
|
|
13
|
-
* @param options Width configuration. Defaults to element's current width.
|
|
14
|
-
*/
|
|
15
|
-
constructor(element: UIPlaneElement & UILayerElement, options?: Partial<UIWidthConstraintOptions>);
|
|
16
|
-
/** Current width in world units */
|
|
17
|
-
get width(): number;
|
|
18
|
-
/** Updates width */
|
|
19
|
-
set width(value: number);
|
|
20
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { UIOrientation } from "../../miscellaneous/UIOrientation";
|
|
2
|
-
import type { UIPriority } from "../../miscellaneous/UIPriority";
|
|
3
|
-
import type { UIRelation } from "../../miscellaneous/UIRelation";
|
|
4
|
-
/** Horizontal and vertical values object */
|
|
5
|
-
export interface UIType2DObject<T> {
|
|
6
|
-
/** Horizontal value */
|
|
7
|
-
h?: T;
|
|
8
|
-
/** Vertical value */
|
|
9
|
-
v?: T;
|
|
10
|
-
}
|
|
11
|
-
/** Horizontal and vertical values as object, tuple, or single value */
|
|
12
|
-
export type UIType2D<T> = UIType2DObject<T> | [T, T] | T;
|
|
13
|
-
/**
|
|
14
|
-
* Normalizes UIType2D input to object form.
|
|
15
|
-
* @param value Object, tuple, or single value
|
|
16
|
-
* @returns Normalized object with h and v properties
|
|
17
|
-
*/
|
|
18
|
-
export declare function normalizeUIType2D<T>(value: UIType2D<T> | undefined): UIType2DObject<T>;
|
|
19
|
-
/** Base 2D constraint options */
|
|
20
|
-
export interface UIConstraint2DOptions {
|
|
21
|
-
/** Priority for each axis */
|
|
22
|
-
priority: UIType2D<UIPriority>;
|
|
23
|
-
/** Relation for each axis */
|
|
24
|
-
relation: UIType2D<UIRelation>;
|
|
25
|
-
/** Orientation for each axis */
|
|
26
|
-
orientation: UIType2D<UIOrientation>;
|
|
27
|
-
}
|
|
28
|
-
/** 2D size constraint options */
|
|
29
|
-
export interface UIConstraintSize2DOptions extends UIConstraint2DOptions {
|
|
30
|
-
/** Width and height */
|
|
31
|
-
size: UIType2D<number>;
|
|
32
|
-
}
|
|
33
|
-
/** 2D distance constraint options */
|
|
34
|
-
export interface UIConstraintDistance2DOptions extends UIConstraint2DOptions {
|
|
35
|
-
/** Anchor on element A for each axis */
|
|
36
|
-
anchorA: UIType2D<number>;
|
|
37
|
-
/** Anchor on element B for each axis */
|
|
38
|
-
anchorB: UIType2D<number>;
|
|
39
|
-
/** Distance for each axis */
|
|
40
|
-
distance: UIType2D<number>;
|
|
41
|
-
}
|
|
42
|
-
/** 2D proportion constraint options */
|
|
43
|
-
export interface UIConstraintProportion2DOptions extends UIConstraint2DOptions {
|
|
44
|
-
/** Proportion for each axis */
|
|
45
|
-
proportion: UIType2D<number>;
|
|
46
|
-
}
|
|
47
|
-
/** 2D interpolation constraint options */
|
|
48
|
-
export interface UIConstraintInterpolation2DOptions extends UIConstraint2DOptions {
|
|
49
|
-
/** Anchor on element A for each axis */
|
|
50
|
-
anchorA: UIType2D<number>;
|
|
51
|
-
/** Anchor on element B for each axis */
|
|
52
|
-
anchorB: UIType2D<number>;
|
|
53
|
-
/** Anchor on element C for each axis */
|
|
54
|
-
anchorC: UIType2D<number>;
|
|
55
|
-
/** Interpolation factor for each axis */
|
|
56
|
-
t: UIType2D<number>;
|
|
57
|
-
}
|
|
58
|
-
/** Horizontal and vertical constraint pair */
|
|
59
|
-
export interface UIConstraint2DResult<TH, TV> {
|
|
60
|
-
/** Horizontal constraint */
|
|
61
|
-
h: TH;
|
|
62
|
-
/** Vertical constraint */
|
|
63
|
-
v: TV;
|
|
64
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { UIElement } from "../../elements/UIElement/UIElement";
|
|
2
|
-
import type { UIPlaneElement, UIPointElement } from "../../miscellaneous/shared";
|
|
3
|
-
import { UIHeightConstraint } from "../UIHeightConstraint/UIHeightConstraint";
|
|
4
|
-
import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
|
|
5
|
-
import { UIHorizontalInterpolationConstraint } from "../UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint";
|
|
6
|
-
import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
|
|
7
|
-
import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
|
|
8
|
-
import { UIVerticalInterpolationConstraint } from "../UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint";
|
|
9
|
-
import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
|
|
10
|
-
import { UIWidthConstraint } from "../UIWidthConstraint/UIWidthConstraint";
|
|
11
|
-
import type { UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintInterpolation2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions } from "./UIConstraint2DBuilder.Internal";
|
|
12
|
-
/** Builder for paired horizontal and vertical constraints */
|
|
13
|
-
export declare class UIConstraint2DBuilder {
|
|
14
|
-
/**
|
|
15
|
-
* Creates width and height constraints.
|
|
16
|
-
* @param element Element to constrain
|
|
17
|
-
* @param options Size configuration for both axes
|
|
18
|
-
* @returns Width and height constraints
|
|
19
|
-
*/
|
|
20
|
-
static size(element: UIElement, options?: Partial<UIConstraintSize2DOptions>): UIConstraint2DResult<UIWidthConstraint, UIHeightConstraint>;
|
|
21
|
-
/**
|
|
22
|
-
* Creates horizontal and vertical distance constraints.
|
|
23
|
-
* @param a First element
|
|
24
|
-
* @param b Second element
|
|
25
|
-
* @param options Distance configuration for both axes
|
|
26
|
-
* @returns Horizontal and vertical distance constraints
|
|
27
|
-
*/
|
|
28
|
-
static distance(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, options?: Partial<UIConstraintDistance2DOptions>): UIConstraint2DResult<UIHorizontalDistanceConstraint, UIVerticalDistanceConstraint>;
|
|
29
|
-
/**
|
|
30
|
-
* Creates horizontal and vertical proportion constraints.
|
|
31
|
-
* @param a Element with proportional dimensions
|
|
32
|
-
* @param b Target element
|
|
33
|
-
* @param options Proportion configuration for both axes
|
|
34
|
-
* @returns Horizontal and vertical proportion constraints
|
|
35
|
-
*/
|
|
36
|
-
static proportion(a: UIPlaneElement, b: UIPlaneElement, options?: Partial<UIConstraintProportion2DOptions>): UIConstraint2DResult<UIHorizontalProportionConstraint, UIVerticalProportionConstraint>;
|
|
37
|
-
/**
|
|
38
|
-
* Creates horizontal and vertical interpolation constraints.
|
|
39
|
-
* @param a First element
|
|
40
|
-
* @param b Second element
|
|
41
|
-
* @param c Element to position between A and B
|
|
42
|
-
* @param options Interpolation configuration for both axes
|
|
43
|
-
* @returns Horizontal and vertical interpolation constraints
|
|
44
|
-
*/
|
|
45
|
-
static interpolation(a: UIPointElement | UIPlaneElement, b: UIPointElement | UIPlaneElement, c: UIPointElement | UIPlaneElement, options?: Partial<UIConstraintInterpolation2DOptions>): UIConstraint2DResult<UIHorizontalInterpolationConstraint, UIVerticalInterpolationConstraint>;
|
|
46
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { UIOrientation } from "../../miscellaneous/UIOrientation";
|
|
2
|
-
export declare const COVER_CONSTRAINT_DEFAULT_ANCHOR = 0.5;
|
|
3
|
-
/** Cover constraint builder options */
|
|
4
|
-
export interface UICoverConstraintBuilderOptions {
|
|
5
|
-
/** Whether to maintain active element aspect ratio */
|
|
6
|
-
keepActiveAspect: boolean;
|
|
7
|
-
/** Horizontal anchor (0 = left, 0.5 = center, 1 = right) */
|
|
8
|
-
anchorH: number;
|
|
9
|
-
/** Vertical anchor (0 = bottom, 0.5 = center, 1 = top) */
|
|
10
|
-
anchorV: number;
|
|
11
|
-
/** Orientation for constraints */
|
|
12
|
-
orientation: UIOrientation;
|
|
13
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
|
|
2
|
-
import { UIAspectConstraint } from "../UIAspectConstraint/UIAspectConstraint";
|
|
3
|
-
import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
|
|
4
|
-
import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
|
|
5
|
-
import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
|
|
6
|
-
import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
|
|
7
|
-
import type { UICoverConstraintBuilderOptions } from "./UICoverConstraintBuilder.Internal";
|
|
8
|
-
/** Builder for cover layout (like CSS object-fit: cover) */
|
|
9
|
-
export declare class UICoverConstraintBuilder {
|
|
10
|
-
/**
|
|
11
|
-
* Creates cover layout constraints.
|
|
12
|
-
* @param passive Container element
|
|
13
|
-
* @param active Content element that covers container
|
|
14
|
-
* @param options Cover configuration
|
|
15
|
-
* @returns Created constraints
|
|
16
|
-
*/
|
|
17
|
-
static build(passive: UIPlaneElement, active: UIPlaneElement & UILayerElement, options?: Partial<UICoverConstraintBuilderOptions>): {
|
|
18
|
-
/** Aspect constraint if keepActiveAspect is true */
|
|
19
|
-
activeAspectConstraint?: UIAspectConstraint;
|
|
20
|
-
/** Horizontal position constraint */
|
|
21
|
-
xConstraint: UIHorizontalDistanceConstraint;
|
|
22
|
-
/** Vertical position constraint */
|
|
23
|
-
yConstraint: UIVerticalDistanceConstraint;
|
|
24
|
-
/** Width constraint (ensures coverage) */
|
|
25
|
-
widthConstraint: UIHorizontalProportionConstraint;
|
|
26
|
-
/** Height constraint (ensures coverage) */
|
|
27
|
-
heightConstraint: UIVerticalProportionConstraint;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { UIOrientation } from "../../miscellaneous/UIOrientation";
|
|
2
|
-
export declare const DEFAULT_ANCHOR = 0.5;
|
|
3
|
-
/** Fit constraint builder options */
|
|
4
|
-
export interface UIFitConstraintBuilderOptions {
|
|
5
|
-
/** Whether to maintain active element aspect ratio */
|
|
6
|
-
keepActiveAspect: boolean;
|
|
7
|
-
/** Horizontal anchor (0 = left, 0.5 = center, 1 = right) */
|
|
8
|
-
anchorH: number;
|
|
9
|
-
/** Vertical anchor (0 = bottom, 0.5 = center, 1 = top) */
|
|
10
|
-
anchorV: number;
|
|
11
|
-
/** Orientation for constraints */
|
|
12
|
-
orientation: UIOrientation;
|
|
13
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { UILayerElement, UIPlaneElement } from "../../miscellaneous/shared";
|
|
2
|
-
import { UIAspectConstraint } from "../UIAspectConstraint/UIAspectConstraint";
|
|
3
|
-
import { UIHorizontalDistanceConstraint } from "../UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint";
|
|
4
|
-
import { UIHorizontalProportionConstraint } from "../UIHorizontalProportionConstraint/UIHorizontalProportionConstraint";
|
|
5
|
-
import { UIVerticalDistanceConstraint } from "../UIVerticalDistanceConstraint/UIVerticalDistanceConstraint";
|
|
6
|
-
import { UIVerticalProportionConstraint } from "../UIVerticalProportionConstraint/UIVerticalProportionConstraint";
|
|
7
|
-
import type { UIFitConstraintBuilderOptions } from "./UIFitConstraintBuilder.Internal";
|
|
8
|
-
/** Builder for fit layout (like CSS object-fit: contain) */
|
|
9
|
-
export declare class UIFitConstraintBuilder {
|
|
10
|
-
/**
|
|
11
|
-
* Creates fit layout constraints.
|
|
12
|
-
* @param passive Container element
|
|
13
|
-
* @param active Content element that fits within container
|
|
14
|
-
* @param options Fit configuration
|
|
15
|
-
* @returns Created constraints
|
|
16
|
-
*/
|
|
17
|
-
static build(passive: UIPlaneElement, active: UIPlaneElement & UILayerElement, options?: Partial<UIFitConstraintBuilderOptions>): {
|
|
18
|
-
/** Aspect constraint if keepActiveAspect is true */
|
|
19
|
-
activeAspectConstraint?: UIAspectConstraint;
|
|
20
|
-
/** Horizontal position constraint */
|
|
21
|
-
xConstraint: UIHorizontalDistanceConstraint;
|
|
22
|
-
/** Vertical position constraint */
|
|
23
|
-
yConstraint: UIVerticalDistanceConstraint;
|
|
24
|
-
/** Width constraint (ensures fitting) */
|
|
25
|
-
widthConstraint: UIHorizontalProportionConstraint;
|
|
26
|
-
/** Height constraint (ensures fitting) */
|
|
27
|
-
heightConstraint: UIVerticalProportionConstraint;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** Configuration options for UIAnchor */
|
|
2
|
-
export interface UIAnchorOptions {
|
|
3
|
-
/** X coordinate in world units */
|
|
4
|
-
x: number;
|
|
5
|
-
/** Y coordinate in world units */
|
|
6
|
-
y: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const ANCHOR_DEFAULT_X = 0;
|
|
9
|
-
export declare const ANCHOR_DEFAULT_Y = 0;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
2
|
-
import type { UILayerElement, UIPointElement } from "../../miscellaneous/shared";
|
|
3
|
-
import type { UISolverWrapperInterface } from "../../wrappers/UISolverWrapper/UISolverWrapper.Internal";
|
|
4
|
-
import type { UIAnchorOptions } from "./UIAnchor.Internal";
|
|
5
|
-
/** Point in 2D space with constraint-based positioning */
|
|
6
|
-
export declare class UIAnchor implements UILayerElement, UIPointElement {
|
|
7
|
-
readonly layer: UILayer;
|
|
8
|
-
/** Optional identifier for debugging */
|
|
9
|
-
name: string;
|
|
10
|
-
/** Solver variable for x coordinate */
|
|
11
|
-
readonly xVariable: number;
|
|
12
|
-
/** Solver variable for y coordinate */
|
|
13
|
-
readonly yVariable: number;
|
|
14
|
-
protected readonly solverWrapper: UISolverWrapperInterface;
|
|
15
|
-
/**
|
|
16
|
-
* Creates a new UIAnchor instance.
|
|
17
|
-
*
|
|
18
|
-
* @param layer - Layer containing this anchor
|
|
19
|
-
* @param options - Configuration options
|
|
20
|
-
*/
|
|
21
|
-
constructor(layer: UILayer, options?: Partial<UIAnchorOptions>);
|
|
22
|
-
/** X coordinate relative to layer origin (bottom-left) */
|
|
23
|
-
get x(): number;
|
|
24
|
-
/** Y coordinate relative to layer origin (bottom-left) */
|
|
25
|
-
get y(): number;
|
|
26
|
-
/** X coordinate relative to layer origin (bottom-left) */
|
|
27
|
-
set x(value: number);
|
|
28
|
-
/** Y coordinate relative to layer origin (bottom-left) */
|
|
29
|
-
set y(value: number);
|
|
30
|
-
/** Removes anchor and frees resources */
|
|
31
|
-
destroy(): void;
|
|
32
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
2
|
-
import type { UIElementOptions } from "../UIElement/UIElement.Internal";
|
|
3
|
-
/** Animation loop behavior */
|
|
4
|
-
export declare enum UIAnimatedImageLoopMode {
|
|
5
|
-
/** No looping, stops at boundary frame */
|
|
6
|
-
NONE = 0,
|
|
7
|
-
/** Loops back to opposite frame */
|
|
8
|
-
LOOP = 1,
|
|
9
|
-
/** Reverses direction at boundaries */
|
|
10
|
-
PING_PONG = 2
|
|
11
|
-
}
|
|
12
|
-
/** Configuration options for UIAnimatedImage */
|
|
13
|
-
export interface UIAnimatedImageOptions extends UIElementOptions {
|
|
14
|
-
/** Multiplicative tint */
|
|
15
|
-
color: UIColorConfig;
|
|
16
|
-
/** Animation speed in frames per second */
|
|
17
|
-
frameRate: number;
|
|
18
|
-
/** Playback speed multiplier. Can be negative for reverse playback. */
|
|
19
|
-
timeScale: number;
|
|
20
|
-
/** Loop behavior */
|
|
21
|
-
loopMode: UIAnimatedImageLoopMode;
|
|
22
|
-
/** Whether to start playing immediately */
|
|
23
|
-
playByDefault: boolean;
|
|
24
|
-
}
|
|
25
|
-
export declare const ANIMATED_IMAGE_DEFAULT_FRAME_RATE = 24;
|
|
26
|
-
export declare const ANIMATED_IMAGE_DEFAULT_TIME_SCALE = 1;
|
|
27
|
-
export declare const ANIMATED_IMAGE_DEFAULT_LOOP_MODE = UIAnimatedImageLoopMode.LOOP;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { FerrsignView0 } from "ferrsign";
|
|
2
|
-
import type { WebGLRenderer } from "three";
|
|
3
|
-
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
4
|
-
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
5
|
-
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
6
|
-
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
7
|
-
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
8
|
-
import { UIElement } from "../UIElement/UIElement";
|
|
9
|
-
import type { UIAnimatedImageOptions } from "./UIAnimatedImage.Internal";
|
|
10
|
-
import { UIAnimatedImageLoopMode } from "./UIAnimatedImage.Internal";
|
|
11
|
-
/** Frame-based texture animation element */
|
|
12
|
-
export declare class UIAnimatedImage extends UIElement {
|
|
13
|
-
private readonly colorInternal;
|
|
14
|
-
private readonly sequenceInternal;
|
|
15
|
-
private frameRateInternal;
|
|
16
|
-
private timeScaleInternal;
|
|
17
|
-
private loopModeInternal;
|
|
18
|
-
private readonly textureTransform;
|
|
19
|
-
private isPlaying;
|
|
20
|
-
private sequenceFrameIndex;
|
|
21
|
-
private currentFrameIndexDirty;
|
|
22
|
-
private accumulatedTime;
|
|
23
|
-
private readonly signalPlayedInternal;
|
|
24
|
-
private readonly signalPausedInternal;
|
|
25
|
-
private readonly signalStoppedInternal;
|
|
26
|
-
/**
|
|
27
|
-
* Creates a new UIAnimatedImage instance.
|
|
28
|
-
*
|
|
29
|
-
* Defaults size to first frame dimensions if width and height not provided.
|
|
30
|
-
*
|
|
31
|
-
* @param layer - Layer containing this element
|
|
32
|
-
* @param sequence - Array of textures forming animation
|
|
33
|
-
* @param options - Configuration options
|
|
34
|
-
*/
|
|
35
|
-
constructor(layer: UILayer, sequence: UITextureConfig[], options?: Partial<UIAnimatedImageOptions>);
|
|
36
|
-
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
37
|
-
get color(): UIColor;
|
|
38
|
-
/** Total animation duration in seconds */
|
|
39
|
-
get duration(): number;
|
|
40
|
-
/** Animation speed in frames per second */
|
|
41
|
-
get frameRate(): number;
|
|
42
|
-
/** Loop behavior */
|
|
43
|
-
get loopMode(): UIAnimatedImageLoopMode;
|
|
44
|
-
/** Animation frames as readonly array */
|
|
45
|
-
get sequence(): readonly UITextureView[];
|
|
46
|
-
/** Playback speed multiplier. Can be negative for reverse playback. */
|
|
47
|
-
get timeScale(): number;
|
|
48
|
-
/** Signal fired when animation starts or resumes */
|
|
49
|
-
get signalPlayed(): FerrsignView0;
|
|
50
|
-
/** Signal fired when animation pauses */
|
|
51
|
-
get signalPaused(): FerrsignView0;
|
|
52
|
-
/** Signal fired when animation stops and resets */
|
|
53
|
-
get signalStopped(): FerrsignView0;
|
|
54
|
-
/** Multiplicative tint. Alpha channel controls opacity. */
|
|
55
|
-
set color(value: UIColorConfig);
|
|
56
|
-
/** Animation speed in frames per second */
|
|
57
|
-
set frameRate(value: number);
|
|
58
|
-
/** Loop behavior */
|
|
59
|
-
set loopMode(value: UIAnimatedImageLoopMode);
|
|
60
|
-
/** Replaces animation frames. Stops playback. */
|
|
61
|
-
set sequence(sequence: UITextureConfig[]);
|
|
62
|
-
/** Playback speed multiplier. Can be negative for reverse playback. */
|
|
63
|
-
set timeScale(value: number);
|
|
64
|
-
/** Removes element and frees resources */
|
|
65
|
-
destroy(): void;
|
|
66
|
-
/** Starts or resumes animation playback */
|
|
67
|
-
play(): void;
|
|
68
|
-
/** Pauses animation at current frame */
|
|
69
|
-
pause(): void;
|
|
70
|
-
/** Stops animation and resets to first frame */
|
|
71
|
-
stop(): void;
|
|
72
|
-
protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
|
|
73
|
-
protected setPlaneTransform(): void;
|
|
74
|
-
private readonly onTextureDimensionsChanged;
|
|
75
|
-
private subscribeSequenceEvents;
|
|
76
|
-
private unsubscribeSequenceEvents;
|
|
77
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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: Partial<UIMicroConfig>;
|
|
8
|
-
/** Alpha blending mode */
|
|
9
|
-
transparencyMode: UITransparencyMode;
|
|
10
|
-
}
|
|
11
|
-
export declare const ELEMENT_DEFAULT_TRANSPARENCY_MODE = UITransparencyMode.BLEND;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { WebGLRenderer } from "three";
|
|
2
|
-
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
|
-
import type { UIProperty } 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/UISceneWrapper.Internal";
|
|
8
|
-
import { UIInputDummy } from "../UIInputDummy/UIInputDummy";
|
|
9
|
-
import type { UIElementOptions } from "./UIElement.Internal";
|
|
10
|
-
/** Base class for renderable UI elements */
|
|
11
|
-
export declare abstract class UIElement extends UIInputDummy {
|
|
12
|
-
/** Transforms that don't affect constraints */
|
|
13
|
-
readonly micro: UIMicro;
|
|
14
|
-
protected readonly sceneWrapper: UISceneWrapperInterface;
|
|
15
|
-
protected planeHandler: number;
|
|
16
|
-
private transparencyModeInternal;
|
|
17
|
-
private transparencyModeDirty;
|
|
18
|
-
private visibilityDirty;
|
|
19
|
-
/**
|
|
20
|
-
* Creates a new UIElement instance.
|
|
21
|
-
*
|
|
22
|
-
* @param layer - Layer containing this element
|
|
23
|
-
* @param source - GLSL shader source code
|
|
24
|
-
* @param properties - Shader uniform properties
|
|
25
|
-
* @param options - Configuration options
|
|
26
|
-
*/
|
|
27
|
-
constructor(layer: UILayer, source: string, properties: Record<string, UIProperty>, options?: Partial<UIElementOptions>);
|
|
28
|
-
/** Alpha blending mode */
|
|
29
|
-
get transparencyMode(): UITransparencyMode;
|
|
30
|
-
/** Alpha blending mode */
|
|
31
|
-
set transparencyMode(value: UITransparencyMode);
|
|
32
|
-
set mode(value: UIMode);
|
|
33
|
-
/** Removes element and frees resources */
|
|
34
|
-
destroy(): void;
|
|
35
|
-
protected setPlaneTransform(): void;
|
|
36
|
-
protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
|
|
37
|
-
private readonly handleWillRender;
|
|
38
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import type { WebGLRenderer } from "three";
|
|
2
|
-
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
3
|
-
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
4
|
-
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
5
|
-
import { UIElement } from "../UIElement/UIElement";
|
|
6
|
-
import type { UIGraphicsOptions } from "./UIGraphics.Internal";
|
|
7
|
-
/** Canvas-based 2D drawing element */
|
|
8
|
-
export declare class UIGraphics extends UIElement {
|
|
9
|
-
private readonly colorInternal;
|
|
10
|
-
private readonly canvas;
|
|
11
|
-
private readonly context;
|
|
12
|
-
private readonly texture;
|
|
13
|
-
/**
|
|
14
|
-
* Creates a new UIGraphics instance.
|
|
15
|
-
*
|
|
16
|
-
* @param layer - Layer containing this element
|
|
17
|
-
* @param options - Configuration options
|
|
18
|
-
*/
|
|
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);
|
|
24
|
-
/**
|
|
25
|
-
* Clears canvas. Optionally fills with color.
|
|
26
|
-
*
|
|
27
|
-
* @param color - Fill color after clearing
|
|
28
|
-
*/
|
|
29
|
-
clear(color?: UIColorConfig): this;
|
|
30
|
-
/** Draws filled rectangle */
|
|
31
|
-
drawRect(x: number, y: number, width: number, height: number, color: UIColorConfig): this;
|
|
32
|
-
/** Draws filled circle */
|
|
33
|
-
drawCircle(x: number, y: number, radius: number, color: UIColorConfig): this;
|
|
34
|
-
/**
|
|
35
|
-
* Draws filled arc.
|
|
36
|
-
*
|
|
37
|
-
* @param startAngle - Start angle in radians
|
|
38
|
-
* @param endAngle - End angle in radians
|
|
39
|
-
*/
|
|
40
|
-
drawArc(x: number, y: number, radius: number, startAngle: number, endAngle: number, color: UIColorConfig): this;
|
|
41
|
-
/**
|
|
42
|
-
* Draws connected line segments.
|
|
43
|
-
*
|
|
44
|
-
* @param points - Array of [x, y] pairs
|
|
45
|
-
* @param lineWidth - Line width in pixels
|
|
46
|
-
*/
|
|
47
|
-
drawPolyline(points: [number, number][], color: UIColor, lineWidth?: number): this;
|
|
48
|
-
/** Removes element and frees resources */
|
|
49
|
-
destroy(): void;
|
|
50
|
-
protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
|
|
51
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { UILayer } from "../../layers/UILayer/UILayer";
|
|
2
|
-
import { UIColor } from "../../miscellaneous/color/UIColor";
|
|
3
|
-
import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal";
|
|
4
|
-
import { UITextureView } from "../../miscellaneous/texture/UITextureView";
|
|
5
|
-
import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal";
|
|
6
|
-
import { UIElement } from "../UIElement/UIElement";
|
|
7
|
-
import type { UIImageOptions } from "./UIImage.Internal";
|
|
8
|
-
/** Textured image element */
|
|
9
|
-
export declare class UIImage extends UIElement {
|
|
10
|
-
/** Texture displayed by this image */
|
|
11
|
-
readonly texture: UITextureView;
|
|
12
|
-
private readonly colorInternal;
|
|
13
|
-
private readonly textureTransform;
|
|
14
|
-
/**
|
|
15
|
-
* Creates a new UIImage instance.
|
|
16
|
-
*
|
|
17
|
-
* Defaults size to texture dimensions if width and height not provided.
|
|
18
|
-
*
|
|
19
|
-
* @param layer - Layer containing this image
|
|
20
|
-
* @param texture - Texture to display
|
|
21
|
-
* @param options - Configuration options
|
|
22
|
-
*/
|
|
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);
|
|
28
|
-
/** Removes image and frees resources */
|
|
29
|
-
destroy(): void;
|
|
30
|
-
protected setPlaneTransform(): void;
|
|
31
|
-
private readonly onTextureDimensionsChanged;
|
|
32
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { UIArea } from "../../miscellaneous/area/UIArea";
|
|
2
|
-
import { UIMode } from "../../miscellaneous/UIMode";
|
|
3
|
-
import type { UIAnchorOptions } from "../UIAnchor/UIAnchor.Internal";
|
|
4
|
-
import type { UIInputDummy } from "./UIInputDummy";
|
|
5
|
-
/** Input event data */
|
|
6
|
-
export interface UIInputEventData {
|
|
7
|
-
/** X coordinate */
|
|
8
|
-
x: number;
|
|
9
|
-
/** Y coordinate */
|
|
10
|
-
y: number;
|
|
11
|
-
/** Pointer identifier */
|
|
12
|
-
identifier: number;
|
|
13
|
-
/** Element that emitted the event */
|
|
14
|
-
element: UIInputDummy;
|
|
15
|
-
}
|
|
16
|
-
/** Configuration options for UIInputDummy */
|
|
17
|
-
export interface UIInputDummyOptions extends UIAnchorOptions {
|
|
18
|
-
/** Width in world units */
|
|
19
|
-
width: number;
|
|
20
|
-
/** Height in world units */
|
|
21
|
-
height: number;
|
|
22
|
-
/** Shape defining interactive region in element-local space (0,0 = bottom-left, 1,1 = top-right) */
|
|
23
|
-
interactionArea: UIArea;
|
|
24
|
-
/** Controls visibility and interactivity */
|
|
25
|
-
mode: UIMode;
|
|
26
|
-
}
|
|
27
|
-
export declare const DUMMY_DEFAULT_WIDTH = 64;
|
|
28
|
-
export declare const DUMMY_DEFAULT_HEIGHT = 32;
|
|
29
|
-
export declare const DUMMY_DEFAULT_MODE = UIMode.VISIBLE;
|
|
30
|
-
export declare const DUMMY_DEFAULT_Z_INDEX = 0;
|