Skip to content

Commit d66c087

Browse files
committed
Updated NEXT libs and docs
1 parent 2bf64f7 commit d66c087

File tree

7 files changed

+83
-28
lines changed

7 files changed

+83
-28
lines changed

VERSIONS.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
Version NEXT [not yet released]
1+
Version 1.0.0 (September 14, 2017)
22
****************************************************************************************************
33
CRITICAL (may break existing content):
4-
54
- Plugin model has changed significantly. See SamplePlugin for information.
65
- Second param of Tween/Timeline.setPosition() is now runActions boolean
76
- Removed Tween.NONE, Tween.LOOP, and Tween.REVERSE constants
@@ -17,6 +16,8 @@ DEPRECATED (will break in the future):
1716
- to make a tween loop continuously, you should now use loop:-1, instead of loop:true
1817
- setPaused deprecated in favor of paused getter / setter
1918
- getCurrentLabel deprecated in favor of currentLabel getter / setter
19+
- Deprecated get/set methods are now protect with an underscore (eg _setEnabled)
20+
The deprecated methods and properties will still work, but will display a console warning when used.
2021

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

4547

4648
Version 0.6.2 [November 26, 2015]

_assets/libs/easeljs-NEXT.min.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "TweenJS",
3-
"version": "0.6.2",
3+
"version": "1.0.0",
44
"homepage": "https://github.com/CreateJS/TweenJS",
55
"authors": [
66
"gskinner",
77
"lannymcnie",
88
"wdamien"
99
],
1010
"description": "A simple but powerful tweening / animation library for Javascript. Part of the CreateJS suite of libraries.",
11-
"main": "lib/tweenjs-0.6.2.combined.js",
11+
"main": "lib/tweenjs-1.0.0.combined.js",
1212
"keywords": [
1313
"tween",
1414
"tweening",

build/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "TweenJS",
3-
"version": "0.6.2",
3+
"version": "1.0.0",
44
"description": "TweenJS Docs",
55
"url": "http://www.createjs.com/tweenjs",
66
"logo": "assets/docs-icon-TweenJS.png",

docs/TweenJS_docs-NEXT.zip

3.69 KB
Binary file not shown.

lib/tweenjs-NEXT.combined.js

Lines changed: 70 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,48 @@ createjs.promote = function(subclass, prefix) {
123123
return subclass;
124124
};
125125

126+
//##############################################################################
127+
// deprecate.js
128+
//##############################################################################
129+
130+
this.createjs = this.createjs||{};
131+
132+
/**
133+
* @class Utility Methods
134+
*/
135+
136+
/**
137+
* Wraps deprecated methods so they still be used, but throw warnings to developers.
138+
*
139+
* obj.deprecatedMethod = createjs.deprecate("Old Method Name", obj._fallbackMethod);
140+
*
141+
* The recommended approach for deprecated properties is:
142+
*
143+
* try {
144+
* Obj ect.defineProperties(object, {
145+
* readyOnlyProp: { get: createjs.deprecate("readOnlyProp", function() { return this.alternateProp; }) },
146+
* readWriteProp: {
147+
* get: createjs.deprecate("readOnlyProp", function() { return this.alternateProp; }),
148+
* set: createjs.deprecate("readOnlyProp", function(val) { this.alternateProp = val; })
149+
* });
150+
* } catch (e) {}
151+
*
152+
* @method deprecate
153+
* @param {Function} [fallbackMethod=null] A method to call when the deprecated method is used. See the example for how
154+
* @param {String} [name=null] The name of the method or property to display in the console warning.
155+
* to deprecate properties.
156+
* @return {Function} If a fallbackMethod is supplied, returns a closure that will call the fallback method after
157+
* logging the warning in the console.
158+
*/
159+
createjs.deprecate = function(fallbackMethod, name) {
160+
"use strict";
161+
return function() {
162+
var msg = "Deprecated property or method '"+name+"'. See docs for info.";
163+
console && (console.warn ? console.warn(msg) : console.log(msg));
164+
return fallbackMethod && fallbackMethod.apply(this, arguments);
165+
}
166+
};
167+
126168
//##############################################################################
127169
// Event.js
128170
//##############################################################################
@@ -834,8 +876,8 @@ this.createjs = this.createjs||{};
834876
// public static properties:
835877
/**
836878
* Specifies the timing api (setTimeout or requestAnimationFrame) and mode to use. See
837-
* {{#crossLink "Ticker/TIMEOUT"}}{{/crossLink}}, {{#crossLink "Ticker/RAF"}}{{/crossLink}}, and
838-
* {{#crossLink "Ticker/RAF_SYNCHED"}}{{/crossLink}} for mode details.
879+
* {{#crossLink "Ticker/TIMEOUT:property"}}{{/crossLink}}, {{#crossLink "Ticker/RAF:property"}}{{/crossLink}}, and
880+
* {{#crossLink "Ticker/RAF_SYNCHED:property"}}{{/crossLink}} for mode details.
839881
* @property timingMode
840882
* @static
841883
* @type {String}
@@ -1007,6 +1049,8 @@ this.createjs = this.createjs||{};
10071049
if (!Ticker._inited) { return; }
10081050
Ticker._setupTick();
10091051
};
1052+
// Ticker.setInterval is @deprecated. Remove for 1.1+
1053+
Ticker.setInterval = createjs.deprecate(Ticker._setInterval, "Ticker.setInterval");
10101054

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

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

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

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

14961546
/**
1497-
* Deprecated in favor of the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property.
1498-
* @method setPaused
1547+
* Use the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property instead.
1548+
* @method _setPaused
14991549
* @param {Boolean} [value=true] Indicates whether the tween should be paused (`true`) or played (`false`).
1500-
* @deprecated
15011550
* @return {AbstractTween} This tween instance (for chaining calls)
1551+
* @protected
15021552
* @chainable
15031553
*/
1504-
p.setPaused = function(value) {
1554+
p._setPaused = function(value) {
15051555
createjs.Tween._register(this, value);
15061556
return this;
15071557
};
1558+
p.setPaused = createjs.deprecate(p._setPaused, "AbstractTween.setPaused");
15081559

15091560
/**
1510-
* Deprecated in favor of the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property.
1511-
* @method getPaused
1512-
* @deprecated
1561+
* Use the {{#crossLink "AbstractTween/paused:property"}}{{/crossLink}} property instead.
1562+
* @method _getPaused
1563+
* @protected
15131564
*/
1514-
p.getPaused = function() {
1565+
p._getPaused = function() {
15151566
return this._paused;
15161567
};
1568+
p.getPaused = createjs.deprecate(p._getPaused, "AbstactTween.getPaused");
15171569

15181570
/**
1519-
* Deprecated in favor of the {{#crossLink "AbstractTween/currentLabel:property"}}{{/crossLink}} property.
1520-
* @method getCurrentLabel
1521-
* @deprecated
1571+
* Use the {{#crossLink "AbstractTween/currentLabel:property"}}{{/crossLink}} property instead.
1572+
* @method _getCurrentLabel
1573+
* @protected
15221574
* @return {String} The name of the current label or null if there is no label
15231575
**/
1524-
p.getCurrentLabel = function(pos) {
1576+
p._getCurrentLabel = function(pos) {
15251577
var labels = this.getLabels();
15261578
if (pos == null) { pos = this.position; }
15271579
for (var i = 0, l = labels.length; i<l; i++) { if (pos < labels[i].position) { break; } }
15281580
return (i===0) ? null : labels[i-1].label;
15291581
};
1582+
p.getCurrentLabel = createjs.deprecate(p._getCurrentLabel, "AbstractTween.getCurrentLabel");
15301583

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

15531606
try {
15541607
Object.defineProperties(p, {
1555-
paused: { set: p.setPaused, get: p.getPaused },
1556-
currentLabel: { get: p.getCurrentLabel }
1608+
paused: { set: p._setPaused, get: p._getPaused },
1609+
currentLabel: { get: p._getCurrentLabel }
15571610
});
15581611
} catch (e) {}
15591612

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

37803833
})();

lib/tweenjs-NEXT.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)