laymur 0.17.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/{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,224 @@
|
|
|
1
|
+
import { Vector4 } from 'three';
|
|
2
|
+
import { assertValidNonNegativeNumber } from '../asserts.js';
|
|
3
|
+
import { INSETS_DEFAULT_VALUE } from './UIInsets.Internal.js';
|
|
4
|
+
|
|
5
|
+
/** Insets values for four sides */
|
|
6
|
+
class UIInsets {
|
|
7
|
+
/**
|
|
8
|
+
* Creates UIInsets instance.
|
|
9
|
+
*
|
|
10
|
+
* @param config - Insets configuration
|
|
11
|
+
*/
|
|
12
|
+
constructor(config) {
|
|
13
|
+
this._private_lInternal = INSETS_DEFAULT_VALUE;
|
|
14
|
+
this._private_rInternal = INSETS_DEFAULT_VALUE;
|
|
15
|
+
this._private_tInternal = INSETS_DEFAULT_VALUE;
|
|
16
|
+
this._private_bInternal = INSETS_DEFAULT_VALUE;
|
|
17
|
+
this._private_dirtyInternal = false;
|
|
18
|
+
this.set(config);
|
|
19
|
+
}
|
|
20
|
+
/** Left inset */
|
|
21
|
+
get left() {
|
|
22
|
+
return this._private_lInternal;
|
|
23
|
+
}
|
|
24
|
+
/** Right inset */
|
|
25
|
+
get right() {
|
|
26
|
+
return this._private_rInternal;
|
|
27
|
+
}
|
|
28
|
+
/** Top inset */
|
|
29
|
+
get top() {
|
|
30
|
+
return this._private_tInternal;
|
|
31
|
+
}
|
|
32
|
+
/** Bottom inset */
|
|
33
|
+
get bottom() {
|
|
34
|
+
return this._private_bInternal;
|
|
35
|
+
}
|
|
36
|
+
/** @internal */
|
|
37
|
+
get dirty() {
|
|
38
|
+
return this._private_dirtyInternal;
|
|
39
|
+
}
|
|
40
|
+
/** Left inset */
|
|
41
|
+
set left(value) {
|
|
42
|
+
assertValidNonNegativeNumber(value, "UIInsets.left");
|
|
43
|
+
if (this._private_lInternal !== value) {
|
|
44
|
+
this._private_lInternal = value;
|
|
45
|
+
this._private_dirtyInternal = true;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** Right inset */
|
|
49
|
+
set right(value) {
|
|
50
|
+
assertValidNonNegativeNumber(value, "UIInsets.right");
|
|
51
|
+
if (this._private_rInternal !== value) {
|
|
52
|
+
this._private_rInternal = value;
|
|
53
|
+
this._private_dirtyInternal = true;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/** Top inset */
|
|
57
|
+
set top(value) {
|
|
58
|
+
assertValidNonNegativeNumber(value, "UIInsets.top");
|
|
59
|
+
if (this._private_tInternal !== value) {
|
|
60
|
+
this._private_tInternal = value;
|
|
61
|
+
this._private_dirtyInternal = true;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/** Bottom inset */
|
|
65
|
+
set bottom(value) {
|
|
66
|
+
assertValidNonNegativeNumber(value, "UIInsets.bottom");
|
|
67
|
+
if (this._private_bInternal !== value) {
|
|
68
|
+
this._private_bInternal = value;
|
|
69
|
+
this._private_dirtyInternal = true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/** Sets left and right to same value */
|
|
73
|
+
setHorizontal(value) {
|
|
74
|
+
assertValidNonNegativeNumber(value, "UIInsets.setHorizontal.value");
|
|
75
|
+
if (this._private_lInternal !== value || this._private_rInternal !== value) {
|
|
76
|
+
this._private_lInternal = value;
|
|
77
|
+
this._private_rInternal = value;
|
|
78
|
+
this._private_dirtyInternal = true;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/** Sets top and bottom to same value */
|
|
82
|
+
setVertical(value) {
|
|
83
|
+
assertValidNonNegativeNumber(value, "UIInsets.setVertical.value");
|
|
84
|
+
if (this._private_tInternal !== value || this._private_bInternal !== value) {
|
|
85
|
+
this._private_tInternal = value;
|
|
86
|
+
this._private_bInternal = value;
|
|
87
|
+
this._private_dirtyInternal = true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
/** Sets all sides to same value */
|
|
91
|
+
setUnified(value) {
|
|
92
|
+
assertValidNonNegativeNumber(value, "UIInsets.setUnified.value");
|
|
93
|
+
if (this._private_lInternal !== value ||
|
|
94
|
+
this._private_rInternal !== value ||
|
|
95
|
+
this._private_tInternal !== value ||
|
|
96
|
+
this._private_bInternal !== value) {
|
|
97
|
+
this._private_lInternal = value;
|
|
98
|
+
this._private_rInternal = value;
|
|
99
|
+
this._private_tInternal = value;
|
|
100
|
+
this._private_bInternal = value;
|
|
101
|
+
this._private_dirtyInternal = true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/** Sets insets */
|
|
105
|
+
set(config) {
|
|
106
|
+
const lOld = this._private_lInternal;
|
|
107
|
+
const rOld = this._private_rInternal;
|
|
108
|
+
const tOld = this._private_tInternal;
|
|
109
|
+
const bOld = this._private_bInternal;
|
|
110
|
+
if (config === undefined) {
|
|
111
|
+
this._private_lInternal = INSETS_DEFAULT_VALUE;
|
|
112
|
+
this._private_rInternal = INSETS_DEFAULT_VALUE;
|
|
113
|
+
this._private_tInternal = INSETS_DEFAULT_VALUE;
|
|
114
|
+
this._private_bInternal = INSETS_DEFAULT_VALUE;
|
|
115
|
+
}
|
|
116
|
+
else if (typeof config === "number") {
|
|
117
|
+
assertValidNonNegativeNumber(config, "UIInsets.set.config");
|
|
118
|
+
this._private_lInternal = config;
|
|
119
|
+
this._private_rInternal = config;
|
|
120
|
+
this._private_tInternal = config;
|
|
121
|
+
this._private_bInternal = config;
|
|
122
|
+
}
|
|
123
|
+
else if (Array.isArray(config)) {
|
|
124
|
+
if (config.length === 2) {
|
|
125
|
+
const horizontal = config[0];
|
|
126
|
+
const vertical = config[1];
|
|
127
|
+
assertValidNonNegativeNumber(horizontal, "UIInsets.set.config[0]");
|
|
128
|
+
assertValidNonNegativeNumber(vertical, "UIInsets.set.config[1]");
|
|
129
|
+
this._private_lInternal = horizontal;
|
|
130
|
+
this._private_rInternal = horizontal;
|
|
131
|
+
this._private_tInternal = vertical;
|
|
132
|
+
this._private_bInternal = vertical;
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
const left = config[0];
|
|
136
|
+
const right = config[1];
|
|
137
|
+
const top = config[2];
|
|
138
|
+
const bottom = config[3];
|
|
139
|
+
assertValidNonNegativeNumber(left, "UIInsets.set.config[0]");
|
|
140
|
+
assertValidNonNegativeNumber(right, "UIInsets.set.config[1]");
|
|
141
|
+
assertValidNonNegativeNumber(top, "UIInsets.set.config[2]");
|
|
142
|
+
assertValidNonNegativeNumber(bottom, "UIInsets.set.config[3]");
|
|
143
|
+
this._private_lInternal = left;
|
|
144
|
+
this._private_rInternal = right;
|
|
145
|
+
this._private_tInternal = top;
|
|
146
|
+
this._private_bInternal = bottom;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else if ("left" in config) {
|
|
150
|
+
const left = config.left;
|
|
151
|
+
const right = config.right;
|
|
152
|
+
const top = config.top;
|
|
153
|
+
const bottom = config.bottom;
|
|
154
|
+
assertValidNonNegativeNumber(left, "UIInsets.set.config.left");
|
|
155
|
+
assertValidNonNegativeNumber(right, "UIInsets.set.config.right");
|
|
156
|
+
assertValidNonNegativeNumber(top, "UIInsets.set.config.top");
|
|
157
|
+
assertValidNonNegativeNumber(bottom, "UIInsets.set.config.bottom");
|
|
158
|
+
this._private_lInternal = left;
|
|
159
|
+
this._private_rInternal = right;
|
|
160
|
+
this._private_tInternal = top;
|
|
161
|
+
this._private_bInternal = bottom;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
const horizontal = config.horizontal;
|
|
165
|
+
const vertical = config.vertical;
|
|
166
|
+
assertValidNonNegativeNumber(horizontal, "UIInsets.set.config.horizontal");
|
|
167
|
+
assertValidNonNegativeNumber(vertical, "UIInsets.set.config.vertical");
|
|
168
|
+
this._private_lInternal = horizontal;
|
|
169
|
+
this._private_rInternal = horizontal;
|
|
170
|
+
this._private_tInternal = vertical;
|
|
171
|
+
this._private_bInternal = vertical;
|
|
172
|
+
}
|
|
173
|
+
if (this._private_lInternal !== lOld ||
|
|
174
|
+
this._private_rInternal !== rOld ||
|
|
175
|
+
this._private_tInternal !== tOld ||
|
|
176
|
+
this._private_bInternal !== bOld) {
|
|
177
|
+
this._private_dirtyInternal = true;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
/** Sets from Vector4 (x=left, y=right, z=top, w=bottom) */
|
|
181
|
+
setVector4(vector) {
|
|
182
|
+
assertValidNonNegativeNumber(vector.x, "UIInsets.setVector4.vector.x");
|
|
183
|
+
assertValidNonNegativeNumber(vector.y, "UIInsets.setVector4.vector.y");
|
|
184
|
+
assertValidNonNegativeNumber(vector.z, "UIInsets.setVector4.vector.z");
|
|
185
|
+
assertValidNonNegativeNumber(vector.w, "UIInsets.setVector4.vector.w");
|
|
186
|
+
if (this._private_lInternal !== vector.x ||
|
|
187
|
+
this._private_rInternal !== vector.y ||
|
|
188
|
+
this._private_tInternal !== vector.z ||
|
|
189
|
+
this._private_bInternal !== vector.w) {
|
|
190
|
+
this._private_lInternal = vector.x;
|
|
191
|
+
this._private_rInternal = vector.y;
|
|
192
|
+
this._private_tInternal = vector.z;
|
|
193
|
+
this._private_bInternal = vector.w;
|
|
194
|
+
this._private_dirtyInternal = true;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
/** Converts to Vector4 (left, right, top, bottom) */
|
|
198
|
+
toVector4(result = new Vector4()) {
|
|
199
|
+
return result.set(this._private_lInternal, this._private_rInternal, this._private_tInternal, this._private_bInternal);
|
|
200
|
+
}
|
|
201
|
+
/** Resets all sides to 0 */
|
|
202
|
+
reset() {
|
|
203
|
+
this.setUnified(0);
|
|
204
|
+
}
|
|
205
|
+
/** Copies from another instance */
|
|
206
|
+
copy(other) {
|
|
207
|
+
if (this._private_lInternal !== other._private_lInternal ||
|
|
208
|
+
this._private_rInternal !== other._private_rInternal ||
|
|
209
|
+
this._private_tInternal !== other._private_tInternal ||
|
|
210
|
+
this._private_bInternal !== other._private_bInternal) {
|
|
211
|
+
this._private_lInternal = other._private_lInternal;
|
|
212
|
+
this._private_rInternal = other._private_rInternal;
|
|
213
|
+
this._private_tInternal = other._private_tInternal;
|
|
214
|
+
this._private_bInternal = other._private_bInternal;
|
|
215
|
+
this._private_dirtyInternal = true;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/** @internal */
|
|
219
|
+
setDirtyFalse() {
|
|
220
|
+
this._private_dirtyInternal = false;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export { UIInsets };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Base class for progress bar fill functions */
|
|
2
|
+
export declare abstract class UIProgressMaskFunction {
|
|
3
|
+
/** GLSL shader source code defining fill behavior */
|
|
4
|
+
readonly source: string;
|
|
5
|
+
protected dirtyInternal: boolean;
|
|
6
|
+
protected constructor(
|
|
7
|
+
/** GLSL shader source code defining fill behavior */
|
|
8
|
+
source: string);
|
|
9
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Base class for progress bar fill functions */
|
|
2
|
+
class UIProgressMaskFunction {
|
|
3
|
+
constructor(
|
|
4
|
+
/** GLSL shader source code defining fill behavior */
|
|
5
|
+
source) {
|
|
6
|
+
this.source = source;
|
|
7
|
+
this.dirtyInternal = false;
|
|
8
|
+
}
|
|
9
|
+
/** @internal */
|
|
10
|
+
get dirty() {
|
|
11
|
+
return this.dirtyInternal;
|
|
12
|
+
}
|
|
13
|
+
/** @internal */
|
|
14
|
+
setDirtyFalse() {
|
|
15
|
+
this.dirtyInternal = false;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { UIProgressMaskFunction };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UIProgressMaskFunction } from "./UIProgressMaskFunction";
|
|
2
|
+
/** Circular radial progress fill */
|
|
3
|
+
export declare class UIProgressMaskFunctionCircular extends UIProgressMaskFunction {
|
|
4
|
+
private startAngleInternal;
|
|
5
|
+
private inverseDirectionInternal;
|
|
6
|
+
/**
|
|
7
|
+
* Creates circular mask function.
|
|
8
|
+
*
|
|
9
|
+
* @param startAngle - Starting angle in radians
|
|
10
|
+
* @param inverseDirection - Whether to fill counter-clockwise
|
|
11
|
+
*/
|
|
12
|
+
constructor(startAngle?: number, inverseDirection?: boolean);
|
|
13
|
+
/** Starting angle in radians */
|
|
14
|
+
get startAngle(): number;
|
|
15
|
+
/** Whether fill is counter-clockwise */
|
|
16
|
+
get inverseDirection(): boolean;
|
|
17
|
+
/** Starting angle in radians */
|
|
18
|
+
set startAngle(value: number);
|
|
19
|
+
/** Whether fill is counter-clockwise */
|
|
20
|
+
set inverseDirection(value: boolean);
|
|
21
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import source from '../../shaders/UIProgressMaskFunctionCircular.glsl.js';
|
|
2
|
+
import { assertValidNumber } from '../asserts.js';
|
|
3
|
+
import { UIProgressMaskFunction } from './UIProgressMaskFunction.js';
|
|
4
|
+
|
|
5
|
+
/** Circular radial progress fill */
|
|
6
|
+
class UIProgressMaskFunctionCircular extends UIProgressMaskFunction {
|
|
7
|
+
/**
|
|
8
|
+
* Creates circular mask function.
|
|
9
|
+
*
|
|
10
|
+
* @param startAngle - Starting angle in radians
|
|
11
|
+
* @param inverseDirection - Whether to fill counter-clockwise
|
|
12
|
+
*/
|
|
13
|
+
constructor(startAngle = 0, inverseDirection = false) {
|
|
14
|
+
assertValidNumber(startAngle, "UIProgressMaskFunctionCircular.constructor.startAngle");
|
|
15
|
+
super(source);
|
|
16
|
+
this._private_startAngleInternal = startAngle;
|
|
17
|
+
this._private_inverseDirectionInternal = inverseDirection;
|
|
18
|
+
}
|
|
19
|
+
/** Starting angle in radians */
|
|
20
|
+
get startAngle() {
|
|
21
|
+
return this._private_startAngleInternal;
|
|
22
|
+
}
|
|
23
|
+
/** Whether fill is counter-clockwise */
|
|
24
|
+
get inverseDirection() {
|
|
25
|
+
return this._private_inverseDirectionInternal;
|
|
26
|
+
}
|
|
27
|
+
/** Starting angle in radians */
|
|
28
|
+
set startAngle(value) {
|
|
29
|
+
assertValidNumber(value, "UIProgressMaskFunctionCircular.startAngle");
|
|
30
|
+
if (this._private_startAngleInternal !== value) {
|
|
31
|
+
this._private_startAngleInternal = value;
|
|
32
|
+
this.dirtyInternal = true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/** Whether fill is counter-clockwise */
|
|
36
|
+
set inverseDirection(value) {
|
|
37
|
+
if (this._private_inverseDirectionInternal !== value) {
|
|
38
|
+
this._private_inverseDirectionInternal = value;
|
|
39
|
+
this.dirtyInternal = true;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** @internal */
|
|
43
|
+
enumerateProperties() {
|
|
44
|
+
return {
|
|
45
|
+
direction: this._private_inverseDirectionInternal ? -1 : 1,
|
|
46
|
+
startAngle: this._private_startAngleInternal,
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { UIProgressMaskFunctionCircular };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Vector2 } from "three";
|
|
2
|
+
import type { Vector2Like } from "../math";
|
|
3
|
+
import { UIProgressMaskFunction } from "./UIProgressMaskFunction";
|
|
4
|
+
/** Linear directional progress fill */
|
|
5
|
+
export declare class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
|
|
6
|
+
/** Fill direction as normalized vector */
|
|
7
|
+
readonly direction: Vector2;
|
|
8
|
+
private readonly cachedDirection;
|
|
9
|
+
/**
|
|
10
|
+
* Creates directional mask function.
|
|
11
|
+
*
|
|
12
|
+
* @param direction - Fill direction vector. Automatically normalized.
|
|
13
|
+
*/
|
|
14
|
+
constructor(direction?: Vector2Like);
|
|
15
|
+
private ensureDirectionNormalized;
|
|
16
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Vector2 } from 'three';
|
|
2
|
+
import source from '../../shaders/UIProgressMaskFunctionDirectional.glsl.js';
|
|
3
|
+
import { EPSILON } from '../math.js';
|
|
4
|
+
import { UIProgressMaskFunction } from './UIProgressMaskFunction.js';
|
|
5
|
+
|
|
6
|
+
/** Linear directional progress fill */
|
|
7
|
+
class UIProgressMaskFunctionDirectional extends UIProgressMaskFunction {
|
|
8
|
+
/**
|
|
9
|
+
* Creates directional mask function.
|
|
10
|
+
*
|
|
11
|
+
* @param direction - Fill direction vector. Automatically normalized.
|
|
12
|
+
*/
|
|
13
|
+
constructor(direction = { x: 1, y: 0 }) {
|
|
14
|
+
super(source);
|
|
15
|
+
/** Fill direction as normalized vector */
|
|
16
|
+
this.direction = new Vector2();
|
|
17
|
+
this._private_cachedDirection = new Vector2();
|
|
18
|
+
this.direction.set(direction.x, direction.y).normalize();
|
|
19
|
+
this._private_cachedDirection.copy(this.direction);
|
|
20
|
+
}
|
|
21
|
+
/** @internal */
|
|
22
|
+
get dirty() {
|
|
23
|
+
this._private_ensureDirectionNormalized();
|
|
24
|
+
return this.dirtyInternal || !this._private_cachedDirection.equals(this.direction);
|
|
25
|
+
}
|
|
26
|
+
/** @internal */
|
|
27
|
+
setDirtyFalse() {
|
|
28
|
+
this._private_ensureDirectionNormalized();
|
|
29
|
+
this._private_cachedDirection.copy(this.direction);
|
|
30
|
+
super.setDirtyFalse();
|
|
31
|
+
}
|
|
32
|
+
/** @internal */
|
|
33
|
+
enumerateProperties() {
|
|
34
|
+
this._private_ensureDirectionNormalized();
|
|
35
|
+
return { direction: this.direction };
|
|
36
|
+
}
|
|
37
|
+
_private_ensureDirectionNormalized() {
|
|
38
|
+
const squaredLength = this.direction.lengthSq();
|
|
39
|
+
if (Math.abs(squaredLength) <= EPSILON) {
|
|
40
|
+
this.direction.set(1, 0);
|
|
41
|
+
}
|
|
42
|
+
else if (Math.abs(squaredLength - 1) > EPSILON) {
|
|
43
|
+
this.direction.divideScalar(squaredLength);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { UIProgressMaskFunctionDirectional };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const EPSILON = 1e-6;
|
|
2
|
+
function srgbToLinear(color) {
|
|
3
|
+
return color < 0.04045
|
|
4
|
+
? color * 0.0773993808
|
|
5
|
+
: Math.pow(color * 0.9478672986 + 0.0521327014, 2.4);
|
|
6
|
+
}
|
|
7
|
+
function linearToSRGB(color) {
|
|
8
|
+
return color < 0.0031308 ? color * 12.92 : 1.055 * Math.pow(color, 0.41666) - 0.055;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { EPSILON, linearToSRGB, srgbToLinear };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Controls which transforms apply relative to anchor */
|
|
2
|
+
export declare enum UIMicroAnchorMode {
|
|
3
|
+
/** Apply rotation and scale around anchor point */
|
|
4
|
+
ROTATION_SCALE = 0,
|
|
5
|
+
/** Apply position, rotation, and scale around anchor point */
|
|
6
|
+
POSITION_ROTATION_SCALE = 1
|
|
7
|
+
}
|
|
8
|
+
/** Configuration options for UIMicro */
|
|
9
|
+
export interface UIMicroConfig {
|
|
10
|
+
/** X offset in world units */
|
|
11
|
+
x: number;
|
|
12
|
+
/** Y offset in world units */
|
|
13
|
+
y: number;
|
|
14
|
+
/** X anchor in normalized coordinates (0 to 1) */
|
|
15
|
+
anchorX: number;
|
|
16
|
+
/** Y anchor in normalized coordinates (0 to 1) */
|
|
17
|
+
anchorY: number;
|
|
18
|
+
/** X scale multiplier */
|
|
19
|
+
scaleX: number;
|
|
20
|
+
/** Y scale multiplier */
|
|
21
|
+
scaleY: number;
|
|
22
|
+
/** Rotation in radians */
|
|
23
|
+
rotation: number;
|
|
24
|
+
/** Which transforms apply relative to anchor */
|
|
25
|
+
anchorMode: UIMicroAnchorMode;
|
|
26
|
+
}
|
|
27
|
+
export declare const MICRO_DEFAULT_POSITION = 0;
|
|
28
|
+
export declare const MICRO_DEFAULT_ANCHOR = 0.5;
|
|
29
|
+
export declare const MICRO_DEFAULT_SCALE = 1;
|
|
30
|
+
export declare const MICRO_DEFAULT_ROTATION = 0;
|
|
31
|
+
export declare const MICRO_DEFAULT_ANCHOR_MODE = UIMicroAnchorMode.ROTATION_SCALE;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Controls which transforms apply relative to anchor */
|
|
2
|
+
var UIMicroAnchorMode;
|
|
3
|
+
(function (UIMicroAnchorMode) {
|
|
4
|
+
/** Apply rotation and scale around anchor point */
|
|
5
|
+
UIMicroAnchorMode[UIMicroAnchorMode["ROTATION_SCALE"] = 0] = "ROTATION_SCALE";
|
|
6
|
+
/** Apply position, rotation, and scale around anchor point */
|
|
7
|
+
UIMicroAnchorMode[UIMicroAnchorMode["POSITION_ROTATION_SCALE"] = 1] = "POSITION_ROTATION_SCALE";
|
|
8
|
+
})(UIMicroAnchorMode || (UIMicroAnchorMode = {}));
|
|
9
|
+
const MICRO_DEFAULT_POSITION = 0;
|
|
10
|
+
const MICRO_DEFAULT_ANCHOR = 0.5;
|
|
11
|
+
const MICRO_DEFAULT_SCALE = 1;
|
|
12
|
+
const MICRO_DEFAULT_ROTATION = 0;
|
|
13
|
+
const MICRO_DEFAULT_ANCHOR_MODE = UIMicroAnchorMode.ROTATION_SCALE;
|
|
14
|
+
|
|
15
|
+
export { MICRO_DEFAULT_ANCHOR, MICRO_DEFAULT_ANCHOR_MODE, MICRO_DEFAULT_POSITION, MICRO_DEFAULT_ROTATION, MICRO_DEFAULT_SCALE, UIMicroAnchorMode };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { UIMicroAnchorMode, UIMicroConfig } from "./UIMicro.Internal";
|
|
2
|
+
/** Transforms that don't affect constraints */
|
|
3
|
+
export declare class UIMicro {
|
|
4
|
+
private xInternal;
|
|
5
|
+
private yInternal;
|
|
6
|
+
private anchorXInternal;
|
|
7
|
+
private anchorYInternal;
|
|
8
|
+
private scaleXInternal;
|
|
9
|
+
private scaleYInternal;
|
|
10
|
+
private rotationInternal;
|
|
11
|
+
private anchorModeInternal;
|
|
12
|
+
private dirtyInternal;
|
|
13
|
+
/**
|
|
14
|
+
* Creates UIMicro instance.
|
|
15
|
+
*
|
|
16
|
+
* @param config - Transform configuration
|
|
17
|
+
*/
|
|
18
|
+
constructor(config?: Partial<UIMicroConfig>);
|
|
19
|
+
/** X offset in world units */
|
|
20
|
+
get x(): number;
|
|
21
|
+
/** Y offset in world units */
|
|
22
|
+
get y(): number;
|
|
23
|
+
/** X anchor in normalized coordinates (0 to 1) */
|
|
24
|
+
get anchorX(): number;
|
|
25
|
+
/** Y anchor in normalized coordinates (0 to 1) */
|
|
26
|
+
get anchorY(): number;
|
|
27
|
+
/** X scale multiplier */
|
|
28
|
+
get scaleX(): number;
|
|
29
|
+
/** Y scale multiplier */
|
|
30
|
+
get scaleY(): number;
|
|
31
|
+
/** Rotation in degrees */
|
|
32
|
+
get angle(): number;
|
|
33
|
+
/** Which transforms apply relative to anchor */
|
|
34
|
+
get anchorMode(): UIMicroAnchorMode;
|
|
35
|
+
/** Rotation in radians */
|
|
36
|
+
get rotation(): number;
|
|
37
|
+
/** X offset in world units */
|
|
38
|
+
set x(value: number);
|
|
39
|
+
/** Y offset in world units */
|
|
40
|
+
set y(value: number);
|
|
41
|
+
/** X anchor in normalized coordinates (0 to 1) */
|
|
42
|
+
set anchorX(value: number);
|
|
43
|
+
/** Y anchor in normalized coordinates (0 to 1) */
|
|
44
|
+
set anchorY(value: number);
|
|
45
|
+
/** X scale multiplier */
|
|
46
|
+
set scaleX(value: number);
|
|
47
|
+
/** Y scale multiplier */
|
|
48
|
+
set scaleY(value: number);
|
|
49
|
+
/** Rotation in degrees */
|
|
50
|
+
set angle(value: number);
|
|
51
|
+
/** Rotation in radians */
|
|
52
|
+
set rotation(value: number);
|
|
53
|
+
/** Which transforms apply relative to anchor */
|
|
54
|
+
set anchorMode(value: UIMicroAnchorMode);
|
|
55
|
+
/** Resets all transforms to defaults */
|
|
56
|
+
reset(): void;
|
|
57
|
+
/** Copies transforms from another instance */
|
|
58
|
+
copy(value: UIMicro): void;
|
|
59
|
+
}
|