dune-react 0.0.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 +49 -0
- package/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/sha1.js +4 -0
- package/dist/_virtual/util.js +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/ui-custom/background.d.ts +8 -0
- package/dist/components/ui-custom/background.js +51 -0
- package/dist/components/ui-custom/cover.d.ts +17 -0
- package/dist/components/ui-custom/cover.js +231 -0
- package/dist/components/ui-custom/sparkles.d.ts +13 -0
- package/dist/components/ui-custom/sparkles.js +418 -0
- package/dist/components/ui-custom/spotlight-new.d.ts +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +40 -0
- package/dist/node_modules/.pnpm/@fluid-tailwind_tailwind-merge@0.0.3_tailwind-merge@3.3.1/node_modules/@fluid-tailwind/tailwind-merge/dist/index.js +50 -0
- package/dist/node_modules/.pnpm/@tsparticles_basic@3.9.1/node_modules/@tsparticles/basic/browser/index.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Canvas.js +510 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Container.js +463 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Engine.js +293 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particle.js +355 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Particles.js +326 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Retina.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js +105 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/EventListeners.js +309 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/InteractionManager.js +64 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ParticlesInteractorBase.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Point.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/QuadTree.js +60 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js +57 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js +120 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/AnimationStatus.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/MoveDirection.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/OutModeDirection.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Directions/RotateDirection.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/InteractivityDetect.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/AnimationMode.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/CollisionMode.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/LimitMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/OutMode.js +11 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/PixelMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ResponsiveMode.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Modes/ThemeMode.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/AlterType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DestroyType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DivType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EasingType.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/EventType.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/GradientType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/InteractorType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/ParticleOutType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/StartValueType.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimatableColor.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/AnimationOptions.js +60 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Background/Background.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMask.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/BackgroundMask/BackgroundMaskCover.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ColorAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/FullScreen/FullScreen.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/HslAnimation.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ClickEvent.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/DivEvent.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Events.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/HoverEvent.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/Parallax.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Events/ResizeEvent.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Interactivity.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Interactivity/Modes/Modes.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ManualParticle.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Options.js +163 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounce.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/Collisions.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsAbsorb.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Collisions/CollisionsOverlap.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Effect/Effect.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Move.js +95 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAngle.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveAttract.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveCenter.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveGravity.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrail.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/MoveTrailFill.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/OutModes.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Path/MovePath.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Move/Spin.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesDensity.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumber.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Number/ParticlesNumberLimit.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/Opacity.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Opacity/OpacityAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ParticlesOptions.js +97 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shadow.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Shape/Shape.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/Size.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Size/SizeAnimation.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/Stroke.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Particles/ZIndex/ZIndex.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Responsive.js +31 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/Theme.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/Theme/ThemeDefault.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/ValueWithRandom.js +46 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Types/RangeType.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/CanvasUtils.js +168 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js +316 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/EventDispatcher.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js +135 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/OptionsUtils.js +15 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js +26 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js +475 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/index.js +82 -0
- package/dist/node_modules/.pnpm/@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/init.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Attractor.js +81 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Options/Classes/Attract.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/Utils.js +50 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-attract@3.9.1/node_modules/@tsparticles/interaction-external-attract/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Bouncer.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Options/Classes/Bounce.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/Utils.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bounce@3.9.1/node_modules/@tsparticles/interaction-external-bounce/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Bubbler.js +274 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Enums.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/Bubble.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleBase.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Options/Classes/BubbleDiv.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/Utils.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-bubble@3.9.1/node_modules/@tsparticles/interaction-external-bubble/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Connector.js +59 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/Connect.js +24 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Options/Classes/ConnectLinks.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/Utils.js +44 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-connect@3.9.1/node_modules/@tsparticles/interaction-external-connect/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Grabber.js +76 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/Grab.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Options/Classes/GrabLinks.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/Utils.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-grab@3.9.1/node_modules/@tsparticles/interaction-external-grab/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/Pauser.js +32 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-pause@3.9.1/node_modules/@tsparticles/interaction-external-pause/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Options/Classes/Push.js +34 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/Pusher.js +47 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-push@3.9.1/node_modules/@tsparticles/interaction-external-push/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Options/Classes/Remove.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/Remover.js +39 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-remove@3.9.1/node_modules/@tsparticles/interaction-external-remove/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/Repulse.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseBase.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Options/Classes/RepulseDiv.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/Repulser.js +160 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-repulse@3.9.1/node_modules/@tsparticles/interaction-external-repulse/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Options/Classes/Slow.js +21 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/Slower.js +53 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-external-slow@3.9.1/node_modules/@tsparticles/interaction-external-slow/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/Attractor.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-attract@3.9.1/node_modules/@tsparticles/interaction-particles-attract/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Absorb.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Bounce.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Collider.js +41 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/Destroy.js +17 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/ResolveCollision.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-collisions@3.9.1/node_modules/@tsparticles/interaction-particles-collisions/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/CircleWarp.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinkInstance.js +152 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Linker.js +109 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/LinksPlugin.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/Links.js +58 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksShadow.js +25 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Options/Classes/LinksTriangle.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/Utils.js +106 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/interaction.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_interaction-particles-links@3.9.1/node_modules/@tsparticles/interaction-particles-links/browser/plugin.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/BaseMover.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/Utils.js +128 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-base@3.9.1/node_modules/@tsparticles/move-base/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/ParallaxMover.js +31 -0
- package/dist/node_modules/.pnpm/@tsparticles_move-parallax@3.9.1/node_modules/@tsparticles/move-parallax/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-easing-quad@3.9.1/node_modules/@tsparticles/plugin-easing-quad/browser/index.js +11 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/HexColorManager.js +43 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hex-color@3.9.1/node_modules/@tsparticles/plugin-hex-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/HslColorManager.js +46 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-hsl-color@3.9.1/node_modules/@tsparticles/plugin-hsl-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/RgbColorManager.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_plugin-rgb-color@3.9.1/node_modules/@tsparticles/plugin-rgb-color/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/Particles.js +18 -0
- package/dist/node_modules/.pnpm/@tsparticles_react@3.0.0_@tsparticles_engine@3.9.1_react-dom@18.3.1_react@18.3.1/node_modules/@tsparticles/react/dist/index.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/CircleDrawer.js +28 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/Utils.js +12 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-circle@3.9.1/node_modules/@tsparticles/shape-circle/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/EmojiDrawer.js +103 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/Utils.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-emoji@3.9.1/node_modules/@tsparticles/shape-emoji/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/ByteStream.js +51 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Constants.js +6 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Enums/DisposalMethod.js +14 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Types/GIFDataHeaders.js +13 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/GifUtils/Utils.js +419 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImageDrawer.js +130 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/ImagePreloader.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Options/Classes/Preload.js +33 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/Utils.js +94 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-image@3.9.1/node_modules/@tsparticles/shape-image/browser/index.js +54 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/LineDrawer.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/Utils.js +9 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-line@3.9.1/node_modules/@tsparticles/shape-line/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawer.js +27 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/PolygonDrawerBase.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/TriangleDrawer.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/Utils.js +19 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-polygon@3.9.1/node_modules/@tsparticles/shape-polygon/browser/index.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/SquareDrawer.js +16 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/Utils.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-square@3.9.1/node_modules/@tsparticles/shape-square/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/StarDrawer.js +22 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/Utils.js +14 -0
- package/dist/node_modules/.pnpm/@tsparticles_shape-star@3.9.1/node_modules/@tsparticles/shape-star/browser/index.js +8 -0
- package/dist/node_modules/.pnpm/@tsparticles_slim@3.9.1/node_modules/@tsparticles/slim/browser/index.js +56 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/ColorUpdater.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-color@3.9.1/node_modules/@tsparticles/updater-color/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/LifeUpdater.js +52 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/Life.js +23 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDelay.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Options/Classes/LifeDuration.js +20 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/Utils.js +58 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-life@3.9.1/node_modules/@tsparticles/updater-life/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/OpacityUpdater.js +38 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-opacity@3.9.1/node_modules/@tsparticles/updater-opacity/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/BounceOutMode.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/DestroyOutMode.js +37 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/NoneOutMode.js +36 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOfCanvasUpdater.js +45 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/OutOutMode.js +110 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/Utils.js +66 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-out-modes@3.9.1/node_modules/@tsparticles/updater-out-modes/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/Rotate.js +29 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/Options/Classes/RotateAnimation.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/RotateUpdater.js +77 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-rotate@3.9.1/node_modules/@tsparticles/updater-rotate/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/SizeUpdater.js +30 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-size@3.9.1/node_modules/@tsparticles/updater-size/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/StrokeColorUpdater.js +35 -0
- package/dist/node_modules/.pnpm/@tsparticles_updater-stroke-color@3.9.1/node_modules/@tsparticles/updater-stroke-color/browser/index.js +10 -0
- package/dist/node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/index.js +826 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/supported.js +242 -0
- package/dist/node_modules/.pnpm/file-type@12.4.1/node_modules/file-type/util.js +64 -0
- package/dist/node_modules/.pnpm/js-sha1@0.6.0/node_modules/js-sha1/src/sha1.js +311 -0
- package/dist/node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.browser.js +22 -0
- package/dist/node_modules/.pnpm/tailwind-merge@3.3.1/node_modules/tailwind-merge/dist/bundle-mjs.js +3007 -0
- package/dist/utils/css-utils.d.ts +10 -0
- package/dist/utils/css-utils.js +17 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/storage-qetag.d.ts +22 -0
- package/dist/utils/storage-qetag.js +3 -0
- package/dist/utils/utils-api.d.ts +17 -0
- package/dist/utils/utils-api.js +31 -0
- package/dist/utils/utils-canvas.d.ts +30 -0
- package/dist/utils/utils-canvas.js +54 -0
- package/dist/utils/utils-common.d.ts +6 -0
- package/dist/utils/utils-common.js +15 -0
- package/dist/utils/utils-image.d.ts +33 -0
- package/dist/utils/utils-image.js +57 -0
- package/dist/utils/utils-random.d.ts +1 -0
- package/dist/utils/utils-random.js +6 -0
- package/dist/utils/utils-time.d.ts +49 -0
- package/dist/utils/utils-time.js +112 -0
- package/package.json +81 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Circle } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js";
|
|
2
|
+
import { getDistances, clamp } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js";
|
|
3
|
+
import { Vector } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js";
|
|
4
|
+
const minFactor = 1, identity = 1, minRadius = 0;
|
|
5
|
+
function processAttract(engine, container, position, attractRadius, area, queryCb) {
|
|
6
|
+
const attractOptions = container.actualOptions.interactivity.modes.attract;
|
|
7
|
+
if (!attractOptions) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const query = container.particles.quadTree.query(area, queryCb);
|
|
11
|
+
for (const particle of query) {
|
|
12
|
+
const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp(engine.getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = Vector.create(!distance ? velocity : dx / distance * attractFactor, !distance ? velocity : dy / distance * attractFactor);
|
|
13
|
+
particle.position.subFrom(normVec);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
function clickAttract(engine, container, enabledCb) {
|
|
17
|
+
if (!container.attract) {
|
|
18
|
+
container.attract = { particles: [] };
|
|
19
|
+
}
|
|
20
|
+
const { attract } = container;
|
|
21
|
+
if (!attract.finish) {
|
|
22
|
+
if (!attract.count) {
|
|
23
|
+
attract.count = 0;
|
|
24
|
+
}
|
|
25
|
+
attract.count++;
|
|
26
|
+
if (attract.count === container.particles.count) {
|
|
27
|
+
attract.finish = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
if (attract.clicking) {
|
|
31
|
+
const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;
|
|
32
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
processAttract(engine, container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
36
|
+
} else if (attract.clicking === false) {
|
|
37
|
+
attract.particles = [];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function hoverAttract(engine, container, enabledCb) {
|
|
41
|
+
const mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;
|
|
42
|
+
if (!attractRadius || attractRadius < minRadius || !mousePos) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
processAttract(engine, container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
clickAttract,
|
|
49
|
+
hoverAttract
|
|
50
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Attractor } from "./Attractor.js";
|
|
2
|
+
async function loadExternalAttractInteraction(engine, refresh = true) {
|
|
3
|
+
engine.checkVersion("3.9.1");
|
|
4
|
+
await engine.addInteractor("externalAttract", (container) => {
|
|
5
|
+
return Promise.resolve(new Attractor(engine, container));
|
|
6
|
+
}, refresh);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
loadExternalAttractInteraction
|
|
10
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { mouseBounce, divBounce } from "./Utils.js";
|
|
2
|
+
import { Bounce } from "./Options/Classes/Bounce.js";
|
|
3
|
+
import { isInArray, isDivModeEnabled } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js";
|
|
4
|
+
import { ExternalInteractorBase } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js";
|
|
5
|
+
import { mouseMoveEvent } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js";
|
|
6
|
+
const bounceMode = "bounce";
|
|
7
|
+
class Bouncer extends ExternalInteractorBase {
|
|
8
|
+
constructor(container) {
|
|
9
|
+
super(container);
|
|
10
|
+
}
|
|
11
|
+
clear() {
|
|
12
|
+
}
|
|
13
|
+
init() {
|
|
14
|
+
const container = this.container, bounce = container.actualOptions.interactivity.modes.bounce;
|
|
15
|
+
if (!bounce) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
container.retina.bounceModeDistance = bounce.distance * container.retina.pixelRatio;
|
|
19
|
+
}
|
|
20
|
+
interact() {
|
|
21
|
+
const container = this.container, options = container.actualOptions, events = options.interactivity.events, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, divs = events.onDiv;
|
|
22
|
+
if (mouseMoveStatus && hoverEnabled && isInArray(bounceMode, hoverMode)) {
|
|
23
|
+
mouseBounce(this.container, (p) => this.isEnabled(p));
|
|
24
|
+
} else {
|
|
25
|
+
divBounce(this.container, divs, bounceMode, (p) => this.isEnabled(p));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
isEnabled(particle) {
|
|
29
|
+
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = ((particle == null ? void 0 : particle.interactivity) ?? options.interactivity).events, divs = events.onDiv;
|
|
30
|
+
return !!mouse.position && events.onHover.enable && isInArray(bounceMode, events.onHover.mode) || isDivModeEnabled(bounceMode, divs);
|
|
31
|
+
}
|
|
32
|
+
loadModeOptions(options, ...sources) {
|
|
33
|
+
if (!options.bounce) {
|
|
34
|
+
options.bounce = new Bounce();
|
|
35
|
+
}
|
|
36
|
+
for (const source of sources) {
|
|
37
|
+
options.bounce.load(source == null ? void 0 : source.bounce);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
reset() {
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
Bouncer
|
|
45
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { isNull } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js";
|
|
2
|
+
class Bounce {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.distance = 200;
|
|
5
|
+
}
|
|
6
|
+
load(data) {
|
|
7
|
+
if (isNull(data)) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (data.distance !== void 0) {
|
|
11
|
+
this.distance = data.distance;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
Bounce
|
|
17
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { divModeExecute, circleBounce, circleBounceDataFromParticle, rectBounce, calculateBounds } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js";
|
|
2
|
+
import { Circle, Rectangle } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js";
|
|
3
|
+
import { DivType } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DivType.js";
|
|
4
|
+
import { Vector } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Vectors.js";
|
|
5
|
+
const squareExp = 2, half = 0.5, halfPI = Math.PI * half, double = 2, toleranceFactor = 10, minRadius = 0;
|
|
6
|
+
function processBounce(container, position, radius, area, enabledCb) {
|
|
7
|
+
const query = container.particles.quadTree.query(area, enabledCb);
|
|
8
|
+
for (const particle of query) {
|
|
9
|
+
if (area instanceof Circle) {
|
|
10
|
+
circleBounce(circleBounceDataFromParticle(particle), {
|
|
11
|
+
position,
|
|
12
|
+
mass: radius ** squareExp * halfPI,
|
|
13
|
+
velocity: Vector.origin,
|
|
14
|
+
factor: Vector.origin
|
|
15
|
+
});
|
|
16
|
+
} else if (area instanceof Rectangle) {
|
|
17
|
+
rectBounce(particle, calculateBounds(position, radius));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function singleSelectorBounce(container, selector, div, bounceCb) {
|
|
22
|
+
const query = document.querySelectorAll(selector);
|
|
23
|
+
if (!query.length) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
query.forEach((item) => {
|
|
27
|
+
const elem = item, pxRatio = container.retina.pixelRatio, pos = {
|
|
28
|
+
x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,
|
|
29
|
+
y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio
|
|
30
|
+
}, radius = elem.offsetWidth * half * pxRatio, tolerance = toleranceFactor * pxRatio, area = div.type === DivType.circle ? new Circle(pos.x, pos.y, radius + tolerance) : new Rectangle(elem.offsetLeft * pxRatio - tolerance, elem.offsetTop * pxRatio - tolerance, elem.offsetWidth * pxRatio + tolerance * double, elem.offsetHeight * pxRatio + tolerance * double);
|
|
31
|
+
bounceCb(pos, radius, area);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function divBounce(container, divs, bounceMode, enabledCb) {
|
|
35
|
+
divModeExecute(bounceMode, divs, (selector, div) => singleSelectorBounce(container, selector, div, (pos, radius, area) => processBounce(container, pos, radius, area, enabledCb)));
|
|
36
|
+
}
|
|
37
|
+
function mouseBounce(container, enabledCb) {
|
|
38
|
+
const pxRatio = container.retina.pixelRatio, tolerance = toleranceFactor * pxRatio, mousePos = container.interactivity.mouse.position, radius = container.retina.bounceModeDistance;
|
|
39
|
+
if (!radius || radius < minRadius || !mousePos) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
processBounce(container, mousePos, radius, new Circle(mousePos.x, mousePos.y, radius + tolerance), enabledCb);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
divBounce,
|
|
46
|
+
mouseBounce
|
|
47
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Bouncer } from "./Bouncer.js";
|
|
2
|
+
async function loadExternalBounceInteraction(engine, refresh = true) {
|
|
3
|
+
engine.checkVersion("3.9.1");
|
|
4
|
+
await engine.addInteractor("externalBounce", (container) => {
|
|
5
|
+
return Promise.resolve(new Bouncer(container));
|
|
6
|
+
}, refresh);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
loadExternalBounceInteraction
|
|
10
|
+
};
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { Bubble } from "./Options/Classes/Bubble.js";
|
|
2
|
+
import { ProcessBubbleType } from "./Enums.js";
|
|
3
|
+
import { calculateBubbleValue } from "./Utils.js";
|
|
4
|
+
import { millisecondsToSeconds, mouseMoveEvent, mouseLeaveEvent } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Constants.js";
|
|
5
|
+
import { rangeColorToHsl, rgbToHsl, colorMix } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/ColorUtils.js";
|
|
6
|
+
import { itemFromSingleOrMultiple, divMode, isInArray, divModeExecute, isDivModeEnabled } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js";
|
|
7
|
+
import { ExternalInteractorBase } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js";
|
|
8
|
+
import { getDistance, getRangeMax } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js";
|
|
9
|
+
import { DivType } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Enums/Types/DivType.js";
|
|
10
|
+
import { Circle, Rectangle } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/Ranges.js";
|
|
11
|
+
const bubbleMode = "bubble", minDistance = 0, defaultClickTime = 0, double = 2, defaultOpacity = 1, ratioOffset = 1, defaultBubbleValue = 0, minRatio = 0, half = 0.5, defaultRatio = 1;
|
|
12
|
+
class Bubbler extends ExternalInteractorBase {
|
|
13
|
+
constructor(container, engine) {
|
|
14
|
+
super(container);
|
|
15
|
+
this._clickBubble = () => {
|
|
16
|
+
var _a;
|
|
17
|
+
const container2 = this.container, options = container2.actualOptions, mouseClickPos = container2.interactivity.mouse.clickPosition, bubbleOptions = options.interactivity.modes.bubble;
|
|
18
|
+
if (!bubbleOptions || !mouseClickPos) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (!container2.bubble) {
|
|
22
|
+
container2.bubble = {};
|
|
23
|
+
}
|
|
24
|
+
const distance = container2.retina.bubbleModeDistance;
|
|
25
|
+
if (!distance || distance < minDistance) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const query = container2.particles.quadTree.queryCircle(mouseClickPos, distance, (p) => this.isEnabled(p)), { bubble } = container2;
|
|
29
|
+
for (const particle of query) {
|
|
30
|
+
if (!bubble.clicking) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
particle.bubble.inRange = !bubble.durationEnd;
|
|
34
|
+
const pos = particle.getPosition(), distMouse = getDistance(pos, mouseClickPos), timeSpent = ((/* @__PURE__ */ new Date()).getTime() - (container2.interactivity.mouse.clickTime ?? defaultClickTime)) / millisecondsToSeconds;
|
|
35
|
+
if (timeSpent > bubbleOptions.duration) {
|
|
36
|
+
bubble.durationEnd = true;
|
|
37
|
+
}
|
|
38
|
+
if (timeSpent > bubbleOptions.duration * double) {
|
|
39
|
+
bubble.clicking = false;
|
|
40
|
+
bubble.durationEnd = false;
|
|
41
|
+
}
|
|
42
|
+
const sizeData = {
|
|
43
|
+
bubbleObj: {
|
|
44
|
+
optValue: container2.retina.bubbleModeSize,
|
|
45
|
+
value: particle.bubble.radius
|
|
46
|
+
},
|
|
47
|
+
particlesObj: {
|
|
48
|
+
optValue: getRangeMax(particle.options.size.value) * container2.retina.pixelRatio,
|
|
49
|
+
value: particle.size.value
|
|
50
|
+
},
|
|
51
|
+
type: ProcessBubbleType.size
|
|
52
|
+
};
|
|
53
|
+
this._process(particle, distMouse, timeSpent, sizeData);
|
|
54
|
+
const opacityData = {
|
|
55
|
+
bubbleObj: {
|
|
56
|
+
optValue: bubbleOptions.opacity,
|
|
57
|
+
value: particle.bubble.opacity
|
|
58
|
+
},
|
|
59
|
+
particlesObj: {
|
|
60
|
+
optValue: getRangeMax(particle.options.opacity.value),
|
|
61
|
+
value: ((_a = particle.opacity) == null ? void 0 : _a.value) ?? defaultOpacity
|
|
62
|
+
},
|
|
63
|
+
type: ProcessBubbleType.opacity
|
|
64
|
+
};
|
|
65
|
+
this._process(particle, distMouse, timeSpent, opacityData);
|
|
66
|
+
if (!bubble.durationEnd && distMouse <= distance) {
|
|
67
|
+
this._hoverBubbleColor(particle, distMouse);
|
|
68
|
+
} else {
|
|
69
|
+
delete particle.bubble.color;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
this._hoverBubble = () => {
|
|
74
|
+
const container2 = this.container, mousePos = container2.interactivity.mouse.position, distance = container2.retina.bubbleModeDistance;
|
|
75
|
+
if (!distance || distance < minDistance || !mousePos) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const query = container2.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));
|
|
79
|
+
for (const particle of query) {
|
|
80
|
+
particle.bubble.inRange = true;
|
|
81
|
+
const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos), ratio = ratioOffset - pointDistance / distance;
|
|
82
|
+
if (pointDistance <= distance) {
|
|
83
|
+
if (ratio >= minRatio && container2.interactivity.status === mouseMoveEvent) {
|
|
84
|
+
this._hoverBubbleSize(particle, ratio);
|
|
85
|
+
this._hoverBubbleOpacity(particle, ratio);
|
|
86
|
+
this._hoverBubbleColor(particle, ratio);
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
this.reset(particle);
|
|
90
|
+
}
|
|
91
|
+
if (container2.interactivity.status === mouseLeaveEvent) {
|
|
92
|
+
this.reset(particle);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
this._hoverBubbleColor = (particle, ratio, divBubble) => {
|
|
97
|
+
const options = this.container.actualOptions, bubbleOptions = divBubble ?? options.interactivity.modes.bubble;
|
|
98
|
+
if (!bubbleOptions) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!particle.bubble.finalColor) {
|
|
102
|
+
const modeColor = bubbleOptions.color;
|
|
103
|
+
if (!modeColor) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const bubbleColor = itemFromSingleOrMultiple(modeColor);
|
|
107
|
+
particle.bubble.finalColor = rangeColorToHsl(this._engine, bubbleColor);
|
|
108
|
+
}
|
|
109
|
+
if (!particle.bubble.finalColor) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (bubbleOptions.mix) {
|
|
113
|
+
particle.bubble.color = void 0;
|
|
114
|
+
const pColor = particle.getFillColor();
|
|
115
|
+
particle.bubble.color = pColor ? rgbToHsl(colorMix(pColor, particle.bubble.finalColor, ratioOffset - ratio, ratio)) : particle.bubble.finalColor;
|
|
116
|
+
} else {
|
|
117
|
+
particle.bubble.color = particle.bubble.finalColor;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
this._hoverBubbleOpacity = (particle, ratio, divBubble) => {
|
|
121
|
+
var _a, _b;
|
|
122
|
+
const container2 = this.container, options = container2.actualOptions, modeOpacity = (divBubble == null ? void 0 : divBubble.opacity) ?? ((_a = options.interactivity.modes.bubble) == null ? void 0 : _a.opacity);
|
|
123
|
+
if (!modeOpacity) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const optOpacity = particle.options.opacity.value, pOpacity = ((_b = particle.opacity) == null ? void 0 : _b.value) ?? defaultOpacity, opacity = calculateBubbleValue(pOpacity, modeOpacity, getRangeMax(optOpacity), ratio);
|
|
127
|
+
if (opacity !== void 0) {
|
|
128
|
+
particle.bubble.opacity = opacity;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
this._hoverBubbleSize = (particle, ratio, divBubble) => {
|
|
132
|
+
const container2 = this.container, modeSize = (divBubble == null ? void 0 : divBubble.size) ? divBubble.size * container2.retina.pixelRatio : container2.retina.bubbleModeSize;
|
|
133
|
+
if (modeSize === void 0) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const optSize = getRangeMax(particle.options.size.value) * container2.retina.pixelRatio, pSize = particle.size.value, size = calculateBubbleValue(pSize, modeSize, optSize, ratio);
|
|
137
|
+
if (size !== void 0) {
|
|
138
|
+
particle.bubble.radius = size;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
this._process = (particle, distMouse, timeSpent, data) => {
|
|
142
|
+
const container2 = this.container, bubbleParam = data.bubbleObj.optValue, options = container2.actualOptions, bubbleOptions = options.interactivity.modes.bubble;
|
|
143
|
+
if (!bubbleOptions || bubbleParam === void 0) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
const bubbleDuration = bubbleOptions.duration, bubbleDistance = container2.retina.bubbleModeDistance, particlesParam = data.particlesObj.optValue, pObjBubble = data.bubbleObj.value, pObj = data.particlesObj.value ?? defaultBubbleValue, type = data.type;
|
|
147
|
+
if (!bubbleDistance || bubbleDistance < minDistance || bubbleParam === particlesParam) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (!container2.bubble) {
|
|
151
|
+
container2.bubble = {};
|
|
152
|
+
}
|
|
153
|
+
if (container2.bubble.durationEnd) {
|
|
154
|
+
if (pObjBubble) {
|
|
155
|
+
if (type === ProcessBubbleType.size) {
|
|
156
|
+
delete particle.bubble.radius;
|
|
157
|
+
}
|
|
158
|
+
if (type === ProcessBubbleType.opacity) {
|
|
159
|
+
delete particle.bubble.opacity;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
if (distMouse <= bubbleDistance) {
|
|
164
|
+
const obj = pObjBubble ?? pObj;
|
|
165
|
+
if (obj !== bubbleParam) {
|
|
166
|
+
const value = pObj - timeSpent * (pObj - bubbleParam) / bubbleDuration;
|
|
167
|
+
if (type === ProcessBubbleType.size) {
|
|
168
|
+
particle.bubble.radius = value;
|
|
169
|
+
}
|
|
170
|
+
if (type === ProcessBubbleType.opacity) {
|
|
171
|
+
particle.bubble.opacity = value;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
} else {
|
|
175
|
+
if (type === ProcessBubbleType.size) {
|
|
176
|
+
delete particle.bubble.radius;
|
|
177
|
+
}
|
|
178
|
+
if (type === ProcessBubbleType.opacity) {
|
|
179
|
+
delete particle.bubble.opacity;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
this._singleSelectorHover = (delta, selector, div) => {
|
|
185
|
+
const container2 = this.container, selectors = document.querySelectorAll(selector), bubble = container2.actualOptions.interactivity.modes.bubble;
|
|
186
|
+
if (!bubble || !selectors.length) {
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
selectors.forEach((item) => {
|
|
190
|
+
const elem = item, pxRatio = container2.retina.pixelRatio, pos = {
|
|
191
|
+
x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,
|
|
192
|
+
y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio
|
|
193
|
+
}, repulseRadius = elem.offsetWidth * half * pxRatio, area = div.type === DivType.circle ? new Circle(pos.x, pos.y, repulseRadius) : new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), query = container2.particles.quadTree.query(area, (p) => this.isEnabled(p));
|
|
194
|
+
for (const particle of query) {
|
|
195
|
+
if (!area.contains(particle.getPosition())) {
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
particle.bubble.inRange = true;
|
|
199
|
+
const divs = bubble.divs, divBubble = divMode(divs, elem);
|
|
200
|
+
if (!particle.bubble.div || particle.bubble.div !== elem) {
|
|
201
|
+
this.clear(particle, delta, true);
|
|
202
|
+
particle.bubble.div = elem;
|
|
203
|
+
}
|
|
204
|
+
this._hoverBubbleSize(particle, defaultRatio, divBubble);
|
|
205
|
+
this._hoverBubbleOpacity(particle, defaultRatio, divBubble);
|
|
206
|
+
this._hoverBubbleColor(particle, defaultRatio, divBubble);
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
};
|
|
210
|
+
this._engine = engine;
|
|
211
|
+
if (!container.bubble) {
|
|
212
|
+
container.bubble = {};
|
|
213
|
+
}
|
|
214
|
+
this.handleClickMode = (mode) => {
|
|
215
|
+
if (mode !== bubbleMode) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
if (!container.bubble) {
|
|
219
|
+
container.bubble = {};
|
|
220
|
+
}
|
|
221
|
+
container.bubble.clicking = true;
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
clear(particle, delta, force) {
|
|
225
|
+
if (particle.bubble.inRange && !force) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
delete particle.bubble.div;
|
|
229
|
+
delete particle.bubble.opacity;
|
|
230
|
+
delete particle.bubble.radius;
|
|
231
|
+
delete particle.bubble.color;
|
|
232
|
+
}
|
|
233
|
+
init() {
|
|
234
|
+
const container = this.container, bubble = container.actualOptions.interactivity.modes.bubble;
|
|
235
|
+
if (!bubble) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
container.retina.bubbleModeDistance = bubble.distance * container.retina.pixelRatio;
|
|
239
|
+
if (bubble.size !== void 0) {
|
|
240
|
+
container.retina.bubbleModeSize = bubble.size * container.retina.pixelRatio;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
interact(delta) {
|
|
244
|
+
const options = this.container.actualOptions, events = options.interactivity.events, onHover = events.onHover, onClick = events.onClick, hoverEnabled = onHover.enable, hoverMode = onHover.mode, clickEnabled = onClick.enable, clickMode = onClick.mode, divs = events.onDiv;
|
|
245
|
+
if (hoverEnabled && isInArray(bubbleMode, hoverMode)) {
|
|
246
|
+
this._hoverBubble();
|
|
247
|
+
} else if (clickEnabled && isInArray(bubbleMode, clickMode)) {
|
|
248
|
+
this._clickBubble();
|
|
249
|
+
} else {
|
|
250
|
+
divModeExecute(bubbleMode, divs, (selector, div) => this._singleSelectorHover(delta, selector, div));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
isEnabled(particle) {
|
|
254
|
+
const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = ((particle == null ? void 0 : particle.interactivity) ?? options.interactivity).events, { onClick, onDiv, onHover } = events, divBubble = isDivModeEnabled(bubbleMode, onDiv);
|
|
255
|
+
if (!(divBubble || onHover.enable && !!mouse.position || onClick.enable && mouse.clickPosition)) {
|
|
256
|
+
return false;
|
|
257
|
+
}
|
|
258
|
+
return isInArray(bubbleMode, onHover.mode) || isInArray(bubbleMode, onClick.mode) || divBubble;
|
|
259
|
+
}
|
|
260
|
+
loadModeOptions(options, ...sources) {
|
|
261
|
+
if (!options.bubble) {
|
|
262
|
+
options.bubble = new Bubble();
|
|
263
|
+
}
|
|
264
|
+
for (const source of sources) {
|
|
265
|
+
options.bubble.load(source == null ? void 0 : source.bubble);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
reset(particle) {
|
|
269
|
+
particle.bubble.inRange = false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
export {
|
|
273
|
+
Bubbler
|
|
274
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var ProcessBubbleType;
|
|
2
|
+
(function(ProcessBubbleType2) {
|
|
3
|
+
ProcessBubbleType2["color"] = "color";
|
|
4
|
+
ProcessBubbleType2["opacity"] = "opacity";
|
|
5
|
+
ProcessBubbleType2["size"] = "size";
|
|
6
|
+
})(ProcessBubbleType || (ProcessBubbleType = {}));
|
|
7
|
+
export {
|
|
8
|
+
ProcessBubbleType
|
|
9
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BubbleBase } from "./BubbleBase.js";
|
|
2
|
+
import { BubbleDiv } from "./BubbleDiv.js";
|
|
3
|
+
import { isNull } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js";
|
|
4
|
+
import { executeOnSingleOrMultiple } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js";
|
|
5
|
+
class Bubble extends BubbleBase {
|
|
6
|
+
load(data) {
|
|
7
|
+
super.load(data);
|
|
8
|
+
if (isNull(data)) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
this.divs = executeOnSingleOrMultiple(data.divs, (div) => {
|
|
12
|
+
const tmp = new BubbleDiv();
|
|
13
|
+
tmp.load(div);
|
|
14
|
+
return tmp;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
Bubble
|
|
20
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { isNull, isArray } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js";
|
|
2
|
+
import { OptionsColor } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Options/Classes/OptionsColor.js";
|
|
3
|
+
import { executeOnSingleOrMultiple } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js";
|
|
4
|
+
class BubbleBase {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.distance = 200;
|
|
7
|
+
this.duration = 0.4;
|
|
8
|
+
this.mix = false;
|
|
9
|
+
}
|
|
10
|
+
load(data) {
|
|
11
|
+
if (isNull(data)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (data.distance !== void 0) {
|
|
15
|
+
this.distance = data.distance;
|
|
16
|
+
}
|
|
17
|
+
if (data.duration !== void 0) {
|
|
18
|
+
this.duration = data.duration;
|
|
19
|
+
}
|
|
20
|
+
if (data.mix !== void 0) {
|
|
21
|
+
this.mix = data.mix;
|
|
22
|
+
}
|
|
23
|
+
if (data.opacity !== void 0) {
|
|
24
|
+
this.opacity = data.opacity;
|
|
25
|
+
}
|
|
26
|
+
if (data.color !== void 0) {
|
|
27
|
+
const sourceColor = isArray(this.color) ? void 0 : this.color;
|
|
28
|
+
this.color = executeOnSingleOrMultiple(data.color, (color) => {
|
|
29
|
+
return OptionsColor.create(sourceColor, color);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
if (data.size !== void 0) {
|
|
33
|
+
this.size = data.size;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
BubbleBase
|
|
39
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BubbleBase } from "./BubbleBase.js";
|
|
2
|
+
import { isNull } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js";
|
|
3
|
+
class BubbleDiv extends BubbleBase {
|
|
4
|
+
constructor() {
|
|
5
|
+
super();
|
|
6
|
+
this.selectors = [];
|
|
7
|
+
}
|
|
8
|
+
load(data) {
|
|
9
|
+
super.load(data);
|
|
10
|
+
if (isNull(data)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (data.selectors !== void 0) {
|
|
14
|
+
this.selectors = data.selectors;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
BubbleDiv
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clamp } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/NumberUtils.js";
|
|
2
|
+
function calculateBubbleValue(particleValue, modeValue, optionsValue, ratio) {
|
|
3
|
+
if (modeValue >= optionsValue) {
|
|
4
|
+
const value = particleValue + (modeValue - optionsValue) * ratio;
|
|
5
|
+
return clamp(value, particleValue, modeValue);
|
|
6
|
+
} else if (modeValue < optionsValue) {
|
|
7
|
+
const value = particleValue - (optionsValue - modeValue) * ratio;
|
|
8
|
+
return clamp(value, modeValue, particleValue);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
calculateBubbleValue
|
|
13
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Bubbler } from "./Bubbler.js";
|
|
2
|
+
async function loadExternalBubbleInteraction(engine, refresh = true) {
|
|
3
|
+
engine.checkVersion("3.9.1");
|
|
4
|
+
await engine.addInteractor("externalBubble", (container) => {
|
|
5
|
+
return Promise.resolve(new Bubbler(container, engine));
|
|
6
|
+
}, refresh);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
loadExternalBubbleInteraction
|
|
10
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Connect } from "./Options/Classes/Connect.js";
|
|
2
|
+
import { drawConnection } from "./Utils.js";
|
|
3
|
+
import { ExternalInteractorBase } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Core/Utils/ExternalInteractorBase.js";
|
|
4
|
+
import { isInArray } from "../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/Utils.js";
|
|
5
|
+
const connectMode = "connect", minDistance = 0;
|
|
6
|
+
class Connector extends ExternalInteractorBase {
|
|
7
|
+
constructor(container) {
|
|
8
|
+
super(container);
|
|
9
|
+
}
|
|
10
|
+
clear() {
|
|
11
|
+
}
|
|
12
|
+
init() {
|
|
13
|
+
const container = this.container, connect = container.actualOptions.interactivity.modes.connect;
|
|
14
|
+
if (!connect) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
container.retina.connectModeDistance = connect.distance * container.retina.pixelRatio;
|
|
18
|
+
container.retina.connectModeRadius = connect.radius * container.retina.pixelRatio;
|
|
19
|
+
}
|
|
20
|
+
interact() {
|
|
21
|
+
const container = this.container, options = container.actualOptions;
|
|
22
|
+
if (options.interactivity.events.onHover.enable && container.interactivity.status === "pointermove") {
|
|
23
|
+
const mousePos = container.interactivity.mouse.position, { connectModeDistance, connectModeRadius } = container.retina;
|
|
24
|
+
if (!connectModeDistance || connectModeDistance < minDistance || !connectModeRadius || connectModeRadius < minDistance || !mousePos) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const distance = Math.abs(connectModeRadius), query = container.particles.quadTree.queryCircle(mousePos, distance, (p) => this.isEnabled(p));
|
|
28
|
+
query.forEach((p1, i) => {
|
|
29
|
+
const pos1 = p1.getPosition(), indexOffset = 1;
|
|
30
|
+
for (const p2 of query.slice(i + indexOffset)) {
|
|
31
|
+
const pos2 = p2.getPosition(), distMax = Math.abs(connectModeDistance), xDiff = Math.abs(pos1.x - pos2.x), yDiff = Math.abs(pos1.y - pos2.y);
|
|
32
|
+
if (xDiff < distMax && yDiff < distMax) {
|
|
33
|
+
drawConnection(container, p1, p2);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
isEnabled(particle) {
|
|
40
|
+
const container = this.container, mouse = container.interactivity.mouse, events = ((particle == null ? void 0 : particle.interactivity) ?? container.actualOptions.interactivity).events;
|
|
41
|
+
if (!(events.onHover.enable && mouse.position)) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
return isInArray(connectMode, events.onHover.mode);
|
|
45
|
+
}
|
|
46
|
+
loadModeOptions(options, ...sources) {
|
|
47
|
+
if (!options.connect) {
|
|
48
|
+
options.connect = new Connect();
|
|
49
|
+
}
|
|
50
|
+
for (const source of sources) {
|
|
51
|
+
options.connect.load(source == null ? void 0 : source.connect);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
reset() {
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
Connector
|
|
59
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ConnectLinks } from "./ConnectLinks.js";
|
|
2
|
+
import { isNull } from "../../../../../../../@tsparticles_engine@3.9.1/node_modules/@tsparticles/engine/browser/Utils/TypeUtils.js";
|
|
3
|
+
class Connect {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.distance = 80;
|
|
6
|
+
this.links = new ConnectLinks();
|
|
7
|
+
this.radius = 60;
|
|
8
|
+
}
|
|
9
|
+
load(data) {
|
|
10
|
+
if (isNull(data)) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (data.distance !== void 0) {
|
|
14
|
+
this.distance = data.distance;
|
|
15
|
+
}
|
|
16
|
+
this.links.load(data.links);
|
|
17
|
+
if (data.radius !== void 0) {
|
|
18
|
+
this.radius = data.radius;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
Connect
|
|
24
|
+
};
|