Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
switch (command) {
case 'matrix':
matrix = Matrix.compose(matrix, {a: v[0], b: v[1], c: v[2], d: v[3], e: v[4], f: v[5]});
break;
case 'rotate':
matrix = Matrix.compose(matrix, Matrix.rotateDEG(v[0], v[1] || 0, v[2] || 0));
break;
case 'translate':
matrix = Matrix.compose(matrix, Matrix.translate(v[0], v[1] || 0));
break;
case 'scale':
matrix = Matrix.compose(matrix, Matrix.scale(v[0], v[1] || v[0]));
break;
case 'skewX':
matrix = Matrix.compose(matrix, Matrix.skewDEG(v[0], 0));
break;
case 'skewY':
matrix = Matrix.compose(matrix, Matrix.skewDEG(0, v[0]));
break;
default:
log.error(`Couldn't parse: ${command}`);
}
}
return matrix;
};
matrix = Matrix.compose(matrix, {a: v[0], b: v[1], c: v[2], d: v[3], e: v[4], f: v[5]});
break;
case 'rotate':
matrix = Matrix.compose(matrix, Matrix.rotateDEG(v[0], v[1] || 0, v[2] || 0));
break;
case 'translate':
matrix = Matrix.compose(matrix, Matrix.translate(v[0], v[1] || 0));
break;
case 'scale':
matrix = Matrix.compose(matrix, Matrix.scale(v[0], v[1] || v[0]));
break;
case 'skewX':
matrix = Matrix.compose(matrix, Matrix.skewDEG(v[0], 0));
break;
case 'skewY':
matrix = Matrix.compose(matrix, Matrix.skewDEG(0, v[0]));
break;
default:
log.error(`Couldn't parse: ${command}`);
}
}
return matrix;
};