diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a40c8fda..d8757b66 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -16,9 +16,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Setup Pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 + uses: pnpm/action-setup@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v4 with: diff --git a/playground/components.d.ts b/playground/components.d.ts index 09766ef1..f707e945 100644 --- a/playground/components.d.ts +++ b/playground/components.d.ts @@ -10,6 +10,7 @@ declare module 'vue' { AkuAku: typeof import('./src/components/AkuAku.vue')['default'] FboCube: typeof import('./src/components/FboCube.vue')['default'] Gltf: typeof import('./src/components/gltf/index.vue')['default'] + GraphPane: typeof import('./src/components/GraphPane.vue')['default'] ModelsDemo: typeof import('./src/components/ModelsDemo.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/playground/src/components/GraphPane.vue b/playground/src/components/GraphPane.vue new file mode 100644 index 00000000..e952173e --- /dev/null +++ b/playground/src/components/GraphPane.vue @@ -0,0 +1,101 @@ + + + diff --git a/playground/src/composables/state.ts b/playground/src/composables/state.ts new file mode 100644 index 00000000..227164b7 --- /dev/null +++ b/playground/src/composables/state.ts @@ -0,0 +1,11 @@ +import { reactive, toRefs } from 'vue' + +const state = reactive({ + renderingTimes: 0, +}) +export function useState() { + return { + ...toRefs(state), + + } +} diff --git a/playground/src/pages/abstractions/AnimatedSprite.vue b/playground/src/pages/abstractions/AnimatedSpriteDemo.vue similarity index 97% rename from playground/src/pages/abstractions/AnimatedSprite.vue rename to playground/src/pages/abstractions/AnimatedSpriteDemo.vue index 5b92a500..1fe23c4a 100644 --- a/playground/src/pages/abstractions/AnimatedSprite.vue +++ b/playground/src/pages/abstractions/AnimatedSpriteDemo.vue @@ -7,6 +7,7 @@ import { TresLeches, useControls } from '@tresjs/leches' import '@tresjs/leches/styles' import { degToRad } from 'three/src/math/MathUtils.js' import type { Atlasish } from '../../../../src/core/abstractions/AnimatedSprite/Atlas' +import { useState } from '../../composables/state' const ASSETS_URL = 'https://raw.githubusercontent.com/andretchen0/tresjs_assets/' + '462ad0f669f78d2c5ed7007b5134b419f646efad/textures/animated-sprite/' @@ -119,16 +120,23 @@ const centerDemoImgData = (() => { canvas.parentElement?.removeChild(canvas) return imgData })() + +const { renderingTimes } = useState() + +function onRender() { + renderingTimes.value = 1 +}