A visual scripting tool for JavaScript, built with React.
This project is a web-based visual scripting environment that allows users to create JavaScript programs using a node-based interface. It provides a canvas where users can add, connect, and manipulate nodes representing various programming concepts and operations.
- Node-based visual programming interface
- Support for various node types:
- Control flow (If, Switch, Loops)
- Data manipulation (Variables, Math Operations)
- Array and Object operations
- HTTP Requests
- JSON handling (Parse, Stringify)
- Base64 encoding/decoding
- Real-time code generation with customizable settings:
- Strict mode toggle
- Semicolon usage toggle
- Const/Let declaration choice
- Comment generation toggle
- Canvas controls:
- Zoom and pan functionality
- Grid toggle
- Minimap visualization
- Node rounding options
- Theme customization (dark/light)
- Project management:
- Save/Load functionality
- Export options (JSON, JavaScript, Image)
- Graph inspector panel with real-time node configuration
- Predefined example projects
-
Clone the repository:
git clone https://github.com/scar17off/javascript-visual-scripting.git
-
Navigate to the project directory:
cd javascript-visual-scripting
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser and visit
http://localhost:3000
- Use the menu bar to create a new project or load an example
- Add nodes by right-clicking on the canvas
- Connect nodes by dragging from one port to another
- Configure node properties using the Graph Inspector panel
- Use the Settings tab to customize:
- Theme preferences
- Canvas display options
- Code generation settings
- Generate and run your script using the Run menu
- Export your project in various formats
src/App.js
: Main application componentsrc/VisualScripting.js
: Core visual scripting componentsrc/CodeGenerator.js
: Handles code generation from nodessrc/nodeDefinitions.js
: Defines available node typessrc/engine/
: Core engine componentsCamera.js
: Manages canvas zoom and panRenderer.js
: Handles rendering of nodes and connectionsNode.js
: Node class implementation
src/components/
: React components for UI elementsGraphInspector.js
: Node properties panelMenuBar.js
: Application menuSettingsTab.js
: Configuration interfaceContextMenu.js
: Right-click menuNodeContextMenu.js
: Node-specific context menuMinimap.js
: Canvas overview
src/examples.js
: Predefined example projects
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.