laymur 0.16.0 → 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/{dist/elements/UIElement/UIElement.Internal.d.ts → src/core/elements/UIElement/UIElement.Internal.ts} +7 -5
- 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/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/UIDummy/UIDummy.Internal.d.ts +0 -30
- package/dist/elements/UIDummy/UIDummy.d.ts +0 -82
- 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/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 -9246
- 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
- /package/{dist/index.d.ts → src/core/index.ts} +0 -0
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import { Color, Vector4 } from "three";
|
|
2
|
-
import type { UIColorConfig, UIColorName } from "./UIColor.Internal";
|
|
3
|
-
/** RGBA color with RGB, HSL, hex, and named color support */
|
|
4
|
-
export declare class UIColor {
|
|
5
|
-
private rInternal;
|
|
6
|
-
private gInternal;
|
|
7
|
-
private bInternal;
|
|
8
|
-
private aInternal;
|
|
9
|
-
private hInternal;
|
|
10
|
-
private sInternal;
|
|
11
|
-
private lInternal;
|
|
12
|
-
private dirtyInternal;
|
|
13
|
-
private rgbDirty;
|
|
14
|
-
private hslDirty;
|
|
15
|
-
constructor();
|
|
16
|
-
/**
|
|
17
|
-
* @param r - Red (0-1)
|
|
18
|
-
* @param g - Green (0-1)
|
|
19
|
-
* @param b - Blue (0-1)
|
|
20
|
-
* @param a - Alpha (0-1)
|
|
21
|
-
*/
|
|
22
|
-
constructor(r: number, g: number, b: number, a?: number);
|
|
23
|
-
/**
|
|
24
|
-
* @param colorName - Named color
|
|
25
|
-
* @param a - Alpha (0-1)
|
|
26
|
-
*/
|
|
27
|
-
constructor(colorName: UIColorName, a?: number);
|
|
28
|
-
/**
|
|
29
|
-
* @param threeColor - Three.js Color object
|
|
30
|
-
* @param a - Alpha (0-1)
|
|
31
|
-
*/
|
|
32
|
-
constructor(threeColor: Color, a?: number);
|
|
33
|
-
/**
|
|
34
|
-
* @param hexRGB - Hex RGB value (e.g., 0xff0000)
|
|
35
|
-
* @param a - Alpha (0-1)
|
|
36
|
-
*/
|
|
37
|
-
constructor(hexRGB: number, a?: number);
|
|
38
|
-
/**
|
|
39
|
-
* @param hexString - Hex string (e.g., "#ffffff" or "#ffffffff")
|
|
40
|
-
*/
|
|
41
|
-
constructor(hexString?: string);
|
|
42
|
-
/**
|
|
43
|
-
* @param uiColor - UIColor object to copy from
|
|
44
|
-
*/
|
|
45
|
-
constructor(uiColor?: UIColor);
|
|
46
|
-
/**
|
|
47
|
-
* @param uiColorConfig - UIColorConfig object
|
|
48
|
-
*/
|
|
49
|
-
constructor(uiColorConfig?: UIColorConfig);
|
|
50
|
-
/** Black (0x000000) */
|
|
51
|
-
static get black(): UIColor;
|
|
52
|
-
/** White (0xffffff) */
|
|
53
|
-
static get white(): UIColor;
|
|
54
|
-
/** Red (0xff0000) */
|
|
55
|
-
static get red(): UIColor;
|
|
56
|
-
/** Green (0x008000) */
|
|
57
|
-
static get green(): UIColor;
|
|
58
|
-
/** Blue (0x0000ff) */
|
|
59
|
-
static get blue(): UIColor;
|
|
60
|
-
/** Yellow (0xffff00) */
|
|
61
|
-
static get yellow(): UIColor;
|
|
62
|
-
/** Cyan (0x00ffff) */
|
|
63
|
-
static get cyan(): UIColor;
|
|
64
|
-
/** Magenta (0xff00ff) */
|
|
65
|
-
static get magenta(): UIColor;
|
|
66
|
-
/** Gray (0x808080) */
|
|
67
|
-
static get gray(): UIColor;
|
|
68
|
-
/** Grey (0x808080) */
|
|
69
|
-
static get grey(): UIColor;
|
|
70
|
-
/** Silver (0xc0c0c0) */
|
|
71
|
-
static get silver(): UIColor;
|
|
72
|
-
/** Maroon (0x800000) */
|
|
73
|
-
static get maroon(): UIColor;
|
|
74
|
-
/** Olive (0x808000) */
|
|
75
|
-
static get olive(): UIColor;
|
|
76
|
-
/** Lime (0x00ff00) */
|
|
77
|
-
static get lime(): UIColor;
|
|
78
|
-
/** Aqua (0x00ffff) */
|
|
79
|
-
static get aqua(): UIColor;
|
|
80
|
-
/** Teal (0x008080) */
|
|
81
|
-
static get teal(): UIColor;
|
|
82
|
-
/** Navy (0x000080) */
|
|
83
|
-
static get navy(): UIColor;
|
|
84
|
-
/** Fuchsia (0xff00ff) */
|
|
85
|
-
static get fuchsia(): UIColor;
|
|
86
|
-
/** Purple (0x800080) */
|
|
87
|
-
static get purple(): UIColor;
|
|
88
|
-
/** Orange (0xffa500) */
|
|
89
|
-
static get orange(): UIColor;
|
|
90
|
-
/** Pink (0xffc0cb) */
|
|
91
|
-
static get pink(): UIColor;
|
|
92
|
-
/** Brown (0xa52a2a) */
|
|
93
|
-
static get brown(): UIColor;
|
|
94
|
-
/** Gold (0xffd700) */
|
|
95
|
-
static get gold(): UIColor;
|
|
96
|
-
/** Violet (0xee82ee) */
|
|
97
|
-
static get violet(): UIColor;
|
|
98
|
-
/** Indigo (0x4b0082) */
|
|
99
|
-
static get indigo(): UIColor;
|
|
100
|
-
/** Coral (0xff7f50) */
|
|
101
|
-
static get coral(): UIColor;
|
|
102
|
-
/** Salmon (0xfa8072) */
|
|
103
|
-
static get salmon(): UIColor;
|
|
104
|
-
/** Khaki (0xf0e68c) */
|
|
105
|
-
static get khaki(): UIColor;
|
|
106
|
-
/** Plum (0xdda0dd) */
|
|
107
|
-
static get plum(): UIColor;
|
|
108
|
-
/** Orchid (0xda70d6) */
|
|
109
|
-
static get orchid(): UIColor;
|
|
110
|
-
/** Tan (0xd2b48c) */
|
|
111
|
-
static get tan(): UIColor;
|
|
112
|
-
/** Beige (0xf5f5dc) */
|
|
113
|
-
static get beige(): UIColor;
|
|
114
|
-
/** Mint (0x98fb98) */
|
|
115
|
-
static get mint(): UIColor;
|
|
116
|
-
/** Lavender (0xe6e6fa) */
|
|
117
|
-
static get lavender(): UIColor;
|
|
118
|
-
/** Crimson (0xdc143c) */
|
|
119
|
-
static get crimson(): UIColor;
|
|
120
|
-
/** Azure (0xf0ffff) */
|
|
121
|
-
static get azure(): UIColor;
|
|
122
|
-
/** Ivory (0xfffff0) */
|
|
123
|
-
static get ivory(): UIColor;
|
|
124
|
-
/** Snow (0xfffafa) */
|
|
125
|
-
static get snow(): UIColor;
|
|
126
|
-
/** Red component (0 to 1) */
|
|
127
|
-
get r(): number;
|
|
128
|
-
/** Green component (0 to 1) */
|
|
129
|
-
get g(): number;
|
|
130
|
-
/** Blue component (0 to 1) */
|
|
131
|
-
get b(): number;
|
|
132
|
-
/** Alpha component (0 to 1) */
|
|
133
|
-
get a(): number;
|
|
134
|
-
/** Hue component (0 to 360) */
|
|
135
|
-
get hue(): number;
|
|
136
|
-
/** Saturation component (0 to 1) */
|
|
137
|
-
get saturation(): number;
|
|
138
|
-
/** Lightness component (0 to 1) */
|
|
139
|
-
get lightness(): number;
|
|
140
|
-
/** Red component (0 to 1) */
|
|
141
|
-
set r(value: number);
|
|
142
|
-
/** Green component (0 to 1) */
|
|
143
|
-
set g(value: number);
|
|
144
|
-
/** Blue component (0 to 1) */
|
|
145
|
-
set b(value: number);
|
|
146
|
-
/** Alpha component (0 to 1) */
|
|
147
|
-
set a(value: number);
|
|
148
|
-
/** Hue component (0 to 360) */
|
|
149
|
-
set hue(value: number);
|
|
150
|
-
/** Saturation component (0 to 1) */
|
|
151
|
-
set saturation(value: number);
|
|
152
|
-
/** Lightness component (0 to 1) */
|
|
153
|
-
set lightness(value: number);
|
|
154
|
-
/** Sets to white (default) */
|
|
155
|
-
set(): this;
|
|
156
|
-
/**
|
|
157
|
-
* @param r - Red (0-1)
|
|
158
|
-
* @param g - Green (0-1)
|
|
159
|
-
* @param b - Blue (0-1)
|
|
160
|
-
* @param a - Alpha (0-1)
|
|
161
|
-
*/
|
|
162
|
-
set(r: number, g: number, b: number, a?: number): this;
|
|
163
|
-
/**
|
|
164
|
-
* @param colorName - Named color
|
|
165
|
-
* @param a - Alpha (0-1)
|
|
166
|
-
*/
|
|
167
|
-
set(colorName: UIColorName, a?: number): this;
|
|
168
|
-
/**
|
|
169
|
-
* @param threeColor - Three.js Color object
|
|
170
|
-
* @param a - Alpha (0-1)
|
|
171
|
-
*/
|
|
172
|
-
set(threeColor: Color, a?: number): this;
|
|
173
|
-
/**
|
|
174
|
-
* @param hexRGB - Hex RGB value (e.g., 0xff0000)
|
|
175
|
-
* @param a - Alpha (0-1)
|
|
176
|
-
*/
|
|
177
|
-
set(hexRGB: number, a?: number): this;
|
|
178
|
-
/**
|
|
179
|
-
* @param hexString - Hex string (e.g., "#ffffff" or "#ffffffff")
|
|
180
|
-
*/
|
|
181
|
-
set(hexString: string): this;
|
|
182
|
-
/**
|
|
183
|
-
* @param uiColor - UIColor object to copy from
|
|
184
|
-
*/
|
|
185
|
-
set(uiColor: UIColor): this;
|
|
186
|
-
/**
|
|
187
|
-
* @param uiColorConfig - UIColorConfig object
|
|
188
|
-
*/
|
|
189
|
-
set(uiColorConfig?: UIColorConfig): this;
|
|
190
|
-
/** Sets RGBA components directly */
|
|
191
|
-
setRGBA(r: number, g: number, b: number, a?: number): this;
|
|
192
|
-
/** Returns RGBA as 32-bit hex (RRGGBBAA) */
|
|
193
|
-
getHexRGBA(): number;
|
|
194
|
-
/** Returns RGB as 24-bit hex (RRGGBB) */
|
|
195
|
-
getHexRGB(): number;
|
|
196
|
-
/** Returns RGB as hex string ("#ffffff") */
|
|
197
|
-
getHexStringRGB(): string;
|
|
198
|
-
/** Returns RGBA as hex string ("#ffffffff") */
|
|
199
|
-
getHexStringRGBA(): string;
|
|
200
|
-
/** Sets from 32-bit hex RGBA (RRGGBBAA) */
|
|
201
|
-
setHexRGBA(hex: number): this;
|
|
202
|
-
/** Sets from 24-bit hex RGB (RRGGBB) */
|
|
203
|
-
setHexRGB(hex: number, a?: number): this;
|
|
204
|
-
/**
|
|
205
|
-
* Sets from hex string.
|
|
206
|
-
*
|
|
207
|
-
* @param hexString - Format: "#ffffff" or "#ffffffff"
|
|
208
|
-
* @throws If format invalid
|
|
209
|
-
*/
|
|
210
|
-
setHexString(hexString: string): this;
|
|
211
|
-
/** Sets from HSL values */
|
|
212
|
-
setHSL(h: number, s: number, l: number, a?: number): this;
|
|
213
|
-
/**
|
|
214
|
-
* Sets from predefined name.
|
|
215
|
-
*
|
|
216
|
-
* @throws If color name unknown
|
|
217
|
-
*/
|
|
218
|
-
setColorName(colorName: UIColorName, a?: number): this;
|
|
219
|
-
/** Sets from linear (GLSL) color space */
|
|
220
|
-
setGLSLColor(r: number, g: number, b: number, a?: number): this;
|
|
221
|
-
/** Sets from Three.js Color */
|
|
222
|
-
setThreeColor(threeColor: Color, a?: number): this;
|
|
223
|
-
/** Returns CSS color string ("rgba(255, 0, 0, 1)") */
|
|
224
|
-
toCSSColor(): string;
|
|
225
|
-
/** Converts to linear (GLSL) color space */
|
|
226
|
-
toGLSLColor(result?: Vector4): Vector4;
|
|
227
|
-
/** Converts to Three.js Color (without alpha) */
|
|
228
|
-
toThreeColor(result?: Color): Color;
|
|
229
|
-
/** Copies from another color */
|
|
230
|
-
copy(color: UIColor | Color): this;
|
|
231
|
-
/** Returns copy of this color */
|
|
232
|
-
clone(): UIColor;
|
|
233
|
-
private ensureHSLUpdatedFromRGB;
|
|
234
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Matrix4 } from "three";
|
|
2
|
-
import { UIMicroAnchorMode } from "../miscellaneous/micro/UIMicro.Internal";
|
|
3
|
-
/**
|
|
4
|
-
* Computes element transform matrix.
|
|
5
|
-
* @returns Transform matrix (reused, do not store reference)
|
|
6
|
-
*/
|
|
7
|
-
export declare function computeTransformMatrix(x: number, y: number, width: number, height: number, zIndex: number, microX: number, microY: number, microAnchorX: number, microAnchorY: number, microScaleX: number, microScaleY: number, microRotation: number, microAnchorMode: UIMicroAnchorMode): Matrix4;
|
|
8
|
-
/**
|
|
9
|
-
* Computes transform matrix for trimmed sprite.
|
|
10
|
-
* @param width Source width including trimmed areas
|
|
11
|
-
* @param height Source height including trimmed areas
|
|
12
|
-
* @param trimLeft Pixels trimmed from left
|
|
13
|
-
* @param trimRight Pixels trimmed from right
|
|
14
|
-
* @param trimTop Pixels trimmed from top
|
|
15
|
-
* @param trimBottom Pixels trimmed from bottom
|
|
16
|
-
* @returns Transform matrix (reused, do not store reference)
|
|
17
|
-
*/
|
|
18
|
-
export declare function computeTrimmedTransformMatrix(x: number, y: number, width: number, height: number, zIndex: number, microX: number, microY: number, microAnchorX: number, microAnchorY: number, microScaleX: number, microScaleY: number, microRotation: number, microAnchorMode: UIMicroAnchorMode, trimLeft: number, trimRight: number, trimTop: number, trimBottom: number): Matrix4;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { InstancedBufferAttribute, InstancedBufferGeometry, ShaderMaterial } from "three";
|
|
2
|
-
import { UITransparencyMode } from "../../UITransparencyMode";
|
|
3
|
-
import type { GLProperty, UIProperty } from "../shared";
|
|
4
|
-
export declare const INSTANCED_PLANE_GEOMETRY: InstancedBufferGeometry;
|
|
5
|
-
export declare const CAPACITY_STEP = 4;
|
|
6
|
-
export declare const INITIAL_CAPACITY = 1;
|
|
7
|
-
export declare function writePropertyToArray(value: UIProperty, array: Float32Array, offset: number): void;
|
|
8
|
-
export declare function buildEmptyInstancedBufferAttribute(value: UIProperty, capacity: number): InstancedBufferAttribute;
|
|
9
|
-
export declare function buildMaterial(source: string, uniformProperties: Record<string, GLProperty>, varyingProperties: Record<string, GLProperty>, transparency: UITransparencyMode): ShaderMaterial;
|
|
10
|
-
export declare function reconstructValue(referenceValue: UIProperty, array: Float32Array, offset: number): UIProperty;
|
|
11
|
-
/**
|
|
12
|
-
* Shift buffer region within the same array.
|
|
13
|
-
* Uses copyWithin for efficient memory moves with correct overlap handling.
|
|
14
|
-
*/
|
|
15
|
-
export declare function shiftBufferRegion(array: Float32Array, itemSize: number, fromIndex: number, count: number, delta: number): void;
|
|
16
|
-
/**
|
|
17
|
-
* Copy data between two different buffers.
|
|
18
|
-
*/
|
|
19
|
-
export declare function copyBetweenBuffers(src: Float32Array, srcOffset: number, dst: Float32Array, dstOffset: number, length: number): void;
|
package/dist/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { IUniform, ShaderMaterial } from "three";
|
|
2
|
-
import { Matrix3, Matrix4, Texture, Vector2, Vector3, Vector4 } from "three";
|
|
3
|
-
import type { UITransparencyMode } from "../UITransparencyMode";
|
|
4
|
-
import { UIColor } from "../color/UIColor";
|
|
5
|
-
export type UIProperty = Texture | UIColor | Vector2 | Vector3 | Vector4 | Matrix3 | Matrix4 | number;
|
|
6
|
-
export type UIPropertyName = "Texture" | "UIColor" | "Vector2" | "Vector3" | "Vector4" | "Matrix3" | "Matrix4" | "number";
|
|
7
|
-
export type UIPropertyConstructor = typeof Texture | typeof UIColor | typeof Vector2 | typeof Vector3 | typeof Vector4 | typeof Matrix3 | typeof Matrix4 | NumberConstructor;
|
|
8
|
-
export type UIPropertyCopyTo = UIColor | Vector2 | Vector3 | Vector4 | Matrix3 | Matrix4;
|
|
9
|
-
export type UIPropertyCopyFrom = UIColor & Vector2 & Vector3 & Vector4 & Matrix3 & Matrix4;
|
|
10
|
-
export interface GLTypeInfo {
|
|
11
|
-
glslTypeName: string;
|
|
12
|
-
bufferSize: number;
|
|
13
|
-
instantiable: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface GLProperty {
|
|
16
|
-
value: UIProperty;
|
|
17
|
-
glslTypeInfo: GLTypeInfo;
|
|
18
|
-
}
|
|
19
|
-
export interface PlaneData {
|
|
20
|
-
source: string;
|
|
21
|
-
properties: Record<string, GLProperty>;
|
|
22
|
-
transform: Matrix4;
|
|
23
|
-
visibility: boolean;
|
|
24
|
-
transparency: UITransparencyMode;
|
|
25
|
-
}
|
|
26
|
-
export declare const DEFAULT_ALPHA_TEST = 0.5;
|
|
27
|
-
export declare function resolveGLSLTypeInfo(value: UIProperty | UIPropertyName | UIPropertyConstructor): GLTypeInfo;
|
|
28
|
-
export declare function resolvePropertyUniform(name: string, material: ShaderMaterial): IUniform<UIProperty>;
|
|
29
|
-
export declare function arePropertiesPartiallyCompatible(full: Readonly<Record<string, Readonly<GLProperty>>>, partial: Readonly<Record<string, Readonly<GLProperty>>>): boolean;
|
|
30
|
-
export declare function convertUIPropertiesToGLProperties(uiProperties: Record<string, UIProperty>): Record<string, GLProperty>;
|
|
31
|
-
export declare function cloneProperty<T extends UIProperty>(property: T): T;
|
|
32
|
-
export declare function cloneProperties(properties: Record<string, UIProperty>): Record<string, UIProperty>;
|
|
33
|
-
export declare function cloneGLProperties(properties: Record<string, GLProperty>): Record<string, GLProperty>;
|
|
34
|
-
/** Extracts zIndex from transform matrix (translation.z component) */
|
|
35
|
-
export declare function extractZIndex(transform: Matrix4): number;
|
|
36
|
-
/** Extracts zIndex from transform buffer at given instance index */
|
|
37
|
-
export declare function extractZIndexFromBuffer(buffer: Float32Array, instanceIndex: number): number;
|
|
38
|
-
export declare function buildGenericPlaneFragmentShader(uniformDeclarations: string[], varyingDeclarations: string[], source: string): string;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/** Insets configuration as number, per-side, or per-axis */
|
|
2
|
-
export type UIInsetsConfig = {
|
|
3
|
-
horizontal: number;
|
|
4
|
-
vertical: number;
|
|
5
|
-
} | {
|
|
6
|
-
left: number;
|
|
7
|
-
right: number;
|
|
8
|
-
top: number;
|
|
9
|
-
bottom: number;
|
|
10
|
-
} | [number, number, number, number] | [number, number] | number;
|
|
11
|
-
export declare const INSETS_DEFAULT_VALUE = 0;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Vector4 } from "three";
|
|
2
|
-
import type { UIInsetsConfig } from "./UIInsets.Internal";
|
|
3
|
-
/** Insets values for four sides */
|
|
4
|
-
export declare class UIInsets {
|
|
5
|
-
private lInternal;
|
|
6
|
-
private rInternal;
|
|
7
|
-
private tInternal;
|
|
8
|
-
private bInternal;
|
|
9
|
-
private dirtyInternal;
|
|
10
|
-
/**
|
|
11
|
-
* Creates UIInsets instance.
|
|
12
|
-
*
|
|
13
|
-
* @param config - Insets configuration
|
|
14
|
-
*/
|
|
15
|
-
constructor(config?: UIInsetsConfig);
|
|
16
|
-
/** Left inset */
|
|
17
|
-
get left(): number;
|
|
18
|
-
/** Right inset */
|
|
19
|
-
get right(): number;
|
|
20
|
-
/** Top inset */
|
|
21
|
-
get top(): number;
|
|
22
|
-
/** Bottom inset */
|
|
23
|
-
get bottom(): number;
|
|
24
|
-
/** Left inset */
|
|
25
|
-
set left(value: number);
|
|
26
|
-
/** Right inset */
|
|
27
|
-
set right(value: number);
|
|
28
|
-
/** Top inset */
|
|
29
|
-
set top(value: number);
|
|
30
|
-
/** Bottom inset */
|
|
31
|
-
set bottom(value: number);
|
|
32
|
-
/** Sets left and right to same value */
|
|
33
|
-
setHorizontal(value: number): void;
|
|
34
|
-
/** Sets top and bottom to same value */
|
|
35
|
-
setVertical(value: number): void;
|
|
36
|
-
/** Sets all sides to same value */
|
|
37
|
-
setUnified(value: number): void;
|
|
38
|
-
/** Sets insets */
|
|
39
|
-
set(config?: UIInsetsConfig): void;
|
|
40
|
-
/** Sets from Vector4 (x=left, y=right, z=top, w=bottom) */
|
|
41
|
-
setVector4(vector: Vector4): void;
|
|
42
|
-
/** Converts to Vector4 (left, right, top, bottom) */
|
|
43
|
-
toVector4(result?: Vector4): Vector4;
|
|
44
|
-
/** Resets all sides to 0 */
|
|
45
|
-
reset(): void;
|
|
46
|
-
/** Copies from another instance */
|
|
47
|
-
copy(other: UIInsets): void;
|
|
48
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/** Base class for progress bar fill functions */
|
|
2
|
-
export declare abstract class UIProgressMaskFunction {
|
|
3
|
-
/** GLSL shader source code defining fill behavior */
|
|
4
|
-
readonly source: string;
|
|
5
|
-
protected dirtyInternal: boolean;
|
|
6
|
-
protected constructor(
|
|
7
|
-
/** GLSL shader source code defining fill behavior */
|
|
8
|
-
source: string);
|
|
9
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { UIProgressMaskFunction } from "./UIProgressMaskFunction";
|
|
2
|
-
/** Circular radial progress fill */
|
|
3
|
-
export declare class UIProgressMaskFunctionCircular extends UIProgressMaskFunction {
|
|
4
|
-
private startAngleInternal;
|
|
5
|
-
private inverseDirectionInternal;
|
|
6
|
-
/**
|
|
7
|
-
* Creates circular mask function.
|
|
8
|
-
*
|
|
9
|
-
* @param startAngle - Starting angle in radians
|
|
10
|
-
* @param inverseDirection - Whether to fill counter-clockwise
|
|
11
|
-
*/
|
|
12
|
-
constructor(startAngle?: number, inverseDirection?: boolean);
|
|
13
|
-
/** Starting angle in radians */
|
|
14
|
-
get startAngle(): number;
|
|
15
|
-
/** Whether fill is counter-clockwise */
|
|
16
|
-
get inverseDirection(): boolean;
|
|
17
|
-
/** Starting angle in radians */
|
|
18
|
-
set startAngle(value: number);
|
|
19
|
-
/** Whether fill is counter-clockwise */
|
|
20
|
-
set inverseDirection(value: boolean);
|
|
21
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Vector2 } from "three";
|
|
2
|
-
import type { Vector2Like } from "../math";
|
|
3
|
-
import { UIProgressMaskFunction } from "./UIProgressMaskFunction";
|
|
4
|
-
/** Linear directional progress fill */
|
|
5
|
-
export declare class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
|
|
6
|
-
/** Fill direction as normalized vector */
|
|
7
|
-
readonly direction: Vector2;
|
|
8
|
-
private readonly cachedDirection;
|
|
9
|
-
/**
|
|
10
|
-
* Creates directional mask function.
|
|
11
|
-
*
|
|
12
|
-
* @param direction - Fill direction vector. Automatically normalized.
|
|
13
|
-
*/
|
|
14
|
-
constructor(direction?: Vector2Like);
|
|
15
|
-
private ensureDirectionNormalized;
|
|
16
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/** Controls which transforms apply relative to anchor */
|
|
2
|
-
export declare enum UIMicroAnchorMode {
|
|
3
|
-
/** Apply rotation and scale around anchor point */
|
|
4
|
-
ROTATION_SCALE = 0,
|
|
5
|
-
/** Apply position, rotation, and scale around anchor point */
|
|
6
|
-
POSITION_ROTATION_SCALE = 1
|
|
7
|
-
}
|
|
8
|
-
/** Configuration options for UIMicro */
|
|
9
|
-
export interface UIMicroConfig {
|
|
10
|
-
/** X offset in world units */
|
|
11
|
-
x: number;
|
|
12
|
-
/** Y offset in world units */
|
|
13
|
-
y: number;
|
|
14
|
-
/** X anchor in normalized coordinates (0 to 1) */
|
|
15
|
-
anchorX: number;
|
|
16
|
-
/** Y anchor in normalized coordinates (0 to 1) */
|
|
17
|
-
anchorY: number;
|
|
18
|
-
/** X scale multiplier */
|
|
19
|
-
scaleX: number;
|
|
20
|
-
/** Y scale multiplier */
|
|
21
|
-
scaleY: number;
|
|
22
|
-
/** Rotation in radians */
|
|
23
|
-
rotation: number;
|
|
24
|
-
/** Which transforms apply relative to anchor */
|
|
25
|
-
anchorMode: UIMicroAnchorMode;
|
|
26
|
-
}
|
|
27
|
-
export declare const MICRO_DEFAULT_POSITION = 0;
|
|
28
|
-
export declare const MICRO_DEFAULT_ANCHOR = 0.5;
|
|
29
|
-
export declare const MICRO_DEFAULT_SCALE = 1;
|
|
30
|
-
export declare const MICRO_DEFAULT_ROTATION = 0;
|
|
31
|
-
export declare const MICRO_DEFAULT_ANCHOR_MODE = UIMicroAnchorMode.ROTATION_SCALE;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import type { UIMicroAnchorMode, UIMicroConfig } from "./UIMicro.Internal";
|
|
2
|
-
/** Transforms that don't affect constraints */
|
|
3
|
-
export declare class UIMicro {
|
|
4
|
-
private xInternal;
|
|
5
|
-
private yInternal;
|
|
6
|
-
private anchorXInternal;
|
|
7
|
-
private anchorYInternal;
|
|
8
|
-
private scaleXInternal;
|
|
9
|
-
private scaleYInternal;
|
|
10
|
-
private rotationInternal;
|
|
11
|
-
private anchorModeInternal;
|
|
12
|
-
private dirtyInternal;
|
|
13
|
-
/**
|
|
14
|
-
* Creates UIMicro instance.
|
|
15
|
-
*
|
|
16
|
-
* @param config - Transform configuration
|
|
17
|
-
*/
|
|
18
|
-
constructor(config?: Partial<UIMicroConfig>);
|
|
19
|
-
/** X offset in world units */
|
|
20
|
-
get x(): number;
|
|
21
|
-
/** Y offset in world units */
|
|
22
|
-
get y(): number;
|
|
23
|
-
/** X anchor in normalized coordinates (0 to 1) */
|
|
24
|
-
get anchorX(): number;
|
|
25
|
-
/** Y anchor in normalized coordinates (0 to 1) */
|
|
26
|
-
get anchorY(): number;
|
|
27
|
-
/** X scale multiplier */
|
|
28
|
-
get scaleX(): number;
|
|
29
|
-
/** Y scale multiplier */
|
|
30
|
-
get scaleY(): number;
|
|
31
|
-
/** Rotation in degrees */
|
|
32
|
-
get angle(): number;
|
|
33
|
-
/** Which transforms apply relative to anchor */
|
|
34
|
-
get anchorMode(): UIMicroAnchorMode;
|
|
35
|
-
/** Rotation in radians */
|
|
36
|
-
get rotation(): number;
|
|
37
|
-
/** X offset in world units */
|
|
38
|
-
set x(value: number);
|
|
39
|
-
/** Y offset in world units */
|
|
40
|
-
set y(value: number);
|
|
41
|
-
/** X anchor in normalized coordinates (0 to 1) */
|
|
42
|
-
set anchorX(value: number);
|
|
43
|
-
/** Y anchor in normalized coordinates (0 to 1) */
|
|
44
|
-
set anchorY(value: number);
|
|
45
|
-
/** X scale multiplier */
|
|
46
|
-
set scaleX(value: number);
|
|
47
|
-
/** Y scale multiplier */
|
|
48
|
-
set scaleY(value: number);
|
|
49
|
-
/** Rotation in degrees */
|
|
50
|
-
set angle(value: number);
|
|
51
|
-
/** Rotation in radians */
|
|
52
|
-
set rotation(value: number);
|
|
53
|
-
/** Which transforms apply relative to anchor */
|
|
54
|
-
set anchorMode(value: UIMicroAnchorMode);
|
|
55
|
-
/** Resets all transforms to defaults */
|
|
56
|
-
reset(): void;
|
|
57
|
-
/** Copies transforms from another instance */
|
|
58
|
-
copy(value: UIMicro): void;
|
|
59
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
-
/** Scales area to cover rect preserving proportions */
|
|
3
|
-
export declare class UIResizePolicyCover extends UIResizePolicy {
|
|
4
|
-
private rectWidthInternal;
|
|
5
|
-
private rectHeightInternal;
|
|
6
|
-
/**
|
|
7
|
-
* Creates cover resize policy.
|
|
8
|
-
*
|
|
9
|
-
* @param rectWidth - Target rect width
|
|
10
|
-
* @param rectHeight - Target rect height
|
|
11
|
-
*/
|
|
12
|
-
constructor(rectWidth: number, rectHeight: number);
|
|
13
|
-
/** Target rect width */
|
|
14
|
-
get rectWidth(): number;
|
|
15
|
-
/** Target rect height */
|
|
16
|
-
get rectHeight(): number;
|
|
17
|
-
/** Target rect width */
|
|
18
|
-
set rectWidth(value: number);
|
|
19
|
-
/** Target rect height */
|
|
20
|
-
set rectHeight(value: number);
|
|
21
|
-
calculateScale(width: number, height: number): number;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
-
/** Scales by width in landscape, by height in portrait */
|
|
3
|
-
export declare class UIResizePolicyCross extends UIResizePolicy {
|
|
4
|
-
private fixedWidthLandscapeInternal;
|
|
5
|
-
private fixedHeightPortraitInternal;
|
|
6
|
-
/**
|
|
7
|
-
* Creates cross resize policy.
|
|
8
|
-
*
|
|
9
|
-
* @param fixedWidthLandscape - Target width when landscape
|
|
10
|
-
* @param fixedHeightPortrait - Target height when portrait
|
|
11
|
-
*/
|
|
12
|
-
constructor(fixedWidthLandscape: number, fixedHeightPortrait: number);
|
|
13
|
-
/** Target width when landscape */
|
|
14
|
-
get fixedWidthLandscape(): number;
|
|
15
|
-
/** Target height when portrait */
|
|
16
|
-
get fixedHeightPortrait(): number;
|
|
17
|
-
/** Target width when landscape */
|
|
18
|
-
set fixedWidthLandscape(value: number);
|
|
19
|
-
/** Target height when portrait */
|
|
20
|
-
set fixedHeightPortrait(value: number);
|
|
21
|
-
calculateScale(width: number, height: number): number;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
-
/** Scales by height in landscape, by width in portrait */
|
|
3
|
-
export declare class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
4
|
-
private fixedHeightLandscapeInternal;
|
|
5
|
-
private fixedWidthPortraitInternal;
|
|
6
|
-
/**
|
|
7
|
-
* Creates inverted cross resize policy.
|
|
8
|
-
*
|
|
9
|
-
* @param fixedHeightLandscape - Target height when landscape
|
|
10
|
-
* @param fixedWidthPortrait - Target width when portrait
|
|
11
|
-
*/
|
|
12
|
-
constructor(fixedHeightLandscape: number, fixedWidthPortrait: number);
|
|
13
|
-
/** Target height when landscape */
|
|
14
|
-
get fixedHeightLandscape(): number;
|
|
15
|
-
/** Target width when portrait */
|
|
16
|
-
get fixedWidthPortrait(): number;
|
|
17
|
-
/** Target height when landscape */
|
|
18
|
-
set fixedHeightLandscape(value: number);
|
|
19
|
-
/** Target width when portrait */
|
|
20
|
-
set fixedWidthPortrait(value: number);
|
|
21
|
-
calculateScale(width: number, height: number): number;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
-
/** Scales area to fit around rect preserving proportions */
|
|
3
|
-
export declare class UIResizePolicyFit extends UIResizePolicy {
|
|
4
|
-
private rectWidthInternal;
|
|
5
|
-
private rectHeightInternal;
|
|
6
|
-
/**
|
|
7
|
-
* Creates fit resize policy.
|
|
8
|
-
*
|
|
9
|
-
* @param rectWidth - Target rect width
|
|
10
|
-
* @param rectHeight - Target rect height
|
|
11
|
-
*/
|
|
12
|
-
constructor(rectWidth: number, rectHeight: number);
|
|
13
|
-
/** Target rect width */
|
|
14
|
-
get rectWidth(): number;
|
|
15
|
-
/** Target rect height */
|
|
16
|
-
get rectHeight(): number;
|
|
17
|
-
/** Target rect width */
|
|
18
|
-
set rectWidth(value: number);
|
|
19
|
-
/** Target rect height */
|
|
20
|
-
set rectHeight(value: number);
|
|
21
|
-
calculateScale(width: number, height: number): number;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
-
/** Scales by height with orientation-specific targets */
|
|
3
|
-
export declare class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
4
|
-
private fixedHeightLandscapeInternal;
|
|
5
|
-
private fixedHeightPortraitInternal;
|
|
6
|
-
/**
|
|
7
|
-
* Creates fixed height resize policy.
|
|
8
|
-
*
|
|
9
|
-
* @param fixedHeightLandscape - Target height when landscape
|
|
10
|
-
* @param fixedHeightPortrait - Target height when portrait
|
|
11
|
-
*/
|
|
12
|
-
constructor(fixedHeightLandscape: number, fixedHeightPortrait: number);
|
|
13
|
-
/** Target height when landscape */
|
|
14
|
-
get fixedHeightLandscape(): number;
|
|
15
|
-
/** Target height when portrait */
|
|
16
|
-
get fixedHeightPortrait(): number;
|
|
17
|
-
/** Target height when landscape */
|
|
18
|
-
set fixedHeightLandscape(value: number);
|
|
19
|
-
/** Target height when portrait */
|
|
20
|
-
set fixedHeightPortrait(value: number);
|
|
21
|
-
calculateScale(width: number, height: number): number;
|
|
22
|
-
}
|