Skip to content

Commit 8aabcda

Browse files
authored
Merge pull request #3412 from pandamicro/legend
Sync improvements made in legend project
2 parents 59373d2 + efdd358 commit 8aabcda

File tree

158 files changed

+9431
-10108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+9431
-10108
lines changed

Diff for: CCBoot.js

+179-253
Large diffs are not rendered by default.

Diff for: cocos2d/actions/CCAction.js

+72-72
Large diffs are not rendered by default.

Diff for: cocos2d/actions/CCActionCatmullRom.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@
4444
* @param {cc.Point} p3
4545
* @param {Number} tension
4646
* @param {Number} t
47+
* @param {cc.Point} [out]
4748
* @return {cc.Point}
4849
*/
49-
cc.cardinalSplineAt = function (p0, p1, p2, p3, tension, t) {
50+
cc.cardinalSplineAt = function (p0, p1, p2, p3, tension, t, out) {
5051
var t2 = t * t;
5152
var t3 = t2 * t;
5253

@@ -62,7 +63,13 @@ cc.cardinalSplineAt = function (p0, p1, p2, p3, tension, t) {
6263

6364
var x = (p0.x * b1 + p1.x * b2 + p2.x * b3 + p3.x * b4);
6465
var y = (p0.y * b1 + p1.y * b2 + p2.y * b3 + p3.y * b4);
65-
return cc.p(x, y);
66+
if (out !== undefined) {
67+
out.x = x;
68+
out.y = y;
69+
}
70+
else {
71+
return cc.p(x, y);
72+
}
6673
};
6774

6875
/**

0 commit comments

Comments
 (0)