As if Rhino was a web app :-)

It feels like Javascript has matured to the point that it might be possible to write Rhino3d on the web :slight_smile:

In any case, here is a recreation of a 3d viewport in Javascript (using WebGL) and manipulating a Rubik’s cube.
If anyone has the time maybe you can test it on your end to see if all the functions work (?)

I know MS Edge and Internet Explorer do NOT work at all (so no need to try there).
It should be ok on Chrome and Firefox, but I have no idea about Safari and Opera, or other browsers.

–>Rubik’s cube

Cheers,
Thomas

EDIT. Thanks to all the responses, one bug has been squashed already.
Clipboard-1

I don’t know why Edge doesn’t work as it supports WebGL just fine (like the interesting Makepad, where entire GUI is rendered in WebGL).

Anyway, the controls seem to work ok, but the rendering is a bit messed up in FF nightly:

MS Edge does have WebGL support and it seemed to work until about a week ago. The last update did something and now it is fails with a linker error and without giving me any verbose reasons why. (The shader files compile, so it is almost there by a hair).

Thanks for checking FF nightly!
It does seem bizarre, but since FF quantum (57) works fine during my tests, I am going to wait a little; assume it is something on their end.

FWIW, I’m seeing the same rendering problem here in (regular) Chrome:
image

wim, which version of Chrome are you currently running ?

Works nicely with FireFox.

1 Like

Google Chrome is up to date
Version 62.0.3202.94 (Official Build) (64-bit)

… I just checked the version and then tried your page again and now it looks good. Go figure…

1 Like

Fantastic. The exact same one I am using.
(It is probably a shader issue having to do with precision qualifiers. I am checking on it)

1 Like

I am observing the same artifacts on FF 57.0 on Win 7. This seems to be caused by co-planar surfaces, not the WebGL engine?

Thanks for checking axa. There are no coplanar surfaces though. (I wish it was a simple solution like that :slight_smile: )

Hm. All the corner ones have exactly one good face and two corrupted ones. Alll edges have one good and one corrupt face. Seems weird. Surely no coincidence? Are your decals messing this up? Are they transparent?

It probably has to do with a hack I had to apply to the shader to overcome a WebGL1.0 limitation for selecting texture units to apply to a face. It looks like it is trying to use two textures at once. The other problem is that I am not seeing this on my end, so I am guessing.

I made a small tweak. Could you clear the cache in your browser and try one more time ?

:frowning: no luck, I’m afraid

Could I bother you to check one more time ?

:slight_smile: Sorted! works fine in FF 57.0 and in Chrome 62.0.3202.94. Nice!

Excellent ! That’s a relief :slight_smile: Thanks for your help and for checking (and sorry to bug you repeatedly).

You’re very welcome, Thomas. I know what it’s like trying to debug something that you can’t even reproduce on your own system. Take care!

Doesn’t work on my Android :black_large_square:

Doesn’t work with iPad in Safari, Chrome, Firefox.

Not sure if it is supposed to?

I wasn’t having high hopes for mobile devices (and I haven’t implemented touch aware controls yet), but could you run this page on the ipad and show me what it reports ?
http://webglreport.com/