Hacker News new | ask | show | jobs
by cycloptic 2216 days ago
With all due respect, please don't encourage more websites to use WebGL for trivial things! This stuff is only really useful for games or some other kind of interactive demo, and wastes power when used for decorative graphics on ordinary informational web sites.

I think compiling native OpenGL ES programs to WASM is probably a bit more of a practical use case, but that comes with its own set of problems... WebGL still suffers from various security issues and bugs on certain platforms: https://github.com/chromium/chromium/blob/master/gpu/config/...

2 comments

Couterpoint: encourage more people to use WebGL for trivial things! Learn new concepts, break old ways of thinking, experiment with half-baked ideas, allow yourself room to grow. Don't let people tell you that the web is one single thing with rules. There are no rules! You can do whatever you want!
That is all fine for a personal website, but if you're thinking of WebGL for general use, there are an absurd number of rules. I even linked some of them in the parent post.
It really depends what the use case is.

For example one of the sites linked off a site further above is Orano[0]. Beautiful and looks pretty cool, but accessibility doesn't seem that great, i.e. contrast ratio and overall legibility.

So when creating informational sites always keep accessibility in mind, regardless what technology you choose to use.

https://www.orano.group/experience/innovation/en

If only someone would invent a back button so you wouldn't have to stay on the same page.

Also OpenGl ES isn't something that is compiled to WASM, it is a javascript API. WASM does not have access to the DOM or IO.

Interestingly enough, this website hijacks the back button so you can't go back. (Android/Firefox)
I'm not sure what you're saying. WASM can definitely get access to those things through javascript shims. A native OpenGL ES program can be compiled relatively easily to WASM because it maps one-to-one with the WebGL API and barely needs a shim at all. This has been supported in Emscripten for a while now and makes it a lot easier to do things like port mobile games over to the web.
Yes, this is a more detailed version of what I said. Which part makes you want to control what other people make?
Have you tried? The website actually hijack the back button...