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 including control flow, data manipulation, functions, and more
- Real-time code generation
- Ability to run scripts with or without debugging
- Undo/Redo functionality
- Zoom and pan canvas controls
- Save and load projects
- Export projects as JSON or JavaScript
- Dark and light theme options
- Customizable grid and minimap
- Example projects included
-
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, open an existing one, or load an example.
- Right-click on the canvas to open the context menu and add nodes.
- Connect nodes by clicking and dragging from one port to another.
- Use the property panel on the right to adjust node properties.
- Run your script using the "Run" menu options.
- Generate code using the "Generate code" option in the "Run" menu.
- Export your project as JSON or JavaScript using the "Export" menu.
src/App.js
: Main application componentsrc/VisualScripting.js
: Core visual scripting componentsrc/CodeGenerator.js
: Handles code generation from nodessrc/engine/Camera.js
: Manages canvas zoom and pansrc/engine/Renderer.js
: Handles rendering of nodes and connectionssrc/nodeDefinitions.js
: Defines available node typessrc/components/
: Contains React components for UI elementssrc/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.