laymur 0.22.0 → 0.25.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 +1 -1
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +3 -3
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +14 -16
- package/dist/core/constraints/UIConstraint.d.ts +22 -2
- package/dist/core/constraints/UIConstraint.js +26 -3
- package/dist/core/constraints/UICustomConstraint.d.ts +4 -4
- package/dist/core/constraints/UICustomConstraint.js +15 -15
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +11 -13
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +1 -3
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +30 -30
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +2 -4
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +40 -39
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +13 -15
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +3 -3
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js +1 -0
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +13 -7
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +37 -30
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +1 -3
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +30 -30
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +2 -4
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +40 -39
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +13 -15
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +3 -3
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +11 -13
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +3 -3
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +11 -11
- package/dist/core/constraints/builders/UIConstraint2DBuilder.js +10 -13
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +1 -1
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +7 -7
- package/dist/core/constraints/builders/UICoverConstraintBuilder.js +10 -13
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +1 -1
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +7 -7
- package/dist/core/constraints/builders/UIFitConstraintBuilder.js +10 -13
- package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +3 -5
- package/dist/core/elements/UIAnchor/UIAnchor.d.ts +23 -5
- package/dist/core/elements/UIAnchor/UIAnchor.js +42 -8
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +2 -2
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +4 -6
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +10 -10
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +108 -111
- package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +4 -4
- package/dist/core/elements/UIDummy/UIDummy.Internal.js +5 -8
- package/dist/core/elements/UIDummy/UIDummy.d.ts +19 -11
- package/dist/core/elements/UIDummy/UIDummy.js +59 -42
- package/dist/core/elements/UIElement/UIElement.Internal.d.ts +5 -5
- package/dist/core/elements/UIElement/UIElement.Internal.js +9 -12
- package/dist/core/elements/UIElement/UIElement.d.ts +25 -17
- package/dist/core/elements/UIElement/UIElement.js +76 -69
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +3 -3
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +4 -7
- package/dist/core/elements/UIGraphics/UIGraphics.d.ts +7 -7
- package/dist/core/elements/UIGraphics/UIGraphics.js +44 -47
- package/dist/core/elements/UIImage/UIImage.Internal.d.ts +2 -2
- package/dist/core/elements/UIImage/UIImage.Internal.js +1 -0
- package/dist/core/elements/UIImage/UIImage.d.ts +9 -9
- package/dist/core/elements/UIImage/UIImage.js +21 -24
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +3 -3
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +3 -5
- package/dist/core/elements/UINineSlice/UINineSlice.d.ts +12 -12
- package/dist/core/elements/UINineSlice/UINineSlice.js +71 -73
- package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +3 -4
- package/dist/core/elements/UIProgress/UIProgress.Internal.js +1 -3
- package/dist/core/elements/UIProgress/UIProgress.d.ts +10 -8
- package/dist/core/elements/UIProgress/UIProgress.js +60 -58
- package/dist/core/elements/UIScene/UIScene.Internal.d.ts +3 -3
- package/dist/core/elements/UIScene/UIScene.Internal.js +11 -14
- package/dist/core/elements/UIScene/UIScene.d.ts +8 -8
- package/dist/core/elements/UIScene/UIScene.js +68 -69
- package/dist/core/elements/UIText/UIText.Bidi.d.ts +2 -2
- package/dist/core/elements/UIText/UIText.Bidi.js +3 -5
- package/dist/core/elements/UIText/UIText.Interfaces.d.ts +6 -2
- package/dist/core/elements/UIText/UIText.Interfaces.js +1 -0
- package/dist/core/elements/UIText/UIText.Internal.d.ts +4 -4
- package/dist/core/elements/UIText/UIText.Internal.js +5 -7
- package/dist/core/elements/UIText/UIText.Measuring.d.ts +14 -7
- package/dist/core/elements/UIText/UIText.Measuring.js +115 -55
- package/dist/core/elements/UIText/UIText.Rendering.d.ts +3 -3
- package/dist/core/elements/UIText/UIText.Rendering.js +6 -9
- package/dist/core/elements/UIText/UIText.d.ts +28 -14
- package/dist/core/elements/UIText/UIText.js +181 -141
- package/dist/core/index.d.ts +55 -54
- package/dist/core/index.js +53 -0
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +4 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +2 -5
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +4 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +43 -42
- package/dist/core/layers/UILayer/UILayer.Internal.d.ts +2 -2
- package/dist/core/layers/UILayer/UILayer.Internal.js +4 -7
- package/dist/core/layers/UILayer/UILayer.d.ts +19 -4
- package/dist/core/layers/UILayer/UILayer.js +125 -62
- package/dist/core/miscellaneous/UIBlendMode.js +1 -3
- package/dist/core/miscellaneous/UIExpression.js +16 -19
- package/dist/core/miscellaneous/UIMode.js +3 -5
- package/dist/core/miscellaneous/UIOrientation.js +2 -4
- package/dist/core/miscellaneous/UIPriority.js +5 -8
- package/dist/core/miscellaneous/UIRelation.js +5 -8
- package/dist/core/miscellaneous/UITransparencyMode.js +1 -3
- package/dist/core/miscellaneous/area/UIArea.js +1 -3
- package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaCircle.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +2 -2
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +3 -6
- package/dist/core/miscellaneous/asserts.d.ts +20 -1
- package/dist/core/miscellaneous/asserts.js +71 -19
- package/dist/core/miscellaneous/canvas.js +13 -7
- package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +1 -1
- package/dist/core/miscellaneous/color/UIColor.Internal.js +1 -3
- package/dist/core/miscellaneous/color/UIColor.d.ts +1 -1
- package/dist/core/miscellaneous/color/UIColor.js +202 -205
- package/dist/core/miscellaneous/computeTransform.d.ts +1 -1
- package/dist/core/miscellaneous/computeTransform.js +4 -7
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +2 -2
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +13 -16
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +115 -118
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +3 -3
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.js +1 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +208 -114
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +2 -2
- package/dist/core/miscellaneous/generic-plane/shared.js +16 -19
- package/dist/core/miscellaneous/insets/UIInsets.Internal.js +1 -3
- package/dist/core/miscellaneous/insets/UIInsets.d.ts +1 -1
- package/dist/core/miscellaneous/insets/UIInsets.js +96 -99
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +1 -3
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +1 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +14 -17
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -2
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +14 -17
- package/dist/core/miscellaneous/math.js +3 -5
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +6 -8
- package/dist/core/miscellaneous/micro/UIMicro.d.ts +1 -1
- package/dist/core/miscellaneous/micro/UIMicro.js +91 -94
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +1 -3
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +12 -15
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +12 -15
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +3 -6
- package/dist/core/miscellaneous/shared.d.ts +1 -1
- package/dist/core/miscellaneous/shared.js +4 -7
- package/dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts +1 -1
- package/dist/core/miscellaneous/text-span/UITextSpan.Internal.js +1 -0
- package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +2 -2
- package/dist/core/miscellaneous/text-span/UITextSpan.js +10 -13
- package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +15 -17
- package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +13 -2
- package/dist/core/miscellaneous/text-style/UITextStyle.js +222 -207
- package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +7 -0
- package/dist/core/miscellaneous/texture/UITextureView.Internal.js +16 -6
- package/dist/core/miscellaneous/texture/UITextureView.d.ts +3 -3
- package/dist/core/miscellaneous/texture/UITextureView.js +114 -118
- package/dist/core/miscellaneous/webglCapabilities.js +3 -4
- package/dist/core/shaders/UIImage.d.ts +9 -0
- package/dist/core/shaders/UIImage.js +14 -0
- package/dist/core/shaders/UINineSlice.d.ts +11 -0
- package/dist/core/shaders/UINineSlice.js +57 -0
- package/dist/core/shaders/UIProgress.d.ts +14 -0
- package/dist/core/shaders/UIProgress.js +21 -0
- package/dist/core/shaders/UIProgressMaskFunctionCircular.d.ts +2 -0
- package/dist/core/shaders/UIProgressMaskFunctionCircular.js +16 -0
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.d.ts +2 -0
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.js +15 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +4 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +7 -1
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +50 -47
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +5 -2
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +11 -3
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +42 -26
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +5 -3
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +27 -4
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +162 -123
- package/dist/debug/UIAspectDebug.d.ts +3 -3
- package/dist/debug/UIAspectDebug.js +64 -68
- package/dist/debug/UIConstraintDebug.d.ts +1 -1
- package/dist/debug/UIConstraintDebug.js +1 -0
- package/dist/debug/UIHeightDebug.d.ts +3 -3
- package/dist/debug/UIHeightDebug.js +63 -67
- package/dist/debug/UIHorizontalDistanceDebug.d.ts +3 -3
- package/dist/debug/UIHorizontalDistanceDebug.js +76 -81
- package/dist/debug/UIHorizontalInterpolationDebug.d.ts +3 -3
- package/dist/debug/UIHorizontalInterpolationDebug.js +74 -78
- package/dist/debug/UILayerDebug.d.ts +1 -1
- package/dist/debug/UILayerDebug.js +55 -64
- package/dist/debug/UIVerticalDistanceDebug.d.ts +3 -3
- package/dist/debug/UIVerticalDistanceDebug.js +76 -81
- package/dist/debug/UIVerticalInterpolationDebug.d.ts +3 -3
- package/dist/debug/UIVerticalInterpolationDebug.js +74 -78
- package/dist/debug/UIWidthDebug.d.ts +3 -3
- package/dist/debug/UIWidthDebug.js +63 -67
- package/dist/debug/index.d.ts +8 -8
- package/dist/debug/index.js +8 -8
- package/dist/debug/miscellaneous.js +8 -11
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +3 -3
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +1 -1
- package/dist/particles/behaviorModules/UIBehaviorModule.js +1 -3
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +3 -3
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +37 -40
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +41 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +87 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +17 -20
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +21 -24
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +21 -24
- package/dist/particles/elements/UIEmitter.Internal.d.ts +2 -2
- package/dist/particles/elements/UIEmitter.Internal.js +6 -9
- package/dist/particles/elements/UIEmitter.d.ts +17 -11
- package/dist/particles/elements/UIEmitter.js +100 -88
- package/dist/particles/index.d.ts +20 -18
- package/dist/particles/index.js +19 -18
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +1 -1
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +14 -15
- package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +1 -1
- package/dist/particles/instancedParticle/UIInstancedParticle.js +29 -32
- package/dist/particles/miscellaneous/miscellaneous.d.ts +3 -3
- package/dist/particles/miscellaneous/miscellaneous.js +26 -27
- package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingColorOverLife.js +5 -8
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +6 -9
- package/dist/particles/renderingModules/UIRenderingModule.js +1 -3
- package/dist/particles/renderingModules/UIRenderingTexture.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingTexture.js +4 -7
- package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +2 -0
- package/dist/particles/shaders/UIRenderingColorOverLife.js +7 -0
- package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +9 -0
- package/dist/particles/shaders/UIRenderingColorOverVelocity.js +16 -0
- package/dist/particles/shaders/UIRenderingTexture.d.ts +2 -0
- package/dist/particles/shaders/UIRenderingTexture.js +7 -0
- package/dist/particles/spawnModules/UISpawnModule.d.ts +1 -1
- package/dist/particles/spawnModules/UISpawnModule.js +1 -3
- package/dist/particles/spawnModules/UISpawnOffset.d.ts +3 -3
- package/dist/particles/spawnModules/UISpawnOffset.js +12 -15
- package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomLifetime.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomRotation.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomScale.js +19 -22
- package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomTorque.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomVelocity.js +21 -24
- package/dist/particles/spawnModules/UISpawnRectangle.d.ts +3 -3
- package/dist/particles/spawnModules/UISpawnRectangle.js +21 -24
- package/package.json +13 -17
- package/dist/_virtual/2d.js +0 -3
- package/dist/_virtual/3d.js +0 -3
- package/dist/_virtual/4d.js +0 -3
- package/dist/_virtual/mod.js +0 -5
- package/dist/_virtual/mod2.js +0 -3
- package/dist/core/shaders/UIImage.glsl.js +0 -3
- package/dist/core/shaders/UINineSlice.glsl.js +0 -3
- package/dist/core/shaders/UIProgress.glsl.js +0 -3
- package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +0 -3
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +0 -3
- package/dist/index.js +0 -52
- package/dist/node_modules/fast-simplex-noise/lib/2d.js +0 -93
- package/dist/node_modules/fast-simplex-noise/lib/3d.js +0 -142
- package/dist/node_modules/fast-simplex-noise/lib/4d.js +0 -196
- package/dist/node_modules/fast-simplex-noise/lib/mod.js +0 -24
- package/dist/node_modules/three/examples/jsm/lines/Line2.js +0 -56
- package/dist/node_modules/three/examples/jsm/lines/LineGeometry.js +0 -157
- package/dist/node_modules/three/examples/jsm/lines/LineMaterial.js +0 -691
- package/dist/node_modules/three/examples/jsm/lines/LineSegments2.js +0 -415
- package/dist/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -289
- package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +0 -3
- package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +0 -3
- package/dist/particles/shaders/UIRenderingTexture.glsl.js +0 -3
|
@@ -1,199 +1,196 @@
|
|
|
1
|
-
import { MathUtils } from
|
|
2
|
-
import { assertValidNumber } from
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { MathUtils } from "three";
|
|
2
|
+
import { assertValidNumber } from "../asserts.js";
|
|
3
|
+
import { MICRO_DEFAULT_ANCHOR, MICRO_DEFAULT_ANCHOR_MODE, MICRO_DEFAULT_POSITION, MICRO_DEFAULT_ROTATION, MICRO_DEFAULT_SCALE, } from "./UIMicro.Internal.js";
|
|
5
4
|
/** Transforms that don't affect constraints */
|
|
6
|
-
class UIMicro {
|
|
5
|
+
export class UIMicro {
|
|
7
6
|
/**
|
|
8
7
|
* Creates UIMicro instance.
|
|
9
8
|
*
|
|
10
9
|
* @param config - Transform configuration
|
|
11
10
|
*/
|
|
12
11
|
constructor(config) {
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
12
|
+
this.dirtyInternal = true;
|
|
13
|
+
this.xInternal = config?.x ?? MICRO_DEFAULT_POSITION;
|
|
14
|
+
this.yInternal = config?.y ?? MICRO_DEFAULT_POSITION;
|
|
15
|
+
this.anchorXInternal = config?.anchorX ?? MICRO_DEFAULT_ANCHOR;
|
|
16
|
+
this.anchorYInternal = config?.anchorY ?? MICRO_DEFAULT_ANCHOR;
|
|
17
|
+
this.scaleXInternal = config?.scaleX ?? MICRO_DEFAULT_SCALE;
|
|
18
|
+
this.scaleYInternal = config?.scaleY ?? MICRO_DEFAULT_SCALE;
|
|
19
|
+
this.rotationInternal = config?.rotation ?? MICRO_DEFAULT_ROTATION;
|
|
20
|
+
this.anchorModeInternal = config?.anchorMode ?? MICRO_DEFAULT_ANCHOR_MODE;
|
|
22
21
|
}
|
|
23
22
|
/** X offset in world units */
|
|
24
23
|
get x() {
|
|
25
|
-
return this.
|
|
24
|
+
return this.xInternal;
|
|
26
25
|
}
|
|
27
26
|
/** Y offset in world units */
|
|
28
27
|
get y() {
|
|
29
|
-
return this.
|
|
28
|
+
return this.yInternal;
|
|
30
29
|
}
|
|
31
30
|
/** X anchor in normalized coordinates (0 to 1) */
|
|
32
31
|
get anchorX() {
|
|
33
|
-
return this.
|
|
32
|
+
return this.anchorXInternal;
|
|
34
33
|
}
|
|
35
34
|
/** Y anchor in normalized coordinates (0 to 1) */
|
|
36
35
|
get anchorY() {
|
|
37
|
-
return this.
|
|
36
|
+
return this.anchorYInternal;
|
|
38
37
|
}
|
|
39
38
|
/** X scale multiplier */
|
|
40
39
|
get scaleX() {
|
|
41
|
-
return this.
|
|
40
|
+
return this.scaleXInternal;
|
|
42
41
|
}
|
|
43
42
|
/** Y scale multiplier */
|
|
44
43
|
get scaleY() {
|
|
45
|
-
return this.
|
|
44
|
+
return this.scaleYInternal;
|
|
46
45
|
}
|
|
47
46
|
/** Rotation in degrees */
|
|
48
47
|
get angle() {
|
|
49
|
-
return MathUtils.radToDeg(this.
|
|
48
|
+
return MathUtils.radToDeg(this.rotationInternal);
|
|
50
49
|
}
|
|
51
50
|
/** Which transforms apply relative to anchor */
|
|
52
51
|
get anchorMode() {
|
|
53
|
-
return this.
|
|
52
|
+
return this.anchorModeInternal;
|
|
54
53
|
}
|
|
55
54
|
/** Rotation in radians */
|
|
56
55
|
get rotation() {
|
|
57
|
-
return this.
|
|
56
|
+
return this.rotationInternal;
|
|
58
57
|
}
|
|
59
58
|
/** @internal */
|
|
60
59
|
get dirty() {
|
|
61
|
-
return this.
|
|
60
|
+
return this.dirtyInternal;
|
|
62
61
|
}
|
|
63
62
|
/** X offset in world units */
|
|
64
63
|
set x(value) {
|
|
65
64
|
assertValidNumber(value, "UIMicro.x");
|
|
66
|
-
if (value !== this.
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
65
|
+
if (value !== this.xInternal) {
|
|
66
|
+
this.xInternal = value;
|
|
67
|
+
this.dirtyInternal = true;
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
/** Y offset in world units */
|
|
72
71
|
set y(value) {
|
|
73
72
|
assertValidNumber(value, "UIMicro.y");
|
|
74
|
-
if (value !== this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
73
|
+
if (value !== this.yInternal) {
|
|
74
|
+
this.yInternal = value;
|
|
75
|
+
this.dirtyInternal = true;
|
|
77
76
|
}
|
|
78
77
|
}
|
|
79
78
|
/** X anchor in normalized coordinates (0 to 1) */
|
|
80
79
|
set anchorX(value) {
|
|
81
80
|
assertValidNumber(value, "UIMicro.anchorX");
|
|
82
|
-
if (value !== this.
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
81
|
+
if (value !== this.anchorXInternal) {
|
|
82
|
+
this.anchorXInternal = value;
|
|
83
|
+
this.dirtyInternal = true;
|
|
85
84
|
}
|
|
86
85
|
}
|
|
87
86
|
/** Y anchor in normalized coordinates (0 to 1) */
|
|
88
87
|
set anchorY(value) {
|
|
89
88
|
assertValidNumber(value, "UIMicro.anchorY");
|
|
90
|
-
if (value !== this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
89
|
+
if (value !== this.anchorYInternal) {
|
|
90
|
+
this.anchorYInternal = value;
|
|
91
|
+
this.dirtyInternal = true;
|
|
93
92
|
}
|
|
94
93
|
}
|
|
95
94
|
/** X scale multiplier */
|
|
96
95
|
set scaleX(value) {
|
|
97
96
|
assertValidNumber(value, "UIMicro.scaleX");
|
|
98
|
-
if (value !== this.
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
97
|
+
if (value !== this.scaleXInternal) {
|
|
98
|
+
this.scaleXInternal = value;
|
|
99
|
+
this.dirtyInternal = true;
|
|
101
100
|
}
|
|
102
101
|
}
|
|
103
102
|
/** Y scale multiplier */
|
|
104
103
|
set scaleY(value) {
|
|
105
104
|
assertValidNumber(value, "UIMicro.scaleY");
|
|
106
|
-
if (value !== this.
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
105
|
+
if (value !== this.scaleYInternal) {
|
|
106
|
+
this.scaleYInternal = value;
|
|
107
|
+
this.dirtyInternal = true;
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
110
|
/** Rotation in degrees */
|
|
112
111
|
set angle(value) {
|
|
113
112
|
assertValidNumber(value, "UIMicro.angle");
|
|
114
113
|
const rotation = MathUtils.degToRad(value);
|
|
115
|
-
if (rotation !== this.
|
|
116
|
-
this.
|
|
117
|
-
this.
|
|
114
|
+
if (rotation !== this.rotationInternal) {
|
|
115
|
+
this.rotationInternal = rotation;
|
|
116
|
+
this.dirtyInternal = true;
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
/** Rotation in radians */
|
|
121
120
|
set rotation(value) {
|
|
122
121
|
assertValidNumber(value, "UIMicro.rotation");
|
|
123
|
-
if (value !== this.
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
122
|
+
if (value !== this.rotationInternal) {
|
|
123
|
+
this.rotationInternal = value;
|
|
124
|
+
this.dirtyInternal = true;
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
127
|
/** Which transforms apply relative to anchor */
|
|
129
128
|
set anchorMode(value) {
|
|
130
|
-
if (value !== this.
|
|
131
|
-
this.
|
|
132
|
-
this.
|
|
129
|
+
if (value !== this.anchorModeInternal) {
|
|
130
|
+
this.anchorModeInternal = value;
|
|
131
|
+
this.dirtyInternal = true;
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
/** Sets the same scale for X and Y */
|
|
136
135
|
setUnifiedScale(scale) {
|
|
137
136
|
assertValidNumber(scale, "UIMicro.setUnifiedScale.scale");
|
|
138
|
-
if (scale !== this.
|
|
139
|
-
this.
|
|
140
|
-
this.
|
|
141
|
-
this.
|
|
137
|
+
if (scale !== this.scaleXInternal || scale !== this.scaleYInternal) {
|
|
138
|
+
this.scaleXInternal = scale;
|
|
139
|
+
this.scaleYInternal = scale;
|
|
140
|
+
this.dirtyInternal = true;
|
|
142
141
|
}
|
|
143
142
|
}
|
|
144
143
|
/** Sets the same anchor for X and Y */
|
|
145
144
|
setUnifiedAnchor(anchor) {
|
|
146
145
|
assertValidNumber(anchor, "UIMicro.setUnifiedAnchor.anchor");
|
|
147
|
-
if (anchor !== this.
|
|
148
|
-
this.
|
|
149
|
-
this.
|
|
150
|
-
this.
|
|
146
|
+
if (anchor !== this.anchorXInternal || anchor !== this.anchorYInternal) {
|
|
147
|
+
this.anchorXInternal = anchor;
|
|
148
|
+
this.anchorYInternal = anchor;
|
|
149
|
+
this.dirtyInternal = true;
|
|
151
150
|
}
|
|
152
151
|
}
|
|
153
152
|
/** @internal */
|
|
154
153
|
setDirtyFalse() {
|
|
155
|
-
this.
|
|
154
|
+
this.dirtyInternal = false;
|
|
156
155
|
}
|
|
157
156
|
/** Resets all transforms to defaults */
|
|
158
157
|
reset() {
|
|
159
|
-
if (this.
|
|
160
|
-
this.
|
|
161
|
-
this.
|
|
162
|
-
this.
|
|
163
|
-
this.
|
|
164
|
-
this.
|
|
165
|
-
this.
|
|
166
|
-
this.
|
|
167
|
-
this.
|
|
168
|
-
this.
|
|
169
|
-
this.
|
|
170
|
-
this.
|
|
171
|
-
this.
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
158
|
+
if (this.xInternal !== MICRO_DEFAULT_POSITION ||
|
|
159
|
+
this.yInternal !== MICRO_DEFAULT_POSITION ||
|
|
160
|
+
this.anchorXInternal !== MICRO_DEFAULT_ANCHOR ||
|
|
161
|
+
this.anchorYInternal !== MICRO_DEFAULT_ANCHOR ||
|
|
162
|
+
this.scaleXInternal !== MICRO_DEFAULT_SCALE ||
|
|
163
|
+
this.scaleYInternal !== MICRO_DEFAULT_SCALE ||
|
|
164
|
+
this.rotationInternal !== MICRO_DEFAULT_ROTATION) {
|
|
165
|
+
this.xInternal = MICRO_DEFAULT_POSITION;
|
|
166
|
+
this.yInternal = MICRO_DEFAULT_POSITION;
|
|
167
|
+
this.anchorXInternal = MICRO_DEFAULT_ANCHOR;
|
|
168
|
+
this.anchorYInternal = MICRO_DEFAULT_ANCHOR;
|
|
169
|
+
this.scaleXInternal = MICRO_DEFAULT_SCALE;
|
|
170
|
+
this.scaleYInternal = MICRO_DEFAULT_SCALE;
|
|
171
|
+
this.rotationInternal = MICRO_DEFAULT_ROTATION;
|
|
172
|
+
this.dirtyInternal = true;
|
|
174
173
|
}
|
|
175
174
|
}
|
|
176
175
|
/** Copies transforms from another instance */
|
|
177
176
|
copy(value) {
|
|
178
|
-
if (this.
|
|
179
|
-
this.
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
182
|
-
this.
|
|
183
|
-
this.
|
|
184
|
-
this.
|
|
185
|
-
this.
|
|
186
|
-
this.
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
189
|
-
this.
|
|
190
|
-
this.
|
|
191
|
-
this.
|
|
192
|
-
this.
|
|
193
|
-
this.
|
|
194
|
-
this.
|
|
177
|
+
if (this.xInternal !== value.xInternal ||
|
|
178
|
+
this.yInternal !== value.yInternal ||
|
|
179
|
+
this.anchorXInternal !== value.anchorXInternal ||
|
|
180
|
+
this.anchorYInternal !== value.anchorYInternal ||
|
|
181
|
+
this.scaleXInternal !== value.scaleXInternal ||
|
|
182
|
+
this.scaleYInternal !== value.scaleYInternal ||
|
|
183
|
+
this.rotationInternal !== value.rotationInternal ||
|
|
184
|
+
this.anchorModeInternal !== value.anchorModeInternal) {
|
|
185
|
+
this.xInternal = value.xInternal;
|
|
186
|
+
this.yInternal = value.yInternal;
|
|
187
|
+
this.anchorXInternal = value.anchorXInternal;
|
|
188
|
+
this.anchorYInternal = value.anchorYInternal;
|
|
189
|
+
this.scaleXInternal = value.scaleXInternal;
|
|
190
|
+
this.scaleYInternal = value.scaleYInternal;
|
|
191
|
+
this.rotationInternal = value.rotationInternal;
|
|
192
|
+
this.anchorModeInternal = value.anchorModeInternal;
|
|
193
|
+
this.dirtyInternal = true;
|
|
195
194
|
}
|
|
196
195
|
}
|
|
197
196
|
}
|
|
198
|
-
|
|
199
|
-
export { UIMicro };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { assertValidPositiveNumber } from
|
|
2
|
-
import { UIResizePolicy } from
|
|
3
|
-
|
|
1
|
+
import { assertValidPositiveNumber } from "../asserts.js";
|
|
2
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
4
3
|
/** Scales area to cover rect preserving proportions */
|
|
5
|
-
class UIResizePolicyCover extends UIResizePolicy {
|
|
4
|
+
export class UIResizePolicyCover extends UIResizePolicy {
|
|
6
5
|
/**
|
|
7
6
|
* Creates cover resize policy.
|
|
8
7
|
*
|
|
@@ -13,38 +12,36 @@ class UIResizePolicyCover extends UIResizePolicy {
|
|
|
13
12
|
super();
|
|
14
13
|
assertValidPositiveNumber(rectWidth, "UIResizePolicyCover.constructor.rectWidth");
|
|
15
14
|
assertValidPositiveNumber(rectHeight, "UIResizePolicyCover.constructor.rectHeight");
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
15
|
+
this.rectWidthInternal = rectWidth;
|
|
16
|
+
this.rectHeightInternal = rectHeight;
|
|
18
17
|
}
|
|
19
18
|
/** Target rect width */
|
|
20
19
|
get rectWidth() {
|
|
21
|
-
return this.
|
|
20
|
+
return this.rectWidthInternal;
|
|
22
21
|
}
|
|
23
22
|
/** Target rect height */
|
|
24
23
|
get rectHeight() {
|
|
25
|
-
return this.
|
|
24
|
+
return this.rectHeightInternal;
|
|
26
25
|
}
|
|
27
26
|
/** Target rect width */
|
|
28
27
|
set rectWidth(value) {
|
|
29
28
|
assertValidPositiveNumber(value, "UIResizePolicyCover.rectWidth");
|
|
30
|
-
if (value !== this.
|
|
31
|
-
this.
|
|
29
|
+
if (value !== this.rectWidthInternal) {
|
|
30
|
+
this.rectWidthInternal = value;
|
|
32
31
|
this.dirty = true;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
/** Target rect height */
|
|
36
35
|
set rectHeight(value) {
|
|
37
36
|
assertValidPositiveNumber(value, "UIResizePolicyCover.rectHeight");
|
|
38
|
-
if (value !== this.
|
|
39
|
-
this.
|
|
37
|
+
if (value !== this.rectHeightInternal) {
|
|
38
|
+
this.rectHeightInternal = value;
|
|
40
39
|
this.dirty = true;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
calculateScale(width, height) {
|
|
44
43
|
assertValidPositiveNumber(width, "UIResizePolicyCover.calculateScale.width");
|
|
45
44
|
assertValidPositiveNumber(height, "UIResizePolicyCover.calculateScale.height");
|
|
46
|
-
return Math.min(this.
|
|
45
|
+
return Math.min(this.rectWidthInternal / width, this.rectHeightInternal / height);
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
export { UIResizePolicyCover };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
2
2
|
/** Scales by width in landscape, by height in portrait */
|
|
3
3
|
export declare class UIResizePolicyCross extends UIResizePolicy {
|
|
4
4
|
private fixedWidthLandscapeInternal;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { assertValidPositiveNumber } from
|
|
2
|
-
import { UIResizePolicy } from
|
|
3
|
-
|
|
1
|
+
import { assertValidPositiveNumber } from "../asserts.js";
|
|
2
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
4
3
|
/** Scales by width in landscape, by height in portrait */
|
|
5
|
-
class UIResizePolicyCross extends UIResizePolicy {
|
|
4
|
+
export class UIResizePolicyCross extends UIResizePolicy {
|
|
6
5
|
/**
|
|
7
6
|
* Creates cross resize policy.
|
|
8
7
|
*
|
|
@@ -13,30 +12,30 @@ class UIResizePolicyCross extends UIResizePolicy {
|
|
|
13
12
|
super();
|
|
14
13
|
assertValidPositiveNumber(fixedWidthLandscape, "UIResizePolicyCross.constructor.fixedWidthLandscape");
|
|
15
14
|
assertValidPositiveNumber(fixedHeightPortrait, "UIResizePolicyCross.constructor.fixedHeightPortrait");
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
15
|
+
this.fixedWidthLandscapeInternal = fixedWidthLandscape;
|
|
16
|
+
this.fixedHeightPortraitInternal = fixedHeightPortrait;
|
|
18
17
|
}
|
|
19
18
|
/** Target width when landscape */
|
|
20
19
|
get fixedWidthLandscape() {
|
|
21
|
-
return this.
|
|
20
|
+
return this.fixedWidthLandscapeInternal;
|
|
22
21
|
}
|
|
23
22
|
/** Target height when portrait */
|
|
24
23
|
get fixedHeightPortrait() {
|
|
25
|
-
return this.
|
|
24
|
+
return this.fixedHeightPortraitInternal;
|
|
26
25
|
}
|
|
27
26
|
/** Target width when landscape */
|
|
28
27
|
set fixedWidthLandscape(value) {
|
|
29
28
|
assertValidPositiveNumber(value, "UIResizePolicyCross.fixedWidthLandscape");
|
|
30
|
-
if (value !== this.
|
|
31
|
-
this.
|
|
29
|
+
if (value !== this.fixedWidthLandscapeInternal) {
|
|
30
|
+
this.fixedWidthLandscapeInternal = value;
|
|
32
31
|
this.dirty = true;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
/** Target height when portrait */
|
|
36
35
|
set fixedHeightPortrait(value) {
|
|
37
36
|
assertValidPositiveNumber(value, "UIResizePolicyCross.fixedHeightPortrait");
|
|
38
|
-
if (value !== this.
|
|
39
|
-
this.
|
|
37
|
+
if (value !== this.fixedHeightPortraitInternal) {
|
|
38
|
+
this.fixedHeightPortraitInternal = value;
|
|
40
39
|
this.dirty = true;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -44,9 +43,7 @@ class UIResizePolicyCross extends UIResizePolicy {
|
|
|
44
43
|
assertValidPositiveNumber(width, "UIResizePolicyCross.calculateScale.width");
|
|
45
44
|
assertValidPositiveNumber(height, "UIResizePolicyCross.calculateScale.height");
|
|
46
45
|
return width > height
|
|
47
|
-
? this.
|
|
48
|
-
: this.
|
|
46
|
+
? this.fixedWidthLandscapeInternal / width
|
|
47
|
+
: this.fixedHeightPortraitInternal / height;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
export { UIResizePolicyCross };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
2
2
|
/** Scales by height in landscape, by width in portrait */
|
|
3
3
|
export declare class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
4
4
|
private fixedHeightLandscapeInternal;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { assertValidPositiveNumber } from
|
|
2
|
-
import { UIResizePolicy } from
|
|
3
|
-
|
|
1
|
+
import { assertValidPositiveNumber } from "../asserts.js";
|
|
2
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
4
3
|
/** Scales by height in landscape, by width in portrait */
|
|
5
|
-
class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
4
|
+
export class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
6
5
|
/**
|
|
7
6
|
* Creates inverted cross resize policy.
|
|
8
7
|
*
|
|
@@ -13,30 +12,30 @@ class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
|
13
12
|
super();
|
|
14
13
|
assertValidPositiveNumber(fixedHeightLandscape, "UIResizePolicyCrossInverted.constructor.fixedHeightLandscape");
|
|
15
14
|
assertValidPositiveNumber(fixedWidthPortrait, "UIResizePolicyCrossInverted.constructor.fixedWidthPortrait");
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
15
|
+
this.fixedHeightLandscapeInternal = fixedHeightLandscape;
|
|
16
|
+
this.fixedWidthPortraitInternal = fixedWidthPortrait;
|
|
18
17
|
}
|
|
19
18
|
/** Target height when landscape */
|
|
20
19
|
get fixedHeightLandscape() {
|
|
21
|
-
return this.
|
|
20
|
+
return this.fixedHeightLandscapeInternal;
|
|
22
21
|
}
|
|
23
22
|
/** Target width when portrait */
|
|
24
23
|
get fixedWidthPortrait() {
|
|
25
|
-
return this.
|
|
24
|
+
return this.fixedWidthPortraitInternal;
|
|
26
25
|
}
|
|
27
26
|
/** Target height when landscape */
|
|
28
27
|
set fixedHeightLandscape(value) {
|
|
29
28
|
assertValidPositiveNumber(value, "UIResizePolicyCrossInverted.fixedHeightLandscape");
|
|
30
|
-
if (value !== this.
|
|
31
|
-
this.
|
|
29
|
+
if (value !== this.fixedHeightLandscapeInternal) {
|
|
30
|
+
this.fixedHeightLandscapeInternal = value;
|
|
32
31
|
this.dirty = true;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
/** Target width when portrait */
|
|
36
35
|
set fixedWidthPortrait(value) {
|
|
37
36
|
assertValidPositiveNumber(value, "UIResizePolicyCrossInverted.fixedWidthPortrait");
|
|
38
|
-
if (value !== this.
|
|
39
|
-
this.
|
|
37
|
+
if (value !== this.fixedWidthPortraitInternal) {
|
|
38
|
+
this.fixedWidthPortraitInternal = value;
|
|
40
39
|
this.dirty = true;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -44,9 +43,7 @@ class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
|
44
43
|
assertValidPositiveNumber(width, "UIResizePolicyCrossInverted.calculateScale.width");
|
|
45
44
|
assertValidPositiveNumber(height, "UIResizePolicyCrossInverted.calculateScale.height");
|
|
46
45
|
return width > height
|
|
47
|
-
? this.
|
|
48
|
-
: this.
|
|
46
|
+
? this.fixedHeightLandscapeInternal / height
|
|
47
|
+
: this.fixedWidthPortraitInternal / width;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
export { UIResizePolicyCrossInverted };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { assertValidPositiveNumber } from
|
|
2
|
-
import { UIResizePolicy } from
|
|
3
|
-
|
|
1
|
+
import { assertValidPositiveNumber } from "../asserts.js";
|
|
2
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
4
3
|
/** Scales area to fit around rect preserving proportions */
|
|
5
|
-
class UIResizePolicyFit extends UIResizePolicy {
|
|
4
|
+
export class UIResizePolicyFit extends UIResizePolicy {
|
|
6
5
|
/**
|
|
7
6
|
* Creates fit resize policy.
|
|
8
7
|
*
|
|
@@ -13,38 +12,36 @@ class UIResizePolicyFit extends UIResizePolicy {
|
|
|
13
12
|
super();
|
|
14
13
|
assertValidPositiveNumber(rectWidth, "UIResizePolicyFit.constructor.rectWidth");
|
|
15
14
|
assertValidPositiveNumber(rectHeight, "UIResizePolicyFit.constructor.rectHeight");
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
15
|
+
this.rectWidthInternal = rectWidth;
|
|
16
|
+
this.rectHeightInternal = rectHeight;
|
|
18
17
|
}
|
|
19
18
|
/** Target rect width */
|
|
20
19
|
get rectWidth() {
|
|
21
|
-
return this.
|
|
20
|
+
return this.rectWidthInternal;
|
|
22
21
|
}
|
|
23
22
|
/** Target rect height */
|
|
24
23
|
get rectHeight() {
|
|
25
|
-
return this.
|
|
24
|
+
return this.rectHeightInternal;
|
|
26
25
|
}
|
|
27
26
|
/** Target rect width */
|
|
28
27
|
set rectWidth(value) {
|
|
29
28
|
assertValidPositiveNumber(value, "UIResizePolicyFit.rectWidth");
|
|
30
|
-
if (value !== this.
|
|
31
|
-
this.
|
|
29
|
+
if (value !== this.rectWidthInternal) {
|
|
30
|
+
this.rectWidthInternal = value;
|
|
32
31
|
this.dirty = true;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
/** Target rect height */
|
|
36
35
|
set rectHeight(value) {
|
|
37
36
|
assertValidPositiveNumber(value, "UIResizePolicyFit.rectHeight");
|
|
38
|
-
if (value !== this.
|
|
39
|
-
this.
|
|
37
|
+
if (value !== this.rectHeightInternal) {
|
|
38
|
+
this.rectHeightInternal = value;
|
|
40
39
|
this.dirty = true;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
calculateScale(width, height) {
|
|
44
43
|
assertValidPositiveNumber(width, "UIResizePolicyFit.calculateScale.width");
|
|
45
44
|
assertValidPositiveNumber(height, "UIResizePolicyFit.calculateScale.height");
|
|
46
|
-
return Math.max(this.
|
|
45
|
+
return Math.max(this.rectWidthInternal / width, this.rectHeightInternal / height);
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
|
-
|
|
50
|
-
export { UIResizePolicyFit };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UIResizePolicy } from "./UIResizePolicy";
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
2
2
|
/** Scales by height with orientation-specific targets */
|
|
3
3
|
export declare class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
4
4
|
private fixedHeightLandscapeInternal;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { assertValidPositiveNumber } from
|
|
2
|
-
import { UIResizePolicy } from
|
|
3
|
-
|
|
1
|
+
import { assertValidPositiveNumber } from "../asserts.js";
|
|
2
|
+
import { UIResizePolicy } from "./UIResizePolicy.js";
|
|
4
3
|
/** Scales by height with orientation-specific targets */
|
|
5
|
-
class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
4
|
+
export class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
6
5
|
/**
|
|
7
6
|
* Creates fixed height resize policy.
|
|
8
7
|
*
|
|
@@ -13,30 +12,30 @@ class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
|
13
12
|
super();
|
|
14
13
|
assertValidPositiveNumber(fixedHeightLandscape, "UIResizePolicyFixedHeight.constructor.fixedHeightLandscape");
|
|
15
14
|
assertValidPositiveNumber(fixedHeightPortrait, "UIResizePolicyFixedHeight.constructor.fixedHeightPortrait");
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
15
|
+
this.fixedHeightLandscapeInternal = fixedHeightLandscape;
|
|
16
|
+
this.fixedHeightPortraitInternal = fixedHeightPortrait;
|
|
18
17
|
}
|
|
19
18
|
/** Target height when landscape */
|
|
20
19
|
get fixedHeightLandscape() {
|
|
21
|
-
return this.
|
|
20
|
+
return this.fixedHeightLandscapeInternal;
|
|
22
21
|
}
|
|
23
22
|
/** Target height when portrait */
|
|
24
23
|
get fixedHeightPortrait() {
|
|
25
|
-
return this.
|
|
24
|
+
return this.fixedHeightPortraitInternal;
|
|
26
25
|
}
|
|
27
26
|
/** Target height when landscape */
|
|
28
27
|
set fixedHeightLandscape(value) {
|
|
29
28
|
assertValidPositiveNumber(value, "UIResizePolicyFixedHeight.fixedHeightLandscape");
|
|
30
|
-
if (value !== this.
|
|
31
|
-
this.
|
|
29
|
+
if (value !== this.fixedHeightLandscapeInternal) {
|
|
30
|
+
this.fixedHeightLandscapeInternal = value;
|
|
32
31
|
this.dirty = true;
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
/** Target height when portrait */
|
|
36
35
|
set fixedHeightPortrait(value) {
|
|
37
36
|
assertValidPositiveNumber(value, "UIResizePolicyFixedHeight.fixedHeightPortrait");
|
|
38
|
-
if (value !== this.
|
|
39
|
-
this.
|
|
37
|
+
if (value !== this.fixedHeightPortraitInternal) {
|
|
38
|
+
this.fixedHeightPortraitInternal = value;
|
|
40
39
|
this.dirty = true;
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -44,9 +43,7 @@ class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
|
44
43
|
assertValidPositiveNumber(width, "UIResizePolicyFixedHeight.calculateScale.width");
|
|
45
44
|
assertValidPositiveNumber(height, "UIResizePolicyFixedHeight.calculateScale.height");
|
|
46
45
|
return width > height
|
|
47
|
-
? this.
|
|
48
|
-
: this.
|
|
46
|
+
? this.fixedHeightLandscapeInternal / height
|
|
47
|
+
: this.fixedHeightPortraitInternal / height;
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
|
-
|
|
52
|
-
export { UIResizePolicyFixedHeight };
|