Skip to content

Commit

Permalink
Updated NEXT libs and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lannymcnie committed Sep 14, 2017
1 parent 2bf64f7 commit d66c087
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 28 deletions.
8 changes: 5 additions & 3 deletions VERSIONS.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Version NEXT [not yet released]
Version 1.0.0 (September 14, 2017)
****************************************************************************************************
CRITICAL (may break existing content):

- Plugin model has changed significantly. See SamplePlugin for information.
- Second param of Tween/Timeline.setPosition() is now runActions boolean
- Removed Tween.NONE, Tween.LOOP, and Tween.REVERSE constants
Expand All @@ -17,6 +16,8 @@ DEPRECATED (will break in the future):
- to make a tween loop continuously, you should now use loop:-1, instead of loop:true
- setPaused deprecated in favor of paused getter / setter
- getCurrentLabel deprecated in favor of currentLabel getter / setter
- Deprecated get/set methods are now protect with an underscore (eg _setEnabled)
The deprecated methods and properties will still work, but will display a console warning when used.

*****
OTHER:
Expand All @@ -40,7 +41,8 @@ OTHER:
- added callback param to setPosition for MovieClip use
- fixed a bug with Tween.set()
- unit tests made somewhat more robust
- removed old deprecated properties
- added a shared createjs.deprecate() method, which wraps old methods and property getter/setters to display
a console warning when used.


Version 0.6.2 [November 26, 2015]
Expand Down
8 changes: 4 additions & 4 deletions _assets/libs/easeljs-NEXT.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "TweenJS",
"version": "0.6.2",
"version": "1.0.0",
"homepage": "https://github.com/CreateJS/TweenJS",
"authors": [
"gskinner",
"lannymcnie",
"wdamien"
],
"description": "A simple but powerful tweening / animation library for Javascript. Part of the CreateJS suite of libraries.",
"main": "lib/tweenjs-0.6.2.combined.js",
"main": "lib/tweenjs-1.0.0.combined.js",
"keywords": [
"tween",
"tweening",
Expand Down
2 changes: 1 addition & 1 deletion build/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TweenJS",
"version": "0.6.2",
"version": "1.0.0",
"description": "TweenJS Docs",
"url": "http://www.createjs.com/tweenjs",
"logo": "assets/docs-icon-TweenJS.png",
Expand Down
Binary file modified docs/TweenJS_docs-NEXT.zip
Binary file not shown.
87 changes: 70 additions & 17 deletions lib/tweenjs-NEXT.combined.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,48 @@ createjs.promote = function(subclass, prefix) {
return subclass;
};

//##############################################################################
// deprecate.js
//##############################################################################

this.createjs = this.createjs||{};

/**
* @class Utility Methods
*/

/**
* Wraps deprecated methods so they still be used, but throw warnings to developers.
*
* obj.deprecatedMethod = createjs.deprecate("Old Method Name", obj._fallbackMethod);
*
* The recommended approach for deprecated properties is:
*
* try {
* Obj ect.defineProperties(object, {
* readyOnlyProp: { get: createjs.deprecate("readOnlyProp", function() { return this.alternateProp; }) },
* readWriteProp: {
* get: createjs.deprecate("readOnlyProp", function() { return this.alternateProp; }),
* set: createjs.deprecate("readOnlyProp", function(val) { this.alternateProp = val; })
* });
* } catch (e) {}
*
* @method deprecate
* @param {Function} [fallbackMethod=null] A method to call when the deprecated method is used. See the example for how
* @param {String} [name=null] The name of the method or property to display in the console warning.
* to deprecate properties.
* @return {Function} If a fallbackMethod is supplied, returns a closure that will call the fallback method after
* logging the warning in the console.
*/
createjs.deprecate = function(fallbackMethod, name) {
"use strict";
return function() {
var msg = "Deprecated property or method '"+name+"'. See docs for info.";
console && (console.warn ? console.warn(msg) : console.log(msg));
return fallbackMethod && fallbackMethod.apply(this, arguments);
}
};

//##############################################################################
// Event.js
//##############################################################################
Expand Down Expand Up @@ -834,8 +876,8 @@ this.createjs = this.createjs||{};
// public static properties:
/**
* Specifies the timing api (setTimeout or requestAnimationFrame) and mode to use. See
* {{#crossLink "Ticker/TIMEOUT"}}{{/crossLink}}, {{#crossLink "Ticker/RAF"}}{{/crossLink}}, and
* {{#crossLink "Ticker/RAF_SYNCHED"}}{{/crossLink}} for mode details.
* {{#crossLink "Ticker/TIMEOUT:property"}}{{/crossLink}}, {{#crossLink "Ticker/RAF:property"}}{{/crossLink}}, and
* {{#crossLink "Ticker/RAF_SYNCHED:property"}}{{/crossLink}} for mode details.
* @property timingMode
* @static
* @type {String}
Expand Down Expand Up @@ -1007,6 +1049,8 @@ this.createjs = this.createjs||{};
if (!Ticker._inited) { return; }
Ticker._setupTick();
};
// Ticker.setInterval is @deprecated. Remove for 1.1+
Ticker.setInterval = createjs.deprecate(Ticker._setInterval, "Ticker.setInterval");

/**
* Use the {{#crossLink "Ticker/interval:property"}}{{/crossLink}} property instead.
Expand All @@ -1018,6 +1062,8 @@ this.createjs = this.createjs||{};
Ticker._getInterval = function() {
return Ticker._interval;
};
// Ticker.getInterval is @deprecated. Remove for 1.1+
Ticker.getInterval = createjs.deprecate(Ticker._getInterval, "Ticker.getInterval");

/**
* Use the {{#crossLink "Ticker/framerate:property"}}{{/crossLink}} property instead.
Expand All @@ -1029,6 +1075,8 @@ this.createjs = this.createjs||{};
Ticker._setFPS = function(value) {
Ticker._setInterval(1000/value);
};
// Ticker.setFPS is @deprecated. Remove for 1.1+
Ticker.setFPS = createjs.deprecate(Ticker._setFPS, "Ticker.setFPS");

/**
* Use the {{#crossLink "Ticker/framerate:property"}}{{/crossLink}} property instead.
Expand All @@ -1040,6 +1088,8 @@ this.createjs = this.createjs||{};
Ticker._getFPS = function() {
return 1000/Ticker._interval;
};
// Ticker.getFPS is @deprecated. Remove for 1.1+
Ticker.getFPS = createjs.deprecate(Ticker._getFPS, "Ticker.getFPS");

/**
* Indicates the target time (in milliseconds) between ticks. Default is 50 (20 FPS).
Expand Down Expand Up @@ -1494,39 +1544,42 @@ this.createjs = this.createjs||{};
// getter / setters:

/**
* Deprecated in favor of the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property.
* @method setPaused
* Use the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property instead.
* @method _setPaused
* @param {Boolean} [value=true] Indicates whether the tween should be paused (`true`) or played (`false`).
* @deprecated
* @return {AbstractTween} This tween instance (for chaining calls)
* @protected
* @chainable
*/
p.setPaused = function(value) {
p._setPaused = function(value) {
createjs.Tween._register(this, value);
return this;
};
p.setPaused = createjs.deprecate(p._setPaused, "AbstractTween.setPaused");

/**
* Deprecated in favor of the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property.
* @method getPaused
* @deprecated
* Use the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property instead.
* @method _getPaused
* @protected
*/
p.getPaused = function() {
p._getPaused = function() {
return this._paused;
};
p.getPaused = createjs.deprecate(p._getPaused, "AbstactTween.getPaused");

/**
* Deprecated in favor of the {{#crossLink "AbstractTween/currentLabel:property"}}{{/crossLink}} property.
* @method getCurrentLabel
* @deprecated
* Use the {{#crossLink "AbstractTween/currentLabel:property"}}{{/crossLink}} property instead.
* @method _getCurrentLabel
* @protected
* @return {String} The name of the current label or null if there is no label
**/
p.getCurrentLabel = function(pos) {
p._getCurrentLabel = function(pos) {
var labels = this.getLabels();
if (pos == null) { pos = this.position; }
for (var i = 0, l = labels.length; i<l; i++) { if (pos < labels[i].position) { break; } }
return (i===0) ? null : labels[i-1].label;
};
p.getCurrentLabel = createjs.deprecate(p._getCurrentLabel, "AbstractTween.getCurrentLabel");

/**
* Pauses or unpauses the tween. A paused tween is removed from the global registry and is eligible for garbage
Expand All @@ -1552,8 +1605,8 @@ this.createjs = this.createjs||{};

try {
Object.defineProperties(p, {
paused: { set: p.setPaused, get: p.getPaused },
currentLabel: { get: p.getCurrentLabel }
paused: { set: p._setPaused, get: p._getPaused },
currentLabel: { get: p._getCurrentLabel }
});
} catch (e) {}

Expand Down Expand Up @@ -3775,6 +3828,6 @@ this.createjs = this.createjs || {};
* @type String
* @static
**/
s.buildDate = /*=date*/"Wed, 21 Jun 2017 16:57:37 GMT"; // injected by build process
s.buildDate = /*=date*/"Thu, 14 Sep 2017 22:19:45 GMT"; // injected by build process

})();
2 changes: 1 addition & 1 deletion lib/tweenjs-NEXT.min.js

Large diffs are not rendered by default.

0 comments on commit d66c087

Please sign in to comment.