From 14c48aa3e5d82c6136dba6d2d4c8870a736c466b Mon Sep 17 00:00:00 2001 From: makc Date: Sun, 26 Mar 2017 22:19:49 +0200 Subject: [PATCH] OBJExporter: log material names --- examples/js/exporters/OBJExporter.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/js/exporters/OBJExporter.js b/examples/js/exporters/OBJExporter.js index 1d47a6a8ee..27c251f1e5 100644 --- a/examples/js/exporters/OBJExporter.js +++ b/examples/js/exporters/OBJExporter.js @@ -49,6 +49,11 @@ THREE.OBJExporter.prototype = { // name of the mesh object output += 'o ' + mesh.name + '\n'; + // name of the mesh material + if ( mesh.material && mesh.material.name ) { + output += 'usemtl ' + mesh.material.name + '\n'; + } + // vertices if( vertices !== undefined ) { -- GitLab