mirror of
https://github.com/DavidHDev/vue-bits.git
synced 2026-03-07 14:39:30 -07:00
Added <Ballpit /> background
This commit is contained in:
@@ -90,6 +90,7 @@ export const CATEGORIES = [
|
||||
'Threads',
|
||||
'Grid Motion',
|
||||
'Orb',
|
||||
'Ballpit'
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
@@ -75,7 +75,8 @@ const backgrounds = {
|
||||
'hyperspeed': () => import('../demo/Backgrounds/HyperspeedDemo.vue'),
|
||||
'shape-blur': () => import('../demo/Backgrounds/ShapeBlurDemo.vue'),
|
||||
'balatro': () => import('../demo/Backgrounds/BalatroDemo.vue'),
|
||||
'orb': () => import('../demo/Backgrounds/OrbDemo.vue')
|
||||
'orb': () => import('../demo/Backgrounds/OrbDemo.vue'),
|
||||
'ballpit': () => import('../demo/Backgrounds/BallpitDemo.vue'),
|
||||
};
|
||||
|
||||
export const componentMap = {
|
||||
|
||||
23
src/constants/code/Backgrounds/ballpitCode.ts
Normal file
23
src/constants/code/Backgrounds/ballpitCode.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import code from '@content/Backgrounds/Ballpit/Ballpit.vue?raw';
|
||||
import type { CodeObject } from '../../../types/code';
|
||||
|
||||
export const ballpit: CodeObject = {
|
||||
cli: `npx jsrepo add https://vue-bits.dev/ui/Backgrounds/Ballpit`,
|
||||
installation: `npm i three`,
|
||||
usage: `<template>
|
||||
<div class="relative w-full h-[500px] overflow-hidden">
|
||||
<Ballpit
|
||||
:count="200"
|
||||
:gravity="0.7"
|
||||
:friction="0.8"
|
||||
:wallBounce="0.95"
|
||||
:followCursor="true"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Ballpit from "./Ballpit.vue";
|
||||
</script>`,
|
||||
code
|
||||
};
|
||||
Reference in New Issue
Block a user