three.js VRML loader
Installation
npm i --save three-vrml-loader
Description
three.js's VRMLLoader wrapped as a module for easy importing. TypeScript declaration included.
Usage
import * as THREE from 'three';
import VRMLLoader from 'three-vrml-loader';
const loader = new VRMLLoader();
loader.load(
'path/to/your/file.wrl',
( object ) => {
scene.add( object );
},
( xhr ) => {
console.log( `${( xhr.loaded / xhr.total * 100 )}% loaded` );
},
( error ) => {
console.error( 'An error happened', error );
},
);
Reporting Issues
Please note that this is just a wrapper for the VRML loader provided by three.js. Therefore, any issues regarding the loader should be reported directly via the three.js issue tracker.
For issues directly related to the wrapper or this package specifically, feel free to contact me.