Code Monkey home page Code Monkey logo

three-obj-mtl-loader's Introduction

three-obj-mtl-loader

THREE.OBJLoader repackaged as a node module

install

npm i --save three-obj-mtl-loader

usage

import * as THREE from 'three'
import {MTLLoader, OBJLoader} from 'three-obj-mtl-loader'

let scene = new THREE.Scene()

let mtlLoader = new MTLLoader();

let objLoader = new OBJLoader();

mtlLoader.load('./test.mtl', (materials) => {
  materials.preload()
  objLoader.setMaterials(materials)
  objLoader.load('./test.obj', (object) => {
    scene.add(object)
  })
})

Sorry guys! This repo will never be updated, please check the newest version of three.js

three-obj-mtl-loader's People

Contributors

cs64188 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

three-obj-mtl-loader's Issues

THREE.Loader.Handlers.get Is not working more

On load texture the library crash always

		var texture;
		var loader = THREE.Loader.Handlers.get( url );
		var manager = ( this.manager !== undefined ) ? this.manager : THREE.DefaultLoadingManager;

Use instead this

		var texture;
		var manager = ( this.manager !== undefined ) ? this.manager : THREE.DefaultLoadingManager;
		var loader = manager.getHandler( url );

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.