NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Show HN: I rebuilt my old canvas 3D library as a small WebGL 2 library – phoria2 (kevs3d.co.uk)
Arkada 1 days ago [-]
Wasn't expecting `chart({ mark: ... })` primitives in a 3D WebGL 2 library that cover timeseries, heat-colored hour/day surface charts, and tiled dashboards off the bat—that’s quite a pleasant surprise!

There were two things in particular about the landing page that caught my eye: 1. Views that only render when there’s something to update (this is especially important for financial/trading dashboards when there are 8+ chart views open all day long and no way to afford 60fps render loop chewing up the GPU without any data). 2. Errors in option validation designed specifically to inform coding bots what to do.

Now, as far as `TIMESERIES` and `SURFACE` chart types go, how effective is `tween` when it comes to updating geometry buffer in live stream mode (e.g. adding new candle/bucket in real time)?

kevs3d 8 hours ago [-]
Yeah i definitely wanted to target "business" use-cases. We use ECharts at work for stuff like this for 2D mostly. Ensuring that phoria could do a dashboard of 100 charts using WebGL2 and minimal update was something I really wanted to get working well.
taylor-tg 1 days ago [-]
This is super cool, and I loved seeing the FPS stay locked at 120 on my phone. I didn't see this on the website, but do you have any docs that detail how your library compares to other popular options such as Three, Babylon, etc? Definitely giving this a try today.

One thing I noticed is that the "hover" functionality in most of the demos doesn't behave well on mobile. Taps don't stay active for long after interacting with something. Not sure if this is intentional or just a browser compatibility quirk (Fennec on Android 17). Happy to make a contribution if it should be a little more persistent!

kevs3d 8 hours ago [-]
One of the first things i did was to "gap analysis" with existing libs to see if i could find a niche as I don't want to overlap three.js too much...

The full source on github has a bunch of agent tests that compare running tasks with phoria and three.js. It comes out well, with the agents able to build with both (obviously three because it's TRAINED on that, but I provide enough in llms.txt etc for phoria) and phoria code is ~50% smaller for the same task!

kevs3d 8 hours ago [-]
I'll have a look at the hover, always a tricky thing on phones/pads
rishulmatta 15 hours ago [-]
It is cool! I have often thought how such visuals can be used in language learning. But nothing clicks. For sure there are immersive ways to teach language with such rich visuals?
gmmachine 1 days ago [-]
Ok, the bricks demo is laugh out loud fun, thanks!
kevs3d 8 hours ago [-]
it's kind of addictive!
hellojomp 1 days ago [-]
Really, very nice, some good aesthetic taste here, woooowy!
kevs3d 8 hours ago [-]
thanks! appreciated.
pmkary 1 days ago [-]
This is insanely performant, wow!
mg794613 23 hours ago [-]
Wow, that is amazing, these demo's are exactly the same demo's Claude keeps buildings for me for any 3d engine I try with it.

Even most comments in the code look exactly like my Claude output!

I guess they've must have trained on your codebase or something!

kevs3d 8 hours ago [-]
haha yes. I most definitely used Claude to help with the rewrite - it is a lot to do otherwise with a full-time job and a family. i found it great at helping with quick demos for it also.
bartread 9 hours ago [-]
Is this sarcasm? Kev's 3D has been around for donkey's years. I first found the site over a decade ago. So, yeah, I wouldn't be super-surprised if Claude was trained on some of it, and I also wouldn't be surprised if the author had used Claude to rewrite the library. Why wouldn't he given how long it would take to do by hand?
kevs3d 8 hours ago [-]
I like to think some of the models may have found my code over the years, some of my JS demos have been online for over 15 years...
bartread 7 hours ago [-]
Yeah: I remember playing your version of Asteroids in maybe 2015 or so.
kevs3d 7 hours ago [-]
classic! thanks! :)
socalgal2 20 hours ago [-]
I haven’t used a 3d library this year. Claude will write exactly what the project needs. No need for a library, less bloat, more opportunities to optimize
socalgal2 15 hours ago [-]
Funny to see this downvoted with zero counter evidence

Shopify recently posted how they are getting rid of libraries if you need a name associated with the fact that they are no longer needed. Ask an Ai to make a nanite type engine and 1-2 hours later you’ll have it. Ask for some some other tech and it will do that instead. Ask it to optimize and it will test and find solutions

thrance 1 days ago [-]
That's very nice, but... why WebGL2 instead of WebGPU?
Lerc 1 days ago [-]
Having tried WebGPU recently, it still isn't at a point where it can be relied upon on all platforms.

Notably I have to use Chrome on Linux because Firefox doesn't provide it out of the box. It still crashes a fair bit on Chrome.

kevs3d 8 hours ago [-]
Yes just compatibility at the moment really, webgl2 runs great on most things i tried
vconnor 14 hours ago [-]
WebGPU still isn’t supported on Linux (Brave or Firefox, in my tests)

WebGL2 runs on toasters.

Why do you need WebGPU when WebGL2 is enough?

fullstackwife 13 hours ago [-]
There is probably no *need*. WebGPU gives in a nut shell a few additional ways to shave off CPU time.
artifact_44 19 hours ago [-]
[dead]
truekonrads 14 hours ago [-]
Slick
realitylabs 23 hours ago [-]
Yup, this is rad.
vivzkestrel 17 hours ago [-]
- so that is what 3d is eh?

- we got our coordinates x and y increasing towards the right on the screen and bottom respectively

- but we imagine 3d items as having a 0,0,0 at the center of the screen where x increases towards right, y increases towards top and z increases if you smashed your head inside the screen

- z is 0 at your eyes? and negative behind your head?

- then you apply a transform for this stated effect

- and you wanna calculate the projection of this fictional 3d object on 2d in your screen?

jdw64 1 days ago [-]
Wow, the demo is really great. It’s impressive that even these demos run fast enough on my phone.
kevs3d 8 hours ago [-]
thanks! tried to make it perform well for phones/ipads etc.
sachinn_kumar 3 hours ago [-]
[flagged]
airaai 1 days ago [-]
[flagged]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 20:06:59 GMT+0000 (Coordinated Universal Time) with Vercel.