feat: resize canvases to fit window height
All checks were successful
Deploy to GitHub Pages / build_site (push) Successful in 2m3s

Closes #16

The canvases fit their parents size, so adding a wrapper with 100vh
solved it. https://threlte.xyz/docs/reference/core/canvas#size
This commit is contained in:
2026-01-20 17:55:58 +01:00
parent fbd82bbdfa
commit 8693c63d16
2 changed files with 12 additions and 9 deletions

View File

@@ -105,6 +105,7 @@
onwheel={(ev) => mouseEvents.handleMouseScroll(ev)} onwheel={(ev) => mouseEvents.handleMouseScroll(ev)}
bind:this={graphState.wrapper} bind:this={graphState.wrapper}
class="graph-wrapper" class="graph-wrapper"
style="height: 100vh;"
class:is-panning={graphState.isPanning} class:is-panning={graphState.isPanning}
class:is-hovering={graphState.hoveredNodeId !== -1} class:is-hovering={graphState.hoveredNodeId !== -1}
aria-label="Graph" aria-label="Graph"

View File

@@ -95,7 +95,8 @@
<SmallPerformanceViewer {fps} store={perf} /> <SmallPerformanceViewer {fps} store={perf} />
{/if} {/if}
<Canvas> <div style="height: 100vh">
<Canvas>
<Scene <Scene
bind:this={sceneComponent} bind:this={sceneComponent}
{lines} {lines}
@@ -103,4 +104,5 @@
bind:scene bind:scene
bind:fps bind:fps
/> />
</Canvas> </Canvas>
</div>