[x3d-public] [x3d] three.js has a vrml loader

Michalis Kamburelis michalis.kambi at gmail.com
Mon Mar 5 14:17:55 PST 2018


2018-03-05 23:02 GMT+01:00 Don Brutzman <brutzman at nps.edu>:
> Wondering who in X3D community has experience with threejs VRML loader?  Is
> it complete, how hard to add XML and JSON encodings, etc. etc...
>

The full source code is on
https://github.com/mrdoob/three.js/blob/dev/examples/js/loaders/VRMLLoader.js
, just one single file :) You can get an idea of it's capabilities by
browsing this code.

It parses VRML content using regular expressions.

It handles these nodes:

Coordinate
TextureCoordinate
AmbientLight # non-standard
PointLight
SpotLight
Transform
Group
Shape
Background
Box
Cylinder
Cone
Sphere
IndexedFaceSet
Appearance
Material
ImageTexture

It handles only VRML 2.0 (97).

(There's also a code to detect VRML 1.0 header, but it only makes exit
with a warning "V1.0 not supported yet.")

Regards,
Michalis



More information about the x3d-public mailing list