loader.load('scene.gltf', function(gltf){
car = gltf.scene.children[0];
car.scale.set(0.5,0.5,0.5);
scene.add(gltf.scene);
animate();
});
I found this bit of code while browsing documentation. Why and how are we passing in a complete function as a argument. Im new to JS so please guide me to the right way. :)