VisualScripting - Visual scripting using nodes, see README for more details

Overview

VisualScripting

Make code using nodes

This program does the heavy lifting of making nodes work, to make use of this program plugins are required, plugins can be made by deveopers and could make for example:- they could make a plugin to translate the nodes to c++ c# or java or they could even make a plugin to make Overwatch workshop gamemades these features are only limited to the plugin the developers

Custom Nodes

Add Nodes using plugins

Requirements

  • VisualScripting.jar or this repo
  • ImGui
<dependency>
    <groupId>io.github.spair</groupId>
    <artifactId>imgui-java-binding</artifactId>
    <version>${imgui.java.version}</version>
</dependency>
<dependency>
    <groupId>io.github.spair</groupId>
    <artifactId>imgui-java-lwjgl3</artifactId>
    <version>${imgui.java.version}</version>
</dependency>
<dependency>
    <groupId>io.github.spair</groupId>
    <artifactId>imgui-java-natives-windows</artifactId>
    <version>${imgui.java.version}</version>
</dependency>
  • pf4j
<dependency>
    <groupId>org.pf4j</groupId>
    <artifactId>pf4j</artifactId>
    <version>${pf4j.version}</version>
</dependency> 

Making the plugin

  • Create a new project with the above Requirements
  • Create a new Class that extends Plugin (this can be left as is, it's just required by pf4j)
  • Create a new Class that extends VisualScriptingPlugin
  • Inside the VisualScriptingPlugin class in the init function you can add you custom Nodes by calling graph.addNodeToList(InsertCustomNodeNameHere.class);
  • To create an actual Custom node, create a new class that extends Node and from that node class you can deside what happens with your node (example below)
  • In your MANIFEST.MF you need to include the following Plugin-Class: <package>.<PluginClass> Plugin-Id: <Anything> Plugin-Version: 0.0.1 (full example below)

Examples

An example of a node that doesn't require the exec function

import imgui.type.ImString;
import visual.scripting.Graph;
import visual.scripting.NodeData;
import visual.scripting.Pin;
import visual.scripting.node.Node;

public class Node_PrintString extends Node {

    private Pin flowIn, strIn, flowOut;

    public Node_PrintString(Graph graph) {
        super(graph);
        //set the name of the node
        setName("Print String");
    }

    @Override
    public void init() {
        flowIn = addInputPin(Pin.DataType.Flow, this);
        strIn = addInputPin(Pin.DataType.String, this);

        flowOut = addOutputPin(Pin.DataType.Flow, this);
    }

    @Override
    public String printSource(StringBuilder sb) {
        NodeData<ImString> data = strIn.getData();

        String strOutput = "\"" + data.value.get() + "\"";

        if(strIn.connectedTo != -1){
            Pin pin = getGraph().findPinById(strIn.connectedTo);
            strOutput = pin.getNode().printSource(sb);
        }

        sb.append("System.out.println(" + strOutput + ");\n");
        return "";
    }
}

An example of a node that makes use of the exec function and use of variables

import imgui.type.ImInt;
import imgui.type.ImString;
import visual.scripting.Graph;
import visual.scripting.NodeData;
import visual.scripting.Pin;
import visual.scripting.node.Node;

public class Node_IntToString extends Node {

    private Pin in, out;

    public Node_IntToString(Graph graph) {
        super(graph);
        //set the name of the node
        setName("IntToString");
    }

    @Override
    public void init() {
        in = addInputPin(Pin.DataType.Int, this);

        out = addOutputPin(Pin.DataType.String, this);

        // call getGraph().getNextLocalVariableID(); to avoid having same variable names in the same function
        String var = "intToString" + getGraph().getNextLocalVariableID();
        //set variable name to let any nodes connect to this pin know what the variable name will be and can reference it
        out.setVariable(var);
    }

    @Override
    public void execute() {
        NodeData<ImInt> inData = in.getData();
        NodeData<ImString> outData = out.getData();

        outData.getValue().set(String.valueOf(inData.value.get()));
    }

    @Override
    public String printSource(StringBuilder sb) {
        NodeData<ImInt> inData = in.getData();
        NodeData<ImString> outData = out.getData();

        //sets the value to the value of the in pin
        String input = String.valueOf(inData.value.get());

        //checks if pin is connected to another pin then changed input string to a variable
        if(in.connectedTo != -1){
            Pin pin = getGraph().findPinById(in.connectedTo);
            //gets the variable name from the connected pin
            input = pin.getNode().printSource(sb);
        }

        String toPrint = "int " + out.getVariable() + " = " + input;
        //add to the source
        sb.append(toPrint + "\n");
        return out.getVariable();
    }
}
Manifest-Version: 1.0
Plugin-Class: com.PluginTest
Plugin-Id: PluginTest
Plugin-Version: 0.0.1

Screenshots

img img

TODO Completed
Nodes update automatically ✔️
Convert to source/text ✔️
Save All Node Information
Plugin Support ✔️
hierarchy of current Nodes in graph
Workspace design for File Viewer
Improve UI
Examples
You might also like...

please read README to see how to play this. and star me to help me! this is very helpful and thanksful for me.

please read README to see how to play this. and star me to help me! this is very helpful and thanksful for me.

Sharustry Mod Browser / 모드 브라우저로 다운로드하기 Only possible with 124 or higher, only can download "latest" release 124 버전 이상에서만 가능하고, 오직 가장 최근의 정식 릴리즈만 다운로드

Nov 23, 2022

JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. Go check the README.md file to see how to use it.

JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. Go check the README.md file to see how to use it.

JCLR JCLR (JavaColor) is a library that allows you to write colored text in your terminal. It use the ANSI color system. To start using it, go to the

Aug 21, 2021

Saddest OyVey skid ive ever seen read readme for more.

Legacy-Client-1.2.5-SRC https://github.com/BlackBro4/Legacy-client-1.2.5 Thx for original leak now onwards to the actual client. Crappy Russian OyVey

Nov 24, 2021

Math World is an android application specialized in mathematics discover more about it in README.

Math World is an android application specialized in mathematics discover more about it in README.

Math World App Math World is an Android Application specialized in mathematics, where the application includes some sections related to arithmetic, un

Mar 12, 2022

Fork of JProcesses with additional features and enhancements. Get cross-platform process details in Java.

Fork of JProcesses with additional features and enhancements. Get cross-platform process details in Java. Add this as dependency to your project via Maven/Gradle/Sbt/Leinigen (requires Java 7 or higher).

Mar 17, 2022

A Network Observer which would provide maximum details about the network to the administrator on their screen without knowing to their users.

A Network Observer which would provide maximum details about the network to the administrator on their screen without knowing to their users.

Smart-Network-Observer-With-Energy-Framework A Network Observer which would provide maximum details about the network to the administrator on their sc

Jul 15, 2022

See how simple it is to build a REST API with a database using Java and Spring Boot

See how simple it is to build a REST API with a database using Java and Spring Boot

Seu primeiro projeto Java Web no Spring Boot 2022 Veja como é simples construir uma API REST com banco de dados usando Java e Spring Boot Realização D

Dec 26, 2022

Training materials for NODES 2021 training on Neo4j Aura

NODES 2021: Neo4j Aura Training Event page: Hands-on with Neo4j Aura - NODES 2021 training series This repository contains the materials needed for th

Oct 30, 2021

A scale demo of Neo4j Fabric spanning up to 1129 machines/shards running a 100TB (LDBC) dataset with 1.2tn nodes and relationships.

A scale demo of Neo4j Fabric spanning up to 1129 machines/shards running a 100TB (LDBC) dataset with 1.2tn nodes and relationships.

Demo application instructions Overview This repository contains the code necessary to reproduce the results for the Trillion Entity demonstration that

Nov 23, 2022

JFXNodeMapper - a simple library that focuses on mapping data from common data represntation formats to JavaFx Nodes

JFXNodeMapper - a simple library that focuses on mapping data from common data represntation formats to JavaFx Nodes. Our main focus is to build a library that,

Oct 15, 2021

A blockchain system to manage monetary transactions between the different nodes of a decentralized network.

A blockchain system to manage monetary transactions between the different nodes of a decentralized network.

Blockchain under a clear vision A blockchain system to manage monetary transactions between the different nodes of a decentralized network. Authors @s

Jun 9, 2022

Sqript is a scripting language.

Sqript is a scripting language.

Sqript Sqript allows to edit the behavior and the content of the game with scripts. In a few lines, you can change the gameplay, add items or blocks,

Feb 23, 2022

RustScript is a functional scripting language with as much relation to Rust as Javascript has to Java.

RustScript RustScript is a scripting language as much relation to Rust as JavaScript has to Java I made this for a school project; it's meant to be im

Dec 24, 2022

A MATLAB-like scientific scripting environment for Kotlin, a simpler Kotlin only version of KotlinLab

KotlinLab: Easy and effective MATLAB-like scientific programming with Kotlin and Java JShell Installation The installation of KotlinLab is very simple

Sep 28, 2022

A template and introduction for the first kafka stream application. The readme file contains all the required commands to run the Kafka cluster from Scrach

Kafka Streams Template Maven Project This project will be used to create the followings: A Kafka Producer Application that will start producing random

Jan 10, 2022

esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.

esProc SPL is a scripting language for data processing, with well-designed rich library functions and powerful syntax, which can be executed in a Java program through JDBC interface and computing independently.

esProc esProc is the unique name for esProc SPL package. esProc SPL is an open-source programming language for data processing, which can perform comp

Dec 27, 2022

Scripting language written in, and, designed to communicate with, java

Scripting language written in, and, designed to communicate with, java

mi-lang Scripting language designed to communicate with java, to allow for easy plugins, addons, etc in any project, all without having to create an e

Dec 17, 2022

Polydex - a mod allowing you to see player-friendly information about blocks and items on servers

Polydex is a mod allowing you to see player-friendly information about blocks and items on servers. It designed for survival-like, vanilla client compatible servers using Polymer mods or PolyMC, through it can be used in modded or vanilla-content setting!

Dec 20, 2022

Checks items in inventories to see if they were duped as part of the Crystal Hollows Dupe Event in Hypixel Skyblock.

Checks items in inventories to see if they were duped as part of the Crystal Hollows Dupe Event in Hypixel Skyblock.

Checks items in inventories to see if they were duped as part of the Crystal Hollows Dupe Event in Hypixel Skyblock.

Dec 19, 2022
Releases(0.0.3)
Owner
null
Training materials for NODES 2021 training on Neo4j Aura

NODES 2021: Neo4j Aura Training Event page: Hands-on with Neo4j Aura - NODES 2021 training series This repository contains the materials needed for th

null 17 Oct 30, 2021
A scale demo of Neo4j Fabric spanning up to 1129 machines/shards running a 100TB (LDBC) dataset with 1.2tn nodes and relationships.

Demo application instructions Overview This repository contains the code necessary to reproduce the results for the Trillion Entity demonstration that

Neo4j 84 Nov 23, 2022
Transform ML models into a native code (Java, C, Python, Go, JavaScript, Visual Basic, C#, R, PowerShell, PHP, Dart, Haskell, Ruby, F#, Rust) with zero dependencies

m2cgen m2cgen (Model 2 Code Generator) - is a lightweight library which provides an easy way to transpile trained statistical models into a native cod

Bayes' Witnesses 2.3k Jan 4, 2023
A visual representation of labyrinth solving with common traversal and heuristic algorithms + basic AI patterns

Path-finder A visual representation of labyrinth solving algorithms using common traversal algorithms such as BFS, DFS, A*. Plus there are some basic

Janez Sedeljšak 2 Jan 19, 2022
A Simple movies app using JAVA,MVVM and with a offline caching capability

IMDB-CLONE A simple imdb clone using JAVA,MVVM with searching and bookmarking ability with offline caching ability screenshots Home Screen 1 Home Scre

saiteja janjirala 13 Aug 16, 2022
A course for learning how to program FRC robots using the WPILib and a Romi robot.

FRC-Romi-Programming-Course A course for learning how to program FRC robots using the WPILib and a Romi robot. This course is designed for FRC teams o

null 16 Nov 9, 2022
Data Structure using Java Project

CSC348-Data-Structure This repository contains end of semester project for Data Structure (UiTM diploma's subject). It is developed using Java languag

Farhana Ahmad 2 Oct 11, 2021
calculator when you be using a model that employs RPN (Reverse Polish Notation)

calculator when you be using a model that employs RPN (Reverse Polish Notation) in its calculations and be a custom build all at the same time? The kids may have colour TFTs and graphing functions, but your keyboard has no equals sign, and that means something.

Eslam ElBeak 8 Oct 28, 2021
Word Count in Apache Spark using Java

Word Count in Apache Spark using Java

Arjun Gautam 2 Feb 24, 2022
Data Structures and Algorithms (DSA) - Java Language Using Integrated Development Environments NetBeans

Data Structures and Algorithms (DSA) Course Code : CSC211 Credit Hours : 4 Language : JAVA Integrated development environments : NETBEANS Topic Covere

Ossama Mehmood 샘 2 Oct 1, 2022