Difference between revisions of "Convert VRML97 To X3D"

From Web3D.org
Jump to: navigation, search
m (available VRML97 to VRML Classic Encoding X3D converters)
(alphabetic order)
 
(10 intermediate revisions by 2 users not shown)
Line 17: Line 17:
  
 
In node "LOD": change from "range" to "children"
 
In node "LOD": change from "range" to "children"
 +
 
In node "Switch": change from "choice" to "children"
 
In node "Switch": change from "choice" to "children"
 +
 +
=== PROTO/EXTERN PROTO interfaces ===
 +
This section details how to convert PROTO and EXTERN PROTO interfaces.
 +
 +
'''Change field declarations from eventIn, field, exposedField, eventOut to:'''
 +
 +
inputOnly, initializeOnly, inputOutput, outputOnly
  
 
=== Scripting ===
 
=== Scripting ===
Line 50: Line 58:
 
#createVrmlFromString is now '''createX3DFromString'''
 
#createVrmlFromString is now '''createX3DFromString'''
 
#getWorldURL() became '''worldURL'''
 
#getWorldURL() became '''worldURL'''
 
  
 
==== 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 ===
+
=== Available VRML97 to VRML Classic Encoding X3D converters ===
There are programs to convert from a VRML97 file(infile.wrl) to a VRML Classic Encoding X3D file (outfile.x3dv):
+
There are programs to help converting from a VRML97 file (infile.wrl) to a VRML Classic Encoding X3D file (outfile.x3dv):
 
+
*[http://mediamachines.wordpress.com/flux-player-and-flux-studio/ Flux] import as *.WRL, export as *.X3D
[http://vrml.cip.ica.uni-stuttgart.de/dune white_dune](since version 0.29beta600) use one the commandline: "dune -x3dv infile.wrl > outfile.x3dv"
+
*[http://vrml.cip.ica.uni-stuttgart.de/dune/ White Dune](since version 0.29beta600) use the following commandline: "dune -x3dv infile.wrl > outfile.x3dv"

Latest revision as of 20:05, 22 March 2012

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"

PROTO/EXTERN PROTO interfaces

This section details how to convert PROTO and EXTERN PROTO interfaces.

Change field declarations from eventIn, field, exposedField, eventOut to:

inputOnly, initializeOnly, inputOutput, outputOnly

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:

  1. getName() became name
  2. getVersion() became version
  3. getCurrentSpeed() became currentSpeed
  4. getCurrentFrameRate() became currentFrameRate
  5. createVrmlFromString() became createX3DFromString
  6. createVrmlFromURL() became createX3DFromURL
  7. setDescription() became description

Some functions have moved from the Browser object to the X3DExecutionContext object:

  1. addRoute() is now Browser.currentScene.addRoute()
  2. removeRoute() is now Browser.currentScene.removeRoute()
  3. createVrmlFromString is now createX3DFromString
  4. 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 help converting from a VRML97 file (infile.wrl) to a VRML Classic Encoding X3D file (outfile.x3dv):

  • Flux import as *.WRL, export as *.X3D
  • White Dune(since version 0.29beta600) use the following commandline: "dune -x3dv infile.wrl > outfile.x3dv"