laymur 0.25.1 → 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.
Files changed (120) hide show
  1. package/README.md +41 -5
  2. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +2 -2
  3. package/dist/core/elements/UIAnchor/UIAnchor.js +3 -2
  4. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +3 -0
  5. package/dist/core/elements/UIDummy/UIDummy.d.ts +32 -0
  6. package/dist/core/elements/UIDummy/UIDummy.js +101 -2
  7. package/dist/core/elements/UIElement/UIElement.d.ts +23 -1
  8. package/dist/core/elements/UIElement/UIElement.js +50 -3
  9. package/dist/core/elements/UIGraphics/UIGraphics.js +2 -2
  10. package/dist/core/elements/UIProgress/UIProgress.js +2 -5
  11. package/dist/core/elements/UIScene/UIScene.js +3 -2
  12. package/dist/core/elements/UIText/UIText.js +2 -2
  13. package/dist/core/index.d.ts +53 -4
  14. package/dist/core/index.js +15 -2
  15. package/dist/core/layers/UILayer/UILayer.d.ts +11 -1
  16. package/dist/core/layers/UILayer/UILayer.js +37 -2
  17. package/dist/core/miscellaneous/UIAffineMatrix3.d.ts +13 -0
  18. package/dist/core/miscellaneous/UIAffineMatrix3.js +13 -0
  19. package/dist/core/miscellaneous/area/UIArea.d.ts +10 -1
  20. package/dist/core/miscellaneous/area/UIArea.js +4 -1
  21. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -0
  22. package/dist/core/miscellaneous/area/UIAreaCircle.js +0 -1
  23. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +1 -0
  24. package/dist/core/miscellaneous/area/UIAreaPolygon.js +0 -1
  25. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -0
  26. package/dist/core/miscellaneous/area/UIAreaRectangle.js +0 -1
  27. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -0
  28. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +0 -1
  29. package/dist/core/miscellaneous/asserts.d.ts +9 -0
  30. package/dist/core/miscellaneous/asserts.js +16 -0
  31. package/dist/core/miscellaneous/color/UIColor.js +1 -0
  32. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +17 -3
  33. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +88 -26
  34. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +9 -0
  35. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +29 -6
  36. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +51 -11
  37. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +2 -0
  38. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +47 -6
  39. package/dist/core/miscellaneous/generic-plane/shared.d.ts +15 -3
  40. package/dist/core/miscellaneous/generic-plane/shared.js +38 -7
  41. package/dist/core/miscellaneous/generic-plane/varyingPacking.d.ts +46 -0
  42. package/dist/core/miscellaneous/generic-plane/varyingPacking.js +170 -0
  43. package/dist/core/miscellaneous/mask/UIMask.Internal.d.ts +61 -0
  44. package/dist/core/miscellaneous/mask/UIMask.Internal.js +56 -0
  45. package/dist/core/miscellaneous/mask/UIMask.d.ts +84 -0
  46. package/dist/core/miscellaneous/mask/UIMask.js +265 -0
  47. package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.d.ts +50 -0
  48. package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.js +233 -0
  49. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +10 -1
  50. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +7 -1
  51. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +2 -0
  52. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +0 -1
  53. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -0
  54. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +0 -1
  55. package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +3 -0
  56. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +1 -0
  57. package/dist/core/miscellaneous/micro/UIMicro.d.ts +18 -1
  58. package/dist/core/miscellaneous/micro/UIMicro.js +23 -2
  59. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +16 -1
  60. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +8 -2
  61. package/dist/core/miscellaneous/texture/UITextureView.d.ts +2 -1
  62. package/dist/core/miscellaneous/texture/UITextureView.js +3 -2
  63. package/dist/core/shaders/UIMask.d.ts +15 -0
  64. package/dist/core/shaders/UIMask.js +45 -0
  65. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +0 -1
  66. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +2 -0
  67. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +1 -0
  68. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +3 -0
  69. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +0 -1
  70. package/dist/debug/index.d.ts +2 -0
  71. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +7 -0
  72. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +0 -2
  73. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +7 -1
  74. package/dist/particles/behaviorModules/UIBehaviorModule.js +2 -1
  75. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +7 -0
  76. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +0 -2
  77. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +7 -0
  78. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +0 -2
  79. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +7 -0
  80. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +0 -2
  81. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +7 -0
  82. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +0 -2
  83. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +7 -0
  84. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +0 -2
  85. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +7 -0
  86. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +0 -2
  87. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +7 -0
  88. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +0 -2
  89. package/dist/particles/elements/UIEmitter.Internal.d.ts +7 -0
  90. package/dist/particles/elements/UIEmitter.d.ts +1 -8
  91. package/dist/particles/index.d.ts +5 -0
  92. package/dist/particles/index.js +3 -0
  93. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +11 -2
  94. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +101 -72
  95. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +1 -0
  96. package/dist/particles/instancedParticle/UIInstancedParticle.js +4 -2
  97. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +4 -0
  98. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +0 -2
  99. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +4 -0
  100. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +0 -2
  101. package/dist/particles/renderingModules/UIRenderingModule.d.ts +10 -1
  102. package/dist/particles/renderingModules/UIRenderingModule.js +3 -1
  103. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +4 -0
  104. package/dist/particles/spawnModules/UISpawnModule.d.ts +13 -1
  105. package/dist/particles/spawnModules/UISpawnModule.js +3 -1
  106. package/dist/particles/spawnModules/UISpawnOffset.d.ts +7 -0
  107. package/dist/particles/spawnModules/UISpawnOffset.js +0 -2
  108. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +7 -0
  109. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +0 -2
  110. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +7 -0
  111. package/dist/particles/spawnModules/UISpawnRandomRotation.js +0 -2
  112. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +7 -0
  113. package/dist/particles/spawnModules/UISpawnRandomScale.js +0 -2
  114. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +7 -0
  115. package/dist/particles/spawnModules/UISpawnRandomTorque.js +0 -2
  116. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +7 -0
  117. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +0 -2
  118. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +7 -0
  119. package/dist/particles/spawnModules/UISpawnRectangle.js +0 -2
  120. package/package.json +1 -1
@@ -1,44 +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";
30
+ export type { UIAnchorOptions } from "./elements/UIAnchor/UIAnchor.Internal.js";
17
31
  export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
18
32
  export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
33
+ export type { UIAnimatedImageOptions } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
19
34
  export { UIDummy } from "./elements/UIDummy/UIDummy.js";
20
- export type { UIInputEventData } from "./elements/UIDummy/UIDummy.Internal.js";
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";
21
38
  export { UIGraphics } from "./elements/UIGraphics/UIGraphics.js";
39
+ export type { UIGraphicsOptions } from "./elements/UIGraphics/UIGraphics.Internal.js";
22
40
  export { UIImage } from "./elements/UIImage/UIImage.js";
41
+ export type { UIImageOptions } from "./elements/UIImage/UIImage.Internal.js";
23
42
  export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
24
43
  export { UINineSliceRegionMode } from "./elements/UINineSlice/UINineSlice.Internal.js";
44
+ export type { UINineSliceOptions } from "./elements/UINineSlice/UINineSlice.Internal.js";
25
45
  export { UIProgress } from "./elements/UIProgress/UIProgress.js";
46
+ export type { UIProgressOptions } from "./elements/UIProgress/UIProgress.Internal.js";
26
47
  export { UIScene } from "./elements/UIScene/UIScene.js";
27
48
  export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal.js";
49
+ export type { UISceneOptions } from "./elements/UIScene/UIScene.Internal.js";
28
50
  export { UIText } from "./elements/UIText/UIText.js";
51
+ export type { UITextContent } from "./elements/UIText/UIText.Interfaces.js";
29
52
  export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
53
+ export type { UITextOptions } from "./elements/UIText/UIText.Internal.js";
30
54
  export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer.js";
31
- export type { UIFullscreenLayerInputEventData } from "./layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js";
55
+ export type { UIFullscreenLayerInputEventData, UIFullscreenLayerOptions, } from "./layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js";
32
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";
33
59
  export { UIAreaCircle } from "./miscellaneous/area/UIAreaCircle.js";
34
60
  export { UIAreaPolygon } from "./miscellaneous/area/UIAreaPolygon.js";
35
61
  export { UIAreaRectangle } from "./miscellaneous/area/UIAreaRectangle.js";
36
62
  export { UIAreaRoundedRectangle } from "./miscellaneous/area/UIAreaRoundedRectangle.js";
63
+ export type { UICanvas, UICanvasRenderingContext2D } from "./miscellaneous/canvas.js";
37
64
  export { UIColor } from "./miscellaneous/color/UIColor.js";
65
+ export type { UIColorConfig, UIColorName } from "./miscellaneous/color/UIColor.Internal.js";
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";
38
71
  export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
39
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";
40
78
  export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
41
79
  export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
80
+ export type { UIMicroConfig } from "./miscellaneous/micro/UIMicro.Internal.js";
81
+ export { UIResizePolicy } from "./miscellaneous/resize-policy/UIResizePolicy.js";
42
82
  export { UIResizePolicyCover } from "./miscellaneous/resize-policy/UIResizePolicyCover.js";
43
83
  export { UIResizePolicyCross } from "./miscellaneous/resize-policy/UIResizePolicyCross.js";
44
84
  export { UIResizePolicyCrossInverted } from "./miscellaneous/resize-policy/UIResizePolicyCrossInverted.js";
@@ -46,10 +86,19 @@ export { UIResizePolicyFit } from "./miscellaneous/resize-policy/UIResizePolicyF
46
86
  export { UIResizePolicyFixedHeight } from "./miscellaneous/resize-policy/UIResizePolicyFixedHeight.js";
47
87
  export { UIResizePolicyFixedWidth } from "./miscellaneous/resize-policy/UIResizePolicyFixedWidth.js";
48
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";
49
98
  export { UIExpression } from "./miscellaneous/UIExpression.js";
50
- export { UIMode } from "./miscellaneous/UIMode.js";
99
+ export { isUIModeInteractive, isUIModeVisible, UIMode } from "./miscellaneous/UIMode.js";
51
100
  export { UIOrientation } from "./miscellaneous/UIOrientation.js";
52
101
  export { UIPriority } from "./miscellaneous/UIPriority.js";
53
102
  export { UIRelation } from "./miscellaneous/UIRelation.js";
54
103
  export { UITransparencyMode } from "./miscellaneous/UITransparencyMode.js";
55
- export { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
104
+ export type { UISceneWrapperView } from "./wrappers/UISceneWrapper/UISceneWrapper.Internal.js";
@@ -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,15 +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";
38
+ export { computeTransformMatrix } from "./miscellaneous/computeTransform.js";
39
+ export { UIInsets } from "./miscellaneous/insets/UIInsets.js";
40
+ export { UIProgressMaskFunction } from "./miscellaneous/mask-function/UIProgressMaskFunction.js";
36
41
  export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
37
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";
38
46
  export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
39
47
  export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
48
+ export { UIResizePolicy } from "./miscellaneous/resize-policy/UIResizePolicy.js";
40
49
  export { UIResizePolicyCover } from "./miscellaneous/resize-policy/UIResizePolicyCover.js";
41
50
  export { UIResizePolicyCross } from "./miscellaneous/resize-policy/UIResizePolicyCross.js";
42
51
  export { UIResizePolicyCrossInverted } from "./miscellaneous/resize-policy/UIResizePolicyCrossInverted.js";
@@ -44,10 +53,14 @@ export { UIResizePolicyFit } from "./miscellaneous/resize-policy/UIResizePolicyF
44
53
  export { UIResizePolicyFixedHeight } from "./miscellaneous/resize-policy/UIResizePolicyFixedHeight.js";
45
54
  export { UIResizePolicyFixedWidth } from "./miscellaneous/resize-policy/UIResizePolicyFixedWidth.js";
46
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";
47
61
  export { UIExpression } from "./miscellaneous/UIExpression.js";
48
- export { UIMode } from "./miscellaneous/UIMode.js";
62
+ export { isUIModeInteractive, isUIModeVisible, UIMode } from "./miscellaneous/UIMode.js";
49
63
  export { UIOrientation } from "./miscellaneous/UIOrientation.js";
50
64
  export { UIPriority } from "./miscellaneous/UIPriority.js";
51
65
  export { UIRelation } from "./miscellaneous/UIRelation.js";
52
66
  export { UITransparencyMode } from "./miscellaneous/UITransparencyMode.js";
53
- export { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
@@ -3,7 +3,9 @@ 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";
8
+ import type { UISceneWrapperView } from "../../wrappers/UISceneWrapper/UISceneWrapper.Internal.js";
7
9
  import type { UILayerMode, UILayerOptions, UILayerOrientation } from "./UILayer.Internal.js";
8
10
  /** Base layer for UI rendering and layout management */
9
11
  export declare abstract class UILayer implements UIPlaneElement {
@@ -30,8 +32,14 @@ export declare abstract class UILayer implements UIPlaneElement {
30
32
  private readonly signalConstraintRemovedInternal;
31
33
  private readonly constraintRegistryInternal;
32
34
  private readonly elementRegistryInternal;
35
+ private readonly maskRegistryInternal;
33
36
  private destroyedInternal;
34
37
  constructor(options: Partial<UILayerOptions>);
38
+ /**
39
+ * Scene of the layer. Elements living outside laymur, such as Spine skeletons, use it to add
40
+ * their own objects ordered among the planes.
41
+ */
42
+ get sceneWrapper(): UISceneWrapperView;
35
43
  /** X coordinate in world units (always 0 for layers) */
36
44
  get x(): number;
37
45
  /** Y coordinate in world units (always 0 for layers) */
@@ -68,12 +76,14 @@ export declare abstract class UILayer implements UIPlaneElement {
68
76
  get constraintRegistry(): readonly UIConstraint[];
69
77
  /** Elements created on the layer and not destroyed yet */
70
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[];
71
81
  /** Whether the layer is destroyed */
72
82
  get destroyed(): boolean;
73
83
  /** Updates visibility and interactivity mode */
74
84
  set mode(value: UILayerMode);
75
85
  /**
76
- * Destroys all elements and constraints of the layer, those snapped to the layer itself
86
+ * Destroys all elements, constraints and masks of the layer, those tied to the layer itself
77
87
  * included, and frees the GPU resources of the layer. Textures are left to their owners.
78
88
  * Does nothing if the layer is already destroyed.
79
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");
@@ -40,7 +41,10 @@ export class UILayer {
40
41
  this.wVariable = this.solverWrapperInternal.createVariable(width, UIPriority.P0);
41
42
  this.hVariable = this.solverWrapperInternal.createVariable(height, UIPriority.P0);
42
43
  }
43
- /** @internal */
44
+ /**
45
+ * Scene of the layer. Elements living outside laymur, such as Spine skeletons, use it to add
46
+ * their own objects ordered among the planes.
47
+ */
44
48
  get sceneWrapper() {
45
49
  return this.sceneWrapperInternal;
46
50
  }
@@ -124,6 +128,10 @@ export class UILayer {
124
128
  get elementRegistry() {
125
129
  return this.elementRegistryInternal;
126
130
  }
131
+ /** Masks whose source is the layer or one of its elements, not destroyed yet */
132
+ get maskRegistry() {
133
+ return this.maskRegistryInternal;
134
+ }
127
135
  /** Whether the layer is destroyed */
128
136
  get destroyed() {
129
137
  return this.destroyedInternal;
@@ -136,7 +144,7 @@ export class UILayer {
136
144
  }
137
145
  }
138
146
  /**
139
- * Destroys all elements and constraints of the layer, those snapped to the layer itself
147
+ * Destroys all elements, constraints and masks of the layer, those tied to the layer itself
140
148
  * included, and frees the GPU resources of the layer. Textures are left to their owners.
141
149
  * Does nothing if the layer is already destroyed.
142
150
  */
@@ -148,6 +156,7 @@ export class UILayer {
148
156
  for (const element of [...this.elementRegistryInternal]) {
149
157
  element.destroy();
150
158
  }
159
+ this.destroyMasksUsingSource(this);
151
160
  this.destroyConstraints(() => true);
152
161
  this.sceneWrapperInternal.destroy();
153
162
  }
@@ -159,6 +168,32 @@ export class UILayer {
159
168
  destroyConstraintsUsingVariables(variables) {
160
169
  this.destroyConstraints((constraint) => variables.some((variable) => constraint.isUsingVariable(variable)));
161
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
+ }
162
197
  /** @internal */
163
198
  addElement(element) {
164
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
- /** Base class for interaction area shapes */
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
  }
@@ -1,3 +1,6 @@
1
- /** Base class for interaction area shapes */
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 class UIArea {
3
6
  }
@@ -12,4 +12,5 @@ export declare class UIAreaCircle extends UIArea {
12
12
  * @param radius - Radius in normalized coordinates (0 to 1)
13
13
  */
14
14
  constructor(centerX: number, centerY: number, radius: number);
15
+ contains(pointX: number, pointY: number): boolean;
15
16
  }
@@ -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");
@@ -9,4 +9,5 @@ export declare class UIAreaPolygon extends UIArea {
9
9
  * @param vertices - Vertices in normalized coordinates (0 to 1)
10
10
  */
11
11
  constructor(vertices: Vector2Like[]);
12
+ contains(pointX: number, pointY: number): boolean;
12
13
  }
@@ -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");
@@ -14,4 +14,5 @@ export declare class UIAreaRectangle extends UIArea {
14
14
  * @param height - Height in normalized coordinates (0 to 1)
15
15
  */
16
16
  constructor(x: number, y: number, width: number, height: number);
17
+ contains(pointX: number, pointY: number): boolean;
17
18
  }
@@ -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
- export declare function writePropertyToArray(value: UIProperty, array: Float32Array, offset: number): void;
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
- export declare function buildPlaneLayout(varyingProperties: Record<string, GLProperty>): PackedLayout;
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): ShaderMaterial;
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.