mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-07-27 14:20:12 -04:00
Prevent V8 "assignment to parameter in arguments object" deoptimizations.
Some getter-like functions still need fixing, but this might require a fix in Straps.js first.
This commit is contained in:
parent
3dbad9c477
commit
81651a7379
14 changed files with 139 additions and 133 deletions
src/basic
|
@ -231,11 +231,11 @@ var Matrix = Base.extend(/** @lends Matrix# */{
|
|||
* @param {Number} y the y coordinate of the anchor point
|
||||
* @return {Matrix} this affine transform
|
||||
*/
|
||||
rotate: function(angle, center) {
|
||||
center = Point.read(arguments, 1);
|
||||
rotate: function(angle /*, center */) {
|
||||
angle *= Math.PI / 180;
|
||||
// Concatenate rotation matrix into this one
|
||||
var x = center.x,
|
||||
var center = Point.read(arguments, 1),
|
||||
// Concatenate rotation matrix into this one
|
||||
x = center.x,
|
||||
y = center.y,
|
||||
cos = Math.cos(angle),
|
||||
sin = Math.sin(angle),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue