From 623339bfed62deb1379564e2112491c2a66ddd1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=A1ez?= Date: Sat, 2 Nov 2024 09:41:59 -0300 Subject: [PATCH] chore: update make example (cherry-pick) (#499) --- src/types.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/types.ts b/src/types.ts index cc54c8af..9db0e2fd 100644 --- a/src/types.ts +++ b/src/types.ts @@ -196,14 +196,17 @@ export interface KAPLAYCtx< * @example * ```js * const label = make([ - * text("oh hi"), - * ]) - - * add([ - * rect(label.width, label.height), - * color(0, 0, 255), - * children(label), - * ]) + * rect(100, 20), + * ]); + * + * // Add a new text to the label + * label.add([ + * text("Hello, world!"), + * ]); + * + * // Add game object to the scene + * // Now it will render + * add(label); * ``` * * @group Game Obj