yskang

threejs-minecraft-7

Apr 15th, 2020
586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 4 feet
  2. const footGeo = new THREE.BoxGeometry( 2, 3, 2 );
  3. this.foot1 = new THREE.Mesh( footGeo, creeperMat );
  4. this.foot1.position.set( -1, -5.5, -2 );
  5.  
  6. this.foot2 = this.foot1.clone();
  7. this.foot2.position.set( -1, -5.5, 2 );
  8.  
  9. this.foot3 = this.foot1.clone();
  10. this.foot3.position.set( 1, -5.5, 2 );
  11.  
  12. this.foot4 = this.foot1.clone();
  13. this.foot4.position.set( 1, -5.5, -2 );
  14.  
  15. this.feet = new THREE.Group();
  16. this.feet.add( this.foot1 );
  17. this.feet.add( this.foot2 );
  18. this.feet.add( this.foot3 );
  19. this.feet.add( this.foot4 );
Advertisement
Add Comment
Please, Sign In to add comment