laymur 0.23.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +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 +11 -11
- package/dist/core/elements/UIElement/UIElement.js +57 -60
- 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 -10
- package/dist/core/elements/UIProgress/UIProgress.js +59 -62
- 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 +30 -1
- package/dist/core/miscellaneous/asserts.js +87 -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 +10 -5
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +63 -58
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +52 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +110 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +181 -261
- 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 +209 -115
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +12 -12
- package/dist/core/miscellaneous/generic-plane/shared.js +28 -23
- 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 +13 -16
- 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 +1 -1
- package/dist/core/miscellaneous/texture/UITextureView.js +113 -117
- 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 +20 -4
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +138 -117
- 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 +4 -1
- package/dist/particles/instancedParticle/UIInstancedParticle.js +40 -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,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WebGLRenderer } from "three";
|
|
2
|
+
import { UILayer } from "../layers/UILayer/UILayer.js";
|
|
3
|
+
import type { UILayerElement } from "./shared.js";
|
|
4
|
+
import type { UIExpression } from "./UIExpression.js";
|
|
2
5
|
/**
|
|
3
6
|
* Validates value is finite number within safe range.
|
|
4
7
|
* @param value Number to validate
|
|
@@ -6,6 +9,15 @@ import { UILayer } from "../layers/UILayer/UILayer";
|
|
|
6
9
|
* @throws If value is not finite or exceeds safe range
|
|
7
10
|
*/
|
|
8
11
|
export declare function assertValidNumber(value: number, subject: string): void;
|
|
12
|
+
/**
|
|
13
|
+
* Validates a shader fits the vertex attribute budget of the device. A program over the budget
|
|
14
|
+
* fails to link, which three.js only logs, and its mesh is not drawn.
|
|
15
|
+
* @param renderer Renderer the shader is drawn with
|
|
16
|
+
* @param required Number of vertex attribute locations the shader uses
|
|
17
|
+
* @param subject Value name for error messages
|
|
18
|
+
* @throws If required exceeds the renderer's MAX_VERTEX_ATTRIBS
|
|
19
|
+
*/
|
|
20
|
+
export declare function assertVertexAttributeBudget(renderer: WebGLRenderer, required: number, subject: string): void;
|
|
9
21
|
/**
|
|
10
22
|
* Validates value is positive (>= EPSILON).
|
|
11
23
|
* @param value Number to validate
|
|
@@ -41,3 +53,20 @@ export declare function assertValidConstraintArguments(a: unknown, b: unknown, s
|
|
|
41
53
|
* @throws If subjects violate interpolation constraints
|
|
42
54
|
*/
|
|
43
55
|
export declare function assertValidInterpolationConstraintArguments(subject: string, a: unknown, b: unknown, c: unknown, anchorA: number, anchorB: number): UILayer;
|
|
56
|
+
/**
|
|
57
|
+
* Validates the element of a single element constraint.
|
|
58
|
+
* @param element Constrained element
|
|
59
|
+
* @param subject Constraint name for error messages
|
|
60
|
+
* @returns Layer of the element
|
|
61
|
+
* @throws If the element is destroyed
|
|
62
|
+
*/
|
|
63
|
+
export declare function assertValidConstraintElement(element: UILayerElement, subject: string): UILayer;
|
|
64
|
+
/**
|
|
65
|
+
* Validates that the expressions of a custom constraint refer only to existing variables.
|
|
66
|
+
* @param layer Layer of the constraint
|
|
67
|
+
* @param expressions Constraint expressions
|
|
68
|
+
* @param subject Constraint name for error messages
|
|
69
|
+
* @returns The layer
|
|
70
|
+
* @throws If the layer is destroyed or a variable does not exist
|
|
71
|
+
*/
|
|
72
|
+
export declare function assertValidConstraintExpressions(layer: UILayer, expressions: UIExpression[], subject: string): UILayer;
|
|
@@ -1,20 +1,35 @@
|
|
|
1
|
-
import { UILayer } from
|
|
2
|
-
import { EPSILON } from
|
|
3
|
-
import { isUILayerElement } from
|
|
4
|
-
|
|
1
|
+
import { UILayer } from "../layers/UILayer/UILayer.js";
|
|
2
|
+
import { EPSILON } from "./math.js";
|
|
3
|
+
import { isUILayerElement } from "./shared.js";
|
|
5
4
|
/**
|
|
6
5
|
* Validates value is finite number within safe range.
|
|
7
6
|
* @param value Number to validate
|
|
8
7
|
* @param subject Value name for error messages
|
|
9
8
|
* @throws If value is not finite or exceeds safe range
|
|
10
9
|
*/
|
|
11
|
-
function assertValidNumber(value, subject) {
|
|
10
|
+
export function assertValidNumber(value, subject) {
|
|
12
11
|
if (process.env.NODE_ENV !== "production") {
|
|
13
12
|
if (!Number.isFinite(value)) {
|
|
14
|
-
throw new Error(`${subject}: value must be a finite number`);
|
|
13
|
+
throw new Error(`${subject}: value must be a finite number, got ${value}`);
|
|
15
14
|
}
|
|
16
15
|
if (Math.abs(value) > Number.MAX_SAFE_INTEGER) {
|
|
17
|
-
throw new Error(`${subject}: value exceeds maximum safe integer range`);
|
|
16
|
+
throw new Error(`${subject}: value exceeds maximum safe integer range, got ${value}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Validates a shader fits the vertex attribute budget of the device. A program over the budget
|
|
22
|
+
* fails to link, which three.js only logs, and its mesh is not drawn.
|
|
23
|
+
* @param renderer Renderer the shader is drawn with
|
|
24
|
+
* @param required Number of vertex attribute locations the shader uses
|
|
25
|
+
* @param subject Value name for error messages
|
|
26
|
+
* @throws If required exceeds the renderer's MAX_VERTEX_ATTRIBS
|
|
27
|
+
*/
|
|
28
|
+
export function assertVertexAttributeBudget(renderer, required, subject) {
|
|
29
|
+
if (process.env.NODE_ENV !== "production") {
|
|
30
|
+
const available = renderer.capabilities.maxAttributes;
|
|
31
|
+
if (required > available) {
|
|
32
|
+
throw new Error(`${subject}: shader needs ${required} vertex attributes, the device supports ${available}`);
|
|
18
33
|
}
|
|
19
34
|
}
|
|
20
35
|
}
|
|
@@ -24,11 +39,11 @@ function assertValidNumber(value, subject) {
|
|
|
24
39
|
* @param subject Value name for error messages
|
|
25
40
|
* @throws If value is invalid or below EPSILON
|
|
26
41
|
*/
|
|
27
|
-
function assertValidPositiveNumber(value, subject) {
|
|
42
|
+
export function assertValidPositiveNumber(value, subject) {
|
|
28
43
|
if (process.env.NODE_ENV !== "production") {
|
|
29
44
|
assertValidNumber(value, subject);
|
|
30
45
|
if (value < EPSILON) {
|
|
31
|
-
throw new Error(`${subject}: value must be greater than or equal to ${EPSILON}`);
|
|
46
|
+
throw new Error(`${subject}: value must be greater than or equal to ${EPSILON}, got ${value}`);
|
|
32
47
|
}
|
|
33
48
|
}
|
|
34
49
|
}
|
|
@@ -38,11 +53,11 @@ function assertValidPositiveNumber(value, subject) {
|
|
|
38
53
|
* @param subject Value name for error messages
|
|
39
54
|
* @throws If value is invalid or negative
|
|
40
55
|
*/
|
|
41
|
-
function assertValidNonNegativeNumber(value, subject) {
|
|
56
|
+
export function assertValidNonNegativeNumber(value, subject) {
|
|
42
57
|
if (process.env.NODE_ENV !== "production") {
|
|
43
58
|
assertValidNumber(value, subject);
|
|
44
59
|
if (value < 0) {
|
|
45
|
-
throw new Error(`${subject}: value must be greater than or equal to 0`);
|
|
60
|
+
throw new Error(`${subject}: value must be greater than or equal to 0, got ${value}`);
|
|
46
61
|
}
|
|
47
62
|
}
|
|
48
63
|
}
|
|
@@ -54,8 +69,10 @@ function assertValidNonNegativeNumber(value, subject) {
|
|
|
54
69
|
* @returns Common layer for both subjects
|
|
55
70
|
* @throws If subjects are invalid or from different layers
|
|
56
71
|
*/
|
|
57
|
-
function assertValidConstraintArguments(a, b, subject) {
|
|
72
|
+
export function assertValidConstraintArguments(a, b, subject) {
|
|
58
73
|
if (process.env.NODE_ENV !== "production") {
|
|
74
|
+
assertNotDestroyed(a, "A", subject);
|
|
75
|
+
assertNotDestroyed(b, "B", subject);
|
|
59
76
|
if (a instanceof UILayer && b instanceof UILayer) {
|
|
60
77
|
throw new Error(`${subject}: layer cannot be snapped to another layer`);
|
|
61
78
|
}
|
|
@@ -96,7 +113,7 @@ function assertValidConstraintArguments(a, b, subject) {
|
|
|
96
113
|
if (isUILayerElement(b)) {
|
|
97
114
|
return b.layer;
|
|
98
115
|
}
|
|
99
|
-
throw new Error(`${subject}:
|
|
116
|
+
throw new Error(`${subject}: A or B must be a UILayer or a UILayerElement`);
|
|
100
117
|
}
|
|
101
118
|
/**
|
|
102
119
|
* Validates interpolation constraint subjects.
|
|
@@ -109,8 +126,11 @@ function assertValidConstraintArguments(a, b, subject) {
|
|
|
109
126
|
* @returns Common layer for all subjects
|
|
110
127
|
* @throws If subjects violate interpolation constraints
|
|
111
128
|
*/
|
|
112
|
-
function assertValidInterpolationConstraintArguments(subject, a, b, c, anchorA, anchorB) {
|
|
129
|
+
export function assertValidInterpolationConstraintArguments(subject, a, b, c, anchorA, anchorB) {
|
|
113
130
|
if (process.env.NODE_ENV !== "production") {
|
|
131
|
+
assertNotDestroyed(a, "A", subject);
|
|
132
|
+
assertNotDestroyed(b, "B", subject);
|
|
133
|
+
assertNotDestroyed(c, "C", subject);
|
|
114
134
|
if (c instanceof UILayer) {
|
|
115
135
|
throw new Error(`${subject}: C cannot be a layer`);
|
|
116
136
|
}
|
|
@@ -123,13 +143,13 @@ function assertValidInterpolationConstraintArguments(subject, a, b, c, anchorA,
|
|
|
123
143
|
layerA = a instanceof UILayer ? a : a.layer;
|
|
124
144
|
}
|
|
125
145
|
else {
|
|
126
|
-
throw new Error(`${subject}: A must be UILayer or UILayerElement`);
|
|
146
|
+
throw new Error(`${subject}: A must be a UILayer or a UILayerElement`);
|
|
127
147
|
}
|
|
128
148
|
if (b instanceof UILayer || isUILayerElement(b)) {
|
|
129
149
|
layerB = b instanceof UILayer ? b : b.layer;
|
|
130
150
|
}
|
|
131
151
|
else {
|
|
132
|
-
throw new Error(`${subject}: B must be UILayer or UILayerElement`);
|
|
152
|
+
throw new Error(`${subject}: B must be a UILayer or a UILayerElement`);
|
|
133
153
|
}
|
|
134
154
|
const layerC = c.layer;
|
|
135
155
|
if (layerA !== layerB || layerA !== layerC) {
|
|
@@ -157,7 +177,55 @@ function assertValidInterpolationConstraintArguments(subject, a, b, c, anchorA,
|
|
|
157
177
|
if (b instanceof UILayer) {
|
|
158
178
|
return b;
|
|
159
179
|
}
|
|
160
|
-
throw new Error(`${subject}:
|
|
180
|
+
throw new Error(`${subject}: A or B must be a UILayer or a UILayerElement`);
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Validates the element of a single element constraint.
|
|
184
|
+
* @param element Constrained element
|
|
185
|
+
* @param subject Constraint name for error messages
|
|
186
|
+
* @returns Layer of the element
|
|
187
|
+
* @throws If the element is destroyed
|
|
188
|
+
*/
|
|
189
|
+
export function assertValidConstraintElement(element, subject) {
|
|
190
|
+
if (process.env.NODE_ENV !== "production") {
|
|
191
|
+
assertNotDestroyed(element, "element", subject);
|
|
192
|
+
}
|
|
193
|
+
return element.layer;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Validates that the expressions of a custom constraint refer only to existing variables.
|
|
197
|
+
* @param layer Layer of the constraint
|
|
198
|
+
* @param expressions Constraint expressions
|
|
199
|
+
* @param subject Constraint name for error messages
|
|
200
|
+
* @returns The layer
|
|
201
|
+
* @throws If the layer is destroyed or a variable does not exist
|
|
202
|
+
*/
|
|
203
|
+
export function assertValidConstraintExpressions(layer, expressions, subject) {
|
|
204
|
+
if (process.env.NODE_ENV !== "production") {
|
|
205
|
+
assertNotDestroyed(layer, "layer", subject);
|
|
206
|
+
for (const expression of expressions) {
|
|
207
|
+
for (const [variableIndex] of expression.prepareTerms()) {
|
|
208
|
+
if (!layer.solverWrapper.hasVariable(variableIndex)) {
|
|
209
|
+
throw new Error(`${subject}: variable ${variableIndex} does not exist`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return layer;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Validates that a constraint subject is not destroyed. A constraint made with a destroyed
|
|
218
|
+
* subject would stay in the layer without a solver constraint.
|
|
219
|
+
* @param value Element or layer
|
|
220
|
+
* @param name Subject name for error messages
|
|
221
|
+
* @param subject Constraint name for error messages
|
|
222
|
+
* @throws If the subject is destroyed
|
|
223
|
+
*/
|
|
224
|
+
function assertNotDestroyed(value, name, subject) {
|
|
225
|
+
if (typeof value === "object" &&
|
|
226
|
+
value !== null &&
|
|
227
|
+
"destroyed" in value &&
|
|
228
|
+
value.destroyed === true) {
|
|
229
|
+
throw new Error(`${subject}: ${name} is destroyed`);
|
|
230
|
+
}
|
|
161
231
|
}
|
|
162
|
-
|
|
163
|
-
export { assertValidConstraintArguments, assertValidInterpolationConstraintArguments, assertValidNonNegativeNumber, assertValidNumber, assertValidPositiveNumber };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { CanvasTexture,
|
|
2
|
-
import { checkOffscreenCanvasSupport, checkSRGBSupport } from
|
|
3
|
-
|
|
1
|
+
import { CanvasTexture, ClampToEdgeWrapping, LinearFilter, RGBAFormat, UnsignedByteType, UVMapping, SRGBColorSpace, NoColorSpace, } from "three";
|
|
2
|
+
import { checkOffscreenCanvasSupport, checkSRGBSupport } from "./webglCapabilities.js";
|
|
4
3
|
/**
|
|
5
4
|
* Creates a canvas using OffscreenCanvas if available, otherwise falls back to HTMLCanvasElement.
|
|
6
5
|
*
|
|
@@ -8,7 +7,7 @@ import { checkOffscreenCanvasSupport, checkSRGBSupport } from './webglCapabiliti
|
|
|
8
7
|
* @param height - Canvas height in pixels
|
|
9
8
|
* @returns Canvas instance
|
|
10
9
|
*/
|
|
11
|
-
function createCanvas(width, height) {
|
|
10
|
+
export function createCanvas(width, height) {
|
|
12
11
|
if (checkOffscreenCanvasSupport()) {
|
|
13
12
|
return new OffscreenCanvas(width, height);
|
|
14
13
|
}
|
|
@@ -17,6 +16,15 @@ function createCanvas(width, height) {
|
|
|
17
16
|
canvasElement.height = height;
|
|
18
17
|
return canvasElement;
|
|
19
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Gets the 2D rendering context for a UICanvas.
|
|
21
|
+
*
|
|
22
|
+
* @param canvas - Canvas instance
|
|
23
|
+
* @returns 2D rendering context or null
|
|
24
|
+
*/
|
|
25
|
+
export function getCanvas2DContext(canvas) {
|
|
26
|
+
return canvas.getContext("2d");
|
|
27
|
+
}
|
|
20
28
|
/**
|
|
21
29
|
* Creates a CanvasTexture with maximum WebGL1/WebGL2 compatibility.
|
|
22
30
|
* - ClampToEdge wrapping (required for NPOT in WebGL1)
|
|
@@ -27,11 +35,9 @@ function createCanvas(width, height) {
|
|
|
27
35
|
* @param canvas - Source canvas
|
|
28
36
|
* @returns Configured CanvasTexture
|
|
29
37
|
*/
|
|
30
|
-
function createCanvasTexture(canvas) {
|
|
38
|
+
export function createCanvasTexture(canvas) {
|
|
31
39
|
const texture = new CanvasTexture(canvas, UVMapping, ClampToEdgeWrapping, ClampToEdgeWrapping, LinearFilter, LinearFilter, RGBAFormat, UnsignedByteType, 1);
|
|
32
40
|
texture.colorSpace = checkSRGBSupport() ? SRGBColorSpace : NoColorSpace;
|
|
33
41
|
texture.generateMipmaps = false;
|
|
34
42
|
return texture;
|
|
35
43
|
}
|
|
36
|
-
|
|
37
|
-
export { createCanvas, createCanvasTexture };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Color } from "three";
|
|
2
|
-
import type { UIColor } from "./UIColor";
|
|
2
|
+
import type { UIColor } from "./UIColor.js";
|
|
3
3
|
/** Color configuration as Three.js Color, hex number, hex string, or UIColor */
|
|
4
4
|
export type UIColorConfig = Color | number | string | UIColor;
|
|
5
5
|
/** Predefined color names */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Color, Vector4 } from "three";
|
|
2
|
-
import type { UIColorConfig, UIColorName } from "./UIColor.Internal";
|
|
2
|
+
import type { UIColorConfig, UIColorName } from "./UIColor.Internal.js";
|
|
3
3
|
/** RGBA color with RGB, HSL, hex, and named color support */
|
|
4
4
|
export declare class UIColor {
|
|
5
5
|
private rInternal;
|