From 20e76e75cf7179dadcc9b98aa31fc05abe258c50 Mon Sep 17 00:00:00 2001 From: David Haz Date: Fri, 18 Jul 2025 15:11:59 +0300 Subject: [PATCH] Migrate ScrollVelocity component --- src/constants/Categories.ts | 3 +- src/constants/Components.ts | 1 + .../code/TextAnimations/scrollVelocityCode.ts | 24 ++ .../ScrollVelocity/ScrollVelocity.vue | 236 ++++++++++++++++++ src/demo/Components/ChromaGridDemo.vue | 3 +- .../TextAnimations/ScrollVelocityDemo.vue | 132 ++++++++++ 6 files changed, 397 insertions(+), 2 deletions(-) create mode 100644 src/constants/code/TextAnimations/scrollVelocityCode.ts create mode 100644 src/content/TextAnimations/ScrollVelocity/ScrollVelocity.vue create mode 100644 src/demo/TextAnimations/ScrollVelocityDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index 1dadbea..e693c91 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -25,7 +25,8 @@ export const CATEGORIES = [ 'Scroll Float', 'Scroll Reveal', 'Rotating Text', - 'Glitch Text' + 'Glitch Text', + 'Scroll Velocity' ] }, { diff --git a/src/constants/Components.ts b/src/constants/Components.ts index 27f8cfa..d9b17b0 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -37,6 +37,7 @@ const textAnimations = { 'scroll-reveal': () => import("../demo/TextAnimations/ScrollRevealDemo.vue"), 'rotating-text': () => import("../demo/TextAnimations/RotatingTextDemo.vue"), 'glitch-text': () => import("../demo/TextAnimations/GlitchTextDemo.vue"), + 'scroll-velocity': () => import("../demo/TextAnimations/ScrollVelocityDemo.vue"), }; const components = { diff --git a/src/constants/code/TextAnimations/scrollVelocityCode.ts b/src/constants/code/TextAnimations/scrollVelocityCode.ts new file mode 100644 index 0000000..088ba86 --- /dev/null +++ b/src/constants/code/TextAnimations/scrollVelocityCode.ts @@ -0,0 +1,24 @@ +import code from '@content/TextAnimations/ScrollVelocity/ScrollVelocity.vue?raw'; +import type { CodeObject } from '../../../types/code'; + +export const scrollVelocity: CodeObject = { + cli: `npx jsrepo add https://vue-bits.dev/ui/TextAnimations/ScrollVelocity`, + installation: `npm install gsap`, + usage: ` + +`, + code +}; diff --git a/src/content/TextAnimations/ScrollVelocity/ScrollVelocity.vue b/src/content/TextAnimations/ScrollVelocity/ScrollVelocity.vue new file mode 100644 index 0000000..74ca0c6 --- /dev/null +++ b/src/content/TextAnimations/ScrollVelocity/ScrollVelocity.vue @@ -0,0 +1,236 @@ + + + diff --git a/src/demo/Components/ChromaGridDemo.vue b/src/demo/Components/ChromaGridDemo.vue index bebf292..96f4b09 100644 --- a/src/demo/Components/ChromaGridDemo.vue +++ b/src/demo/Components/ChromaGridDemo.vue @@ -1,7 +1,7 @@