Simple, Portable, Immediate mode UI with egui

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2024

ความคิดเห็น • 35

  • @JeffHanke
    @JeffHanke ปีที่แล้ว +26

    Lerp is a "linear interpolation" function: find the value between points "a" and "b" given a fractional distance "d" where "d = 0.0" is at "a", "d = 0.5" is halfway between "a" and "b", and "d = 1.0" is "b". Bonus fact: Bézier curves are just a bunch of lerps.

    • @laundmo
      @laundmo ปีที่แล้ว +15

      i highly recommend Freya Holmers videos about lerp, bezier curves and splines
      very informative and really well made

    • @jaysistar2711
      @jaysistar2711 ปีที่แล้ว

      @@laundmo Yeah, I hope she eventually covers NURBS. It's the best explaination for splines that I've seen.

  • @chris.davidoff
    @chris.davidoff ปีที่แล้ว +32

    I love egui!! It looks and works so well :) I use it for work and I want to make something more with it personally. The wasm part is super cool and works pretty easily

    • @chris.davidoff
      @chris.davidoff ปีที่แล้ว +2

      @You Tube No idea, never used imgui. But using the "eframe template" which uses egui, gets you up and running extremely quickly

    • @biggiefrosty
      @biggiefrosty ปีที่แล้ว +3

      @You Tube it’s very similar, a dear-imgui alternative written directly in Rust rather than wrapping C code like imgur-rs

  • @yeetyeet7070
    @yeetyeet7070 ปีที่แล้ว +7

    if it can render maps, it's probably all I ever wanted. The plots already look amazing.

    • @nahiyanalamgir7056
      @nahiyanalamgir7056 24 วันที่ผ่านมา

      If rendering maps is all that you need, you probably want to just use a library like wgpu.

  • @MasterHigure
    @MasterHigure ปีที่แล้ว +4

    The Rustacean Station podcast did an interview with the man behind egui half a year back.

  • @jaysistar2711
    @jaysistar2711 ปีที่แล้ว +15

    I think that the whole idea of "look like a (something)OS app" is limiting. I agree with dark and light mode, or a theme based on a color pallette and some requested styles, but that's about as far as I'd go. You can't make responsive apps (apps that know what screen size the should render to, and sometimes even know realworld units, like centimeters) unless you know the style and layout of your widgets. The web has a large number of different styles and layouts, and responsive apps are everywhere. Everytime Windows updates and draws buttons differently, it breaks native apps' usablity because the text is now drawn over a button edge detail that wasn't there in the previous version. I would rather purposely use a style that is consistant between platforms than use whatever the platform dictates how buttons and textboxes look. I'm all for theming; dark and light, maybe even a few things like primary, secondary, and background colors could be given by the OS, but not actual button layouts, etc. Material UI themes look good, maybe they should just copy their theme input, and leave it open ended, so if we have extra info to give the apps about how the user wants things to look, we could add it in the future.

    • @WouterStudioHD
      @WouterStudioHD ปีที่แล้ว +7

      I think it's important for an OS to have some standards and it's important for apps to be able to inherit this. On macOS this works really well, most things look like they belong on it, when they're designed with SwiftUI or AppKit. But I also agree that electron apps can also look really good, so it's not always so important for cross platform apps. But as far as Egui goes, I still have to find an app made with it that actually looks good for end users. It's all a little cold and bland from what I've seen. Works well for engineers, but not for everyday commercial customers. I'd like to see some good examples tho, so if you know any I'd love to hear!

  • @LifeCodeGame
    @LifeCodeGame ปีที่แล้ว +3

    Egui is really nice. I have made a game Ui using it.

  • @jaysistar2711
    @jaysistar2711 ปีที่แล้ว +6

    I like and use egui, but I do have a problem with it. It assumes 2D all the way down. Game engines used ScaleForm for UI for 2 decades, which is basically just Flash (now Adobe Animate). Not everything in Flash worked because ScaleForm gave you vertex and index buffers along with textures, just like egui, but it also allowed some elements to come with transforms (a 4x4 matrix), which allows some UI elements to pop out. I am making UI for VR, so 3D is pretty much required, since thing will really look flat reguardless of how much shadow you use on it.

    • @jaysistar2711
      @jaysistar2711 ปีที่แล้ว +2

      I know, I overthink things 😁, but it's how I get things to come out perfectly (meaning that I have no further complaints) when the tweeking's done.

  • @bubblekill2311
    @bubblekill2311 ปีที่แล้ว +1

    always some good stuff to see here, keep up!

  • @azzamsya
    @azzamsya ปีที่แล้ว +1

    Thanks for the video!

  • @michaelsohnen6526
    @michaelsohnen6526 ปีที่แล้ว +2

    How would i make the gui overlay a graphics window? I would like to draw pixels on a texture and blit it behind the egui widgets.

    • @jaysistar2711
      @jaysistar2711 ปีที่แล้ว +2

      Look at eframe. You can learn how to use render and pass input to egui from inside your own engine by looking at what eframe does.

  • @grzegorz.bylica
    @grzegorz.bylica ปีที่แล้ว

    I love egui too

  • @small-software-stoper
    @small-software-stoper ปีที่แล้ว

    I don't know if I can show off my program written using egui Super Materials

  • @hagimo_dev
    @hagimo_dev ปีที่แล้ว

    amazing content . Keep it up !

  • @erikjohnson9112
    @erikjohnson9112 ปีที่แล้ว

    Can anyone get the demo linked in the video description to work on latest Chrome (on Windows 11 in my case). Even after enabling all kinds of WASM and WebGPU stuff, I get:
    TypeError: handle.then is not a function

  • @dot32
    @dot32 ปีที่แล้ว

    could you do iced next 👀

    • @chrisbiscardi
      @chrisbiscardi  ปีที่แล้ว

      I put iced on the video list. Not sure when I'll get to it though.

    • @dot32
      @dot32 ปีที่แล้ว

      @@chrisbiscardi ooh cool!

  • @phoenicianathletix2866
    @phoenicianathletix2866 ปีที่แล้ว +1

    Can this be used as an alternative to having JavaScript & css in the UI
    For a website using a Rust backend?

    • @chrisbiscardi
      @chrisbiscardi  ปีที่แล้ว +4

      egui can be used on the web (see the demo here: www.egui.rs/#demo). Whether or not that's useful for your project depends on what you need it to do. It's not a replacement for dom-related technologies.

    • @phoenicianathletix2866
      @phoenicianathletix2866 ปีที่แล้ว +2

      @@chrisbiscardi lets say if tiktok or youtube used egui for the UI would the page load faster considering its not using javascript & css?

    • @mariocamspam72
      @mariocamspam72 ปีที่แล้ว +2

      @PhoenicianATHLETIX Generally yes, but you miss out on the js-centric ecosystem

    • @chrisbiscardi
      @chrisbiscardi  ปีที่แล้ว +3

      ​@@phoenicianathletix2866 This is not something you can determine without doing a full buildout of either of those sites with egui and comparing them directly, and even then full rewrites don't directly compare underlying technology well unless they're done explicitly to benchmark the difference. It's also important to note that TH-cam doesn't work without JavaScript, so you need to fully load the relevant scripts or wasm before the site can function at all which means you have to pick a more specific metric than "page load" to measure.
      TH-cam and TikTok are massive sites with gigantic amounts of people working on them. Simply switching from JS to Wasm or Wasm to JS is not the most important consideration for them. Either way TH-cam or TikTok have an entire team of people or more dedicated to making sure their sites load quickly which means they can do things that would be out of reach for you or I to implement to impact those times.

    • @nahiyanalamgir7056
      @nahiyanalamgir7056 24 วันที่ผ่านมา

      @@phoenicianathletix2866 In theory, it should be faster because your engine only has to determine where to draw the pixels instead of reading some instructions on how to determine where to draw the pixels. Since it's also browser-agnostic, the performance and behavior would not depend much on the browser.

  • @boredstudent9468
    @boredstudent9468 ปีที่แล้ว

    what about Iced-rs and libcosmic ?

    • @chrisbiscardi
      @chrisbiscardi  ปีที่แล้ว +2

      I put iced on the list. Don't know when I'll get to it.

    • @boredstudent9468
      @boredstudent9468 ปีที่แล้ว

      @@chrisbiscardi no stress, while i'd apreciate that video, the comment was mostly a joke on the opening.

    • @chrisbiscardi
      @chrisbiscardi  ปีที่แล้ว

      @@boredstudent9468 ah ok haha. It's not the first time someone has asked about iced 😆