Egui integration for nannou

Overview

nannou_egui

Latest version

This is my egui integration for nannou. The purpose of this is to allow you to tune values for your generative art creations without requiring a compilation cycle.

There are a bunch of rough edges as this is really early in dev (and I am not familiar with webgpu). Most notably, right now you need to have MSAA = 1 in your window settings and scaling doesn't work at the moment. For inspiration on how to expose UI widgets, please check the egui repo as it has a lot of examples. You have sliders, color pickers, checkboxes, dropdownlists and many more widgets available.

For information on how to integrate it to your nannou creations, there's an example in this repo.

To run the circle packing example: cargo run --example circle_packing:

To run the color tune example: cargo run --example tune_color:

Todo

  • Fixing the current MSAA issue and
  • Easier integration for storing tunable parameters to disk.
  • Shortcuts for hiding the UI
Comments
  • Adding a `egui_demo_app` example

    Adding a `egui_demo_app` example

    The main repo has a crazy example called egui_demo_app demonstrating everything egui is capable of. Almost all of the work is in egui_demo_lib and it's a published crate. I wonder if we can use the same lib but run the example under nannou_egui instead? Would be a nice test for checking the input events and rendering are all working.

    opened by mitchmindtree 1
  • enable access to create and update TextureId's

    enable access to create and update TextureId's

    Just exposing the functionality that exists in egui_wgpu_backend so we can pass in wgpu::Textures that are loaded in nannou into egui for image_buttons etc..

    opened by JoshuaBatty 0
  • Update to nannou 0.18.1, wgpu 0.11, egui 0.15, egui_wgpu_backend 0.14.

    Update to nannou 0.18.1, wgpu 0.11, egui 0.15, egui_wgpu_backend 0.14.

    Also updates the methods that involve encoding the render pass to propagate the egui_wgpu_backend Result.

    TODO:

    • [x] Switch from nannou git patch to new version once published.
    opened by mitchmindtree 0
  • Refactor `nannou_egui` and add some basic docs

    Refactor `nannou_egui` and add some basic docs

    This refactor aims to clean up the nannou_egui code a little, and provide a slightly more modular, cleaner interface (though for the most part usage is almost identical other than some name changes).

    One notable change is the use of RAII to "end the frame". The aim is to avoid the situation where users forget to call end_frame, or accidentally call end_frame on the inner CtxRef rather than top-level API. begin_frame now returns a FrameCtx - a type that derefs to a CtxRef and automatically calls end_frame and tesselates graphics when it is dropped. Users can call FrameCtx::end if they wish to end the frame before drop is invoked. Alternatively, they can just call begin_frame within a block.

    @AlexEne let me know your thoughts! I think I'll probably start using this in a large downstream project soon.

    This PR is based on #6, so it might be easier to review after merging that first.

    opened by mitchmindtree 0
  • Add some basic free CI testing using github actions

    Add some basic free CI testing using github actions

    Edit: Ah I'm yet to install any dependencies for the CI just yet - I should do that before this gets merged! Also should run cargo fmt --all, but might be easier after the other PRs are merged or will create a bunch of merge conflicts.

    opened by mitchmindtree 0
  • Create a workspace. Add crate with the official demonstration app.

    Create a workspace. Add crate with the official demonstration app.

    Currently multi-touch and the hyperlinks aren't working, but I think both wouldn't be too tricky for someone to add in a follow-up PR. I also haven't bothered tracking the CPU usage for the demo app yet, so it just sits at 0.

    Otherwise everything else appears to work nicely!

    Following this I plan to do some refactoring and add some docs, but I'll get your thoughts on those changes on the next PR.

    This PR is based on #5, so it might be worth merging that before this.

    opened by mitchmindtree 0
  • Update dependencies to most recent version, fixes MSAA limitation

    Update dependencies to most recent version, fixes MSAA limitation

    Updates:

    • nannou 0.16 -> 0.17.1
    • egui 0.10 -> 0.13.1
    • egui_wgpu_backend 0.6 -> 0.10

    It looks like the latest version of the egui wgpu backend can now handle MSAA other than 1. Closes #3.

    I also renamed the EguiBackend constructor from new to from_window, as I think it might be worth adding some more constructors e.g. for targeting non-window-frame textures, or from_app where the default window is selected automatically, etc.

    I'll likely do some more hacking on this today, I plan on trying to solve #4.

    opened by mitchmindtree 0
Owner
Alexandru Ene
Fan of cats and rust, Principal Engineer @ Amazon Prime Video
Alexandru Ene
Kalker (or "kalk") is a calculator program/website that supports user-defined variables, functions, derivation, and integration

Kalker (or "kalk") is a calculator program/website that supports user-defined variables, functions, derivation, and integration. It runs on Windows, macOS, Linux, Android, and in web browsers (with WebAssembly).

null 1.2k Dec 27, 2022
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
A plugin for Egui integration into Bevy

bevy_egui This crate provides a Egui integration for the Bevy game engine. Features: Desktop and web (bevy_webgl2) platforms support Clipboard (web su

Vladyslav Batyrenko 453 Jan 3, 2023
egui integration for ash (Vulkan).

egui-ash egui integration for ash (Vulkan). This crate natively supports the multi-viewports feature added since version 0.24 of egui. You can use gpu

Orito Itsuki 6 Dec 24, 2023
egui-tetra is a library that helps integrate egui

egui-tetra is a library that helps integrate egui, an immediate mode GUI library, with Tetra, a 2D game framework.

null 19 Jan 5, 2023
Egui node graph is a featureful, customizable library to create node graph applications using egui

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.

null 367 Jan 8, 2023
A presentation about egui, implemented in egui

egui presentation A presentation about egui, implemented in egui. You can view the presentation at https://emilk.github.io/egui_presentation/. TODO Li

Emil Ernerfeldt 9 Aug 24, 2023
A real-time implementation of "Ray Tracing in One Weekend" using nannou and rust-gpu.

Real-time Ray Tracing with nannou & rust-gpu An attempt at a real-time implementation of "Ray Tracing in One Weekend" by Peter Shirley. This was a per

null 89 Dec 23, 2022
Nannou/Rust tutorial based on Schotter by Georg Nees

Schotter (German for gravel) is a piece by computer art pioneer Georg Nees. It consists of a grid of squares 12 across and 22 down with random rotation and displacement that increases towards the bottom.

null 101 Dec 27, 2022
Sketches I created using Rust + Nannou

Sketches Motivation I have followed generative artists like Ben Kovach and Tyler Hobbs for a while, and their artwork is truly impressive. Check them

Franklin van Nes 4 Jun 11, 2022
Simulation of sand falling down in a cave built using nannou (Rust)

nannou-sand-simulation Learning nannou, an open-source creative-coding toolkit for Rust, by implementing a visualization for a simulation of sand fall

Luciano Mammino 3 Dec 20, 2022
A minimal boilerplate for Astro / Vite with the Nannou creative framework (Rust → WASM). Supports multiple sketches + hot-reload.

Astro x Nannou Starter astro-nannou-demo-1c.mov ?? Try it online! # 0a. Rust language tools open https://www.rust-lang.org/tools/install # 0b. wasm-p

Julian Cataldo 4 Jan 4, 2023
FlatBuffers compiler (flatc) as API (with focus on transparent `.fbs` to `.rs` code-generation via Cargo build scripts integration)

FlatBuffers flatc API for Rust This crate provides a programmatical way to invoke flatc command (e.g. from build.rs) to generate Rust (or, in fact, an

Vlad Frolov 87 Dec 22, 2022
A user crud written in Rust, designed to connect to a MySQL database with full integration test coverage.

SQLX User CRUD Purpose This application demonstrates the how to implement a common design for CRUDs in, potentially, a system of microservices. The de

null 78 Nov 27, 2022
Fastest and safest Rust implementation of parquet. `unsafe` free. Integration-tested against pyarrow

Parquet2 This is a re-write of the official parquet crate with performance, parallelism and safety in mind. The five main differentiators in compariso

Jorge Leitao 237 Jan 1, 2023
A cat(1) clone with syntax highlighting and Git integration.

A cat(1) clone with syntax highlighting and Git integration. Key Features • How To Use • Installation • Customization • Project goals, alternatives [中

David Peter 38.9k Jan 8, 2023
Utility to run a regtest bitcoind process, useful in integration testing environment

Bitcoind Utility to run a regtest bitcoind process, useful in integration testing environment. use bitcoincore_rpc::RpcApi; let bitcoind = bitcoind::B

Riccardo Casatta 14 Jan 3, 2023
An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Rust ESP32 Example An example project demonstrating integration with Rust for the ESP32-S2 and ESP32-C3 microcontrollers.

Espressif Systems 303 Jan 4, 2023
A template with cookie cutter CLI, Program and Integration tests for Solana blockchain

About solana-cli-program template is a sample app demonstrating the creation of a minimal CLI application written in Rust to interact with Solana and

null 46 Nov 3, 2022