[x3d-public] X3D JSON X_ITE scene loading. As well as XML or DOM (one or the other or both) loading.

John Carlson yottzumm at gmail.com
Sun Mar 4 05:52:41 PST 2018


These are my interfaces to X_ITE 4.1 from JavaScript.  At least 2 of these get stuck loading.  As far as I know, these work with 4.1.3.

Andreas, any ideas?   This applies to 4.1.5a (master branch).  I haven’t gotten these interfaces working with 4.1.5a or 4.1.4.  4.1.4 will require my modifications (not published, but a zip is available on request.  4.1.3 with my modifications is also available as a zip on request).  I don’t know if the interfaces disappeared or what??? No clues on console, that I can see.

X3D JSON should work fine (through URLs) with 4.1.5a, so that’s not the issue that I know of.

I think we need to get these resolved before another release of X_ITE.

Andreas, you may push to my coderextreme/X3DJSONLD branch.  X_ITE is installed in src/main/node and src/main/css (and other places, probably inconsequential).  This is my 4.1.3 release of X_ITE right now.

John

src/main/node/loaderJQuery.js:


function load_X_ITE_XML(content) {
        X3D(function() {
                var browser = X3D.getBrowser("#x_itexml");
                browser.replaceWorld(browser.createX3DFromString(content));
        }, function() {
                alert("Failed to render XML to X_ITE");
        });
}

function load_X_ITE_DOM(element, browserSelector) {
        X3D(function() {
                if (typeof X3D.getBrowser !== 'undefined') {
                        var browser = X3D.getBrowser("#x_itedom");
                        if (typeof browser !== 'undefined' && typeof browser.importDocument !== 'undefined') {
                                var importedScene = browser.importDocument(element);
                                browser.replaceWorld(importedScene);
                        }
                }
        }, function() {
                alert("Failed to render DOM to X_ITE");
        });
}

function load_X_ITE_JS(jsobj, browserSelector) {
        X3D(function() {
                if (typeof X3D.getBrowser !== 'undefined') {
                        var browser = X3D.getBrowser("#x_itejson");
                        if (typeof browser !== 'undefined' && typeof browser.importJS !== 'undefined') {
                                var importedScene = browser.importJS(jsobj);
                                browser.replaceWorld(importedScene);
                        }
                }
        }, function() {
                alert("Failed to render JSON to X_ITE");
        });
}


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180304/debc811d/attachment.html>


More information about the x3d-public mailing list