mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Merge pull request #63 from Gazoon007/feat/light-rays
Create <LightRays /> background
This commit is contained in:
26
src/constants/code/Backgrounds/lightRaysCode.ts
Normal file
26
src/constants/code/Backgrounds/lightRaysCode.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import code from '@content/Backgrounds/LightRays/LightRays.vue?raw';
|
||||
import { createCodeObject } from '@/types/code';
|
||||
|
||||
export const lightRays = createCodeObject(code, 'Backgrounds/LightRays', {
|
||||
installation: `npm install ogl`,
|
||||
usage: `<template>
|
||||
<div class="w-full h-[600px] relative">
|
||||
<LightRays
|
||||
rays-origin="top-center"
|
||||
rays-color="#00ffff"
|
||||
:rays-speed="1.5"
|
||||
:light-spread="0.8"
|
||||
:ray-length="1.2"
|
||||
:follow-mouse="true"
|
||||
:mouse-influence="0.1"
|
||||
:noise-amount="0.1"
|
||||
:distortion="0.05"
|
||||
class-name="custom-rays"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import LightRays from "./LightRays.vue";
|
||||
</script>`
|
||||
});
|
||||
Reference in New Issue
Block a user