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

Andreas Plesch andreasplesch at gmail.com
Sat Jan 9 08:48:49 PST 2016


This was based on the cobweb home page which should have the canonical code
on how to load a X3D file into a cobweb browser instance. My code is just
simplified and probably easier to understand.

It would be nice to have a page explaining what content window.X3D
functions and what browser functions are available but I think they
faithfully follow the SAI.

There is some more discussion here
On Jan 9, 2016 1:37 AM, "John Carlson" <yottzumm at gmail.com> 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).
>
>
> John
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160109/181f781e/attachment.html>


More information about the x3d-public mailing list