Skip to content

Commit

Permalink
MultiPart improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
tsturm committed Apr 16, 2015
1 parent 92be5ac commit 0c9688f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/nodes/Networking/MultiPart.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,23 @@ x3dom.registerNodeType(
for (m=0; m<multiPart._idMap.mapping.length; m++) {
selection.push(m);
}
} else {
} else if (selector instanceof Array) {

for (i=0; i<selector.length; i++) {
if (multiPart._identifierToPartId[selector[i]]) {
selection = selection.concat(multiPart._identifierToPartId[selector[i]]);
}
}

} else if (selector instanceof RegExp) {

for (var key in multiPart._identifierToPartId) {

if ( key.match( selector ) ) {
selection = selection.concat(multiPart._identifierToPartId[ key ]);
}
}

}

var colorMap = multiPart._inlineNamespace.defMap["MultiMaterial_ColorMap"];
Expand Down

0 comments on commit 0c9688f

Please sign in to comment.