Skip to content

Commit 20cf21f

Browse files
committed
fix docs
1 parent d32d9f8 commit 20cf21f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ return (
6363
- [What is a timeline?](https://pmndrs.github.io/timeline/getting-started/1-what-is-a-timeline)
6464
- [Building your First Timeline](https://pmndrs.github.io/timeline/getting-started/2-first-timeline)
6565
- [Overview over All Functions](https://pmndrs.github.io/timeline/getting-started/3-overview)
66-
- [Tutorial: Building Complex Timelines using Parallel](https://pmndrs.github.io/timeline/tutorial/4-parallel)
67-
- [Tutorial: Building Graph Timelines](https://pmndrs.github.io/timeline/tutorial/5-graph)
68-
- [Tutorial: Use pmndrs/timeline in vanilla three.js](https://pmndrs.github.io/timeline/tutorial/6-vanilla)
66+
- [Tutorial: Building Complex Timelines using Parallel](https://pmndrs.github.io/timeline/tutorials/4-parallel)
67+
- [Tutorial: Building Graph Timelines](https://pmndrs.github.io/timeline/tutorials/5-graph)
68+
- [Tutorial: Use pmndrs/timeline in vanilla three.js](https://pmndrs.github.io/timeline/tutorials/6-vanilla)
6969

7070
## Sponsors
7171

docs/tutorials/6-vanilla.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const update = start(mainTimeline())
115115
// render loop
116116
let last = performance.now()
117117
function onFrame(now: number) {
118-
const delta = now - last
118+
const delta = Math.max(1e-6, Math.min(1/30, Math.max(0, (now - last) / 1000)))
119119
last = now
120120
update(undefined, delta)
121121
composer.render(delta)
@@ -144,7 +144,7 @@ window.addEventListener('resize', onResize)
144144
<title>Vanilla timeline</title>
145145
</head>
146146
<body style="margin:0">
147-
<div id="root" style="width:100vw;height:100vh"></div>
147+
<div id="root" style="position:absolute; inset: 0; touch-action: none"></div>
148148
<script type="module" src="/index.ts"></script>
149149
</body>
150150
</html>`
@@ -277,7 +277,7 @@ If you use vite (`pnpm add vite`), you can create a `index.html` file, add the f
277277
<script type="module" src="index.ts"></script>
278278
</head>
279279
<body style="margin: 0;">
280-
<div id="root" style="width: 100dvw; height: 100dvh;"></div>
280+
<div id="root" style="position:absolute; inset: 0; touch-action: none"></div>
281281
</body>
282282
</html>
283283
```

0 commit comments

Comments
 (0)