laymur 0.23.0 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.d.ts +3 -3
- package/dist/core/constraints/UIAspectConstraint/UIAspectConstraint.js +14 -16
- package/dist/core/constraints/UIConstraint.d.ts +22 -2
- package/dist/core/constraints/UIConstraint.js +26 -3
- package/dist/core/constraints/UICustomConstraint.d.ts +4 -4
- package/dist/core/constraints/UICustomConstraint.js +15 -15
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHeightConstraint/UIHeightConstraint.js +11 -13
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.Internal.js +1 -3
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js +30 -30
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.Internal.js +2 -4
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js +40 -39
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.d.ts +3 -3
- package/dist/core/constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js +13 -15
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.d.ts +3 -3
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.Internal.js +1 -0
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.d.ts +13 -7
- package/dist/core/constraints/UISingleParameterConstraint/UISingleParameterConstraint.js +37 -30
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.Internal.js +1 -3
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js +30 -30
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.Internal.js +2 -4
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js +40 -39
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.d.ts +3 -3
- package/dist/core/constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js +13 -15
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.d.ts +1 -1
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.Internal.js +1 -0
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.d.ts +3 -3
- package/dist/core/constraints/UIWidthConstraint/UIWidthConstraint.js +11 -13
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.d.ts +3 -3
- package/dist/core/constraints/builders/UIConstraint2DBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UIConstraint2DBuilder.d.ts +11 -11
- package/dist/core/constraints/builders/UIConstraint2DBuilder.js +10 -13
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.d.ts +1 -1
- package/dist/core/constraints/builders/UICoverConstraintBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UICoverConstraintBuilder.d.ts +7 -7
- package/dist/core/constraints/builders/UICoverConstraintBuilder.js +10 -13
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.d.ts +1 -1
- package/dist/core/constraints/builders/UIFitConstraintBuilder.Internal.js +1 -3
- package/dist/core/constraints/builders/UIFitConstraintBuilder.d.ts +7 -7
- package/dist/core/constraints/builders/UIFitConstraintBuilder.js +10 -13
- package/dist/core/elements/UIAnchor/UIAnchor.Internal.js +3 -5
- package/dist/core/elements/UIAnchor/UIAnchor.d.ts +23 -5
- package/dist/core/elements/UIAnchor/UIAnchor.js +42 -8
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.d.ts +2 -2
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.Internal.js +4 -6
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.d.ts +10 -10
- package/dist/core/elements/UIAnimatedImage/UIAnimatedImage.js +108 -111
- package/dist/core/elements/UIDummy/UIDummy.Internal.d.ts +4 -4
- package/dist/core/elements/UIDummy/UIDummy.Internal.js +5 -8
- package/dist/core/elements/UIDummy/UIDummy.d.ts +19 -11
- package/dist/core/elements/UIDummy/UIDummy.js +59 -42
- package/dist/core/elements/UIElement/UIElement.Internal.d.ts +5 -5
- package/dist/core/elements/UIElement/UIElement.Internal.js +9 -12
- package/dist/core/elements/UIElement/UIElement.d.ts +11 -11
- package/dist/core/elements/UIElement/UIElement.js +57 -60
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.d.ts +3 -3
- package/dist/core/elements/UIGraphics/UIGraphics.Internal.js +4 -7
- package/dist/core/elements/UIGraphics/UIGraphics.d.ts +7 -7
- package/dist/core/elements/UIGraphics/UIGraphics.js +44 -47
- package/dist/core/elements/UIImage/UIImage.Internal.d.ts +2 -2
- package/dist/core/elements/UIImage/UIImage.Internal.js +1 -0
- package/dist/core/elements/UIImage/UIImage.d.ts +9 -9
- package/dist/core/elements/UIImage/UIImage.js +21 -24
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.d.ts +3 -3
- package/dist/core/elements/UINineSlice/UINineSlice.Internal.js +3 -5
- package/dist/core/elements/UINineSlice/UINineSlice.d.ts +12 -12
- package/dist/core/elements/UINineSlice/UINineSlice.js +71 -73
- package/dist/core/elements/UIProgress/UIProgress.Internal.d.ts +3 -4
- package/dist/core/elements/UIProgress/UIProgress.Internal.js +1 -3
- package/dist/core/elements/UIProgress/UIProgress.d.ts +10 -10
- package/dist/core/elements/UIProgress/UIProgress.js +59 -62
- package/dist/core/elements/UIScene/UIScene.Internal.d.ts +3 -3
- package/dist/core/elements/UIScene/UIScene.Internal.js +11 -14
- package/dist/core/elements/UIScene/UIScene.d.ts +8 -8
- package/dist/core/elements/UIScene/UIScene.js +68 -69
- package/dist/core/elements/UIText/UIText.Bidi.d.ts +2 -2
- package/dist/core/elements/UIText/UIText.Bidi.js +3 -5
- package/dist/core/elements/UIText/UIText.Interfaces.d.ts +6 -2
- package/dist/core/elements/UIText/UIText.Interfaces.js +1 -0
- package/dist/core/elements/UIText/UIText.Internal.d.ts +4 -4
- package/dist/core/elements/UIText/UIText.Internal.js +5 -7
- package/dist/core/elements/UIText/UIText.Measuring.d.ts +14 -7
- package/dist/core/elements/UIText/UIText.Measuring.js +115 -55
- package/dist/core/elements/UIText/UIText.Rendering.d.ts +3 -3
- package/dist/core/elements/UIText/UIText.Rendering.js +6 -9
- package/dist/core/elements/UIText/UIText.d.ts +28 -14
- package/dist/core/elements/UIText/UIText.js +181 -141
- package/dist/core/index.d.ts +55 -54
- package/dist/core/index.js +53 -0
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.d.ts +4 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js +2 -5
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.d.ts +4 -4
- package/dist/core/layers/UIFullscreenLayer/UIFullscreenLayer.js +43 -42
- package/dist/core/layers/UILayer/UILayer.Internal.d.ts +2 -2
- package/dist/core/layers/UILayer/UILayer.Internal.js +4 -7
- package/dist/core/layers/UILayer/UILayer.d.ts +19 -4
- package/dist/core/layers/UILayer/UILayer.js +125 -62
- package/dist/core/miscellaneous/UIBlendMode.js +1 -3
- package/dist/core/miscellaneous/UIExpression.js +16 -19
- package/dist/core/miscellaneous/UIMode.js +3 -5
- package/dist/core/miscellaneous/UIOrientation.js +2 -4
- package/dist/core/miscellaneous/UIPriority.js +5 -8
- package/dist/core/miscellaneous/UIRelation.js +5 -8
- package/dist/core/miscellaneous/UITransparencyMode.js +1 -3
- package/dist/core/miscellaneous/area/UIArea.js +1 -3
- package/dist/core/miscellaneous/area/UIAreaCircle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaCircle.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaPolygon.d.ts +2 -2
- package/dist/core/miscellaneous/area/UIAreaPolygon.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaRectangle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaRectangle.js +3 -6
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.d.ts +1 -1
- package/dist/core/miscellaneous/area/UIAreaRoundedRectangle.js +3 -6
- package/dist/core/miscellaneous/asserts.d.ts +30 -1
- package/dist/core/miscellaneous/asserts.js +87 -19
- package/dist/core/miscellaneous/canvas.js +13 -7
- package/dist/core/miscellaneous/color/UIColor.Internal.d.ts +1 -1
- package/dist/core/miscellaneous/color/UIColor.Internal.js +1 -3
- package/dist/core/miscellaneous/color/UIColor.d.ts +1 -1
- package/dist/core/miscellaneous/color/UIColor.js +202 -205
- package/dist/core/miscellaneous/computeTransform.d.ts +1 -1
- package/dist/core/miscellaneous/computeTransform.js +4 -7
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.d.ts +10 -5
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Internal.js +63 -58
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.d.ts +52 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.Layout.js +110 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericInstancedPlane/UIGenericInstancedPlane.js +181 -261
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.d.ts +3 -3
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.Internal.js +1 -0
- package/dist/core/miscellaneous/generic-plane/UIGenericPlaneRegistry/UIGenericPlaneRegistry.js +209 -115
- package/dist/core/miscellaneous/generic-plane/shared.d.ts +12 -12
- package/dist/core/miscellaneous/generic-plane/shared.js +28 -23
- package/dist/core/miscellaneous/insets/UIInsets.Internal.js +1 -3
- package/dist/core/miscellaneous/insets/UIInsets.d.ts +1 -1
- package/dist/core/miscellaneous/insets/UIInsets.js +96 -99
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunction.js +1 -3
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.d.ts +1 -1
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionCircular.js +14 -17
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.d.ts +2 -2
- package/dist/core/miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js +13 -16
- package/dist/core/miscellaneous/math.js +3 -5
- package/dist/core/miscellaneous/micro/UIMicro.Internal.js +6 -8
- package/dist/core/miscellaneous/micro/UIMicro.d.ts +1 -1
- package/dist/core/miscellaneous/micro/UIMicro.js +91 -94
- package/dist/core/miscellaneous/resize-policy/UIResizePolicy.js +1 -3
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCover.js +12 -15
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCross.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyCrossInverted.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFit.js +12 -15
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedHeight.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyFixedWidth.js +13 -16
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.d.ts +1 -1
- package/dist/core/miscellaneous/resize-policy/UIResizePolicyNone.js +3 -6
- package/dist/core/miscellaneous/shared.d.ts +1 -1
- package/dist/core/miscellaneous/shared.js +4 -7
- package/dist/core/miscellaneous/text-span/UITextSpan.Internal.d.ts +1 -1
- package/dist/core/miscellaneous/text-span/UITextSpan.Internal.js +1 -0
- package/dist/core/miscellaneous/text-span/UITextSpan.d.ts +2 -2
- package/dist/core/miscellaneous/text-span/UITextSpan.js +10 -13
- package/dist/core/miscellaneous/text-style/UITextStyle.Internal.js +15 -17
- package/dist/core/miscellaneous/text-style/UITextStyle.d.ts +13 -2
- package/dist/core/miscellaneous/text-style/UITextStyle.js +222 -207
- package/dist/core/miscellaneous/texture/UITextureView.Internal.d.ts +7 -0
- package/dist/core/miscellaneous/texture/UITextureView.Internal.js +16 -6
- package/dist/core/miscellaneous/texture/UITextureView.d.ts +1 -1
- package/dist/core/miscellaneous/texture/UITextureView.js +113 -117
- package/dist/core/miscellaneous/webglCapabilities.js +3 -4
- package/dist/core/shaders/UIImage.d.ts +9 -0
- package/dist/core/shaders/UIImage.js +14 -0
- package/dist/core/shaders/UINineSlice.d.ts +11 -0
- package/dist/core/shaders/UINineSlice.js +57 -0
- package/dist/core/shaders/UIProgress.d.ts +14 -0
- package/dist/core/shaders/UIProgress.js +21 -0
- package/dist/core/shaders/UIProgressMaskFunctionCircular.d.ts +2 -0
- package/dist/core/shaders/UIProgressMaskFunctionCircular.js +16 -0
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.d.ts +2 -0
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.js +15 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.d.ts +4 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.d.ts +7 -1
- package/dist/core/wrappers/UIInputWrapper/UIInputWrapper.js +50 -47
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.d.ts +5 -2
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.d.ts +11 -3
- package/dist/core/wrappers/UISceneWrapper/UISceneWrapper.js +42 -26
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.d.ts +5 -3
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.Internal.js +1 -0
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.d.ts +20 -4
- package/dist/core/wrappers/UISolverWrapper/UISolverWrapper.js +138 -117
- package/dist/debug/UIAspectDebug.d.ts +3 -3
- package/dist/debug/UIAspectDebug.js +64 -68
- package/dist/debug/UIConstraintDebug.d.ts +1 -1
- package/dist/debug/UIConstraintDebug.js +1 -0
- package/dist/debug/UIHeightDebug.d.ts +3 -3
- package/dist/debug/UIHeightDebug.js +63 -67
- package/dist/debug/UIHorizontalDistanceDebug.d.ts +3 -3
- package/dist/debug/UIHorizontalDistanceDebug.js +76 -81
- package/dist/debug/UIHorizontalInterpolationDebug.d.ts +3 -3
- package/dist/debug/UIHorizontalInterpolationDebug.js +74 -78
- package/dist/debug/UILayerDebug.d.ts +1 -1
- package/dist/debug/UILayerDebug.js +55 -64
- package/dist/debug/UIVerticalDistanceDebug.d.ts +3 -3
- package/dist/debug/UIVerticalDistanceDebug.js +76 -81
- package/dist/debug/UIVerticalInterpolationDebug.d.ts +3 -3
- package/dist/debug/UIVerticalInterpolationDebug.js +74 -78
- package/dist/debug/UIWidthDebug.d.ts +3 -3
- package/dist/debug/UIWidthDebug.js +63 -67
- package/dist/debug/index.d.ts +8 -8
- package/dist/debug/index.js +8 -8
- package/dist/debug/miscellaneous.js +8 -11
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.d.ts +3 -3
- package/dist/particles/behaviorModules/UIBehaviorDirectionalGravity.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorModule.d.ts +1 -1
- package/dist/particles/behaviorModules/UIBehaviorModule.js +1 -3
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.d.ts +3 -3
- package/dist/particles/behaviorModules/UIBehaviorPointGravity.js +37 -40
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.d.ts +41 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOscillation.js +87 -0
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorScaleOverLife.js +17 -20
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueDamping.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorTorqueNoise.js +21 -24
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityDamping.js +13 -16
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.d.ts +2 -2
- package/dist/particles/behaviorModules/UIBehaviorVelocityNoise.js +21 -24
- package/dist/particles/elements/UIEmitter.Internal.d.ts +2 -2
- package/dist/particles/elements/UIEmitter.Internal.js +6 -9
- package/dist/particles/elements/UIEmitter.d.ts +17 -11
- package/dist/particles/elements/UIEmitter.js +100 -88
- package/dist/particles/index.d.ts +20 -18
- package/dist/particles/index.js +19 -18
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.d.ts +1 -1
- package/dist/particles/instancedParticle/UIInstancedParticle.Internal.js +14 -15
- package/dist/particles/instancedParticle/UIInstancedParticle.d.ts +4 -1
- package/dist/particles/instancedParticle/UIInstancedParticle.js +40 -32
- package/dist/particles/miscellaneous/miscellaneous.d.ts +3 -3
- package/dist/particles/miscellaneous/miscellaneous.js +26 -27
- package/dist/particles/renderingModules/UIRenderingColorOverLife.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingColorOverLife.js +5 -8
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingColorOverVelocity.js +6 -9
- package/dist/particles/renderingModules/UIRenderingModule.js +1 -3
- package/dist/particles/renderingModules/UIRenderingTexture.d.ts +2 -2
- package/dist/particles/renderingModules/UIRenderingTexture.js +4 -7
- package/dist/particles/shaders/UIRenderingColorOverLife.d.ts +2 -0
- package/dist/particles/shaders/UIRenderingColorOverLife.js +7 -0
- package/dist/particles/shaders/UIRenderingColorOverVelocity.d.ts +9 -0
- package/dist/particles/shaders/UIRenderingColorOverVelocity.js +16 -0
- package/dist/particles/shaders/UIRenderingTexture.d.ts +2 -0
- package/dist/particles/shaders/UIRenderingTexture.js +7 -0
- package/dist/particles/spawnModules/UISpawnModule.d.ts +1 -1
- package/dist/particles/spawnModules/UISpawnModule.js +1 -3
- package/dist/particles/spawnModules/UISpawnOffset.d.ts +3 -3
- package/dist/particles/spawnModules/UISpawnOffset.js +12 -15
- package/dist/particles/spawnModules/UISpawnRandomLifetime.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomLifetime.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomRotation.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomRotation.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomScale.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomScale.js +19 -22
- package/dist/particles/spawnModules/UISpawnRandomTorque.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomTorque.js +13 -16
- package/dist/particles/spawnModules/UISpawnRandomVelocity.d.ts +2 -2
- package/dist/particles/spawnModules/UISpawnRandomVelocity.js +21 -24
- package/dist/particles/spawnModules/UISpawnRectangle.d.ts +3 -3
- package/dist/particles/spawnModules/UISpawnRectangle.js +21 -24
- package/package.json +13 -17
- package/dist/_virtual/2d.js +0 -3
- package/dist/_virtual/3d.js +0 -3
- package/dist/_virtual/4d.js +0 -3
- package/dist/_virtual/mod.js +0 -5
- package/dist/_virtual/mod2.js +0 -3
- package/dist/core/shaders/UIImage.glsl.js +0 -3
- package/dist/core/shaders/UINineSlice.glsl.js +0 -3
- package/dist/core/shaders/UIProgress.glsl.js +0 -3
- package/dist/core/shaders/UIProgressMaskFunctionCircular.glsl.js +0 -3
- package/dist/core/shaders/UIProgressMaskFunctionDirectional.glsl.js +0 -3
- package/dist/index.js +0 -52
- package/dist/node_modules/fast-simplex-noise/lib/2d.js +0 -93
- package/dist/node_modules/fast-simplex-noise/lib/3d.js +0 -142
- package/dist/node_modules/fast-simplex-noise/lib/4d.js +0 -196
- package/dist/node_modules/fast-simplex-noise/lib/mod.js +0 -24
- package/dist/node_modules/three/examples/jsm/lines/Line2.js +0 -56
- package/dist/node_modules/three/examples/jsm/lines/LineGeometry.js +0 -157
- package/dist/node_modules/three/examples/jsm/lines/LineMaterial.js +0 -691
- package/dist/node_modules/three/examples/jsm/lines/LineSegments2.js +0 -415
- package/dist/node_modules/three/examples/jsm/lines/LineSegmentsGeometry.js +0 -289
- package/dist/particles/shaders/UIRenderingColorOverLife.glsl.js +0 -3
- package/dist/particles/shaders/UIRenderingColorOverVelocity.glsl.js +0 -3
- package/dist/particles/shaders/UIRenderingTexture.glsl.js +0 -3
package/dist/core/index.d.ts
CHANGED
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
export { UIConstraint2DBuilder } from "./constraints/builders/UIConstraint2DBuilder";
|
|
2
|
-
export { UICoverConstraintBuilder } from "./constraints/builders/UICoverConstraintBuilder";
|
|
3
|
-
export { UIFitConstraintBuilder } from "./constraints/builders/UIFitConstraintBuilder";
|
|
4
|
-
export { UIAspectConstraint } from "./constraints/UIAspectConstraint/UIAspectConstraint";
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export {
|
|
47
|
-
export {
|
|
48
|
-
export {
|
|
49
|
-
export {
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
52
|
-
export {
|
|
53
|
-
export {
|
|
54
|
-
export {
|
|
1
|
+
export { UIConstraint2DBuilder } from "./constraints/builders/UIConstraint2DBuilder.js";
|
|
2
|
+
export { UICoverConstraintBuilder } from "./constraints/builders/UICoverConstraintBuilder.js";
|
|
3
|
+
export { UIFitConstraintBuilder } from "./constraints/builders/UIFitConstraintBuilder.js";
|
|
4
|
+
export { UIAspectConstraint } from "./constraints/UIAspectConstraint/UIAspectConstraint.js";
|
|
5
|
+
export { UIConstraint } from "./constraints/UIConstraint.js";
|
|
6
|
+
export { UICustomConstraint } from "./constraints/UICustomConstraint.js";
|
|
7
|
+
export { UIHeightConstraint } from "./constraints/UIHeightConstraint/UIHeightConstraint.js";
|
|
8
|
+
export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js";
|
|
9
|
+
export { UIHorizontalInterpolationConstraint } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js";
|
|
10
|
+
export { UIHorizontalProportionConstraint } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js";
|
|
11
|
+
export { UISingleParameterConstraint } from "./constraints/UISingleParameterConstraint/UISingleParameterConstraint.js";
|
|
12
|
+
export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js";
|
|
13
|
+
export { UIVerticalInterpolationConstraint } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js";
|
|
14
|
+
export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js";
|
|
15
|
+
export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint.js";
|
|
16
|
+
export { UIAnchor } from "./elements/UIAnchor/UIAnchor.js";
|
|
17
|
+
export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
|
|
18
|
+
export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
|
|
19
|
+
export { UIDummy } from "./elements/UIDummy/UIDummy.js";
|
|
20
|
+
export type { UIInputEventData } from "./elements/UIDummy/UIDummy.Internal.js";
|
|
21
|
+
export { UIGraphics } from "./elements/UIGraphics/UIGraphics.js";
|
|
22
|
+
export { UIImage } from "./elements/UIImage/UIImage.js";
|
|
23
|
+
export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
|
|
24
|
+
export { UINineSliceRegionMode } from "./elements/UINineSlice/UINineSlice.Internal.js";
|
|
25
|
+
export { UIProgress } from "./elements/UIProgress/UIProgress.js";
|
|
26
|
+
export { UIScene } from "./elements/UIScene/UIScene.js";
|
|
27
|
+
export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal.js";
|
|
28
|
+
export { UIText } from "./elements/UIText/UIText.js";
|
|
29
|
+
export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
|
|
30
|
+
export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer.js";
|
|
31
|
+
export type { UIFullscreenLayerInputEventData } from "./layers/UIFullscreenLayer/UIFullscreenLayer.Internal.js";
|
|
32
|
+
export { UILayer } from "./layers/UILayer/UILayer.js";
|
|
33
|
+
export { UIAreaCircle } from "./miscellaneous/area/UIAreaCircle.js";
|
|
34
|
+
export { UIAreaPolygon } from "./miscellaneous/area/UIAreaPolygon.js";
|
|
35
|
+
export { UIAreaRectangle } from "./miscellaneous/area/UIAreaRectangle.js";
|
|
36
|
+
export { UIAreaRoundedRectangle } from "./miscellaneous/area/UIAreaRoundedRectangle.js";
|
|
37
|
+
export { UIColor } from "./miscellaneous/color/UIColor.js";
|
|
38
|
+
export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
|
|
39
|
+
export { UIProgressMaskFunctionDirectional } from "./miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
|
|
40
|
+
export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
|
|
41
|
+
export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
|
|
42
|
+
export { UIResizePolicyCover } from "./miscellaneous/resize-policy/UIResizePolicyCover.js";
|
|
43
|
+
export { UIResizePolicyCross } from "./miscellaneous/resize-policy/UIResizePolicyCross.js";
|
|
44
|
+
export { UIResizePolicyCrossInverted } from "./miscellaneous/resize-policy/UIResizePolicyCrossInverted.js";
|
|
45
|
+
export { UIResizePolicyFit } from "./miscellaneous/resize-policy/UIResizePolicyFit.js";
|
|
46
|
+
export { UIResizePolicyFixedHeight } from "./miscellaneous/resize-policy/UIResizePolicyFixedHeight.js";
|
|
47
|
+
export { UIResizePolicyFixedWidth } from "./miscellaneous/resize-policy/UIResizePolicyFixedWidth.js";
|
|
48
|
+
export { UIResizePolicyNone } from "./miscellaneous/resize-policy/UIResizePolicyNone.js";
|
|
49
|
+
export { UIExpression } from "./miscellaneous/UIExpression.js";
|
|
50
|
+
export { UIMode } from "./miscellaneous/UIMode.js";
|
|
51
|
+
export { UIOrientation } from "./miscellaneous/UIOrientation.js";
|
|
52
|
+
export { UIPriority } from "./miscellaneous/UIPriority.js";
|
|
53
|
+
export { UIRelation } from "./miscellaneous/UIRelation.js";
|
|
54
|
+
export { UITransparencyMode } from "./miscellaneous/UITransparencyMode.js";
|
|
55
|
+
export { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export { UIConstraint2DBuilder } from "./constraints/builders/UIConstraint2DBuilder.js";
|
|
2
|
+
export { UICoverConstraintBuilder } from "./constraints/builders/UICoverConstraintBuilder.js";
|
|
3
|
+
export { UIFitConstraintBuilder } from "./constraints/builders/UIFitConstraintBuilder.js";
|
|
4
|
+
export { UIAspectConstraint } from "./constraints/UIAspectConstraint/UIAspectConstraint.js";
|
|
5
|
+
export { UIConstraint } from "./constraints/UIConstraint.js";
|
|
6
|
+
export { UICustomConstraint } from "./constraints/UICustomConstraint.js";
|
|
7
|
+
export { UIHeightConstraint } from "./constraints/UIHeightConstraint/UIHeightConstraint.js";
|
|
8
|
+
export { UIHorizontalDistanceConstraint } from "./constraints/UIHorizontalDistanceConstraint/UIHorizontalDistanceConstraint.js";
|
|
9
|
+
export { UIHorizontalInterpolationConstraint } from "./constraints/UIHorizontalInterpolationConstraint/UIHorizontalInterpolationConstraint.js";
|
|
10
|
+
export { UIHorizontalProportionConstraint } from "./constraints/UIHorizontalProportionConstraint/UIHorizontalProportionConstraint.js";
|
|
11
|
+
export { UISingleParameterConstraint } from "./constraints/UISingleParameterConstraint/UISingleParameterConstraint.js";
|
|
12
|
+
export { UIVerticalDistanceConstraint } from "./constraints/UIVerticalDistanceConstraint/UIVerticalDistanceConstraint.js";
|
|
13
|
+
export { UIVerticalInterpolationConstraint } from "./constraints/UIVerticalInterpolationConstraint/UIVerticalInterpolationConstraint.js";
|
|
14
|
+
export { UIVerticalProportionConstraint } from "./constraints/UIVerticalProportionConstraint/UIVerticalProportionConstraint.js";
|
|
15
|
+
export { UIWidthConstraint } from "./constraints/UIWidthConstraint/UIWidthConstraint.js";
|
|
16
|
+
export { UIAnchor } from "./elements/UIAnchor/UIAnchor.js";
|
|
17
|
+
export { UIAnimatedImage } from "./elements/UIAnimatedImage/UIAnimatedImage.js";
|
|
18
|
+
export { UIAnimatedImageLoopMode } from "./elements/UIAnimatedImage/UIAnimatedImage.Internal.js";
|
|
19
|
+
export { UIDummy } from "./elements/UIDummy/UIDummy.js";
|
|
20
|
+
export { UIGraphics } from "./elements/UIGraphics/UIGraphics.js";
|
|
21
|
+
export { UIImage } from "./elements/UIImage/UIImage.js";
|
|
22
|
+
export { UINineSlice } from "./elements/UINineSlice/UINineSlice.js";
|
|
23
|
+
export { UINineSliceRegionMode } from "./elements/UINineSlice/UINineSlice.Internal.js";
|
|
24
|
+
export { UIProgress } from "./elements/UIProgress/UIProgress.js";
|
|
25
|
+
export { UIScene } from "./elements/UIScene/UIScene.js";
|
|
26
|
+
export { UISceneUpdateMode } from "./elements/UIScene/UIScene.Internal.js";
|
|
27
|
+
export { UIText } from "./elements/UIText/UIText.js";
|
|
28
|
+
export { UITextDirection, UITextResizeMode } from "./elements/UIText/UIText.Internal.js";
|
|
29
|
+
export { UIFullscreenLayer } from "./layers/UIFullscreenLayer/UIFullscreenLayer.js";
|
|
30
|
+
export { UILayer } from "./layers/UILayer/UILayer.js";
|
|
31
|
+
export { UIAreaCircle } from "./miscellaneous/area/UIAreaCircle.js";
|
|
32
|
+
export { UIAreaPolygon } from "./miscellaneous/area/UIAreaPolygon.js";
|
|
33
|
+
export { UIAreaRectangle } from "./miscellaneous/area/UIAreaRectangle.js";
|
|
34
|
+
export { UIAreaRoundedRectangle } from "./miscellaneous/area/UIAreaRoundedRectangle.js";
|
|
35
|
+
export { UIColor } from "./miscellaneous/color/UIColor.js";
|
|
36
|
+
export { UIProgressMaskFunctionCircular } from "./miscellaneous/mask-function/UIProgressMaskFunctionCircular.js";
|
|
37
|
+
export { UIProgressMaskFunctionDirectional } from "./miscellaneous/mask-function/UIProgressMaskFunctionDirectional.js";
|
|
38
|
+
export { UIMicro } from "./miscellaneous/micro/UIMicro.js";
|
|
39
|
+
export { UIMicroAnchorMode } from "./miscellaneous/micro/UIMicro.Internal.js";
|
|
40
|
+
export { UIResizePolicyCover } from "./miscellaneous/resize-policy/UIResizePolicyCover.js";
|
|
41
|
+
export { UIResizePolicyCross } from "./miscellaneous/resize-policy/UIResizePolicyCross.js";
|
|
42
|
+
export { UIResizePolicyCrossInverted } from "./miscellaneous/resize-policy/UIResizePolicyCrossInverted.js";
|
|
43
|
+
export { UIResizePolicyFit } from "./miscellaneous/resize-policy/UIResizePolicyFit.js";
|
|
44
|
+
export { UIResizePolicyFixedHeight } from "./miscellaneous/resize-policy/UIResizePolicyFixedHeight.js";
|
|
45
|
+
export { UIResizePolicyFixedWidth } from "./miscellaneous/resize-policy/UIResizePolicyFixedWidth.js";
|
|
46
|
+
export { UIResizePolicyNone } from "./miscellaneous/resize-policy/UIResizePolicyNone.js";
|
|
47
|
+
export { UIExpression } from "./miscellaneous/UIExpression.js";
|
|
48
|
+
export { UIMode } from "./miscellaneous/UIMode.js";
|
|
49
|
+
export { UIOrientation } from "./miscellaneous/UIOrientation.js";
|
|
50
|
+
export { UIPriority } from "./miscellaneous/UIPriority.js";
|
|
51
|
+
export { UIRelation } from "./miscellaneous/UIRelation.js";
|
|
52
|
+
export { UITransparencyMode } from "./miscellaneous/UITransparencyMode.js";
|
|
53
|
+
export { UIBlendMode } from "./miscellaneous/UIBlendMode.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { UIResizePolicy } from "../../miscellaneous/resize-policy/UIResizePolicy";
|
|
2
|
-
import { UIResizePolicyNone } from "../../miscellaneous/resize-policy/UIResizePolicyNone";
|
|
3
|
-
import type { UILayerOptions } from "../UILayer/UILayer.Internal";
|
|
4
|
-
import type { UIFullscreenLayer } from "./UIFullscreenLayer";
|
|
1
|
+
import type { UIResizePolicy } from "../../miscellaneous/resize-policy/UIResizePolicy.js";
|
|
2
|
+
import { UIResizePolicyNone } from "../../miscellaneous/resize-policy/UIResizePolicyNone.js";
|
|
3
|
+
import type { UILayerOptions } from "../UILayer/UILayer.Internal.js";
|
|
4
|
+
import type { UIFullscreenLayer } from "./UIFullscreenLayer.js";
|
|
5
5
|
/** Fullscreen layer input event data */
|
|
6
6
|
export interface UIFullscreenLayerInputEventData {
|
|
7
7
|
/** X coordinate */
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import { UIResizePolicyNone } from
|
|
2
|
-
|
|
3
|
-
const FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY = new UIResizePolicyNone();
|
|
4
|
-
|
|
5
|
-
export { FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY };
|
|
1
|
+
import { UIResizePolicyNone } from "../../miscellaneous/resize-policy/UIResizePolicyNone.js";
|
|
2
|
+
export const FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY = new UIResizePolicyNone();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { FerrsignView1 } from "ferrsign";
|
|
2
2
|
import type { Camera, Vector2, WebGLRenderer } from "three";
|
|
3
3
|
import { Ray, Vector3 } from "three";
|
|
4
|
-
import type { UIResizePolicy } from "../../miscellaneous/resize-policy/UIResizePolicy";
|
|
5
|
-
import { UILayer } from "../UILayer/UILayer";
|
|
6
|
-
import type { UIFullscreenLayerInputEventData, UIFullscreenLayerOptions } from "./UIFullscreenLayer.Internal";
|
|
4
|
+
import type { UIResizePolicy } from "../../miscellaneous/resize-policy/UIResizePolicy.js";
|
|
5
|
+
import { UILayer } from "../UILayer/UILayer.js";
|
|
6
|
+
import type { UIFullscreenLayerInputEventData, UIFullscreenLayerOptions } from "./UIFullscreenLayer.Internal.js";
|
|
7
7
|
/** Layer that automatically handles browser window resizing and input events */
|
|
8
8
|
export declare class UIFullscreenLayer extends UILayer {
|
|
9
9
|
private resizePolicyInternal;
|
|
@@ -22,7 +22,7 @@ export declare class UIFullscreenLayer extends UILayer {
|
|
|
22
22
|
get signalPointerReleased(): FerrsignView1<UIFullscreenLayerInputEventData>;
|
|
23
23
|
/** Updates resize policy */
|
|
24
24
|
set resizePolicy(value: UIResizePolicy);
|
|
25
|
-
/** Removes event listeners and
|
|
25
|
+
/** Removes event listeners and destroys the layer with its elements and constraints */
|
|
26
26
|
destroy(): void;
|
|
27
27
|
/**
|
|
28
28
|
* Renders layer and all visible elements
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { Ferrsign1 } from
|
|
2
|
-
import {
|
|
3
|
-
import { assertValidNumber } from
|
|
4
|
-
import { isUIModeInteractive } from
|
|
5
|
-
import { UILayer } from
|
|
6
|
-
import { FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY } from
|
|
7
|
-
|
|
1
|
+
import { Ferrsign1 } from "ferrsign";
|
|
2
|
+
import { MathUtils, Ray, Vector3 } from "three";
|
|
3
|
+
import { assertValidNumber } from "../../miscellaneous/asserts.js";
|
|
4
|
+
import { isUIModeInteractive } from "../../miscellaneous/UIMode.js";
|
|
5
|
+
import { UILayer } from "../UILayer/UILayer.js";
|
|
6
|
+
import { FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY } from "./UIFullscreenLayer.Internal.js";
|
|
8
7
|
/** Layer that automatically handles browser window resizing and input events */
|
|
9
|
-
class UIFullscreenLayer extends UILayer {
|
|
8
|
+
export class UIFullscreenLayer extends UILayer {
|
|
10
9
|
constructor(options) {
|
|
11
10
|
const resizePolicy = options?.resizePolicy ?? FULLSCREEN_LAYER_DEFAULT_RESIZE_POLICY;
|
|
12
11
|
const scale = resizePolicy.calculateScale(window.innerWidth, window.innerHeight);
|
|
@@ -15,60 +14,61 @@ class UIFullscreenLayer extends UILayer {
|
|
|
15
14
|
height: window.innerHeight * scale,
|
|
16
15
|
...options,
|
|
17
16
|
});
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
17
|
+
this.resizePolicyDirty = false;
|
|
18
|
+
this.signalPointerPressedInternal = new Ferrsign1();
|
|
19
|
+
this.signalPointerMovedInternal = new Ferrsign1();
|
|
20
|
+
this.signalPointerReleasedInternal = new Ferrsign1();
|
|
21
|
+
this.onResize = () => {
|
|
23
22
|
const scale = this.resizePolicy.calculateScale(window.innerWidth, window.innerHeight);
|
|
24
23
|
this.resizePolicy.dirty = false;
|
|
25
|
-
this.
|
|
24
|
+
this.resizePolicyDirty = false;
|
|
26
25
|
this.resizeInternal(window.innerWidth * scale, window.innerHeight * scale);
|
|
27
26
|
};
|
|
28
|
-
this.
|
|
29
|
-
this.
|
|
27
|
+
this.onPointerDown = (event) => {
|
|
28
|
+
this.handleWindowInput(event, "onPointerDown", this.signalPointerPressedInternal);
|
|
30
29
|
};
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
30
|
+
this.onPointerMove = (event) => {
|
|
31
|
+
this.handleWindowInput(event, "onPointerMove", this.signalPointerMovedInternal);
|
|
33
32
|
};
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
33
|
+
this.onPointerUp = (event) => {
|
|
34
|
+
this.handleWindowInput(event, "onPointerUp", this.signalPointerReleasedInternal);
|
|
36
35
|
};
|
|
37
|
-
this.
|
|
38
|
-
window.addEventListener("resize", this.
|
|
39
|
-
window.addEventListener("pointerdown", this.
|
|
40
|
-
window.addEventListener("pointermove", this.
|
|
41
|
-
window.addEventListener("pointerup", this.
|
|
36
|
+
this.resizePolicyInternal = resizePolicy;
|
|
37
|
+
window.addEventListener("resize", this.onResize);
|
|
38
|
+
window.addEventListener("pointerdown", this.onPointerDown);
|
|
39
|
+
window.addEventListener("pointermove", this.onPointerMove);
|
|
40
|
+
window.addEventListener("pointerup", this.onPointerUp);
|
|
42
41
|
}
|
|
43
42
|
/** Current resize policy */
|
|
44
43
|
get resizePolicy() {
|
|
45
|
-
return this.
|
|
44
|
+
return this.resizePolicyInternal;
|
|
46
45
|
}
|
|
47
46
|
/** Signal fired when pointer is pressed */
|
|
48
47
|
get signalPointerPressed() {
|
|
49
|
-
return this.
|
|
48
|
+
return this.signalPointerPressedInternal;
|
|
50
49
|
}
|
|
51
50
|
/** Signal fired when pointer is moved */
|
|
52
51
|
get signalPointerMoved() {
|
|
53
|
-
return this.
|
|
52
|
+
return this.signalPointerMovedInternal;
|
|
54
53
|
}
|
|
55
54
|
/** Signal fired when pointer is released */
|
|
56
55
|
get signalPointerReleased() {
|
|
57
|
-
return this.
|
|
56
|
+
return this.signalPointerReleasedInternal;
|
|
58
57
|
}
|
|
59
58
|
/** Updates resize policy */
|
|
60
59
|
set resizePolicy(value) {
|
|
61
|
-
if (this.
|
|
62
|
-
this.
|
|
63
|
-
this.
|
|
60
|
+
if (this.resizePolicyInternal !== value) {
|
|
61
|
+
this.resizePolicyInternal = value;
|
|
62
|
+
this.resizePolicyDirty = true;
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
|
-
/** Removes event listeners and
|
|
65
|
+
/** Removes event listeners and destroys the layer with its elements and constraints */
|
|
67
66
|
destroy() {
|
|
68
|
-
window.removeEventListener("resize", this.
|
|
69
|
-
window.removeEventListener("pointerdown", this.
|
|
70
|
-
window.removeEventListener("pointermove", this.
|
|
71
|
-
window.removeEventListener("pointerup", this.
|
|
67
|
+
window.removeEventListener("resize", this.onResize);
|
|
68
|
+
window.removeEventListener("pointerdown", this.onPointerDown);
|
|
69
|
+
window.removeEventListener("pointermove", this.onPointerMove);
|
|
70
|
+
window.removeEventListener("pointerup", this.onPointerUp);
|
|
71
|
+
super.destroy();
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* Renders layer and all visible elements
|
|
@@ -77,8 +77,11 @@ class UIFullscreenLayer extends UILayer {
|
|
|
77
77
|
*/
|
|
78
78
|
render(renderer, deltaTime) {
|
|
79
79
|
assertValidNumber(deltaTime, "UIFullscreenLayer.render.deltaTime");
|
|
80
|
-
if (this.
|
|
81
|
-
|
|
80
|
+
if (this.destroyed) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (this.resizePolicy.dirty || this.resizePolicyDirty) {
|
|
84
|
+
this.onResize();
|
|
82
85
|
}
|
|
83
86
|
super.renderInternal(renderer, deltaTime);
|
|
84
87
|
}
|
|
@@ -121,7 +124,7 @@ class UIFullscreenLayer extends UILayer {
|
|
|
121
124
|
const direction = far.sub(near).normalize();
|
|
122
125
|
return result.set(near, direction);
|
|
123
126
|
}
|
|
124
|
-
|
|
127
|
+
handleWindowInput(event, pointerFunctionName, signal) {
|
|
125
128
|
const rect = event.target instanceof HTMLElement ? event.target.getBoundingClientRect() : null;
|
|
126
129
|
const x = rect ? event.clientX - rect.left : event.clientX;
|
|
127
130
|
const y = rect ? rect.bottom - event.clientY : window.innerHeight - event.clientY;
|
|
@@ -139,5 +142,3 @@ class UIFullscreenLayer extends UILayer {
|
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
144
|
}
|
|
142
|
-
|
|
143
|
-
export { UIFullscreenLayer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UIMode } from "../../miscellaneous/UIMode";
|
|
2
|
-
import type { UIOrientation } from "../../miscellaneous/UIOrientation";
|
|
1
|
+
import { UIMode } from "../../miscellaneous/UIMode.js";
|
|
2
|
+
import type { UIOrientation } from "../../miscellaneous/UIOrientation.js";
|
|
3
3
|
/** Layer visibility and interactivity state */
|
|
4
4
|
export type UILayerMode = UIMode.HIDDEN | UIMode.VISIBLE | UIMode.INTERACTIVE;
|
|
5
5
|
/** Layer orientation state */
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { UIMode } from
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const LAYER_DEFAULT_MODE = UIMode.VISIBLE;
|
|
6
|
-
|
|
7
|
-
export { LAYER_DEFAULT_MODE, LAYER_DEFAULT_NAME, LAYER_DEFAULT_SIZE };
|
|
1
|
+
import { UIMode } from "../../miscellaneous/UIMode.js";
|
|
2
|
+
export const LAYER_DEFAULT_SIZE = 1024;
|
|
3
|
+
export const LAYER_DEFAULT_NAME = "";
|
|
4
|
+
export const LAYER_DEFAULT_MODE = UIMode.VISIBLE;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { FerrsignView2, FerrsignView3 } from "ferrsign";
|
|
2
2
|
import type { WebGLRenderer } from "three";
|
|
3
|
-
import type { UIPlaneElement } from "../../miscellaneous/shared";
|
|
4
|
-
import type { UIConstraint } from "../../constraints/UIConstraint";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
3
|
+
import type { UIPlaneElement } from "../../miscellaneous/shared.js";
|
|
4
|
+
import type { UIConstraint } from "../../constraints/UIConstraint.js";
|
|
5
|
+
import type { UIAnchor } from "../../elements/UIAnchor/UIAnchor.js";
|
|
6
|
+
import { UIInputWrapper } from "../../wrappers/UIInputWrapper/UIInputWrapper.js";
|
|
7
|
+
import type { UILayerMode, UILayerOptions, UILayerOrientation } from "./UILayer.Internal.js";
|
|
7
8
|
/** Base layer for UI rendering and layout management */
|
|
8
9
|
export declare abstract class UILayer implements UIPlaneElement {
|
|
9
10
|
/** Optional layer name */
|
|
@@ -28,6 +29,8 @@ export declare abstract class UILayer implements UIPlaneElement {
|
|
|
28
29
|
private readonly signalConstraintAddedInternal;
|
|
29
30
|
private readonly signalConstraintRemovedInternal;
|
|
30
31
|
private readonly constraintRegistryInternal;
|
|
32
|
+
private readonly elementRegistryInternal;
|
|
33
|
+
private destroyedInternal;
|
|
31
34
|
constructor(options: Partial<UILayerOptions>);
|
|
32
35
|
/** X coordinate in world units (always 0 for layers) */
|
|
33
36
|
get x(): number;
|
|
@@ -63,8 +66,20 @@ export declare abstract class UILayer implements UIPlaneElement {
|
|
|
63
66
|
get signalConstraintRemoved(): FerrsignView2<UILayer, UIConstraint>;
|
|
64
67
|
/** Constraint registry */
|
|
65
68
|
get constraintRegistry(): readonly UIConstraint[];
|
|
69
|
+
/** Elements created on the layer and not destroyed yet */
|
|
70
|
+
get elementRegistry(): readonly UIAnchor[];
|
|
71
|
+
/** Whether the layer is destroyed */
|
|
72
|
+
get destroyed(): boolean;
|
|
66
73
|
/** Updates visibility and interactivity mode */
|
|
67
74
|
set mode(value: UILayerMode);
|
|
75
|
+
/**
|
|
76
|
+
* Destroys all elements and constraints of the layer, those snapped to the layer itself
|
|
77
|
+
* included, and frees the GPU resources of the layer. Textures are left to their owners.
|
|
78
|
+
* Does nothing if the layer is already destroyed.
|
|
79
|
+
*/
|
|
80
|
+
destroy(): void;
|
|
68
81
|
protected resizeInternal(width: number, height: number): void;
|
|
69
82
|
protected renderInternal(renderer: WebGLRenderer, deltaTime: number): void;
|
|
83
|
+
/** A removal signal handler may destroy other constraints, so the registry is walked over a copy */
|
|
84
|
+
private destroyConstraints;
|
|
70
85
|
}
|