Added <Galaxy /> background

This commit is contained in:
Utkarsh-Singhal-26
2025-07-21 10:24:33 +05:30
parent 3b41d5e43a
commit 6dc1ac4962
5 changed files with 571 additions and 2 deletions

View File

@@ -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',
]
}
];

View File

@@ -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 = {

View File

@@ -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: `<template>
// Basic usage
<div class="relative w-full h-[600px]">
<Galaxy />
</div>
// With custom prop values
<div class="relative w-full h-[600px]">
<Galaxy
:mouse-repulsion="true"
:mouse-interaction="true"
:density="1.5"
:glow-intensity="0.5"
:saturation="0.8"
:hue-shift="240"
/>
</div>
</template>
<script setup lang="ts">
import Galaxy from "./Galaxy.vue";
</script>`
});