Code Monkey home page Code Monkey logo

egui_node_graph's Introduction

Egui Node Graph

There you have it! Now go build your next awesome node graph thing in Rust ๐Ÿฆ€

Latest version Documentation MIT unsafe forbidden

Showcase image

Egui node graph is a featureful, customizable library to create node graph applications using egui. The library takes care of presenting a node graph to your users, and allows customizing many aspects of the interaction, creating the semantics you want for your specific application.

Features and goals

This crate is meant to be a solid base for anyone wanting to expose a node graph interface to their users. Its main design goal is to be completely agnostic to the semantics of the graph, be it game logic, audio production, dialog trees, shader generators... we have you covered!

The purpose of this library is to draw your graphs and handle the common user interaction, like adding new nodes, moving nodes or creating connections. All the additional functionality is provided by the user by means of custom user types implementing several traits.

Usage

To see a node graph in action, simply clone this repository and launch the example using cargo run. This should open a window with an empty canvas. Right clicking anywhere on the screen will bring up the node finder menu.

The application code in the example is thoroughly commented and serves as a good introduction to embedding this library in your egui project.

A note on API visibility

Contrary to the general tendency in the Rust ecosytem, this library exposes all types and fields that may be remotely relevant to a user as public. This is done with the intent to be as flexible as possible, so no implementation details are hidden from users who wish to tinker with the internals. Note that this crate forbids use of unsafe so there is no risk of introducing UB by breaking any of its invariants.

That being said, for the most typical use cases, you will want to stick to the customization options this crate provides for you: The generic types in the GraphEditorState object and their associated traits are the main API, all of the other types and fields in this crate should be considered an implementation detail. The example project contains a detailed explanation of all the customization options and how are users supposed to interact with this crate.

Finally, this does not change the fact that this crate follows semantic versioning, as is usual in the Rust ecosystem. Any change to a public field is still considered breaking.

Use cases

Egui node graph is the library powering the graph user interface of Blackjack, a 3d procedural modelling software built in Rust using egui, rend3 and wgpu. Main interface of blackjack Are you using this crate for something cool? Add yourself to this section by sending a PR!

Contributing

Contributions are welcome! Before writing a PR, please get in touch by filing an issue ๐Ÿ˜„

egui_node_graph's People

Contributors

fenollp avatar setzer22 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.