mtlLoader.load('.mtl_file_path', function (materials) {
materials.preload()
console.log(materials.materials)
objLoader.setMaterials(materials)
objLoader.load('/resource/obj/mycar.obj', function (car) {
do somthing
})
})
This is my code. I want to know my mtl's values. So, console.log(materials.materials)
I can see in my brower console, but i don't know how can approach it on code.
I tried
console.log(materials.materials[0])
console.log(materials.materials{"midnight_blue"})
console.log(materials.materials.midnight_blue)