From 280aa8142f687f59de9c14f3a263b46c67d9cf1d Mon Sep 17 00:00:00 2001 From: Cristian Vogel Date: Mon, 11 Mar 2024 12:50:08 +0100 Subject: [PATCH 1/6] Removed size prop from example --- src/pages/docs/reference/tapIn.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/reference/tapIn.md b/src/pages/docs/reference/tapIn.md index 3050bf9..7a4747c 100644 --- a/src/pages/docs/reference/tapIn.md +++ b/src/pages/docs/reference/tapIn.md @@ -11,7 +11,7 @@ as follows: ```js core.render( - el.tapOut({name: 'a', size: 22050}, + el.tapOut({name: 'a'}, el.mul( 0.5, el.add( From 929856c3885f31f6f90fedde90adb7a8fc80b533 Mon Sep 17 00:00:00 2001 From: Cristian Vogel Date: Fri, 7 Jun 2024 11:04:50 +0200 Subject: [PATCH 2/6] example should be createRef not createNode --- src/pages/docs/guides/Using_Refs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/guides/Using_Refs.md b/src/pages/docs/guides/Using_Refs.md index 9f6d20d..738d393 100644 --- a/src/pages/docs/guides/Using_Refs.md +++ b/src/pages/docs/guides/Using_Refs.md @@ -48,7 +48,7 @@ any time you want to _change_ an existing property value for an existing node wi ```js // Creating a ref to an svf filter node -let [svf, setFilterProps] = createNode("svf", {mode: 'lowpass'}, [filterInput]); +let [svf, setFilterProps] = createRef("svf", {mode: 'lowpass'}, [filterInput]); // Mount the svf somewhere in our graph core.render(...) From 7f25587ee52f4a02e5d58cc0cc6a3a35dab0db54 Mon Sep 17 00:00:00 2001 From: Cristian Vogel Date: Tue, 23 Jul 2024 11:07:00 +0200 Subject: [PATCH 3/6] Fixed broken API link --- src/pages/docs/guides/Custom_Native_Nodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/docs/guides/Custom_Native_Nodes.md b/src/pages/docs/guides/Custom_Native_Nodes.md index 21f23b7..cdfbc29 100644 --- a/src/pages/docs/guides/Custom_Native_Nodes.md +++ b/src/pages/docs/guides/Custom_Native_Nodes.md @@ -130,4 +130,4 @@ inputs will be served to your custom node instance as input buffer data in `elem ## API -For a complete and current enumeration of the `elem::GraphNode` API, please see [GraphNode.h](https://github.com/elemaudio/elementary/blob/main/runtime/GraphNode.h). +For a complete and current enumeration of the `elem::GraphNode` API, please see [GraphNode.h](https://github.com/elemaudio/elementary/blob/main/runtime/elem/GraphNode.h). From bf49c08eb720bd2414209d2c9aa26135e2a3e225 Mon Sep 17 00:00:00 2001 From: Cristian Vogel Date: Sat, 27 Jul 2024 23:21:39 +0200 Subject: [PATCH 4/6] Added button to toggle full width editor --- src/components/playground/controls.js | 25 ++++++++++++++---------- src/components/playground/index.js | 28 ++++++++++++++++++++------- src/components/playground/info.js | 6 +++--- 3 files changed, 39 insertions(+), 20 deletions(-) diff --git a/src/components/playground/controls.js b/src/components/playground/controls.js index f98d0b3..83a53e7 100644 --- a/src/components/playground/controls.js +++ b/src/components/playground/controls.js @@ -4,6 +4,7 @@ import { ArrowPathIcon, ArrowUpOnSquareIcon, CommandLineIcon, + ArrowRightOnRectangleIcon, } from '@heroicons/react/24/outline'; @@ -25,31 +26,35 @@ export function Controls(props) { onShare, statusMessage, shareMessage, + toggleInfoPanel } = props; return ( -
-
+
+
+ {shareMessage && ( {shareMessage} )}
-
-
- - {statusMessage} +
+
+ + {statusMessage}
diff --git a/src/components/playground/index.js b/src/components/playground/index.js index 71963fe..75b6b57 100644 --- a/src/components/playground/index.js +++ b/src/components/playground/index.js @@ -32,6 +32,7 @@ export function Playground() { const [editorValue, setEditorValue] = useState(defaultEditorValue.trim()); const [runtime, setRuntimeInstance] = useState(null); const [outdatedBrowser, setOutdatedBrowser] = useState(false); + const [showInfoPanel, setShowInfoPanel] = useState(true); // Mount the runtime useEffect(() => { @@ -123,28 +124,40 @@ export function Playground() { }, 2000); }, [editorValue]); + const toggleInfoPanel = useCallback(() => { + setShowInfoPanel(prevShowInfoPanel => !prevShowInfoPanel); + }, []); + + return ( -
+