laymur 0.25.2 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -5
- package/dist/core/elements/UIAnchor/UIAnchor.d.ts +2 -2
- package/dist/core/elements/UIAnchor/UIAnchor.js +3 -2
- package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +3 -0
- package/dist/core/elements/UIDummy/UIDummy.d.ts +32 -0
- package/dist/core/elements/UIDummy/UIDummy.js +101 -2
- package/dist/core/elements/UIElement/UIElement.d.ts +23 -1
- package/dist/core/elements/UIElement/UIElement.js +50 -3
- package/dist/core/elements/UIGraphics/UIGraphics.js +2 -2
- package/dist/core/elements/UIProgress/UIProgress.js +2 -5
- package/dist/core/elements/UIScene/UIScene.js +3 -2
- package/dist/core/elements/UIText/UIText.js +2 -2
- package/dist/core/index.d.ts +48 -2
- package/dist/core/index.js +13 -1
- package/dist/core/layers/UILayer/UILayer.d.ts +5 -1
- package/dist/core/layers/UILayer/UILayer.js +33 -1
- package/dist/core/miscellaneous/UIAffineMatrix3.d.ts +13 -0
- package/dist/core/miscellaneous/UIAffineMatrix3.js +13 -0
- package/dist/core/miscellaneous/area/UIArea.d.ts +10 -1
- package/dist/core/miscellaneous/area/UIArea.js +4 -1
- package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaCircle.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +0 -1
- package/dist/core/miscellaneous/asserts.d.ts +9 -0
- package/dist/core/miscellaneous/asserts.js +16 -0
- package/dist/core/miscellaneous/color/UIColor.js +1 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +17 -3
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +88 -26
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +9 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +29 -6
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +51 -11
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +2 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +47 -6
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +15 -3
- package/dist/core/miscellaneous/generic-plane/shared.js +38 -7
- package/dist/core/miscellaneous/generic-plane/varyingPacking.d.ts +46 -0
- package/dist/core/miscellaneous/generic-plane/varyingPacking.js +170 -0
- package/dist/core/miscellaneous/mask/UIMask.Internal.d.ts +61 -0
- package/dist/core/miscellaneous/mask/UIMask.Internal.js +56 -0
- package/dist/core/miscellaneous/mask/UIMask.d.ts +84 -0
- package/dist/core/miscellaneous/mask/UIMask.js +265 -0
- package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.d.ts +50 -0
- package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.js +233 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +10 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +7 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +2 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +0 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +0 -1
- package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +3 -0
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +1 -0
- package/dist/core/miscellaneous/micro/UIMicro.d.ts +18 -1
- package/dist/core/miscellaneous/micro/UIMicro.js +23 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +16 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +8 -2
- package/dist/core/miscellaneous/texture/UITextureView.d.ts +2 -1
- package/dist/core/miscellaneous/texture/UITextureView.js +3 -2
- package/dist/core/shaders/UIMask.d.ts +15 -0
- package/dist/core/shaders/UIMask.js +45 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +2 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +1 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +3 -0
- package/dist/debug/index.d.ts +2 -0
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +7 -1
- package/dist/particles/behaviorModules/UIBehaviorModule.js +2 -1
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +0 -2
- package/dist/particles/elements/UIEmitter.Internal.d.ts +7 -0
- package/dist/particles/elements/UIEmitter.d.ts +1 -8
- package/dist/particles/index.d.ts +5 -0
- package/dist/particles/index.js +3 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +11 -2
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +101 -72
- package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +1 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.js +4 -2
- package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingColorOverLife.js +0 -2
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +0 -2
- package/dist/particles/renderingModules/UIRenderingModule.d.ts +10 -1
- package/dist/particles/renderingModules/UIRenderingModule.js +3 -1
- package/dist/particles/renderingModules/UIRenderingTexture.d.ts +4 -0
- package/dist/particles/spawnModules/UISpawnModule.d.ts +13 -1
- package/dist/particles/spawnModules/UISpawnModule.js +3 -1
- package/dist/particles/spawnModules/UISpawnOffset.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnOffset.js +0 -2
- package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomLifetime.js +0 -2
- package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomRotation.js +0 -2
- package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomScale.js +0 -2
- package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomTorque.js +0 -2
- package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomVelocity.js +0 -2
- package/dist/particles/spawnModules/UISpawnRectangle.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRectangle.js +0 -2
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -1,47 +1,84 @@
|
|
|
1
1
|
export { UIConstraint2DBuilder } from "./constraints/builders/UIConstraint2DBuilder.js";
|
|
2
|
+
export type { UIConstraint2DOptions, UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintInterpolation2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions, UIType2D, UIType2DObject, } from "./constraints/builders/UIConstraint2DBuilder.Internal.js";
|
|
2
3
|
export { UICoverConstraintBuilder } from "./constraints/builders/UICoverConstraintBuilder.js";
|
|
4
|
+
export type { UICoverConstraintBuilderOptions } from "./constraints/builders/UICoverConstraintBuilder.Internal.js";
|
|
3
5
|
export { UIFitConstraintBuilder } from "./constraints/builders/UIFitConstraintBuilder.js";
|
|
6
|
+
export type { UIFitConstraintBuilderOptions } from "./constraints/builders/UIFitConstraintBuilder.Internal.js";
|
|
4
7
|
export { UIAspectConstraint } from "./constraints/UIAspectConstraint/UIAspectConstraint.js";
|
|
8
|
+
export type { UIAspectConstraintOptions } from "./constraints/UIAspectConstraint/UIAspectConstraint.Internal.js";
|
|
5
9
|
export { UIConstraint } from "./constraints/UIConstraint.js";
|
|
6
10
|
export { UICustomConstraint } from "./constraints/UICustomConstraint.js";
|
|
7
11
|
export { UIHeightConstraint } from "./constraints/UIHeightConstraint/UIHeightConstraint.js";
|
|
12
|
+
export type { UIHeightConstraintOptions } from "./constraints/UIHeightConstraint/UIHeightConstraint.Internal.js";
|
|
8
13
|
export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js";
|
|
14
|
+
export type { UIHorizontalDistanceConstraintOptions } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js";
|
|
9
15
|
export { UIHorizontalInterpolationConstraint } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js";
|
|
16
|
+
export type { UIHorizontalInterpolationConstraintOptions } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js";
|
|
10
17
|
export { UIHorizontalProportionConstraint } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js";
|
|
18
|
+
export type { UIHorizontalProportionConstraintOptions } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js";
|
|
11
19
|
export { UISingleParameterConstraint } from "./constraints/UISingleParameterConstraint/UISingleParameterConstraint.js";
|
|
20
|
+
export type { UISingleParameterConstraintOptions } from "./constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js";
|
|
12
21
|
export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js";
|
|
22
|
+
export type { UIVerticalDistanceConstraintOptions } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js";
|
|
13
23
|
export { UIVerticalInterpolationConstraint } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js";
|
|
24
|
+
export type { UIVerticalInterpolationConstraintOptions } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js";
|
|
14
25
|
export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js";
|
|
26
|
+
export type { UIVerticalProportionConstraintOptions } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js";
|
|
15
27
|
export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint.js";
|
|
28
|
+
export type { UIWidthConstraintOptions } from "./constraints/UIWidthConstraint/UIWidthConstraint.Internal.js";
|
|
16
29
|
export { UIAnchor } from "./elements/UIAnchor/UIAnchor.js";
|
|
17
30
|
export type { UIAnchorOptions } from "./elements/UIAnchor/UIAnchor.Internal.js";
|
|
18
31
|
export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
|
|
19
32
|
export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
|
|
33
|
+
export type { UIAnimatedImageOptions } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
|
|
20
34
|
export { UIDummy } from "./elements/UIDummy/UIDummy.js";
|
|
21
35
|
export type { UIDummyOptions, UIInputEventData } from "./elements/UIDummy/UIDummy.Internal.js";
|
|
36
|
+
export { UIElement } from "./elements/UIElement/UIElement.js";
|
|
37
|
+
export type { UIElementOptions } from "./elements/UIElement/UIElement.Internal.js";
|
|
22
38
|
export { UIGraphics } from "./elements/UIGraphics/UIGraphics.js";
|
|
39
|
+
export type { UIGraphicsOptions } from "./elements/UIGraphics/UIGraphics.Internal.js";
|
|
23
40
|
export { UIImage } from "./elements/UIImage/UIImage.js";
|
|
41
|
+
export type { UIImageOptions } from "./elements/UIImage/UIImage.Internal.js";
|
|
24
42
|
export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
|
|
25
43
|
export { UINineSliceRegionMode } from "./elements/UINineSlice/UINineSlice.Internal.js";
|
|
44
|
+
export type { UINineSliceOptions } from "./elements/UINineSlice/UINineSlice.Internal.js";
|
|
26
45
|
export { UIProgress } from "./elements/UIProgress/UIProgress.js";
|
|
46
|
+
export type { UIProgressOptions } from "./elements/UIProgress/UIProgress.Internal.js";
|
|
27
47
|
export { UIScene } from "./elements/UIScene/UIScene.js";
|
|
28
48
|
export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal.js";
|
|
49
|
+
export type { UISceneOptions } from "./elements/UIScene/UIScene.Internal.js";
|
|
29
50
|
export { UIText } from "./elements/UIText/UIText.js";
|
|
51
|
+
export type { UITextContent } from "./elements/UIText/UIText.Interfaces.js";
|
|
30
52
|
export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
|
|
53
|
+
export type { UITextOptions } from "./elements/UIText/UIText.Internal.js";
|
|
31
54
|
export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer.js";
|
|
32
|
-
export type { UIFullscreenLayerInputEventData } from "./layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js";
|
|
55
|
+
export type { UIFullscreenLayerInputEventData, UIFullscreenLayerOptions, } from "./layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js";
|
|
33
56
|
export { UILayer } from "./layers/UILayer/UILayer.js";
|
|
57
|
+
export type { UILayerMode, UILayerOptions, UILayerOrientation, } from "./layers/UILayer/UILayer.Internal.js";
|
|
58
|
+
export { UIArea } from "./miscellaneous/area/UIArea.js";
|
|
34
59
|
export { UIAreaCircle } from "./miscellaneous/area/UIAreaCircle.js";
|
|
35
60
|
export { UIAreaPolygon } from "./miscellaneous/area/UIAreaPolygon.js";
|
|
36
61
|
export { UIAreaRectangle } from "./miscellaneous/area/UIAreaRectangle.js";
|
|
37
62
|
export { UIAreaRoundedRectangle } from "./miscellaneous/area/UIAreaRoundedRectangle.js";
|
|
63
|
+
export type { UICanvas, UICanvasRenderingContext2D } from "./miscellaneous/canvas.js";
|
|
38
64
|
export { UIColor } from "./miscellaneous/color/UIColor.js";
|
|
65
|
+
export type { UIColorConfig, UIColorName } from "./miscellaneous/color/UIColor.Internal.js";
|
|
39
66
|
export { computeTransformMatrix } from "./miscellaneous/computeTransform.js";
|
|
67
|
+
export type { HSLAdjustment, UIProperty, UIPropertyName, } from "./miscellaneous/generic-plane/shared.js";
|
|
68
|
+
export { UIInsets } from "./miscellaneous/insets/UIInsets.js";
|
|
69
|
+
export type { UIInsetsConfig } from "./miscellaneous/insets/UIInsets.Internal.js";
|
|
70
|
+
export { UIProgressMaskFunction } from "./miscellaneous/mask-function/UIProgressMaskFunction.js";
|
|
40
71
|
export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
|
|
41
72
|
export { UIProgressMaskFunctionDirectional } from "./miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
|
|
73
|
+
export { UIMask } from "./miscellaneous/mask/UIMask.js";
|
|
74
|
+
export { UIMaskShape } from "./miscellaneous/mask/UIMask.Internal.js";
|
|
75
|
+
export type { UIMaskOptions } from "./miscellaneous/mask/UIMask.Internal.js";
|
|
76
|
+
export { UIMaskMaterialPatch } from "./miscellaneous/mask/UIMaskMaterialPatch.js";
|
|
77
|
+
export type { Vector2Like } from "./miscellaneous/math.js";
|
|
42
78
|
export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
|
|
43
79
|
export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
|
|
44
80
|
export type { UIMicroConfig } from "./miscellaneous/micro/UIMicro.Internal.js";
|
|
81
|
+
export { UIResizePolicy } from "./miscellaneous/resize-policy/UIResizePolicy.js";
|
|
45
82
|
export { UIResizePolicyCover } from "./miscellaneous/resize-policy/UIResizePolicyCover.js";
|
|
46
83
|
export { UIResizePolicyCross } from "./miscellaneous/resize-policy/UIResizePolicyCross.js";
|
|
47
84
|
export { UIResizePolicyCrossInverted } from "./miscellaneous/resize-policy/UIResizePolicyCrossInverted.js";
|
|
@@ -49,10 +86,19 @@ export { UIResizePolicyFit } from "./miscellaneous/resize-policy/UIResizePolicyF
|
|
|
49
86
|
export { UIResizePolicyFixedHeight } from "./miscellaneous/resize-policy/UIResizePolicyFixedHeight.js";
|
|
50
87
|
export { UIResizePolicyFixedWidth } from "./miscellaneous/resize-policy/UIResizePolicyFixedWidth.js";
|
|
51
88
|
export { UIResizePolicyNone } from "./miscellaneous/resize-policy/UIResizePolicyNone.js";
|
|
89
|
+
export type { UILayerElement, UIPlaneElement, UIPointElement } from "./miscellaneous/shared.js";
|
|
90
|
+
export { UITextSpan } from "./miscellaneous/text-span/UITextSpan.js";
|
|
91
|
+
export type { UITextSpanConfig } from "./miscellaneous/text-span/UITextSpan.Internal.js";
|
|
92
|
+
export { UITextStyle } from "./miscellaneous/text-style/UITextStyle.js";
|
|
93
|
+
export type { UITextAlign, UITextStyleConfig, } from "./miscellaneous/text-style/UITextStyle.Internal.js";
|
|
94
|
+
export { UITextureView } from "./miscellaneous/texture/UITextureView.js";
|
|
95
|
+
export type { UITextureAtlasConfig, UITextureConfig, UITextureRect, UITextureSize, UITextureTrim, } from "./miscellaneous/texture/UITextureView.Internal.js";
|
|
96
|
+
export { UIAffineMatrix3 } from "./miscellaneous/UIAffineMatrix3.js";
|
|
97
|
+
export { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
|
|
52
98
|
export { UIExpression } from "./miscellaneous/UIExpression.js";
|
|
53
99
|
export { isUIModeInteractive, isUIModeVisible, UIMode } from "./miscellaneous/UIMode.js";
|
|
54
100
|
export { UIOrientation } from "./miscellaneous/UIOrientation.js";
|
|
55
101
|
export { UIPriority } from "./miscellaneous/UIPriority.js";
|
|
56
102
|
export { UIRelation } from "./miscellaneous/UIRelation.js";
|
|
57
103
|
export { UITransparencyMode } from "./miscellaneous/UITransparencyMode.js";
|
|
58
|
-
export {
|
|
104
|
+
export type { UISceneWrapperView } from "./wrappers/UISceneWrapper/UISceneWrapper.Internal.js";
|
package/dist/core/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { UIAnchor } from "./elements/UIAnchor/UIAnchor.js";
|
|
|
17
17
|
export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
|
|
18
18
|
export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
|
|
19
19
|
export { UIDummy } from "./elements/UIDummy/UIDummy.js";
|
|
20
|
+
export { UIElement } from "./elements/UIElement/UIElement.js";
|
|
20
21
|
export { UIGraphics } from "./elements/UIGraphics/UIGraphics.js";
|
|
21
22
|
export { UIImage } from "./elements/UIImage/UIImage.js";
|
|
22
23
|
export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
|
|
@@ -28,16 +29,23 @@ export { UIText } from "./elements/UIText/UIText.js";
|
|
|
28
29
|
export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
|
|
29
30
|
export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer.js";
|
|
30
31
|
export { UILayer } from "./layers/UILayer/UILayer.js";
|
|
32
|
+
export { UIArea } from "./miscellaneous/area/UIArea.js";
|
|
31
33
|
export { UIAreaCircle } from "./miscellaneous/area/UIAreaCircle.js";
|
|
32
34
|
export { UIAreaPolygon } from "./miscellaneous/area/UIAreaPolygon.js";
|
|
33
35
|
export { UIAreaRectangle } from "./miscellaneous/area/UIAreaRectangle.js";
|
|
34
36
|
export { UIAreaRoundedRectangle } from "./miscellaneous/area/UIAreaRoundedRectangle.js";
|
|
35
37
|
export { UIColor } from "./miscellaneous/color/UIColor.js";
|
|
36
38
|
export { computeTransformMatrix } from "./miscellaneous/computeTransform.js";
|
|
39
|
+
export { UIInsets } from "./miscellaneous/insets/UIInsets.js";
|
|
40
|
+
export { UIProgressMaskFunction } from "./miscellaneous/mask-function/UIProgressMaskFunction.js";
|
|
37
41
|
export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
|
|
38
42
|
export { UIProgressMaskFunctionDirectional } from "./miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
|
|
43
|
+
export { UIMask } from "./miscellaneous/mask/UIMask.js";
|
|
44
|
+
export { UIMaskShape } from "./miscellaneous/mask/UIMask.Internal.js";
|
|
45
|
+
export { UIMaskMaterialPatch } from "./miscellaneous/mask/UIMaskMaterialPatch.js";
|
|
39
46
|
export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
|
|
40
47
|
export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
|
|
48
|
+
export { UIResizePolicy } from "./miscellaneous/resize-policy/UIResizePolicy.js";
|
|
41
49
|
export { UIResizePolicyCover } from "./miscellaneous/resize-policy/UIResizePolicyCover.js";
|
|
42
50
|
export { UIResizePolicyCross } from "./miscellaneous/resize-policy/UIResizePolicyCross.js";
|
|
43
51
|
export { UIResizePolicyCrossInverted } from "./miscellaneous/resize-policy/UIResizePolicyCrossInverted.js";
|
|
@@ -45,10 +53,14 @@ export { UIResizePolicyFit } from "./miscellaneous/resize-policy/UIResizePolicyF
|
|
|
45
53
|
export { UIResizePolicyFixedHeight } from "./miscellaneous/resize-policy/UIResizePolicyFixedHeight.js";
|
|
46
54
|
export { UIResizePolicyFixedWidth } from "./miscellaneous/resize-policy/UIResizePolicyFixedWidth.js";
|
|
47
55
|
export { UIResizePolicyNone } from "./miscellaneous/resize-policy/UIResizePolicyNone.js";
|
|
56
|
+
export { UITextSpan } from "./miscellaneous/text-span/UITextSpan.js";
|
|
57
|
+
export { UITextStyle } from "./miscellaneous/text-style/UITextStyle.js";
|
|
58
|
+
export { UITextureView } from "./miscellaneous/texture/UITextureView.js";
|
|
59
|
+
export { UIAffineMatrix3 } from "./miscellaneous/UIAffineMatrix3.js";
|
|
60
|
+
export { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
|
|
48
61
|
export { UIExpression } from "./miscellaneous/UIExpression.js";
|
|
49
62
|
export { isUIModeInteractive, isUIModeVisible, UIMode } from "./miscellaneous/UIMode.js";
|
|
50
63
|
export { UIOrientation } from "./miscellaneous/UIOrientation.js";
|
|
51
64
|
export { UIPriority } from "./miscellaneous/UIPriority.js";
|
|
52
65
|
export { UIRelation } from "./miscellaneous/UIRelation.js";
|
|
53
66
|
export { UITransparencyMode } from "./miscellaneous/UITransparencyMode.js";
|
|
54
|
-
export { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
|
|
@@ -3,6 +3,7 @@ import type { WebGLRenderer } from "three";
|
|
|
3
3
|
import type { UIPlaneElement } from "../../miscellaneous/shared.js";
|
|
4
4
|
import type { UIConstraint } from "../../constraints/UIConstraint.js";
|
|
5
5
|
import type { UIAnchor } from "../../elements/UIAnchor/UIAnchor.js";
|
|
6
|
+
import type { UIMask } from "../../miscellaneous/mask/UIMask.js";
|
|
6
7
|
import { UIInputWrapper } from "../../wrappers/UIInputWrapper/UIInputWrapper.js";
|
|
7
8
|
import type { UISceneWrapperView } from "../../wrappers/UISceneWrapper/UISceneWrapper.Internal.js";
|
|
8
9
|
import type { UILayerMode, UILayerOptions, UILayerOrientation } from "./UILayer.Internal.js";
|
|
@@ -31,6 +32,7 @@ export declare abstract class UILayer implements UIPlaneElement {
|
|
|
31
32
|
private readonly signalConstraintRemovedInternal;
|
|
32
33
|
private readonly constraintRegistryInternal;
|
|
33
34
|
private readonly elementRegistryInternal;
|
|
35
|
+
private readonly maskRegistryInternal;
|
|
34
36
|
private destroyedInternal;
|
|
35
37
|
constructor(options: Partial<UILayerOptions>);
|
|
36
38
|
/**
|
|
@@ -74,12 +76,14 @@ export declare abstract class UILayer implements UIPlaneElement {
|
|
|
74
76
|
get constraintRegistry(): readonly UIConstraint[];
|
|
75
77
|
/** Elements created on the layer and not destroyed yet */
|
|
76
78
|
get elementRegistry(): readonly UIAnchor[];
|
|
79
|
+
/** Masks whose source is the layer or one of its elements, not destroyed yet */
|
|
80
|
+
get maskRegistry(): readonly UIMask[];
|
|
77
81
|
/** Whether the layer is destroyed */
|
|
78
82
|
get destroyed(): boolean;
|
|
79
83
|
/** Updates visibility and interactivity mode */
|
|
80
84
|
set mode(value: UILayerMode);
|
|
81
85
|
/**
|
|
82
|
-
* Destroys all elements and
|
|
86
|
+
* Destroys all elements, constraints and masks of the layer, those tied to the layer itself
|
|
83
87
|
* included, and frees the GPU resources of the layer. Textures are left to their owners.
|
|
84
88
|
* Does nothing if the layer is already destroyed.
|
|
85
89
|
*/
|
|
@@ -22,6 +22,7 @@ export class UILayer {
|
|
|
22
22
|
this.signalConstraintRemovedInternal = new Ferrsign2();
|
|
23
23
|
this.constraintRegistryInternal = [];
|
|
24
24
|
this.elementRegistryInternal = [];
|
|
25
|
+
this.maskRegistryInternal = [];
|
|
25
26
|
this.destroyedInternal = false;
|
|
26
27
|
if (options.width !== undefined) {
|
|
27
28
|
assertValidPositiveNumber(options.width, "UILayer.constructor.options.width");
|
|
@@ -127,6 +128,10 @@ export class UILayer {
|
|
|
127
128
|
get elementRegistry() {
|
|
128
129
|
return this.elementRegistryInternal;
|
|
129
130
|
}
|
|
131
|
+
/** Masks whose source is the layer or one of its elements, not destroyed yet */
|
|
132
|
+
get maskRegistry() {
|
|
133
|
+
return this.maskRegistryInternal;
|
|
134
|
+
}
|
|
130
135
|
/** Whether the layer is destroyed */
|
|
131
136
|
get destroyed() {
|
|
132
137
|
return this.destroyedInternal;
|
|
@@ -139,7 +144,7 @@ export class UILayer {
|
|
|
139
144
|
}
|
|
140
145
|
}
|
|
141
146
|
/**
|
|
142
|
-
* Destroys all elements and
|
|
147
|
+
* Destroys all elements, constraints and masks of the layer, those tied to the layer itself
|
|
143
148
|
* included, and frees the GPU resources of the layer. Textures are left to their owners.
|
|
144
149
|
* Does nothing if the layer is already destroyed.
|
|
145
150
|
*/
|
|
@@ -151,6 +156,7 @@ export class UILayer {
|
|
|
151
156
|
for (const element of [...this.elementRegistryInternal]) {
|
|
152
157
|
element.destroy();
|
|
153
158
|
}
|
|
159
|
+
this.destroyMasksUsingSource(this);
|
|
154
160
|
this.destroyConstraints(() => true);
|
|
155
161
|
this.sceneWrapperInternal.destroy();
|
|
156
162
|
}
|
|
@@ -162,6 +168,32 @@ export class UILayer {
|
|
|
162
168
|
destroyConstraintsUsingVariables(variables) {
|
|
163
169
|
this.destroyConstraints((constraint) => variables.some((variable) => constraint.isUsingVariable(variable)));
|
|
164
170
|
}
|
|
171
|
+
/**
|
|
172
|
+
* Destroys the masks that follow the given source, so that the source can be removed.
|
|
173
|
+
* @internal
|
|
174
|
+
*/
|
|
175
|
+
destroyMasksUsingSource(source) {
|
|
176
|
+
for (const mask of [...this.maskRegistryInternal]) {
|
|
177
|
+
if (mask.source === source) {
|
|
178
|
+
mask.destroy();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
/** @internal */
|
|
183
|
+
addMask(mask) {
|
|
184
|
+
if (this.destroyedInternal) {
|
|
185
|
+
throw new Error(`UILayer.addMask: layer is destroyed`);
|
|
186
|
+
}
|
|
187
|
+
this.maskRegistryInternal.push(mask);
|
|
188
|
+
}
|
|
189
|
+
/** @internal */
|
|
190
|
+
removeMask(mask) {
|
|
191
|
+
const index = this.maskRegistryInternal.indexOf(mask);
|
|
192
|
+
if (index === -1) {
|
|
193
|
+
throw new Error(`UILayer.removeMask: mask is not found in this layer`);
|
|
194
|
+
}
|
|
195
|
+
this.maskRegistryInternal.splice(index, 1);
|
|
196
|
+
}
|
|
165
197
|
/** @internal */
|
|
166
198
|
addElement(element) {
|
|
167
199
|
if (this.destroyedInternal) {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Matrix3 } from "three";
|
|
2
|
+
/**
|
|
3
|
+
* Matrix3 holding a 2D affine transform, such as a UV transform: its bottom row is taken as
|
|
4
|
+
* (0, 0, 1). As a shader property it is passed per instance as its six meaningful elements
|
|
5
|
+
* instead of nine, which saves a vertex attribute and a varying row on busy shaders. In GLSL
|
|
6
|
+
* it is still a mat3.
|
|
7
|
+
*
|
|
8
|
+
* The property keeps that layout for the lifetime of the element: a plain Matrix3 assigned to
|
|
9
|
+
* it later is read the same way, with its bottom row ignored. The other way round, a property
|
|
10
|
+
* created as a plain Matrix3 stays a full mat3 when a UIAffineMatrix3 is assigned to it.
|
|
11
|
+
*/
|
|
12
|
+
export declare class UIAffineMatrix3 extends Matrix3 {
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Matrix3 } from "three";
|
|
2
|
+
/**
|
|
3
|
+
* Matrix3 holding a 2D affine transform, such as a UV transform: its bottom row is taken as
|
|
4
|
+
* (0, 0, 1). As a shader property it is passed per instance as its six meaningful elements
|
|
5
|
+
* instead of nine, which saves a vertex attribute and a varying row on busy shaders. In GLSL
|
|
6
|
+
* it is still a mat3.
|
|
7
|
+
*
|
|
8
|
+
* The property keeps that layout for the lifetime of the element: a plain Matrix3 assigned to
|
|
9
|
+
* it later is read the same way, with its bottom row ignored. The other way round, a property
|
|
10
|
+
* created as a plain Matrix3 stays a full mat3 when a UIAffineMatrix3 is assigned to it.
|
|
11
|
+
*/
|
|
12
|
+
export class UIAffineMatrix3 extends Matrix3 {
|
|
13
|
+
}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Base class for interaction area shapes. Subclass it for a custom hit shape and assign it to
|
|
3
|
+
* `UIDummy.interactionArea`.
|
|
4
|
+
*/
|
|
2
5
|
export declare abstract class UIArea {
|
|
6
|
+
/**
|
|
7
|
+
* Whether a point hits the area.
|
|
8
|
+
* @param pointX X in element-local normalized space (0 = left edge, 1 = right edge)
|
|
9
|
+
* @param pointY Y in element-local normalized space (0 = bottom edge, 1 = top edge)
|
|
10
|
+
*/
|
|
11
|
+
abstract contains(pointX: number, pointY: number): boolean;
|
|
3
12
|
}
|
|
@@ -18,7 +18,6 @@ export class UIAreaCircle extends UIArea {
|
|
|
18
18
|
assertValidNonNegativeNumber(centerY, "UIAreaCircle.constructor.centerY");
|
|
19
19
|
assertValidNonNegativeNumber(radius, "UIAreaCircle.constructor.radius");
|
|
20
20
|
}
|
|
21
|
-
/** @internal */
|
|
22
21
|
contains(pointX, pointY) {
|
|
23
22
|
assertValidNumber(pointX, "UIAreaCircle.contains.pointX");
|
|
24
23
|
assertValidNumber(pointY, "UIAreaCircle.contains.pointY");
|
|
@@ -11,7 +11,6 @@ export class UIAreaPolygon extends UIArea {
|
|
|
11
11
|
super();
|
|
12
12
|
this.vertices = vertices;
|
|
13
13
|
}
|
|
14
|
-
/** @internal */
|
|
15
14
|
contains(pointX, pointY) {
|
|
16
15
|
assertValidNumber(pointX, "UIAreaPolygon.contains.pointX");
|
|
17
16
|
assertValidNumber(pointY, "UIAreaPolygon.contains.pointY");
|
|
@@ -21,7 +21,6 @@ export class UIAreaRectangle extends UIArea {
|
|
|
21
21
|
assertValidNonNegativeNumber(width, "UIAreaRectangle.constructor.width");
|
|
22
22
|
assertValidNonNegativeNumber(height, "UIAreaRectangle.constructor.height");
|
|
23
23
|
}
|
|
24
|
-
/** @internal */
|
|
25
24
|
contains(pointX, pointY) {
|
|
26
25
|
assertValidNumber(pointX, "UIAreaRectangle.contains.pointX");
|
|
27
26
|
assertValidNumber(pointY, "UIAreaRectangle.contains.pointY");
|
|
@@ -18,4 +18,5 @@ export declare class UIAreaRoundedRectangle extends UIArea {
|
|
|
18
18
|
* @param radius - Corner radius in normalized coordinates (0 to 1)
|
|
19
19
|
*/
|
|
20
20
|
constructor(x: number, y: number, width: number, height: number, radius: number);
|
|
21
|
+
contains(pointX: number, pointY: number): boolean;
|
|
21
22
|
}
|
|
@@ -27,7 +27,6 @@ export class UIAreaRoundedRectangle extends UIArea {
|
|
|
27
27
|
assertValidNonNegativeNumber(radius, "UIAreaRoundedRectangle.constructor.radius");
|
|
28
28
|
this.radius = Math.min(radius, Math.min(width, height) / 2);
|
|
29
29
|
}
|
|
30
|
-
/** @internal */
|
|
31
30
|
contains(pointX, pointY) {
|
|
32
31
|
assertValidNumber(pointX, "UIAreaRoundedRectangle.contains.pointX");
|
|
33
32
|
assertValidNumber(pointY, "UIAreaRoundedRectangle.contains.pointY");
|
|
@@ -18,6 +18,15 @@ export declare function assertValidNumber(value: number, subject: string): void;
|
|
|
18
18
|
* @throws If required exceeds the renderer's MAX_VERTEX_ATTRIBS
|
|
19
19
|
*/
|
|
20
20
|
export declare function assertVertexAttributeBudget(renderer: WebGLRenderer, required: number, subject: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Validates a shader fits the varying budget of the device. Like an attribute overflow, a
|
|
23
|
+
* program over the budget fails to link, which three.js only logs, and its mesh is not drawn.
|
|
24
|
+
* @param renderer Renderer the shader is drawn with
|
|
25
|
+
* @param required Number of varying rows (vec4 locations) the shader uses
|
|
26
|
+
* @param subject Value name for error messages
|
|
27
|
+
* @throws If required exceeds the renderer's MAX_VARYING_VECTORS
|
|
28
|
+
*/
|
|
29
|
+
export declare function assertVaryingBudget(renderer: WebGLRenderer, required: number, subject: string): void;
|
|
21
30
|
/**
|
|
22
31
|
* Validates value is positive (>= EPSILON).
|
|
23
32
|
* @param value Number to validate
|
|
@@ -33,6 +33,22 @@ export function assertVertexAttributeBudget(renderer, required, subject) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Validates a shader fits the varying budget of the device. Like an attribute overflow, a
|
|
38
|
+
* program over the budget fails to link, which three.js only logs, and its mesh is not drawn.
|
|
39
|
+
* @param renderer Renderer the shader is drawn with
|
|
40
|
+
* @param required Number of varying rows (vec4 locations) the shader uses
|
|
41
|
+
* @param subject Value name for error messages
|
|
42
|
+
* @throws If required exceeds the renderer's MAX_VARYING_VECTORS
|
|
43
|
+
*/
|
|
44
|
+
export function assertVaryingBudget(renderer, required, subject) {
|
|
45
|
+
if (process.env.NODE_ENV !== "production") {
|
|
46
|
+
const available = renderer.capabilities.maxVaryings;
|
|
47
|
+
if (required > available) {
|
|
48
|
+
throw new Error(`${subject}: shader needs ${required} varying vectors, the device supports ${available}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
36
52
|
/**
|
|
37
53
|
* Validates value is positive (>= EPSILON).
|
|
38
54
|
* @param value Number to validate
|
|
@@ -16,6 +16,7 @@ export class UIColor {
|
|
|
16
16
|
this.rgbDirty = false;
|
|
17
17
|
this.hslDirty = false;
|
|
18
18
|
if (args.length > 0) {
|
|
19
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- Needed by tsc: no single overload of set() accepts unknown[], the rule misjudges overloaded methods
|
|
19
20
|
this.set(...args);
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -5,14 +5,28 @@ import type { PackedLayout } from "./UIGenericInstancedPlane.Layout.js";
|
|
|
5
5
|
export declare const INSTANCED_PLANE_GEOMETRY: InstancedBufferGeometry;
|
|
6
6
|
export declare const CAPACITY_STEP = 4;
|
|
7
7
|
export declare const INITIAL_CAPACITY = 1;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Flattens a property value into the array.
|
|
10
|
+
* @param affine Write a Matrix3 as a 2D affine transform: its three columns without the bottom row
|
|
11
|
+
*/
|
|
12
|
+
export declare function writePropertyToArray(value: UIProperty, array: Float32Array, offset: number, affine?: boolean): void;
|
|
9
13
|
export declare const BUILTIN_TRANSFORM = "instanceTransform";
|
|
10
14
|
export declare const BUILTIN_VISIBILITY = "instanceVisibility";
|
|
11
15
|
export declare const BUILTIN_BLEND = "instanceBlend";
|
|
12
16
|
export declare const BUILTIN_HSL = "instanceHSL";
|
|
13
|
-
|
|
17
|
+
/** Rows of the layer -> mask-local map, see MASK_DATA_SIZE; present on masked planes only */
|
|
18
|
+
export declare const BUILTIN_MASK_ROW0 = "instanceMaskRow0";
|
|
19
|
+
export declare const BUILTIN_MASK_ROW1 = "instanceMaskRow1";
|
|
20
|
+
/** Half width, half height, corner radius and softness of the mask */
|
|
21
|
+
export declare const BUILTIN_MASK_SHAPE = "instanceMaskShape";
|
|
22
|
+
/** Mask shape + 2 when inverted */
|
|
23
|
+
export declare const BUILTIN_MASK_MODE = "instanceMaskMode";
|
|
24
|
+
export declare function buildPlaneLayout(varyingProperties: Record<string, GLProperty>, masked: boolean): PackedLayout;
|
|
14
25
|
export declare function buildPackedAttribute(itemSize: number, capacity: number): InstancedBufferAttribute;
|
|
15
|
-
export declare function buildMaterial(source: string, uniformProperties: Record<string, GLProperty>, layout: PackedLayout, transparency: UITransparencyMode):
|
|
26
|
+
export declare function buildMaterial(source: string, uniformProperties: Record<string, GLProperty>, layout: PackedLayout, transparency: UITransparencyMode, masked: boolean): {
|
|
27
|
+
material: ShaderMaterial;
|
|
28
|
+
varyingRowCount: number;
|
|
29
|
+
};
|
|
16
30
|
/**
|
|
17
31
|
* Shift buffer region within the same array.
|
|
18
32
|
* Uses copyWithin for efficient memory moves with correct overlap handling.
|