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.
- package/README.md +114 -34
- package/dist/core/constraints/UICustomConstraint.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +1 -1
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +1 -1
- package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +2 -3
- package/dist/core/elements/UIAnchor/UIAnchor.d.ts +2 -2
- package/dist/core/elements/UIAnchor/UIAnchor.js +3 -2
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +2 -2
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +24 -12
- package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +13 -0
- package/dist/core/elements/UIDummy/UIDummy.d.ts +74 -5
- package/dist/core/elements/UIDummy/UIDummy.js +222 -29
- package/dist/core/elements/UIElement/UIElement.Internal.d.ts +1 -1
- package/dist/core/elements/UIElement/UIElement.d.ts +37 -1
- package/dist/core/elements/UIElement/UIElement.js +84 -6
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +1 -1
- package/dist/core/elements/UIGraphics/UIGraphics.d.ts +1 -1
- package/dist/core/elements/UIGraphics/UIGraphics.js +4 -4
- package/dist/core/elements/UIImage/UIImage.d.ts +2 -2
- package/dist/core/elements/UIImage/UIImage.js +10 -8
- package/dist/core/elements/UINineSlice/UINineSlice.d.ts +4 -4
- package/dist/core/elements/UINineSlice/UINineSlice.js +11 -9
- package/dist/core/elements/UIProgress/UIProgress.d.ts +2 -2
- package/dist/core/elements/UIProgress/UIProgress.js +17 -15
- package/dist/core/elements/UIScene/UIScene.Internal.d.ts +1 -1
- package/dist/core/elements/UIScene/UIScene.d.ts +3 -2
- package/dist/core/elements/UIScene/UIScene.js +21 -14
- package/dist/core/elements/UIText/UIText.Measuring.d.ts +1 -1
- package/dist/core/elements/UIText/UIText.d.ts +3 -3
- package/dist/core/elements/UIText/UIText.js +8 -8
- package/dist/core/index.d.ts +60 -11
- package/dist/core/index.js +22 -7
- package/dist/core/layers/UILayer/UILayer.d.ts +45 -5
- package/dist/core/layers/UILayer/UILayer.js +103 -10
- package/dist/core/layers/UIViewportLayer/UIViewportLayer.Internal.d.ts +27 -0
- package/dist/core/layers/{UIFullscreenLayer/UIFullscreenLayer.Internal.js → UIViewportLayer/UIViewportLayer.Internal.js} +1 -1
- package/dist/core/layers/UIViewportLayer/UIViewportLayer.d.ts +98 -0
- package/dist/core/layers/UIViewportLayer/UIViewportLayer.js +251 -0
- package/dist/core/miscellaneous/UIAffineMatrix3.d.ts +13 -0
- package/dist/core/miscellaneous/UIAffineMatrix3.js +13 -0
- package/dist/core/miscellaneous/area/UIArea.d.ts +10 -1
- package/dist/core/miscellaneous/area/UIArea.js +4 -1
- package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaCircle.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +0 -1
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -0
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +0 -1
- package/dist/core/miscellaneous/asserts.d.ts +23 -0
- package/dist/core/miscellaneous/asserts.js +44 -0
- package/dist/core/miscellaneous/canvas.js +7 -2
- package/dist/core/miscellaneous/color/UIColor.js +5 -2
- package/dist/core/miscellaneous/computeTransform.d.ts +12 -0
- package/dist/core/miscellaneous/computeTransform.js +20 -0
- package/dist/core/miscellaneous/context-monitor/UIContextMonitor.d.ts +1 -0
- package/dist/core/miscellaneous/context-monitor/UIContextMonitor.js +60 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +17 -3
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +88 -26
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +9 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +29 -6
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +51 -11
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +2 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +47 -6
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +15 -3
- package/dist/core/miscellaneous/generic-plane/shared.js +38 -7
- package/dist/core/miscellaneous/generic-plane/varyingPacking.d.ts +46 -0
- package/dist/core/miscellaneous/generic-plane/varyingPacking.js +170 -0
- package/dist/core/miscellaneous/mask/UIMask.Internal.d.ts +61 -0
- package/dist/core/miscellaneous/mask/UIMask.Internal.js +56 -0
- package/dist/core/miscellaneous/mask/UIMask.d.ts +84 -0
- package/dist/core/miscellaneous/mask/UIMask.js +265 -0
- package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.d.ts +50 -0
- package/dist/core/miscellaneous/mask/UIMaskMaterialPatch.js +233 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +10 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +7 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +2 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +0 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +0 -1
- package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +3 -0
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +1 -0
- package/dist/core/miscellaneous/micro/UIMicro.d.ts +18 -1
- package/dist/core/miscellaneous/micro/UIMicro.js +23 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +19 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +16 -3
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +2 -2
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +2 -2
- package/dist/core/miscellaneous/text-style/UITextStyle.js +2 -2
- package/dist/core/miscellaneous/texture/UITextureView.d.ts +6 -2
- package/dist/core/miscellaneous/texture/UITextureView.js +13 -9
- package/dist/core/miscellaneous/viewport/UIElementViewport.d.ts +31 -0
- package/dist/core/miscellaneous/viewport/UIElementViewport.js +54 -0
- package/dist/core/miscellaneous/viewport/UIViewport.d.ts +37 -0
- package/dist/core/miscellaneous/viewport/UIViewport.js +31 -0
- package/dist/core/miscellaneous/viewport/UIWindowViewport.d.ts +13 -0
- package/dist/core/miscellaneous/viewport/UIWindowViewport.js +25 -0
- package/dist/core/miscellaneous/webglCapabilities.js +61 -55
- package/dist/core/shaders/UIMask.d.ts +15 -0
- package/dist/core/shaders/UIMask.js +45 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +36 -5
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +23 -2
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +153 -15
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +3 -1
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +1 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +3 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +2 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +3 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +36 -16
- package/dist/debug/UIAspectDebug.js +4 -0
- package/dist/debug/UIHeightDebug.js +4 -0
- package/dist/debug/UIHorizontalDistanceDebug.js +5 -0
- package/dist/debug/UIHorizontalInterpolationDebug.js +5 -0
- package/dist/debug/UILayerDebug.d.ts +7 -0
- package/dist/debug/UILayerDebug.js +21 -0
- package/dist/debug/UIVerticalDistanceDebug.js +5 -0
- package/dist/debug/UIVerticalInterpolationDebug.js +5 -0
- package/dist/debug/UIWidthDebug.js +4 -0
- package/dist/debug/index.d.ts +2 -0
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +8 -1
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +0 -2
- package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +12 -2
- package/dist/particles/behaviorModules/UIBehaviorModule.js +2 -1
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +8 -1
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +13 -12
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +6 -6
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +4 -5
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +8 -1
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +8 -10
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +10 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +8 -7
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +7 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +8 -10
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +13 -4
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +12 -10
- package/dist/particles/elements/UIEmitter.Internal.d.ts +21 -1
- package/dist/particles/elements/UIEmitter.Internal.js +6 -0
- package/dist/particles/elements/UIEmitter.d.ts +20 -11
- package/dist/particles/elements/UIEmitter.js +100 -54
- package/dist/particles/index.d.ts +7 -1
- package/dist/particles/index.js +4 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +19 -4
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +117 -83
- package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +8 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.js +41 -4
- package/dist/particles/miscellaneous/miscellaneous.d.ts +34 -0
- package/dist/particles/miscellaneous/miscellaneous.js +72 -0
- package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingColorOverLife.js +2 -4
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +2 -5
- package/dist/particles/renderingModules/UIRenderingModule.d.ts +11 -1
- package/dist/particles/renderingModules/UIRenderingModule.js +4 -1
- package/dist/particles/renderingModules/UIRenderingTexture.d.ts +4 -0
- package/dist/particles/renderingModules/UIRenderingTexture.js +2 -1
- package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +1 -2
- package/dist/particles/shaders/UIRenderingColorOverLife.js +5 -3
- package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +1 -9
- package/dist/particles/shaders/UIRenderingColorOverVelocity.js +6 -13
- package/dist/particles/spawnModules/UISpawnModule.d.ts +16 -1
- package/dist/particles/spawnModules/UISpawnModule.js +3 -1
- package/dist/particles/spawnModules/UISpawnOffset.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnOffset.js +0 -2
- package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +8 -1
- package/dist/particles/spawnModules/UISpawnRandomLifetime.js +5 -7
- package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomRotation.js +5 -5
- package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomScale.js +4 -5
- package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomTorque.js +5 -5
- package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRandomVelocity.js +6 -6
- package/dist/particles/spawnModules/UISpawnRectangle.d.ts +7 -0
- package/dist/particles/spawnModules/UISpawnRectangle.js +6 -6
- package/package.json +13 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +0 -21
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -63
- 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 {
|
|
3
|
+
import { UIColor } from "../../miscellaneous/color/UIColor.js";
|
|
5
4
|
import type { UIInsetsConfig } from "../../miscellaneous/insets/UIInsets.Internal.js";
|
|
6
|
-
import {
|
|
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
|
|
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
|
-
|
|
25
|
-
options
|
|
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.
|
|
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
|
-
|
|
178
|
-
return (this.
|
|
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
|
-
|
|
32
|
-
options
|
|
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.
|
|
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)
|
|
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,
|
|
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
|
|
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
|
|
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
|
-
|
|
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 (
|
|
140
|
-
this.renderTarget.setSize(
|
|
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 {
|
|
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
|
|
87
|
+
private consumeDimensionsChange;
|
|
88
88
|
private setDimensionsDirtyFalse;
|
|
89
89
|
private checkContentDirty;
|
|
90
90
|
private setContentDirtyFalse;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
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
|
-
|
|
304
|
-
return (this.
|
|
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() {
|
package/dist/core/index.d.ts
CHANGED
|
@@ -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 {
|
|
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 {
|
|
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 {
|
|
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 {
|
|
47
|
+
export type { UISceneOptions } from "./elements/UIScene/UIScene.Internal.js";
|
|
28
48
|
export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal.js";
|
|
29
|
-
export {
|
|
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 {
|
|
32
|
-
export type {
|
|
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 {
|
|
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 {
|
|
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";
|
package/dist/core/index.js
CHANGED
|
@@ -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 {
|
|
27
|
+
export { UIScene } from "./elements/UIScene/UIScene.js";
|
|
28
28
|
export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
|
|
29
|
-
export {
|
|
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 {
|
|
67
|
+
export { UIElementViewport } from "./miscellaneous/viewport/UIElementViewport.js";
|
|
68
|
+
export { UIViewport } from "./miscellaneous/viewport/UIViewport.js";
|
|
69
|
+
export { UIWindowViewport } from "./miscellaneous/viewport/UIWindowViewport.js";
|