mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Add Dither background component
This commit is contained in:
@@ -80,6 +80,7 @@ export const CATEGORIES = [
|
||||
subcategories: [
|
||||
'Aurora',
|
||||
'Beams',
|
||||
'Dither',
|
||||
'Dot Grid',
|
||||
'Hyperspeed',
|
||||
'Ripple Grid',
|
||||
|
||||
@@ -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'),
|
||||
|
||||
27
src/constants/code/Backgrounds/ditherCode.ts
Normal file
27
src/constants/code/Backgrounds/ditherCode.ts
Normal 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
|
||||
};
|
||||
Reference in New Issue
Block a user