@calvinscofield/three-loaders

    1.0.5 • Public • Published

    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') })
      })

    Keywords

    Install

    npm i @calvinscofield/three-loaders

    DownloadsWeekly Downloads

    3

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    33.9 kB

    Total Files

    6

    Last publish

    Collaborators

    • calvinscofield