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:
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