If 2 meshes use the same geometry and one is colored and the second is a texture, the second mesh is not shown

I’ve defined a PlaneGeometry and use that with just a color for one mesh and with an texture on another mesh.
In that case, only the colored mesh is shown.

If I use textures for both meshes, both are shown, and if I use two geometries both meshes are also shown.

Here only one plane is shown:
http://duttke.de/threejs/bug.html

Here both planes are shown:
http://duttke.de/threejs/bugfree.html
I’ve changed only the commenting in line 59/60.

If you replace material1 by a copy of material2, it will also work.

It seems like the geometry-object stores some informations about the material as soon as the first mesh is created. But the material and the geometry shouldn’t be affected by creating a mesh – they should be seperated by each other, and should be reusable, shoudn’t they?

Author: Fantashit

1 thought on “If 2 meshes use the same geometry and one is colored and the second is a texture, the second mesh is not shown

Comments are closed.