Skip to content

Commit

Permalink
Apply correct textureFilters on MTL-files
Browse files Browse the repository at this point in the history
  • Loading branch information
emilwidlund committed Apr 15, 2018
1 parent b9205f0 commit c3943a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions form/loaders/OBJ.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ class exports.OBJ
@materialLoader = new THREE.MTLLoader
@modelLoader = new THREE.OBJLoader

@materialLoader.setTexturePath @dirPath
@materialLoader.setPath @dirPath
@materialLoader.crossOrigin = ''
@materialLoader.load @materialPath, (materials) =>
materials.preload()

for m in materials.materials
m.map.magFilter = THREE.NearestFilter
m.map.minFilter = THREE.LinearFilter

@modelLoader.setMaterials materials
@modelLoader.setPath @dirPath
@modelLoader.load @modelPath, (model) =>
Expand Down

0 comments on commit c3943a0

Please sign in to comment.