[x3d-public] loading X3D DOM. Latest Cobweb techniques?
yottzumm at gmail.com
yottzumm at gmail.com
Wed Nov 30 18:23:21 PST 2016
What are the latest techniques for loading X3D into Cobweb with JavaScript? Here’s what I have as of cobweb 2.3. “element” is the top-level X3D DOM element. “content” is the X3D document. If I use both of these on a page, will it choose one canvas, or if I call both, will two renderings take place on the same canvas? How do I get Cobweb to render to 2 canvases? How do I get Cobweb to render to a particular canvas? Through an iFrame? Say I want to compare rendering DOM versus rendering XML.
In otherwords, how do I get “Leipzig, 21. October 2016: We finally released version 2.3 now. This version fixes an issue of the context menu for multiple <X3DCanvas> elements, ie. multiple browsers on one web page are now officially supported” on the cobweb page working?”
Thanks,
John
function loadCobwebXML(content) {
X3D(function(el) {
var browser = X3D.getBrowser(el);
browser.replaceWorld(browser.createX3DFromString(content));
});
}
function loadCobwebDOM(element) {
X3D(function(el) {
var browser = X3D.getBrowser(el);
var importedScene = browser.importDocument(element);
browser.replaceWorld(importedScene);
});
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20161130/15e6cfc3/attachment.html>
More information about the x3d-public
mailing list