laymur 0.22.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +3 -3
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +14 -16
- package/dist/core/constraints/UIConstraint.d.ts +22 -2
- package/dist/core/constraints/UIConstraint.js +26 -3
- package/dist/core/constraints/UICustomConstraint.d.ts +4 -4
- package/dist/core/constraints/UICustomConstraint.js +15 -15
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +11 -13
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +1 -3
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +30 -30
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +2 -4
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +40 -39
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +13 -15
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +3 -3
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js +1 -0
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +13 -7
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +37 -30
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +1 -3
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +30 -30
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +2 -4
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +40 -39
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +13 -15
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +3 -3
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +11 -13
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +3 -3
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +11 -11
- package/dist/core/constraints/builders/UIConstraint2DBuilder.js +10 -13
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +1 -1
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +7 -7
- package/dist/core/constraints/builders/UICoverConstraintBuilder.js +10 -13
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +1 -1
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +7 -7
- package/dist/core/constraints/builders/UIFitConstraintBuilder.js +10 -13
- package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +3 -5
- package/dist/core/elements/UIAnchor/UIAnchor.d.ts +23 -5
- package/dist/core/elements/UIAnchor/UIAnchor.js +42 -8
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +2 -2
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +4 -6
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +10 -10
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +108 -111
- package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +4 -4
- package/dist/core/elements/UIDummy/UIDummy.Internal.js +5 -8
- package/dist/core/elements/UIDummy/UIDummy.d.ts +19 -11
- package/dist/core/elements/UIDummy/UIDummy.js +59 -42
- package/dist/core/elements/UIElement/UIElement.Internal.d.ts +5 -5
- package/dist/core/elements/UIElement/UIElement.Internal.js +9 -12
- package/dist/core/elements/UIElement/UIElement.d.ts +25 -17
- package/dist/core/elements/UIElement/UIElement.js +76 -69
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +3 -3
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +4 -7
- package/dist/core/elements/UIGraphics/UIGraphics.d.ts +7 -7
- package/dist/core/elements/UIGraphics/UIGraphics.js +44 -47
- package/dist/core/elements/UIImage/UIImage.Internal.d.ts +2 -2
- package/dist/core/elements/UIImage/UIImage.Internal.js +1 -0
- package/dist/core/elements/UIImage/UIImage.d.ts +9 -9
- package/dist/core/elements/UIImage/UIImage.js +21 -24
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +3 -3
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +3 -5
- package/dist/core/elements/UINineSlice/UINineSlice.d.ts +12 -12
- package/dist/core/elements/UINineSlice/UINineSlice.js +71 -73
- package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +3 -4
- package/dist/core/elements/UIProgress/UIProgress.Internal.js +1 -3
- package/dist/core/elements/UIProgress/UIProgress.d.ts +10 -8
- package/dist/core/elements/UIProgress/UIProgress.js +60 -58
- package/dist/core/elements/UIScene/UIScene.Internal.d.ts +3 -3
- package/dist/core/elements/UIScene/UIScene.Internal.js +11 -14
- package/dist/core/elements/UIScene/UIScene.d.ts +8 -8
- package/dist/core/elements/UIScene/UIScene.js +68 -69
- package/dist/core/elements/UIText/UIText.Bidi.d.ts +2 -2
- package/dist/core/elements/UIText/UIText.Bidi.js +3 -5
- package/dist/core/elements/UIText/UIText.Interfaces.d.ts +6 -2
- package/dist/core/elements/UIText/UIText.Interfaces.js +1 -0
- package/dist/core/elements/UIText/UIText.Internal.d.ts +4 -4
- package/dist/core/elements/UIText/UIText.Internal.js +5 -7
- package/dist/core/elements/UIText/UIText.Measuring.d.ts +14 -7
- package/dist/core/elements/UIText/UIText.Measuring.js +115 -55
- package/dist/core/elements/UIText/UIText.Rendering.d.ts +3 -3
- package/dist/core/elements/UIText/UIText.Rendering.js +6 -9
- package/dist/core/elements/UIText/UIText.d.ts +28 -14
- package/dist/core/elements/UIText/UIText.js +181 -141
- package/dist/core/index.d.ts +55 -54
- package/dist/core/index.js +53 -0
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +4 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +2 -5
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +4 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +43 -42
- package/dist/core/layers/UILayer/UILayer.Internal.d.ts +2 -2
- package/dist/core/layers/UILayer/UILayer.Internal.js +4 -7
- package/dist/core/layers/UILayer/UILayer.d.ts +19 -4
- package/dist/core/layers/UILayer/UILayer.js +125 -62
- package/dist/core/miscellaneous/UIBlendMode.js +1 -3
- package/dist/core/miscellaneous/UIExpression.js +16 -19
- package/dist/core/miscellaneous/UIMode.js +3 -5
- package/dist/core/miscellaneous/UIOrientation.js +2 -4
- package/dist/core/miscellaneous/UIPriority.js +5 -8
- package/dist/core/miscellaneous/UIRelation.js +5 -8
- package/dist/core/miscellaneous/UITransparencyMode.js +1 -3
- package/dist/core/miscellaneous/area/UIArea.js +1 -3
- package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaCircle.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +2 -2
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +3 -6
- package/dist/core/miscellaneous/asserts.d.ts +20 -1
- package/dist/core/miscellaneous/asserts.js +71 -19
- package/dist/core/miscellaneous/canvas.js +13 -7
- package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +1 -1
- package/dist/core/miscellaneous/color/UIColor.Internal.js +1 -3
- package/dist/core/miscellaneous/color/UIColor.d.ts +1 -1
- package/dist/core/miscellaneous/color/UIColor.js +202 -205
- package/dist/core/miscellaneous/computeTransform.d.ts +1 -1
- package/dist/core/miscellaneous/computeTransform.js +4 -7
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +2 -2
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +13 -16
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +115 -118
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +3 -3
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.js +1 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +208 -114
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +2 -2
- package/dist/core/miscellaneous/generic-plane/shared.js +16 -19
- package/dist/core/miscellaneous/insets/UIInsets.Internal.js +1 -3
- package/dist/core/miscellaneous/insets/UIInsets.d.ts +1 -1
- package/dist/core/miscellaneous/insets/UIInsets.js +96 -99
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +1 -3
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +1 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +14 -17
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -2
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +14 -17
- package/dist/core/miscellaneous/math.js +3 -5
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +6 -8
- package/dist/core/miscellaneous/micro/UIMicro.d.ts +1 -1
- package/dist/core/miscellaneous/micro/UIMicro.js +91 -94
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +1 -3
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +12 -15
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +12 -15
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +3 -6
- package/dist/core/miscellaneous/shared.d.ts +1 -1
- package/dist/core/miscellaneous/shared.js +4 -7
- package/dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts +1 -1
- package/dist/core/miscellaneous/text-span/UITextSpan.Internal.js +1 -0
- package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +2 -2
- package/dist/core/miscellaneous/text-span/UITextSpan.js +10 -13
- package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +15 -17
- package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +13 -2
- package/dist/core/miscellaneous/text-style/UITextStyle.js +222 -207
- package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +7 -0
- package/dist/core/miscellaneous/texture/UITextureView.Internal.js +16 -6
- package/dist/core/miscellaneous/texture/UITextureView.d.ts +3 -3
- package/dist/core/miscellaneous/texture/UITextureView.js +114 -118
- package/dist/core/miscellaneous/webglCapabilities.js +3 -4
- package/dist/core/shaders/UIImage.d.ts +9 -0
- package/dist/core/shaders/UIImage.js +14 -0
- package/dist/core/shaders/UINineSlice.d.ts +11 -0
- package/dist/core/shaders/UINineSlice.js +57 -0
- package/dist/core/shaders/UIProgress.d.ts +14 -0
- package/dist/core/shaders/UIProgress.js +21 -0
- package/dist/core/shaders/UIProgressMaskFunctionCircular.d.ts +2 -0
- package/dist/core/shaders/UIProgressMaskFunctionCircular.js +16 -0
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.d.ts +2 -0
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.js +15 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +4 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +7 -1
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +50 -47
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +5 -2
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +11 -3
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +42 -26
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +5 -3
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +27 -4
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +162 -123
- package/dist/debug/UIAspectDebug.d.ts +3 -3
- package/dist/debug/UIAspectDebug.js +64 -68
- package/dist/debug/UIConstraintDebug.d.ts +1 -1
- package/dist/debug/UIConstraintDebug.js +1 -0
- package/dist/debug/UIHeightDebug.d.ts +3 -3
- package/dist/debug/UIHeightDebug.js +63 -67
- package/dist/debug/UIHorizontalDistanceDebug.d.ts +3 -3
- package/dist/debug/UIHorizontalDistanceDebug.js +76 -81
- package/dist/debug/UIHorizontalInterpolationDebug.d.ts +3 -3
- package/dist/debug/UIHorizontalInterpolationDebug.js +74 -78
- package/dist/debug/UILayerDebug.d.ts +1 -1
- package/dist/debug/UILayerDebug.js +55 -64
- package/dist/debug/UIVerticalDistanceDebug.d.ts +3 -3
- package/dist/debug/UIVerticalDistanceDebug.js +76 -81
- package/dist/debug/UIVerticalInterpolationDebug.d.ts +3 -3
- package/dist/debug/UIVerticalInterpolationDebug.js +74 -78
- package/dist/debug/UIWidthDebug.d.ts +3 -3
- package/dist/debug/UIWidthDebug.js +63 -67
- package/dist/debug/index.d.ts +8 -8
- package/dist/debug/index.js +8 -8
- package/dist/debug/miscellaneous.js +8 -11
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +3 -3
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +1 -1
- package/dist/particles/behaviorModules/UIBehaviorModule.js +1 -3
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +3 -3
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +37 -40
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +41 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +87 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +17 -20
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +21 -24
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +21 -24
- package/dist/particles/elements/UIEmitter.Internal.d.ts +2 -2
- package/dist/particles/elements/UIEmitter.Internal.js +6 -9
- package/dist/particles/elements/UIEmitter.d.ts +17 -11
- package/dist/particles/elements/UIEmitter.js +100 -88
- package/dist/particles/index.d.ts +20 -18
- package/dist/particles/index.js +19 -18
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +1 -1
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +14 -15
- package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +1 -1
- package/dist/particles/instancedParticle/UIInstancedParticle.js +29 -32
- package/dist/particles/miscellaneous/miscellaneous.d.ts +3 -3
- package/dist/particles/miscellaneous/miscellaneous.js +26 -27
- package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingColorOverLife.js +5 -8
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +6 -9
- package/dist/particles/renderingModules/UIRenderingModule.js +1 -3
- package/dist/particles/renderingModules/UIRenderingTexture.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingTexture.js +4 -7
- package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +2 -0
- package/dist/particles/shaders/UIRenderingColorOverLife.js +7 -0
- package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +9 -0
- package/dist/particles/shaders/UIRenderingColorOverVelocity.js +16 -0
- package/dist/particles/shaders/UIRenderingTexture.d.ts +2 -0
- package/dist/particles/shaders/UIRenderingTexture.js +7 -0
- package/dist/particles/spawnModules/UISpawnModule.d.ts +1 -1
- package/dist/particles/spawnModules/UISpawnModule.js +1 -3
- package/dist/particles/spawnModules/UISpawnOffset.d.ts +3 -3
- package/dist/particles/spawnModules/UISpawnOffset.js +12 -15
- package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomLifetime.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomRotation.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomScale.js +19 -22
- package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomTorque.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomVelocity.js +21 -24
- package/dist/particles/spawnModules/UISpawnRectangle.d.ts +3 -3
- package/dist/particles/spawnModules/UISpawnRectangle.js +21 -24
- package/package.json +13 -17
- package/dist/_virtual/2d.js +0 -3
- package/dist/_virtual/3d.js +0 -3
- package/dist/_virtual/4d.js +0 -3
- package/dist/_virtual/mod.js +0 -5
- package/dist/_virtual/mod2.js +0 -3
- package/dist/core/shaders/UIImage.glsl.js +0 -3
- package/dist/core/shaders/UINineSlice.glsl.js +0 -3
- package/dist/core/shaders/UIProgress.glsl.js +0 -3
- package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +0 -3
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +0 -3
- package/dist/index.js +0 -52
- package/dist/node_modules/fast-simplex-noise/lib/2d.js +0 -93
- package/dist/node_modules/fast-simplex-noise/lib/3d.js +0 -142
- package/dist/node_modules/fast-simplex-noise/lib/4d.js +0 -196
- package/dist/node_modules/fast-simplex-noise/lib/mod.js +0 -24
- package/dist/node_modules/three/examples/jsm/lines/Line2.js +0 -56
- package/dist/node_modules/three/examples/jsm/lines/LineGeometry.js +0 -157
- package/dist/node_modules/three/examples/jsm/lines/LineMaterial.js +0 -691
- package/dist/node_modules/three/examples/jsm/lines/LineSegments2.js +0 -415
- package/dist/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -289
- package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +0 -3
- package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +0 -3
- package/dist/particles/shaders/UIRenderingTexture.glsl.js +0 -3
|
@@ -1,64 +1,73 @@
|
|
|
1
|
-
class UIInputWrapper {
|
|
1
|
+
export class UIInputWrapper {
|
|
2
2
|
constructor() {
|
|
3
3
|
/** @internal */
|
|
4
4
|
this.dirty = false;
|
|
5
|
-
this.
|
|
6
|
-
this.
|
|
7
|
-
this.
|
|
5
|
+
this.zIndicesDirty = false;
|
|
6
|
+
this.catchers = [];
|
|
7
|
+
this.lastHandler = 0;
|
|
8
8
|
}
|
|
9
9
|
createInputCatcher(catchPointerDown, catchPointerMove, catchPointerUp, zIndex) {
|
|
10
|
-
const handler = this.
|
|
11
|
-
this.
|
|
10
|
+
const handler = this.lastHandler++;
|
|
11
|
+
this.catchers.push({
|
|
12
12
|
handler,
|
|
13
13
|
catchPointerDown,
|
|
14
14
|
catchPointerMove,
|
|
15
15
|
catchPointerUp,
|
|
16
16
|
zIndex,
|
|
17
|
+
depth: 0,
|
|
17
18
|
active: true,
|
|
18
19
|
});
|
|
19
|
-
this.
|
|
20
|
+
this.zIndicesDirty = true;
|
|
20
21
|
this.dirty = true;
|
|
21
22
|
return handler;
|
|
22
23
|
}
|
|
23
24
|
destroyInputCatcher(handler) {
|
|
24
|
-
const index = this.
|
|
25
|
+
const index = this.catchers.findIndex((item) => item.handler === handler);
|
|
25
26
|
if (index === -1) {
|
|
26
|
-
throw new Error(
|
|
27
|
+
throw new Error(`UIInputWrapper.destroyInputCatcher.handler: handler ${handler} not found; its element may be destroyed`);
|
|
27
28
|
}
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
29
|
+
this.catchers[index].active = false;
|
|
30
|
+
this.catchers.splice(index, 1);
|
|
31
|
+
this.zIndicesDirty = true;
|
|
30
32
|
this.dirty = true;
|
|
31
33
|
}
|
|
32
34
|
getZIndex(handler) {
|
|
33
|
-
this.
|
|
34
|
-
const found = this._private_catchers.find((item) => item.handler === handler);
|
|
35
|
+
const found = this.catchers.find((item) => item.handler === handler);
|
|
35
36
|
if (!found) {
|
|
36
|
-
throw new Error(
|
|
37
|
+
throw new Error(`UIInputWrapper.getZIndex.handler: handler ${handler} not found; its element may be destroyed`);
|
|
37
38
|
}
|
|
38
39
|
return found.zIndex;
|
|
39
40
|
}
|
|
41
|
+
getDepth(handler) {
|
|
42
|
+
this.ensureSorted();
|
|
43
|
+
const found = this.catchers.find((item) => item.handler === handler);
|
|
44
|
+
if (!found) {
|
|
45
|
+
throw new Error(`UIInputWrapper.getDepth.handler: handler ${handler} not found; its element may be destroyed`);
|
|
46
|
+
}
|
|
47
|
+
return found.depth;
|
|
48
|
+
}
|
|
40
49
|
setZIndex(handler, zIndex) {
|
|
41
|
-
const found = this.
|
|
50
|
+
const found = this.catchers.find((item) => item.handler === handler);
|
|
42
51
|
if (!found) {
|
|
43
|
-
throw new Error(
|
|
52
|
+
throw new Error(`UIInputWrapper.setZIndex.handler: handler ${handler} not found; its element may be destroyed`);
|
|
44
53
|
}
|
|
45
54
|
if (found.zIndex !== zIndex) {
|
|
46
55
|
found.zIndex = zIndex;
|
|
47
|
-
this.
|
|
56
|
+
this.zIndicesDirty = true;
|
|
48
57
|
this.dirty = true;
|
|
49
58
|
}
|
|
50
59
|
}
|
|
51
60
|
getActive(handler) {
|
|
52
|
-
const found = this.
|
|
61
|
+
const found = this.catchers.find((item) => item.handler === handler);
|
|
53
62
|
if (!found) {
|
|
54
|
-
throw new Error(
|
|
63
|
+
throw new Error(`UIInputWrapper.getActive.handler: handler ${handler} not found; its element may be destroyed`);
|
|
55
64
|
}
|
|
56
65
|
return found.active;
|
|
57
66
|
}
|
|
58
67
|
setActive(handler, active) {
|
|
59
|
-
const found = this.
|
|
68
|
+
const found = this.catchers.find((item) => item.handler === handler);
|
|
60
69
|
if (!found) {
|
|
61
|
-
throw new Error(
|
|
70
|
+
throw new Error(`UIInputWrapper.setActive.handler: handler ${handler} not found; its element may be destroyed`);
|
|
62
71
|
}
|
|
63
72
|
if (found.active !== active) {
|
|
64
73
|
found.active = active;
|
|
@@ -66,45 +75,39 @@ class UIInputWrapper {
|
|
|
66
75
|
}
|
|
67
76
|
/** @internal */
|
|
68
77
|
onPointerDown(x, y, identifier) {
|
|
69
|
-
this.
|
|
70
|
-
for (let index = this._private_catchers.length - 1; index >= 0; index--) {
|
|
71
|
-
const item = this._private_catchers[index];
|
|
72
|
-
if (item.active && item.catchPointerDown(x, y, identifier)) {
|
|
73
|
-
break;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
78
|
+
this.dispatch(x, y, identifier, "catchPointerDown");
|
|
76
79
|
}
|
|
77
80
|
/** @internal */
|
|
78
81
|
onPointerMove(x, y, identifier) {
|
|
79
|
-
this.
|
|
80
|
-
for (let index = this._private_catchers.length - 1; index >= 0; index--) {
|
|
81
|
-
const item = this._private_catchers[index];
|
|
82
|
-
if (item.active && item.catchPointerMove(x, y, identifier)) {
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
82
|
+
this.dispatch(x, y, identifier, "catchPointerMove");
|
|
86
83
|
}
|
|
87
84
|
/** @internal */
|
|
88
85
|
onPointerUp(x, y, identifier) {
|
|
89
|
-
this.
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
this.dispatch(x, y, identifier, "catchPointerUp");
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Passes a pointer event from the top catcher down until one catches it. A handler may
|
|
90
|
+
* destroy elements, so the catchers are walked over a copy and a destroyed one is skipped.
|
|
91
|
+
*/
|
|
92
|
+
dispatch(x, y, identifier, name) {
|
|
93
|
+
this.ensureSorted();
|
|
94
|
+
const catchers = this.catchers.slice();
|
|
95
|
+
for (let index = catchers.length - 1; index >= 0; index--) {
|
|
96
|
+
const item = catchers[index];
|
|
97
|
+
if (item.active && item[name](x, y, identifier)) {
|
|
93
98
|
break;
|
|
94
99
|
}
|
|
95
100
|
}
|
|
96
101
|
}
|
|
97
|
-
|
|
98
|
-
if (this.
|
|
99
|
-
this.
|
|
100
|
-
const count = this.
|
|
102
|
+
ensureSorted() {
|
|
103
|
+
if (this.zIndicesDirty) {
|
|
104
|
+
this.catchers.sort((a, b) => a.zIndex - b.zIndex || a.handler - b.handler);
|
|
105
|
+
const count = this.catchers.length;
|
|
101
106
|
const step = count < 1024 ? 1 : 1024 / count;
|
|
102
107
|
for (let index = 0; index < count; index++) {
|
|
103
|
-
this.
|
|
108
|
+
this.catchers[index].depth = index * step;
|
|
104
109
|
}
|
|
105
|
-
this.
|
|
110
|
+
this.zIndicesDirty = false;
|
|
106
111
|
}
|
|
107
112
|
}
|
|
108
113
|
}
|
|
109
|
-
|
|
110
|
-
export { UIInputWrapper };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Matrix4, Object3D } from "three";
|
|
2
|
-
import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
|
|
3
|
-
import type { HSLAdjustment, UIProperty } from "../../miscellaneous/generic-plane/shared";
|
|
2
|
+
import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode.js";
|
|
3
|
+
import type { HSLAdjustment, UIProperty } from "../../miscellaneous/generic-plane/shared.js";
|
|
4
4
|
export interface UISceneWrapperView {
|
|
5
5
|
createPlane(source: string, properties: Record<string, UIProperty>, transform: Matrix4, visibility: boolean, transparency: UITransparencyMode, blend: number, hsl: HSLAdjustment): number;
|
|
6
6
|
destroyPlane(handler: number): void;
|
|
@@ -10,6 +10,9 @@ export interface UISceneWrapperView {
|
|
|
10
10
|
setTransparency(handler: number, transparency: UITransparencyMode): void;
|
|
11
11
|
setBlend(handler: number, blend: number): void;
|
|
12
12
|
setHSL(handler: number, hsl: HSLAdjustment): void;
|
|
13
|
+
insertOrderedObject(object: Object3D, depth: number): void;
|
|
14
|
+
setOrderedObjectDepth(object: Object3D, depth: number): void;
|
|
15
|
+
removeOrderedObject(object: Object3D): void;
|
|
13
16
|
insertCustomObject(object: Object3D): void;
|
|
14
17
|
removeCustomObject(object: Object3D): void;
|
|
15
18
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Matrix4, Object3D, WebGLRenderer } from "three";
|
|
2
|
-
import type { HSLAdjustment, UIProperty } from "../../miscellaneous/generic-plane/shared";
|
|
3
|
-
import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode";
|
|
4
|
-
import type { UISceneWrapperView } from "./UISceneWrapper.Internal";
|
|
2
|
+
import type { HSLAdjustment, UIProperty } from "../../miscellaneous/generic-plane/shared.js";
|
|
3
|
+
import type { UITransparencyMode } from "../../miscellaneous/UITransparencyMode.js";
|
|
4
|
+
import type { UISceneWrapperView } from "./UISceneWrapper.Internal.js";
|
|
5
5
|
export declare class UISceneWrapper implements UISceneWrapperView {
|
|
6
6
|
private readonly scene;
|
|
7
7
|
private readonly camera;
|
|
@@ -15,8 +15,16 @@ export declare class UISceneWrapper implements UISceneWrapperView {
|
|
|
15
15
|
setTransparency(handler: number, transparency: UITransparencyMode): void;
|
|
16
16
|
setBlend(handler: number, blend: number): void;
|
|
17
17
|
setHSL(handler: number, hsl: HSLAdjustment): void;
|
|
18
|
+
/** Adds an object drawn between planes by depth, on the same scale as plane zIndex */
|
|
19
|
+
insertOrderedObject(object: Object3D, depth: number): this;
|
|
20
|
+
/** Moves an ordered object to the given depth */
|
|
21
|
+
setOrderedObjectDepth(object: Object3D, depth: number): this;
|
|
22
|
+
/** Removes an ordered object */
|
|
23
|
+
removeOrderedObject(object: Object3D): this;
|
|
18
24
|
insertCustomObject(object: Object3D): this;
|
|
19
25
|
removeCustomObject(object: Object3D): this;
|
|
26
|
+
/** Frees the GPU resources of all planes; custom and ordered objects are left to their owners */
|
|
27
|
+
destroy(): void;
|
|
20
28
|
resize(width: number, height: number): this;
|
|
21
29
|
render(renderer: WebGLRenderer): this;
|
|
22
30
|
}
|
|
@@ -1,60 +1,78 @@
|
|
|
1
|
-
import { Color,
|
|
2
|
-
import { UIPlaneRegistry } from
|
|
3
|
-
|
|
1
|
+
import { Color, OrthographicCamera, Scene } from "three";
|
|
2
|
+
import { UIPlaneRegistry } from "../../miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js";
|
|
4
3
|
let originalClearColor = new Color();
|
|
5
4
|
let originalClearAlpha = 0;
|
|
6
5
|
let originalAutoClear = false;
|
|
7
6
|
let originalAutoClearColor = false;
|
|
8
7
|
let originalAutoClearDepth = false;
|
|
9
8
|
let originalAutoClearStencil = false;
|
|
10
|
-
class UISceneWrapper {
|
|
9
|
+
export class UISceneWrapper {
|
|
11
10
|
constructor(width, height) {
|
|
12
|
-
this.
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
11
|
+
this.scene = new Scene();
|
|
12
|
+
this.planeRegistry = new UIPlaneRegistry(this.scene);
|
|
13
|
+
this.camera = new OrthographicCamera(0, width, height, 0, -1024, 1024);
|
|
14
|
+
this.camera.matrixAutoUpdate = false;
|
|
15
|
+
this.camera.matrixWorldAutoUpdate = false;
|
|
17
16
|
}
|
|
18
17
|
createPlane(source, properties, transform, visibility, transparency, blend, hsl) {
|
|
19
|
-
return this.
|
|
18
|
+
return this.planeRegistry.createPlane(source, properties, transform, visibility, transparency, blend, hsl);
|
|
20
19
|
}
|
|
21
20
|
destroyPlane(handler) {
|
|
22
|
-
this.
|
|
21
|
+
this.planeRegistry.destroyPlane(handler);
|
|
23
22
|
}
|
|
24
23
|
setTransform(handler, transform) {
|
|
25
|
-
this.
|
|
24
|
+
this.planeRegistry.setTransform(handler, transform);
|
|
26
25
|
}
|
|
27
26
|
setProperties(handler, properties) {
|
|
28
|
-
this.
|
|
27
|
+
this.planeRegistry.setProperties(handler, properties);
|
|
29
28
|
}
|
|
30
29
|
setVisibility(handler, visible) {
|
|
31
|
-
this.
|
|
30
|
+
this.planeRegistry.setVisibility(handler, visible);
|
|
32
31
|
}
|
|
33
32
|
setTransparency(handler, transparency) {
|
|
34
|
-
this.
|
|
33
|
+
this.planeRegistry.setTransparency(handler, transparency);
|
|
35
34
|
}
|
|
36
35
|
setBlend(handler, blend) {
|
|
37
|
-
this.
|
|
36
|
+
this.planeRegistry.setBlend(handler, blend);
|
|
38
37
|
}
|
|
39
38
|
setHSL(handler, hsl) {
|
|
40
|
-
this.
|
|
39
|
+
this.planeRegistry.setHSL(handler, hsl);
|
|
40
|
+
}
|
|
41
|
+
/** Adds an object drawn between planes by depth, on the same scale as plane zIndex */
|
|
42
|
+
insertOrderedObject(object, depth) {
|
|
43
|
+
this.planeRegistry.insertOrderedObject(object, depth);
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
/** Moves an ordered object to the given depth */
|
|
47
|
+
setOrderedObjectDepth(object, depth) {
|
|
48
|
+
this.planeRegistry.setOrderedObjectDepth(object, depth);
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
/** Removes an ordered object */
|
|
52
|
+
removeOrderedObject(object) {
|
|
53
|
+
this.planeRegistry.removeOrderedObject(object);
|
|
54
|
+
return this;
|
|
41
55
|
}
|
|
42
56
|
insertCustomObject(object) {
|
|
43
|
-
this.
|
|
57
|
+
this.scene.add(object);
|
|
44
58
|
return this;
|
|
45
59
|
}
|
|
46
60
|
removeCustomObject(object) {
|
|
47
|
-
this.
|
|
61
|
+
this.scene.remove(object);
|
|
48
62
|
return this;
|
|
49
63
|
}
|
|
64
|
+
/** Frees the GPU resources of all planes; custom and ordered objects are left to their owners */
|
|
65
|
+
destroy() {
|
|
66
|
+
this.planeRegistry.destroy();
|
|
67
|
+
}
|
|
50
68
|
resize(width, height) {
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
69
|
+
this.camera.right = width;
|
|
70
|
+
this.camera.top = height;
|
|
71
|
+
this.camera.updateProjectionMatrix();
|
|
54
72
|
return this;
|
|
55
73
|
}
|
|
56
74
|
render(renderer) {
|
|
57
|
-
this.
|
|
75
|
+
this.planeRegistry.flush();
|
|
58
76
|
originalClearColor = renderer.getClearColor(originalClearColor);
|
|
59
77
|
originalClearAlpha = renderer.getClearAlpha();
|
|
60
78
|
originalAutoClear = renderer.autoClear;
|
|
@@ -67,7 +85,7 @@ class UISceneWrapper {
|
|
|
67
85
|
renderer.autoClearStencil = false;
|
|
68
86
|
renderer.setClearColor(0x000000, 1);
|
|
69
87
|
renderer.clear(false, true, true);
|
|
70
|
-
renderer.render(this.
|
|
88
|
+
renderer.render(this.scene, this.camera);
|
|
71
89
|
renderer.setClearColor(originalClearColor);
|
|
72
90
|
renderer.setClearAlpha(originalClearAlpha);
|
|
73
91
|
renderer.autoClear = originalAutoClear;
|
|
@@ -77,5 +95,3 @@ class UISceneWrapper {
|
|
|
77
95
|
return this;
|
|
78
96
|
}
|
|
79
97
|
}
|
|
80
|
-
|
|
81
|
-
export { UISceneWrapper };
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { Constraint, Variable } from "@lume/kiwi";
|
|
2
|
-
import type { UIExpression } from "../../miscellaneous/UIExpression";
|
|
3
|
-
import type { UIPriority } from "../../miscellaneous/UIPriority";
|
|
4
|
-
import type { UIRelation } from "../../miscellaneous/UIRelation";
|
|
2
|
+
import type { UIExpression } from "../../miscellaneous/UIExpression.js";
|
|
3
|
+
import type { UIPriority } from "../../miscellaneous/UIPriority.js";
|
|
4
|
+
import type { UIRelation } from "../../miscellaneous/UIRelation.js";
|
|
5
5
|
export interface UISolverWrapperView {
|
|
6
6
|
get dirty(): boolean;
|
|
7
7
|
createVariable(value: number, priority: UIPriority): number;
|
|
8
8
|
removeVariable(index: number): void;
|
|
9
|
+
hasVariable(index: number): boolean;
|
|
9
10
|
suggestVariableValue(index: number, value: number): void;
|
|
10
11
|
setVariablePriority(index: number, priority: UIPriority): void;
|
|
11
12
|
readVariableValue(index: number): number;
|
|
12
13
|
createConstraint(lhs: UIExpression, rhs: UIExpression, relation: UIRelation, priority: UIPriority, enabled: boolean): number;
|
|
13
14
|
removeConstraint(index: number): void;
|
|
15
|
+
isConstraintUsingVariable(constraintIndex: number, variableIndex: number): boolean;
|
|
14
16
|
setConstraintLHS(index: number, lhs: UIExpression): void;
|
|
15
17
|
setConstraintRHS(index: number, rhs: UIExpression): void;
|
|
16
18
|
setConstraintRelation(index: number, relation: UIRelation): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UIExpression } from "../../miscellaneous/UIExpression";
|
|
2
|
-
import { UIPriority } from "../../miscellaneous/UIPriority";
|
|
3
|
-
import { UIRelation } from "../../miscellaneous/UIRelation";
|
|
4
|
-
import type { UISolverWrapperView } from "./UISolverWrapper.Internal";
|
|
1
|
+
import { UIExpression } from "../../miscellaneous/UIExpression.js";
|
|
2
|
+
import { UIPriority } from "../../miscellaneous/UIPriority.js";
|
|
3
|
+
import { UIRelation } from "../../miscellaneous/UIRelation.js";
|
|
4
|
+
import type { UISolverWrapperView } from "./UISolverWrapper.Internal.js";
|
|
5
5
|
/**
|
|
6
6
|
* Wrapper around the Kiwi constraint solver providing enhanced UI-specific functionality.
|
|
7
7
|
*
|
|
@@ -57,6 +57,13 @@ export declare class UISolverWrapper implements UISolverWrapperView {
|
|
|
57
57
|
* @throws Will throw an error if the variable doesn't exist or is still in use
|
|
58
58
|
*/
|
|
59
59
|
removeVariable(index: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* Checks whether a variable exists.
|
|
62
|
+
*
|
|
63
|
+
* @param index - Index of the variable
|
|
64
|
+
* @returns True if the variable was created and not removed
|
|
65
|
+
*/
|
|
66
|
+
hasVariable(index: number): boolean;
|
|
60
67
|
/**
|
|
61
68
|
* Suggests a new value for an existing variable.
|
|
62
69
|
*
|
|
@@ -116,6 +123,15 @@ export declare class UISolverWrapper implements UISolverWrapperView {
|
|
|
116
123
|
* @throws Will throw an error if the constraint doesn't exist
|
|
117
124
|
*/
|
|
118
125
|
removeConstraint(index: number): void;
|
|
126
|
+
/**
|
|
127
|
+
* Checks whether a constraint references a variable in either of its expressions.
|
|
128
|
+
*
|
|
129
|
+
* @param constraintIndex - Index of the constraint to check
|
|
130
|
+
* @param variableIndex - Index of the variable to look for
|
|
131
|
+
* @returns True if the variable is a term of the constraint
|
|
132
|
+
* @throws Will throw an error if the constraint doesn't exist
|
|
133
|
+
*/
|
|
134
|
+
isConstraintUsingVariable(constraintIndex: number, variableIndex: number): boolean;
|
|
119
135
|
/**
|
|
120
136
|
* Updates the left-hand side expression of an existing constraint.
|
|
121
137
|
*
|
|
@@ -210,6 +226,13 @@ export declare class UISolverWrapper implements UISolverWrapperView {
|
|
|
210
226
|
*
|
|
211
227
|
* Re-adds all variables and constraints to a fresh solver instance.
|
|
212
228
|
* Used for recovery when the solver enters an invalid state.
|
|
229
|
+
*
|
|
230
|
+
* The solver is normally dropped because some constraint was rejected by kiwi,
|
|
231
|
+
* and that same constraint is still registered here. Replaying it would throw
|
|
232
|
+
* again, so every replay is guarded individually: a constraint kiwi refuses is
|
|
233
|
+
* skipped and stays registered but unapplied, which is exactly the state it was
|
|
234
|
+
* already in. The fresh solver is only published once the replay is complete,
|
|
235
|
+
* so a rejection can never leave a half-built solver in place.
|
|
213
236
|
*/
|
|
214
237
|
private rebuildSolver;
|
|
215
238
|
}
|