Skip to content

Conversation

@Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 16, 2018

Fixes: #15175

It's not correct to use LineBasicMaterial.copy() or PointsMaterial.copy() if the given material parameter is a phong material.

Now, OBJLoader uses Material.copy() in order to copy common properties. The PR also fixes the wrong usage of materialLine in context of PointsMaterial. I assume this was a copy/paste error.

I've tested with this test.obj file:

# Blender v2.79 (sub 0) OBJ File: ''
# www.blender.org
mtllib test.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000

p 1 2 3 4 5 6 7 8

Just add an empty MTL file for testing.

@mrdoob mrdoob added this to the r99 milestone Nov 16, 2018
@mrdoob mrdoob merged commit 1cd30c7 into mrdoob:dev Nov 16, 2018
@mrdoob
Copy link
Owner

mrdoob commented Nov 16, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"materialLine" in OBJLoader.js is undefined

2 participants