GithubHelp home page GithubHelp logo

imclab / threex.universalloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jeromeetienne/threex.universalloader

0.0 2.0 0.0 2.8 MB

universal model loader for three.js

Home Page: http://jeromeetienne.github.io/threex.universalloader/examples/basic.html

License: MIT License

threex.universalloader's Introduction

threex.universalloader

threex.universalloader is a threex game extension for three.js. It provides an universal loader for models in three.js. You give it the url of your models and it will load it with the three.js loader suitable for its format.

Show Don't Tell

A Screenshot

screenshot

How To Install It

You can install it via script tag

<script src='threex.universalloader.js'></script>

Or you can install with bower, as you wish.

bower install threex.universalloader

How To Use It

Here is a basic usage. First you create the loader itself

var loader  = new THREEx.UniversalLoader()

Then you trigger the loading of your model. Say you want to load a model at models/monster.dae

var url = 'models/monster.dae'
loader.load(url, function(object3d){
    // this function will be notified when the model is loaded
    scene.add(object3d)
})

There is a special case for the OBJ/MTL models as they need 2 urls, one for the OBJ, one for the MTL. In this case, just provides both urls in a array like this.

var urls = ['models/monster.obj', 'models/monster.mtl']
loader.load(url, function(object3d){
    // this function will be notified when the model is loaded
    scene.add(object3d)
})

threex.universalloader's People

Contributors

jeromeetienne avatar

Watchers

 avatar  avatar

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.