[X3D-Public] [x3dom-developers] initial X3D JSON conversion support using X3dToJson.xslt
Don Brutzman
brutzman at nps.edu
Thu Oct 9 22:25:55 PDT 2014
On 10/9/2014 11:02 AM, Behr, Johannes wrote:
> [...]
> How is the X3D-Classic encoding done right now?
http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01-TechnicalOverview
Hello World
http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01-TechnicalOverview/_pages/page05.html
including
http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01-TechnicalOverview/HelloWorld.x3d
http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01-TechnicalOverview/HelloWorld.x3dv
http://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01-TechnicalOverview/HelloWorld.xhtml (with x3dom)
HelloWorld.x3dv source follows.
Note that it was created by X3dToVrml97.xslt using the ClassicVRML setting. Once again, .x3d XML input and another format is produced as plain-text output.
================================================================
#X3D V3.3 utf8
# X3D-to-ClassicVRML XSL translation autogenerated by X3dToVrml97.xslt
# http://www.web3d.org/x3d/content/X3dToVrml97.xslt
# Generated using XSLT processor: SAXON 9.1.0.6 from Saxonica
PROFILE Immersive
# [X3D] version=3.3
# [X3D] noNamespaceSchemaLocation=http://www.web3d.org/specifications/x3d-3.3.xsd
# [head]
META "title" "HelloWorld.x3d"
META "description" "Simple X3D example: Hello World!"
META "created" "30 October 2000"
META "modified" "16 August 2013"
META "creator" "Don Brutzman"
META "Image" "HelloWorld.tall.png"
META "reference" "http://en.wikipedia.org/wiki/Hello_world"
META "reference" "http://en.wikibooks.org/w/index.php?title=Computer_Programming/Hello_world"
META "reference" "http://www.HelloWorldExample.net"
META "reference" "http://www.web3D.org"
META "reference" "http://www.web3d.org/realtime-3d/news/internationalization-x3d"
META "reference" "http://www.web3d.org/x3d/content/examples/HelloWorld.x3d"
META "reference" "http://X3dGraphics.com/examples/X3dForAdvancedModeling/HelloWorldScenes"
META "identifier" "http://X3dGraphics.com/examples/X3dForWebAuthors/Chapter01-TechnicalOverview/HelloWorld.x3d"
META "license" "http://www.web3d.org/x3d/content/examples/license.html"
META "generator" "X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit"
# Alternate encodings: VRML97, X3D ClassicVRML Encoding, X3D Compressed Binary Encoding (CBE), X3DOM
META "reference" "HelloWorld.wrl"
META "reference" "HelloWorld.x3dv"
META "reference" "HelloWorld.x3db"
META "reference" "HelloWorld.xhtml"
# [Scene] ========== ========== ==========
NavigationInfo { type [ "EXAMINE" "ANY" ] } ### Default X3D NavigationInfo
# Example scene to illustrate X3D nodes and fields (XML elements and attributes)
Group {
children [
DEF ViewUpClose Viewpoint {
centerOfRotation 0 -1 0
description "Hello world!"
position 0 -1 7
}
Transform {
rotation 0 1 0 3
children [
Shape {
geometry Sphere {
}
appearance Appearance {
material DEF MaterialLightBlue Material {
diffuseColor 0.1 0.5 1
}
texture DEF ImageCloudlessEarth ImageTexture {
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" ]
}
}
}
]
}
Transform {
translation 0 -2 0
children [
Shape {
geometry DEF TextMessage Text {
string [ "Hello" "world!" ]
fontStyle FontStyle {
justify [ "MIDDLE" "MIDDLE" ]
}
}
appearance Appearance {
material USE MaterialLightBlue
}
}
]
}
]
}
More information about the X3D-Public
mailing list