laymur 0.16.0 → 0.17.1
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 +84 -208
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +41 -0
- package/dist/{constraints → core/constraints}/UIConstraint.d.ts +2 -2
- package/dist/core/constraints/UIConstraint.js +11 -0
- package/dist/core/constraints/UICustomConstraint.js +37 -0
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +34 -0
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +3 -0
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +100 -0
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +4 -0
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +136 -0
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +40 -0
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +71 -0
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +3 -0
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +100 -0
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +4 -0
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +136 -0
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +40 -0
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +34 -0
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +19 -0
- package/dist/core/constraints/builders/UIConstraint2DBuilder.js +138 -0
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +3 -0
- package/dist/core/constraints/builders/UICoverConstraintBuilder.js +63 -0
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +3 -0
- package/dist/core/constraints/builders/UIFitConstraintBuilder.js +63 -0
- package/dist/{elements → core/elements}/UIAnchor/UIAnchor.Internal.d.ts +3 -0
- package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +5 -0
- package/dist/{elements → core/elements}/UIAnchor/UIAnchor.d.ts +3 -3
- package/dist/core/elements/UIAnchor/UIAnchor.js +49 -0
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +15 -0
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +259 -0
- package/dist/core/elements/UIDummy/UIDummy.Internal.js +8 -0
- package/dist/{elements → core/elements}/UIDummy/UIDummy.d.ts +2 -2
- package/dist/core/elements/UIDummy/UIDummy.js +173 -0
- package/dist/core/elements/UIElement/UIElement.Internal.js +5 -0
- package/dist/{elements → core/elements}/UIElement/UIElement.d.ts +2 -2
- package/dist/core/elements/UIElement/UIElement.js +74 -0
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +7 -0
- package/dist/core/elements/UIGraphics/UIGraphics.js +126 -0
- package/dist/core/elements/UIImage/UIImage.js +85 -0
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +12 -0
- package/dist/core/elements/UINineSlice/UINineSlice.js +188 -0
- package/dist/core/elements/UIProgress/UIProgress.Internal.js +3 -0
- package/dist/core/elements/UIProgress/UIProgress.js +165 -0
- package/dist/core/elements/UIScene/UIScene.Internal.js +27 -0
- package/dist/core/elements/UIScene/UIScene.js +157 -0
- package/dist/core/elements/UIText/UIText.Internal.js +12 -0
- package/dist/core/elements/UIText/UIText.Measuring.js +153 -0
- package/dist/core/elements/UIText/UIText.Rendering.js +61 -0
- package/dist/core/elements/UIText/UIText.js +265 -0
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +5 -0
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +147 -0
- package/dist/core/layers/UILayer/UILayer.Internal.js +7 -0
- package/dist/core/layers/UILayer/UILayer.js +113 -0
- package/dist/core/miscellaneous/UIExpression.js +128 -0
- package/dist/core/miscellaneous/UIMode.js +30 -0
- package/dist/core/miscellaneous/UIOrientation.js +20 -0
- package/dist/core/miscellaneous/UIPriority.js +63 -0
- package/dist/core/miscellaneous/UIRelation.js +40 -0
- package/dist/core/miscellaneous/UITransparencyMode.js +12 -0
- package/dist/core/miscellaneous/area/UIArea.js +5 -0
- package/dist/core/miscellaneous/area/UIAreaCircle.js +32 -0
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +40 -0
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +36 -0
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +72 -0
- package/dist/core/miscellaneous/asserts.js +163 -0
- package/dist/core/miscellaneous/canvas.js +37 -0
- package/dist/core/miscellaneous/color/UIColor.Internal.js +42 -0
- package/dist/core/miscellaneous/color/UIColor.js +636 -0
- package/dist/core/miscellaneous/computeTransform.js +82 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +168 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +349 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +357 -0
- package/dist/core/miscellaneous/generic-plane/shared.js +228 -0
- package/dist/core/miscellaneous/insets/UIInsets.Internal.js +3 -0
- package/dist/core/miscellaneous/insets/UIInsets.js +224 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +19 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +51 -0
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +48 -0
- package/dist/{miscellaneous → core/miscellaneous}/math.d.ts +2 -0
- package/dist/core/miscellaneous/math.js +11 -0
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +15 -0
- package/dist/core/miscellaneous/micro/UIMicro.js +181 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +9 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +50 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +50 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +52 -0
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +13 -0
- package/dist/core/miscellaneous/shared.js +37 -0
- package/dist/core/miscellaneous/text-span/UITextSpan.js +36 -0
- package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +17 -0
- package/dist/core/miscellaneous/text-style/UITextStyle.js +372 -0
- package/dist/core/miscellaneous/texture/UITextureView.Internal.js +6 -0
- package/dist/core/miscellaneous/texture/UITextureView.js +234 -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/{wrappers → core/wrappers}/UIInputWrapper/UIInputWrapper.Internal.d.ts +1 -1
- package/dist/{wrappers → core/wrappers}/UIInputWrapper/UIInputWrapper.d.ts +2 -2
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +108 -0
- package/dist/{wrappers → core/wrappers}/UISceneWrapper/UISceneWrapper.Internal.d.ts +1 -1
- package/dist/{wrappers → core/wrappers}/UISceneWrapper/UISceneWrapper.d.ts +2 -2
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +75 -0
- package/dist/{wrappers → core/wrappers}/UISolverWrapper/UISolverWrapper.Internal.d.ts +1 -1
- package/dist/{wrappers → core/wrappers}/UISolverWrapper/UISolverWrapper.d.ts +2 -2
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +505 -0
- package/dist/index.js +51 -9246
- 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.d.ts +18 -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 +27 -36
- package/dist/index.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- /package/dist/{constraints → core/constraints}/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIAspectConstraint/UIAspectConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UICustomConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHeightConstraint/UIHeightConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/UIWidthConstraint/UIWidthConstraint.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/builders/UIConstraint2DBuilder.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/builders/UIConstraint2DBuilder.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/builders/UICoverConstraintBuilder.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/builders/UICoverConstraintBuilder.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/builders/UIFitConstraintBuilder.Internal.d.ts +0 -0
- /package/dist/{constraints → core/constraints}/builders/UIFitConstraintBuilder.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIAnimatedImage/UIAnimatedImage.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIDummy/UIDummy.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIElement/UIElement.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIGraphics/UIGraphics.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIGraphics/UIGraphics.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIImage/UIImage.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIImage/UIImage.d.ts +0 -0
- /package/dist/{elements → core/elements}/UINineSlice/UINineSlice.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UINineSlice/UINineSlice.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIProgress/UIProgress.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIProgress/UIProgress.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIScene/UIScene.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIScene/UIScene.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIText/UIText.Interfaces.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIText/UIText.Internal.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIText/UIText.Measuring.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIText/UIText.Rendering.d.ts +0 -0
- /package/dist/{elements → core/elements}/UIText/UIText.d.ts +0 -0
- /package/dist/{index.d.ts → core/index.d.ts} +0 -0
- /package/dist/{layers → core/layers}/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +0 -0
- /package/dist/{layers → core/layers}/UIFullscreenLayer/UIFullscreenLayer.d.ts +0 -0
- /package/dist/{layers → core/layers}/UILayer/UILayer.Internal.d.ts +0 -0
- /package/dist/{layers → core/layers}/UILayer/UILayer.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/UIExpression.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/UIMode.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/UIOrientation.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/UIPriority.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/UIRelation.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/UITransparencyMode.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/area/UIArea.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaCircle.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaPolygon.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaRectangle.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/area/UIAreaRoundedRectangle.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/asserts.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/canvas.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/color/UIColor.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/color/UIColor.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/computeTransform.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/generic-plane/shared.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/insets/UIInsets.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/insets/UIInsets.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunction.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunctionCircular.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/mask-function/UIProgressMaskFunctionDirectional.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/micro/UIMicro.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/micro/UIMicro.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicy.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCover.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCross.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyCrossInverted.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFit.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFixedHeight.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyFixedWidth.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/resize-policy/UIResizePolicyNone.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/shared.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/text-span/UITextSpan.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/text-span/UITextSpan.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/text-style/UITextStyle.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/text-style/UITextStyle.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/texture/UITextureView.Internal.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/texture/UITextureView.d.ts +0 -0
- /package/dist/{miscellaneous → core/miscellaneous}/webglCapabilities.d.ts +0 -0
|
@@ -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,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,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,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 };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { UILayer } from '../layers/UILayer/UILayer.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Checks if object implements UILayerElement.
|
|
5
|
+
* @param obj Object to check
|
|
6
|
+
* @returns True if object has valid layer property
|
|
7
|
+
*/
|
|
8
|
+
function isUILayerElement(obj) {
|
|
9
|
+
return typeof obj === "object" && obj !== null && "layer" in obj && obj.layer instanceof UILayer;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Checks if object implements UIPointElement.
|
|
13
|
+
* @param obj Object to check
|
|
14
|
+
* @returns True if object has valid position variables
|
|
15
|
+
*/
|
|
16
|
+
function isUIPointElement(obj) {
|
|
17
|
+
return (typeof obj === "object" &&
|
|
18
|
+
obj !== null &&
|
|
19
|
+
typeof obj.xVariable === "number" &&
|
|
20
|
+
typeof obj.yVariable === "number" &&
|
|
21
|
+
typeof obj.x === "number" &&
|
|
22
|
+
typeof obj.y === "number");
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Checks if object implements UIPlaneElement.
|
|
26
|
+
* @param obj Object to check
|
|
27
|
+
* @returns True if object has valid dimension variables
|
|
28
|
+
*/
|
|
29
|
+
function isUIPlaneElement(obj) {
|
|
30
|
+
return (isUIPointElement(obj) &&
|
|
31
|
+
typeof obj.wVariable === "number" &&
|
|
32
|
+
typeof obj.hVariable === "number" &&
|
|
33
|
+
typeof obj.width === "number" &&
|
|
34
|
+
typeof obj.height === "number");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { isUILayerElement, isUIPlaneElement, isUIPointElement };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { UITextStyle } from '../text-style/UITextStyle.js';
|
|
2
|
+
|
|
3
|
+
/** Text span with associated style */
|
|
4
|
+
class UITextSpan {
|
|
5
|
+
/** @param config Text span configuration */
|
|
6
|
+
constructor(config) {
|
|
7
|
+
this._private_dirtyInternal = true;
|
|
8
|
+
this._private_textInternal = config.text;
|
|
9
|
+
this.style = new UITextStyle(config.style);
|
|
10
|
+
}
|
|
11
|
+
/** Text content */
|
|
12
|
+
get text() {
|
|
13
|
+
return this._private_textInternal;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Indicates whether text or style has been modified.
|
|
17
|
+
* Must be reset to `false` externally by the owner.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
get dirty() {
|
|
21
|
+
return this._private_dirtyInternal || this.style.dirty;
|
|
22
|
+
}
|
|
23
|
+
set text(value) {
|
|
24
|
+
if (value !== this._private_textInternal) {
|
|
25
|
+
this._private_textInternal = value;
|
|
26
|
+
this._private_dirtyInternal = true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
setDirtyFalse() {
|
|
31
|
+
this._private_dirtyInternal = false;
|
|
32
|
+
this.style.setDirtyFalse();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { UITextSpan };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const TEXT_STYLE_DEFAULT_COLOR = "#000000";
|
|
2
|
+
const TEXT_STYLE_DEFAULT_ALIGN = "left";
|
|
3
|
+
const TEXT_STYLE_DEFAULT_FONT_FAMILY = "Arial";
|
|
4
|
+
const TEXT_STYLE_DEFAULT_FONT_SIZE = 16;
|
|
5
|
+
const TEXT_STYLE_DEFAULT_FONT_STYLE = "normal";
|
|
6
|
+
const TEXT_STYLE_DEFAULT_FONT_WEIGHT = "normal";
|
|
7
|
+
const TEXT_STYLE_DEFAULT_LINE_HEIGHT = 1.2;
|
|
8
|
+
const TEXT_STYLE_DEFAULT_ENABLE_SHADOW = false;
|
|
9
|
+
const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X = 0;
|
|
10
|
+
const TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y = 0;
|
|
11
|
+
const TEXT_STYLE_DEFAULT_SHADOW_BLUR = 0;
|
|
12
|
+
const TEXT_STYLE_DEFAULT_SHADOW_COLOR = "transparent";
|
|
13
|
+
const TEXT_STYLE_DEFAULT_ENABLE_STROKE = false;
|
|
14
|
+
const TEXT_STYLE_DEFAULT_STROKE_COLOR = "#000000";
|
|
15
|
+
const TEXT_STYLE_DEFAULT_STROKE_THICKNESS = 0;
|
|
16
|
+
|
|
17
|
+
export { TEXT_STYLE_DEFAULT_ALIGN, TEXT_STYLE_DEFAULT_COLOR, TEXT_STYLE_DEFAULT_ENABLE_SHADOW, TEXT_STYLE_DEFAULT_ENABLE_STROKE, TEXT_STYLE_DEFAULT_FONT_FAMILY, TEXT_STYLE_DEFAULT_FONT_SIZE, TEXT_STYLE_DEFAULT_FONT_STYLE, TEXT_STYLE_DEFAULT_FONT_WEIGHT, TEXT_STYLE_DEFAULT_LINE_HEIGHT, TEXT_STYLE_DEFAULT_SHADOW_BLUR, TEXT_STYLE_DEFAULT_SHADOW_COLOR, TEXT_STYLE_DEFAULT_SHADOW_OFFSET_X, TEXT_STYLE_DEFAULT_SHADOW_OFFSET_Y, TEXT_STYLE_DEFAULT_STROKE_COLOR, TEXT_STYLE_DEFAULT_STROKE_THICKNESS };
|