Skip to content

Commit

Permalink
Fix [docs]: containers.md Masking example (#100)
Browse files Browse the repository at this point in the history
Wrong property name for the callback param destructure. Suggest using param Ticker object and accessing property in function body for instructive purposes. Example needs this to run.
  • Loading branch information
protofarer authored Apr 9, 2024
1 parent f171558 commit 7868871
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/guides/components/containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ maskContainer.addChild(text);

// Add a ticker callback to scroll the text up and down
let elapsed = 0.0;
app.ticker.add(({delta}) => {
app.ticker.add((ticker) => {
// Update the text's y coordinate to scroll it
elapsed += delta;
elapsed += ticker.deltaTime;
text.y = 10 + -100.0 + Math.cos(elapsed/50.0) * 100.0;
});
```
Expand Down

0 comments on commit 7868871

Please sign in to comment.