From 83195f89a1c408986166a308349beef1c919fdfa Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Thu, 26 Dec 2024 08:03:57 -0800 Subject: [PATCH] typo --- webgpu/lessons/webgpu-scene-graphs.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webgpu/lessons/webgpu-scene-graphs.md b/webgpu/lessons/webgpu-scene-graphs.md index a19c88bb..89df3e2e 100644 --- a/webgpu/lessons/webgpu-scene-graphs.md +++ b/webgpu/lessons/webgpu-scene-graphs.md @@ -564,12 +564,12 @@ here's a few more tweaks. // | +-child // +-child function addSceneGraphNodeToGUI(gui, node, last, prefix) { -+ const nodes = []; + + const nodes = []; if (node.source instanceof TRS) { const label = `${prefix === undefined ? '' : `${prefix}${plusDash}`}${node.name}`; -- addButtonLeftJustified(gui, label, () => setCurrentSceneGraphNode(node)); -+ nodes.push(addButtonLeftJustified( -+ gui, label, () => setCurrentSceneGraphNode(node))); + - addButtonLeftJustified(gui, label, () => setCurrentSceneGraphNode(node)); + + nodes.push(addButtonLeftJustified( + + gui, label, () => setCurrentSceneGraphNode(node))); const childPrefix = prefix === undefined ? '' : `${prefix}${last ? threeSpaces : barTwoSpaces}`; @@ -577,7 +577,7 @@ here's a few more tweaks. + nodes.push(...node.children.map((child, i) => { * const childLast = i === node.children.length - 1; - addSceneGraphNodeToGUI(gui, child, childLast, childPrefix); - + return addSceneGraphNodeToGUI(gui, child, childLast, childPrefix); + + return addSceneGraphNodeToGUI(gui, child, childLast, childPrefix); * })); + return nodes.flat(); }