This commit is contained in:
CodeF53 2024-08-06 11:22:11 -06:00
parent a8918b83d3
commit 87e35eea54
3 changed files with 8 additions and 1 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -1,8 +1,12 @@
<script setup lang="ts"> <script setup lang="ts">
import { Neko } from 'neko-ts'
const neko: Ref<Neko | undefined> = ref()
const canvas: Ref<undefined | HTMLCanvasElement> = ref() const canvas: Ref<undefined | HTMLCanvasElement> = ref()
const intervalId: Ref<undefined | NodeJS.Timeout> = 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) { function dumbShit(e: MouseEvent) {
const { clientX, clientY } = e const { clientX, clientY } = e
const { innerWidth, innerHeight } = window const { innerWidth, innerHeight } = window
@ -16,6 +20,8 @@ function dumbShit(e: MouseEvent) {
const handleResizeDebounced = useDebounce(handleResize, 500) const handleResizeDebounced = useDebounce(handleResize, 500)
onMounted(() => { onMounted(() => {
neko.value = new Neko()
if (!canvas.value) if (!canvas.value)
return return
initCanvas(canvas.value) initCanvas(canvas.value)

View file

@ -14,6 +14,7 @@
"dependencies": { "dependencies": {
"@nuxt/content": "^2.11.0", "@nuxt/content": "^2.11.0",
"@nuxt/image": "^1.3.0", "@nuxt/image": "^1.3.0",
"neko-ts": "^0.0.6",
"nuxt-icon": "^0.6.8", "nuxt-icon": "^0.6.8",
"nuxt-lodash": "^2.5.3", "nuxt-lodash": "^2.5.3",
"sass": "^1.70.0" "sass": "^1.70.0"