JavaScript converter from VRML 1.0 to VRML97 file format, based on Wings 3D conversion logic.
Go to file
Glen Whitney 66b24e657b feat: Translate VRML 1 to VRML97 (#6)
Resolves #5

Reviewed-on: #6
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
2023-09-04 17:31:44 +00:00
etc feat: install moo and use in toy example (#2) 2023-09-01 21:32:25 +00:00
src feat: Translate VRML 1 to VRML97 (#6) 2023-09-04 17:31:44 +00:00
tools feat: install moo and use in toy example (#2) 2023-09-01 21:32:25 +00:00
.gitignore feat: install moo and use in toy example (#2) 2023-09-01 21:32:25 +00:00
LICENSE Initial commit 2023-08-31 07:05:29 +00:00
package.json5 feat: Translate VRML 1 to VRML97 (#6) 2023-09-04 17:31:44 +00:00
pnpm-lock.yaml feat: Translate VRML 1 to VRML97 (#6) 2023-09-04 17:31:44 +00:00
README.md feat: install moo and use in toy example (#2) 2023-09-01 21:32:25 +00:00
tsconfig.json feat: install moo and use in toy example (#2) 2023-09-01 21:32:25 +00:00

vrml1to97

JavaScript converter from VRML 1.0 to VRML97 file format, based on Wings 3D conversion logic.

Essentially, this is a JavaScript reimplmentation of the algorithm of the "token rearranger" found in the Wings 3D x3d importer (which was written in Erlang).

Usage

From an es6 module

import {convert} from 'vrml1to97'
const vrml1spec = '# VRML 1.0 ....'
const vrml97spec = convert(vrml1spec)

or from a script

(async () => {
   const vrml1to97 = await import('./dist/vrml1to97/index.js')
   const vrml1spec = '# VRML 1.0 ....'
   const vrml97spec = vrml1to97.convert(vrml1spec)
})()

or from the command line via node

npx vrml1to97 < old.wrl > shinynew.wrl