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,6 +1,6 @@
|
|
|
1
|
-
import type { UIVerticalInterpolationConstraint } from "../core";
|
|
2
|
-
import { UIColor } from "../core";
|
|
3
|
-
import type { UIConstraintDebug } from "./UIConstraintDebug";
|
|
1
|
+
import type { UIVerticalInterpolationConstraint } from "../core/index.js";
|
|
2
|
+
import { UIColor } from "../core/index.js";
|
|
3
|
+
import type { UIConstraintDebug } from "./UIConstraintDebug.js";
|
|
4
4
|
export declare class UIVerticalInterpolationDebug implements UIConstraintDebug {
|
|
5
5
|
readonly constraint: UIVerticalInterpolationConstraint;
|
|
6
6
|
readonly tint: UIColor;
|
|
@@ -1,51 +1,49 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Line2 } from
|
|
3
|
-
import { LineGeometry } from
|
|
4
|
-
import { LineMaterial } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class UIVerticalInterpolationDebug {
|
|
1
|
+
import { CanvasTexture, Object3D, Sprite, SpriteMaterial, Vector3 } from "three";
|
|
2
|
+
import { Line2 } from "three/addons/lines/Line2.js";
|
|
3
|
+
import { LineGeometry } from "three/addons/lines/LineGeometry.js";
|
|
4
|
+
import { LineMaterial } from "three/addons/lines/LineMaterial.js";
|
|
5
|
+
import { UIColor, UIOrientation } from "../core/index.js";
|
|
6
|
+
import { isUIPlaneElement } from "../core/miscellaneous/shared.js";
|
|
7
|
+
import { DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_FAMILY, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_SIZE, DEBUG_LINE_WIDTH, DEBUG_RENDER_ORDER, debugResolutionVector, } from "./miscellaneous.js";
|
|
8
|
+
export class UIVerticalInterpolationDebug {
|
|
11
9
|
constructor(constraint) {
|
|
12
10
|
this.constraint = constraint;
|
|
13
11
|
this.tint = new UIColor("cyan");
|
|
14
|
-
this.
|
|
15
|
-
this.
|
|
12
|
+
this.container = new Object3D();
|
|
13
|
+
this.baseLineMaterial = new LineMaterial({
|
|
16
14
|
linewidth: DEBUG_LINE_WIDTH,
|
|
17
15
|
transparent: true,
|
|
18
16
|
depthTest: false,
|
|
19
17
|
depthWrite: false,
|
|
20
18
|
});
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
19
|
+
this.baseLineGeometry = new LineGeometry();
|
|
20
|
+
this.baseLine = new Line2(this.baseLineGeometry, this.baseLineMaterial);
|
|
21
|
+
this.markerMaterial = new LineMaterial({
|
|
24
22
|
linewidth: DEBUG_LINE_WIDTH,
|
|
25
23
|
transparent: true,
|
|
26
24
|
depthTest: false,
|
|
27
25
|
depthWrite: false,
|
|
28
26
|
});
|
|
29
|
-
this.
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
27
|
+
this.markerGeometry = new LineGeometry();
|
|
28
|
+
this.markerLine = new Line2(this.markerGeometry, this.markerMaterial);
|
|
29
|
+
this.visibleInternal = true;
|
|
30
|
+
this.lastRenderedText = "";
|
|
31
|
+
this.onOrientationChanged = () => {
|
|
32
|
+
this.updateContainerVisibility();
|
|
35
33
|
};
|
|
36
|
-
this.
|
|
34
|
+
this.onRendering = (renderer) => {
|
|
37
35
|
const tintDirty = this.tint.dirty;
|
|
38
36
|
if (tintDirty) {
|
|
39
|
-
this.tint.toThreeColor(this.
|
|
40
|
-
this.
|
|
41
|
-
this.tint.toThreeColor(this.
|
|
42
|
-
this.
|
|
43
|
-
this.
|
|
37
|
+
this.tint.toThreeColor(this.baseLineMaterial.color);
|
|
38
|
+
this.baseLineMaterial.opacity = this.tint.a;
|
|
39
|
+
this.tint.toThreeColor(this.markerMaterial.color);
|
|
40
|
+
this.markerMaterial.opacity = this.tint.a;
|
|
41
|
+
this.spriteMaterial.opacity = this.tint.a;
|
|
44
42
|
this.tint.setDirtyFalse();
|
|
45
43
|
}
|
|
46
44
|
renderer.getDrawingBufferSize(debugResolutionVector);
|
|
47
|
-
this.
|
|
48
|
-
this.
|
|
45
|
+
this.baseLineMaterial.resolution.copy(debugResolutionVector);
|
|
46
|
+
this.markerMaterial.resolution.copy(debugResolutionVector);
|
|
49
47
|
const elementA = this.constraint.a;
|
|
50
48
|
const elementB = this.constraint.b;
|
|
51
49
|
const elementC = this.constraint.c;
|
|
@@ -61,85 +59,83 @@ class UIVerticalInterpolationDebug {
|
|
|
61
59
|
? elementC.y + elementC.height * this.constraint.anchorC
|
|
62
60
|
: elementC.y;
|
|
63
61
|
const midX = (anchorAX + anchorBX) / 2;
|
|
64
|
-
this.
|
|
62
|
+
this.baseLineGeometry.setFromPoints([
|
|
65
63
|
new Vector3(midX, anchorAY, 0),
|
|
66
64
|
new Vector3(midX, anchorBY, 0),
|
|
67
65
|
]);
|
|
68
66
|
const markerSize = 12;
|
|
69
|
-
this.
|
|
67
|
+
this.markerGeometry.setFromPoints([
|
|
70
68
|
new Vector3(midX - markerSize, anchorCY, 0),
|
|
71
69
|
new Vector3(midX + markerSize, anchorCY, 0),
|
|
72
70
|
]);
|
|
73
71
|
const nextText = "vi: " + this.constraint.t.toFixed(2);
|
|
74
|
-
if (nextText !== this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
77
|
-
this.
|
|
72
|
+
if (nextText !== this.lastRenderedText || tintDirty) {
|
|
73
|
+
this.drawText(nextText);
|
|
74
|
+
this.textTexture.needsUpdate = true;
|
|
75
|
+
this.lastRenderedText = nextText;
|
|
78
76
|
}
|
|
79
|
-
this.
|
|
77
|
+
this.textSprite.position.set(midX + 20, anchorCY, 0);
|
|
80
78
|
};
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
79
|
+
this.baseLine.renderOrder = DEBUG_RENDER_ORDER;
|
|
80
|
+
this.markerLine.renderOrder = DEBUG_RENDER_ORDER;
|
|
81
|
+
this.container.add(this.baseLine);
|
|
82
|
+
this.container.add(this.markerLine);
|
|
85
83
|
const canvas = document.createElement("canvas");
|
|
86
84
|
canvas.width = 256;
|
|
87
85
|
canvas.height = 64;
|
|
88
86
|
const context = canvas.getContext("2d");
|
|
89
87
|
if (context === null) {
|
|
90
|
-
throw new Error("
|
|
88
|
+
throw new Error("UIVerticalInterpolationDebug.constructor: failed to get 2D context for debug text");
|
|
91
89
|
}
|
|
92
|
-
this.
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
97
|
-
map: this.
|
|
90
|
+
this.canvas = canvas;
|
|
91
|
+
this.context = context;
|
|
92
|
+
this.drawText("");
|
|
93
|
+
this.textTexture = new CanvasTexture(canvas);
|
|
94
|
+
this.spriteMaterial = new SpriteMaterial({
|
|
95
|
+
map: this.textTexture,
|
|
98
96
|
transparent: true,
|
|
99
97
|
depthTest: false,
|
|
100
98
|
depthWrite: false,
|
|
101
99
|
});
|
|
102
|
-
this.
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
105
|
-
this.
|
|
106
|
-
this.constraint.layer.signalRendering.on(this.
|
|
107
|
-
this.constraint.layer.signalOrientationChanged.on(this.
|
|
108
|
-
this.constraint.layer.sceneWrapper.insertCustomObject(this.
|
|
109
|
-
this.
|
|
100
|
+
this.textSprite = new Sprite(this.spriteMaterial);
|
|
101
|
+
this.textSprite.renderOrder = DEBUG_RENDER_ORDER;
|
|
102
|
+
this.textSprite.scale.set(DEBUG_BADGE_SIZE, DEBUG_BADGE_SIZE * 0.25, 1);
|
|
103
|
+
this.container.add(this.textSprite);
|
|
104
|
+
this.constraint.layer.signalRendering.on(this.onRendering);
|
|
105
|
+
this.constraint.layer.signalOrientationChanged.on(this.onOrientationChanged);
|
|
106
|
+
this.constraint.layer.sceneWrapper.insertCustomObject(this.container);
|
|
107
|
+
this.updateContainerVisibility();
|
|
110
108
|
}
|
|
111
109
|
get visible() {
|
|
112
|
-
return this.
|
|
110
|
+
return this.visibleInternal;
|
|
113
111
|
}
|
|
114
112
|
set visible(value) {
|
|
115
|
-
if (value !== this.
|
|
116
|
-
this.
|
|
117
|
-
this.
|
|
113
|
+
if (value !== this.visibleInternal) {
|
|
114
|
+
this.visibleInternal = value;
|
|
115
|
+
this.updateContainerVisibility();
|
|
118
116
|
}
|
|
119
117
|
}
|
|
120
118
|
destroy() {
|
|
121
|
-
this.constraint.layer.signalRendering.off(this.
|
|
122
|
-
this.constraint.layer.signalOrientationChanged.off(this.
|
|
123
|
-
this.constraint.layer.sceneWrapper.removeCustomObject(this.
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
119
|
+
this.constraint.layer.signalRendering.off(this.onRendering);
|
|
120
|
+
this.constraint.layer.signalOrientationChanged.off(this.onOrientationChanged);
|
|
121
|
+
this.constraint.layer.sceneWrapper.removeCustomObject(this.container);
|
|
122
|
+
this.baseLineGeometry.dispose();
|
|
123
|
+
this.markerGeometry.dispose();
|
|
124
|
+
this.textTexture.dispose();
|
|
127
125
|
}
|
|
128
|
-
|
|
126
|
+
updateContainerVisibility() {
|
|
129
127
|
const orientationActive = this.constraint.orientation === UIOrientation.ALWAYS ||
|
|
130
128
|
this.constraint.orientation === this.constraint.layer.orientation;
|
|
131
|
-
this.
|
|
129
|
+
this.container.visible = this.visibleInternal && orientationActive;
|
|
132
130
|
}
|
|
133
|
-
|
|
134
|
-
this.
|
|
135
|
-
this.
|
|
136
|
-
this.
|
|
137
|
-
this.
|
|
138
|
-
this.
|
|
139
|
-
this.
|
|
140
|
-
this.
|
|
141
|
-
this.
|
|
131
|
+
drawText(text) {
|
|
132
|
+
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
133
|
+
this.context.fillStyle = DEBUG_BADGE_BACKGROUND_COLOR;
|
|
134
|
+
this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
|
|
135
|
+
this.context.fillStyle = this.tint.getHexStringRGB();
|
|
136
|
+
this.context.font = `${DEBUG_BADGE_FONT_SIZE}px ${DEBUG_BADGE_FONT_FAMILY}`;
|
|
137
|
+
this.context.textAlign = "center";
|
|
138
|
+
this.context.textBaseline = "middle";
|
|
139
|
+
this.context.fillText(text, this.canvas.width / 2, this.canvas.height / 2);
|
|
142
140
|
}
|
|
143
141
|
}
|
|
144
|
-
|
|
145
|
-
export { UIVerticalInterpolationDebug };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { UIWidthConstraint } from "../core";
|
|
2
|
-
import { UIColor } from "../core";
|
|
3
|
-
import type { UIConstraintDebug } from "./UIConstraintDebug";
|
|
1
|
+
import type { UIWidthConstraint } from "../core/index.js";
|
|
2
|
+
import { UIColor } from "../core/index.js";
|
|
3
|
+
import type { UIConstraintDebug } from "./UIConstraintDebug.js";
|
|
4
4
|
export declare class UIWidthDebug implements UIConstraintDebug {
|
|
5
5
|
readonly constraint: UIWidthConstraint;
|
|
6
6
|
readonly tint: UIColor;
|
|
@@ -1,111 +1,107 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Line2 } from
|
|
3
|
-
import { LineGeometry } from
|
|
4
|
-
import { LineMaterial } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class UIWidthDebug {
|
|
1
|
+
import { CanvasTexture, Object3D, Sprite, SpriteMaterial, Vector3 } from "three";
|
|
2
|
+
import { Line2 } from "three/addons/lines/Line2.js";
|
|
3
|
+
import { LineGeometry } from "three/addons/lines/LineGeometry.js";
|
|
4
|
+
import { LineMaterial } from "three/addons/lines/LineMaterial.js";
|
|
5
|
+
import { UIColor, UIOrientation } from "../core/index.js";
|
|
6
|
+
import { DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_FAMILY, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_SIZE, DEBUG_LINE_WIDTH, DEBUG_RENDER_ORDER, debugResolutionVector, } from "./miscellaneous.js";
|
|
7
|
+
export class UIWidthDebug {
|
|
10
8
|
constructor(constraint) {
|
|
11
9
|
this.constraint = constraint;
|
|
12
10
|
this.tint = new UIColor("cyan");
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
11
|
+
this.container = new Object3D();
|
|
12
|
+
this.lineMaterial = new LineMaterial({
|
|
15
13
|
linewidth: DEBUG_LINE_WIDTH,
|
|
16
14
|
transparent: true,
|
|
17
15
|
depthTest: false,
|
|
18
16
|
depthWrite: false,
|
|
19
17
|
});
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.
|
|
18
|
+
this.lineGeometry = new LineGeometry();
|
|
19
|
+
this.line = new Line2(this.lineGeometry, this.lineMaterial);
|
|
20
|
+
this.visibleInternal = true;
|
|
21
|
+
this.lastRenderedText = "";
|
|
22
|
+
this.onOrientationChanged = () => {
|
|
23
|
+
this.updateContainerVisibility();
|
|
26
24
|
};
|
|
27
|
-
this.
|
|
25
|
+
this.onRendering = (renderer) => {
|
|
28
26
|
const tintDirty = this.tint.dirty;
|
|
29
27
|
if (tintDirty) {
|
|
30
|
-
this.tint.toThreeColor(this.
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
28
|
+
this.tint.toThreeColor(this.lineMaterial.color);
|
|
29
|
+
this.lineMaterial.opacity = this.tint.a;
|
|
30
|
+
this.spriteMaterial.opacity = this.tint.a;
|
|
33
31
|
this.tint.setDirtyFalse();
|
|
34
32
|
}
|
|
35
33
|
renderer.getDrawingBufferSize(debugResolutionVector);
|
|
36
|
-
this.
|
|
34
|
+
this.lineMaterial.resolution.copy(debugResolutionVector);
|
|
37
35
|
const { x, y, oppositeX, width, centerX, centerY } = this.constraint.element;
|
|
38
36
|
if (width <= 0) {
|
|
39
37
|
return;
|
|
40
38
|
}
|
|
41
|
-
this.
|
|
39
|
+
this.lineGeometry.setFromPoints([new Vector3(x, y, 0), new Vector3(oppositeX, y, 0)]);
|
|
42
40
|
const nextText = "W: " + width.toFixed(0);
|
|
43
|
-
if (nextText !== this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
46
|
-
this.
|
|
41
|
+
if (nextText !== this.lastRenderedText || tintDirty) {
|
|
42
|
+
this.drawText(nextText);
|
|
43
|
+
this.textTexture.needsUpdate = true;
|
|
44
|
+
this.lastRenderedText = nextText;
|
|
47
45
|
}
|
|
48
|
-
this.
|
|
46
|
+
this.textSprite.position.set(centerX, centerY - 20, 0);
|
|
49
47
|
};
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
48
|
+
this.line.renderOrder = DEBUG_RENDER_ORDER;
|
|
49
|
+
this.container.add(this.line);
|
|
52
50
|
const canvas = document.createElement("canvas");
|
|
53
51
|
canvas.width = 256;
|
|
54
52
|
canvas.height = 64;
|
|
55
53
|
const context = canvas.getContext("2d");
|
|
56
54
|
if (context === null) {
|
|
57
|
-
throw new Error("
|
|
55
|
+
throw new Error("UIWidthDebug.constructor: failed to get 2D context for debug text");
|
|
58
56
|
}
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
61
|
-
this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
64
|
-
map: this.
|
|
57
|
+
this.canvas = canvas;
|
|
58
|
+
this.context = context;
|
|
59
|
+
this.drawText("");
|
|
60
|
+
this.textTexture = new CanvasTexture(canvas);
|
|
61
|
+
this.spriteMaterial = new SpriteMaterial({
|
|
62
|
+
map: this.textTexture,
|
|
65
63
|
transparent: true,
|
|
66
64
|
depthTest: false,
|
|
67
65
|
depthWrite: false,
|
|
68
66
|
});
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
73
|
-
this.constraint.layer.signalRendering.on(this.
|
|
74
|
-
this.constraint.layer.signalOrientationChanged.on(this.
|
|
75
|
-
this.constraint.layer.sceneWrapper.insertCustomObject(this.
|
|
76
|
-
this.
|
|
67
|
+
this.textSprite = new Sprite(this.spriteMaterial);
|
|
68
|
+
this.textSprite.renderOrder = DEBUG_RENDER_ORDER;
|
|
69
|
+
this.textSprite.scale.set(DEBUG_BADGE_SIZE, DEBUG_BADGE_SIZE * 0.25, 1);
|
|
70
|
+
this.container.add(this.textSprite);
|
|
71
|
+
this.constraint.layer.signalRendering.on(this.onRendering);
|
|
72
|
+
this.constraint.layer.signalOrientationChanged.on(this.onOrientationChanged);
|
|
73
|
+
this.constraint.layer.sceneWrapper.insertCustomObject(this.container);
|
|
74
|
+
this.updateContainerVisibility();
|
|
77
75
|
}
|
|
78
76
|
get visible() {
|
|
79
|
-
return this.
|
|
77
|
+
return this.visibleInternal;
|
|
80
78
|
}
|
|
81
79
|
set visible(value) {
|
|
82
|
-
if (value !== this.
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
80
|
+
if (value !== this.visibleInternal) {
|
|
81
|
+
this.visibleInternal = value;
|
|
82
|
+
this.updateContainerVisibility();
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
85
|
destroy() {
|
|
88
|
-
this.constraint.layer.signalRendering.off(this.
|
|
89
|
-
this.constraint.layer.signalOrientationChanged.off(this.
|
|
90
|
-
this.constraint.layer.sceneWrapper.removeCustomObject(this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
86
|
+
this.constraint.layer.signalRendering.off(this.onRendering);
|
|
87
|
+
this.constraint.layer.signalOrientationChanged.off(this.onOrientationChanged);
|
|
88
|
+
this.constraint.layer.sceneWrapper.removeCustomObject(this.container);
|
|
89
|
+
this.lineGeometry.dispose();
|
|
90
|
+
this.textTexture.dispose();
|
|
93
91
|
}
|
|
94
|
-
|
|
92
|
+
updateContainerVisibility() {
|
|
95
93
|
const orientationActive = this.constraint.orientation === UIOrientation.ALWAYS ||
|
|
96
94
|
this.constraint.orientation === this.constraint.layer.orientation;
|
|
97
|
-
this.
|
|
95
|
+
this.container.visible = this.visibleInternal && orientationActive;
|
|
98
96
|
}
|
|
99
|
-
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
103
|
-
this.
|
|
104
|
-
this.
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
97
|
+
drawText(text) {
|
|
98
|
+
this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);
|
|
99
|
+
this.context.fillStyle = DEBUG_BADGE_BACKGROUND_COLOR;
|
|
100
|
+
this.context.fillRect(0, 0, this.canvas.width, this.canvas.height);
|
|
101
|
+
this.context.fillStyle = this.tint.getHexStringRGB();
|
|
102
|
+
this.context.font = `${DEBUG_BADGE_FONT_SIZE}px ${DEBUG_BADGE_FONT_FAMILY}`;
|
|
103
|
+
this.context.textAlign = "center";
|
|
104
|
+
this.context.textBaseline = "middle";
|
|
105
|
+
this.context.fillText(text, this.canvas.width / 2, this.canvas.height / 2);
|
|
108
106
|
}
|
|
109
107
|
}
|
|
110
|
-
|
|
111
|
-
export { UIWidthDebug };
|
package/dist/debug/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { UIAspectDebug } from "./UIAspectDebug";
|
|
2
|
-
export { UIHeightDebug } from "./UIHeightDebug";
|
|
3
|
-
export { UIHorizontalDistanceDebug } from "./UIHorizontalDistanceDebug";
|
|
4
|
-
export { UIHorizontalInterpolationDebug } from "./UIHorizontalInterpolationDebug";
|
|
5
|
-
export { UILayerDebug } from "./UILayerDebug";
|
|
6
|
-
export { UIVerticalDistanceDebug } from "./UIVerticalDistanceDebug";
|
|
7
|
-
export { UIVerticalInterpolationDebug } from "./UIVerticalInterpolationDebug";
|
|
8
|
-
export { UIWidthDebug } from "./UIWidthDebug";
|
|
1
|
+
export { UIAspectDebug } from "./UIAspectDebug.js";
|
|
2
|
+
export { UIHeightDebug } from "./UIHeightDebug.js";
|
|
3
|
+
export { UIHorizontalDistanceDebug } from "./UIHorizontalDistanceDebug.js";
|
|
4
|
+
export { UIHorizontalInterpolationDebug } from "./UIHorizontalInterpolationDebug.js";
|
|
5
|
+
export { UILayerDebug } from "./UILayerDebug.js";
|
|
6
|
+
export { UIVerticalDistanceDebug } from "./UIVerticalDistanceDebug.js";
|
|
7
|
+
export { UIVerticalInterpolationDebug } from "./UIVerticalInterpolationDebug.js";
|
|
8
|
+
export { UIWidthDebug } from "./UIWidthDebug.js";
|
package/dist/debug/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { UIAspectDebug } from
|
|
2
|
-
export { UIHeightDebug } from
|
|
3
|
-
export { UIHorizontalDistanceDebug } from
|
|
4
|
-
export { UIHorizontalInterpolationDebug } from
|
|
5
|
-
export { UILayerDebug } from
|
|
6
|
-
export { UIVerticalDistanceDebug } from
|
|
7
|
-
export { UIVerticalInterpolationDebug } from
|
|
8
|
-
export { UIWidthDebug } from
|
|
1
|
+
export { UIAspectDebug } from "./UIAspectDebug.js";
|
|
2
|
+
export { UIHeightDebug } from "./UIHeightDebug.js";
|
|
3
|
+
export { UIHorizontalDistanceDebug } from "./UIHorizontalDistanceDebug.js";
|
|
4
|
+
export { UIHorizontalInterpolationDebug } from "./UIHorizontalInterpolationDebug.js";
|
|
5
|
+
export { UILayerDebug } from "./UILayerDebug.js";
|
|
6
|
+
export { UIVerticalDistanceDebug } from "./UIVerticalDistanceDebug.js";
|
|
7
|
+
export { UIVerticalInterpolationDebug } from "./UIVerticalInterpolationDebug.js";
|
|
8
|
+
export { UIWidthDebug } from "./UIWidthDebug.js";
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { Vector2 } from
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const debugResolutionVector = new Vector2();
|
|
10
|
-
|
|
11
|
-
export { DEBUG_BADGE_BACKGROUND_COLOR, DEBUG_BADGE_FONT_FAMILY, DEBUG_BADGE_FONT_SIZE, DEBUG_BADGE_SIZE, DEBUG_LINE_WIDTH, DEBUG_RENDER_ORDER, debugResolutionVector };
|
|
1
|
+
import { Vector2 } from "three";
|
|
2
|
+
export const DEBUG_RENDER_ORDER = 8192;
|
|
3
|
+
export const DEBUG_LINE_WIDTH = 2;
|
|
4
|
+
export const DEBUG_BADGE_SIZE = 150;
|
|
5
|
+
export const DEBUG_BADGE_FONT_SIZE = 30;
|
|
6
|
+
export const DEBUG_BADGE_FONT_FAMILY = "monospace";
|
|
7
|
+
export const DEBUG_BADGE_BACKGROUND_COLOR = "rgba(0, 0, 0, 0.8)";
|
|
8
|
+
export const debugResolutionVector = new Vector2();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Vector2Like } from "../../core/miscellaneous/math";
|
|
2
|
-
import type { UIVector2Config } from "../miscellaneous/miscellaneous";
|
|
3
|
-
import { UIBehaviorModule } from "./UIBehaviorModule";
|
|
1
|
+
import type { Vector2Like } from "../../core/miscellaneous/math.js";
|
|
2
|
+
import type { UIVector2Config } from "../miscellaneous/miscellaneous.js";
|
|
3
|
+
import { UIBehaviorModule } from "./UIBehaviorModule.js";
|
|
4
4
|
/**
|
|
5
5
|
* Applies constant acceleration to all particles.
|
|
6
6
|
*
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { assertValidNumber } from
|
|
2
|
-
import {
|
|
3
|
-
import { UIBehaviorModule } from
|
|
4
|
-
|
|
1
|
+
import { assertValidNumber } from "../../core/miscellaneous/asserts.js";
|
|
2
|
+
import { BUILTIN_OFFSET_VELOCITY_X, BUILTIN_OFFSET_VELOCITY_Y, resolveUIVector2Config, } from "../miscellaneous/miscellaneous.js";
|
|
3
|
+
import { UIBehaviorModule } from "./UIBehaviorModule.js";
|
|
5
4
|
/**
|
|
6
5
|
* Applies constant acceleration to all particles.
|
|
7
6
|
*
|
|
8
7
|
* Adds the direction vector to particle velocity each frame.
|
|
9
8
|
*/
|
|
10
|
-
class UIBehaviorDirectionalGravity extends UIBehaviorModule {
|
|
9
|
+
export class UIBehaviorDirectionalGravity extends UIBehaviorModule {
|
|
11
10
|
/**
|
|
12
11
|
* @param direction - Acceleration vector in units/second^2
|
|
13
12
|
*/
|
|
@@ -15,26 +14,26 @@ class UIBehaviorDirectionalGravity extends UIBehaviorModule {
|
|
|
15
14
|
super();
|
|
16
15
|
/** @internal */
|
|
17
16
|
this.requiredProperties = { builtin: "Matrix4" };
|
|
18
|
-
this.
|
|
19
|
-
assertValidNumber(this.
|
|
20
|
-
assertValidNumber(this.
|
|
17
|
+
this.directionInternal = resolveUIVector2Config(direction);
|
|
18
|
+
assertValidNumber(this.directionInternal.x, "UIBehaviorDirectionalGravity.constructor.direction.x");
|
|
19
|
+
assertValidNumber(this.directionInternal.y, "UIBehaviorDirectionalGravity.constructor.direction.y");
|
|
21
20
|
}
|
|
22
21
|
/** Acceleration vector in units/second^2 */
|
|
23
22
|
get direction() {
|
|
24
|
-
return this.
|
|
23
|
+
return this.directionInternal;
|
|
25
24
|
}
|
|
26
25
|
/** Acceleration vector in units/second^2 */
|
|
27
26
|
set direction(value) {
|
|
28
|
-
this.
|
|
29
|
-
assertValidNumber(this.
|
|
30
|
-
assertValidNumber(this.
|
|
27
|
+
this.directionInternal = resolveUIVector2Config(value);
|
|
28
|
+
assertValidNumber(this.directionInternal.x, "UIBehaviorDirectionalGravity.direction.x");
|
|
29
|
+
assertValidNumber(this.directionInternal.y, "UIBehaviorDirectionalGravity.direction.y");
|
|
31
30
|
}
|
|
32
31
|
/** @internal */
|
|
33
32
|
update(properties, instanceCount, deltaTime) {
|
|
34
33
|
const { builtin } = properties;
|
|
35
34
|
const { array, itemSize } = builtin;
|
|
36
|
-
const offsetX = this.
|
|
37
|
-
const offsetY = this.
|
|
35
|
+
const offsetX = this.directionInternal.x * deltaTime;
|
|
36
|
+
const offsetY = this.directionInternal.y * deltaTime;
|
|
38
37
|
for (let i = 0; i < instanceCount; i++) {
|
|
39
38
|
const itemOffset = i * itemSize;
|
|
40
39
|
array[itemOffset + BUILTIN_OFFSET_VELOCITY_X] += offsetX;
|
|
@@ -43,5 +42,3 @@ class UIBehaviorDirectionalGravity extends UIBehaviorModule {
|
|
|
43
42
|
builtin.needsUpdate = true;
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
|
|
47
|
-
export { UIBehaviorDirectionalGravity };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InstancedBufferAttribute } from "three";
|
|
2
|
-
import type { UIPropertyName } from "../../core/miscellaneous/generic-plane/shared";
|
|
2
|
+
import type { UIPropertyName } from "../../core/miscellaneous/generic-plane/shared.js";
|
|
3
3
|
/**
|
|
4
4
|
* Base class for particle behavior modules.
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Vector2Like } from "../../core/miscellaneous/math";
|
|
2
|
-
import { type UIRange, type UIRangeConfig, type UIVector2Config } from "../miscellaneous/miscellaneous";
|
|
3
|
-
import { UIBehaviorModule } from "./UIBehaviorModule";
|
|
1
|
+
import type { Vector2Like } from "../../core/miscellaneous/math.js";
|
|
2
|
+
import { type UIRange, type UIRangeConfig, type UIVector2Config } from "../miscellaneous/miscellaneous.js";
|
|
3
|
+
import { UIBehaviorModule } from "./UIBehaviorModule.js";
|
|
4
4
|
/**
|
|
5
5
|
* Applies gravity attraction toward a point.
|
|
6
6
|
*
|