Skip to content

Commit c6a9e33

Browse files
committed
simpleVillager
1 parent 702521b commit c6a9e33

File tree

7 files changed

+14
-0
lines changed

7 files changed

+14
-0
lines changed

assets/models/anvil.blend

-759 KB
Binary file not shown.

assets/models/stairs.blend

-661 KB
Binary file not shown.

assets/models/stairs.blend1

-661 KB
Binary file not shown.

assets/models/villager.blend

1.27 MB
Binary file not shown.

assets/models/villager.fbx

124 KB
Binary file not shown.

assets/textures/villager.png

3.96 KB
Loading

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,20 @@ <h3>Gra zatrzymana</h3>
687687
anvilGeometry.rotateX(-Math.PI/2)
688688
anvilGeometry.translate(0,0.17,0)
689689
});
690+
loader.load( 'assets/models/villager.fbx', function ( object ) {
691+
// object.scale.set(0.01,0.01,0.01)
692+
// console.log(object)
693+
var texturex = new THREE.TextureLoader().load('assets/textures/villager.png');
694+
texturex.magFilter = THREE.NearestFilter;
695+
696+
object.children[1].scale.set(1,1,1)
697+
object.children[1].position.set(26,26,26)
698+
object.children[0].material.map=texturex
699+
object.children[0].material.color=new THREE.Color( 0xffffff );
700+
object.children[1].children[0].children[1].children[2].rotation.x=Math.PI/4
701+
console.log(object.children[1])
702+
scene.add(object)
703+
});
690704

691705
world = new Terrain({
692706
textureAtlas: texture,

0 commit comments

Comments
 (0)