@calvinscofield/three-loaders

Threejs loaders plugin, ES6.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Aug 31, 2018Aug 31, 2018Minified + gzip package size for @calvinscofield/three-loaders in KB

Readme

Usage

npm i @calvinscofield/three-loader -S
import { OBJLoader, MTLLoader } from '@calvinscofield/three-loaders'
new OBJLoader()
  .load('model/penlin.obj', (object) => {},
  (xhr) => {
    console.log((xhr.loaded / xhr.total * 100) + '% loaded')
  },
  (error) => {
      console.log(error, 'An error happened')
  })

new THREE.MTLLoader()
  .setPath('models/obj/male02/')
  .load('lqfy.mtl', function (materials) {
    materials.preload()
    new THREE.OBJLoader()
      .setMaterials(materials)
      .setPath('models/obj/male02/')
      .load('lqfy.obj', (object) => { scene.add( object )},
      (xhr) => { console.log((xhr.loaded / xhr.total * 100) + '% loaded') },
      (error) => { console.log(error, 'An error happened') })
  })

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.