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

Created on 2 May 2014  路  3Comments  路  Source: mrdoob/three.js

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?

Bug

Most helpful comment

Haha. We've come a long way... 馃榿

All 3 comments

Known problem.

As a work around, create the one with a texture first.

This problem is solved now.

https://jsfiddle.net/f2Lommf5/3894/

Haha. We've come a long way... 馃榿

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Horray picture Horray  路  3Comments

akshaysrin picture akshaysrin  路  3Comments

filharvey picture filharvey  路  3Comments

yqrashawn picture yqrashawn  路  3Comments

zsitro picture zsitro  路  3Comments