From 3981f39c5a533c49bc483f328026c4850eeb9e5d Mon Sep 17 00:00:00 2001 From: Alfarish Fizikri Date: Fri, 26 Dec 2025 15:32:50 +0700 Subject: [PATCH] Create animation --- src/constants/Categories.ts | 1 + src/constants/Components.ts | 1 + src/constants/Information.ts | 8 + .../code/Animations/pixelTrailCode.ts | 22 + .../Animations/PixelTrail/PixelTrail.vue | 419 ++++++++++++++++++ src/demo/Animations/PixelTrailDemo.vue | 93 ++++ 6 files changed, 544 insertions(+) create mode 100644 src/constants/code/Animations/pixelTrailCode.ts create mode 100644 src/content/Animations/PixelTrail/PixelTrail.vue create mode 100644 src/demo/Animations/PixelTrailDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index 7cd715b..c614e6a 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -55,6 +55,7 @@ export const CATEGORIES = [ 'Magnet Lines', 'Metallic Paint', 'Noise', + 'Pixel Trail', 'Pixel Transition', 'Ribbons', 'Shape Blur', diff --git a/src/constants/Components.ts b/src/constants/Components.ts index 57bf847..e830069 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -25,6 +25,7 @@ const animations = { 'gradual-blur': () => import('../demo/Animations/GradualBlurDemo.vue'), 'laser-flow': () => import('../demo/Animations/LaserFlowDemo.vue'), 'ghost-cursor': () => import('../demo/Animations/GhostCursorDemo.vue'), + 'pixel-trail': () => import('../demo/Animations/PixelTrailDemo.vue'), }; const textAnimations = { diff --git a/src/constants/Information.ts b/src/constants/Information.ts index 4fbadc5..89eb0fd 100644 --- a/src/constants/Information.ts +++ b/src/constants/Information.ts @@ -222,6 +222,14 @@ export const componentMetadata: ComponentMetadata = { docsUrl: 'https://vue-bits.dev/text-animations/count-up', tags: [] }, + 'Animations/PixelTrail': { + videoUrl: '/assets/videos/pixeltrail.webm', + description: 'Pixel grid trail effect that follows cursor movement with customizable gooey filter.', + category: 'Animations', + name: 'PixelTrail', + docsUrl: 'https://vue-bits.dev/animations/pixel-trail', + tags: [] + }, //! Text Animations ------------------------------------------------------------------------------------------------------------------------------- diff --git a/src/constants/code/Animations/pixelTrailCode.ts b/src/constants/code/Animations/pixelTrailCode.ts new file mode 100644 index 0000000..e43bde0 --- /dev/null +++ b/src/constants/code/Animations/pixelTrailCode.ts @@ -0,0 +1,22 @@ +import code from '@/content/Animations/PixelTrail/PixelTrail.vue?raw'; +import { createCodeObject } from '@/types/code'; + +export const pixelTrail = createCodeObject(code, 'Animations/PixelTrail', { + installation: `npm install three @types/three`, + usage: ` + +` +}); diff --git a/src/content/Animations/PixelTrail/PixelTrail.vue b/src/content/Animations/PixelTrail/PixelTrail.vue new file mode 100644 index 0000000..6fead33 --- /dev/null +++ b/src/content/Animations/PixelTrail/PixelTrail.vue @@ -0,0 +1,419 @@ + + + diff --git a/src/demo/Animations/PixelTrailDemo.vue b/src/demo/Animations/PixelTrailDemo.vue new file mode 100644 index 0000000..d600efb --- /dev/null +++ b/src/demo/Animations/PixelTrailDemo.vue @@ -0,0 +1,93 @@ + + +