Lightmaps live independently of other textures, right?
So I have to set up a second set of UVs.
I have exported my JSON object with a second set of UVs and added
Lightmaps in three.js require a second set of UVs. One solution is to add a second set of UVs by duplicating the first set.
For THREE.Geometry
you can do this:
geometry.faceVertexUvs[ 1 ] = geometry.faceVertexUvs[ 0 ];
For THREE.BufferGeometry
, use this pattern;
var uvs = geometry.attributes.uv.array;
geometry.addAttribute( 'uv2', new THREE.BufferAttribute( uvs, 2 ) );
three.js r.73