1.0.18 • Published 3 years ago
vue-pets v1.0.18
Vue-Pets
A Vue component to add a cat to your Vue app.
See also: https://github.com/tonybaloney/vscode-pets/
Installation
npm i vue-pets --save
Usage
<template>
<VuePets class="vue-pets" />
</template>
<script>
import VuePets from 'vue-pets'
import 'vue-pets/dist/style.css'
export default {
// ...
components: {
VuePets
},
// ...
}
</script>
<style>
.vue-pets {
/* use your custom dimension */
width: 100%;
height: 100%;
}
</style>
Props
physics
- Type:
{ ball: { width: number; cx: number; vx: number; cy: number; vy: number; }, cat: { x: number; y: number; } world: { gravity: number; damping: number; traction: number; } }
- Required:
false
- Default:
{ ball: { width: 8, cx: 100, cy: 100, vx: 8, vy: 5 }, cat: { x: 0, y: 0 }, world: { gravity: 0.2, damping: 0.9, traction: 0.8 } }
- Usage:
<VuePets :physics="physics">