From 91848b4f428290e17f058b48eead299fba402ea0 Mon Sep 17 00:00:00 2001 From: Kenny <67985757+protofarer@users.noreply.github.com> Date: Fri, 29 Mar 2024 03:08:36 -0400 Subject: [PATCH] Fix [docs]: containers.md Masking example 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. --- docs/guides/components/containers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/components/containers.md b/docs/guides/components/containers.md index d7a99713d..8a83f83b3 100644 --- a/docs/guides/components/containers.md +++ b/docs/guides/components/containers.md @@ -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; }); ```