Difference between revisions of "Convert VRML97 To X3D"
m |
|||
Line 14: | Line 14: | ||
This section details how to convert some field names | This section details how to convert some field names | ||
− | '''Change the | + | '''Change the fieldnames of some nodes''' |
+ | In node "LOD": change from "range" to "children" | ||
+ | In node "Switch": change from "choice" to "children" | ||
=== Scripting === | === Scripting === | ||
Line 52: | Line 54: | ||
==== Java ==== | ==== Java ==== | ||
Java scripting will need to be converted to the new SAI interfaces. A more detailed writeup of this process will follow. | Java scripting will need to be converted to the new SAI interfaces. A more detailed writeup of this process will follow. | ||
+ | |||
+ | ==== available VRML97 to VRML Classic Encoding X3D converters ==== | ||
+ | There are programs to convert from VRML97 (infile.wrl) to VRML Classic Encoding X3D (outfile.x3dv): | ||
+ | white_dune (since version 0.29beta600): use "dune -x3dv infile.wrl > outfile.x3dv" on the commandline |
Revision as of 07:38, 31 May 2007
Contents
Convert VRML97 To X3D
This article documents how to convert a VRML97 file to a VRML Classic Encoding X3D file.
Change the header from #VRML V2.0 utf8 to:
#X3D V3.0 utf8
Add a profile statement:
PROFILE Immersive
Field names
This section details how to convert some field names
Change the fieldnames of some nodes
In node "LOD": change from "range" to "children" In node "Switch": change from "choice" to "children"
Scripting
This section details how to convert scripting.
Change field declarations from eventIn, field, exposedField, eventOut to:
inputOnly, initializeOnly, inputOutput, outputOnly
Ecmascript
This section shows details on converting vrmlscript/javascript scripts to ecmascript.
Change vrmlscript/javascript scripts to ecmascript, url "javascript:" becomes:
url "ecmascript:"
Change methods to properties Functions like Browser.getCurrentFrameRate() are now ecmascript properties. So they become Browser.currentFrameRate
Other functions that have changed are:
- getName() became name
- getVersion() became version
- getCurrentSpeed() became currentSpeed
- getCurrentFrameRate() became currentFrameRate
- createVrmlFromString() became createX3DFromString
- createVrmlFromURL() became createX3DFromURL
- setDescription() became description
Some functions have moved from the Browser object to the X3DExecutionContext object:
- addRoute() is now Browser.currentScene.addRoute()
- removeRoute() is now Browser.currentScene.removeRoute()
- createVrmlFromString is now createX3DFromString
- getWorldURL() became worldURL
Java
Java scripting will need to be converted to the new SAI interfaces. A more detailed writeup of this process will follow.
available VRML97 to VRML Classic Encoding X3D converters
There are programs to convert from VRML97 (infile.wrl) to VRML Classic Encoding X3D (outfile.x3dv): white_dune (since version 0.29beta600): use "dune -x3dv infile.wrl > outfile.x3dv" on the commandline