[x3d-public] Holger, please change Cobweb page to include something like this:

Don Brutzman brutzman at nps.edu
Fri Jan 8 22:53:36 PST 2016


Yes the iframe example (at the bottom of your note below) likely has broad interest.

In coming weeks, I hope to change all of the plugin code throughout the X3D Examples html pages with the Cobweb iframe.

Then I would also like to add a new page using the following snippet, i.e. start generating and including local versions of your index.html/X3dExamplesViewer.html as part of each examples archive, if that makes sense.

https://github.com/coderextreme/X3DJSONLD/blob/master/index.html
https://github.com/coderextreme/X3DJSONLD/blob/master/X3DExamplesViewer.html


On 1/8/2016 10:37 PM, John Carlson wrote:
>      Thanks to Andreas Plesch.  Holger, could you add something like this to the Cobweb page to document how to build xml on the fly and submit it to Cobweb for viewing?  Thanks, John
>
> For an frame outside an iframe, xml being an array of strings.
>
>         var content = xml.join("");
>
>      var cobwebWindow = document.getElementById("cobwebframe").contentWindow ;
>      var cobwebEle = cobwebWindow.document.getElementById("x3dele");
>      if (typeof cobwebWindow.X3D !== 'undefined') {
>              var browser = cobwebWindow.X3D.getBrowser(cobwebEle);
>              browser.replaceWorld(browser.createX3DFromString(content));
>              // etc.
>      }
>
>
> and something else for loading inside the same document (which I can get from Andreas, I think).

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list