From b2ca79d4ab31556221a464bc176d3ab3e391a9f7 Mon Sep 17 00:00:00 2001 From: Utkarsh-Singhal-26 Date: Sun, 13 Jul 2025 16:22:51 +0530 Subject: [PATCH 1/3] Added animation --- src/constants/Categories.ts | 3 +- src/constants/Components.ts | 1 + .../code/Animations/blobCursorCode.ts | 32 ++ .../Animations/BlobCursor/BlobCursor.vue | 141 ++++++++ src/demo/Animations/BlobCursorDemo.vue | 307 ++++++++++++++++++ 5 files changed, 483 insertions(+), 1 deletion(-) create mode 100644 src/constants/code/Animations/blobCursorCode.ts create mode 100644 src/content/Animations/BlobCursor/BlobCursor.vue create mode 100644 src/demo/Animations/BlobCursorDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index b26b32f..1a4c567 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -42,7 +42,8 @@ export const CATEGORIES = [ 'Metallic Paint', 'Click Spark', 'Magnet', - 'Cubes' + 'Cubes', + 'Blob Cursor', ] }, { diff --git a/src/constants/Components.ts b/src/constants/Components.ts index 6437cbf..f511256 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -11,6 +11,7 @@ const animations = { 'cubes': () => import('../demo/Animations/CubesDemo.vue'), 'count-up': () => import('../demo/Animations/CountUpDemo.vue'), 'splash-cursor': () => import('../demo/Animations/SplashCursorDemo.vue'), + 'blob-cursor': () => import('../demo/Animations/BlobCursorDemo.vue'), }; const textAnimations = { diff --git a/src/constants/code/Animations/blobCursorCode.ts b/src/constants/code/Animations/blobCursorCode.ts new file mode 100644 index 0000000..1bf3db1 --- /dev/null +++ b/src/constants/code/Animations/blobCursorCode.ts @@ -0,0 +1,32 @@ +import code from '@/content/Animations/BlobCursor/BlobCursor.vue?raw'; +import type { CodeObject } from '../../../types/code'; + +export const blobCursor: CodeObject = { + cli: `npx jsrepo add https://vue-bits.dev/ui/Animations/BlobCursor`, + installation: `npm i gsap`, + usage: ` + +`, + code +}; diff --git a/src/content/Animations/BlobCursor/BlobCursor.vue b/src/content/Animations/BlobCursor/BlobCursor.vue new file mode 100644 index 0000000..896502a --- /dev/null +++ b/src/content/Animations/BlobCursor/BlobCursor.vue @@ -0,0 +1,141 @@ + + + diff --git a/src/demo/Animations/BlobCursorDemo.vue b/src/demo/Animations/BlobCursorDemo.vue new file mode 100644 index 0000000..4cd8fe3 --- /dev/null +++ b/src/demo/Animations/BlobCursorDemo.vue @@ -0,0 +1,307 @@ + + + From 93aa106a8b0f4e3b692402792e5cff5ba7c0a529 Mon Sep 17 00:00:00 2001 From: Utkarsh-Singhal-26 Date: Sun, 13 Jul 2025 19:56:26 +0530 Subject: [PATCH 2/3] Updated animation --- src/demo/Animations/BlobCursorDemo.vue | 38 ++++++-------------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/src/demo/Animations/BlobCursorDemo.vue b/src/demo/Animations/BlobCursorDemo.vue index 4cd8fe3..9bca87d 100644 --- a/src/demo/Animations/BlobCursorDemo.vue +++ b/src/demo/Animations/BlobCursorDemo.vue @@ -34,35 +34,9 @@
-
- - -
- -
- - -
- -
- - -
+ + +
-

+

SVG filters are not fully supported on Safari. Performance may vary.

@@ -230,7 +204,11 @@ import TabbedLayout from '../../components/common/TabbedLayout.vue'; import { blobCursor } from '../../constants/code/Animations/blobCursorCode'; import Customize from '../../components/common/Customize.vue'; import PreviewSlider from '../../components/common/PreviewSlider.vue'; +import PreviewColor from '../../components/common/PreviewColor.vue'; import BlobCursor from '../../content/Animations/BlobCursor/BlobCursor.vue'; +import { useForceRerender } from '@/composables/useForceRerender'; + +const { forceRerender } = useForceRerender(); const blobType = ref<'circle' | 'square'>('circle'); const fillColor = ref('#27FF64'); From 4e9411994d24e3f940f5558810c0374c69a775e3 Mon Sep 17 00:00:00 2001 From: David Haz Date: Sun, 13 Jul 2025 17:57:08 +0300 Subject: [PATCH 3/3] Adjust margin in PreviewColor --- src/components/common/PreviewColor.vue | 1 + src/demo/Animations/BlobCursorDemo.vue | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/components/common/PreviewColor.vue b/src/components/common/PreviewColor.vue index e8ff82a..20a8e60 100644 --- a/src/components/common/PreviewColor.vue +++ b/src/components/common/PreviewColor.vue @@ -27,6 +27,7 @@ const handleColorChange = (event: Event) => { display: flex; align-items: center; gap: 0.5rem; + margin-bottom: 1.5rem; } .color-label { diff --git a/src/demo/Animations/BlobCursorDemo.vue b/src/demo/Animations/BlobCursorDemo.vue index 9bca87d..0425f16 100644 --- a/src/demo/Animations/BlobCursorDemo.vue +++ b/src/demo/Animations/BlobCursorDemo.vue @@ -1,7 +1,7 @@