Created
April 22, 2015 15:37
-
-
Save ybigus/5dc27eda3e85e55d329b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var load_texture = function(name, path){ | |
var d = $.Deferred(); | |
THREE.ImageUtils.loadTexture('assets/textures/'+path, THREE.UVMapping(), function(image){ | |
textures[name] = image; | |
d.resolve(); | |
}); | |
return d.promise(); | |
} | |
var load_geometry = function(name){ | |
var d = $.Deferred(); | |
var loader = new THREE.JSONLoader(); | |
loader.load('models/'+name+'.js', function(geometry){ | |
pieces_models[name] = geometry; | |
d.resolve(); | |
}); | |
return d.promise(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment