Skip to content

Instantly share code, notes, and snippets.

@crobi
Created January 21, 2013 14:18
Show Gist options
  • Save crobi/4586375 to your computer and use it in GitHub Desktop.
Save crobi/4586375 to your computer and use it in GitHub Desktop.
Element parse function in javascript
ColladaFile.prototype._parseBindMaterial = function(parent, el) {
for (var i = 0; i < el.childNodes.length; i++) {
var child = el.childNodes[i];
if (child.nodeType === 1) {
switch (child.nodeName) {
case "technique_common":
this._parseBindMaterialTechnique(parent, child);
break;
default:
this._reportUnexpectedChild(el, child);
}
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment