greensock-rails 1.15.0.0 → 1.15.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/greensock/rails/version.rb +1 -1
  4. data/vendor/assets/javascripts/greensock/TimelineLite.js +8 -7
  5. data/vendor/assets/javascripts/greensock/TimelineMax.js +14 -9
  6. data/vendor/assets/javascripts/greensock/TweenLite.js +6 -6
  7. data/vendor/assets/javascripts/greensock/TweenMax.js +135 -99
  8. data/vendor/assets/javascripts/greensock/easing/EasePack.js +3 -3
  9. data/vendor/assets/javascripts/greensock/jquery.gsap.js +3 -3
  10. data/vendor/assets/javascripts/greensock/plugins/AttrPlugin.js +2 -2
  11. data/vendor/assets/javascripts/greensock/plugins/BezierPlugin.js +2 -2
  12. data/vendor/assets/javascripts/greensock/plugins/CSSPlugin.js +123 -92
  13. data/vendor/assets/javascripts/greensock/plugins/CSSRulePlugin.js +9 -6
  14. data/vendor/assets/javascripts/greensock/plugins/ColorPropsPlugin.js +2 -2
  15. data/vendor/assets/javascripts/greensock/plugins/DirectionalRotationPlugin.js +2 -2
  16. data/vendor/assets/javascripts/greensock/plugins/EaselPlugin.js +2 -2
  17. data/vendor/assets/javascripts/greensock/plugins/EndArrayPlugin.js +2 -2
  18. data/vendor/assets/javascripts/greensock/plugins/KineticPlugin.js +2 -2
  19. data/vendor/assets/javascripts/greensock/plugins/RaphaelPlugin.js +2 -2
  20. data/vendor/assets/javascripts/greensock/plugins/RoundPropsPlugin.js +2 -2
  21. data/vendor/assets/javascripts/greensock/plugins/ScrollToPlugin.js +2 -2
  22. data/vendor/assets/javascripts/greensock/plugins/TEMPLATE_Plugin.js +4 -4
  23. data/vendor/assets/javascripts/greensock/plugins/TextPlugin.js +2 -2
  24. data/vendor/assets/javascripts/greensock/utils/Draggable.js +18 -10
  25. metadata +2 -2
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * VERSION: beta 1.9.4
3
3
  * DATE: 2014-07-17
4
- * UPDATES AND DOCS AT: http://www.greensock.com
4
+ * UPDATES AND DOCS AT: http://greensock.com
5
5
  *
6
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
6
+ * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
7
+ * This work is subject to the terms at http://greensock.com/standard-license or for
8
8
  * Club GreenSock members, the software agreement that was issued with your membership.
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
@@ -1,12 +1,12 @@
1
1
  /*!
2
2
  * VERSION: 0.1.9
3
3
  * DATE: 2014-07-22
4
- * UPDATES AND DOCS AT: http://www.greensock.com/jquery-gsap-plugin/
4
+ * UPDATES AND DOCS AT: http://greensock.com/jquery-gsap-plugin/
5
5
  *
6
6
  * Requires TweenLite version 1.8.0 or higher and CSSPlugin.
7
7
  *
8
- * @license Copyright (c) 2014, GreenSock. All rights reserved.
9
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
8
+ * @license Copyright (c) 2013-2015, GreenSock. All rights reserved.
9
+ * This work is subject to the terms at http://greensock.com/standard-license or for
10
10
  * Club GreenSock members, the software agreement that was issued with your membership.
11
11
  *
12
12
  * @author: Jack Doyle, jack@greensock.com
@@ -3,8 +3,8 @@
3
3
  * DATE: 2014-07-17
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
6
+ * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
7
+ * This work is subject to the terms at http://greensock.com/standard-license or for
8
8
  * Club GreenSock members, the software agreement that was issued with your membership.
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
@@ -3,8 +3,8 @@
3
3
  * DATE: 2014-11-15
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
6
+ * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
7
+ * This work is subject to the terms at http://greensock.com/standard-license or for
8
8
  * Club GreenSock members, the software agreement that was issued with your membership.
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * VERSION: 1.15.0
3
- * DATE: 2014-12-03
2
+ * VERSION: 1.15.1
3
+ * DATE: 2015-01-20
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
6
+ * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
7
+ * This work is subject to the terms at http://greensock.com/standard-license or for
8
8
  * Club GreenSock members, the software agreement that was issued with your membership.
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
@@ -31,7 +31,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
31
31
  p = CSSPlugin.prototype = new TweenPlugin("css");
32
32
 
33
33
  p.constructor = CSSPlugin;
34
- CSSPlugin.version = "1.15.0";
34
+ CSSPlugin.version = "1.15.1";
35
35
  CSSPlugin.API = 2;
36
36
  CSSPlugin.defaultTransformPerspective = 0;
37
37
  CSSPlugin.defaultSkewType = "compensated";
@@ -210,12 +210,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
210
210
  var s = {},
211
211
  i, tr;
212
212
  if ((cs = cs || _getComputedStyle(t, null))) {
213
- if ((i = cs.length)) {
214
- while (--i > -1) {
215
- s[cs[i].replace(_camelExp, _camelFunc)] = cs.getPropertyValue(cs[i]);
216
- }
217
- } else { //Opera behaves differently - cs.length is always 0, so we must do a for...in loop.
218
- for (i in cs) {
213
+ for (i in cs) {
214
+ if (i.indexOf("Transform") === -1 || _transformProp === i) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here.
219
215
  s[i] = cs[i];
220
216
  }
221
217
  }
@@ -301,7 +297,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
301
297
  x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0],
302
298
  y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1];
303
299
  if (y == null) {
304
- y = "0";
300
+ y = (x === "center") ? "50%" : "0";
305
301
  } else if (y === "center") {
306
302
  y = "50%";
307
303
  }
@@ -349,7 +345,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
349
345
  */
350
346
  _parseAngle = function(v, d, p, directionalEnd) {
351
347
  var min = 0.000001,
352
- cap, split, dif, result;
348
+ cap, split, dif, result, isRelative;
353
349
  if (v == null) {
354
350
  result = d;
355
351
  } else if (typeof(v) === "number") {
@@ -357,7 +353,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
357
353
  } else {
358
354
  cap = 360;
359
355
  split = v.split("_");
360
- dif = Number(split[0].replace(_NaNExp, "")) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - ((v.charAt(1) === "=") ? 0 : d);
356
+ isRelative = (v.charAt(1) === "=");
357
+ dif = (isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(split[0].substr(2)) : parseFloat(split[0])) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - (isRelative ? 0 : d);
361
358
  if (split.length) {
362
359
  if (directionalEnd) {
363
360
  directionalEnd[p] = d + dif;
@@ -1085,7 +1082,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1085
1082
  width = rect.getBoundingClientRect().width;
1086
1083
  rect.style[_transformOriginProp] = "50% 50%";
1087
1084
  rect.style[_transformProp] = "scaleX(0.5)";
1088
- force = (width === rect.getBoundingClientRect().width);
1085
+ force = (width === rect.getBoundingClientRect().width && !(_isFirefox && _supports3D)); //note: Firefox fails the test even though it does support CSS transforms in 3D. Since we can't push 3D stuff into the transform attribute, we force Firefox to pass the test here (as long as it does truly support 3D).
1089
1086
  _docElement.removeChild(svg);
1090
1087
  }
1091
1088
  return force;
@@ -1113,8 +1110,6 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1113
1110
  invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent.
1114
1111
  min = 0.00002,
1115
1112
  rnd = 100000,
1116
- minAngle = 179.99,
1117
- minPI = minAngle * _DEG2RAD,
1118
1113
  zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin || 0 : 0,
1119
1114
  defaultTransformPerspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0,
1120
1115
  isDefault, s, m, i, n, dec, scaleX, scaleY, rotation, skewX;
@@ -1145,10 +1140,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1145
1140
  m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example).
1146
1141
  }
1147
1142
  if (m.length === 16) {
1148
-
1149
1143
  //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values)
1150
- var a13 = m[8], a23 = m[9], a33 = m[10],
1151
- a14 = m[12], a24 = m[13], a34 = m[14];
1144
+ var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3],
1145
+ a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7],
1146
+ a13 = m[8], a23 = m[9], a33 = m[10],
1147
+ a14 = m[12], a24 = m[13], a34 = m[14],
1148
+ a43 = m[11],
1149
+ angle = Math.atan2(a32, a33),
1150
+ t1, t2, t3, t4, cos, sin;
1152
1151
 
1153
1152
  //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari
1154
1153
  if (tm.zOrigin) {
@@ -1157,26 +1156,24 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1157
1156
  a24 = a23*a34-m[13];
1158
1157
  a34 = a33*a34+tm.zOrigin-m[14];
1159
1158
  }
1160
- var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3],
1161
- a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7],
1162
- a43 = m[11],
1163
- angle = Math.atan2(a21, a22),
1164
- t1, t2, t3, cos, sin;
1165
-
1166
- //rotation
1167
- tm.rotation = angle * _RAD2DEG;
1159
+ tm.rotationX = angle * _RAD2DEG;
1160
+ //rotationX
1168
1161
  if (angle) {
1169
1162
  cos = Math.cos(-angle);
1170
1163
  sin = Math.sin(-angle);
1171
- a11 = a11*cos+a12*sin;
1172
- t2 = a21*cos+a22*sin;
1173
- a22 = a21*-sin+a22*cos;
1174
- a32 = a31*-sin+a32*cos;
1175
- a21 = t2;
1164
+ t1 = a12*cos+a13*sin;
1165
+ t2 = a22*cos+a23*sin;
1166
+ t3 = a32*cos+a33*sin;
1167
+ a13 = a12*-sin+a13*cos;
1168
+ a23 = a22*-sin+a23*cos;
1169
+ a33 = a32*-sin+a33*cos;
1170
+ a43 = a42*-sin+a43*cos;
1171
+ a12 = t1;
1172
+ a22 = t2;
1173
+ a32 = t3;
1176
1174
  }
1177
-
1178
1175
  //rotationY
1179
- angle = Math.atan2(a13, a11);
1176
+ angle = Math.atan2(a13, a33);
1180
1177
  tm.rotationY = angle * _RAD2DEG;
1181
1178
  if (angle) {
1182
1179
  cos = Math.cos(-angle);
@@ -1191,23 +1188,22 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1191
1188
  a21 = t2;
1192
1189
  a31 = t3;
1193
1190
  }
1194
-
1195
- //rotationX
1196
- angle = Math.atan2(a32, a33);
1197
- tm.rotationX = angle * _RAD2DEG;
1191
+ //rotationZ
1192
+ angle = Math.atan2(a21, a11);
1193
+ tm.rotation = angle * _RAD2DEG;
1198
1194
  if (angle) {
1199
1195
  cos = Math.cos(-angle);
1200
1196
  sin = Math.sin(-angle);
1201
- t1 = a12*cos+a13*sin;
1202
- t2 = a22*cos+a23*sin;
1203
- t3 = a32*cos+a33*sin;
1204
- a13 = a12*-sin+a13*cos;
1205
- a23 = a22*-sin+a23*cos;
1206
- a33 = a32*-sin+a33*cos;
1207
- a43 = a42*-sin+a43*cos;
1208
- a12 = t1;
1209
- a22 = t2;
1210
- a32 = t3;
1197
+ a11 = a11*cos+a12*sin;
1198
+ t2 = a21*cos+a22*sin;
1199
+ a22 = a21*-sin+a22*cos;
1200
+ a32 = a31*-sin+a32*cos;
1201
+ a21 = t2;
1202
+ }
1203
+
1204
+ if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here.
1205
+ tm.rotationX = tm.rotation = 0;
1206
+ tm.rotationY += 180;
1211
1207
  }
1212
1208
 
1213
1209
  tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21) * rnd + 0.5) | 0) / rnd;
@@ -1259,7 +1255,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1259
1255
  }
1260
1256
  }
1261
1257
  }
1262
- //DEBUG: _log("parsed rotation: "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective);
1258
+ //DEBUG: _log("parsed rotation of " + t.getAttribute("id")+": "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective);
1263
1259
  if (rec) {
1264
1260
  t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method)
1265
1261
  }
@@ -1345,6 +1341,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1345
1341
  }
1346
1342
  },
1347
1343
 
1344
+ /* translates a super small decimal to a string WITHOUT scientific notation
1345
+ _safeDecimal = function(n) {
1346
+ var s = (n < 0 ? -n : n) + "",
1347
+ a = s.split("e-");
1348
+ return (n < 0 ? "-0." : "0.") + new Array(parseInt(a[1], 10) || 0).join("0") + a[0].split(".").join("");
1349
+ },
1350
+ */
1351
+
1348
1352
  _set3DTransformRatio = _internals.set3DTransformRatio = function(v) {
1349
1353
  var t = this.data, //refers to the element's _gsTransform object
1350
1354
  style = this.t.style,
@@ -1356,18 +1360,18 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1356
1360
  y = t.y,
1357
1361
  z = t.z,
1358
1362
  perspective = t.perspective,
1359
- a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34, a41, a42, a43,
1360
- zOrigin, rnd, cos, sin, t1, t2, t3, t4, transform, comma;
1361
- if (v === 1 || v === 0) if (t.force3D === "auto") if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !z) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices
1363
+ a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43,
1364
+ zOrigin, min, cos, sin, t1, t2, transform, comma, zero;
1365
+ if (v === 1 || v === 0 || !t.force3D) if (t.force3D !== true) if (!t.rotationY && !t.rotationX && sz === 1 && !perspective && !z) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices
1362
1366
  _set2DTransformRatio.call(this, v);
1363
1367
  return;
1364
1368
  }
1365
1369
  if (_isFirefox) {
1366
- var n = 0.0001;
1367
- if (sx < n && sx > -n) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.
1370
+ min = 0.0001;
1371
+ if (sx < min && sx > -min) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue.
1368
1372
  sx = sz = 0.00002;
1369
1373
  }
1370
- if (sy < n && sy > -n) {
1374
+ if (sy < min && sy > -min) {
1371
1375
  sy = sz = 0.00002;
1372
1376
  }
1373
1377
  if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z).
@@ -1375,10 +1379,8 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1375
1379
  }
1376
1380
  }
1377
1381
  if (angle || t.skewX) {
1378
- cos = Math.cos(angle);
1379
- sin = Math.sin(angle);
1380
- a11 = cos;
1381
- a21 = sin;
1382
+ cos = a11 = Math.cos(angle);
1383
+ sin = a21 = Math.sin(angle);
1382
1384
  if (t.skewX) {
1383
1385
  angle -= t.skewX * _DEG2RAD;
1384
1386
  cos = Math.cos(angle);
@@ -1400,21 +1402,42 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1400
1402
  a11 = a22 = 1;
1401
1403
  a12 = a21 = 0;
1402
1404
  }
1405
+ // KEY INDEX AFFECTS
1406
+ // a11 0 rotation, rotationY, scaleX
1407
+ // a21 1 rotation, rotationY, scaleX
1408
+ // a31 2 rotationY, scaleX
1409
+ // a41 3 rotationY, scaleX
1410
+ // a12 4 rotation, skewX, rotationX, scaleY
1411
+ // a22 5 rotation, skewX, rotationX, scaleY
1412
+ // a32 6 rotationX, scaleY
1413
+ // a42 7 rotationX, scaleY
1414
+ // a13 8 rotationY, rotationX, scaleZ
1415
+ // a23 9 rotationY, rotationX, scaleZ
1416
+ // a33 10 rotationY, rotationX, scaleZ
1417
+ // a43 11 rotationY, rotationX, perspective, scaleZ
1418
+ // a14 12 x, zOrigin, svgOrigin
1419
+ // a24 13 y, zOrigin, svgOrigin
1420
+ // a34 14 z, zOrigin
1421
+ // a44 15
1422
+ // rotation: Math.atan2(a21, a11)
1423
+ // rotationY: Math.atan2(a13, a33) (or Math.atan2(a13, a11))
1424
+ // rotationX: Math.atan2(a32, a33)
1403
1425
  a33 = 1;
1404
- a13 = a14 = a23 = a24 = a31 = a32 = a34 = a41 = a42 = 0;
1426
+ a13 = a23 = a31 = a32 = a41 = a42 = 0;
1405
1427
  a43 = (perspective) ? -1 / perspective : 0;
1406
1428
  zOrigin = t.zOrigin;
1407
- rnd = 100000;
1429
+ min = 0.000001; //threshold below which browsers use scientific notation which won't work.
1408
1430
  comma = ",";
1431
+ zero = "0";
1409
1432
  angle = t.rotationY * _DEG2RAD;
1410
1433
  if (angle) {
1411
1434
  cos = Math.cos(angle);
1412
1435
  sin = Math.sin(angle);
1413
- a31 = a33*-sin;
1436
+ a31 = -sin;
1414
1437
  a41 = a43*-sin;
1415
1438
  a13 = a11*sin;
1416
1439
  a23 = a21*sin;
1417
- a33 *= cos;
1440
+ a33 = cos;
1418
1441
  a43 *= cos;
1419
1442
  a11 *= cos;
1420
1443
  a21 *= cos;
@@ -1425,16 +1448,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1425
1448
  sin = Math.sin(angle);
1426
1449
  t1 = a12*cos+a13*sin;
1427
1450
  t2 = a22*cos+a23*sin;
1428
- t3 = a32*cos+a33*sin;
1429
- t4 = a42*cos+a43*sin;
1451
+ a32 = a33*sin;
1452
+ a42 = a43*sin;
1430
1453
  a13 = a12*-sin+a13*cos;
1431
1454
  a23 = a22*-sin+a23*cos;
1432
- a33 = a32*-sin+a33*cos;
1433
- a43 = a42*-sin+a43*cos;
1455
+ a33 = a33*cos;
1456
+ a43 = a43*cos;
1434
1457
  a12 = t1;
1435
1458
  a22 = t2;
1436
- a32 = t3;
1437
- a42 = t4;
1438
1459
  }
1439
1460
  if (sz !== 1) {
1440
1461
  a13*=sz;
@@ -1454,31 +1475,41 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1454
1475
  a31*=sx;
1455
1476
  a41*=sx;
1456
1477
  }
1457
- if (zOrigin) {
1458
- a34 -= zOrigin;
1459
- a14 = a13*a34;
1460
- a24 = a23*a34;
1461
- a34 = a33*a34+zOrigin;
1462
- }
1463
- if (t.svg) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually
1464
- a14 += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12);
1465
- a24 += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22);
1478
+
1479
+ if (zOrigin || t.svg) {
1480
+ if (zOrigin) {
1481
+ x += a13*-zOrigin;
1482
+ y += a23*-zOrigin;
1483
+ z += a33*-zOrigin+zOrigin;
1484
+ }
1485
+ if (t.svg) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually
1486
+ x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12);
1487
+ y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22);
1488
+ }
1489
+ if (x < min && x > -min) {
1490
+ x = zero;
1491
+ }
1492
+ if (y < min && y > -min) {
1493
+ y = zero;
1494
+ }
1495
+ if (z < min && z > -min) {
1496
+ z = 0; //don't use string because we calculate perspective later and need the number.
1497
+ }
1466
1498
  }
1467
- //we round the x, y, and z slightly differently to allow even larger values.
1468
- a14 = (t1 = (a14 += x) - (a14 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a14 : a14;
1469
- a24 = (t1 = (a24 += y) - (a24 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a24 : a24;
1470
- a34 = (t1 = (a34 += z) - (a34 |= 0)) ? ((t1 * rnd + (t1 < 0 ? -0.5 : 0.5)) | 0) / rnd + a34 : a34;
1471
1499
 
1472
1500
  //optimized way of concatenating all the values into a string. If we do it all in one shot, it's slower because of the way browsers have to create temp strings and the way it affects memory. If we do it piece-by-piece with +=, it's a bit slower too. We found that doing it in these sized chunks works best overall:
1473
1501
  transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(");
1474
- transform += ((a11 * rnd) | 0) / rnd + comma + ((a21 * rnd) | 0) / rnd + comma + ((a31 * rnd) | 0) / rnd;
1475
- transform += comma + ((a41 * rnd) | 0) / rnd + comma + ((a12 * rnd) | 0) / rnd + comma + ((a22 * rnd) | 0) / rnd;
1476
- transform += comma + ((a32 * rnd) | 0) / rnd + comma + ((a42 * rnd) | 0) / rnd + comma + ((a13 * rnd) | 0) / rnd;
1477
- transform += comma + ((a23 * rnd) | 0) / rnd + comma + ((a33 * rnd) | 0) / rnd + comma + ((a43 * rnd) | 0) / rnd;
1478
- transform += comma + a14 + comma + a24 + comma + a34 + comma + (perspective ? (1 + (-a34 / perspective)) : 1) + ")";
1479
- style[_transformProp] = transform;
1502
+ transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31);
1503
+ transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22);
1504
+ if (t.rotationX || t.rotationY) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations)
1505
+ transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13);
1506
+ transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma;
1507
+ } else {
1508
+ transform += ",0,0,0,0,1,0,";
1509
+ }
1510
+ transform += x + comma + y + comma + z + comma + (perspective ? (1 + (-z / perspective)) : 1) + ")";
1480
1511
 
1481
- //OLD (slower on most devices): style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d(") + [ (((a11 * rnd) | 0) / rnd), (((a21 * rnd) | 0) / rnd), (((a31 * rnd) | 0) / rnd), (((a41 * rnd) | 0) / rnd), (((a12 * rnd) | 0) / rnd), (((a22 * rnd) | 0) / rnd), (((a32 * rnd) | 0) / rnd), (((a42 * rnd) | 0) / rnd), (((a13 * rnd) | 0) / rnd), (((a23 * rnd) | 0) / rnd), (((a33 * rnd) | 0) / rnd), (((a43 * rnd) | 0) / rnd), a14, a24, a34, (perspective ? (1 + (-a34 / perspective)) : 1) ].join(",") + ")";
1512
+ style[_transformProp] = transform;
1482
1513
  },
1483
1514
 
1484
1515
  _set2DTransformRatio = _internals.set2DTransformRatio = function(v) {
@@ -1620,7 +1651,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
1620
1651
 
1621
1652
  orig = v.transformOrigin;
1622
1653
  if (orig && m1.svg) {
1623
- _parseSVGOrigin(t, orig, m2);
1654
+ _parseSVGOrigin(t, _parsePosition(orig), m2);
1624
1655
  pt = new CSSPropTween(m1, "xOrigin", m1.xOrigin, m2.xOrigin - m1.xOrigin, pt, -1, "transformOrigin");
1625
1656
  pt.b = m1.xOrigin;
1626
1657
  pt.e = pt.xs0 = m2.xOrigin;
@@ -2110,7 +2141,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
2110
2141
  esfx = es.replace(_suffixExp, "");
2111
2142
  } else {
2112
2143
  en = parseFloat(es);
2113
- esfx = isStr ? es.substr((en + "").length) || "" : "";
2144
+ esfx = isStr ? es.replace(_suffixExp, "") : "";
2114
2145
  }
2115
2146
 
2116
2147
  if (esfx === "") {
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * VERSION: beta 0.6.2
3
- * DATE: 2014-07-17
2
+ * VERSION: beta 0.6.3
3
+ * DATE: 2014-12-31
4
4
  * UPDATES AND DOCS AT: http://www.greensock.com
5
5
  *
6
- * @license Copyright (c) 2008-2014, GreenSock. All rights reserved.
7
- * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for
6
+ * @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
7
+ * This work is subject to the terms at http://greensock.com/standard-license or for
8
8
  * Club GreenSock members, the software agreement that was issued with your membership.
9
9
  *
10
10
  * @author: Jack Doyle, jack@greensock.com
@@ -27,7 +27,7 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
27
27
 
28
28
  p._propName = "cssRule";
29
29
  p.constructor = CSSRulePlugin;
30
- CSSRulePlugin.version = "0.6.2";
30
+ CSSRulePlugin.version = "0.6.3";
31
31
  CSSRulePlugin.API = 2;
32
32
 
33
33
  /**
@@ -52,11 +52,14 @@ var _gsScope = (typeof(module) !== "undefined" && module.exports && typeof(globa
52
52
  //Firefox may throw insecure operation errors when css is loaded from other domains, so try/catch.
53
53
  try {
54
54
  curSS = ss[i][ruleProp];
55
+ if (!curSS) {
56
+ continue;
57
+ }
58
+ j = curSS.length;
55
59
  } catch (e) {
56
60
  console.log(e);
57
61
  continue;
58
62
  }
59
- j = curSS.length;
60
63
  while (--j > -1) {
61
64
  cs = curSS[j];
62
65
  if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) { //note: IE adds an extra ":" to pseudo selectors, so .myClass:after becomes .myClass::after, so we need to strip the extra one out.