Add Dither background component

This commit is contained in:
onmax
2025-07-19 12:22:28 +02:00
parent 8cc0e53874
commit 8cf5425515
5 changed files with 569 additions and 0 deletions

View File

@@ -80,6 +80,7 @@ export const CATEGORIES = [
subcategories: [
'Aurora',
'Beams',
'Dither',
'Dot Grid',
'Hyperspeed',
'Ripple Grid',

View File

@@ -75,6 +75,7 @@ const backgrounds = {
'threads': () => import('../demo/Backgrounds/ThreadsDemo.vue'),
'aurora': () => import('../demo/Backgrounds/AuroraDemo.vue'),
'beams': () => import('../demo/Backgrounds/BeamsDemo.vue'),
'dither': () => import('../demo/Backgrounds/DitherDemo.vue'),
'grid-motion': () => import('../demo/Backgrounds/GridMotionDemo.vue'),
'hyperspeed': () => import('../demo/Backgrounds/HyperspeedDemo.vue'),
'balatro': () => import('../demo/Backgrounds/BalatroDemo.vue'),

View File

@@ -0,0 +1,27 @@
import code from '@content/Backgrounds/Dither/Dither.vue?raw';
import type { CodeObject } from '../../../types/code';
export const dither: CodeObject = {
cli: `npx jsrepo add https://vue-bits.dev/ui/Backgrounds/Dither`,
installation: `npm install ogl`,
usage: `<template>
<div class="relative w-full h-[500px] overflow-hidden">
<Dither
:wave-speed="0.05"
:wave-frequency="3"
:wave-amplitude="0.3"
:wave-color="[0.5, 0.5, 0.5]"
:color-num="4"
:pixel-size="2"
:disable-animation="false"
:enable-mouse-interaction="true"
:mouse-radius="1"
/>
</div>
</template>
<script setup lang="ts">
import Dither from "./Dither.vue";
</script>`,
code
};