Skip to content

Commit

Permalink
Merge pull request RobotWebTools#128 from DLu/mesh_color
Browse files Browse the repository at this point in the history
Use Material param if it is defined
  • Loading branch information
rctoris committed Sep 8, 2015
2 parents 4b39b57 + 012576e commit 4c479ac
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/models/MeshResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ ROS3D.MeshResource = function(options) {
// add a texture to anything that is missing one
if(material !== null) {
var setMaterial = function(node, material) {
// do not overwrite the material
if (typeof node.material === 'undefined') {
node.material = material;
}
//node.material = material;
node.material = material;
if (node.children) {
for (var i = 0; i < node.children.length; i++) {
setMaterial(node.children[i], material);
Expand Down

0 comments on commit 4c479ac

Please sign in to comment.