diff --git a/Readme.md b/Readme.md index 9f0c0dc..ac2c438 100644 --- a/Readme.md +++ b/Readme.md @@ -88,6 +88,7 @@ The library enforces a strict separation of concerns via an asynchronous, decoup [DOM Element Nodes] [SVG Vector Overlay Patches] ``` + --- ## 📚 API Reference diff --git a/app.js b/app.js index 13cb369..b3bc811 100644 --- a/app.js +++ b/app.js @@ -1,30 +1,30 @@ -import { NodeEditor } from './NodeEditor.js'; +import { NodeEditor } from './NodeEditor.js' // 1. Initialize the UI Engine -const container = document.getElementById('editor-container'); -const editor = new NodeEditor(container); +const container = document.getElementById('editor-container') +const editor = new NodeEditor(container) // 2. Extract the State Manager -const graph = editor.getGraphManager(); +const graph = editor.getGraphManager() // 3. Spawning Nodes const nodeA = graph.addNode({ - type: 'source_node', - title: 'Data Stream', - x: 100, - y: 150, - inputs: [], - outputs: [{ id: 'out_raw', name: 'Raw Buffer' }] -}); + type: 'source_node', + title: 'Data Stream', + x: 100, + y: 150, + inputs: [], + outputs: [{ id: 'out_raw', name: 'Raw Buffer' }] +}) const nodeB = graph.addNode({ - type: 'processing_node', - title: 'Transform Matrix', - x: 450, - y: 250, - inputs: [{ id: 'in_data', name: 'Payload' }], - outputs: [{ id: 'out_success', name: 'Success' }] -}); + type: 'processing_node', + title: 'Transform Matrix', + x: 450, + y: 250, + inputs: [{ id: 'in_data', name: 'Payload' }], + outputs: [{ id: 'out_success', name: 'Success' }] +}) // 4. Create a programmatically driven wire connection -graph.connect(nodeA.id, 'out_raw', nodeB.id, 'in_data'); \ No newline at end of file +graph.connect(nodeA.id, 'out_raw', nodeB.id, 'in_data')