[X3D-Public] [x3dom-developers] X3D's JSON Encoding - who can work on X3DOM loader?

Don Brutzman brutzman at nps.edu
Wed Oct 8 05:58:01 PDT 2014


Attached please find initial simple exemplar created using

	http://www.freeformatter.com/xml-to-json-converter.html

	http://www.web3d.org/x3d/content/examples/HelloWorld.x3d

Screenshot and source files attached.

Import attempts X3DOM or three.js loader capabilities (if any) are appreciated, if anyone know how to do that.


On 10/5/2014 6:02 PM, Don Brutzman wrote:
> [cc: x3d-public, come one come all!]
>
> With completion of the X3D SAI bindings and appendices, am now preparing to re-look at the X3D JSON challenge.
>
> It appears that I can use similar XSLT conversion methods to turn an .x3d file into a .json scene graph. The design pattern appears to be reasonably straightforward.  I hope to be autoconverting a few thousand .x3d scenes shortly thereafter.
>
> Wondering, as that emerges, is there an X3D .json loader that could be written for X3DOM to test it?  Wondering, who is familiar enough with the X3DOM codebase to use or adapt that?
>
> Am happy to work with anyone who wants to pursue this interesting challenge.  It would be great to have progress in motion for the VR Hackathon.  Two weeks away, 17-19 OCT.  Check out the cool new site:
>
> 	http://vrhackathon.com

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xml-to-json-converter.png
Type: image/png
Size: 46904 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20141008/48561fa7/attachment-0001.png>
-------------- next part --------------
{
   "@profile": "Immersive",
   "@version": "3.3",
   "@noNamespaceSchemaLocation": "http://www.web3d.org/specifications/x3d-3.3.xsd",
   "head": [
      {
         "@content": "HelloWorld.x3d",
         "@name": "title"
      },
      {
         "@content": "Simple X3D example: Hello World!",
         "@name": "description"
      },
      {
         "@content": "30 October 2000",
         "@name": "created"
      },
      {
         "@content": "16 August 2013",
         "@name": "modified"
      },
      {
         "@content": "Don Brutzman",
         "@name": "creator"
      },
      {
         "@content": "HelloWorld.tall.png",
         "@name": "Image"
      },
      {
         "@content": "http://en.wikipedia.org/wiki/Hello_world",
         "@name": "reference"
      },
      {
         "@content": "http://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world",
         "@name": "reference"
      },
      {
         "@content": "http://www.HelloWorldExample.net",
         "@name": "reference"
      },
      {
         "@content": "http://www.web3D.org",
         "@name": "reference"
      },
      {
         "@content": "http://www.web3d.org/realtime-3d/news/internationalization-x3d",
         "@name": "reference"
      },
      {
         "@content": "http://www.web3d.org/x3d/content/examples/HelloWorld.x3d",
         "@name": "reference"
      },
      {
         "@content": "http://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes",
         "@name": "reference"
      },
      {
         "@content": "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01-TechnicalOverview/HelloWorld.x3d",
         "@name": "identifier"
      },
      {
         "@content": "http://www.web3d.org/x3d/content/examples/license.html",
         "@name": "license"
      },
      {
         "@content": "X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit",
         "@name": "generator"
      },
      {
         "@content": "HelloWorld.wrl",
         "@name": "reference"
      },
      {
         "@content": "HelloWorld.x3dv",
         "@name": "reference"
      },
      {
         "@content": "HelloWorld.x3db",
         "@name": "reference"
      },
      {
         "@content": "HelloWorld.xhtml",
         "@name": "reference"
      }
   ],
   "Scene": [
      {
         "Viewpoint": {
            "@DEF": "ViewUpClose",
            "@centerOfRotation": "0 -1 0",
            "@description": "Hello world!",
            "@position": "0 -1 7"
         },
         "Transform": [
            {
               "@rotation": "0 1 0 3",
               "Shape": {
                  "Sphere": [],
                  "Appearance": {
                     "Material": {
                        "@DEF": "MaterialLightBlue",
                        "@diffuseColor": "0.1 0.5 1"
                     },
                     "ImageTexture": {
                        "@DEF": "ImageCloudlessEarth",
                        "@url": "\"earth-topo.png\" \"earth-topo.jpg\" \"earth-topo-small.gif\" \"http://www.web3d.org/x3d/content/examples/Basic/earth-topo.png\" \"http://www.web3d.org/x3d/content/examples/Basic/earth-topo.jpg\" \"http://www.web3d.org/x3d/content/examples/Basic/earth-topo-small.gif\""
                     }
                  }
               }
            },
            {
               "@translation": "0 -2 0",
               "Shape": {
                  "Text": {
                     "@DEF": "TextMessage",
                     "@string": "\"Hello\" \"world!\"",
                     "FontStyle": {
                        "@justify": "\"MIDDLE\" \"MIDDLE\""
                     }
                  },
                  "Appearance": [
                     {
                        "@USE": "MaterialLightBlue"
                     }
                  ]
               }
            }
         ]
      }
   ]
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelloWorld.x3d
Type: model/x3d+xml
Size: 3062 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20141008/48561fa7/attachment-0001.x3d>


More information about the X3D-Public mailing list