Reformat parameters

This commit is contained in:
Paul Graffam 2019-01-23 17:26:49 -05:00
parent 052e101e1c
commit 3018c6f5bd
1 changed files with 27 additions and 22 deletions

View File

@ -18,7 +18,9 @@ export default class Model {
load() { load() {
// Load model with ObjectLoader // Load model with ObjectLoader
this.loader.load(Config.model.path, obj => { this.loader.load(
Config.model.path,
obj => {
obj.traverse(child => { obj.traverse(child => {
if(child instanceof THREE.Mesh) { if(child instanceof THREE.Mesh) {
// Create material for mesh and set its map to texture by name from preloaded textures // Create material for mesh and set its map to texture by name from preloaded textures
@ -44,6 +46,9 @@ export default class Model {
obj.scale.multiplyScalar(Config.model.scale); obj.scale.multiplyScalar(Config.model.scale);
this.scene.add(obj); this.scene.add(obj);
}, Helpers.logProgress(), Helpers.logError()); },
Helpers.logProgress(),
Helpers.logError()
);
} }
} }