Show HN: Nexus.js - Fabric.js for 3D

(punk.cam)

86 points | by ges 1 day ago

14 comments

  • socalgal2 1 day ago
    > Tap the Add button below to get started

    The only buttons are Objects, Stage, Camera, Get, Share

    There is no "Add" button for me.

    • ges 1 day ago
      Good catch. There was one before, just didn’t update this message yet!
    • fakedang 1 day ago
      Click objects.
      • ges 20 hours ago
        Updated
  • WhitneyLand 1 day ago
    It looks like the UX freaks out when you try to do something like pinch zoom.

    If you don’t intend to support two finger gestures, you should probably at least hook in and disable them so they don’t disrupt the experience.

    • ges 1 day ago
      Yes
  • eblahm 18 hours ago
    Really impressive app! I'm not sure what I would use it for but definitely cool and impressive.

    I built something similar a few years back. My thing doesn't do textures its essentially just icons, text or shapes that can be layered, colored or extruded in 3d space on a 2d design canvas. demo: https://sg.halbe.works/

    I built it on Skia, three.js and my own layer algorithm.

  • ppyyss8 6 hours ago
    It'd be awesome to have undo and redo. I only tried it for a bit, but it was fun :)
  • lvncelot 1 day ago
    Ha, that brings me back trying to make Fabric.js somehow usable for a 3D viewport at a startup I was working at a while ago. (We used esm.js instead of WASM for the 3d engine, to give you an idea)

    It was a lot of wrangling and unexpected behavior, and we ultimately ended up implementing a more traditional 3d gizmo - though the application was also really only meant to be used at a desktop with a mouse instead of also supporting touch controls.

  • Flux159 1 day ago
    This is pretty interesting - how has your experience been with R3F? I've built a small game level with it before and I'm wondering if I want to go all the way and build something larger.

    Also, are you planning on making this open source at some point? Fabric is nice in that it manages 2D canvas objects for you & you can build things like an editor on top, in this case as a library what would you consider the primitives on top of Three objects are? Could it be used to make an editor for a 3d level?

    • DecoySalamander 23 hours ago
      It's great for organizing your scenes, and at least for me, it's far more readable than raw Three.js code. Unfortunately, games, especially real-time ones, don't map well to idiomatic React code. You might find yourself putting bits of game logic into various awkward places. Still, I don't think there's a better alternative for the web, except maybe Threlte if you're fine with a smaller ecosystem.
    • ges 1 day ago
      I like the fact it allows you to write clean declarative code. Imperative becomes quickly messy imo.

      I’d need to find a good api to make it open source. It’s a mini ecs system handling the object states atm.

      I think the main advantage over vanilla threejs would be built-in user-friendly controls and opinionated common object types (think remote glb models, plane images, etc)

  • kookamamie 1 day ago
    It says it's "next gen" - how is that? Besides that, I think the UX could use some improvements - the landing page captions look glitched and the UI iconography looks "murky", for the lack of better word. Nice effort, though.
  • Bengalilol 1 day ago
    I wasn't able to move the camera, am I missing something obvious?
  • guigui 1 day ago
    On the default white background, the control buttons (move, rotate, roll...) look disabled to me.
    • ges 1 day ago
      Agreed. I’ve added the white background last minute because it looked better. But texts don’t look so good on it.
    • ges 18 hours ago
      Fixed!
  • kube-system 1 day ago
    Interesting, what are some use cases for something like this?
    • superconduct123 1 day ago
      Aerospace industry, watermelon industry
      • ges 1 day ago
        And sanitary industry
    • ges 18 hours ago
      I’ve initially started building it for AR / face filters but figured out it could be nice to abstract the whole simple positioning / controls logic as a stand alone lib.
  • Eduard 1 day ago
    two-finger input doesn't work on my Android Chrome: a previously placed banana just glitched around, then jumped out of viewport.
    • ges 1 day ago
      Sorry for the banana. Yes two-finger gestures feel natural for zooming. I just didn’t implement them properly yet because i figured out there were cross browser issues with them on safari mobile. I’ll get something working.
  • popalchemist 17 hours ago
    Is there a react/vue wrapper?

    Looks amazing.

  • hoppp 1 day ago
    Cool. I put a poop on a rocket ship. Now what else can I do with it?
    • ges 1 day ago
      Nothing else. You’ve reached the peak.
  • echelon 1 day ago
    > Feel free to play with it and let me know what you think!

    This could be cool. The 2D interface for manipulating 3D is pretty interesting. 3D tends to be hard for folks and put a lot of folks off of trying to use it creatively.

    Turn this into a bigger creative canvas. Drop the crypto stuff.

    • ges 1 day ago
      Thx for the feedback. I agree.