Skip to content

Commit

Permalink
Small version js fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Koen Bok committed Mar 17, 2013
1 parent f74c9eb commit 37cd9ec
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build:
mkdir -p build mkdir -p build
./node_modules/browserify/bin/cmd.js src/init.coffee -o build/framer.build.js ./node_modules/browserify/bin/cmd.js src/init.coffee -o build/framer.build.js
echo "// Framer `git describe --tags` (c) 2013 Koen Bok\n" > build/framer.js echo "// Framer `git describe --tags` (c) 2013 Koen Bok\n" > build/framer.js
echo "window.FramerVersion = \"`git describe --tags`\"\n\n" >> build/framer.js echo "window.FramerVersion = \"`git describe --tags`\";\n\n" >> build/framer.js
cat build/framer.build.js >> build/framer.js cat build/framer.build.js >> build/framer.js
rm build/framer.build.js rm build/framer.build.js
cp build/framer.js template/framer.js cp build/framer.js template/framer.js
Expand Down
20 changes: 9 additions & 11 deletions build/framer.js
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
// Framer 0.5.0-28-g5f9b84f (c) 2013 Koen Bok // Framer 0.5.0-29-gf74c9eb (c) 2013 Koen Bok


window.FramerVersion = "0.5.0-28-g5f9b84f" window.FramerVersion = "0.5.0-29-gf74c9eb";




(function(){var require = function (file, cwd) { (function(){var require = function (file, cwd) {
Expand Down Expand Up @@ -397,11 +397,6 @@ process.binding = function (name) {
}); });


require.define("/src/css.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() { require.define("/src/css.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() {
var STYLESHEET_ID, _STYLESHEET;

STYLESHEET_ID = "FramerCSS";

_STYLESHEET = null;


exports.addStyle = function(css) { exports.addStyle = function(css) {
var styleSheet; var styleSheet;
Expand Down Expand Up @@ -2742,7 +2737,7 @@ require.define("/src/primitives/matrix.coffee",function(require,module,exports,_
WebKitCSSMatrix.prototype.cssValues = function() { WebKitCSSMatrix.prototype.cssValues = function() {
var r, values; var r, values;
r = function(v) { r = function(v) {
return v.toFixed(5); return v;
}; };
return values = " matrix3d( " + (r(this.m11)) + ", " + (r(this.m12)) + ", " + (r(this.m13)) + ", " + (r(this.m14)) + ", " + (r(this.m21)) + ", " + (r(this.m22)) + ", " + (r(this.m23)) + ", " + (r(this.m24)) + ", " + (r(this.m31)) + ", " + (r(this.m32)) + ", " + (r(this.m33)) + ", " + (r(this.m34)) + ", " + (r(this.m41)) + ", " + (r(this.m42)) + ", " + (r(this.m43)) + ", " + (r(this.m44)) + ")"; return values = " matrix3d( " + (r(this.m11)) + ", " + (r(this.m12)) + ", " + (r(this.m13)) + ", " + (r(this.m14)) + ", " + (r(this.m21)) + ", " + (r(this.m22)) + ", " + (r(this.m23)) + ", " + (r(this.m24)) + ", " + (r(this.m31)) + ", " + (r(this.m32)) + ", " + (r(this.m33)) + ", " + (r(this.m34)) + ", " + (r(this.m41)) + ", " + (r(this.m42)) + ", " + (r(this.m43)) + ", " + (r(this.m44)) + ")";
}; };
Expand Down Expand Up @@ -2989,7 +2984,7 @@ require.define("/src/primitives/events.coffee",function(require,module,exports,_
}); });


require.define("/src/animation.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() { require.define("/src/animation.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() {
var Animation, EventEmitter, Matrix, bezier, css, parseCurve, spring, utils, _, var Animation, AnimationCounter, EventEmitter, Matrix, bezier, css, parseCurve, spring, utils, _,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Expand All @@ -3008,6 +3003,8 @@ require.define("/src/animation.coffee",function(require,module,exports,__dirname


bezier = require("../curves/bezier"); bezier = require("../curves/bezier");


AnimationCounter = 0;

parseCurve = function(a, prefix) { parseCurve = function(a, prefix) {
a = a.replace(prefix, ""); a = a.replace(prefix, "");
a = a.replace(/\s+/g, ""); a = a.replace(/\s+/g, "");
Expand Down Expand Up @@ -3055,11 +3052,12 @@ require.define("/src/animation.coffee",function(require,module,exports,__dirname
this.curve = "linear"; this.curve = "linear";
} }
if ((_ref3 = this.precision) == null) { if ((_ref3 = this.precision) == null) {
this.precision = 40; this.precision = 30;
} }
this.curveValues = this._parseCurve(this.curve); this.curveValues = this._parseCurve(this.curve);
this.count = 0; this.count = 0;
this.animationId = utils.uuid().slice(0, 9); AnimationCounter += 1;
this.animationId = AnimationCounter;
} }


Animation.prototype.start = function(callback) { Animation.prototype.start = function(callback) {
Expand Down
12 changes: 9 additions & 3 deletions src/animation.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ css = require "../css"
spring = require "../curves/spring" spring = require "../curves/spring"
bezier = require "../curves/bezier" bezier = require "../curves/bezier"


AnimationCounter = 0

parseCurve = (a, prefix) -> parseCurve = (a, prefix) ->


# "spring(1, 2, 3)" -> 1, 2, 3 # "spring(1, 2, 3)" -> 1, 2, 3
Expand Down Expand Up @@ -49,12 +51,16 @@ class Animation extends EventEmitter
# Set all the defaults # Set all the defaults
@time ?= 1000 @time ?= 1000
@curve ?= "linear" @curve ?= "linear"
@precision ?= 40 @precision ?= 30


@curveValues = @_parseCurve @curve @curveValues = @_parseCurve @curve
@count = 0 @count = 0
@animationId = utils.uuid()[..8] # @animationId = utils.uuid()[..8]


AnimationCounter += 1
@animationId = AnimationCounter


start: (callback) => start: (callback) =>


# console.profile "Animation.start" # console.profile "Animation.start"
Expand Down
4 changes: 0 additions & 4 deletions src/css.coffee
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,3 @@
STYLESHEET_ID = "FramerCSS"

_STYLESHEET = null

exports.addStyle = (css) -> exports.addStyle = (css) ->


styleSheet = document.createElement "style" styleSheet = document.createElement "style"
Expand Down
3 changes: 2 additions & 1 deletion src/primitives/matrix.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ _ = require "underscore"


WebKitCSSMatrix::cssValues = -> WebKitCSSMatrix::cssValues = ->


r = (v) -> v.toFixed 5 # r = (v) -> v.toFixed 5
r = (v) -> v


values = " values = "
matrix3d( matrix3d(
Expand Down
20 changes: 9 additions & 11 deletions template/framer.js
Original file line number Original file line Diff line number Diff line change
@@ -1,6 +1,6 @@
// Framer 0.5.0-28-g5f9b84f (c) 2013 Koen Bok // Framer 0.5.0-29-gf74c9eb (c) 2013 Koen Bok


window.FramerVersion = "0.5.0-28-g5f9b84f" window.FramerVersion = "0.5.0-29-gf74c9eb";




(function(){var require = function (file, cwd) { (function(){var require = function (file, cwd) {
Expand Down Expand Up @@ -397,11 +397,6 @@ process.binding = function (name) {
}); });


require.define("/src/css.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() { require.define("/src/css.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() {
var STYLESHEET_ID, _STYLESHEET;

STYLESHEET_ID = "FramerCSS";

_STYLESHEET = null;


exports.addStyle = function(css) { exports.addStyle = function(css) {
var styleSheet; var styleSheet;
Expand Down Expand Up @@ -2742,7 +2737,7 @@ require.define("/src/primitives/matrix.coffee",function(require,module,exports,_
WebKitCSSMatrix.prototype.cssValues = function() { WebKitCSSMatrix.prototype.cssValues = function() {
var r, values; var r, values;
r = function(v) { r = function(v) {
return v.toFixed(5); return v;
}; };
return values = " matrix3d( " + (r(this.m11)) + ", " + (r(this.m12)) + ", " + (r(this.m13)) + ", " + (r(this.m14)) + ", " + (r(this.m21)) + ", " + (r(this.m22)) + ", " + (r(this.m23)) + ", " + (r(this.m24)) + ", " + (r(this.m31)) + ", " + (r(this.m32)) + ", " + (r(this.m33)) + ", " + (r(this.m34)) + ", " + (r(this.m41)) + ", " + (r(this.m42)) + ", " + (r(this.m43)) + ", " + (r(this.m44)) + ")"; return values = " matrix3d( " + (r(this.m11)) + ", " + (r(this.m12)) + ", " + (r(this.m13)) + ", " + (r(this.m14)) + ", " + (r(this.m21)) + ", " + (r(this.m22)) + ", " + (r(this.m23)) + ", " + (r(this.m24)) + ", " + (r(this.m31)) + ", " + (r(this.m32)) + ", " + (r(this.m33)) + ", " + (r(this.m34)) + ", " + (r(this.m41)) + ", " + (r(this.m42)) + ", " + (r(this.m43)) + ", " + (r(this.m44)) + ")";
}; };
Expand Down Expand Up @@ -2989,7 +2984,7 @@ require.define("/src/primitives/events.coffee",function(require,module,exports,_
}); });


require.define("/src/animation.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() { require.define("/src/animation.coffee",function(require,module,exports,__dirname,__filename,process,global){(function() {
var Animation, EventEmitter, Matrix, bezier, css, parseCurve, spring, utils, _, var Animation, AnimationCounter, EventEmitter, Matrix, bezier, css, parseCurve, spring, utils, _,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__hasProp = {}.hasOwnProperty, __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Expand All @@ -3008,6 +3003,8 @@ require.define("/src/animation.coffee",function(require,module,exports,__dirname


bezier = require("../curves/bezier"); bezier = require("../curves/bezier");


AnimationCounter = 0;

parseCurve = function(a, prefix) { parseCurve = function(a, prefix) {
a = a.replace(prefix, ""); a = a.replace(prefix, "");
a = a.replace(/\s+/g, ""); a = a.replace(/\s+/g, "");
Expand Down Expand Up @@ -3055,11 +3052,12 @@ require.define("/src/animation.coffee",function(require,module,exports,__dirname
this.curve = "linear"; this.curve = "linear";
} }
if ((_ref3 = this.precision) == null) { if ((_ref3 = this.precision) == null) {
this.precision = 40; this.precision = 30;
} }
this.curveValues = this._parseCurve(this.curve); this.curveValues = this._parseCurve(this.curve);
this.count = 0; this.count = 0;
this.animationId = utils.uuid().slice(0, 9); AnimationCounter += 1;
this.animationId = AnimationCounter;
} }


Animation.prototype.start = function(callback) { Animation.prototype.start = function(callback) {
Expand Down

0 comments on commit 37cd9ec

Please sign in to comment.