1.1.0 • Published 5 years ago

three-vrml-loader v1.1.0

Weekly downloads
10
License
ISC
Repository
-
Last release
5 years ago

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 ) => {
		// called when the resource is loaded
		scene.add( object );
	},
	( xhr ) => {
		// called while loading is progressing
		console.log( `${( xhr.loaded / xhr.total * 100 )}% loaded` );
	},
	( error ) => {
		// called when loading has errors
		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.