laymur 0.23.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 +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 +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 +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 +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,5 +1,5 @@
|
|
|
1
|
-
import type { UIAspectConfig, UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous";
|
|
2
|
-
import { UISpawnModule } from "./UISpawnModule";
|
|
1
|
+
import type { UIAspectConfig, UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous.js";
|
|
2
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
3
3
|
/**
|
|
4
4
|
* Assigns random scale to particles.
|
|
5
5
|
*
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { MathUtils } from
|
|
2
|
-
import { assertValidPositiveNumber } from
|
|
3
|
-
import {
|
|
4
|
-
import { UISpawnModule } from
|
|
5
|
-
|
|
1
|
+
import { MathUtils } from "three";
|
|
2
|
+
import { assertValidPositiveNumber } from "../../core/miscellaneous/asserts.js";
|
|
3
|
+
import { BUILTIN_OFFSET_SCALE_X, BUILTIN_OFFSET_SCALE_Y, resolveAspect, resolveUIRangeConfig, } from "../miscellaneous/miscellaneous.js";
|
|
4
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
6
5
|
/**
|
|
7
6
|
* Assigns random scale to particles.
|
|
8
7
|
*
|
|
9
8
|
* Base scale is chosen uniformly from the range. Aspect ratio is applied to X scale.
|
|
10
9
|
*/
|
|
11
|
-
class UISpawnRandomScale extends UISpawnModule {
|
|
10
|
+
export class UISpawnRandomScale extends UISpawnModule {
|
|
12
11
|
/**
|
|
13
12
|
* @param scale - Base scale range. Accepts number, tuple, or range object
|
|
14
13
|
* @param aspect - Width/height ratio. Accepts number or texture
|
|
@@ -17,44 +16,42 @@ class UISpawnRandomScale extends UISpawnModule {
|
|
|
17
16
|
super();
|
|
18
17
|
/** @internal */
|
|
19
18
|
this.requiredProperties = { builtin: "Matrix4" };
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
assertValidPositiveNumber(this.
|
|
23
|
-
assertValidPositiveNumber(this.
|
|
24
|
-
assertValidPositiveNumber(this.
|
|
19
|
+
this.scaleInternal = resolveUIRangeConfig(scale);
|
|
20
|
+
this.aspectInternal = resolveAspect(aspect);
|
|
21
|
+
assertValidPositiveNumber(this.scaleInternal.min, "UISpawnRandomScale.constructor.scale.min");
|
|
22
|
+
assertValidPositiveNumber(this.scaleInternal.max, "UISpawnRandomScale.constructor.scale.max");
|
|
23
|
+
assertValidPositiveNumber(this.aspectInternal, "UISpawnRandomScale.constructor.aspect");
|
|
25
24
|
}
|
|
26
25
|
/** Base scale range */
|
|
27
26
|
get scale() {
|
|
28
|
-
return this.
|
|
27
|
+
return this.scaleInternal;
|
|
29
28
|
}
|
|
30
29
|
/** Width/height aspect ratio */
|
|
31
30
|
get aspect() {
|
|
32
|
-
return this.
|
|
31
|
+
return this.aspectInternal;
|
|
33
32
|
}
|
|
34
33
|
/** Base scale range */
|
|
35
34
|
set scale(value) {
|
|
36
|
-
this.
|
|
37
|
-
assertValidPositiveNumber(this.
|
|
38
|
-
assertValidPositiveNumber(this.
|
|
35
|
+
this.scaleInternal = resolveUIRangeConfig(value);
|
|
36
|
+
assertValidPositiveNumber(this.scaleInternal.min, "UISpawnRandomScale.scale.min");
|
|
37
|
+
assertValidPositiveNumber(this.scaleInternal.max, "UISpawnRandomScale.scale.max");
|
|
39
38
|
}
|
|
40
39
|
/** Width/height aspect ratio */
|
|
41
40
|
set aspect(value) {
|
|
42
|
-
this.
|
|
43
|
-
assertValidPositiveNumber(this.
|
|
41
|
+
this.aspectInternal = resolveAspect(value);
|
|
42
|
+
assertValidPositiveNumber(this.aspectInternal, "UISpawnRandomScale.aspect");
|
|
44
43
|
}
|
|
45
44
|
/** @internal */
|
|
46
45
|
spawn(properties, instanceBegin, instanceEnd) {
|
|
47
46
|
const { builtin } = properties;
|
|
48
47
|
const { array, itemSize } = builtin;
|
|
49
|
-
const { min: scaleMin, max: scaleMax } = this.
|
|
48
|
+
const { min: scaleMin, max: scaleMax } = this.scaleInternal;
|
|
50
49
|
for (let i = instanceBegin; i < instanceEnd; i++) {
|
|
51
50
|
const itemOffset = i * itemSize;
|
|
52
51
|
const randomScale = MathUtils.randFloat(scaleMin, scaleMax);
|
|
53
|
-
array[itemOffset + BUILTIN_OFFSET_SCALE_X] = randomScale * this.
|
|
52
|
+
array[itemOffset + BUILTIN_OFFSET_SCALE_X] = randomScale * this.aspectInternal;
|
|
54
53
|
array[itemOffset + BUILTIN_OFFSET_SCALE_Y] = randomScale;
|
|
55
54
|
}
|
|
56
55
|
builtin.needsUpdate = true;
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
|
-
|
|
60
|
-
export { UISpawnRandomScale };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous";
|
|
2
|
-
import { UISpawnModule } from "./UISpawnModule";
|
|
1
|
+
import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous.js";
|
|
2
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
3
3
|
/**
|
|
4
4
|
* Assigns random angular velocity to particles.
|
|
5
5
|
*
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { MathUtils } from
|
|
2
|
-
import { assertValidNumber } from
|
|
3
|
-
import {
|
|
4
|
-
import { UISpawnModule } from
|
|
5
|
-
|
|
1
|
+
import { MathUtils } from "three";
|
|
2
|
+
import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
|
|
3
|
+
import { BUILTIN_OFFSET_TORQUE, resolveUIRangeConfig } from "../miscellaneous/miscellaneous.js";
|
|
4
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
6
5
|
/**
|
|
7
6
|
* Assigns random angular velocity to particles.
|
|
8
7
|
*
|
|
9
8
|
* Torque (rotation speed) is chosen uniformly from the specified range.
|
|
10
9
|
*/
|
|
11
|
-
class UISpawnRandomTorque extends UISpawnModule {
|
|
10
|
+
export class UISpawnRandomTorque extends UISpawnModule {
|
|
12
11
|
/**
|
|
13
12
|
* @param torque - Angular velocity range in radians/second. Accepts number, tuple, or range object
|
|
14
13
|
*/
|
|
@@ -16,30 +15,28 @@ class UISpawnRandomTorque extends UISpawnModule {
|
|
|
16
15
|
super();
|
|
17
16
|
/** @internal */
|
|
18
17
|
this.requiredProperties = { builtin: "Matrix4" };
|
|
19
|
-
this.
|
|
20
|
-
assertValidNumber(this.
|
|
21
|
-
assertValidNumber(this.
|
|
18
|
+
this.torqueInternal = resolveUIRangeConfig(torque);
|
|
19
|
+
assertValidNumber(this.torqueInternal.min, "UISpawnRandomTorque.constructor.torque.min");
|
|
20
|
+
assertValidNumber(this.torqueInternal.max, "UISpawnRandomTorque.constructor.torque.max");
|
|
22
21
|
}
|
|
23
22
|
/** Angular velocity range in radians/second */
|
|
24
23
|
get torque() {
|
|
25
|
-
return this.
|
|
24
|
+
return this.torqueInternal;
|
|
26
25
|
}
|
|
27
26
|
/** Angular velocity range in radians/second */
|
|
28
27
|
set torque(value) {
|
|
29
|
-
this.
|
|
30
|
-
assertValidNumber(this.
|
|
31
|
-
assertValidNumber(this.
|
|
28
|
+
this.torqueInternal = resolveUIRangeConfig(value);
|
|
29
|
+
assertValidNumber(this.torqueInternal.min, "UISpawnRandomTorque.torque.min");
|
|
30
|
+
assertValidNumber(this.torqueInternal.max, "UISpawnRandomTorque.torque.max");
|
|
32
31
|
}
|
|
33
32
|
/** @internal */
|
|
34
33
|
spawn(properties, instanceBegin, instanceEnd) {
|
|
35
34
|
const { builtin } = properties;
|
|
36
35
|
const { array, itemSize } = builtin;
|
|
37
|
-
const { min: torqueMin, max: torqueMax } = this.
|
|
36
|
+
const { min: torqueMin, max: torqueMax } = this.torqueInternal;
|
|
38
37
|
for (let i = instanceBegin; i < instanceEnd; i++) {
|
|
39
38
|
array[i * itemSize + BUILTIN_OFFSET_TORQUE] = MathUtils.randFloat(torqueMin, torqueMax);
|
|
40
39
|
}
|
|
41
40
|
builtin.needsUpdate = true;
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
export { UISpawnRandomTorque };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous";
|
|
2
|
-
import { UISpawnModule } from "./UISpawnModule";
|
|
1
|
+
import type { UIRange, UIRangeConfig } from "../miscellaneous/miscellaneous.js";
|
|
2
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
3
3
|
/**
|
|
4
4
|
* Assigns random velocity to particles.
|
|
5
5
|
*
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { MathUtils } from
|
|
2
|
-
import { assertValidNumber } from
|
|
3
|
-
import {
|
|
4
|
-
import { UISpawnModule } from
|
|
5
|
-
|
|
1
|
+
import { MathUtils } from "three";
|
|
2
|
+
import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
|
|
3
|
+
import { BUILTIN_OFFSET_VELOCITY_X, BUILTIN_OFFSET_VELOCITY_Y, resolveUIRangeConfig, } from "../miscellaneous/miscellaneous.js";
|
|
4
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
6
5
|
/**
|
|
7
6
|
* Assigns random velocity to particles.
|
|
8
7
|
*
|
|
9
8
|
* Direction and magnitude are chosen independently from their respective ranges.
|
|
10
9
|
*/
|
|
11
|
-
class UISpawnRandomVelocity extends UISpawnModule {
|
|
10
|
+
export class UISpawnRandomVelocity extends UISpawnModule {
|
|
12
11
|
/**
|
|
13
12
|
* @param angle - Direction range in radians. Accepts number, tuple, or range object
|
|
14
13
|
* @param magnitude - Speed range in units/second. Accepts number, tuple, or range object
|
|
@@ -17,39 +16,39 @@ class UISpawnRandomVelocity extends UISpawnModule {
|
|
|
17
16
|
super();
|
|
18
17
|
/** @internal */
|
|
19
18
|
this.requiredProperties = { builtin: "Matrix4" };
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
assertValidNumber(this.
|
|
23
|
-
assertValidNumber(this.
|
|
24
|
-
assertValidNumber(this.
|
|
25
|
-
assertValidNumber(this.
|
|
19
|
+
this.angleInternal = resolveUIRangeConfig(angle);
|
|
20
|
+
this.magnitudeInternal = resolveUIRangeConfig(magnitude);
|
|
21
|
+
assertValidNumber(this.angleInternal.min, "UISpawnRandomVelocity.constructor.angle.min");
|
|
22
|
+
assertValidNumber(this.angleInternal.max, "UISpawnRandomVelocity.constructor.angle.max");
|
|
23
|
+
assertValidNumber(this.magnitudeInternal.min, "UISpawnRandomVelocity.constructor.magnitude.min");
|
|
24
|
+
assertValidNumber(this.magnitudeInternal.max, "UISpawnRandomVelocity.constructor.magnitude.max");
|
|
26
25
|
}
|
|
27
26
|
/** Direction range in radians */
|
|
28
27
|
get angle() {
|
|
29
|
-
return this.
|
|
28
|
+
return this.angleInternal;
|
|
30
29
|
}
|
|
31
30
|
/** Speed range in units/second */
|
|
32
31
|
get magnitude() {
|
|
33
|
-
return this.
|
|
32
|
+
return this.magnitudeInternal;
|
|
34
33
|
}
|
|
35
34
|
/** Direction range in radians */
|
|
36
35
|
set angle(value) {
|
|
37
|
-
this.
|
|
38
|
-
assertValidNumber(this.
|
|
39
|
-
assertValidNumber(this.
|
|
36
|
+
this.angleInternal = resolveUIRangeConfig(value);
|
|
37
|
+
assertValidNumber(this.angleInternal.min, "UISpawnRandomVelocity.angle.min");
|
|
38
|
+
assertValidNumber(this.angleInternal.max, "UISpawnRandomVelocity.angle.max");
|
|
40
39
|
}
|
|
41
40
|
/** Speed range in units/second */
|
|
42
41
|
set magnitude(value) {
|
|
43
|
-
this.
|
|
44
|
-
assertValidNumber(this.
|
|
45
|
-
assertValidNumber(this.
|
|
42
|
+
this.magnitudeInternal = resolveUIRangeConfig(value);
|
|
43
|
+
assertValidNumber(this.magnitudeInternal.min, "UISpawnRandomVelocity.magnitude.min");
|
|
44
|
+
assertValidNumber(this.magnitudeInternal.max, "UISpawnRandomVelocity.magnitude.max");
|
|
46
45
|
}
|
|
47
46
|
/** @internal */
|
|
48
47
|
spawn(properties, instanceBegin, instanceEnd) {
|
|
49
48
|
const { builtin } = properties;
|
|
50
49
|
const { array, itemSize } = builtin;
|
|
51
|
-
const { min: angleMin, max: angleMax } = this.
|
|
52
|
-
const { min: magnitudeMin, max: magnitudeMax } = this.
|
|
50
|
+
const { min: angleMin, max: angleMax } = this.angleInternal;
|
|
51
|
+
const { min: magnitudeMin, max: magnitudeMax } = this.magnitudeInternal;
|
|
53
52
|
for (let i = instanceBegin; i < instanceEnd; i++) {
|
|
54
53
|
const itemOffset = i * itemSize;
|
|
55
54
|
const angle = MathUtils.randFloat(angleMin, angleMax);
|
|
@@ -60,5 +59,3 @@ class UISpawnRandomVelocity extends UISpawnModule {
|
|
|
60
59
|
builtin.needsUpdate = true;
|
|
61
60
|
}
|
|
62
61
|
}
|
|
63
|
-
|
|
64
|
-
export { UISpawnRandomVelocity };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Vector2Like } from "../../core/miscellaneous/math";
|
|
2
|
-
import type { UIVector2Config } from "../miscellaneous/miscellaneous";
|
|
3
|
-
import { UISpawnModule } from "./UISpawnModule";
|
|
1
|
+
import type { Vector2Like } from "../../core/miscellaneous/math.js";
|
|
2
|
+
import type { UIVector2Config } from "../miscellaneous/miscellaneous.js";
|
|
3
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
4
4
|
/**
|
|
5
5
|
* Spawns particles at random positions within a rectangle.
|
|
6
6
|
*
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { MathUtils } from
|
|
2
|
-
import { assertValidNumber } from
|
|
3
|
-
import {
|
|
4
|
-
import { UISpawnModule } from
|
|
5
|
-
|
|
1
|
+
import { MathUtils } from "three";
|
|
2
|
+
import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
|
|
3
|
+
import { BUILTIN_OFFSET_POSITION_X, BUILTIN_OFFSET_POSITION_Y, resolveUIVector2Config, } from "../miscellaneous/miscellaneous.js";
|
|
4
|
+
import { UISpawnModule } from "./UISpawnModule.js";
|
|
6
5
|
/**
|
|
7
6
|
* Spawns particles at random positions within a rectangle.
|
|
8
7
|
*
|
|
9
8
|
* Position is chosen uniformly within the bounds defined by min and max.
|
|
10
9
|
*/
|
|
11
|
-
class UISpawnRectangle extends UISpawnModule {
|
|
10
|
+
export class UISpawnRectangle extends UISpawnModule {
|
|
12
11
|
/**
|
|
13
12
|
* @param min - Bottom-left corner of spawn area
|
|
14
13
|
* @param max - Top-right corner of spawn area
|
|
@@ -17,39 +16,39 @@ class UISpawnRectangle extends UISpawnModule {
|
|
|
17
16
|
super();
|
|
18
17
|
/** @internal */
|
|
19
18
|
this.requiredProperties = { builtin: "Matrix4" };
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
assertValidNumber(this.
|
|
23
|
-
assertValidNumber(this.
|
|
24
|
-
assertValidNumber(this.
|
|
25
|
-
assertValidNumber(this.
|
|
19
|
+
this.minInternal = resolveUIVector2Config(min);
|
|
20
|
+
this.maxInternal = resolveUIVector2Config(max);
|
|
21
|
+
assertValidNumber(this.minInternal.x, "UISpawnRectangle.constructor.min.x");
|
|
22
|
+
assertValidNumber(this.minInternal.y, "UISpawnRectangle.constructor.min.y");
|
|
23
|
+
assertValidNumber(this.maxInternal.x, "UISpawnRectangle.constructor.max.x");
|
|
24
|
+
assertValidNumber(this.maxInternal.y, "UISpawnRectangle.constructor.max.y");
|
|
26
25
|
}
|
|
27
26
|
/** Bottom-left corner of spawn area */
|
|
28
27
|
get min() {
|
|
29
|
-
return this.
|
|
28
|
+
return this.minInternal;
|
|
30
29
|
}
|
|
31
30
|
/** Top-right corner of spawn area */
|
|
32
31
|
get max() {
|
|
33
|
-
return this.
|
|
32
|
+
return this.maxInternal;
|
|
34
33
|
}
|
|
35
34
|
/** Bottom-left corner of spawn area */
|
|
36
35
|
set min(value) {
|
|
37
|
-
this.
|
|
38
|
-
assertValidNumber(this.
|
|
39
|
-
assertValidNumber(this.
|
|
36
|
+
this.minInternal = resolveUIVector2Config(value);
|
|
37
|
+
assertValidNumber(this.minInternal.x, "UISpawnRectangle.min.x");
|
|
38
|
+
assertValidNumber(this.minInternal.y, "UISpawnRectangle.min.y");
|
|
40
39
|
}
|
|
41
40
|
/** Top-right corner of spawn area */
|
|
42
41
|
set max(value) {
|
|
43
|
-
this.
|
|
44
|
-
assertValidNumber(this.
|
|
45
|
-
assertValidNumber(this.
|
|
42
|
+
this.maxInternal = resolveUIVector2Config(value);
|
|
43
|
+
assertValidNumber(this.maxInternal.x, "UISpawnRectangle.max.x");
|
|
44
|
+
assertValidNumber(this.maxInternal.y, "UISpawnRectangle.max.y");
|
|
46
45
|
}
|
|
47
46
|
/** @internal */
|
|
48
47
|
spawn(properties, instanceBegin, instanceEnd) {
|
|
49
48
|
const { builtin } = properties;
|
|
50
49
|
const { array, itemSize } = builtin;
|
|
51
|
-
const { x: minX, y: minY } = this.
|
|
52
|
-
const { x: maxX, y: maxY } = this.
|
|
50
|
+
const { x: minX, y: minY } = this.minInternal;
|
|
51
|
+
const { x: maxX, y: maxY } = this.maxInternal;
|
|
53
52
|
for (let i = instanceBegin; i < instanceEnd; i++) {
|
|
54
53
|
const itemOffset = i * itemSize;
|
|
55
54
|
array[itemOffset + BUILTIN_OFFSET_POSITION_X] = MathUtils.randFloat(minX, maxX);
|
|
@@ -58,5 +57,3 @@ class UISpawnRectangle extends UISpawnModule {
|
|
|
58
57
|
builtin.needsUpdate = true;
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
|
-
|
|
62
|
-
export { UISpawnRectangle };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "laymur",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Constraint-based UI library for Three.js mobile advertisements",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -21,11 +21,12 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"scripts": {
|
|
23
23
|
"clean": "rm -rf dist",
|
|
24
|
-
"build": "npm run clean &&
|
|
24
|
+
"build": "npm run clean && tsc -p tsconfig.json",
|
|
25
25
|
"prepublishOnly": "npm run build"
|
|
26
26
|
},
|
|
27
|
-
"main": "./dist/index.js",
|
|
28
|
-
"module": "./dist/index.js",
|
|
27
|
+
"main": "./dist/core/index.js",
|
|
28
|
+
"module": "./dist/core/index.js",
|
|
29
|
+
"types": "./dist/core/index.d.ts",
|
|
29
30
|
"files": [
|
|
30
31
|
"dist",
|
|
31
32
|
"README.md",
|
|
@@ -33,17 +34,18 @@
|
|
|
33
34
|
],
|
|
34
35
|
"exports": {
|
|
35
36
|
".": {
|
|
36
|
-
"
|
|
37
|
-
"
|
|
37
|
+
"types": "./dist/core/index.d.ts",
|
|
38
|
+
"import": "./dist/core/index.js"
|
|
38
39
|
},
|
|
39
40
|
"./particles": {
|
|
40
|
-
"
|
|
41
|
-
"
|
|
41
|
+
"types": "./dist/particles/index.d.ts",
|
|
42
|
+
"import": "./dist/particles/index.js"
|
|
42
43
|
},
|
|
43
44
|
"./debug": {
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
}
|
|
45
|
+
"types": "./dist/debug/index.d.ts",
|
|
46
|
+
"import": "./dist/debug/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./package.json": "./package.json"
|
|
47
49
|
},
|
|
48
50
|
"peerDependencies": {
|
|
49
51
|
"@lume/kiwi": "^0.4.4",
|
|
@@ -52,17 +54,11 @@
|
|
|
52
54
|
"three": ">=0.157.0 <0.180.0"
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {
|
|
55
|
-
"@rollup/plugin-commonjs": "^29.0.3",
|
|
56
|
-
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
57
57
|
"@types/node": "^25.0.2",
|
|
58
58
|
"@types/three": "^0.157.0",
|
|
59
59
|
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
|
60
60
|
"@typescript-eslint/parser": "^8.32.0",
|
|
61
61
|
"eslint": "^9.26.0",
|
|
62
|
-
"rollup": "^4.40.2",
|
|
63
|
-
"rollup-plugin-string": "^3.0.0",
|
|
64
|
-
"rollup-plugin-typescript2": "^0.36.0",
|
|
65
|
-
"ts-transformer-minify-privates": "^1.0.0",
|
|
66
62
|
"typescript": "^5.8.3"
|
|
67
63
|
}
|
|
68
64
|
}
|
package/dist/_virtual/2d.js
DELETED
package/dist/_virtual/3d.js
DELETED
package/dist/_virtual/4d.js
DELETED
package/dist/_virtual/mod.js
DELETED
package/dist/_virtual/mod2.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var source = "vec4 draw(){vec2 localUV=p_uv;float left=p_sliceBorders.x;float right=p_sliceBorders.y;float top=p_sliceBorders.z;float bottom=p_sliceBorders.w;float leftFill=p_sliceRegions.x;float rightFill=p_sliceRegions.y;float topFill=p_sliceRegions.z;float bottomFill=p_sliceRegions.w;float lB=leftFill;float rB=1.0-rightFill;float bB=bottomFill;float tB=1.0-topFill;{float regionL=step(p_uv.x,lB);float regionR=step(rB,p_uv.x);float regionM=1.0-regionL-regionR;float xL=(p_uv.x/lB)*left;float xR=1.0-right+((p_uv.x-rB)/rightFill)*right;float xM=left+((p_uv.x-lB)/(rB-lB))*(1.0-left-right);localUV.x=regionL*xL+regionM*xM+regionR*xR;}{float regionB=step(p_uv.y,bB);float regionT=step(tB,p_uv.y);float regionC=1.0-regionB-regionT;float yB=(p_uv.y/bB)*bottom;float yT=1.0-top+((p_uv.y-tB)/topFill)*top;float yC=bottom+((p_uv.y-bB)/(tB-bB))*(1.0-bottom-top);localUV.y=regionB*yB+regionC*yC+regionT*yT;}vec2 transformedUV=(p_textureTransform*vec3(localUV,1.0)).xy;return srgbTexture2D(p_texture,transformedUV)*p_color;}";
|
|
2
|
-
|
|
3
|
-
export { source as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var source = "float calculateMask(){float aspect=p_textureResolution.x/p_textureResolution.y;vec2 p=(p_uv-0.5)*vec2(aspect,1.0);float angle=atan(p.y,p.x);angle=(angle+PI)/(2.0*PI);float adjusted=angle-p_startAngle;adjusted=p_direction>0.0 ? adjusted :-adjusted;adjusted=fract(adjusted);return step(adjusted,p_progress);}";
|
|
2
|
-
|
|
3
|
-
export { source as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var source = "float calculateMask(){float aspect=p_textureResolution.x/p_textureResolution.y;vec2 halfExtents=vec2(aspect,1.0)*0.5;float maxProjection=dot(halfExtents,abs(p_direction));vec2 correctedUV=(p_uv-0.5)*vec2(aspect,1.0);float projection=dot(correctedUV,p_direction);float offset=(projection/maxProjection+1.0)*0.5;return step(offset,p_progress);}";
|
|
2
|
-
|
|
3
|
-
export { source as default };
|
package/dist/index.js
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export { UIConstraint2DBuilder } from './core/constraints/builders/UIConstraint2DBuilder.js';
|
|
2
|
-
export { UICoverConstraintBuilder } from './core/constraints/builders/UICoverConstraintBuilder.js';
|
|
3
|
-
export { UIFitConstraintBuilder } from './core/constraints/builders/UIFitConstraintBuilder.js';
|
|
4
|
-
export { UIAspectConstraint } from './core/constraints/UIAspectConstraint/UIAspectConstraint.js';
|
|
5
|
-
export { UICustomConstraint } from './core/constraints/UICustomConstraint.js';
|
|
6
|
-
export { UIHeightConstraint } from './core/constraints/UIHeightConstraint/UIHeightConstraint.js';
|
|
7
|
-
export { UIHorizontalDistanceConstraint } from './core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js';
|
|
8
|
-
export { UIHorizontalInterpolationConstraint } from './core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js';
|
|
9
|
-
export { UIHorizontalProportionConstraint } from './core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js';
|
|
10
|
-
export { UISingleParameterConstraint } from './core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js';
|
|
11
|
-
export { UIVerticalDistanceConstraint } from './core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js';
|
|
12
|
-
export { UIVerticalInterpolationConstraint } from './core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js';
|
|
13
|
-
export { UIVerticalProportionConstraint } from './core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js';
|
|
14
|
-
export { UIWidthConstraint } from './core/constraints/UIWidthConstraint/UIWidthConstraint.js';
|
|
15
|
-
export { UIAnchor } from './core/elements/UIAnchor/UIAnchor.js';
|
|
16
|
-
export { UIAnimatedImage } from './core/elements/UIAnimatedImage/UIAnimatedImage.js';
|
|
17
|
-
export { UIAnimatedImageLoopMode } from './core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js';
|
|
18
|
-
export { UIDummy } from './core/elements/UIDummy/UIDummy.js';
|
|
19
|
-
export { UIGraphics } from './core/elements/UIGraphics/UIGraphics.js';
|
|
20
|
-
export { UIImage } from './core/elements/UIImage/UIImage.js';
|
|
21
|
-
export { UINineSlice } from './core/elements/UINineSlice/UINineSlice.js';
|
|
22
|
-
export { UINineSliceRegionMode } from './core/elements/UINineSlice/UINineSlice.Internal.js';
|
|
23
|
-
export { UIProgress } from './core/elements/UIProgress/UIProgress.js';
|
|
24
|
-
export { UIScene } from './core/elements/UIScene/UIScene.js';
|
|
25
|
-
export { UISceneUpdateMode } from './core/elements/UIScene/UIScene.Internal.js';
|
|
26
|
-
export { UIText } from './core/elements/UIText/UIText.js';
|
|
27
|
-
export { UITextDirection, UITextResizeMode } from './core/elements/UIText/UIText.Internal.js';
|
|
28
|
-
export { UIFullscreenLayer } from './core/layers/UIFullscreenLayer/UIFullscreenLayer.js';
|
|
29
|
-
export { UILayer } from './core/layers/UILayer/UILayer.js';
|
|
30
|
-
export { UIAreaCircle } from './core/miscellaneous/area/UIAreaCircle.js';
|
|
31
|
-
export { UIAreaPolygon } from './core/miscellaneous/area/UIAreaPolygon.js';
|
|
32
|
-
export { UIAreaRectangle } from './core/miscellaneous/area/UIAreaRectangle.js';
|
|
33
|
-
export { UIAreaRoundedRectangle } from './core/miscellaneous/area/UIAreaRoundedRectangle.js';
|
|
34
|
-
export { UIColor } from './core/miscellaneous/color/UIColor.js';
|
|
35
|
-
export { UIProgressMaskFunctionCircular } from './core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js';
|
|
36
|
-
export { UIProgressMaskFunctionDirectional } from './core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js';
|
|
37
|
-
export { UIMicro } from './core/miscellaneous/micro/UIMicro.js';
|
|
38
|
-
export { UIMicroAnchorMode } from './core/miscellaneous/micro/UIMicro.Internal.js';
|
|
39
|
-
export { UIResizePolicyCover } from './core/miscellaneous/resize-policy/UIResizePolicyCover.js';
|
|
40
|
-
export { UIResizePolicyCross } from './core/miscellaneous/resize-policy/UIResizePolicyCross.js';
|
|
41
|
-
export { UIResizePolicyCrossInverted } from './core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js';
|
|
42
|
-
export { UIResizePolicyFit } from './core/miscellaneous/resize-policy/UIResizePolicyFit.js';
|
|
43
|
-
export { UIResizePolicyFixedHeight } from './core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js';
|
|
44
|
-
export { UIResizePolicyFixedWidth } from './core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js';
|
|
45
|
-
export { UIResizePolicyNone } from './core/miscellaneous/resize-policy/UIResizePolicyNone.js';
|
|
46
|
-
export { UIExpression } from './core/miscellaneous/UIExpression.js';
|
|
47
|
-
export { UIMode } from './core/miscellaneous/UIMode.js';
|
|
48
|
-
export { UIOrientation } from './core/miscellaneous/UIOrientation.js';
|
|
49
|
-
export { UIPriority } from './core/miscellaneous/UIPriority.js';
|
|
50
|
-
export { UIRelation } from './core/miscellaneous/UIRelation.js';
|
|
51
|
-
export { UITransparencyMode } from './core/miscellaneous/UITransparencyMode.js';
|
|
52
|
-
export { UIBlendMode } from './core/miscellaneous/UIBlendMode.js';
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { __exports as _2d } from '../../../_virtual/2d.js';
|
|
2
|
-
|
|
3
|
-
var hasRequired_2d;
|
|
4
|
-
|
|
5
|
-
function require_2d () {
|
|
6
|
-
if (hasRequired_2d) return _2d;
|
|
7
|
-
hasRequired_2d = 1;
|
|
8
|
-
/*
|
|
9
|
-
* Based on example code by Stefan Gustavson (stegu@itn.liu.se).
|
|
10
|
-
* Optimisations by Peter Eastman (peastman@drizzle.stanford.edu).
|
|
11
|
-
* Better rank ordering method by Stefan Gustavson in 2012.
|
|
12
|
-
*
|
|
13
|
-
* This code was placed in the public domain by its original author,
|
|
14
|
-
* Stefan Gustavson. You may use it as you see fit, but
|
|
15
|
-
* attribution is appreciated.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(_2d, "__esModule", { value: true });
|
|
18
|
-
_2d.makeNoise2D = void 0;
|
|
19
|
-
var G2 = (3.0 - Math.sqrt(3.0)) / 6.0;
|
|
20
|
-
var Grad = [
|
|
21
|
-
[1, 1],
|
|
22
|
-
[-1, 1],
|
|
23
|
-
[1, -1],
|
|
24
|
-
[-1, -1],
|
|
25
|
-
[1, 0],
|
|
26
|
-
[-1, 0],
|
|
27
|
-
[1, 0],
|
|
28
|
-
[-1, 0],
|
|
29
|
-
[0, 1],
|
|
30
|
-
[0, -1],
|
|
31
|
-
[0, 1],
|
|
32
|
-
[0, -1],
|
|
33
|
-
];
|
|
34
|
-
function makeNoise2D(random) {
|
|
35
|
-
if (random === void 0) { random = Math.random; }
|
|
36
|
-
var p = new Uint8Array(256);
|
|
37
|
-
for (var i = 0; i < 256; i++)
|
|
38
|
-
p[i] = i;
|
|
39
|
-
var n;
|
|
40
|
-
var q;
|
|
41
|
-
for (var i = 255; i > 0; i--) {
|
|
42
|
-
n = Math.floor((i + 1) * random());
|
|
43
|
-
q = p[i];
|
|
44
|
-
p[i] = p[n];
|
|
45
|
-
p[n] = q;
|
|
46
|
-
}
|
|
47
|
-
var perm = new Uint8Array(512);
|
|
48
|
-
var permMod12 = new Uint8Array(512);
|
|
49
|
-
for (var i = 0; i < 512; i++) {
|
|
50
|
-
perm[i] = p[i & 255];
|
|
51
|
-
permMod12[i] = perm[i] % 12;
|
|
52
|
-
}
|
|
53
|
-
return function (x, y) {
|
|
54
|
-
// Skew the input space to determine which simplex cell we're in
|
|
55
|
-
var s = (x + y) * 0.5 * (Math.sqrt(3.0) - 1.0); // Hairy factor for 2D
|
|
56
|
-
var i = Math.floor(x + s);
|
|
57
|
-
var j = Math.floor(y + s);
|
|
58
|
-
var t = (i + j) * G2;
|
|
59
|
-
var X0 = i - t; // Unskew the cell origin back to (x,y) space
|
|
60
|
-
var Y0 = j - t;
|
|
61
|
-
var x0 = x - X0; // The x,y distances from the cell origin
|
|
62
|
-
var y0 = y - Y0;
|
|
63
|
-
// Determine which simplex we are in.
|
|
64
|
-
var i1 = x0 > y0 ? 1 : 0;
|
|
65
|
-
var j1 = x0 > y0 ? 0 : 1;
|
|
66
|
-
// Offsets for corners
|
|
67
|
-
var x1 = x0 - i1 + G2;
|
|
68
|
-
var y1 = y0 - j1 + G2;
|
|
69
|
-
var x2 = x0 - 1.0 + 2.0 * G2;
|
|
70
|
-
var y2 = y0 - 1.0 + 2.0 * G2;
|
|
71
|
-
// Work out the hashed gradient indices of the three simplex corners
|
|
72
|
-
var ii = i & 255;
|
|
73
|
-
var jj = j & 255;
|
|
74
|
-
var g0 = Grad[permMod12[ii + perm[jj]]];
|
|
75
|
-
var g1 = Grad[permMod12[ii + i1 + perm[jj + j1]]];
|
|
76
|
-
var g2 = Grad[permMod12[ii + 1 + perm[jj + 1]]];
|
|
77
|
-
// Calculate the contribution from the three corners
|
|
78
|
-
var t0 = 0.5 - x0 * x0 - y0 * y0;
|
|
79
|
-
var n0 = t0 < 0 ? 0.0 : Math.pow(t0, 4) * (g0[0] * x0 + g0[1] * y0);
|
|
80
|
-
var t1 = 0.5 - x1 * x1 - y1 * y1;
|
|
81
|
-
var n1 = t1 < 0 ? 0.0 : Math.pow(t1, 4) * (g1[0] * x1 + g1[1] * y1);
|
|
82
|
-
var t2 = 0.5 - x2 * x2 - y2 * y2;
|
|
83
|
-
var n2 = t2 < 0 ? 0.0 : Math.pow(t2, 4) * (g2[0] * x2 + g2[1] * y2);
|
|
84
|
-
// Add contributions from each corner to get the final noise value.
|
|
85
|
-
// The result is scaled to return values in the interval [-1, 1]
|
|
86
|
-
return 70.14805770653952 * (n0 + n1 + n2);
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
_2d.makeNoise2D = makeNoise2D;
|
|
90
|
-
return _2d;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { require_2d as __require };
|