[x3d-public] [x3dom-users] Issue with native X3D JSON loading. Coordinate getPoints() not present

Clément Igonet clement at igonet.fr
Sun Aug 16 15:08:56 PDT 2015


Hi John,

    I'm not sure to understand your answer...
    In fact, using x3dom, I dynamically add and remove inline scenes in a 
parent X3D scene.

    At the moment, I'm getting XML X3D data from the server. I'm just 
saying that it could be easier for me if I could keep json format in my 
server side (using node.js), until the client side (javascript and 
x3dom).

    I don't understand what could be the limitations for taking json 
format into account 'natively', in replacement of xml format. I would 
have thought that XML X3D data are themselves translated in json format 
in the core x3dom code...

Clement.

On 2015-08-16 23:13, John Carlson wrote:
> Ah, yes, but JSON parsing would be a cross-cutting concern across all
> X3DOM JS. You could do it probably with AOP (aspects), but I’ve
> never used AOP with JavaScript. You could also put it the X3D or Scene
> node. I can’t really say, but it seems like X3DOM is saying JS is
> the solution, not JSON. The problem with JSON right now is the
> external dependencies. With no external dependences, JSON plays well.
> With external dependencies, it’s messier. AFAIK, X3DOM doesn’t
> deal with external dependencies outside the web server. Probably
> because it’s not “native” to the web browser. We’ll see how
> that plays out. If that problem is solved with X3DOM, it’s likely
> that JSON will be able to leverage it, but I’d really have to get
> into internals and security policies to determine that.
> 
> John
> 
>> On Aug 13, 2015, at 5:14 PM, clement at igonet.fr wrote:
>> 
>> Thanks John.
>> 
>> I'm currently working on a converter OpenStreetMap to x3dom for
>> representation of buildings, all that in node.js.
>> 
>> As a very first proof of concept, I made it:
>> http://www.openearthview.net [1]
>> 
>> It would so useful to have a more 'native' implementation of json
>> format in x3dom library...
>> 
>> Clement
>> 
>> Le 13 août 2015 20:41:24 UTC+02:00, John Carlson
>> <yottzumm at gmail.com> a écrit : Not a fix to the issue, but a work
>> around. The work around is to build the children before adding to
>> the parent node. This involved reordering 2 lines of code in my
>> current X3D JSON loader. I would like to try this on more scenes.
>> Here is some code for you to try yourself:
>> http://coderextreme.net/DolphinLoad.xhtml [2]
>> 
>> John
>> 
>> On Aug 13, 2015, at 12:38 PM, John Carlson <yottzumm at gmail.com>
>> wrote:
>> 
>> I have discovered a couple of shortcomings. There is an open issue
>> on x3dom about coordinates for a indexed set (IndexedFaceSet in this
>> case) https://github.com/x3dom/x3dom/issues/361 [3]. The way my JSON
>> loader works, it creates X3DOM nodes on the fly while parsing the
>> X3DJSON. This means that the IndexedFaceSet is loaded before the
>> Coordinate. What I will try to do is create the nodes in post order
>> form, creating the parents after the children. That seems to be the
>> best approach so far.
>> 
>> On Feb 18, 2015 12:12 PM, "Leonard Daly"
>> <Leonard.Daly at realism.com<mailto:Leonard.Daly at realism.com>> wrote:
>> 
>> John,
>> 
>> Are you aware that Don Brutzman did an initial JSON converter using
>> a style sheet to go from .x3d -> x3d-json. The description is at
>> http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding [4]. The code
>> is at sourceforge (link in the wiki page), and has been added to
>> X3D-Edit.
>> 
>> Yvonne Jung developed a JSON loader for X3DOM. You can see an
>> example at http://www.x3dom.org/x3dom/test/functional/flipper.html
>> [5].
>> 
>> The initial work was completed last October. The wiki page lists
>> several considerations. The Consortium is considering standardizing
>> the JSON format. We would like everyone's comments and thoughts on
>> the work that has been done, particularly where there are
>> shortcomings or failures.
>> 
>> Leonard Daly
> 
> -------------------------
> 
> -------------------------
> 
> X3dom-users mailing list
> X3dom-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x3dom-users [6]
> 
> clement at igonet.fr
> 
> 
> Links:
> ------
> [1] http://www.openearthview.net/
> [2] http://coderextreme.net/DolphinLoad.xhtml
> [3] https://github.com/x3dom/x3dom/issues/361
> [4] http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding
> [5] http://www.x3dom.org/x3dom/test/functional/flipper.html
> [6] https://lists.sourceforge.net/lists/listinfo/x3dom-users



More information about the x3d-public mailing list