biasmv / pv

WebGL protein viewer
https://pv.readthedocs.org
MIT License
316 stars 85 forks source link

HTML5 canvas support #76

Closed kozmad closed 9 years ago

kozmad commented 9 years ago

Hello!

Recently I had to utilize JSmol on my web page due to its HTML5 canvas support. I was wondering if it would be possible to integrate this technology into PV? It would detect the WebGL support of the browser and fall back to HTML5 if WebGL is not available. (I've found phoria,js, perhaps it could be used.) Is there any way to do this? Does it make any sense?

Cheers, Daniel

biasmv commented 9 years ago

Hi Daniel,

Thanks for the suggestion.

I've done some experimenting with HTML5 canvas before starting to code PV. At that time my take-home message was: Don't bother with HTML5 canvas at all, rendering even small proteins is very slow, let alone for decently sized molecules. It's very hard to work interactively with a HTML5 based viewer. At that point in time, it's almost better to generate pictures on the server and send them to the client side.

Now, things might have changed in the meantime and people might have found ways to use the canvas in more efficient ways. Did you come across 3D renderer with a HTML5 canvas backend that is capable of rendering moderately complex scenes?

In my opinion, it's also becoming a game of diminishing returns: Already now a large fraction of browsers/devices do have WebGL, in a few years there will only be very few browsers/devices that don't have it. Given that it's a rather large undertaking, I'm not sure if it's worth the effort.

Best, Marco