The new hook_webgl() feature is great and allows us to embed rgl objects in an html page. Currently, the functionality breaks down when trying to embed more than one rgl object. This is a known issue, but @yihui requested the issue be reported on github. I've provided a minimal example here along with the Rmd source.
Thanks! I'll look at this. I feel there might be problems with rgl::writeWebGL().
fixes #494: use the chunk label as the unique identifier for webgl ob…
should be fixed now; see https://dl.dropbox.com/u/15335397/misc/webgl-rmd.html
Awesome, thanks!! I plan on using it for future vignettes :)
Hi @yihui. I'm not quite sure this is a knitr issue, but the interactivity is not seamless. That is, when you click and drag an rgl object...then click and drag again, the object restores to it's original state. You can see this for yourself on the dropbox link. This wasn't a problem with a single rgl object.
Okay, I noticed that in the 3D scatterplot, but not in the spheres. This looks weird. I also tried three plots in the same page, and I found the last plot was always normal. I do not know what is going there.
Perhaps you can cook up a minimal example based on rgl::writeWebGL(), and send it to Duncan (@dmurdoch).