Skip to content

Commit 9ff00b8

Browse files
committed
fix: tweak fpsgraph extra height on calculation
1 parent 4201750 commit 9ff00b8

File tree

5 files changed

+32
-1
lines changed

5 files changed

+32
-1
lines changed

playground/src/pages/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ import {
33
advancedRoutes,
44
basicRoutes,
55
controlsRoutes,
6+
miscRoutes,
67
} from '../router/routes'
78
89
const sections = [
910
{ icon: '📦', title: 'Basic', routes: basicRoutes },
1011
{ icon: '🎛️', title: 'Controls', routes: controlsRoutes },
12+
{ icon: '🐶', title: 'Misc', routes: miscRoutes },
1113
{ icon: '🤓', title: 'Advanced', routes: advancedRoutes },
1214
]
1315
</script>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script setup lang="ts">
2+
import { TresCanvas } from '@tresjs/core'
3+
import { TresLeches, useControls } from '@tresjs/leches'
4+
import { OrbitControls } from '@tresjs/cientos'
5+
6+
useControls('fpsgraph')
7+
</script>
8+
9+
<template>
10+
<TresLeches />
11+
<TresCanvas clearColor="#82DBC5">
12+
<TresPerspectiveCamera :position="[5, 5, 5]" />
13+
<OrbitControls />
14+
<TresMesh>
15+
<TresBoxGeometry />
16+
<TresMeshNormalMaterial />
17+
</TresMesh>
18+
</TresCanvas>
19+
</template>

playground/src/router/routes/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
import { advancedRoutes } from './advanced'
22
import { basicRoutes } from './basic'
33
import { controlsRoutes } from './controls'
4+
import { miscRoutes } from './misc'
45

56
export const allRoutes = [
67
...basicRoutes,
78
...controlsRoutes,
89
...advancedRoutes,
10+
...miscRoutes,
911
]
1012

1113
export {
1214
advancedRoutes,
1315
basicRoutes,
1416
controlsRoutes,
17+
miscRoutes,
1518
}

playground/src/router/routes/misc.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export const miscRoutes = [
2+
{
3+
path: '/misc/fpsgraph',
4+
name: 'FPSgraph',
5+
component: () => import('../../pages/misc/FPSgraphDemo.vue'),
6+
},
7+
]

src/components/TresLeches.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const COLLAPSED_SIZE = 36
3838
const MIN_HEIGHT = 100 // Minimum height for the panel
3939
const MAX_HEIGHT = 600 // Maximum height for the panel
4040
const CONTROL_HEIGHT = 46 // Approximate height per control
41-
const FPS_GRAPH_EXTRA_HEIGHT = 12 // Extra padding needed for FPS graph
41+
const FPS_GRAPH_EXTRA_HEIGHT = 20 // Extra padding needed for FPS graph
4242
const MARGIN_FROM_BOTTOM = 42 // Margin to keep from bottom of viewport
4343
4444
const panelWidth = ref(DEFAULT_WIDTH)

0 commit comments

Comments
 (0)