diff --git a/examples/js/exporters/ColladaExporter.js b/examples/js/exporters/ColladaExporter.js index 9d641051828404dc49dc9d178f73bd387160407b..5d3872334c04bbe39a259eadae0bdb9c167600e1 100644 --- a/examples/js/exporters/ColladaExporter.js +++ b/examples/js/exporters/ColladaExporter.js @@ -254,6 +254,15 @@ THREE.ColladaExporter.prototype = { } + // serialize lightmap uvs + if ( 'uv2' in bufferGeometry.attributes ) { + + var uvName = `${ meshid }-texcoord2`; + gnode += getAttribute( bufferGeometry.attributes.uv2, uvName, [ 'S', 'T' ], 'float' ); + triangleInputs += ``; + + } + // serialize colors if ( 'color' in bufferGeometry.attributes ) { diff --git a/examples/jsm/exporters/ColladaExporter.js b/examples/jsm/exporters/ColladaExporter.js index 9ad56b6e97ffac53579ddfe97c4e7190e61319ed..bccfba88e30f256b464ff244a449af24dc50dd7c 100644 --- a/examples/jsm/exporters/ColladaExporter.js +++ b/examples/jsm/exporters/ColladaExporter.js @@ -264,12 +264,14 @@ ColladaExporter.prototype = { triangleInputs += ``; } - + // serialize lightmap uvs if ( 'uv2' in bufferGeometry.attributes ) { + var uvName = `${ meshid }-texcoord2`; gnode += getAttribute( bufferGeometry.attributes.uv2, uvName, [ 'S', 'T' ], 'float' ); triangleInputs += ``; + } // serialize colors @@ -280,7 +282,7 @@ ColladaExporter.prototype = { triangleInputs += ``; } - + var indexArray = null; if ( bufferGeometry.index ) {