mirror of
https://github.com/CodeF53/personal-site.git
synced 2024-09-19 22:00:35 +00:00
add neko
This commit is contained in:
parent
a8918b83d3
commit
87e35eea54
3 changed files with 8 additions and 1 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -1,8 +1,12 @@
|
|||
<script setup lang="ts">
|
||||
import { Neko } from 'neko-ts'
|
||||
|
||||
const neko: Ref<Neko | undefined> = ref()
|
||||
|
||||
const canvas: Ref<undefined | HTMLCanvasElement> = ref()
|
||||
const intervalId: Ref<undefined | NodeJS.Timeout> = ref()
|
||||
|
||||
const backgroundOffset: Ref<{ x: number; y: number }> = ref({ x: 0, y: 0 })
|
||||
const backgroundOffset: Ref<{ x: number, y: number }> = ref({ x: 0, y: 0 })
|
||||
function dumbShit(e: MouseEvent) {
|
||||
const { clientX, clientY } = e
|
||||
const { innerWidth, innerHeight } = window
|
||||
|
@ -16,6 +20,8 @@ function dumbShit(e: MouseEvent) {
|
|||
const handleResizeDebounced = useDebounce(handleResize, 500)
|
||||
|
||||
onMounted(() => {
|
||||
neko.value = new Neko()
|
||||
|
||||
if (!canvas.value)
|
||||
return
|
||||
initCanvas(canvas.value)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
"dependencies": {
|
||||
"@nuxt/content": "^2.11.0",
|
||||
"@nuxt/image": "^1.3.0",
|
||||
"neko-ts": "^0.0.6",
|
||||
"nuxt-icon": "^0.6.8",
|
||||
"nuxt-lodash": "^2.5.3",
|
||||
"sass": "^1.70.0"
|
||||
|
|
Loading…
Reference in a new issue