[x3d-public] Announcing XSeen

Leonard Daly Leonard.Daly at realism.com
Mon May 29 23:16:49 PDT 2017


John,

Thank you for your interest. I have thought about how to create a scene 
in the browser if the input is JSON. I don't really have an answer right 
now. One solution I thought of is to create DOM nodes from the info in 
the JSON, then parse the DOM into the scene graph. There is obvious 
overhead, but it does reduce the problem to a previously solved case.

At this time I am comparing features to determine which are important 
and how best to express them. I have tried to keep the input 
possibilities as simple as possible so I haven't worked on handling a 
JSON encoding just yet. I do consider it important, but I'm not sure 
exactly where to start with it given where XSeen is right now.

When importing, I can take an X3D file and parse it as an XML file to 
create a DOM tree that is not attached to the document. I walk through 
the tree looking for a Scene element, then move all children of Scene to 
be children of the referring Inline. If you have code that can take an 
input (as external reference via Inline) and parse it into a DOM tree, I 
would be interested. Is that what your code does?

Leonard Daly




> Interesting.  Do you need a JSON -> DOM library, or are you going with 
> glTF or some other tool based JSON?
>
> X3DJSONLD may work for your JSON -> DOM purposes.  It is intended to 
> be fairly JSON encoding agnostic, and I’d like to try it with one of 
> your scenes.  Do you have a scene in JSON?  That is, I don’t have a 
> DOM -> JSON yet, but that’s on my near todo list, and I have a 
> pre-alpha prototype, if X3D/X3DOM Scripts and Routes are no longer a 
> priority.  It sounds like DOM -> JSON is higher priority…
>
> If you do have JSON, and you are using 
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/X3DJSONLD.js 
> ,  you will need to modify the below method to provide your own 
> loadSchema for JSON validation, or just remove it an rely on the basic 
> DOM validation in the browser.
>
> I do have a version which is more packaged, found in cobweb/X3DJSONLD, 
> here: 
> https://github.com/coderextreme/cobweb/blob/master/cobweb.js/cobweb/Parser/JSONParser.js 
> in that case, you just call var dom = 
> JSONParser.parseJavaScript(jsObj), but it creates and X3D DOM element, 
> which may not be desired.  The code is cleaner, and you may provide an 
> alternative to parseJavaScript…
>
> There are also DOM -> XML serializers in X3DJSONLD (not the above 
> JavaScript, but in src/main/node) to validate your JSON is producing 
> the right DOM.  The serialization is fairly standard, but you may find 
> that you need to do some substitutions, which I provide.
>
> I will start work on DOM -> JSON again. We do need a second 
> implementation, and I need it for client side purposes.  Off to work!
>
> functionloadX3DJS(jsobj, path, xml, NS, loadSchema, doValidate, 
> callback) {
>
>
> 	
>
> console.error("Invoking client side loader");
>
>
> 	
>
> loadSchema(jsobj, path, doValidate, function() {
>
>
> 	
>
> x3djsonNS =NS;
>
>
> 	
>
> varchild =CreateElement('X3D', NS);
>
>
> 	
>
> ConvertToX3DOM(jsobj, "", child, path);
>
>
> 	
>
> if(typeofxml !=='undefined'&&typeofxml.push==='function') {
>
>
> 	
>
> xml.push(serializeDOM(jsobj, child));
>
>
> 	
>
> }
>
>
> 	
>
> console.error("Returning with", child);
>
>
> 	
>
> callback(child);
>
>
> 	
>
>        }, function(e) {
>
>
> 	
>
> console.error(e);
>
>
> 	
>
> callback(null);
>
>
> 	
>
>        });
>
>
> 	
>
> }
>
> John
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for 
> Windows 10
>
> *From: *Leonard Daly <mailto:Leonard.Daly at realism.com>
> *Sent: *Monday, May 29, 2017 7:11 PM
> *To: *X3D Public <mailto:x3d-public at web3d.org>
> *Subject: *[x3d-public] Announcing XSeen
>
> As most of you know I have been advocating that X3D fully move into 
> the HTML5 environment and support the display and interaction of 
> flat-screen and VR declarative content in the browser. A-Frame offers 
> many of those capabilities and was built for the browser environment.
>
> In keeping with my advocacy of this evolution of X3D, I started 
> development of a library that supports comparison and definition of 
> the best features of A-Frame, X3D, and other capabilities. This is a 
> very early pre-alpha development release to help generate interest in 
> a discussion of the appropriate technologies to include in the 3D/VR 
> HTML language. The initial release is announced at 
> http://realism.com/blog/xseen-merging-x3d-and-frame
>
> At this stage only a few static features are available including all 
> 3D pre-defined solids from  both languages plus X3D's Appearance, 
> Material, Shape, Transform, and Inline. It is possible to mix nodes 
> from X3D and A-Frame. The initial version of the library is on GitHub 
> at https://github.com/DrX3D/XSeen. It runs on top of THREE.js
>
> My next step is to write the beginnings of the internals documentation 
> describing how to add nodes and other features. At this time there are 
> no capabilities for animation except for what is done directly through 
> THREE.
>
> The goal of this work is to develop a language that is
>
>  1. Standardizable
>  2. Enterprise ready
>  3. Fully HTML5/DOM integrated
>  4. Runs in all browsers
>  5. Fully support VR, AR, xR, and flat-screen displays as determined
>     by the content developer and user
>  6. Leverages other standards and communities applications and libraries
>
> -- 
> *Leonard Daly*
> 3D Systems & Cloud Consultant
> LA ACM SIGGRAPH Chair
> President, Daly Realism - /Creating the Future/
>

-- 
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170529/bc58e631/attachment-0001.html>


More information about the x3d-public mailing list