Comparing version 1.0.2 to 1.1.0
@@ -1,1 +0,1 @@ | ||
{"changed":true,"filter":false,"title":"index.js","tooltip":"/index.js","value":"'use strict';\n\nvar now = require(\"right-now\");\nvar extend = require(\"extend\");\n\nvar defaultSetter = function(object, property, value) {\n object[property] = value;\n};\n\n\nvar linearEasing = function(x) {\n return x;\n};\n\nfunction updateProp(name, options, t) {\n var obj = options.object,\n setter = options.setter,\n teased = options.easing(t);\n if (options.discreteValues) {\n // step values\n var nValues = options.discreteValues.length;\n var index = Math.floor(teased * nValues);\n if (index >= nValues)\n index = nValues-1;\n setter(obj, name, options.discreteValues[index]);\n }\n else if (options.valueFn) {\n setter(obj, name, options.valueFn(teased));\n }\n else if (options.tween) {\n var start = options.tween[0], end = options.tween[1];\n var newValue = start + teased * (end - start);\n setter(obj, name, newValue);\n } \n}\n\nvar defaultOptions = {\n object: null, // must provide\n duration: 1000,\n cancelable: true,\n setter: defaultSetter,\n easing: linearEasing\n //onDone\n //onCancel\n};\n\nfunction Animation(options) {\n if (!(this instanceof Animation))\n return new Animation(options);\n\n extend(this, defaultOptions, options);\n if (!this.object)\n throw new Error(\"Animation requires object\");\n \n this.startTime = now();\n this.props = Object.create(null);\n}\n\nAnimation.prototype = {\n addProp: function(name, options) {\n \n var fullOptions = extend({\n object: this.object,\n setter: this.setter,\n easing: this.easing\n }, options);\n \n this.props[name] = fullOptions; \n return this;\n },\n\n tween: function(name, from, to) {\n return this.addProp(name, { tween: [from, to] });\n },\n\n discrete: function(name, array) {\n return this.addProp(name, { discreteValues: array });\n },\n\n fn: function(name, fn) {\n return this.addProp(name, { valueFn: fn});\n },\n\n update: function(timeNow) {\n timeNow = timeNow || now();\n var t = (timeNow - this.startTime) / this.duration;\n if (t > 1)\n t = 1;\n\n var props = this.props;\n for (var key in props) {\n updateProp(key, props[key], t);\n }\n\n if (t === 1) {\n this.done = true;\n if (this.onDone)\n this.onDone(this.object);\n return false;\n }\n\n return true; \n },\n\n cancel: function() {\n if (this.onCancel) {\n this.onCancel(this.object);\n }\n }\n};\n\n\n\nmodule.exports = Animation;","undoManager":{"mark":-2,"position":3,"stack":[[{"start":{"row":18,"column":25},"end":{"row":18,"column":26},"action":"insert","lines":["/"],"id":2}],[{"start":{"row":18,"column":25},"end":{"row":18,"column":26},"action":"remove","lines":["/"],"id":3}],[{"start":{"row":12,"column":2},"end":{"row":12,"column":3},"action":"insert","lines":["}"],"id":4}],[{"start":{"row":12,"column":2},"end":{"row":12,"column":3},"action":"remove","lines":["}"],"id":5}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":14,"column":39},"end":{"row":14,"column":39},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":45,"state":"start","mode":"ace/mode/javascript"}},"timestamp":1452094395003} | ||
{"filter":false,"title":"index.js","tooltip":"/index.js","undoManager":{"mark":100,"position":100,"stack":[[{"start":{"row":91,"column":39},"end":{"row":91,"column":40},"action":"insert","lines":["+"],"id":85}],[{"start":{"row":91,"column":40},"end":{"row":91,"column":41},"action":"insert","lines":["+"],"id":86}],[{"start":{"row":91,"column":44},"end":{"row":92,"column":0},"action":"insert","lines":["",""],"id":87},{"start":{"row":92,"column":0},"end":{"row":92,"column":9},"action":"insert","lines":[" "]}],[{"start":{"row":92,"column":9},"end":{"row":92,"column":10},"action":"insert","lines":["v"],"id":88}],[{"start":{"row":92,"column":10},"end":{"row":92,"column":11},"action":"insert","lines":["a"],"id":89}],[{"start":{"row":92,"column":11},"end":{"row":92,"column":12},"action":"insert","lines":["r"],"id":90}],[{"start":{"row":92,"column":12},"end":{"row":92,"column":13},"action":"insert","lines":[" "],"id":91}],[{"start":{"row":92,"column":13},"end":{"row":92,"column":14},"action":"insert","lines":["p"],"id":92}],[{"start":{"row":92,"column":14},"end":{"row":92,"column":15},"action":"insert","lines":["r"],"id":93}],[{"start":{"row":92,"column":15},"end":{"row":92,"column":16},"action":"insert","lines":["o"],"id":94}],[{"start":{"row":92,"column":16},"end":{"row":92,"column":17},"action":"insert","lines":["p"],"id":95}],[{"start":{"row":92,"column":17},"end":{"row":92,"column":18},"action":"insert","lines":[" "],"id":96}],[{"start":{"row":92,"column":18},"end":{"row":92,"column":19},"action":"insert","lines":["="],"id":97}],[{"start":{"row":92,"column":19},"end":{"row":92,"column":20},"action":"insert","lines":[" "],"id":98}],[{"start":{"row":92,"column":20},"end":{"row":92,"column":21},"action":"insert","lines":["p"],"id":99}],[{"start":{"row":92,"column":21},"end":{"row":92,"column":22},"action":"insert","lines":["r"],"id":100}],[{"start":{"row":92,"column":22},"end":{"row":92,"column":23},"action":"insert","lines":["o"],"id":101}],[{"start":{"row":92,"column":23},"end":{"row":92,"column":24},"action":"insert","lines":["p"],"id":102}],[{"start":{"row":92,"column":24},"end":{"row":92,"column":25},"action":"insert","lines":["s"],"id":103}],[{"start":{"row":92,"column":25},"end":{"row":92,"column":27},"action":"insert","lines":["[]"],"id":104}],[{"start":{"row":92,"column":26},"end":{"row":92,"column":27},"action":"insert","lines":["i"],"id":105}],[{"start":{"row":92,"column":28},"end":{"row":92,"column":29},"action":"insert","lines":[";"],"id":106}],[{"start":{"row":93,"column":20},"end":{"row":93,"column":23},"action":"remove","lines":["key"],"id":107},{"start":{"row":93,"column":20},"end":{"row":93,"column":21},"action":"insert","lines":["p"]}],[{"start":{"row":93,"column":21},"end":{"row":93,"column":22},"action":"insert","lines":["r"],"id":108}],[{"start":{"row":93,"column":22},"end":{"row":93,"column":23},"action":"insert","lines":["o"],"id":109}],[{"start":{"row":93,"column":23},"end":{"row":93,"column":24},"action":"insert","lines":["p"],"id":110}],[{"start":{"row":93,"column":20},"end":{"row":93,"column":25},"action":"remove","lines":["prop,"],"id":111}],[{"start":{"row":93,"column":20},"end":{"row":93,"column":21},"action":"remove","lines":[" "],"id":112}],[{"start":{"row":93,"column":26},"end":{"row":93,"column":27},"action":"remove","lines":["k"],"id":113}],[{"start":{"row":93,"column":26},"end":{"row":93,"column":27},"action":"remove","lines":["e"],"id":114}],[{"start":{"row":93,"column":26},"end":{"row":93,"column":27},"action":"remove","lines":["y"],"id":115}],[{"start":{"row":93,"column":26},"end":{"row":93,"column":27},"action":"insert","lines":["i"],"id":116}],[{"start":{"row":92,"column":9},"end":{"row":92,"column":29},"action":"remove","lines":["var prop = props[i];"],"id":117}],[{"start":{"row":92,"column":0},"end":{"row":93,"column":0},"action":"remove","lines":[" ",""],"id":118}],[{"start":{"row":67,"column":18},"end":{"row":67,"column":19},"action":"insert","lines":["p"],"id":119}],[{"start":{"row":67,"column":19},"end":{"row":67,"column":20},"action":"insert","lines":["r"],"id":120}],[{"start":{"row":67,"column":20},"end":{"row":67,"column":21},"action":"insert","lines":["o"],"id":121}],[{"start":{"row":67,"column":21},"end":{"row":67,"column":22},"action":"insert","lines":["p"],"id":122}],[{"start":{"row":67,"column":22},"end":{"row":67,"column":23},"action":"remove","lines":["n"],"id":123}],[{"start":{"row":67,"column":22},"end":{"row":67,"column":23},"action":"insert","lines":["N"],"id":124}],[{"start":{"row":14,"column":20},"end":{"row":14,"column":26},"action":"remove","lines":["name, "],"id":125}],[{"start":{"row":17,"column":33},"end":{"row":17,"column":34},"action":"remove","lines":[";"],"id":126}],[{"start":{"row":17,"column":33},"end":{"row":17,"column":34},"action":"insert","lines":[","],"id":127}],[{"start":{"row":17,"column":34},"end":{"row":18,"column":0},"action":"insert","lines":["",""],"id":128},{"start":{"row":18,"column":0},"end":{"row":18,"column":7},"action":"insert","lines":[" "]}],[{"start":{"row":18,"column":7},"end":{"row":18,"column":8},"action":"insert","lines":["n"],"id":129}],[{"start":{"row":18,"column":8},"end":{"row":18,"column":9},"action":"insert","lines":["a"],"id":130}],[{"start":{"row":18,"column":9},"end":{"row":18,"column":10},"action":"insert","lines":["m"],"id":131}],[{"start":{"row":18,"column":10},"end":{"row":18,"column":11},"action":"insert","lines":[" "],"id":132}],[{"start":{"row":18,"column":10},"end":{"row":18,"column":11},"action":"remove","lines":[" "],"id":133}],[{"start":{"row":18,"column":10},"end":{"row":18,"column":11},"action":"insert","lines":["e"],"id":134}],[{"start":{"row":18,"column":11},"end":{"row":18,"column":12},"action":"insert","lines":[" "],"id":135}],[{"start":{"row":18,"column":12},"end":{"row":18,"column":13},"action":"insert","lines":["="],"id":136}],[{"start":{"row":18,"column":13},"end":{"row":18,"column":14},"action":"insert","lines":[" "],"id":137}],[{"start":{"row":18,"column":14},"end":{"row":18,"column":15},"action":"insert","lines":["o"],"id":138}],[{"start":{"row":18,"column":15},"end":{"row":18,"column":16},"action":"insert","lines":["p"],"id":139}],[{"start":{"row":18,"column":16},"end":{"row":18,"column":17},"action":"insert","lines":["t"],"id":140}],[{"start":{"row":18,"column":17},"end":{"row":18,"column":18},"action":"insert","lines":["i"],"id":141}],[{"start":{"row":18,"column":18},"end":{"row":18,"column":19},"action":"insert","lines":["o"],"id":142}],[{"start":{"row":18,"column":19},"end":{"row":18,"column":20},"action":"insert","lines":["n"],"id":143}],[{"start":{"row":18,"column":20},"end":{"row":18,"column":21},"action":"insert","lines":["s"],"id":144}],[{"start":{"row":18,"column":21},"end":{"row":18,"column":23},"action":"insert","lines":["[]"],"id":145}],[{"start":{"row":18,"column":22},"end":{"row":18,"column":23},"action":"insert","lines":["p"],"id":146}],[{"start":{"row":18,"column":23},"end":{"row":18,"column":24},"action":"insert","lines":["r"],"id":147}],[{"start":{"row":18,"column":24},"end":{"row":18,"column":25},"action":"insert","lines":["o"],"id":148}],[{"start":{"row":18,"column":25},"end":{"row":18,"column":26},"action":"insert","lines":["p"],"id":149}],[{"start":{"row":18,"column":26},"end":{"row":18,"column":27},"action":"insert","lines":["N"],"id":150}],[{"start":{"row":18,"column":27},"end":{"row":18,"column":28},"action":"insert","lines":["a"],"id":151}],[{"start":{"row":18,"column":28},"end":{"row":18,"column":29},"action":"insert","lines":["m"],"id":152}],[{"start":{"row":18,"column":29},"end":{"row":18,"column":30},"action":"insert","lines":["e"],"id":153}],[{"start":{"row":18,"column":31},"end":{"row":18,"column":32},"action":"insert","lines":[";"],"id":154}],[{"start":{"row":92,"column":11},"end":{"row":92,"column":14},"action":"remove","lines":["int"],"id":155},{"start":{"row":92,"column":11},"end":{"row":92,"column":12},"action":"insert","lines":["v"]}],[{"start":{"row":92,"column":12},"end":{"row":92,"column":13},"action":"insert","lines":["a"],"id":156}],[{"start":{"row":92,"column":13},"end":{"row":92,"column":14},"action":"insert","lines":["r"],"id":157}],[{"start":{"row":91,"column":28},"end":{"row":91,"column":29},"action":"remove","lines":[";"],"id":158}],[{"start":{"row":91,"column":28},"end":{"row":91,"column":29},"action":"insert","lines":[","],"id":159}],[{"start":{"row":91,"column":29},"end":{"row":91,"column":30},"action":"insert","lines":[" "],"id":160}],[{"start":{"row":91,"column":30},"end":{"row":91,"column":31},"action":"insert","lines":["l"],"id":161}],[{"start":{"row":91,"column":31},"end":{"row":91,"column":32},"action":"insert","lines":["e"],"id":162}],[{"start":{"row":91,"column":32},"end":{"row":91,"column":33},"action":"insert","lines":["n"],"id":163}],[{"start":{"row":91,"column":33},"end":{"row":91,"column":34},"action":"insert","lines":[" "],"id":164}],[{"start":{"row":91,"column":34},"end":{"row":91,"column":35},"action":"insert","lines":["="],"id":165}],[{"start":{"row":91,"column":35},"end":{"row":91,"column":36},"action":"insert","lines":[" "],"id":166}],[{"start":{"row":91,"column":36},"end":{"row":91,"column":37},"action":"insert","lines":["p"],"id":167}],[{"start":{"row":91,"column":37},"end":{"row":91,"column":38},"action":"insert","lines":["r"],"id":168}],[{"start":{"row":91,"column":38},"end":{"row":91,"column":39},"action":"insert","lines":["o"],"id":169}],[{"start":{"row":91,"column":39},"end":{"row":91,"column":40},"action":"insert","lines":["p"],"id":170}],[{"start":{"row":91,"column":40},"end":{"row":91,"column":41},"action":"insert","lines":["s"],"id":171}],[{"start":{"row":91,"column":41},"end":{"row":91,"column":42},"action":"insert","lines":["."],"id":172}],[{"start":{"row":91,"column":42},"end":{"row":91,"column":43},"action":"insert","lines":["l"],"id":173}],[{"start":{"row":91,"column":43},"end":{"row":91,"column":44},"action":"insert","lines":["e"],"id":174}],[{"start":{"row":91,"column":44},"end":{"row":91,"column":45},"action":"insert","lines":["n"],"id":175}],[{"start":{"row":91,"column":45},"end":{"row":91,"column":46},"action":"insert","lines":["g"],"id":176}],[{"start":{"row":91,"column":46},"end":{"row":91,"column":47},"action":"insert","lines":["t"],"id":177}],[{"start":{"row":91,"column":47},"end":{"row":91,"column":48},"action":"insert","lines":["h"],"id":178}],[{"start":{"row":91,"column":48},"end":{"row":91,"column":49},"action":"insert","lines":[";"],"id":179}],[{"start":{"row":92,"column":24},"end":{"row":92,"column":36},"action":"remove","lines":["props.length"],"id":180},{"start":{"row":92,"column":24},"end":{"row":92,"column":25},"action":"insert","lines":["l"]}],[{"start":{"row":92,"column":25},"end":{"row":92,"column":26},"action":"insert","lines":["e"],"id":181}],[{"start":{"row":92,"column":26},"end":{"row":92,"column":27},"action":"insert","lines":["n"],"id":182}],[{"start":{"row":18,"column":21},"end":{"row":18,"column":22},"action":"insert","lines":["."],"id":183}],[{"start":{"row":18,"column":22},"end":{"row":18,"column":23},"action":"remove","lines":["["],"id":184}],[{"start":{"row":18,"column":30},"end":{"row":18,"column":31},"action":"remove","lines":["]"],"id":185}]]},"ace":{"folds":[],"scrolltop":919,"scrollleft":0,"selection":{"start":{"row":18,"column":30},"end":{"row":18,"column":30},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":53,"state":"start","mode":"ace/mode/javascript"}},"timestamp":1452720118342,"hash":"f4fc40993ea0d6e573d466c13e1e123699c50658"} |
@@ -1,1 +0,1 @@ | ||
{"filter":false,"title":"package.json","tooltip":"/package.json","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":0,"column":0},"end":{"row":0,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1452093096107,"hash":"46b7e8603994cdabc5e17fb072357bd4e264d6ee"} | ||
{"filter":false,"title":"package.json","tooltip":"/package.json","undoManager":{"mark":1,"position":1,"stack":[[{"start":{"row":2,"column":18},"end":{"row":2,"column":19},"action":"remove","lines":["1"],"id":1,"ignore":true},{"start":{"row":2,"column":18},"end":{"row":2,"column":19},"action":"insert","lines":["2"]}],[{"start":{"row":2,"column":16},"end":{"row":2,"column":19},"action":"remove","lines":["0.2"],"id":2,"ignore":true},{"start":{"row":2,"column":16},"end":{"row":2,"column":19},"action":"insert","lines":["1.0"]}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":10,"column":4},"end":{"row":10,"column":67},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1452096908000,"hash":"c7f5cd00d78d420d30f43161e55c36fd6a97b9a1"} |
@@ -1,1 +0,1 @@ | ||
{"filter":false,"title":"README.md","tooltip":"/README.md","undoManager":{"mark":81,"position":81,"stack":[[{"start":{"row":4,"column":3},"end":{"row":12,"column":3},"action":"insert","lines":["Installation","","For node or browserify,","","> npm install browserify","","For a manual configuration system, grab dist/anymation.js or dist/anymation-min.js from the git repository. These export the Anymation constructor through a require.js define() if you are using it, otherwise they add the Anymation constructor to the global window object.","","## "],"id":2,"ignore":true},{"start":{"row":23,"column":17},"end":{"row":23,"column":18},"action":"remove","lines":[","]},{"start":{"row":24,"column":0},"end":{"row":27,"column":2},"action":"remove","lines":[" props: {"," x: 500"," }","};"]},{"start":{"row":24,"column":0},"end":{"row":24,"column":116},"action":"insert","lines":["}.tween(\"x\", 40, 500); // Smoothly interpolate objectToAnimate.x between 40 and 500 over the course of the animation"]},{"start":{"row":39,"column":3},"end":{"row":57,"column":0},"action":"remove","lines":["API","","### Animation(options)","","Constructor for an Animation. Calling it with the new operator is optional. The animation starts immediately.","","* options: An object specifying options:"," * object (object, required) - The object whose properties are going to get changed by the animation."," * duration (number, optional, default=1000) - Duration for animation, in milliseconds"," * props (object, optional) - Specification of what to actually animate. See below."," * onComplete (function, optional) -Function called when the animation completes"," * onCancel (function, optional) - Function called when the animation is canceled","","#### Props object","","... to be continued","","",""]},{"start":{"row":39,"column":3},"end":{"row":108,"column":121},"action":"insert","lines":["Easing functions","","Anymation doesn't provide any built-in easing functions except for the trivial linear default. Specifying an easing function from a library like [eases](https://www.npmjs.com/package/eases) is super-easy though.","","```javascript","var Animation = require(\"anymation\");","var eases = require(\"eases\");","","new Animation({"," object: someObject,"," easing: eases.elasticOut","});","```","","## API","","### Animation(options)","","Constructor for an Animation. Calling it with the new operator is optional. The animation starts immediately.","","* options: An object specifying options:"," * object (object, required) - The object whose properties are going to get changed by the animation."," * duration (number, optional, default=1000) - Duration for animation, in milliseconds"," * easing (function, optional, default=linear) - Easing function for the animation. "," * setter (function, optional) - Function called to change a property value. Signature (object, propertyName, value. The default function sets object[propertyName] = value."," * onComplete (function, optional) -Function called when the animation completes"," * onCancel (function, optional) - Function called when the animation is canceled","","## Animation.tween(propertyName, from, to) returns this Animation","","Smoothly change a numeric property between the start and end values. Shortcut for Animation.addProp(propertyName, { tween: [from, to] }).","","* propertyName (string) - Name of the property on the object","* start (number) - Starting value","* end (number) - Ending value","","## Animation.discrete(propertyName, array) returns this Animation","","Cycle a property through a specified list of values (of any type) over the course of the animation. Shortcut for Animation.addProp(propertyName, { discreteValues: array }).","","* propertyName (string) - Name of the property on the object","* array (array) - Specified values","","## Animation.fn(propertyName, fn) returns this Animation","","Animate a property using a callback function returning a value of any type. Shortcut for Animation.addProp(propertyName, { valueFn: fn});","","* propertyName (string) - Name of the property on the object","* fn (function) - a function with signature fn(t_eased) returns value, where t_eased is the eased current time. With linear easing this is 0 at the start of the animation and 1 at the end, increasing linearly in between. In general it is 0 at the start and 1 at the end, with no promises it can't be negative or greater than one in-between (in elastic easing functions for example). The function should return the desired value for the property at the given eased time.","","## Animation.addProp(propertyName, options) returns this Animation","","Animates a property during the course of the animation, specifying all options, many of which can override the animation's default options.","","* propertyName (string) - Name of the property on the object","* options (object):"," * object (object, optional, default=this.options.object) - The object whose property is to be changed."," * easing (function, optional, default=this.options.easing) - Easing function for this property. "," * setter (function, optional, default=this.options.setter) - Function called to change this property value. Signature (object, propertyName, value. The default function sets object[propertyName] = value."," * tween (array[number], optional) - see Animation.tween()"," * discreteValues (array, optional) - see Animation.discrete()"," * valueFn (function, optional) - see Animation.fn()",""," ## Animation.update(timeNow) returns boolean",""," Updates all animated properties. Generally no need to pass the timeNow parameter. ",""," * timeNow (number, optional, default=current system time in milliseconds)",""," Returns false if the animation is done (if timeNow >= the animation start time + the animation duration) otherwise true"]}],[{"start":{"row":102,"column":1},"end":{"row":102,"column":2},"action":"remove","lines":[" "],"id":3}],[{"start":{"row":102,"column":0},"end":{"row":102,"column":1},"action":"remove","lines":[" "],"id":4}],[{"start":{"row":55,"column":3},"end":{"row":55,"column":4},"action":"insert","lines":["#"],"id":5}],[{"start":{"row":67,"column":2},"end":{"row":67,"column":3},"action":"insert","lines":["#"],"id":6}],[{"start":{"row":75,"column":2},"end":{"row":75,"column":3},"action":"insert","lines":["#"],"id":7}],[{"start":{"row":82,"column":2},"end":{"row":82,"column":3},"action":"insert","lines":["#"],"id":8}],[{"start":{"row":89,"column":2},"end":{"row":89,"column":3},"action":"insert","lines":["#"],"id":9}],[{"start":{"row":102,"column":2},"end":{"row":102,"column":3},"action":"insert","lines":["#"],"id":10}],[{"start":{"row":53,"column":2},"end":{"row":53,"column":3},"action":"insert","lines":["#"],"id":11}],[{"start":{"row":39,"column":2},"end":{"row":39,"column":3},"action":"insert","lines":["#"],"id":12}],[{"start":{"row":12,"column":2},"end":{"row":12,"column":3},"action":"insert","lines":["#"],"id":13}],[{"start":{"row":4,"column":2},"end":{"row":4,"column":3},"action":"insert","lines":["#"],"id":14}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":1},"action":"insert","lines":["#"],"id":15}],[{"start":{"row":0,"column":1},"end":{"row":0,"column":2},"action":"remove","lines":["#"],"id":16}],[{"start":{"row":2,"column":0},"end":{"row":2,"column":1},"action":"remove","lines":[">"],"id":17}],[{"start":{"row":6,"column":12},"end":{"row":6,"column":22},"action":"remove","lines":["browserify"],"id":45},{"start":{"row":6,"column":12},"end":{"row":6,"column":48},"action":"insert","lines":["[browserify](http://browserify.org/)"]}],[{"start":{"row":2,"column":48},"end":{"row":2,"column":129},"action":"remove","lines":[". Currently works in node or in browsers w/ [browserify](http://browserify.org/)."],"id":46},{"start":{"row":2,"column":48},"end":{"row":2,"column":49},"action":"insert","lines":[" "]}],[{"start":{"row":2,"column":49},"end":{"row":2,"column":50},"action":"insert","lines":["f"],"id":47}],[{"start":{"row":2,"column":50},"end":{"row":2,"column":51},"action":"insert","lines":["o"],"id":48}],[{"start":{"row":2,"column":51},"end":{"row":2,"column":52},"action":"insert","lines":["r"],"id":49}],[{"start":{"row":2,"column":52},"end":{"row":2,"column":53},"action":"insert","lines":[" "],"id":50}],[{"start":{"row":2,"column":53},"end":{"row":2,"column":54},"action":"insert","lines":["n"],"id":51}],[{"start":{"row":2,"column":54},"end":{"row":2,"column":55},"action":"insert","lines":["o"],"id":52}],[{"start":{"row":2,"column":55},"end":{"row":2,"column":56},"action":"insert","lines":["d"],"id":53}],[{"start":{"row":2,"column":56},"end":{"row":2,"column":57},"action":"insert","lines":["e"],"id":54}],[{"start":{"row":2,"column":57},"end":{"row":2,"column":58},"action":"insert","lines":[" "],"id":55}],[{"start":{"row":2,"column":58},"end":{"row":2,"column":59},"action":"insert","lines":["o"],"id":56}],[{"start":{"row":2,"column":59},"end":{"row":2,"column":60},"action":"insert","lines":["r"],"id":57}],[{"start":{"row":2,"column":60},"end":{"row":2,"column":61},"action":"insert","lines":[" "],"id":58}],[{"start":{"row":2,"column":61},"end":{"row":2,"column":62},"action":"insert","lines":["b"],"id":59}],[{"start":{"row":2,"column":62},"end":{"row":2,"column":63},"action":"insert","lines":["r"],"id":60}],[{"start":{"row":2,"column":63},"end":{"row":2,"column":64},"action":"insert","lines":["o"],"id":61}],[{"start":{"row":2,"column":64},"end":{"row":2,"column":65},"action":"insert","lines":["w"],"id":62}],[{"start":{"row":2,"column":65},"end":{"row":2,"column":66},"action":"insert","lines":["s"],"id":63}],[{"start":{"row":2,"column":66},"end":{"row":2,"column":67},"action":"insert","lines":["e"],"id":64}],[{"start":{"row":2,"column":67},"end":{"row":2,"column":68},"action":"insert","lines":["r"],"id":65}],[{"start":{"row":2,"column":68},"end":{"row":2,"column":69},"action":"insert","lines":["s"],"id":66}],[{"start":{"row":2,"column":69},"end":{"row":2,"column":70},"action":"insert","lines":["."],"id":67}],[{"start":{"row":108,"column":121},"end":{"row":109,"column":0},"action":"insert","lines":["",""],"id":68},{"start":{"row":109,"column":0},"end":{"row":109,"column":2},"action":"insert","lines":[" "]}],[{"start":{"row":109,"column":2},"end":{"row":110,"column":0},"action":"insert","lines":["",""],"id":69},{"start":{"row":110,"column":0},"end":{"row":110,"column":2},"action":"insert","lines":[" "]}],[{"start":{"row":110,"column":1},"end":{"row":110,"column":2},"action":"remove","lines":[" "],"id":70}],[{"start":{"row":110,"column":0},"end":{"row":110,"column":1},"action":"remove","lines":[" "],"id":71}],[{"start":{"row":110,"column":0},"end":{"row":110,"column":1},"action":"insert","lines":["#"],"id":72}],[{"start":{"row":110,"column":1},"end":{"row":110,"column":2},"action":"insert","lines":["#"],"id":73}],[{"start":{"row":110,"column":2},"end":{"row":110,"column":3},"action":"insert","lines":["#"],"id":74}],[{"start":{"row":110,"column":3},"end":{"row":110,"column":4},"action":"insert","lines":[" "],"id":75}],[{"start":{"row":110,"column":4},"end":{"row":110,"column":5},"action":"insert","lines":["L"],"id":76}],[{"start":{"row":110,"column":5},"end":{"row":110,"column":6},"action":"insert","lines":["i"],"id":77}],[{"start":{"row":110,"column":6},"end":{"row":110,"column":7},"action":"insert","lines":["c"],"id":78}],[{"start":{"row":110,"column":7},"end":{"row":110,"column":8},"action":"insert","lines":["e"],"id":79}],[{"start":{"row":110,"column":8},"end":{"row":110,"column":9},"action":"insert","lines":["n"],"id":80}],[{"start":{"row":110,"column":9},"end":{"row":110,"column":10},"action":"insert","lines":["s"],"id":81}],[{"start":{"row":110,"column":10},"end":{"row":110,"column":11},"action":"insert","lines":["e"],"id":82}],[{"start":{"row":110,"column":11},"end":{"row":111,"column":0},"action":"insert","lines":["",""],"id":83}],[{"start":{"row":111,"column":0},"end":{"row":112,"column":0},"action":"insert","lines":["",""],"id":84}],[{"start":{"row":112,"column":0},"end":{"row":112,"column":1},"action":"insert","lines":["M"],"id":85}],[{"start":{"row":112,"column":1},"end":{"row":112,"column":2},"action":"insert","lines":["I"],"id":86}],[{"start":{"row":112,"column":2},"end":{"row":112,"column":3},"action":"insert","lines":["T"],"id":87}],[{"start":{"row":67,"column":3},"end":{"row":67,"column":4},"action":"insert","lines":["#"],"id":88}],[{"start":{"row":75,"column":3},"end":{"row":75,"column":4},"action":"insert","lines":["#"],"id":89}],[{"start":{"row":82,"column":0},"end":{"row":82,"column":1},"action":"insert","lines":["#"],"id":90}],[{"start":{"row":89,"column":0},"end":{"row":89,"column":1},"action":"insert","lines":["#"],"id":91}],[{"start":{"row":102,"column":1},"end":{"row":102,"column":2},"action":"insert","lines":["#"],"id":92}],[{"start":{"row":77,"column":0},"end":{"row":78,"column":0},"action":"insert","lines":["",""],"id":93}],[{"start":{"row":77,"column":0},"end":{"row":78,"column":0},"action":"remove","lines":["",""],"id":95}],[{"start":{"row":0,"column":0},"end":{"row":1,"column":0},"action":"insert","lines":["",""],"id":96}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":119},"action":"insert","lines":["[![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":97}],[{"start":{"row":0,"column":119},"end":{"row":1,"column":0},"action":"insert","lines":["",""],"id":98}],[{"start":{"row":1,"column":0},"end":{"row":2,"column":0},"action":"remove","lines":["",""],"id":99}],[{"start":{"row":1,"column":0},"end":{"row":2,"column":0},"action":"insert","lines":["",""],"id":101}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":119},"action":"remove","lines":["[![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":102}],[{"start":{"row":2,"column":11},"end":{"row":2,"column":12},"action":"insert","lines":[" "],"id":103}],[{"start":{"row":2,"column":12},"end":{"row":2,"column":131},"action":"insert","lines":["[![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":104}],[{"start":{"row":2,"column":11},"end":{"row":2,"column":131},"action":"remove","lines":[" [![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":112}],[{"start":{"row":4,"column":0},"end":{"row":4,"column":1},"action":"remove","lines":[" "],"id":113}],[{"start":{"row":5,"column":0},"end":{"row":6,"column":0},"action":"insert","lines":["",""],"id":114}],[{"start":{"row":6,"column":0},"end":{"row":7,"column":0},"action":"insert","lines":["",""],"id":115}],[{"start":{"row":6,"column":0},"end":{"row":6,"column":120},"action":"insert","lines":[" [![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":116}],[{"start":{"row":6,"column":0},"end":{"row":6,"column":1},"action":"remove","lines":[" "],"id":117}],[{"start":{"row":0,"column":0},"end":{"row":1,"column":0},"action":"remove","lines":["",""],"id":118}],[{"start":{"row":0,"column":0},"end":{"row":1,"column":0},"action":"remove","lines":["",""],"id":119}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":7,"column":0},"end":{"row":7,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1452096716000,"hash":"c7af0588f0790148f0f39e677515755f24dbe192"} | ||
{"filter":false,"title":"README.md","tooltip":"/README.md","undoManager":{"mark":81,"position":81,"stack":[[{"start":{"row":4,"column":3},"end":{"row":12,"column":3},"action":"insert","lines":["Installation","","For node or browserify,","","> npm install browserify","","For a manual configuration system, grab dist/anymation.js or dist/anymation-min.js from the git repository. These export the Anymation constructor through a require.js define() if you are using it, otherwise they add the Anymation constructor to the global window object.","","## "],"id":2,"ignore":true},{"start":{"row":23,"column":17},"end":{"row":23,"column":18},"action":"remove","lines":[","]},{"start":{"row":24,"column":0},"end":{"row":27,"column":2},"action":"remove","lines":[" props: {"," x: 500"," }","};"]},{"start":{"row":24,"column":0},"end":{"row":24,"column":116},"action":"insert","lines":["}.tween(\"x\", 40, 500); // Smoothly interpolate objectToAnimate.x between 40 and 500 over the course of the animation"]},{"start":{"row":39,"column":3},"end":{"row":57,"column":0},"action":"remove","lines":["API","","### Animation(options)","","Constructor for an Animation. Calling it with the new operator is optional. The animation starts immediately.","","* options: An object specifying options:"," * object (object, required) - The object whose properties are going to get changed by the animation."," * duration (number, optional, default=1000) - Duration for animation, in milliseconds"," * props (object, optional) - Specification of what to actually animate. See below."," * onComplete (function, optional) -Function called when the animation completes"," * onCancel (function, optional) - Function called when the animation is canceled","","#### Props object","","... to be continued","","",""]},{"start":{"row":39,"column":3},"end":{"row":108,"column":121},"action":"insert","lines":["Easing functions","","Anymation doesn't provide any built-in easing functions except for the trivial linear default. Specifying an easing function from a library like [eases](https://www.npmjs.com/package/eases) is super-easy though.","","```javascript","var Animation = require(\"anymation\");","var eases = require(\"eases\");","","new Animation({"," object: someObject,"," easing: eases.elasticOut","});","```","","## API","","### Animation(options)","","Constructor for an Animation. Calling it with the new operator is optional. The animation starts immediately.","","* options: An object specifying options:"," * object (object, required) - The object whose properties are going to get changed by the animation."," * duration (number, optional, default=1000) - Duration for animation, in milliseconds"," * easing (function, optional, default=linear) - Easing function for the animation. "," * setter (function, optional) - Function called to change a property value. Signature (object, propertyName, value. The default function sets object[propertyName] = value."," * onComplete (function, optional) -Function called when the animation completes"," * onCancel (function, optional) - Function called when the animation is canceled","","## Animation.tween(propertyName, from, to) returns this Animation","","Smoothly change a numeric property between the start and end values. Shortcut for Animation.addProp(propertyName, { tween: [from, to] }).","","* propertyName (string) - Name of the property on the object","* start (number) - Starting value","* end (number) - Ending value","","## Animation.discrete(propertyName, array) returns this Animation","","Cycle a property through a specified list of values (of any type) over the course of the animation. Shortcut for Animation.addProp(propertyName, { discreteValues: array }).","","* propertyName (string) - Name of the property on the object","* array (array) - Specified values","","## Animation.fn(propertyName, fn) returns this Animation","","Animate a property using a callback function returning a value of any type. Shortcut for Animation.addProp(propertyName, { valueFn: fn});","","* propertyName (string) - Name of the property on the object","* fn (function) - a function with signature fn(t_eased) returns value, where t_eased is the eased current time. With linear easing this is 0 at the start of the animation and 1 at the end, increasing linearly in between. In general it is 0 at the start and 1 at the end, with no promises it can't be negative or greater than one in-between (in elastic easing functions for example). The function should return the desired value for the property at the given eased time.","","## Animation.addProp(propertyName, options) returns this Animation","","Animates a property during the course of the animation, specifying all options, many of which can override the animation's default options.","","* propertyName (string) - Name of the property on the object","* options (object):"," * object (object, optional, default=this.options.object) - The object whose property is to be changed."," * easing (function, optional, default=this.options.easing) - Easing function for this property. "," * setter (function, optional, default=this.options.setter) - Function called to change this property value. Signature (object, propertyName, value. The default function sets object[propertyName] = value."," * tween (array[number], optional) - see Animation.tween()"," * discreteValues (array, optional) - see Animation.discrete()"," * valueFn (function, optional) - see Animation.fn()",""," ## Animation.update(timeNow) returns boolean",""," Updates all animated properties. Generally no need to pass the timeNow parameter. ",""," * timeNow (number, optional, default=current system time in milliseconds)",""," Returns false if the animation is done (if timeNow >= the animation start time + the animation duration) otherwise true"]}],[{"start":{"row":102,"column":1},"end":{"row":102,"column":2},"action":"remove","lines":[" "],"id":3}],[{"start":{"row":102,"column":0},"end":{"row":102,"column":1},"action":"remove","lines":[" "],"id":4}],[{"start":{"row":55,"column":3},"end":{"row":55,"column":4},"action":"insert","lines":["#"],"id":5}],[{"start":{"row":67,"column":2},"end":{"row":67,"column":3},"action":"insert","lines":["#"],"id":6}],[{"start":{"row":75,"column":2},"end":{"row":75,"column":3},"action":"insert","lines":["#"],"id":7}],[{"start":{"row":82,"column":2},"end":{"row":82,"column":3},"action":"insert","lines":["#"],"id":8}],[{"start":{"row":89,"column":2},"end":{"row":89,"column":3},"action":"insert","lines":["#"],"id":9}],[{"start":{"row":102,"column":2},"end":{"row":102,"column":3},"action":"insert","lines":["#"],"id":10}],[{"start":{"row":53,"column":2},"end":{"row":53,"column":3},"action":"insert","lines":["#"],"id":11}],[{"start":{"row":39,"column":2},"end":{"row":39,"column":3},"action":"insert","lines":["#"],"id":12}],[{"start":{"row":12,"column":2},"end":{"row":12,"column":3},"action":"insert","lines":["#"],"id":13}],[{"start":{"row":4,"column":2},"end":{"row":4,"column":3},"action":"insert","lines":["#"],"id":14}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":1},"action":"insert","lines":["#"],"id":15}],[{"start":{"row":0,"column":1},"end":{"row":0,"column":2},"action":"remove","lines":["#"],"id":16}],[{"start":{"row":2,"column":0},"end":{"row":2,"column":1},"action":"remove","lines":[">"],"id":17}],[{"start":{"row":6,"column":12},"end":{"row":6,"column":22},"action":"remove","lines":["browserify"],"id":45},{"start":{"row":6,"column":12},"end":{"row":6,"column":48},"action":"insert","lines":["[browserify](http://browserify.org/)"]}],[{"start":{"row":2,"column":48},"end":{"row":2,"column":129},"action":"remove","lines":[". Currently works in node or in browsers w/ [browserify](http://browserify.org/)."],"id":46},{"start":{"row":2,"column":48},"end":{"row":2,"column":49},"action":"insert","lines":[" "]}],[{"start":{"row":2,"column":49},"end":{"row":2,"column":50},"action":"insert","lines":["f"],"id":47}],[{"start":{"row":2,"column":50},"end":{"row":2,"column":51},"action":"insert","lines":["o"],"id":48}],[{"start":{"row":2,"column":51},"end":{"row":2,"column":52},"action":"insert","lines":["r"],"id":49}],[{"start":{"row":2,"column":52},"end":{"row":2,"column":53},"action":"insert","lines":[" "],"id":50}],[{"start":{"row":2,"column":53},"end":{"row":2,"column":54},"action":"insert","lines":["n"],"id":51}],[{"start":{"row":2,"column":54},"end":{"row":2,"column":55},"action":"insert","lines":["o"],"id":52}],[{"start":{"row":2,"column":55},"end":{"row":2,"column":56},"action":"insert","lines":["d"],"id":53}],[{"start":{"row":2,"column":56},"end":{"row":2,"column":57},"action":"insert","lines":["e"],"id":54}],[{"start":{"row":2,"column":57},"end":{"row":2,"column":58},"action":"insert","lines":[" "],"id":55}],[{"start":{"row":2,"column":58},"end":{"row":2,"column":59},"action":"insert","lines":["o"],"id":56}],[{"start":{"row":2,"column":59},"end":{"row":2,"column":60},"action":"insert","lines":["r"],"id":57}],[{"start":{"row":2,"column":60},"end":{"row":2,"column":61},"action":"insert","lines":[" "],"id":58}],[{"start":{"row":2,"column":61},"end":{"row":2,"column":62},"action":"insert","lines":["b"],"id":59}],[{"start":{"row":2,"column":62},"end":{"row":2,"column":63},"action":"insert","lines":["r"],"id":60}],[{"start":{"row":2,"column":63},"end":{"row":2,"column":64},"action":"insert","lines":["o"],"id":61}],[{"start":{"row":2,"column":64},"end":{"row":2,"column":65},"action":"insert","lines":["w"],"id":62}],[{"start":{"row":2,"column":65},"end":{"row":2,"column":66},"action":"insert","lines":["s"],"id":63}],[{"start":{"row":2,"column":66},"end":{"row":2,"column":67},"action":"insert","lines":["e"],"id":64}],[{"start":{"row":2,"column":67},"end":{"row":2,"column":68},"action":"insert","lines":["r"],"id":65}],[{"start":{"row":2,"column":68},"end":{"row":2,"column":69},"action":"insert","lines":["s"],"id":66}],[{"start":{"row":2,"column":69},"end":{"row":2,"column":70},"action":"insert","lines":["."],"id":67}],[{"start":{"row":108,"column":121},"end":{"row":109,"column":0},"action":"insert","lines":["",""],"id":68},{"start":{"row":109,"column":0},"end":{"row":109,"column":2},"action":"insert","lines":[" "]}],[{"start":{"row":109,"column":2},"end":{"row":110,"column":0},"action":"insert","lines":["",""],"id":69},{"start":{"row":110,"column":0},"end":{"row":110,"column":2},"action":"insert","lines":[" "]}],[{"start":{"row":110,"column":1},"end":{"row":110,"column":2},"action":"remove","lines":[" "],"id":70}],[{"start":{"row":110,"column":0},"end":{"row":110,"column":1},"action":"remove","lines":[" "],"id":71}],[{"start":{"row":110,"column":0},"end":{"row":110,"column":1},"action":"insert","lines":["#"],"id":72}],[{"start":{"row":110,"column":1},"end":{"row":110,"column":2},"action":"insert","lines":["#"],"id":73}],[{"start":{"row":110,"column":2},"end":{"row":110,"column":3},"action":"insert","lines":["#"],"id":74}],[{"start":{"row":110,"column":3},"end":{"row":110,"column":4},"action":"insert","lines":[" "],"id":75}],[{"start":{"row":110,"column":4},"end":{"row":110,"column":5},"action":"insert","lines":["L"],"id":76}],[{"start":{"row":110,"column":5},"end":{"row":110,"column":6},"action":"insert","lines":["i"],"id":77}],[{"start":{"row":110,"column":6},"end":{"row":110,"column":7},"action":"insert","lines":["c"],"id":78}],[{"start":{"row":110,"column":7},"end":{"row":110,"column":8},"action":"insert","lines":["e"],"id":79}],[{"start":{"row":110,"column":8},"end":{"row":110,"column":9},"action":"insert","lines":["n"],"id":80}],[{"start":{"row":110,"column":9},"end":{"row":110,"column":10},"action":"insert","lines":["s"],"id":81}],[{"start":{"row":110,"column":10},"end":{"row":110,"column":11},"action":"insert","lines":["e"],"id":82}],[{"start":{"row":110,"column":11},"end":{"row":111,"column":0},"action":"insert","lines":["",""],"id":83}],[{"start":{"row":111,"column":0},"end":{"row":112,"column":0},"action":"insert","lines":["",""],"id":84}],[{"start":{"row":112,"column":0},"end":{"row":112,"column":1},"action":"insert","lines":["M"],"id":85}],[{"start":{"row":112,"column":1},"end":{"row":112,"column":2},"action":"insert","lines":["I"],"id":86}],[{"start":{"row":112,"column":2},"end":{"row":112,"column":3},"action":"insert","lines":["T"],"id":87}],[{"start":{"row":67,"column":3},"end":{"row":67,"column":4},"action":"insert","lines":["#"],"id":88}],[{"start":{"row":75,"column":3},"end":{"row":75,"column":4},"action":"insert","lines":["#"],"id":89}],[{"start":{"row":82,"column":0},"end":{"row":82,"column":1},"action":"insert","lines":["#"],"id":90}],[{"start":{"row":89,"column":0},"end":{"row":89,"column":1},"action":"insert","lines":["#"],"id":91}],[{"start":{"row":102,"column":1},"end":{"row":102,"column":2},"action":"insert","lines":["#"],"id":92}],[{"start":{"row":77,"column":0},"end":{"row":78,"column":0},"action":"insert","lines":["",""],"id":93}],[{"start":{"row":77,"column":0},"end":{"row":78,"column":0},"action":"remove","lines":["",""],"id":95}],[{"start":{"row":0,"column":0},"end":{"row":1,"column":0},"action":"insert","lines":["",""],"id":96}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":119},"action":"insert","lines":["[![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":97}],[{"start":{"row":0,"column":119},"end":{"row":1,"column":0},"action":"insert","lines":["",""],"id":98}],[{"start":{"row":1,"column":0},"end":{"row":2,"column":0},"action":"remove","lines":["",""],"id":99}],[{"start":{"row":1,"column":0},"end":{"row":2,"column":0},"action":"insert","lines":["",""],"id":101}],[{"start":{"row":0,"column":0},"end":{"row":0,"column":119},"action":"remove","lines":["[![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":102}],[{"start":{"row":2,"column":11},"end":{"row":2,"column":12},"action":"insert","lines":[" "],"id":103}],[{"start":{"row":2,"column":12},"end":{"row":2,"column":131},"action":"insert","lines":["[![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":104}],[{"start":{"row":2,"column":11},"end":{"row":2,"column":131},"action":"remove","lines":[" [![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":112}],[{"start":{"row":4,"column":0},"end":{"row":4,"column":1},"action":"remove","lines":[" "],"id":113}],[{"start":{"row":5,"column":0},"end":{"row":6,"column":0},"action":"insert","lines":["",""],"id":114}],[{"start":{"row":6,"column":0},"end":{"row":7,"column":0},"action":"insert","lines":["",""],"id":115}],[{"start":{"row":6,"column":0},"end":{"row":6,"column":120},"action":"insert","lines":[" [![Build Status](https://travis-ci.org/scottglz/anymation.svg?branch=master)](https://travis-ci.org/scottglz/anymation)"],"id":116}],[{"start":{"row":6,"column":0},"end":{"row":6,"column":1},"action":"remove","lines":[" "],"id":117}],[{"start":{"row":0,"column":0},"end":{"row":1,"column":0},"action":"remove","lines":["",""],"id":118}],[{"start":{"row":0,"column":0},"end":{"row":1,"column":0},"action":"remove","lines":["",""],"id":119}]]},"ace":{"folds":[],"scrolltop":424,"scrollleft":0,"selection":{"start":{"row":7,"column":0},"end":{"row":7,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":23,"state":"jscode-start","mode":"ace/mode/markdown"}},"timestamp":1452096716000,"hash":"c7af0588f0790148f0f39e677515755f24dbe192"} |
16
index.js
@@ -15,6 +15,7 @@ 'use strict'; | ||
function updateProp(name, options, t) { | ||
function updateProp(options, t) { | ||
var obj = options.object, | ||
setter = options.setter, | ||
teased = options.easing(t); | ||
teased = options.easing(t), | ||
name = options.propName; | ||
if (options.discreteValues) { | ||
@@ -57,3 +58,3 @@ // step values | ||
this.startTime = now(); | ||
this.props = Object.create(null); | ||
this.props = []; | ||
} | ||
@@ -70,3 +71,4 @@ | ||
this.props[name] = fullOptions; | ||
fullOptions.propName = name; | ||
this.props.push(fullOptions); | ||
return this; | ||
@@ -93,5 +95,5 @@ }, | ||
var props = this.props; | ||
for (var key in props) { | ||
updateProp(key, props[key], t); | ||
var props = this.props, len = props.length; | ||
for (var i=0; i < len; i++) { | ||
updateProp(props[i], t); | ||
} | ||
@@ -98,0 +100,0 @@ |
{ | ||
"name": "anymation", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Simple & easy animation/tweener", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42409
19
92