From 48048e875f77dc2a95c59b14e69547b62a20a19b Mon Sep 17 00:00:00 2001 From: onmax Date: Fri, 11 Jul 2025 20:10:08 +0200 Subject: [PATCH 1/7] Add Beams component and demo with associated code examples --- src/constants/Components.ts | 1 + src/constants/code/Backgrounds/beamsCode.ts | 37 ++ src/content/Backgrounds/Beams/Beams.vue | 469 ++++++++++++++++++++ src/demo/Backgrounds/BeamsDemo.vue | 183 ++++++++ 4 files changed, 690 insertions(+) create mode 100644 src/constants/code/Backgrounds/beamsCode.ts create mode 100644 src/content/Backgrounds/Beams/Beams.vue create mode 100644 src/demo/Backgrounds/BeamsDemo.vue diff --git a/src/constants/Components.ts b/src/constants/Components.ts index ac70fc8..d1c9376 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -54,6 +54,7 @@ const backgrounds = { 'iridescence': () => import("../demo/Backgrounds/IridescenceDemo.vue"), 'threads': () => import("../demo/Backgrounds/ThreadsDemo.vue"), 'aurora': () => import("../demo/Backgrounds/AuroraDemo.vue"), + 'beams': () => import("../demo/Backgrounds/BeamsDemo.vue"), }; export const componentMap = { diff --git a/src/constants/code/Backgrounds/beamsCode.ts b/src/constants/code/Backgrounds/beamsCode.ts new file mode 100644 index 0000000..8fe6968 --- /dev/null +++ b/src/constants/code/Backgrounds/beamsCode.ts @@ -0,0 +1,37 @@ +import code from '@content/Backgrounds/Beams/Beams.vue?raw' +import type { CodeObject } from '../../../types/code' + +export const beams: CodeObject = { + cli: `npx jsrepo add https://vue-bits.dev/ui/Backgrounds/Beams`, + installation: `npm install three`, + usage: ` + + + +`, + code +} diff --git a/src/content/Backgrounds/Beams/Beams.vue b/src/content/Backgrounds/Beams/Beams.vue new file mode 100644 index 0000000..4f8585f --- /dev/null +++ b/src/content/Backgrounds/Beams/Beams.vue @@ -0,0 +1,469 @@ + + + + + diff --git a/src/demo/Backgrounds/BeamsDemo.vue b/src/demo/Backgrounds/BeamsDemo.vue new file mode 100644 index 0000000..17828ab --- /dev/null +++ b/src/demo/Backgrounds/BeamsDemo.vue @@ -0,0 +1,183 @@ + + + + + From 4d38c713ab8444ab1fdd0f8b6b44188a83c1459c Mon Sep 17 00:00:00 2001 From: onmax Date: Fri, 11 Jul 2025 20:28:53 +0200 Subject: [PATCH 2/7] address PR comments for Beams component --- src/constants/Categories.ts | 3 ++- src/constants/code/Backgrounds/beamsCode.ts | 1 - src/content/Backgrounds/Beams/Beams.vue | 14 -------------- src/demo/Backgrounds/BeamsDemo.vue | 5 +---- 4 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index 646629f..9234c53 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -59,6 +59,7 @@ export const CATEGORIES = [ name: 'Backgrounds', subcategories: [ 'Aurora', + 'Beams', 'Dot Grid', 'Silk', 'Lightning', @@ -70,4 +71,4 @@ export const CATEGORIES = [ 'Threads', ], } -]; \ No newline at end of file +]; diff --git a/src/constants/code/Backgrounds/beamsCode.ts b/src/constants/code/Backgrounds/beamsCode.ts index 8fe6968..753e6d9 100644 --- a/src/constants/code/Backgrounds/beamsCode.ts +++ b/src/constants/code/Backgrounds/beamsCode.ts @@ -15,7 +15,6 @@ export const beams: CodeObject = { :noise-intensity="1.75" :scale="0.2" :rotation="0" - class="w-full h-full" /> diff --git a/src/content/Backgrounds/Beams/Beams.vue b/src/content/Backgrounds/Beams/Beams.vue index 4f8585f..48441d4 100644 --- a/src/content/Backgrounds/Beams/Beams.vue +++ b/src/content/Backgrounds/Beams/Beams.vue @@ -453,17 +453,3 @@ onUnmounted(() => { cleanup() }) - - diff --git a/src/demo/Backgrounds/BeamsDemo.vue b/src/demo/Backgrounds/BeamsDemo.vue index 17828ab..3907233 100644 --- a/src/demo/Backgrounds/BeamsDemo.vue +++ b/src/demo/Backgrounds/BeamsDemo.vue @@ -12,14 +12,11 @@ :noise-intensity="noiseIntensity" :scale="scale" :rotation="rotation" - class="w-full h-full" /> -
- -
+ Date: Fri, 11 Jul 2025 23:24:58 +0300 Subject: [PATCH 3/7] Fix footer text color --- src/components/landing/Footer/Footer.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/landing/Footer/Footer.css b/src/components/landing/Footer/Footer.css index aa49be4..69fa91e 100644 --- a/src/components/landing/Footer/Footer.css +++ b/src/components/landing/Footer/Footer.css @@ -39,7 +39,7 @@ .footer-description { font-size: 1rem; - color: rgba(161, 148, 184, 0.9); + color: rgba(148, 184, 164, 0.9); margin: 0; font-weight: 400; display: flex; @@ -66,7 +66,7 @@ .footer-copyright { font-size: 0.85rem; - color: rgba(161, 148, 184, 0.7); + color: rgba(148, 184, 163, 0.7); margin: 0; font-weight: 400; } From f19ec4d1ef67a625094d035b8934f0191b67eb99 Mon Sep 17 00:00:00 2001 From: onmax Date: Sat, 12 Jul 2025 00:29:13 +0200 Subject: [PATCH 4/7] fix linter --- src/content/Backgrounds/Beams/Beams.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/Backgrounds/Beams/Beams.vue b/src/content/Backgrounds/Beams/Beams.vue index 48441d4..4cfde5e 100644 --- a/src/content/Backgrounds/Beams/Beams.vue +++ b/src/content/Backgrounds/Beams/Beams.vue @@ -375,7 +375,7 @@ const initThreeJS = () => { resize() - const animate = (time: number) => { + const animate = () => { animationId = requestAnimationFrame(animate) if (beamMesh && beamMesh.material) { @@ -389,7 +389,7 @@ const initThreeJS = () => { animationId = requestAnimationFrame(animate) - ;(container as any)._resizeObserver = resizeObserver + ;(container as HTMLDivElement & { _resizeObserver?: ResizeObserver })._resizeObserver = resizeObserver } const cleanup = () => { @@ -399,11 +399,11 @@ const cleanup = () => { } if (containerRef.value) { - const container = containerRef.value + const container = containerRef.value as HTMLDivElement & { _resizeObserver?: ResizeObserver } - if ((container as any)._resizeObserver) { - ;(container as any)._resizeObserver.disconnect() - delete (container as any)._resizeObserver + if (container._resizeObserver) { + container._resizeObserver.disconnect() + delete container._resizeObserver } if (renderer && renderer.domElement.parentNode === container) { From ea8a04eb3bccd15bf2aae8aa8e4a0e1b309e7c8f Mon Sep 17 00:00:00 2001 From: zubairrafi Date: Sat, 12 Jul 2025 02:44:24 +0600 Subject: [PATCH 5/7] Scroll Float added in text animation section Signed-off-by: zubairrafi --- src/constants/Categories.ts | 1 + src/constants/Components.ts | 1 + .../code/Components/scrollFloatCode.ts | 25 +++ .../ScrollFloat/ScrollFloat.vue | 141 +++++++++++++ src/demo/TextAnimations/ScrollFloatDemo.vue | 191 ++++++++++++++++++ 5 files changed, 359 insertions(+) create mode 100644 src/constants/code/Components/scrollFloatCode.ts create mode 100644 src/content/TextAnimations/ScrollFloat/ScrollFloat.vue create mode 100644 src/demo/TextAnimations/ScrollFloatDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index 9234c53..6dae674 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -19,6 +19,7 @@ export const CATEGORIES = [ 'Falling Text', 'Text Cursor', 'Decrypted Text', + 'Scroll Float' ] }, { diff --git a/src/constants/Components.ts b/src/constants/Components.ts index d1c9376..ea07b7e 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -23,6 +23,7 @@ const textAnimations = { 'falling-text': () => import("../demo/TextAnimations/FallingTextDemo.vue"), 'text-cursor': () => import("../demo/TextAnimations/TextCursorDemo.vue"), 'decrypted-text': () => import("../demo/TextAnimations/DecryptedTextDemo.vue"), + 'scroll-float': () => import("../demo/TextAnimations/ScrollFloatDemo.vue"), }; const components = { diff --git a/src/constants/code/Components/scrollFloatCode.ts b/src/constants/code/Components/scrollFloatCode.ts new file mode 100644 index 0000000..d4cd34b --- /dev/null +++ b/src/constants/code/Components/scrollFloatCode.ts @@ -0,0 +1,25 @@ +import code from '@content/TextAnimations/ScrollFloat/ScrollFloat.vue?raw' +import type { CodeObject } from '../../../types/code' + +export const scrollFloatCode: CodeObject = { + cli: `npx jsrepo add https://vue-bits.dev/ui/Components/ProfileCard`, + usage: ` + +`, + code +} \ No newline at end of file diff --git a/src/content/TextAnimations/ScrollFloat/ScrollFloat.vue b/src/content/TextAnimations/ScrollFloat/ScrollFloat.vue new file mode 100644 index 0000000..b12e5a4 --- /dev/null +++ b/src/content/TextAnimations/ScrollFloat/ScrollFloat.vue @@ -0,0 +1,141 @@ + + + + + \ No newline at end of file diff --git a/src/demo/TextAnimations/ScrollFloatDemo.vue b/src/demo/TextAnimations/ScrollFloatDemo.vue new file mode 100644 index 0000000..fc0eda0 --- /dev/null +++ b/src/demo/TextAnimations/ScrollFloatDemo.vue @@ -0,0 +1,191 @@ + + + + \ No newline at end of file From 936bca258a64682dbce501ebde85d851edc816fe Mon Sep 17 00:00:00 2001 From: zubairrafi Date: Sat, 12 Jul 2025 11:26:58 +0600 Subject: [PATCH 6/7] Issue resolved Signed-off-by: zubairrafi --- .../code/Components/scrollFloatCode.ts | 2 +- .../ScrollFloat/ScrollFloat.vue | 252 ++++++++---------- src/demo/TextAnimations/ScrollFloatDemo.vue | 2 - 3 files changed, 118 insertions(+), 138 deletions(-) diff --git a/src/constants/code/Components/scrollFloatCode.ts b/src/constants/code/Components/scrollFloatCode.ts index d4cd34b..f7bba6c 100644 --- a/src/constants/code/Components/scrollFloatCode.ts +++ b/src/constants/code/Components/scrollFloatCode.ts @@ -2,7 +2,7 @@ import code from '@content/TextAnimations/ScrollFloat/ScrollFloat.vue?raw' import type { CodeObject } from '../../../types/code' export const scrollFloatCode: CodeObject = { - cli: `npx jsrepo add https://vue-bits.dev/ui/Components/ProfileCard`, + cli: `npx jsrepo add https://vue-bits.dev/ui/TextAnimations/ScrollFloat`, usage: ` - - - - \ No newline at end of file +}); + +watch( + [ + () => props.children, + () => props.scrollContainerRef, + () => props.animationDuration, + () => props.ease, + () => props.scrollStart, + () => props.scrollEnd, + () => props.stagger + ], + () => { + initializeAnimation(); + }, + { deep: true } +); + \ No newline at end of file diff --git a/src/demo/TextAnimations/ScrollFloatDemo.vue b/src/demo/TextAnimations/ScrollFloatDemo.vue index fc0eda0..82cbb4f 100644 --- a/src/demo/TextAnimations/ScrollFloatDemo.vue +++ b/src/demo/TextAnimations/ScrollFloatDemo.vue @@ -1,5 +1,4 @@