Skip to content

Commit

Permalink
Fix: scene-graph.md Render Order example (#99)
Browse files Browse the repository at this point in the history
Incorrect callback parameter. It is a Ticket object, not the delta time value itself. The example will not run without this fix.
  • Loading branch information
protofarer authored Apr 9, 2024
1 parent e661066 commit f171558
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guides/basics/scene-graph.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ let d = addLetter('D', app.stage, 0xff8800, {x: 140, y: 100});

// Display them over time, in order
let elapsed = 0.0;
app.ticker.add((delta) => {
elapsed += delta / 60.0;
app.ticker.add((ticker) => {
elapsed += ticker.deltaTime / 60.0;
if (elapsed >= letters.length) { elapsed = 0.0; }
for (let i = 0; i < letters.length; i ++) {
letters[i].visible = elapsed >= i;
Expand Down

0 comments on commit f171558

Please sign in to comment.