Inital commit

master
Jeremy Hayes 2026-06-05 11:16:01 -05:00
parent cfd64ddd02
commit ab86382a68
2 changed files with 20 additions and 19 deletions

View File

@ -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

38
app.js
View File

@ -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');
graph.connect(nodeA.id, 'out_raw', nodeB.id, 'in_data')