Last active
December 17, 2018 23:25
-
-
Save izumiikezaki/2f3a51c073dfac042ad2a89c14f8be9d to your computer and use it in GitHub Desktop.
GLTFTest.js
This file contains 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 loader = new THREE.GLTFLoader(); | |
loader.load( | |
'models/sakana/sakana.gltf', | |
function ( gltf ) { | |
console.log(gltf.scene); | |
scene.add(gltf.scene); | |
}, | |
); |
This file contains 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
loader.load( | |
'models/sakana/sakana.gltf', | |
function ( gltf ) { | |
var sakana_Mesh = gltf.scene.children[0]; | |
console.log(sakana_Mesh); | |
sakana_Mesh.children[0].material=new THREE.MeshToonMaterial(); | |
sakana_Mesh.children[1].material=new THREE.MeshToonMaterial(); | |
sakana_Mesh.children[2].material=new THREE.MeshToonMaterial(); | |
scene.add( sakana_Mesh ); | |
}, | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment