Added <GridDistortion /> background

This commit is contained in:
Utkarsh-Singhal-26
2025-07-16 18:30:37 +05:30
parent 53259ffe13
commit d48f0f7967
5 changed files with 407 additions and 1 deletions

View File

@@ -90,7 +90,8 @@ export const CATEGORIES = [
'Threads',
'Grid Motion',
'Orb',
'Ballpit'
'Ballpit',
'Grid Distortion'
]
}
];

View File

@@ -77,6 +77,7 @@ const backgrounds = {
'balatro': () => import('../demo/Backgrounds/BalatroDemo.vue'),
'orb': () => import('../demo/Backgrounds/OrbDemo.vue'),
'ballpit': () => import('../demo/Backgrounds/BallpitDemo.vue'),
'grid-distortion': () => import('../demo/Backgrounds/GridDistortionDemo.vue'),
};
export const componentMap = {

View File

@@ -0,0 +1,24 @@
import code from '@content/Backgrounds/GridDistortion/GridDistortion.vue?raw';
import type { CodeObject } from '../../../types/code';
export const gridDistortion: CodeObject = {
cli: `npx jsrepo add https://vue-bits.dev/ui/Backgrounds/GridDistortion`,
installation: `npm i three`,
usage: `<template>
<div class="relative w-full h-[600px]">
<GridDistortion
imageSrc="https://picsum.photos/1920/1080?grayscale"
:grid="10"
:mouse="0.1"
:strength="0.15
:relaxation="0.9"
className="custom-class"
/>
</div>
</template>
<script setup lang="ts">
import GridDistortion from "./GridDistortion.vue";
</script>`,
code
};