Skip to content

Instantly share code, notes, and snippets.

@ybigus
Created February 11, 2014 21:30
Show Gist options
  • Save ybigus/8944608 to your computer and use it in GitHub Desktop.
Save ybigus/8944608 to your computer and use it in GitHub Desktop.
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