Add Beams component and demo with associated code examples

This commit is contained in:
onmax
2025-07-11 20:10:08 +02:00
parent 064233db20
commit 48048e875f
4 changed files with 690 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ const backgrounds = {
'iridescence': () => import("../demo/Backgrounds/IridescenceDemo.vue"),
'threads': () => import("../demo/Backgrounds/ThreadsDemo.vue"),
'aurora': () => import("../demo/Backgrounds/AuroraDemo.vue"),
'beams': () => import("../demo/Backgrounds/BeamsDemo.vue"),
};
export const componentMap = {

View File

@@ -0,0 +1,37 @@
import code from '@content/Backgrounds/Beams/Beams.vue?raw'
import type { CodeObject } from '../../../types/code'
export const beams: CodeObject = {
cli: `npx jsrepo add https://vue-bits.dev/ui/Backgrounds/Beams`,
installation: `npm install three`,
usage: `<template>
<div class="beams-container">
<Beams
:beam-width="2"
:beam-height="15"
:beam-number="12"
:light-color="'#ffffff'"
:speed="2"
:noise-intensity="1.75"
:scale="0.2"
:rotation="0"
class="w-full h-full"
/>
</div>
</template>
<script setup lang="ts">
import Beams from "./Beams.vue";
</script>
<style scoped>
.beams-container {
width: 100%;
height: 500px;
position: relative;
overflow: hidden;
background: #000;
}
</style>`,
code
}