Created
February 11, 2014 21:30
-
-
Save ybigus/8944608 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
function loadHero(){ | |
var loader = new THREE.JSONLoader(); | |
loader.load( 'content/hero.js', function( h, m ) { | |
//smooth skin | |
h.computeMorphNormals(); | |
materialTexture = new THREE.MeshPhongMaterial({ | |
color: 0xffffff, specular: 0x111111, shininess: 50, wireframe: false, | |
shading: THREE.SmoothShading, map: texture, morphTargets: true, morphNormals: true, metal: false | |
}); | |
hero = new THREE.MorphAnimMesh( h, materialTexture); | |
hero.materialTexture = materialTexture; | |
hero.scale.set( 0.5, 0.5, 0.5 ); | |
hero.parseAnimations(); | |
hero.playAnimation( 'stand', 6 ); | |
init(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment