diff --git a/docs/public/logo.svg b/docs/public/logo.svg index 809472a68..035ffd955 100644 --- a/docs/public/logo.svg +++ b/docs/public/logo.svg @@ -1,5 +1,27 @@ - - - - - + + + + + + + + + \ No newline at end of file diff --git a/playground/components.d.ts b/playground/components.d.ts index 2040947f7..d78fae7b3 100644 --- a/playground/components.d.ts +++ b/playground/components.d.ts @@ -8,6 +8,7 @@ export {} declare module 'vue' { export interface GlobalComponents { AnimatedModel: typeof import('./src/components/AnimatedModel.vue')['default'] + BlenderCube: typeof import('./src/components/BlenderCube.vue')['default'] CameraOperator: typeof import('./src/components/CameraOperator.vue')['default'] Cameras: typeof import('./src/components/Cameras.vue')['default'] copy: typeof import('./src/components/TheBasic copy.vue')['default'] @@ -17,10 +18,12 @@ declare module 'vue' { DynamicModel: typeof import('./src/components/DynamicModel.vue')['default'] FBXModels: typeof import('./src/components/FBXModels.vue')['default'] Gltf: typeof import('./src/components/gltf/index.vue')['default'] + GraphPane: typeof import('./src/components/GraphPane.vue')['default'] LocalOrbitControls: typeof import('./src/components/LocalOrbitControls.vue')['default'] MeshWobbleMaterial: typeof import('./src/components/meshWobbleMaterial/index.vue')['default'] MultipleCanvas: typeof import('./src/components/MultipleCanvas.vue')['default'] PortalJourney: typeof import('./src/components/portal-journey/index.vue')['default'] + RenderingLogger: typeof import('./src/components/RenderingLogger.vue')['default'] Responsiveness: typeof import('./src/components/Responsiveness.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] diff --git a/playground/public/logo.svg b/playground/public/logo.svg new file mode 100644 index 000000000..035ffd955 --- /dev/null +++ b/playground/public/logo.svg @@ -0,0 +1,27 @@ + + + + + + + + + \ No newline at end of file diff --git a/playground/src/App.vue b/playground/src/App.vue index 950cb89e3..1db6204f5 100644 --- a/playground/src/App.vue +++ b/playground/src/App.vue @@ -1,7 +1,17 @@ - + + + - diff --git a/playground/src/components/BlenderCube.vue b/playground/src/components/BlenderCube.vue new file mode 100644 index 000000000..8ce1fd809 --- /dev/null +++ b/playground/src/components/BlenderCube.vue @@ -0,0 +1,18 @@ + + + + + \ No newline at end of file diff --git a/playground/src/components/GraphPane.vue b/playground/src/components/GraphPane.vue new file mode 100644 index 000000000..410b927c8 --- /dev/null +++ b/playground/src/components/GraphPane.vue @@ -0,0 +1,101 @@ + + + + + Rendering Activity + + + + + + + + \ No newline at end of file diff --git a/playground/src/components/RenderingLogger.vue b/playground/src/components/RenderingLogger.vue new file mode 100644 index 000000000..eddb08648 --- /dev/null +++ b/playground/src/components/RenderingLogger.vue @@ -0,0 +1,24 @@ + + + + + \ No newline at end of file diff --git a/playground/src/composables/state.ts b/playground/src/composables/state.ts new file mode 100644 index 000000000..70bf5769e --- /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), + + } +} \ No newline at end of file diff --git a/playground/src/pages/TheConditional.vue b/playground/src/pages/basic/Conditional.vue similarity index 100% rename from playground/src/pages/TheConditional.vue rename to playground/src/pages/basic/Conditional.vue diff --git a/playground/src/pages/TheGroups.vue b/playground/src/pages/basic/Groups.vue similarity index 100% rename from playground/src/pages/TheGroups.vue rename to playground/src/pages/basic/Groups.vue diff --git a/playground/src/pages/lights.vue b/playground/src/pages/basic/Lights.vue similarity index 100% rename from playground/src/pages/lights.vue rename to playground/src/pages/basic/Lights.vue diff --git a/playground/src/pages/multiple.vue b/playground/src/pages/basic/Multiple.vue similarity index 100% rename from playground/src/pages/multiple.vue rename to playground/src/pages/basic/Multiple.vue diff --git a/playground/src/pages/primitives.vue b/playground/src/pages/basic/Primitives.vue similarity index 100% rename from playground/src/pages/primitives.vue rename to playground/src/pages/basic/Primitives.vue diff --git a/playground/src/pages/Responsiveness.vue b/playground/src/pages/basic/Responsiveness.vue similarity index 87% rename from playground/src/pages/Responsiveness.vue rename to playground/src/pages/basic/Responsiveness.vue index a7fc456e8..8d7f15a5a 100644 --- a/playground/src/pages/Responsiveness.vue +++ b/playground/src/pages/basic/Responsiveness.vue @@ -1,5 +1,5 @@ diff --git a/playground/src/pages/TheBasic.vue b/playground/src/pages/basic/index.vue similarity index 100% rename from playground/src/pages/TheBasic.vue rename to playground/src/pages/basic/index.vue diff --git a/playground/src/pages/cameras/Cameras.vue b/playground/src/pages/cameras/index.vue similarity index 100% rename from playground/src/pages/cameras/Cameras.vue rename to playground/src/pages/cameras/index.vue diff --git a/playground/src/pages/click-blocking-box.vue b/playground/src/pages/click-blocking-box.vue deleted file mode 100644 index ffbd3eef3..000000000 --- a/playground/src/pages/click-blocking-box.vue +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/playground/src/pages/raycaster/TheEvents.vue b/playground/src/pages/events/index.vue similarity index 100% rename from playground/src/pages/raycaster/TheEvents.vue rename to playground/src/pages/events/index.vue diff --git a/playground/src/pages/index.vue b/playground/src/pages/index.vue index 21743ba79..a224fe8b1 100644 --- a/playground/src/pages/index.vue +++ b/playground/src/pages/index.vue @@ -1,5 +1,84 @@ - + - + + + + + + + + + TresJS Playground + + + Testing zone for TresJS/core components + + + + + + + {{ icon }} + + + {{ title }} + + + + {{ route.name }} + + + + + + diff --git a/playground/src/pages/perf/AkuAku.vue b/playground/src/pages/perf/AkuAku.vue deleted file mode 100644 index a8da5e478..000000000 --- a/playground/src/pages/perf/AkuAku.vue +++ /dev/null @@ -1,49 +0,0 @@ - - - - - diff --git a/playground/src/pages/perf/OnDemand.vue b/playground/src/pages/perf/OnDemand.vue new file mode 100644 index 000000000..0e35c7dbc --- /dev/null +++ b/playground/src/pages/perf/OnDemand.vue @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/playground/src/pages/rendering-modes/index.vue b/playground/src/pages/rendering-modes/index.vue deleted file mode 100644 index 014366a1a..000000000 --- a/playground/src/pages/rendering-modes/index.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - - console.log('onRender')" - > - - - \ No newline at end of file diff --git a/playground/src/pages/rendering-modes/scene.vue b/playground/src/pages/rendering-modes/scene.vue deleted file mode 100644 index c44e5d194..000000000 --- a/playground/src/pages/rendering-modes/scene.vue +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/playground/src/router.ts b/playground/src/router/index.ts similarity index 84% rename from playground/src/router.ts rename to playground/src/router/index.ts index 29e8f29a2..78b0c3279 100644 --- a/playground/src/router.ts +++ b/playground/src/router/index.ts @@ -1,7 +1,18 @@ import { createRouter, createWebHistory } from 'vue-router' +import { basicRoutes } from './routes/basic' +import { cameraRoutes, eventsRoutes, perfRoutes } from './routes' const routes = [ { + path: '/', + name: 'Home', + component: () => import('../pages/index.vue'), + }, + ...basicRoutes, + ...perfRoutes, + ...eventsRoutes, + ...cameraRoutes, +/* { path: '/', name: 'Home', component: () => import('./pages/index.vue'), @@ -91,12 +102,17 @@ const routes = [ name: 'Rendering Modes', component: () => import('./pages/rendering-modes/index.vue'), }, + { + path: '/on-demand-rendering', + name: 'On Demand Rendering', + component: () => import('./pages/on-demand-rendering.vue'), + }, { path: '/empty', name: 'empty', component: () => import('./pages/empty.vue'), }, - + */ ] export const router = createRouter({ history: createWebHistory(), diff --git a/playground/src/router/routes/basic.ts b/playground/src/router/routes/basic.ts new file mode 100644 index 000000000..05ed194ae --- /dev/null +++ b/playground/src/router/routes/basic.ts @@ -0,0 +1,37 @@ +export const basicRoutes = [ + { + path: '/basic', + name: 'Basic', + component: () => import('../../pages/basic/index.vue'), + }, + { + path: '/basic/lights', + name: 'Lights', + component: () => import('../../pages/basic/Lights.vue'), + }, + { + path: '/basic/groups', + name: 'Groups', + component: () => import('../../pages/basic/Groups.vue'), + }, + { + path: '/basic/conditional', + name: 'Conditional', + component: () => import('../../pages/basic/Conditional.vue'), + }, + { + path: '/Primitives', + name: 'Primitives', + component: () => import('../../pages/basic/Primitives.vue'), + }, + { + path: '/basic/multiple', + name: 'Multiple', + component: () => import('../../pages/basic/Multiple.vue'), + }, + { + path: '/basic/responsive', + name: 'Responsiveness', + component: () => import('../../pages/basic/Responsiveness.vue'), + }, +] \ No newline at end of file diff --git a/playground/src/router/routes/cameras.ts b/playground/src/router/routes/cameras.ts new file mode 100644 index 000000000..978261d99 --- /dev/null +++ b/playground/src/router/routes/cameras.ts @@ -0,0 +1,17 @@ +export const cameraRoutes = [ + { + path: '/cameras', + name: 'Cameras', + component: () => import('../../pages/cameras/index.vue'), + }, + { + path: '/cameras/no-camera', + name: 'No Camera', + component: () => import('../../pages/cameras/index.vue'), + }, + { + path: '/cameras/multiple-cameras', + name: 'Multiple Cameras', + component: () => import('../../pages/cameras/MultipleCameras.vue'), + }, +] \ No newline at end of file diff --git a/playground/src/router/routes/events.ts b/playground/src/router/routes/events.ts new file mode 100644 index 000000000..b60d568c3 --- /dev/null +++ b/playground/src/router/routes/events.ts @@ -0,0 +1,7 @@ +export const eventsRoutes = [ + { + path: '/events', + name: 'Events', + component: () => import('../../pages/events/index.vue'), + }, +] \ No newline at end of file diff --git a/playground/src/router/routes/index.ts b/playground/src/router/routes/index.ts new file mode 100644 index 000000000..7d1bbdb58 --- /dev/null +++ b/playground/src/router/routes/index.ts @@ -0,0 +1,11 @@ +import { cameraRoutes } from './cameras' +import { eventsRoutes } from './events' +import { basicRoutes } from './basic' +import { perfRoutes } from './performance' + +export { + basicRoutes, + perfRoutes, + eventsRoutes, + cameraRoutes, +} \ No newline at end of file diff --git a/playground/src/router/routes/performance.ts b/playground/src/router/routes/performance.ts new file mode 100644 index 000000000..3d64bbef1 --- /dev/null +++ b/playground/src/router/routes/performance.ts @@ -0,0 +1,7 @@ +export const perfRoutes = [ + { + path: '/perf/on-demand', + name: 'On Demand', + component: () => import('../../pages/perf/OnDemand.vue'), + }, +] \ No newline at end of file diff --git a/playground/vite.config.ts b/playground/vite.config.ts index 17076bef5..04e82aadc 100644 --- a/playground/vite.config.ts +++ b/playground/vite.config.ts @@ -32,6 +32,11 @@ export default defineConfig({ }), UnoCSS({ /* options */ + theme: { + colors: { + 'tres-primary': '#82dbc5', + }, + }, }), qrcode(), // only applies in dev mode ],
+ Testing zone for TresJS/core components +