EEVblog Electronics Community Forum

Products => Computers => Programming => Topic started by: RoGeorge on August 23, 2019, 10:56:14 am

Title: Interactive 3D shapes for webpages
Post by: RoGeorge on August 23, 2019, 10:56:14 am
Firefox was able to play this interactive 3D model without asking for plugins:
https://www.quantamagazine.org/random-surfaces-hide-an-intricate-order-20190702/ (https://www.quantamagazine.org/random-surfaces-hide-an-intricate-order-20190702/)

I want to make such interactive models that can be played offline in any web browser.

What technology/format was used there?
Any free and offline/standalone tools that can do interactive 3D models, please?

Title: Re: Interactive 3D shapes for webpages
Post by: Berni on August 23, 2019, 12:50:28 pm
This is possible trough HTML5 with things like WebGL. This is basically OpenGL for browser scripting languages like JavaScript.

If you don't want to get into nitty gritty of web programing you can make use of Raylib:
https://www.raylib.com/examples.html (https://www.raylib.com/examples.html)
Its a simple C language wrapper for OpenGL that makes it easy to write hardware accelerated applications for lots of platforms and can be compiled into web assembly and WebGL. The examples on his website will work fine offline if you get all of the required files.
Title: Re: Interactive 3D shapes for webpages
Post by: Jeroen3 on August 23, 2019, 01:26:28 pm
Wordpress has some plugins for 3D models. They load a step file or stl file.
But your examples uses sketchfab.
https://sketchfab.com/models/b55dbb8498ea497e98817a3900a2be25/embed?camera=0&autospin=.01&autostart=1

Offline is tricky, but you can always run your a local webserver.