laymur 0.17.0 → 0.17.2
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 +5 -0
- package/{src/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.ts → dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts} +2 -3
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +22 -0
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +41 -0
- package/dist/core/constraints/UIConstraint.d.ts +12 -0
- package/dist/core/constraints/UIConstraint.js +11 -0
- package/dist/core/constraints/UICustomConstraint.d.ts +28 -0
- package/dist/core/constraints/UICustomConstraint.js +37 -0
- package/{src/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.ts → dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts} +2 -3
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +20 -0
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +34 -0
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +11 -0
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +3 -0
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +36 -0
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +100 -0
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +14 -0
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +4 -0
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +44 -0
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +136 -0
- package/{src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.ts → dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts} +2 -3
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +22 -0
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +40 -0
- package/{src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.ts → dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts} +8 -9
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +43 -0
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +71 -0
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +11 -0
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +3 -0
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +32 -0
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +100 -0
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +14 -0
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +4 -0
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +44 -0
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +136 -0
- package/{src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.ts → dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts} +2 -3
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +22 -0
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +40 -0
- package/{src/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.ts → dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts} +2 -3
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +20 -0
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +34 -0
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +64 -0
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +19 -0
- package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +46 -0
- package/dist/core/constraints/builders/UIConstraint2DBuilder.js +138 -0
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +13 -0
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +3 -0
- package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +29 -0
- package/dist/core/constraints/builders/UICoverConstraintBuilder.js +63 -0
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +13 -0
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +3 -0
- package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +29 -0
- package/dist/core/constraints/builders/UIFitConstraintBuilder.js +63 -0
- package/dist/core/elements/UIAnchor/UIAnchor.Internal.d.ts +12 -0
- package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +5 -0
- package/dist/core/elements/UIAnchor/UIAnchor.d.ts +32 -0
- package/dist/core/elements/UIAnchor/UIAnchor.js +49 -0
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +27 -0
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +15 -0
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +77 -0
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +259 -0
- package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +30 -0
- package/dist/core/elements/UIDummy/UIDummy.Internal.js +8 -0
- package/dist/core/elements/UIDummy/UIDummy.d.ts +82 -0
- package/dist/core/elements/UIDummy/UIDummy.js +173 -0
- package/{src/core/elements/UIElement/UIElement.Internal.ts → dist/core/elements/UIElement/UIElement.Internal.d.ts} +5 -7
- package/dist/core/elements/UIElement/UIElement.Internal.js +5 -0
- package/dist/core/elements/UIElement/UIElement.d.ts +38 -0
- package/dist/core/elements/UIElement/UIElement.js +74 -0
- package/{src/core/elements/UIGraphics/UIGraphics.Internal.ts → dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts} +5 -7
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +7 -0
- package/dist/core/elements/UIGraphics/UIGraphics.d.ts +51 -0
- package/dist/core/elements/UIGraphics/UIGraphics.js +126 -0
- package/{src/core/elements/UIImage/UIImage.Internal.ts → dist/core/elements/UIImage/UIImage.Internal.d.ts} +2 -3
- package/dist/core/elements/UIImage/UIImage.d.ts +32 -0
- package/dist/core/elements/UIImage/UIImage.js +85 -0
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +23 -0
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +12 -0
- package/dist/core/elements/UINineSlice/UINineSlice.d.ts +60 -0
- package/dist/core/elements/UINineSlice/UINineSlice.js +188 -0
- package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +14 -0
- package/dist/core/elements/UIProgress/UIProgress.Internal.js +3 -0
- package/dist/core/elements/UIProgress/UIProgress.d.ts +45 -0
- package/dist/core/elements/UIProgress/UIProgress.js +165 -0
- package/dist/core/elements/UIScene/UIScene.Internal.d.ts +43 -0
- package/dist/core/elements/UIScene/UIScene.Internal.js +27 -0
- package/dist/core/elements/UIScene/UIScene.d.ts +59 -0
- package/dist/core/elements/UIScene/UIScene.js +157 -0
- package/{src/core/elements/UIText/UIText.Interfaces.ts → dist/core/elements/UIText/UIText.Interfaces.d.ts} +16 -21
- package/dist/core/elements/UIText/UIText.Internal.d.ts +26 -0
- package/dist/core/elements/UIText/UIText.Internal.js +12 -0
- package/dist/core/elements/UIText/UIText.Measuring.d.ts +50 -0
- package/dist/core/elements/UIText/UIText.Measuring.js +153 -0
- package/dist/core/elements/UIText/UIText.Rendering.d.ts +20 -0
- package/dist/core/elements/UIText/UIText.Rendering.js +61 -0
- package/dist/core/elements/UIText/UIText.d.ts +71 -0
- package/dist/core/elements/UIText/UIText.js +265 -0
- package/{src/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.ts → dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts} +11 -14
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +5 -0
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +63 -0
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +147 -0
- package/{src/core/layers/UILayer/UILayer.Internal.ts → dist/core/layers/UILayer/UILayer.Internal.d.ts} +11 -15
- package/dist/core/layers/UILayer/UILayer.Internal.js +7 -0
- package/dist/core/layers/UILayer/UILayer.d.ts +49 -0
- package/dist/core/layers/UILayer/UILayer.js +113 -0
- package/dist/core/miscellaneous/UIExpression.d.ts +69 -0
- package/dist/core/miscellaneous/UIExpression.js +128 -0
- package/dist/core/miscellaneous/UIMode.d.ts +23 -0
- package/dist/core/miscellaneous/UIMode.js +30 -0
- package/dist/core/miscellaneous/UIOrientation.d.ts +15 -0
- package/dist/core/miscellaneous/UIOrientation.js +20 -0
- package/dist/core/miscellaneous/UIPriority.d.ts +32 -0
- package/dist/core/miscellaneous/UIPriority.js +63 -0
- package/dist/core/miscellaneous/UIRelation.d.ts +23 -0
- package/dist/core/miscellaneous/UIRelation.js +40 -0
- package/dist/core/miscellaneous/UITransparencyMode.d.ts +9 -0
- package/dist/core/miscellaneous/UITransparencyMode.js +12 -0
- package/dist/core/miscellaneous/area/UIArea.d.ts +3 -0
- package/dist/core/miscellaneous/area/UIArea.js +5 -0
- package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +15 -0
- package/dist/core/miscellaneous/area/UIAreaCircle.js +32 -0
- package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +12 -0
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +40 -0
- package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +17 -0
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +36 -0
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +21 -0
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +72 -0
- package/dist/core/miscellaneous/asserts.d.ts +43 -0
- package/dist/core/miscellaneous/asserts.js +163 -0
- package/dist/core/miscellaneous/canvas.d.ts +31 -0
- package/dist/core/miscellaneous/canvas.js +37 -0
- package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +7 -0
- package/dist/core/miscellaneous/color/UIColor.Internal.js +42 -0
- package/dist/core/miscellaneous/color/UIColor.d.ts +234 -0
- package/dist/core/miscellaneous/color/UIColor.js +636 -0
- package/dist/core/miscellaneous/computeTransform.d.ts +18 -0
- package/dist/core/miscellaneous/computeTransform.js +82 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +19 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +168 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +1 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +349 -0
- package/{src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.ts → dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts} +8 -10
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +1 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +357 -0
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +38 -0
- package/dist/core/miscellaneous/generic-plane/shared.js +228 -0
- package/dist/core/miscellaneous/insets/UIInsets.Internal.d.ts +11 -0
- package/dist/core/miscellaneous/insets/UIInsets.Internal.js +3 -0
- package/dist/core/miscellaneous/insets/UIInsets.d.ts +48 -0
- package/dist/core/miscellaneous/insets/UIInsets.js +224 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.d.ts +9 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +19 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +21 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +51 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +16 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +48 -0
- package/dist/core/miscellaneous/math.d.ts +7 -0
- package/dist/core/miscellaneous/math.js +11 -0
- package/dist/core/miscellaneous/micro/UIMicro.Internal.d.ts +31 -0
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +15 -0
- package/dist/core/miscellaneous/micro/UIMicro.d.ts +59 -0
- package/dist/core/miscellaneous/micro/UIMicro.js +181 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.d.ts +3 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +9 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +22 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +50 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +22 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +22 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +22 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +50 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +22 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +22 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +5 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +13 -0
- package/dist/core/miscellaneous/shared.d.ts +46 -0
- package/dist/core/miscellaneous/shared.js +37 -0
- package/{src/core/miscellaneous/text-span/UITextSpan.Internal.ts → dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts} +4 -5
- package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +14 -0
- package/dist/core/miscellaneous/text-span/UITextSpan.js +36 -0
- package/dist/core/miscellaneous/text-style/UITextStyle.Internal.d.ts +48 -0
- package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +17 -0
- package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +85 -0
- package/dist/core/miscellaneous/text-style/UITextStyle.js +372 -0
- package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +49 -0
- package/dist/core/miscellaneous/texture/UITextureView.Internal.js +6 -0
- package/dist/core/miscellaneous/texture/UITextureView.d.ts +67 -0
- package/dist/core/miscellaneous/texture/UITextureView.js +234 -0
- package/dist/core/miscellaneous/webglCapabilities.d.ts +2 -0
- package/dist/core/miscellaneous/webglCapabilities.js +103 -0
- package/dist/core/shaders/UIImage.glsl.js +3 -0
- package/dist/core/shaders/UINineSlice.glsl.js +3 -0
- package/dist/core/shaders/UIProgress.glsl.js +3 -0
- package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +3 -0
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +3 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +17 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +13 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +108 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +13 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +20 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +75 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +49 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +215 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +505 -0
- package/dist/index.js +51 -0
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +21 -0
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +47 -0
- package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +14 -0
- package/dist/particles/behaviorModules/UIBehaviorModule.js +9 -0
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +39 -0
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +110 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +22 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +66 -0
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +20 -0
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +48 -0
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +26 -0
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +66 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +20 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +49 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +26 -0
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +70 -0
- package/dist/particles/elements/UIEmitter.Internal.d.ts +15 -0
- package/dist/particles/elements/UIEmitter.Internal.js +11 -0
- package/dist/particles/elements/UIEmitter.d.ts +68 -0
- package/dist/particles/elements/UIEmitter.js +203 -0
- package/dist/particles/index.js +18 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +13 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +211 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +17 -0
- package/dist/particles/instancedParticle/UIInstancedParticle.js +93 -0
- package/dist/particles/miscellaneous/miscellaneous.d.ts +32 -0
- package/dist/particles/miscellaneous/miscellaneous.js +67 -0
- package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +14 -0
- package/dist/particles/renderingModules/UIRenderingColorOverLife.js +32 -0
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +15 -0
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +37 -0
- package/dist/particles/renderingModules/UIRenderingModule.d.ts +8 -0
- package/dist/particles/renderingModules/UIRenderingModule.js +9 -0
- package/dist/particles/renderingModules/UIRenderingTexture.d.ts +14 -0
- package/dist/particles/renderingModules/UIRenderingTexture.js +26 -0
- package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +3 -0
- package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +3 -0
- package/dist/particles/shaders/UIRenderingTexture.glsl.js +3 -0
- package/dist/particles/spawnModules/UISpawnModule.d.ts +9 -0
- package/dist/particles/spawnModules/UISpawnModule.js +9 -0
- package/dist/particles/spawnModules/UISpawnOffset.d.ts +21 -0
- package/dist/particles/spawnModules/UISpawnOffset.js +46 -0
- package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +20 -0
- package/dist/particles/spawnModules/UISpawnRandomLifetime.js +47 -0
- package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +20 -0
- package/dist/particles/spawnModules/UISpawnRandomRotation.js +45 -0
- package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +26 -0
- package/dist/particles/spawnModules/UISpawnRandomScale.js +60 -0
- package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +20 -0
- package/dist/particles/spawnModules/UISpawnRandomTorque.js +45 -0
- package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +26 -0
- package/dist/particles/spawnModules/UISpawnRandomVelocity.js +64 -0
- package/dist/particles/spawnModules/UISpawnRectangle.d.ts +27 -0
- package/dist/particles/spawnModules/UISpawnRectangle.js +62 -0
- package/package.json +8 -1
- package/.claude/settings.local.json +0 -9
- package/.editorconfig +0 -14
- package/CLAUDE.md +0 -181
- package/assets/logotype.png +0 -0
- package/eslint.config.js +0 -111
- package/rollup.config.js +0 -52
- package/src/core/constraints/UIAspectConstraint/UIAspectConstraint.ts +0 -60
- package/src/core/constraints/UIConstraint.ts +0 -20
- package/src/core/constraints/UICustomConstraint.ts +0 -62
- package/src/core/constraints/UIHeightConstraint/UIHeightConstraint.ts +0 -52
- package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.ts +0 -13
- package/src/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.ts +0 -139
- package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.ts +0 -16
- package/src/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.ts +0 -189
- package/src/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.ts +0 -68
- package/src/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.ts +0 -94
- package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.ts +0 -13
- package/src/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.ts +0 -135
- package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.ts +0 -16
- package/src/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.ts +0 -189
- package/src/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.ts +0 -68
- package/src/core/constraints/UIWidthConstraint/UIWidthConstraint.ts +0 -52
- package/src/core/constraints/builders/UIConstraint2DBuilder.Internal.ts +0 -84
- package/src/core/constraints/builders/UIConstraint2DBuilder.ts +0 -168
- package/src/core/constraints/builders/UICoverConstraintBuilder.Internal.ts +0 -15
- package/src/core/constraints/builders/UICoverConstraintBuilder.ts +0 -84
- package/src/core/constraints/builders/UIFitConstraintBuilder.Internal.ts +0 -15
- package/src/core/constraints/builders/UIFitConstraintBuilder.ts +0 -84
- package/src/core/elements/UIAnchor/UIAnchor.Internal.ts +0 -13
- package/src/core/elements/UIAnchor/UIAnchor.ts +0 -70
- package/src/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.ts +0 -30
- package/src/core/elements/UIAnimatedImage/UIAnimatedImage.ts +0 -355
- package/src/core/elements/UIDummy/UIDummy.Internal.ts +0 -33
- package/src/core/elements/UIDummy/UIDummy.ts +0 -244
- package/src/core/elements/UIElement/UIElement.ts +0 -127
- package/src/core/elements/UIGraphics/UIGraphics.ts +0 -168
- package/src/core/elements/UIImage/UIImage.ts +0 -138
- package/src/core/elements/UINineSlice/UINineSlice.Internal.ts +0 -26
- package/src/core/elements/UINineSlice/UINineSlice.ts +0 -296
- package/src/core/elements/UIProgress/UIProgress.Internal.ts +0 -24
- package/src/core/elements/UIProgress/UIProgress.ts +0 -259
- package/src/core/elements/UIScene/UIScene.Internal.ts +0 -46
- package/src/core/elements/UIScene/UIScene.ts +0 -259
- package/src/core/elements/UIText/UIText.Internal.ts +0 -29
- package/src/core/elements/UIText/UIText.Measuring.ts +0 -183
- package/src/core/elements/UIText/UIText.Rendering.ts +0 -83
- package/src/core/elements/UIText/UIText.ts +0 -376
- package/src/core/layers/UIFullscreenLayer/UIFullscreenLayer.ts +0 -233
- package/src/core/layers/UILayer/UILayer.ts +0 -156
- package/src/core/miscellaneous/UIExpression.ts +0 -142
- package/src/core/miscellaneous/UIMode.ts +0 -29
- package/src/core/miscellaneous/UIOrientation.ts +0 -18
- package/src/core/miscellaneous/UIPriority.ts +0 -63
- package/src/core/miscellaneous/UIRelation.ts +0 -39
- package/src/core/miscellaneous/UITransparencyMode.ts +0 -9
- package/src/core/miscellaneous/area/UIArea.ts +0 -5
- package/src/core/miscellaneous/area/UIAreaCircle.ts +0 -32
- package/src/core/miscellaneous/area/UIAreaPolygon.ts +0 -50
- package/src/core/miscellaneous/area/UIAreaRectangle.ts +0 -38
- package/src/core/miscellaneous/area/UIAreaRoundedRectangle.ts +0 -78
- package/src/core/miscellaneous/asserts.ts +0 -187
- package/src/core/miscellaneous/canvas.ts +0 -73
- package/src/core/miscellaneous/color/UIColor.Internal.ts +0 -89
- package/src/core/miscellaneous/color/UIColor.ts +0 -844
- package/src/core/miscellaneous/computeTransform.ts +0 -127
- package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.ts +0 -235
- package/src/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.ts +0 -524
- package/src/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.ts +0 -448
- package/src/core/miscellaneous/generic-plane/shared.ts +0 -323
- package/src/core/miscellaneous/insets/UIInsets.Internal.ts +0 -9
- package/src/core/miscellaneous/insets/UIInsets.ts +0 -248
- package/src/core/miscellaneous/mask-function/UIProgressMaskFunction.ts +0 -24
- package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.ts +0 -58
- package/src/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.ts +0 -52
- package/src/core/miscellaneous/math.ts +0 -16
- package/src/core/miscellaneous/micro/UIMicro.Internal.ts +0 -33
- package/src/core/miscellaneous/micro/UIMicro.ts +0 -222
- package/src/core/miscellaneous/resize-policy/UIResizePolicy.ts +0 -8
- package/src/core/miscellaneous/resize-policy/UIResizePolicyCover.ts +0 -57
- package/src/core/miscellaneous/resize-policy/UIResizePolicyCross.ts +0 -65
- package/src/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.ts +0 -65
- package/src/core/miscellaneous/resize-policy/UIResizePolicyFit.ts +0 -57
- package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.ts +0 -65
- package/src/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.ts +0 -65
- package/src/core/miscellaneous/resize-policy/UIResizePolicyNone.ts +0 -11
- package/src/core/miscellaneous/shared.ts +0 -73
- package/src/core/miscellaneous/text-span/UITextSpan.ts +0 -43
- package/src/core/miscellaneous/text-style/UITextStyle.Internal.ts +0 -52
- package/src/core/miscellaneous/text-style/UITextStyle.ts +0 -479
- package/src/core/miscellaneous/texture/UITextureView.Internal.ts +0 -55
- package/src/core/miscellaneous/texture/UITextureView.ts +0 -308
- package/src/core/miscellaneous/webglCapabilities.ts +0 -129
- package/src/core/shaders/UIImage.glsl +0 -10
- package/src/core/shaders/UINineSlice.glsl +0 -53
- package/src/core/shaders/UIProgress.glsl +0 -15
- package/src/core/shaders/UIProgressMaskFunctionCircular.glsl +0 -13
- package/src/core/shaders/UIProgressMaskFunctionDirectional.glsl +0 -12
- package/src/core/shaders/glsl.d.ts +0 -27
- package/src/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.ts +0 -23
- package/src/core/wrappers/UIInputWrapper/UIInputWrapper.ts +0 -124
- package/src/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.ts +0 -22
- package/src/core/wrappers/UISceneWrapper/UISceneWrapper.ts +0 -101
- package/src/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.ts +0 -58
- package/src/core/wrappers/UISolverWrapper/UISolverWrapper.ts +0 -605
- package/src/particles/behaviorModules/UIBehaviorDirectionalGravity.ts +0 -70
- package/src/particles/behaviorModules/UIBehaviorModule.ts +0 -20
- package/src/particles/behaviorModules/UIBehaviorPointGravity.ts +0 -173
- package/src/particles/behaviorModules/UIBehaviorScaleOverLife.ts +0 -104
- package/src/particles/behaviorModules/UIBehaviorTorqueDamping.ts +0 -75
- package/src/particles/behaviorModules/UIBehaviorTorqueNoise.ts +0 -115
- package/src/particles/behaviorModules/UIBehaviorVelocityDamping.ts +0 -77
- package/src/particles/behaviorModules/UIBehaviorVelocityNoise.ts +0 -118
- package/src/particles/elements/UIEmitter.Internal.ts +0 -22
- package/src/particles/elements/UIEmitter.ts +0 -313
- package/src/particles/instancedParticle/UIInstancedParticle.Internal.ts +0 -263
- package/src/particles/instancedParticle/UIInstancedParticle.ts +0 -138
- package/src/particles/miscellaneous/miscellaneous.ts +0 -115
- package/src/particles/renderingModules/UIRenderingColorOverLife.ts +0 -39
- package/src/particles/renderingModules/UIRenderingColorOverVelocity.ts +0 -49
- package/src/particles/renderingModules/UIRenderingModule.ts +0 -17
- package/src/particles/renderingModules/UIRenderingTexture.ts +0 -30
- package/src/particles/shaders/UIRenderingColorOverLife.glsl +0 -4
- package/src/particles/shaders/UIRenderingColorOverVelocity.glsl +0 -6
- package/src/particles/shaders/UIRenderingTexture.glsl +0 -4
- package/src/particles/spawnModules/UISpawnModule.ts +0 -22
- package/src/particles/spawnModules/UISpawnOffset.ts +0 -62
- package/src/particles/spawnModules/UISpawnRandomLifetime.ts +0 -68
- package/src/particles/spawnModules/UISpawnRandomRotation.ts +0 -60
- package/src/particles/spawnModules/UISpawnRandomScale.ts +0 -81
- package/src/particles/spawnModules/UISpawnRandomTorque.ts +0 -62
- package/src/particles/spawnModules/UISpawnRandomVelocity.ts +0 -92
- package/src/particles/spawnModules/UISpawnRectangle.ts +0 -81
- package/tsconfig.json +0 -29
- /package/{src/core/index.ts → dist/core/index.d.ts} +0 -0
- /package/{src/particles/index.ts → dist/particles/index.d.ts} +0 -0
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import { MathUtils } from 'three';
|
|
2
|
+
import { assertValidNumber } from '../asserts.js';
|
|
3
|
+
import { MICRO_DEFAULT_POSITION, MICRO_DEFAULT_ANCHOR, MICRO_DEFAULT_SCALE, MICRO_DEFAULT_ROTATION, MICRO_DEFAULT_ANCHOR_MODE } from './UIMicro.Internal.js';
|
|
4
|
+
|
|
5
|
+
/** Transforms that don't affect constraints */
|
|
6
|
+
class UIMicro {
|
|
7
|
+
/**
|
|
8
|
+
* Creates UIMicro instance.
|
|
9
|
+
*
|
|
10
|
+
* @param config - Transform configuration
|
|
11
|
+
*/
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this._private_dirtyInternal = true;
|
|
14
|
+
this._private_xInternal = config?.x ?? MICRO_DEFAULT_POSITION;
|
|
15
|
+
this._private_yInternal = config?.y ?? MICRO_DEFAULT_POSITION;
|
|
16
|
+
this._private_anchorXInternal = config?.anchorX ?? MICRO_DEFAULT_ANCHOR;
|
|
17
|
+
this._private_anchorYInternal = config?.anchorY ?? MICRO_DEFAULT_ANCHOR;
|
|
18
|
+
this._private_scaleXInternal = config?.scaleX ?? MICRO_DEFAULT_SCALE;
|
|
19
|
+
this._private_scaleYInternal = config?.scaleY ?? MICRO_DEFAULT_SCALE;
|
|
20
|
+
this._private_rotationInternal = config?.rotation ?? MICRO_DEFAULT_ROTATION;
|
|
21
|
+
this._private_anchorModeInternal = config?.anchorMode ?? MICRO_DEFAULT_ANCHOR_MODE;
|
|
22
|
+
}
|
|
23
|
+
/** X offset in world units */
|
|
24
|
+
get x() {
|
|
25
|
+
return this._private_xInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Y offset in world units */
|
|
28
|
+
get y() {
|
|
29
|
+
return this._private_yInternal;
|
|
30
|
+
}
|
|
31
|
+
/** X anchor in normalized coordinates (0 to 1) */
|
|
32
|
+
get anchorX() {
|
|
33
|
+
return this._private_anchorXInternal;
|
|
34
|
+
}
|
|
35
|
+
/** Y anchor in normalized coordinates (0 to 1) */
|
|
36
|
+
get anchorY() {
|
|
37
|
+
return this._private_anchorYInternal;
|
|
38
|
+
}
|
|
39
|
+
/** X scale multiplier */
|
|
40
|
+
get scaleX() {
|
|
41
|
+
return this._private_scaleXInternal;
|
|
42
|
+
}
|
|
43
|
+
/** Y scale multiplier */
|
|
44
|
+
get scaleY() {
|
|
45
|
+
return this._private_scaleYInternal;
|
|
46
|
+
}
|
|
47
|
+
/** Rotation in degrees */
|
|
48
|
+
get angle() {
|
|
49
|
+
return MathUtils.radToDeg(this._private_rotationInternal);
|
|
50
|
+
}
|
|
51
|
+
/** Which transforms apply relative to anchor */
|
|
52
|
+
get anchorMode() {
|
|
53
|
+
return this._private_anchorModeInternal;
|
|
54
|
+
}
|
|
55
|
+
/** Rotation in radians */
|
|
56
|
+
get rotation() {
|
|
57
|
+
return this._private_rotationInternal;
|
|
58
|
+
}
|
|
59
|
+
/** @internal */
|
|
60
|
+
get dirty() {
|
|
61
|
+
return this._private_dirtyInternal;
|
|
62
|
+
}
|
|
63
|
+
/** X offset in world units */
|
|
64
|
+
set x(value) {
|
|
65
|
+
assertValidNumber(value, "UIMicro.x");
|
|
66
|
+
if (value !== this._private_xInternal) {
|
|
67
|
+
this._private_xInternal = value;
|
|
68
|
+
this._private_dirtyInternal = true;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/** Y offset in world units */
|
|
72
|
+
set y(value) {
|
|
73
|
+
assertValidNumber(value, "UIMicro.y");
|
|
74
|
+
if (value !== this._private_yInternal) {
|
|
75
|
+
this._private_yInternal = value;
|
|
76
|
+
this._private_dirtyInternal = true;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** X anchor in normalized coordinates (0 to 1) */
|
|
80
|
+
set anchorX(value) {
|
|
81
|
+
assertValidNumber(value, "UIMicro.anchorX");
|
|
82
|
+
if (value !== this._private_anchorXInternal) {
|
|
83
|
+
this._private_anchorXInternal = value;
|
|
84
|
+
this._private_dirtyInternal = true;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/** Y anchor in normalized coordinates (0 to 1) */
|
|
88
|
+
set anchorY(value) {
|
|
89
|
+
assertValidNumber(value, "UIMicro.anchorY");
|
|
90
|
+
if (value !== this._private_anchorYInternal) {
|
|
91
|
+
this._private_anchorYInternal = value;
|
|
92
|
+
this._private_dirtyInternal = true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/** X scale multiplier */
|
|
96
|
+
set scaleX(value) {
|
|
97
|
+
assertValidNumber(value, "UIMicro.scaleX");
|
|
98
|
+
if (value !== this._private_scaleXInternal) {
|
|
99
|
+
this._private_scaleXInternal = value;
|
|
100
|
+
this._private_dirtyInternal = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
/** Y scale multiplier */
|
|
104
|
+
set scaleY(value) {
|
|
105
|
+
assertValidNumber(value, "UIMicro.scaleY");
|
|
106
|
+
if (value !== this._private_scaleYInternal) {
|
|
107
|
+
this._private_scaleYInternal = value;
|
|
108
|
+
this._private_dirtyInternal = true;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/** Rotation in degrees */
|
|
112
|
+
set angle(value) {
|
|
113
|
+
assertValidNumber(value, "UIMicro.angle");
|
|
114
|
+
const rotation = MathUtils.degToRad(value);
|
|
115
|
+
if (rotation !== this._private_rotationInternal) {
|
|
116
|
+
this._private_rotationInternal = rotation;
|
|
117
|
+
this._private_dirtyInternal = true;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/** Rotation in radians */
|
|
121
|
+
set rotation(value) {
|
|
122
|
+
assertValidNumber(value, "UIMicro.rotation");
|
|
123
|
+
if (value !== this._private_rotationInternal) {
|
|
124
|
+
this._private_rotationInternal = value;
|
|
125
|
+
this._private_dirtyInternal = true;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/** Which transforms apply relative to anchor */
|
|
129
|
+
set anchorMode(value) {
|
|
130
|
+
if (value !== this._private_anchorModeInternal) {
|
|
131
|
+
this._private_anchorModeInternal = value;
|
|
132
|
+
this._private_dirtyInternal = true;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
/** @internal */
|
|
136
|
+
setDirtyFalse() {
|
|
137
|
+
this._private_dirtyInternal = false;
|
|
138
|
+
}
|
|
139
|
+
/** Resets all transforms to defaults */
|
|
140
|
+
reset() {
|
|
141
|
+
if (this._private_xInternal !== MICRO_DEFAULT_POSITION ||
|
|
142
|
+
this._private_yInternal !== MICRO_DEFAULT_POSITION ||
|
|
143
|
+
this._private_anchorXInternal !== MICRO_DEFAULT_ANCHOR ||
|
|
144
|
+
this._private_anchorYInternal !== MICRO_DEFAULT_ANCHOR ||
|
|
145
|
+
this._private_scaleXInternal !== MICRO_DEFAULT_SCALE ||
|
|
146
|
+
this._private_scaleYInternal !== MICRO_DEFAULT_SCALE ||
|
|
147
|
+
this._private_rotationInternal !== MICRO_DEFAULT_ROTATION) {
|
|
148
|
+
this._private_xInternal = MICRO_DEFAULT_POSITION;
|
|
149
|
+
this._private_yInternal = MICRO_DEFAULT_POSITION;
|
|
150
|
+
this._private_anchorXInternal = MICRO_DEFAULT_ANCHOR;
|
|
151
|
+
this._private_anchorYInternal = MICRO_DEFAULT_ANCHOR;
|
|
152
|
+
this._private_scaleXInternal = MICRO_DEFAULT_SCALE;
|
|
153
|
+
this._private_scaleYInternal = MICRO_DEFAULT_SCALE;
|
|
154
|
+
this._private_rotationInternal = MICRO_DEFAULT_ROTATION;
|
|
155
|
+
this._private_dirtyInternal = true;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
/** Copies transforms from another instance */
|
|
159
|
+
copy(value) {
|
|
160
|
+
if (this._private_xInternal !== value._private_xInternal ||
|
|
161
|
+
this._private_yInternal !== value._private_yInternal ||
|
|
162
|
+
this._private_anchorXInternal !== value._private_anchorXInternal ||
|
|
163
|
+
this._private_anchorYInternal !== value._private_anchorYInternal ||
|
|
164
|
+
this._private_scaleXInternal !== value._private_scaleXInternal ||
|
|
165
|
+
this._private_scaleYInternal !== value._private_scaleYInternal ||
|
|
166
|
+
this._private_rotationInternal !== value._private_rotationInternal ||
|
|
167
|
+
this._private_anchorModeInternal !== value._private_anchorModeInternal) {
|
|
168
|
+
this._private_xInternal = value._private_xInternal;
|
|
169
|
+
this._private_yInternal = value._private_yInternal;
|
|
170
|
+
this._private_anchorXInternal = value._private_anchorXInternal;
|
|
171
|
+
this._private_anchorYInternal = value._private_anchorYInternal;
|
|
172
|
+
this._private_scaleXInternal = value._private_scaleXInternal;
|
|
173
|
+
this._private_scaleYInternal = value._private_scaleYInternal;
|
|
174
|
+
this._private_rotationInternal = value._private_rotationInternal;
|
|
175
|
+
this._private_anchorModeInternal = value._private_anchorModeInternal;
|
|
176
|
+
this._private_dirtyInternal = true;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export { UIMicro };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
+
/** Scales area to cover rect preserving proportions */
|
|
3
|
+
export declare class UIResizePolicyCover extends UIResizePolicy {
|
|
4
|
+
private rectWidthInternal;
|
|
5
|
+
private rectHeightInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Creates cover resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param rectWidth - Target rect width
|
|
10
|
+
* @param rectHeight - Target rect height
|
|
11
|
+
*/
|
|
12
|
+
constructor(rectWidth: number, rectHeight: number);
|
|
13
|
+
/** Target rect width */
|
|
14
|
+
get rectWidth(): number;
|
|
15
|
+
/** Target rect height */
|
|
16
|
+
get rectHeight(): number;
|
|
17
|
+
/** Target rect width */
|
|
18
|
+
set rectWidth(value: number);
|
|
19
|
+
/** Target rect height */
|
|
20
|
+
set rectHeight(value: number);
|
|
21
|
+
calculateScale(width: number, height: number): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { assertValidPositiveNumber } from '../asserts.js';
|
|
2
|
+
import { UIResizePolicy } from './UIResizePolicy.js';
|
|
3
|
+
|
|
4
|
+
/** Scales area to cover rect preserving proportions */
|
|
5
|
+
class UIResizePolicyCover extends UIResizePolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Creates cover resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param rectWidth - Target rect width
|
|
10
|
+
* @param rectHeight - Target rect height
|
|
11
|
+
*/
|
|
12
|
+
constructor(rectWidth, rectHeight) {
|
|
13
|
+
super();
|
|
14
|
+
assertValidPositiveNumber(rectWidth, "UIResizePolicyCover.constructor.rectWidth");
|
|
15
|
+
assertValidPositiveNumber(rectHeight, "UIResizePolicyCover.constructor.rectHeight");
|
|
16
|
+
this._private_rectWidthInternal = rectWidth;
|
|
17
|
+
this._private_rectHeightInternal = rectHeight;
|
|
18
|
+
}
|
|
19
|
+
/** Target rect width */
|
|
20
|
+
get rectWidth() {
|
|
21
|
+
return this._private_rectWidthInternal;
|
|
22
|
+
}
|
|
23
|
+
/** Target rect height */
|
|
24
|
+
get rectHeight() {
|
|
25
|
+
return this._private_rectHeightInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Target rect width */
|
|
28
|
+
set rectWidth(value) {
|
|
29
|
+
assertValidPositiveNumber(value, "UIResizePolicyCover.rectWidth");
|
|
30
|
+
if (value !== this._private_rectWidthInternal) {
|
|
31
|
+
this._private_rectWidthInternal = value;
|
|
32
|
+
this.dirty = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Target rect height */
|
|
36
|
+
set rectHeight(value) {
|
|
37
|
+
assertValidPositiveNumber(value, "UIResizePolicyCover.rectHeight");
|
|
38
|
+
if (value !== this._private_rectHeightInternal) {
|
|
39
|
+
this._private_rectHeightInternal = value;
|
|
40
|
+
this.dirty = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
calculateScale(width, height) {
|
|
44
|
+
assertValidPositiveNumber(width, "UIResizePolicyCover.calculateScale.width");
|
|
45
|
+
assertValidPositiveNumber(height, "UIResizePolicyCover.calculateScale.height");
|
|
46
|
+
return Math.min(this._private_rectWidthInternal / width, this._private_rectHeightInternal / height);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { UIResizePolicyCover };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
+
/** Scales by width in landscape, by height in portrait */
|
|
3
|
+
export declare class UIResizePolicyCross extends UIResizePolicy {
|
|
4
|
+
private fixedWidthLandscapeInternal;
|
|
5
|
+
private fixedHeightPortraitInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Creates cross resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedWidthLandscape - Target width when landscape
|
|
10
|
+
* @param fixedHeightPortrait - Target height when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedWidthLandscape: number, fixedHeightPortrait: number);
|
|
13
|
+
/** Target width when landscape */
|
|
14
|
+
get fixedWidthLandscape(): number;
|
|
15
|
+
/** Target height when portrait */
|
|
16
|
+
get fixedHeightPortrait(): number;
|
|
17
|
+
/** Target width when landscape */
|
|
18
|
+
set fixedWidthLandscape(value: number);
|
|
19
|
+
/** Target height when portrait */
|
|
20
|
+
set fixedHeightPortrait(value: number);
|
|
21
|
+
calculateScale(width: number, height: number): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { assertValidPositiveNumber } from '../asserts.js';
|
|
2
|
+
import { UIResizePolicy } from './UIResizePolicy.js';
|
|
3
|
+
|
|
4
|
+
/** Scales by width in landscape, by height in portrait */
|
|
5
|
+
class UIResizePolicyCross extends UIResizePolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Creates cross resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedWidthLandscape - Target width when landscape
|
|
10
|
+
* @param fixedHeightPortrait - Target height when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedWidthLandscape, fixedHeightPortrait) {
|
|
13
|
+
super();
|
|
14
|
+
assertValidPositiveNumber(fixedWidthLandscape, "UIResizePolicyCross.constructor.fixedWidthLandscape");
|
|
15
|
+
assertValidPositiveNumber(fixedHeightPortrait, "UIResizePolicyCross.constructor.fixedHeightPortrait");
|
|
16
|
+
this._private_fixedWidthLandscapeInternal = fixedWidthLandscape;
|
|
17
|
+
this._private_fixedHeightPortraitInternal = fixedHeightPortrait;
|
|
18
|
+
}
|
|
19
|
+
/** Target width when landscape */
|
|
20
|
+
get fixedWidthLandscape() {
|
|
21
|
+
return this._private_fixedWidthLandscapeInternal;
|
|
22
|
+
}
|
|
23
|
+
/** Target height when portrait */
|
|
24
|
+
get fixedHeightPortrait() {
|
|
25
|
+
return this._private_fixedHeightPortraitInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Target width when landscape */
|
|
28
|
+
set fixedWidthLandscape(value) {
|
|
29
|
+
assertValidPositiveNumber(value, "UIResizePolicyCross.fixedWidthLandscape");
|
|
30
|
+
if (value !== this._private_fixedWidthLandscapeInternal) {
|
|
31
|
+
this._private_fixedWidthLandscapeInternal = value;
|
|
32
|
+
this.dirty = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Target height when portrait */
|
|
36
|
+
set fixedHeightPortrait(value) {
|
|
37
|
+
assertValidPositiveNumber(value, "UIResizePolicyCross.fixedHeightPortrait");
|
|
38
|
+
if (value !== this._private_fixedHeightPortraitInternal) {
|
|
39
|
+
this._private_fixedHeightPortraitInternal = value;
|
|
40
|
+
this.dirty = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
calculateScale(width, height) {
|
|
44
|
+
assertValidPositiveNumber(width, "UIResizePolicyCross.calculateScale.width");
|
|
45
|
+
assertValidPositiveNumber(height, "UIResizePolicyCross.calculateScale.height");
|
|
46
|
+
return width > height
|
|
47
|
+
? this._private_fixedWidthLandscapeInternal / width
|
|
48
|
+
: this._private_fixedHeightPortraitInternal / height;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { UIResizePolicyCross };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
+
/** Scales by height in landscape, by width in portrait */
|
|
3
|
+
export declare class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
4
|
+
private fixedHeightLandscapeInternal;
|
|
5
|
+
private fixedWidthPortraitInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Creates inverted cross resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedHeightLandscape - Target height when landscape
|
|
10
|
+
* @param fixedWidthPortrait - Target width when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedHeightLandscape: number, fixedWidthPortrait: number);
|
|
13
|
+
/** Target height when landscape */
|
|
14
|
+
get fixedHeightLandscape(): number;
|
|
15
|
+
/** Target width when portrait */
|
|
16
|
+
get fixedWidthPortrait(): number;
|
|
17
|
+
/** Target height when landscape */
|
|
18
|
+
set fixedHeightLandscape(value: number);
|
|
19
|
+
/** Target width when portrait */
|
|
20
|
+
set fixedWidthPortrait(value: number);
|
|
21
|
+
calculateScale(width: number, height: number): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { assertValidPositiveNumber } from '../asserts.js';
|
|
2
|
+
import { UIResizePolicy } from './UIResizePolicy.js';
|
|
3
|
+
|
|
4
|
+
/** Scales by height in landscape, by width in portrait */
|
|
5
|
+
class UIResizePolicyCrossInverted extends UIResizePolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Creates inverted cross resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedHeightLandscape - Target height when landscape
|
|
10
|
+
* @param fixedWidthPortrait - Target width when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedHeightLandscape, fixedWidthPortrait) {
|
|
13
|
+
super();
|
|
14
|
+
assertValidPositiveNumber(fixedHeightLandscape, "UIResizePolicyCrossInverted.constructor.fixedHeightLandscape");
|
|
15
|
+
assertValidPositiveNumber(fixedWidthPortrait, "UIResizePolicyCrossInverted.constructor.fixedWidthPortrait");
|
|
16
|
+
this._private_fixedHeightLandscapeInternal = fixedHeightLandscape;
|
|
17
|
+
this._private_fixedWidthPortraitInternal = fixedWidthPortrait;
|
|
18
|
+
}
|
|
19
|
+
/** Target height when landscape */
|
|
20
|
+
get fixedHeightLandscape() {
|
|
21
|
+
return this._private_fixedHeightLandscapeInternal;
|
|
22
|
+
}
|
|
23
|
+
/** Target width when portrait */
|
|
24
|
+
get fixedWidthPortrait() {
|
|
25
|
+
return this._private_fixedWidthPortraitInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Target height when landscape */
|
|
28
|
+
set fixedHeightLandscape(value) {
|
|
29
|
+
assertValidPositiveNumber(value, "UIResizePolicyCrossInverted.fixedHeightLandscape");
|
|
30
|
+
if (value !== this._private_fixedHeightLandscapeInternal) {
|
|
31
|
+
this._private_fixedHeightLandscapeInternal = value;
|
|
32
|
+
this.dirty = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Target width when portrait */
|
|
36
|
+
set fixedWidthPortrait(value) {
|
|
37
|
+
assertValidPositiveNumber(value, "UIResizePolicyCrossInverted.fixedWidthPortrait");
|
|
38
|
+
if (value !== this._private_fixedWidthPortraitInternal) {
|
|
39
|
+
this._private_fixedWidthPortraitInternal = value;
|
|
40
|
+
this.dirty = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
calculateScale(width, height) {
|
|
44
|
+
assertValidPositiveNumber(width, "UIResizePolicyCrossInverted.calculateScale.width");
|
|
45
|
+
assertValidPositiveNumber(height, "UIResizePolicyCrossInverted.calculateScale.height");
|
|
46
|
+
return width > height
|
|
47
|
+
? this._private_fixedHeightLandscapeInternal / height
|
|
48
|
+
: this._private_fixedWidthPortraitInternal / width;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { UIResizePolicyCrossInverted };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
+
/** Scales area to fit around rect preserving proportions */
|
|
3
|
+
export declare class UIResizePolicyFit extends UIResizePolicy {
|
|
4
|
+
private rectWidthInternal;
|
|
5
|
+
private rectHeightInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Creates fit resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param rectWidth - Target rect width
|
|
10
|
+
* @param rectHeight - Target rect height
|
|
11
|
+
*/
|
|
12
|
+
constructor(rectWidth: number, rectHeight: number);
|
|
13
|
+
/** Target rect width */
|
|
14
|
+
get rectWidth(): number;
|
|
15
|
+
/** Target rect height */
|
|
16
|
+
get rectHeight(): number;
|
|
17
|
+
/** Target rect width */
|
|
18
|
+
set rectWidth(value: number);
|
|
19
|
+
/** Target rect height */
|
|
20
|
+
set rectHeight(value: number);
|
|
21
|
+
calculateScale(width: number, height: number): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { assertValidPositiveNumber } from '../asserts.js';
|
|
2
|
+
import { UIResizePolicy } from './UIResizePolicy.js';
|
|
3
|
+
|
|
4
|
+
/** Scales area to fit around rect preserving proportions */
|
|
5
|
+
class UIResizePolicyFit extends UIResizePolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Creates fit resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param rectWidth - Target rect width
|
|
10
|
+
* @param rectHeight - Target rect height
|
|
11
|
+
*/
|
|
12
|
+
constructor(rectWidth, rectHeight) {
|
|
13
|
+
super();
|
|
14
|
+
assertValidPositiveNumber(rectWidth, "UIResizePolicyFit.constructor.rectWidth");
|
|
15
|
+
assertValidPositiveNumber(rectHeight, "UIResizePolicyFit.constructor.rectHeight");
|
|
16
|
+
this._private_rectWidthInternal = rectWidth;
|
|
17
|
+
this._private_rectHeightInternal = rectHeight;
|
|
18
|
+
}
|
|
19
|
+
/** Target rect width */
|
|
20
|
+
get rectWidth() {
|
|
21
|
+
return this._private_rectWidthInternal;
|
|
22
|
+
}
|
|
23
|
+
/** Target rect height */
|
|
24
|
+
get rectHeight() {
|
|
25
|
+
return this._private_rectHeightInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Target rect width */
|
|
28
|
+
set rectWidth(value) {
|
|
29
|
+
assertValidPositiveNumber(value, "UIResizePolicyFit.rectWidth");
|
|
30
|
+
if (value !== this._private_rectWidthInternal) {
|
|
31
|
+
this._private_rectWidthInternal = value;
|
|
32
|
+
this.dirty = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Target rect height */
|
|
36
|
+
set rectHeight(value) {
|
|
37
|
+
assertValidPositiveNumber(value, "UIResizePolicyFit.rectHeight");
|
|
38
|
+
if (value !== this._private_rectHeightInternal) {
|
|
39
|
+
this._private_rectHeightInternal = value;
|
|
40
|
+
this.dirty = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
calculateScale(width, height) {
|
|
44
|
+
assertValidPositiveNumber(width, "UIResizePolicyFit.calculateScale.width");
|
|
45
|
+
assertValidPositiveNumber(height, "UIResizePolicyFit.calculateScale.height");
|
|
46
|
+
return Math.max(this._private_rectWidthInternal / width, this._private_rectHeightInternal / height);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export { UIResizePolicyFit };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
+
/** Scales by height with orientation-specific targets */
|
|
3
|
+
export declare class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
4
|
+
private fixedHeightLandscapeInternal;
|
|
5
|
+
private fixedHeightPortraitInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Creates fixed height resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedHeightLandscape - Target height when landscape
|
|
10
|
+
* @param fixedHeightPortrait - Target height when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedHeightLandscape: number, fixedHeightPortrait: number);
|
|
13
|
+
/** Target height when landscape */
|
|
14
|
+
get fixedHeightLandscape(): number;
|
|
15
|
+
/** Target height when portrait */
|
|
16
|
+
get fixedHeightPortrait(): number;
|
|
17
|
+
/** Target height when landscape */
|
|
18
|
+
set fixedHeightLandscape(value: number);
|
|
19
|
+
/** Target height when portrait */
|
|
20
|
+
set fixedHeightPortrait(value: number);
|
|
21
|
+
calculateScale(width: number, height: number): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { assertValidPositiveNumber } from '../asserts.js';
|
|
2
|
+
import { UIResizePolicy } from './UIResizePolicy.js';
|
|
3
|
+
|
|
4
|
+
/** Scales by height with orientation-specific targets */
|
|
5
|
+
class UIResizePolicyFixedHeight extends UIResizePolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Creates fixed height resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedHeightLandscape - Target height when landscape
|
|
10
|
+
* @param fixedHeightPortrait - Target height when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedHeightLandscape, fixedHeightPortrait) {
|
|
13
|
+
super();
|
|
14
|
+
assertValidPositiveNumber(fixedHeightLandscape, "UIResizePolicyFixedHeight.constructor.fixedHeightLandscape");
|
|
15
|
+
assertValidPositiveNumber(fixedHeightPortrait, "UIResizePolicyFixedHeight.constructor.fixedHeightPortrait");
|
|
16
|
+
this._private_fixedHeightLandscapeInternal = fixedHeightLandscape;
|
|
17
|
+
this._private_fixedHeightPortraitInternal = fixedHeightPortrait;
|
|
18
|
+
}
|
|
19
|
+
/** Target height when landscape */
|
|
20
|
+
get fixedHeightLandscape() {
|
|
21
|
+
return this._private_fixedHeightLandscapeInternal;
|
|
22
|
+
}
|
|
23
|
+
/** Target height when portrait */
|
|
24
|
+
get fixedHeightPortrait() {
|
|
25
|
+
return this._private_fixedHeightPortraitInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Target height when landscape */
|
|
28
|
+
set fixedHeightLandscape(value) {
|
|
29
|
+
assertValidPositiveNumber(value, "UIResizePolicyFixedHeight.fixedHeightLandscape");
|
|
30
|
+
if (value !== this._private_fixedHeightLandscapeInternal) {
|
|
31
|
+
this._private_fixedHeightLandscapeInternal = value;
|
|
32
|
+
this.dirty = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Target height when portrait */
|
|
36
|
+
set fixedHeightPortrait(value) {
|
|
37
|
+
assertValidPositiveNumber(value, "UIResizePolicyFixedHeight.fixedHeightPortrait");
|
|
38
|
+
if (value !== this._private_fixedHeightPortraitInternal) {
|
|
39
|
+
this._private_fixedHeightPortraitInternal = value;
|
|
40
|
+
this.dirty = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
calculateScale(width, height) {
|
|
44
|
+
assertValidPositiveNumber(width, "UIResizePolicyFixedHeight.calculateScale.width");
|
|
45
|
+
assertValidPositiveNumber(height, "UIResizePolicyFixedHeight.calculateScale.height");
|
|
46
|
+
return width > height
|
|
47
|
+
? this._private_fixedHeightLandscapeInternal / height
|
|
48
|
+
: this._private_fixedHeightPortraitInternal / height;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { UIResizePolicyFixedHeight };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UIResizePolicy } from "./UIResizePolicy";
|
|
2
|
+
/** Scales by width with orientation-specific targets */
|
|
3
|
+
export declare class UIResizePolicyFixedWidth extends UIResizePolicy {
|
|
4
|
+
private fixedWidthLandscapeInternal;
|
|
5
|
+
private fixedWidthPortraitInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Creates fixed width resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedWidthLandscape - Target width when landscape
|
|
10
|
+
* @param fixedWidthPortrait - Target width when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedWidthLandscape: number, fixedWidthPortrait: number);
|
|
13
|
+
/** Target width when landscape */
|
|
14
|
+
get fixedWidthLandscape(): number;
|
|
15
|
+
/** Target width when portrait */
|
|
16
|
+
get fixedWidthPortrait(): number;
|
|
17
|
+
/** Target width when landscape */
|
|
18
|
+
set fixedWidthLandscape(value: number);
|
|
19
|
+
/** Target width when portrait */
|
|
20
|
+
set fixedWidthPortrait(value: number);
|
|
21
|
+
calculateScale(width: number, height: number): number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { assertValidPositiveNumber } from '../asserts.js';
|
|
2
|
+
import { UIResizePolicy } from './UIResizePolicy.js';
|
|
3
|
+
|
|
4
|
+
/** Scales by width with orientation-specific targets */
|
|
5
|
+
class UIResizePolicyFixedWidth extends UIResizePolicy {
|
|
6
|
+
/**
|
|
7
|
+
* Creates fixed width resize policy.
|
|
8
|
+
*
|
|
9
|
+
* @param fixedWidthLandscape - Target width when landscape
|
|
10
|
+
* @param fixedWidthPortrait - Target width when portrait
|
|
11
|
+
*/
|
|
12
|
+
constructor(fixedWidthLandscape, fixedWidthPortrait) {
|
|
13
|
+
super();
|
|
14
|
+
assertValidPositiveNumber(fixedWidthLandscape, "UIResizePolicyFixedWidth.constructor.fixedWidthLandscape");
|
|
15
|
+
assertValidPositiveNumber(fixedWidthPortrait, "UIResizePolicyFixedWidth.constructor.fixedWidthPortrait");
|
|
16
|
+
this._private_fixedWidthLandscapeInternal = fixedWidthLandscape;
|
|
17
|
+
this._private_fixedWidthPortraitInternal = fixedWidthPortrait;
|
|
18
|
+
}
|
|
19
|
+
/** Target width when landscape */
|
|
20
|
+
get fixedWidthLandscape() {
|
|
21
|
+
return this._private_fixedWidthLandscapeInternal;
|
|
22
|
+
}
|
|
23
|
+
/** Target width when portrait */
|
|
24
|
+
get fixedWidthPortrait() {
|
|
25
|
+
return this._private_fixedWidthPortraitInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Target width when landscape */
|
|
28
|
+
set fixedWidthLandscape(value) {
|
|
29
|
+
assertValidPositiveNumber(value, "UIResizePolicyFixedWidth.fixedWidthLandscape");
|
|
30
|
+
if (value !== this._private_fixedWidthLandscapeInternal) {
|
|
31
|
+
this._private_fixedWidthLandscapeInternal = value;
|
|
32
|
+
this.dirty = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Target width when portrait */
|
|
36
|
+
set fixedWidthPortrait(value) {
|
|
37
|
+
assertValidPositiveNumber(value, "UIResizePolicyFixedWidth.fixedWidthPortrait");
|
|
38
|
+
if (value !== this._private_fixedWidthPortraitInternal) {
|
|
39
|
+
this._private_fixedWidthPortraitInternal = value;
|
|
40
|
+
this.dirty = true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
calculateScale(width, height) {
|
|
44
|
+
assertValidPositiveNumber(width, "UIResizePolicyFixedWidth.calculateScale.width");
|
|
45
|
+
assertValidPositiveNumber(height, "UIResizePolicyFixedWidth.calculateScale.height");
|
|
46
|
+
return width > height
|
|
47
|
+
? this._private_fixedWidthLandscapeInternal / width
|
|
48
|
+
: this._private_fixedWidthPortraitInternal / width;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { UIResizePolicyFixedWidth };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { assertValidPositiveNumber } from '../asserts.js';
|
|
2
|
+
import { UIResizePolicy } from './UIResizePolicy.js';
|
|
3
|
+
|
|
4
|
+
/** No scaling. Always returns 1. */
|
|
5
|
+
class UIResizePolicyNone extends UIResizePolicy {
|
|
6
|
+
calculateScale(width, height) {
|
|
7
|
+
assertValidPositiveNumber(width, "UIResizePolicyNone.calculateScale.width");
|
|
8
|
+
assertValidPositiveNumber(height, "UIResizePolicyNone.calculateScale.height");
|
|
9
|
+
return 1;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { UIResizePolicyNone };
|