You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* STRUCT
*
* @param {Array} items
* @return {plasm.Model}
* @api public
*/
fun.STRUCT = function (items) {
var transformations = function (o) {return o;};
var objects = [];
temp = [];
items.forEach(function (item) {
if (!(item instanceof plasm.Model) &&
!(item instanceof plasm.Struct)) {
transformations = COMP2([transformations, item]);
} else {
temp.push(APPLY([transformations, item]).clone());
objects.push(APPLY([transformations, item]));
}
});
return new plasm.Struct(objects, p);
};
What's the necessity of the temp array in this code? it is declared locally, not visible outside the function, it isn't returned and it isn't never used (except that it is filled with clones of the items)...
The text was updated successfully, but these errors were encountered:
What's the necessity of the temp array in this code? it is declared locally, not visible outside the function, it isn't returned and it isn't never used (except that it is filled with clones of the items)...
The text was updated successfully, but these errors were encountered: