laymur 0.25.2 → 0.27.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 (186) hide show
  1. package/README.md +114 -34
  2. package/dist/core/constraints/UICustomConstraint.d.ts +1 -1
  3. package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +1 -1
  4. package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +1 -1
  5. package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +2 -3
  6. package/dist/core/elements/UIAnchor/UIAnchor.d.ts +2 -2
  7. package/dist/core/elements/UIAnchor/UIAnchor.js +3 -2
  8. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +2 -2
  9. package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +24 -12
  10. package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +13 -0
  11. package/dist/core/elements/UIDummy/UIDummy.d.ts +74 -5
  12. package/dist/core/elements/UIDummy/UIDummy.js +222 -29
  13. package/dist/core/elements/UIElement/UIElement.Internal.d.ts +1 -1
  14. package/dist/core/elements/UIElement/UIElement.d.ts +37 -1
  15. package/dist/core/elements/UIElement/UIElement.js +84 -6
  16. package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +1 -1
  17. package/dist/core/elements/UIGraphics/UIGraphics.d.ts +1 -1
  18. package/dist/core/elements/UIGraphics/UIGraphics.js +4 -4
  19. package/dist/core/elements/UIImage/UIImage.d.ts +2 -2
  20. package/dist/core/elements/UIImage/UIImage.js +10 -8
  21. package/dist/core/elements/UINineSlice/UINineSlice.d.ts +4 -4
  22. package/dist/core/elements/UINineSlice/UINineSlice.js +11 -9
  23. package/dist/core/elements/UIProgress/UIProgress.d.ts +2 -2
  24. package/dist/core/elements/UIProgress/UIProgress.js +17 -15
  25. package/dist/core/elements/UIScene/UIScene.Internal.d.ts +1 -1
  26. package/dist/core/elements/UIScene/UIScene.d.ts +3 -2
  27. package/dist/core/elements/UIScene/UIScene.js +21 -14
  28. package/dist/core/elements/UIText/UIText.Measuring.d.ts +1 -1
  29. package/dist/core/elements/UIText/UIText.d.ts +3 -3
  30. package/dist/core/elements/UIText/UIText.js +8 -8
  31. package/dist/core/index.d.ts +60 -11
  32. package/dist/core/index.js +22 -7
  33. package/dist/core/layers/UILayer/UILayer.d.ts +45 -5
  34. package/dist/core/layers/UILayer/UILayer.js +103 -10
  35. package/dist/core/layers/UIViewportLayer/UIViewportLayer.Internal.d.ts +27 -0
  36. package/dist/core/layers/{UIFullscreenLayer/UIFullscreenLayer.Internal.js → UIViewportLayer/UIViewportLayer.Internal.js} +1 -1
  37. package/dist/core/layers/UIViewportLayer/UIViewportLayer.d.ts +98 -0
  38. package/dist/core/layers/UIViewportLayer/UIViewportLayer.js +251 -0
  39. package/dist/core/miscellaneous/UIAffineMatrix3.d.ts +13 -0
  40. package/dist/core/miscellaneous/UIAffineMatrix3.js +13 -0
  41. package/dist/core/miscellaneous/area/UIArea.d.ts +10 -1
  42. package/dist/core/miscellaneous/area/UIArea.js +4 -1
  43. package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -0
  44. package/dist/core/miscellaneous/area/UIAreaCircle.js +0 -1
  45. package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +1 -0
  46. package/dist/core/miscellaneous/area/UIAreaPolygon.js +0 -1
  47. package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -0
  48. package/dist/core/miscellaneous/area/UIAreaRectangle.js +0 -1
  49. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -0
  50. package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +0 -1
  51. package/dist/core/miscellaneous/asserts.d.ts +23 -0
  52. package/dist/core/miscellaneous/asserts.js +44 -0
  53. package/dist/core/miscellaneous/canvas.js +7 -2
  54. package/dist/core/miscellaneous/color/UIColor.js +5 -2
  55. package/dist/core/miscellaneous/computeTransform.d.ts +12 -0
  56. package/dist/core/miscellaneous/computeTransform.js +20 -0
  57. package/dist/core/miscellaneous/context-monitor/UIContextMonitor.d.ts +1 -0
  58. package/dist/core/miscellaneous/context-monitor/UIContextMonitor.js +60 -0
  59. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +17 -3
  60. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +88 -26
  61. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +9 -0
  62. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +29 -6
  63. package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +51 -11
  64. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +2 -0
  65. package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +47 -6
  66. package/dist/core/miscellaneous/generic-plane/shared.d.ts +15 -3
  67. package/dist/core/miscellaneous/generic-plane/shared.js +38 -7
  68. package/dist/core/miscellaneous/generic-plane/varyingPacking.d.ts +46 -0
  69. package/dist/core/miscellaneous/generic-plane/varyingPacking.js +170 -0
  70. package/dist/core/miscellaneous/mask/UIMask.Internal.d.ts +61 -0
  71. package/dist/core/miscellaneous/mask/UIMask.Internal.js +56 -0
  72. package/dist/core/miscellaneous/mask/UIMask.d.ts +84 -0
  73. package/dist/core/miscellaneous/mask/UIMask.js +265 -0
  74. package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.d.ts +50 -0
  75. package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.js +233 -0
  76. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +10 -1
  77. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +7 -1
  78. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +2 -0
  79. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +0 -1
  80. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -0
  81. package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +0 -1
  82. package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +3 -0
  83. package/dist/core/miscellaneous/micro/UIMicro.Internal.js +1 -0
  84. package/dist/core/miscellaneous/micro/UIMicro.d.ts +18 -1
  85. package/dist/core/miscellaneous/micro/UIMicro.js +23 -2
  86. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +19 -1
  87. package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +16 -3
  88. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +2 -2
  89. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +2 -2
  90. package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +2 -2
  91. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +2 -2
  92. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +2 -2
  93. package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +2 -2
  94. package/dist/core/miscellaneous/text-style/UITextStyle.js +2 -2
  95. package/dist/core/miscellaneous/texture/UITextureView.d.ts +6 -2
  96. package/dist/core/miscellaneous/texture/UITextureView.js +13 -9
  97. package/dist/core/miscellaneous/viewport/UIElementViewport.d.ts +31 -0
  98. package/dist/core/miscellaneous/viewport/UIElementViewport.js +54 -0
  99. package/dist/core/miscellaneous/viewport/UIViewport.d.ts +37 -0
  100. package/dist/core/miscellaneous/viewport/UIViewport.js +31 -0
  101. package/dist/core/miscellaneous/viewport/UIWindowViewport.d.ts +13 -0
  102. package/dist/core/miscellaneous/viewport/UIWindowViewport.js +25 -0
  103. package/dist/core/miscellaneous/webglCapabilities.js +61 -55
  104. package/dist/core/shaders/UIMask.d.ts +15 -0
  105. package/dist/core/shaders/UIMask.js +45 -0
  106. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +36 -5
  107. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +23 -2
  108. package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +153 -15
  109. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +3 -1
  110. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +1 -0
  111. package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +3 -0
  112. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +2 -0
  113. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +3 -0
  114. package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +36 -16
  115. package/dist/debug/UIAspectDebug.js +4 -0
  116. package/dist/debug/UIHeightDebug.js +4 -0
  117. package/dist/debug/UIHorizontalDistanceDebug.js +5 -0
  118. package/dist/debug/UIHorizontalInterpolationDebug.js +5 -0
  119. package/dist/debug/UILayerDebug.d.ts +7 -0
  120. package/dist/debug/UILayerDebug.js +21 -0
  121. package/dist/debug/UIVerticalDistanceDebug.js +5 -0
  122. package/dist/debug/UIVerticalInterpolationDebug.js +5 -0
  123. package/dist/debug/UIWidthDebug.js +4 -0
  124. package/dist/debug/index.d.ts +2 -0
  125. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +8 -1
  126. package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +0 -2
  127. package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +12 -2
  128. package/dist/particles/behaviorModules/UIBehaviorModule.js +2 -1
  129. package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +8 -1
  130. package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +13 -12
  131. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +7 -0
  132. package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +6 -6
  133. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +7 -0
  134. package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +4 -5
  135. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +8 -1
  136. package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +8 -10
  137. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +10 -2
  138. package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +8 -7
  139. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +7 -0
  140. package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +8 -10
  141. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +13 -4
  142. package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +12 -10
  143. package/dist/particles/elements/UIEmitter.Internal.d.ts +21 -1
  144. package/dist/particles/elements/UIEmitter.Internal.js +6 -0
  145. package/dist/particles/elements/UIEmitter.d.ts +20 -11
  146. package/dist/particles/elements/UIEmitter.js +100 -54
  147. package/dist/particles/index.d.ts +7 -1
  148. package/dist/particles/index.js +4 -0
  149. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +19 -4
  150. package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +117 -83
  151. package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +8 -0
  152. package/dist/particles/instancedParticle/UIInstancedParticle.js +41 -4
  153. package/dist/particles/miscellaneous/miscellaneous.d.ts +34 -0
  154. package/dist/particles/miscellaneous/miscellaneous.js +72 -0
  155. package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +4 -0
  156. package/dist/particles/renderingModules/UIRenderingColorOverLife.js +2 -4
  157. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +4 -0
  158. package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +2 -5
  159. package/dist/particles/renderingModules/UIRenderingModule.d.ts +11 -1
  160. package/dist/particles/renderingModules/UIRenderingModule.js +4 -1
  161. package/dist/particles/renderingModules/UIRenderingTexture.d.ts +4 -0
  162. package/dist/particles/renderingModules/UIRenderingTexture.js +2 -1
  163. package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +1 -2
  164. package/dist/particles/shaders/UIRenderingColorOverLife.js +5 -3
  165. package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +1 -9
  166. package/dist/particles/shaders/UIRenderingColorOverVelocity.js +6 -13
  167. package/dist/particles/spawnModules/UISpawnModule.d.ts +16 -1
  168. package/dist/particles/spawnModules/UISpawnModule.js +3 -1
  169. package/dist/particles/spawnModules/UISpawnOffset.d.ts +7 -0
  170. package/dist/particles/spawnModules/UISpawnOffset.js +0 -2
  171. package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +8 -1
  172. package/dist/particles/spawnModules/UISpawnRandomLifetime.js +5 -7
  173. package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +7 -0
  174. package/dist/particles/spawnModules/UISpawnRandomRotation.js +5 -5
  175. package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +7 -0
  176. package/dist/particles/spawnModules/UISpawnRandomScale.js +4 -5
  177. package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +7 -0
  178. package/dist/particles/spawnModules/UISpawnRandomTorque.js +5 -5
  179. package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +7 -0
  180. package/dist/particles/spawnModules/UISpawnRandomVelocity.js +6 -6
  181. package/dist/particles/spawnModules/UISpawnRectangle.d.ts +7 -0
  182. package/dist/particles/spawnModules/UISpawnRectangle.js +6 -6
  183. package/package.json +13 -4
  184. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +0 -21
  185. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -63
  186. package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +0 -144
@@ -1,10 +1,10 @@
1
1
  import type { UILayer } from "../../layers/UILayer/UILayer.js";
2
- import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
2
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
4
- import { UIInsets } from "../../miscellaneous/insets/UIInsets.js";
3
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
5
4
  import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal.js";
6
- import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
5
+ import { UIInsets } from "../../miscellaneous/insets/UIInsets.js";
7
6
  import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal.js";
7
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
8
8
  import { UIElement } from "../UIElement/UIElement.js";
9
9
  import type { UINineSliceOptions } from "./UINineSlice.Internal.js";
10
10
  import { UINineSliceRegionMode } from "./UINineSlice.Internal.js";
@@ -54,7 +54,7 @@ export declare class UINineSlice extends UIElement {
54
54
  protected setPlaneTransform(): void;
55
55
  private calculateSliceBordersForShader;
56
56
  private calculateSliceRegionsForShader;
57
- private checkElementDimensionsDirty;
57
+ private consumeElementDimensionsChange;
58
58
  private setElementDimensionsDirtyFalse;
59
59
  private readonly onTextureDimensionsChanged;
60
60
  }
@@ -21,8 +21,12 @@ export class UINineSlice extends UIElement {
21
21
  const color = new UIColor(options.color);
22
22
  const textureView = new UITextureView(texture);
23
23
  const textureTransform = textureView.calculateUVTransform();
24
- options.width = options.width ?? textureView.width;
25
- options.height = options.height ?? textureView.height;
24
+ // A copy: the caller may pass the same options to several elements
25
+ options = {
26
+ ...options,
27
+ width: options.width ?? textureView.width,
28
+ height: options.height ?? textureView.height,
29
+ };
26
30
  const sliceBorders = new UIInsets(options.sliceBorders ?? NINE_SLICE_DEFAULT_BORDER);
27
31
  const sliceRegions = new UIInsets(options.sliceRegions ?? NINE_SLICE_DEFAULT_BORDER);
28
32
  const regionMode = options.regionMode ?? NINE_SLICE_DEFAULT_REGION_MODE;
@@ -106,7 +110,7 @@ export class UINineSlice extends UIElement {
106
110
  const sliceRegionsDirty = this.sliceRegionsInternal.dirty ||
107
111
  this.regionModeDirty ||
108
112
  (this.regionModeInternal === UINineSliceRegionMode.WORLD &&
109
- this.checkElementDimensionsDirty());
113
+ this.consumeElementDimensionsChange());
110
114
  if (sliceRegionsDirty) {
111
115
  properties ?? (properties = {});
112
116
  properties["sliceRegions"] = this.calculateSliceRegionsForShader(this.sliceRegionsVector);
@@ -132,16 +136,14 @@ export class UINineSlice extends UIElement {
132
136
  if (properties) {
133
137
  this.sceneWrapper.setProperties(this.planeHandler, properties);
134
138
  }
135
- const isTransformDirty = this.micro.dirty ||
136
- this.texture.trimDirty ||
137
- this.inputWrapper.dirty ||
138
- this.solverWrapper.dirty;
139
+ const isTransformDirty = this.micro.dirty || this.texture.trimDirty || this.placementDirty;
139
140
  if (isTransformDirty) {
140
141
  const micro = this.micro;
141
142
  const textureTrim = this.texture.trim;
142
143
  this.sceneWrapper.setTransform(this.planeHandler, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.renderDepth, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom));
143
144
  this.micro.setDirtyFalse();
144
145
  this.texture.setTrimDirtyFalse();
146
+ this.setPlacementDirtyFalse();
145
147
  }
146
148
  }
147
149
  calculateSliceBordersForShader(result) {
@@ -174,8 +176,8 @@ export class UINineSlice extends UIElement {
174
176
  const height = this.height;
175
177
  return result.set(this.sliceRegionsInternal.left / width, this.sliceRegionsInternal.right / width, this.sliceRegionsInternal.top / height, this.sliceRegionsInternal.bottom / height);
176
178
  }
177
- checkElementDimensionsDirty() {
178
- return (this.solverWrapper.dirty &&
179
+ consumeElementDimensionsChange() {
180
+ return (this.consumeLayoutChange() &&
179
181
  (this.lastElementWidth !== Math.round(this.width) ||
180
182
  this.lastElementHeight !== Math.round(this.height)));
181
183
  }
@@ -1,9 +1,9 @@
1
1
  import type { UILayer } from "../../layers/UILayer/UILayer.js";
2
- import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
2
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
3
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
4
4
  import type { UIProgressMaskFunction } from "../../miscellaneous/mask-function/UIProgressMaskFunction.js";
5
- import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
6
5
  import type { UITextureConfig } from "../../miscellaneous/texture/UITextureView.Internal.js";
6
+ import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
7
7
  import { UIElement } from "../UIElement/UIElement.js";
8
8
  import type { UIProgressOptions } from "./UIProgress.Internal.js";
9
9
  /** Progress bar with customizable fill direction */
@@ -1,13 +1,11 @@
1
1
  import { MathUtils } from "three";
2
2
  import { assertValidNumber } from "../../miscellaneous/asserts.js";
3
3
  import { UIColor } from "../../miscellaneous/color/UIColor.js";
4
- import { computeTrimmedTransformMatrix } from "../../miscellaneous/computeTransform.js";
4
+ import { computeTrimmedTransformMatrix, scaleTrim } from "../../miscellaneous/computeTransform.js";
5
5
  import { UIProgressMaskFunctionDirectional } from "../../miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
6
6
  import { UITextureView } from "../../miscellaneous/texture/UITextureView.js";
7
- import { isUIModeVisible } from "../../miscellaneous/UIMode.js";
8
7
  import source from "../../shaders/UIProgress.js";
9
8
  import { UIElement } from "../UIElement/UIElement.js";
10
- import { blendModeToFactor, packHSL } from "../UIElement/UIElement.Internal.js";
11
9
  import { PROGRESS_DEFAULT_VALUE } from "./UIProgress.Internal.js";
12
10
  /** Progress bar with customizable fill direction */
13
11
  export class UIProgress extends UIElement {
@@ -28,8 +26,12 @@ export class UIProgress extends UIElement {
28
26
  const textureView = new UITextureView(texture);
29
27
  const textureTransform = textureView.calculateUVTransform();
30
28
  const textureResolution = textureView.getResolution();
31
- options.width = options.width ?? textureView.width;
32
- options.height = options.height ?? textureView.height;
29
+ // A copy: the caller may pass the same options to several elements
30
+ options = {
31
+ ...options,
32
+ width: options.width ?? textureView.width,
33
+ height: options.height ?? textureView.height,
34
+ };
33
35
  const progress = MathUtils.clamp(options.progress ?? PROGRESS_DEFAULT_VALUE, 0, 1);
34
36
  const maskFunction = options.maskFunction ?? new UIProgressMaskFunctionDirectional();
35
37
  super(layer, maskFunction.source + source, {
@@ -43,10 +45,12 @@ export class UIProgress extends UIElement {
43
45
  this.progressDirty = false;
44
46
  this.textureResolutionDirty = false;
45
47
  this.onTextureDimensionsChanged = (width, height) => {
48
+ // The resolution follows the texture even when constraints already hold the element at
49
+ // its size
50
+ this.textureResolutionDirty = true;
46
51
  if (this.width !== width || this.height !== height) {
47
52
  this.width = width;
48
53
  this.height = height;
49
- this.textureResolutionDirty = true;
50
54
  }
51
55
  };
52
56
  this.texture = textureView;
@@ -132,30 +136,27 @@ export class UIProgress extends UIElement {
132
136
  if (properties) {
133
137
  this.sceneWrapper.setProperties(this.planeHandler, properties);
134
138
  }
135
- const isTransformDirty = this.micro.dirty ||
136
- this.texture.trimDirty ||
137
- this.inputWrapper.dirty ||
138
- this.solverWrapper.dirty;
139
+ const isTransformDirty = this.micro.dirty || this.texture.trimDirty || this.placementDirty;
139
140
  if (isTransformDirty) {
140
141
  const micro = this.micro;
141
- const textureTrim = this.texture.trim;
142
+ const textureTrim = scaleTrim(this.texture.trim, this.width, this.height, this.texture.width, this.texture.height);
142
143
  this.sceneWrapper.setTransform(this.planeHandler, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.renderDepth, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom));
143
144
  this.micro.setDirtyFalse();
144
145
  this.texture.setTrimDirtyFalse();
146
+ this.setPlacementDirtyFalse();
145
147
  }
146
148
  }
147
149
  rebuildPlane() {
148
- this.sceneWrapper.destroyPlane(this.planeHandler);
149
150
  const micro = this.micro;
150
- const textureTrim = this.texture.trim;
151
- this.planeHandler = this.sceneWrapper.createPlane(this.maskFunctionInternal.source + source, {
151
+ const textureTrim = scaleTrim(this.texture.trim, this.width, this.height, this.texture.width, this.texture.height);
152
+ this.recreatePlane(this.maskFunctionInternal.source + source, {
152
153
  texture: this.texture.texture,
153
154
  textureTransform: this.texture.calculateUVTransform(this.textureTransform),
154
155
  textureResolution: this.texture.getResolution(this.textureResolution),
155
156
  color: this.colorInternal,
156
157
  progress: this.progressInternal,
157
158
  ...this.maskFunctionInternal.enumerateProperties(),
158
- }, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.renderDepth, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom), isUIModeVisible(this.mode), this.transparencyMode, blendModeToFactor(this.blendMode), packHSL({ h: 0, s: 0, l: 0 }, this.hue, this.saturation, this.lightness));
159
+ }, computeTrimmedTransformMatrix(this.x, this.y, this.width, this.height, this.renderDepth, micro.x, micro.y, micro.anchorX, micro.anchorY, micro.scaleX, micro.scaleY, micro.rotation, micro.anchorMode, textureTrim.left, textureTrim.right, textureTrim.top, textureTrim.bottom));
159
160
  this.colorInternal.setDirtyFalse();
160
161
  this.texture.setTextureDirtyFalse();
161
162
  this.texture.setUVTransformDirtyFalse();
@@ -164,5 +165,6 @@ export class UIProgress extends UIElement {
164
165
  this.textureResolutionDirty = false;
165
166
  this.maskFunctionInternal.setDirtyFalse();
166
167
  this.micro.setDirtyFalse();
168
+ this.setPlacementDirtyFalse();
167
169
  }
168
170
  }
@@ -1,6 +1,6 @@
1
1
  import type { Camera, Scene } from "three";
2
- import { UIColor } from "../../miscellaneous/color/UIColor.js";
3
2
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
3
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
4
4
  import type { UIElementOptions } from "../UIElement/UIElement.Internal.js";
5
5
  /** Controls when scene re-renders */
6
6
  export declare enum UISceneUpdateMode {
@@ -1,8 +1,8 @@
1
1
  import type { Camera, WebGLRenderer } from "three";
2
2
  import { Scene } from "three";
3
3
  import type { UILayer } from "../../layers/UILayer/UILayer.js";
4
- import { UIColor } from "../../miscellaneous/color/UIColor.js";
5
4
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
5
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
6
6
  import { UIElement } from "../UIElement/UIElement.js";
7
7
  import type { UISceneOptions } from "./UIScene.Internal.js";
8
8
  import { UISceneUpdateMode } from "./UIScene.Internal.js";
@@ -17,7 +17,6 @@ export declare class UIScene extends UIElement {
17
17
  private resolutionFactorInternal;
18
18
  private evenFrame;
19
19
  private updateRequired;
20
- private resolutionFactorDirty;
21
20
  private propertyDirty;
22
21
  /**
23
22
  * Creates a new UIScene instance.
@@ -56,4 +55,6 @@ export declare class UIScene extends UIElement {
56
55
  /** Frees resources of the scene */
57
56
  protected destroyInternal(): void;
58
57
  protected onWillRender(renderer: WebGLRenderer, deltaTime: number): void;
58
+ /** Render target contents live on the GPU only and are gone after a context loss */
59
+ private readonly onContextRestored;
59
60
  }
@@ -1,8 +1,9 @@
1
- import { Color, LinearFilter, MathUtils, Matrix3, PerspectiveCamera, RGBAFormat, Scene, UnsignedByteType, WebGLRenderTarget, } from "three";
1
+ import { Color, LinearFilter, MathUtils, PerspectiveCamera, RGBAFormat, Scene, UnsignedByteType, WebGLRenderTarget, } from "three";
2
2
  import { assertValidPositiveNumber } from "../../miscellaneous/asserts.js";
3
3
  import { UIColor } from "../../miscellaneous/color/UIColor.js";
4
+ import { UIAffineMatrix3 } from "../../miscellaneous/UIAffineMatrix3.js";
4
5
  import source from "../../shaders/UIImage.js";
5
- import { DUMMY_DEFAULT_HEIGHT, DUMMY_DEFAULT_WIDTH, } from "../UIDummy/UIDummy.Internal.js";
6
+ import { DUMMY_DEFAULT_HEIGHT, DUMMY_DEFAULT_WIDTH } from "../UIDummy/UIDummy.Internal.js";
6
7
  import { UIElement } from "../UIElement/UIElement.js";
7
8
  import { SCENE_DEFAULT_CAMERA_FAR, SCENE_DEFAULT_CAMERA_FOV, SCENE_DEFAULT_CAMERA_NEAR, SCENE_DEFAULT_CLEAR_COLOR, SCENE_DEFAULT_RESOLUTION_FACTOR, SCENE_DEFAULT_UPDATE_MODE, SCENE_DEFAULT_USE_DEPTH, SCENE_MAX_RESOLUTION_FACTOR, SCENE_MIN_RESOLUTION_FACTOR, UISceneUpdateMode, } from "./UIScene.Internal.js";
8
9
  let previousClearColor = new Color();
@@ -34,13 +35,16 @@ export class UIScene extends UIElement {
34
35
  const color = new UIColor(options.color);
35
36
  super(layer, source, {
36
37
  texture: renderTarget.texture,
37
- textureTransform: new Matrix3(),
38
+ textureTransform: new UIAffineMatrix3(),
38
39
  color,
39
40
  }, options);
40
41
  this.evenFrame = true;
41
42
  this.updateRequired = false;
42
- this.resolutionFactorDirty = false;
43
43
  this.propertyDirty = false;
44
+ /** Render target contents live on the GPU only and are gone after a context loss */
45
+ this.onContextRestored = () => {
46
+ this.requestUpdate();
47
+ };
44
48
  this.colorInternal = color;
45
49
  this.clearColorInternal = new UIColor(options.clearColor ?? SCENE_DEFAULT_CLEAR_COLOR);
46
50
  this.renderTarget = renderTarget;
@@ -51,6 +55,7 @@ export class UIScene extends UIElement {
51
55
  this.resolutionFactorInternal = resolutionFactor;
52
56
  this.updateModeInternal = options.updateMode ?? SCENE_DEFAULT_UPDATE_MODE;
53
57
  this.propertyDirty = options.updateMode !== UISceneUpdateMode.MANUAL;
58
+ this.layer.signalContextRestored.on(this.onContextRestored);
54
59
  }
55
60
  /** Camera used for rendering */
56
61
  get camera() {
@@ -97,7 +102,6 @@ export class UIScene extends UIElement {
97
102
  value = MathUtils.clamp(value, SCENE_MIN_RESOLUTION_FACTOR, SCENE_MAX_RESOLUTION_FACTOR);
98
103
  if (this.resolutionFactorInternal !== value) {
99
104
  this.resolutionFactorInternal = value;
100
- this.resolutionFactorDirty = true;
101
105
  }
102
106
  }
103
107
  /** Three.js scene to render */
@@ -120,25 +124,27 @@ export class UIScene extends UIElement {
120
124
  }
121
125
  /** Frees resources of the scene */
122
126
  destroyInternal() {
127
+ this.layer.signalContextRestored.off(this.onContextRestored);
123
128
  this.renderTarget.dispose();
124
129
  super.destroyInternal();
125
130
  }
126
131
  onWillRender(renderer, deltaTime) {
127
132
  this.evenFrame = !this.evenFrame;
133
+ // Compared every frame rather than on layout changes, so a size change is kept until a frame
134
+ // that renders the scene applies it
135
+ const targetWidth = this.width * this.resolutionFactorInternal;
136
+ const targetHeight = this.height * this.resolutionFactorInternal;
137
+ const isSizeDirty = this.renderTarget.width !== targetWidth || this.renderTarget.height !== targetHeight;
128
138
  const isFramebufferDirty = this.updateRequired ||
129
139
  this.updateModeInternal === UISceneUpdateMode.EVERY_FRAME ||
130
- (this.updateModeInternal === UISceneUpdateMode.EVERY_SECOND_FRAME &&
131
- this.evenFrame) ||
132
- (this.updateModeInternal === UISceneUpdateMode.ON_PROPERTIES_CHANGE &&
133
- this.propertyDirty) ||
140
+ (this.updateModeInternal === UISceneUpdateMode.EVERY_SECOND_FRAME && this.evenFrame) ||
141
+ (this.updateModeInternal === UISceneUpdateMode.ON_PROPERTIES_CHANGE && this.propertyDirty) ||
134
142
  this.colorInternal.dirty ||
135
143
  this.clearColorInternal.dirty ||
136
- (this.updateModeInternal === UISceneUpdateMode.ON_DIMENSIONS_CHANGE &&
137
- (this.resolutionFactorDirty || this.solverWrapper.dirty));
144
+ (this.updateModeInternal === UISceneUpdateMode.ON_DIMENSIONS_CHANGE && isSizeDirty);
138
145
  if (isFramebufferDirty) {
139
- if (this.resolutionFactorDirty || this.solverWrapper.dirty) {
140
- this.renderTarget.setSize(this.width * this.resolutionFactorInternal, this.height * this.resolutionFactorInternal);
141
- this.resolutionFactorDirty = false;
146
+ if (isSizeDirty) {
147
+ this.renderTarget.setSize(targetWidth, targetHeight);
142
148
  }
143
149
  if (this.colorInternal.dirty) {
144
150
  this.sceneWrapper.setProperties(this.planeHandler, {
@@ -155,6 +161,7 @@ export class UIScene extends UIElement {
155
161
  renderer.render(this.sceneInternal, this.cameraInternal);
156
162
  renderer.setRenderTarget(previousRenderTarget);
157
163
  renderer.setClearColor(previousClearColor, previousClearAlpha);
164
+ this.clearColorInternal.setDirtyFalse();
158
165
  this.propertyDirty = false;
159
166
  this.updateRequired = false;
160
167
  }
@@ -1,7 +1,7 @@
1
1
  import type { UICanvasRenderingContext2D } from "../../miscellaneous/canvas.js";
2
2
  import type { UITextSpan } from "../../miscellaneous/text-span/UITextSpan.js";
3
- import { UITextStyle } from "../../miscellaneous/text-style/UITextStyle.js";
4
3
  import type { UITextStyleConfig } from "../../miscellaneous/text-style/UITextStyle.Internal.js";
4
+ import { UITextStyle } from "../../miscellaneous/text-style/UITextStyle.js";
5
5
  import type { UIChunkMetrics, UITextChunk, UITextLine, UITextSize } from "./UIText.Interfaces.js";
6
6
  /**
7
7
  * Applies font of a resolved style to a canvas context.
@@ -1,9 +1,9 @@
1
1
  import type { WebGLRenderer } from "three";
2
2
  import type { UILayer } from "../../layers/UILayer/UILayer.js";
3
- import { UIColor } from "../../miscellaneous/color/UIColor.js";
4
3
  import type { UIColorConfig } from "../../miscellaneous/color/UIColor.Internal.js";
5
- import { UIInsets } from "../../miscellaneous/insets/UIInsets.js";
4
+ import { UIColor } from "../../miscellaneous/color/UIColor.js";
6
5
  import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal.js";
6
+ import { UIInsets } from "../../miscellaneous/insets/UIInsets.js";
7
7
  import { UITextSpan } from "../../miscellaneous/text-span/UITextSpan.js";
8
8
  import { UITextStyle } from "../../miscellaneous/text-style/UITextStyle.js";
9
9
  import { UIElement } from "../UIElement/UIElement.js";
@@ -84,7 +84,7 @@ export declare class UIText extends UIElement {
84
84
  private updateProperties;
85
85
  private updateAutoPadding;
86
86
  private buildTextChunks;
87
- private checkDimensionsDirty;
87
+ private consumeDimensionsChange;
88
88
  private setDimensionsDirtyFalse;
89
89
  private checkContentDirty;
90
90
  private setContentDirtyFalse;
@@ -1,9 +1,9 @@
1
- import { Matrix3 } from "three";
2
- import { createCanvas, createCanvasTexture } from "../../miscellaneous/canvas.js";
1
+ import { createCanvas, createCanvasTexture, getCanvas2DContext, } from "../../miscellaneous/canvas.js";
3
2
  import { UIColor } from "../../miscellaneous/color/UIColor.js";
4
3
  import { UIInsets } from "../../miscellaneous/insets/UIInsets.js";
5
4
  import { UITextSpan } from "../../miscellaneous/text-span/UITextSpan.js";
6
5
  import { UITextStyle } from "../../miscellaneous/text-style/UITextStyle.js";
6
+ import { UIAffineMatrix3 } from "../../miscellaneous/UIAffineMatrix3.js";
7
7
  import source from "../../shaders/UIImage.js";
8
8
  import { UIElement } from "../UIElement/UIElement.js";
9
9
  import { detectIsRTL } from "./UIText.Bidi.js";
@@ -21,7 +21,7 @@ export class UIText extends UIElement {
21
21
  */
22
22
  constructor(layer, content, options = {}) {
23
23
  const canvas = createCanvas(2, 2);
24
- const context = canvas.getContext("2d");
24
+ const context = getCanvas2DContext(canvas);
25
25
  if (!context) {
26
26
  throw new Error("UIText.constructor: failed to create canvas context");
27
27
  }
@@ -30,7 +30,7 @@ export class UIText extends UIElement {
30
30
  const color = new UIColor(options.color);
31
31
  super(layer, source, {
32
32
  texture: texture,
33
- textureTransform: new Matrix3(),
33
+ textureTransform: new UIAffineMatrix3(),
34
34
  color,
35
35
  }, options);
36
36
  /** Padding last set by auto padding; any other value means it was changed by hand */
@@ -189,7 +189,7 @@ export class UIText extends UIElement {
189
189
  !this.directionDirty &&
190
190
  !this.maxLineWidthDirty &&
191
191
  !this.paddingInternal.dirty &&
192
- !(this.solverWrapper.dirty &&
192
+ !(this.consumeLayoutChange() &&
193
193
  this.lastWidth / this.lastHeight !== Math.round(this.width) / Math.round(this.height)) &&
194
194
  !this.checkContentDirty()) {
195
195
  return;
@@ -228,7 +228,7 @@ export class UIText extends UIElement {
228
228
  !this.directionDirty &&
229
229
  !this.maxLineWidthDirty &&
230
230
  !this.paddingInternal.dirty &&
231
- !this.checkDimensionsDirty() &&
231
+ !this.consumeDimensionsChange() &&
232
232
  !this.checkContentDirty()) {
233
233
  return;
234
234
  }
@@ -300,8 +300,8 @@ export class UIText extends UIElement {
300
300
  }
301
301
  return this.textChunks;
302
302
  }
303
- checkDimensionsDirty() {
304
- return (this.solverWrapper.dirty &&
303
+ consumeDimensionsChange() {
304
+ return (this.consumeLayoutChange() &&
305
305
  (this.lastWidth !== Math.round(this.width) || this.lastHeight !== Math.round(this.height)));
306
306
  }
307
307
  setDimensionsDirtyFalse() {
@@ -1,47 +1,84 @@
1
+ export type { UIConstraint2DOptions, UIConstraint2DResult, UIConstraintDistance2DOptions, UIConstraintInterpolation2DOptions, UIConstraintProportion2DOptions, UIConstraintSize2DOptions, UIType2D, UIType2DObject, } from "./constraints/builders/UIConstraint2DBuilder.Internal.js";
1
2
  export { UIConstraint2DBuilder } from "./constraints/builders/UIConstraint2DBuilder.js";
3
+ export type { UICoverConstraintBuilderOptions } from "./constraints/builders/UICoverConstraintBuilder.Internal.js";
2
4
  export { UICoverConstraintBuilder } from "./constraints/builders/UICoverConstraintBuilder.js";
5
+ export type { UIFitConstraintBuilderOptions } from "./constraints/builders/UIFitConstraintBuilder.Internal.js";
3
6
  export { UIFitConstraintBuilder } from "./constraints/builders/UIFitConstraintBuilder.js";
7
+ export type { UIAspectConstraintOptions } from "./constraints/UIAspectConstraint/UIAspectConstraint.Internal.js";
4
8
  export { UIAspectConstraint } from "./constraints/UIAspectConstraint/UIAspectConstraint.js";
5
9
  export { UIConstraint } from "./constraints/UIConstraint.js";
6
10
  export { UICustomConstraint } from "./constraints/UICustomConstraint.js";
11
+ export type { UIHeightConstraintOptions } from "./constraints/UIHeightConstraint/UIHeightConstraint.Internal.js";
7
12
  export { UIHeightConstraint } from "./constraints/UIHeightConstraint/UIHeightConstraint.js";
13
+ export type { UIHorizontalDistanceConstraintOptions } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js";
8
14
  export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js";
15
+ export type { UIHorizontalInterpolationConstraintOptions } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js";
9
16
  export { UIHorizontalInterpolationConstraint } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js";
17
+ export type { UIHorizontalProportionConstraintOptions } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js";
10
18
  export { UIHorizontalProportionConstraint } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js";
19
+ export type { UISingleParameterConstraintOptions } from "./constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js";
11
20
  export { UISingleParameterConstraint } from "./constraints/UISingleParameterConstraint/UISingleParameterConstraint.js";
21
+ export type { UIVerticalDistanceConstraintOptions } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js";
12
22
  export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js";
23
+ export type { UIVerticalInterpolationConstraintOptions } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js";
13
24
  export { UIVerticalInterpolationConstraint } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js";
25
+ export type { UIVerticalProportionConstraintOptions } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js";
14
26
  export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js";
27
+ export type { UIWidthConstraintOptions } from "./constraints/UIWidthConstraint/UIWidthConstraint.Internal.js";
15
28
  export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint.js";
16
- export { UIAnchor } from "./elements/UIAnchor/UIAnchor.js";
17
29
  export type { UIAnchorOptions } from "./elements/UIAnchor/UIAnchor.Internal.js";
18
- export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
30
+ export { UIAnchor } from "./elements/UIAnchor/UIAnchor.js";
31
+ export type { UIAnimatedImageOptions } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
19
32
  export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
20
- export { UIDummy } from "./elements/UIDummy/UIDummy.js";
33
+ export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
21
34
  export type { UIDummyOptions, UIInputEventData } from "./elements/UIDummy/UIDummy.Internal.js";
35
+ export { UIDummy } from "./elements/UIDummy/UIDummy.js";
36
+ export type { UIElementOptions } from "./elements/UIElement/UIElement.Internal.js";
37
+ export { UIElement } from "./elements/UIElement/UIElement.js";
38
+ export type { UIGraphicsOptions } from "./elements/UIGraphics/UIGraphics.Internal.js";
22
39
  export { UIGraphics } from "./elements/UIGraphics/UIGraphics.js";
40
+ export type { UIImageOptions } from "./elements/UIImage/UIImage.Internal.js";
23
41
  export { UIImage } from "./elements/UIImage/UIImage.js";
24
- export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
42
+ export type { UINineSliceOptions } from "./elements/UINineSlice/UINineSlice.Internal.js";
25
43
  export { UINineSliceRegionMode } from "./elements/UINineSlice/UINineSlice.Internal.js";
44
+ export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
45
+ export type { UIProgressOptions } from "./elements/UIProgress/UIProgress.Internal.js";
26
46
  export { UIProgress } from "./elements/UIProgress/UIProgress.js";
27
- export { UIScene } from "./elements/UIScene/UIScene.js";
47
+ export type { UISceneOptions } from "./elements/UIScene/UIScene.Internal.js";
28
48
  export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal.js";
29
- export { UIText } from "./elements/UIText/UIText.js";
49
+ export { UIScene } from "./elements/UIScene/UIScene.js";
50
+ export type { UITextContent } from "./elements/UIText/UIText.Interfaces.js";
51
+ export type { UITextOptions } from "./elements/UIText/UIText.Internal.js";
30
52
  export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
31
- export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer.js";
32
- export type { UIFullscreenLayerInputEventData } from "./layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js";
53
+ export { UIText } from "./elements/UIText/UIText.js";
54
+ export type { UILayerMode, UILayerOptions, UILayerOrientation, } from "./layers/UILayer/UILayer.Internal.js";
33
55
  export { UILayer } from "./layers/UILayer/UILayer.js";
56
+ export type { UIViewportLayerInputEventData, UIViewportLayerOptions, } from "./layers/UIViewportLayer/UIViewportLayer.Internal.js";
57
+ export { UIViewportLayer } from "./layers/UIViewportLayer/UIViewportLayer.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";
64
+ export type { UIColorConfig, UIColorName } from "./miscellaneous/color/UIColor.Internal.js";
38
65
  export { UIColor } from "./miscellaneous/color/UIColor.js";
39
66
  export { computeTransformMatrix } from "./miscellaneous/computeTransform.js";
67
+ export type { HSLAdjustment, UIProperty, UIPropertyName, } from "./miscellaneous/generic-plane/shared.js";
68
+ export type { UIInsetsConfig } from "./miscellaneous/insets/UIInsets.Internal.js";
69
+ export { UIInsets } from "./miscellaneous/insets/UIInsets.js";
70
+ export type { UIMaskOptions } from "./miscellaneous/mask/UIMask.Internal.js";
71
+ export { UIMaskShape } from "./miscellaneous/mask/UIMask.Internal.js";
72
+ export { UIMask } from "./miscellaneous/mask/UIMask.js";
73
+ export { UIMaskMaterialPatch } from "./miscellaneous/mask/UIMaskMaterialPatch.js";
74
+ export { UIProgressMaskFunction } from "./miscellaneous/mask-function/UIProgressMaskFunction.js";
40
75
  export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
41
76
  export { UIProgressMaskFunctionDirectional } from "./miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
42
- export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
43
- export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
77
+ export type { Vector2Like } from "./miscellaneous/math.js";
44
78
  export type { UIMicroConfig } from "./miscellaneous/micro/UIMicro.Internal.js";
79
+ export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
80
+ export { UIMicro } from "./miscellaneous/micro/UIMicro.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,22 @@ 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 type { UITextSpanConfig } from "./miscellaneous/text-span/UITextSpan.Internal.js";
91
+ export { UITextSpan } from "./miscellaneous/text-span/UITextSpan.js";
92
+ export type { UITextAlign, UITextStyleConfig, } from "./miscellaneous/text-style/UITextStyle.Internal.js";
93
+ export { UITextStyle } from "./miscellaneous/text-style/UITextStyle.js";
94
+ export type { UITextureAtlasConfig, UITextureConfig, UITextureRect, UITextureSize, UITextureTrim, } from "./miscellaneous/texture/UITextureView.Internal.js";
95
+ export { UITextureView } from "./miscellaneous/texture/UITextureView.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 { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
104
+ export { UIElementViewport } from "./miscellaneous/viewport/UIElementViewport.js";
105
+ export { UIViewport } from "./miscellaneous/viewport/UIViewport.js";
106
+ export { UIWindowViewport } from "./miscellaneous/viewport/UIWindowViewport.js";
107
+ export type { UISceneWrapperView } from "./wrappers/UISceneWrapper/UISceneWrapper.Internal.js";
@@ -14,30 +14,38 @@ export { UIVerticalInterpolationConstraint } from "./constraints/UIVerticalInter
14
14
  export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js";
15
15
  export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint.js";
16
16
  export { UIAnchor } from "./elements/UIAnchor/UIAnchor.js";
17
- export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
18
17
  export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
18
+ export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.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
- export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
23
23
  export { UINineSliceRegionMode } from "./elements/UINineSlice/UINineSlice.Internal.js";
24
+ export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
24
25
  export { UIProgress } from "./elements/UIProgress/UIProgress.js";
25
- export { UIScene } from "./elements/UIScene/UIScene.js";
26
26
  export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal.js";
27
- export { UIText } from "./elements/UIText/UIText.js";
27
+ export { UIScene } from "./elements/UIScene/UIScene.js";
28
28
  export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
29
- export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer.js";
29
+ export { UIText } from "./elements/UIText/UIText.js";
30
30
  export { UILayer } from "./layers/UILayer/UILayer.js";
31
+ export { UIViewportLayer } from "./layers/UIViewportLayer/UIViewportLayer.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 { UIMaskShape } from "./miscellaneous/mask/UIMask.Internal.js";
41
+ export { UIMask } from "./miscellaneous/mask/UIMask.js";
42
+ export { UIMaskMaterialPatch } from "./miscellaneous/mask/UIMaskMaterialPatch.js";
43
+ export { UIProgressMaskFunction } from "./miscellaneous/mask-function/UIProgressMaskFunction.js";
37
44
  export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
38
45
  export { UIProgressMaskFunctionDirectional } from "./miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
39
- export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
40
46
  export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
47
+ export { UIMicro } from "./miscellaneous/micro/UIMicro.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,17 @@ 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";
67
+ export { UIElementViewport } from "./miscellaneous/viewport/UIElementViewport.js";
68
+ export { UIViewport } from "./miscellaneous/viewport/UIViewport.js";
69
+ export { UIWindowViewport } from "./miscellaneous/viewport/UIWindowViewport.js";