From 6dc1ac4962182c8deee41a5b87d0942334e4f7d8 Mon Sep 17 00:00:00 2001 From: Utkarsh-Singhal-26 Date: Mon, 21 Jul 2025 10:24:33 +0530 Subject: [PATCH] Added background --- src/constants/Categories.ts | 5 +- src/constants/Components.ts | 1 + src/constants/code/Backgrounds/galaxyCode.ts | 28 ++ src/content/Backgrounds/Galaxy/Galaxy.vue | 357 +++++++++++++++++++ src/demo/Backgrounds/GalaxyDemo.vue | 182 ++++++++++ 5 files changed, 571 insertions(+), 2 deletions(-) create mode 100644 src/constants/code/Backgrounds/galaxyCode.ts create mode 100644 src/content/Backgrounds/Galaxy/Galaxy.vue create mode 100644 src/demo/Backgrounds/GalaxyDemo.vue diff --git a/src/constants/Categories.ts b/src/constants/Categories.ts index a71d25e..3227adc 100644 --- a/src/constants/Categories.ts +++ b/src/constants/Categories.ts @@ -1,5 +1,5 @@ // Highlighted sidebar items -export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento']; +export const NEW = ['Target Cursor', 'Ripple Grid', 'Magic Bento', 'Galaxy']; export const UPDATED = []; // Used for main sidebar navigation @@ -103,7 +103,8 @@ export const CATEGORIES = [ 'Orb', 'Ballpit', 'Liquid Chrome', - 'Grid Distortion' + 'Grid Distortion', + 'Galaxy', ] } ]; diff --git a/src/constants/Components.ts b/src/constants/Components.ts index 83b7d15..05ddf75 100644 --- a/src/constants/Components.ts +++ b/src/constants/Components.ts @@ -90,6 +90,7 @@ const backgrounds = { 'liquid-chrome': () => import('../demo/Backgrounds/LiquidChromeDemo.vue'), 'grid-distortion': () => import('../demo/Backgrounds/GridDistortionDemo.vue'), 'ripple-grid': () => import('../demo/Backgrounds/RippleGridDemo.vue'), + 'galaxy': () => import('../demo/Backgrounds/GalaxyDemo.vue'), }; export const componentMap = { diff --git a/src/constants/code/Backgrounds/galaxyCode.ts b/src/constants/code/Backgrounds/galaxyCode.ts new file mode 100644 index 0000000..08e5f66 --- /dev/null +++ b/src/constants/code/Backgrounds/galaxyCode.ts @@ -0,0 +1,28 @@ +import code from '@content/Backgrounds/Galaxy/Galaxy.vue?raw'; +import { createCodeObject } from '../../../types/code'; + +export const galaxy = createCodeObject(code, 'Backgrounds/Galaxy', { + installation: `npm install ogl`, + usage: ` + +` +}); diff --git a/src/content/Backgrounds/Galaxy/Galaxy.vue b/src/content/Backgrounds/Galaxy/Galaxy.vue new file mode 100644 index 0000000..f201bf3 --- /dev/null +++ b/src/content/Backgrounds/Galaxy/Galaxy.vue @@ -0,0 +1,357 @@ + + + diff --git a/src/demo/Backgrounds/GalaxyDemo.vue b/src/demo/Backgrounds/GalaxyDemo.vue new file mode 100644 index 0000000..975344b --- /dev/null +++ b/src/demo/Backgrounds/GalaxyDemo.vue @@ -0,0 +1,182 @@ + + + + +