In VRML 1, transformations like translations and rotations
accumulate within a scope as they are encountered, and one
can even have multiple translations with shapes interleaved
between them. This accumulation is not possible in VRML97.
Therefore, it's necessary to insert new scopes in the translated
file every time a new transformation is encountered. This
commit makes sure that happens.
Also fixes bug: Translations and Rotations should not be inherited
into inner grouping nodes.
Reviewed-on: #19
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
Set VRML97 translation of IndexedFaceSets to specify `solid false`
unless the faces were explicitly indicated to have CLOCKWISE or
COUNTERCLOCKWISE vertex ordering. This is conservative, but otherwise
shapes may be "see-through" in undesirable ways, if the original
VRML 1 vertices are not ordered consistently with the VRML97 default.
Also fixes a typo/bug in picking up numerical values of parameters,
and ensures that fields in the output VRML97 are always separated by
at least a space, comma, or parenthesis.
Also updates dependencies to their latest versions
Reviewed-on: #17
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
Also removes the useless example.d.ts file from the distribution.
Updates the civet compiler to the greatest version that works
on this code.
Resolves#13.
Resolves#14.
Reviewed-on: #15
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
* Converts all Lighting nodes into the output
* Translates Title Info and SceneInfo Info into a WorldInfo node
* Translates Viewer Info into a NavigationInfo node
* Captures the creaseAngle parameter
* Also, this commit documents the API (such as it is)
Resolves#9.
Resolves#10.
Reviewed-on: #12
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
Construct a proper package.json in the dist file and copy
the README there for a reasonably complete shipped package.
Reviewed-on: #8
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
I failed to find a satisfactory way to compile and import moo.js with
fixed specifiers, so finally I just gave up and patched the distributed
moo code to be an es6 module. Very ugly but it works.
Resolves#1.
Reviewed-on: #2
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
Add the civet and typescript compilers, implement a build step,
provide examples of using from es6, script, and command line.
Of course, there is no actual behavior produced; convert always produces
'foo' at the moment.