Skip to content

Commit bcfda75

Browse files
committed
Merge pull request #890 from pandamicro/develop
[3.1 release] Add docs and update h5 engine
2 parents 43a4266 + 634d0f3 commit bcfda75

File tree

13 files changed

+99
-34
lines changed

13 files changed

+99
-34
lines changed

CHANGELOG

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
ChangeLog:
22

3+
Cocos2d-JS v3.1 @ Oct.22, 2014
4+
5+
* Released Facebook Integration for Cocos2d-JS v1.0, all APIs have been significantly polished and stabilized. Improved test cases for Facebook with more features demonstrated.
6+
* Upgraded Cocos2d-x to v3.3 rc0
7+
* Supported Cocos Studio v2.0 including Timeline animation support and proto buffers format support for both web engine and JSB engine.
8+
* Refactored load event of texture, sprite frame and sprite for better maintainability.
9+
* Refactored `cc.rendererCanvas` for improving performance.
10+
* Moved the `CC_Texture0` definition of fragment shader to cc.GLProgram to ensure compatibility with JSB.
11+
* Added normalized position functions to cc.Node.
12+
* Refactored the constructor of Cocos Studio's classes and deprecated all create functions.
13+
* Refactored Cocos Studio reader for better maintainability.
14+
* Improved Facebook SDK.
15+
* Modified `cc.ProgressTo`'s behavior, its progression didn't reset to zero when the progression is 100.
16+
* Changed `ccui.Widget`'s default anchor point to (0, 0) in widget reader.
17+
* Removed all deprecated create function usage in engine and in the test cases.
18+
* [JSB] Refactor `cc.GLNode` for new renderer and re-enable OpenGL test case.
19+
20+
* Bug fixes:
21+
1. Fixed an issue of `cc.UILayout` that its scissor mode didn't work.
22+
2. Fixed an issue of `ccui.TextBMFont` that its 'string' property setting was incorrect.
23+
3. Fixed an issue of `cc.DrawNode` that its element's position was incorrect in Canvas mode.
24+
4. Fixed an issue of `cc.Layer` that its bake function didn't work in new renderer.
25+
5. Fixed an issue of `cc.Scale9Sprite` that its cached canvas size was incorrect.
26+
6. Fixed an issue of `cc.Director` that its position was incorrect when calling `setProjection` in new renderer.
27+
7. Fixed an issue of `cc.view` that the reinitialization logic of frame size was incorrect.
28+
8. Fixed incorrect usage of `cc.progressTo` in progress action test.
29+
9. Fixed an issue of CocosNodeTest for the new renderer.
30+
10. Fixed minor issues in test cases.
31+
11. [JSB] Fixed an issue of `cc.EditBox`'s constructor.
32+
12. [JSB] Refactored an issue that `ccui.CheckBox`'s deprecated function `setSelectedState` is used instead of `setSelected`.
33+
13. [JSB] Fixed an issue of `cc.ScrollView`'s constructor.
34+
14. [JSB] Fixed an issue in Moon Warriors sample that a label's height was too small so it was cutting off its content.
35+
15. [JSB] Fixed user object conflict in `ccui.Widget`'s `addTouchEventListener` function binding.
36+
16. [JSB] Fixed an issue that null parameter was not correctly processed in `ccs.ArmatureAnimations`'s `setFrameEventCallFunc` and `setMovementEventCallFunc` functions.
37+
17. [JSB] Fixed an issue that `cc.Scale9Sprite`'s `updateWithBatchNode` had been deprecated in JSB.
38+
18. [JSB] Fixed an issue that `cc.SpriteBatchNode` could not be extended in JSB.
39+
19. [JSB] Fixed an issue that Cocos Studio extension classes could not be extended in JSB.
40+
20. [JSB] Fixed API inconsistency issues by renaming `cc.Node`'s `getRotationSkewX/Y` and `setRotationSkewX/Y` to `getRotationX/Y` and `setRotationX/Y`.
41+
42+
* Known Issues:
43+
1. `jsb.AssetsManager` doesn't work on windows due to a bug in libcurl
44+
345
Cocos2d-JS v3.1 beta @ Oct.13, 2014
446

547
* Refactoration of the web engine with new renderer on the architecture level, optimization is under going.

build/cocos2d_jsb_samples.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,6 +1432,7 @@
14321432
SDKROOT = iphoneos;
14331433
TARGETED_DEVICE_FAMILY = "1,2";
14341434
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../frameworks/js-bindings/external/spidermonkey/include/ios";
1435+
VALID_ARCHS = "arm64 armv7";
14351436
};
14361437
name = Debug;
14371438
};
@@ -1460,6 +1461,7 @@
14601461
TARGETED_DEVICE_FAMILY = "1,2";
14611462
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../frameworks/js-bindings/external/spidermonkey/include/ios";
14621463
VALIDATE_PRODUCT = YES;
1464+
VALID_ARCHS = "arm64 armv7";
14631465
};
14641466
name = Release;
14651467
};
@@ -1493,6 +1495,7 @@
14931495
SDKROOT = iphoneos;
14941496
TARGETED_DEVICE_FAMILY = "1,2";
14951497
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../frameworks/js-bindings/external/spidermonkey/include/ios $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/plugin/jsbindings/manual";
1498+
VALID_ARCHS = "arm64 armv7";
14961499
};
14971500
name = Debug;
14981501
};
@@ -1526,6 +1529,7 @@
15261529
TARGETED_DEVICE_FAMILY = "1,2";
15271530
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../frameworks/js-bindings/external/spidermonkey/include/ios $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../frameworks/js-bindings/cocos2d-x/plugin/jsbindings/manual";
15281531
VALIDATE_PRODUCT = YES;
1532+
VALID_ARCHS = "arm64 armv7";
15291533
};
15301534
name = Release;
15311535
};

docs/release-note-v3.1-beta.md renamed to docs/release-note-v3.1.md

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
# Cocos2d-JS v3.1 Beta release note
1+
# Cocos2d-JS v3.1 release note
22

33
<img src="http://www.cocos2d-x.org/attachments/download/1508" height=180>
44

55
Cocos2d-JS is Cocos2d-x engine's JavaScript version that includes Cocos2d-html5 and Cocos2d-x JavaScript Bindings. It equips your game with cross-browser and cross-platform abilities, accompanied by full Cocos2d-x features and simplified JavaScript friendly APIs.
66

77
Cocos2d-JS reinvented workflows for all platforms in v3.x, it provides a consistent development experience for whichever platform you want to distribute to, no matter web and native. "Code once, run everywhere" is incredibly easy and natural in Cocos2d-JS. With one single JavaScript code base, you can run your game on all web browsers and native platforms including Mac OS, Windows, iOS and Android. This will bring your game great opportunities in almost all channels of distribution. On the other hand, if you are only interested in casual games on the web, you can embed directly in your web page the Cocos2d-JS Lite Version which is extremely easy to use and light as a feather.
88

9-
Furthermore, JavaScript friendly APIs make your game development experience a breeze - easy to code, test and distribute. In the meantime, Cocos2d-JS v3.x is super powerful along with all these cool new features: Editors Support, Assets Manager, Object Pool, JS to Objective-C/JAVA reflection, etc.
9+
In addition, Cocos2d-JS v3.x is super powerful along with all these cool new features: Editors Support, Assets Manager, Object Pool, JS to Objective-C/JAVA reflection, etc.
10+
11+
One more thing, Facebook Integration for Cocos2d-JS have brought a huge opportunity for game developers who want to integrate Facebook functionality into their games. With a single code base, they can release fully cross-platform games across Facebook Canvas, iOS and Android.
12+
13+
## Highlights
14+
15+
* Released Facebook Integration for Cocos2d-JS v1.0, its APIs have been significantly polished and stablized. Improved test cases for Facebook with more features demonstrated. Refer to the [API reference document](http://cocos2d-x.org/docs/manual/framework/html5/facebook-sdk/api-reference/en) for more details.
16+
* Refactorization of the web engine with new renderer architecture, the new renderer has brought a great performance boost on Web engine.
17+
* Upgraded Cocos2d-x to v3.3rc0.
18+
* Supported Cocos Studio v2.0 including Timeline animation support and proto buffers format support for both web engine and JSB engine.
19+
* Automatically enabled WebGL on iOS 8 safari, the performance is incredibly enhanced compare to Canvas render mode.
1020

1121
## Workflows
1222

@@ -16,24 +26,17 @@ Furthermore, JavaScript friendly APIs make your game development experience a br
1626

1727
![](workflows.jpg)
1828

19-
## Highlights
20-
21-
* Refactoration of the web engine with new renderer architecture, the new renderer has bring a great performance boost on Web engine, yet it hasn't been fully optimized. The next step is to focus on the optimization.
22-
* Released Facebook SDK for Cocos2d-JS Beta2, its API have been significantly improved and stablized. API reference document have been greatly improved also.
23-
* Upgraded MoonWarriors sample game with brand new graphical assets.
24-
* Automatically enabled WebGL on iOS 8 safari, the performance is incredibly enhanced compare to Canvas render mode.
25-
* Upgraded chipmunk to the newest version and improved bindings for chipmunk.
26-
2729
## Notice
2830

2931
For JSB build, there are some restrictions :
3032

3133
- [Android build] NDK version must be r9d
3234
- [iOS build] Xcode version must be 5.1.1 +
35+
- [Web code obfuscation] JRE or JDK version must be 1.6 or 1.7
3336

3437
## Download
3538

36-
- [Cocos2d-JS v3.1 Beta](http://www.cocos2d-x.org/filedown/cocos2d-js-v3.1-beta.zip)
39+
- [Cocos2d-JS v3.1](http://www.cocos2d-x.org/filedown/cocos2d-js-v3.1.zip)
3740
- [Online API reference](http://www.cocos2d-x.org/reference/html5-js/V3.0/index.html)
3841
- [Downloadable API Reference](http://www.cocos2d-x.org/filedown/Cocos2d-JS-v3.0-API.zip)
3942
- [Online test cases](http://cocos2d-x.org/js-tests/)
@@ -42,14 +45,24 @@ For JSB build, there are some restrictions :
4245

4346
Read more about all the features and bug fixes
4447

45-
- [Cocos2d-JS v3.1 Beta changelog](http://www.cocos2d-x.org/docs/manual/framework/html5/release-notes/v3.1b/changelog/en)
48+
- [Cocos2d-JS v3.1 changelog](http://www.cocos2d-x.org/docs/manual/framework/html5/release-notes/v3.1/changelog/en)
4649
- [Cocos2d-JS v3.1 upgrade guide](http://www.cocos2d-x.org/docs/manual/framework/html5/release-notes/v3.0rc0/upgrade-guide/en)
4750

51+
## Upgrade your project from previous versions
52+
53+
If you want to upgrade your game based on v3.0 previous version to the 3.1 version, you should follow these steps:
54+
55+
1. Download the Cocos2d-JS v3.1 package.
56+
2. Upgrade cocos command with `setup.py`.
57+
3. Create a new project with `cocos new` command.
58+
4. Replace the "src", "res", "index.html", "project.json", "main.js" etc with your old project.
59+
5. Then you may need to refer to the upgrade guide to solve some API change issues.
60+
4861
## About Cocos2d family
4962

50-
- Cocos2d-JS v3.1 Beta uses Cocos2d-x 3.2 final as base of JSB solution
51-
- Cocos2d-JS v3.1 Beta is compatible with Cocos Code IDE v1.0.0 RC2+
52-
- Cocos2d-JS v3.1 Beta is compatible with Cocos Studio v1.2 - v1.5.0.1
63+
- Cocos2d-JS v3.1 uses Cocos2d-x v3.3rc0 as base of JSB solution
64+
- Cocos2d-JS v3.1 is compatible with Cocos Code IDE v1.0
65+
- Cocos2d-JS v3.1 is compatible with Cocos Studio v1.2 - v2.0
5366

5467
With any problems you might have, our communities are happy to help:
5568

frameworks/cocos2d-html5

Submodule cocos2d-html5 updated 1 file

frameworks/js-bindings/bindings/manual/ScriptingCore.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <assert.h>
3838
#include <memory>
3939

40-
#define ENGINE_VERSION "Cocos2d-JS v3.1 Beta"
40+
#define ENGINE_VERSION "Cocos2d-JS v3.1"
4141

4242
void js_log(const char *format, ...);
4343

frameworks/js-bindings/bindings/proj.ios_mac/cocos2d_js_bindings.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@
881881
SDKROOT = iphoneos;
882882
TARGETED_DEVICE_FAMILY = "1,2";
883883
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../external/spidermonkey/include/ios $(SRCROOT)/../../cocos2d-x/cocos/platform/ios $(SRCROOT)/../../cocos2d-x/plugin/protocols/include";
884+
VALID_ARCHS = "arm64 armv7";
884885
};
885886
name = Debug;
886887
};
@@ -903,6 +904,7 @@
903904
SDKROOT = iphoneos;
904905
TARGETED_DEVICE_FAMILY = "1,2";
905906
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../external/spidermonkey/include/ios $(SRCROOT)/../../cocos2d-x/cocos/platform/ios $(SRCROOT)/../../cocos2d-x/plugin/protocols/include";
907+
VALID_ARCHS = "arm64 armv7";
906908
};
907909
name = Release;
908910
};

frameworks/js-bindings/bindings/script/jsb_cocos2d.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
// CCConfig.js
2828
//
29-
cc.ENGINE_VERSION = "Cocos2d-JS v3.1 Beta";
29+
cc.ENGINE_VERSION = "Cocos2d-JS v3.1";
3030

3131
cc.FIX_ARTIFACTS_BY_STRECHING_TEXEL = 0;
3232
cc.DIRECTOR_STATS_POSITION = {x: 0, y: 0};

frameworks/js-bindings/cocos2d-x

Submodule cocos2d-x updated 1 file

samples/js-tests/src/CocoStudioTest/CocoStudioTest.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ var cocoStudioTestItemNames = [
4545
testScene:function () {
4646
runSceneEditorTest();
4747
}
48+
},
49+
{
50+
itemTitle:"ParserTest",
51+
testScene:function(){
52+
runParserTest();
53+
}
4854
}
4955
];
5056

@@ -55,12 +61,6 @@ if(!cc.sys.isNative){
5561
runComponentsTestLayer();
5662
}
5763
});
58-
cocoStudioTestItemNames.push({
59-
itemTitle:"ParserTest",
60-
testScene:function(){
61-
runParserTest();
62-
}
63-
});
6464
cocoStudioTestItemNames.push({
6565
itemTitle:"CustomWidget",
6666
testScene:function(){

samples/js-tests/src/CocoStudioTest/ParserTest/ParserTest.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ var CocostudioParserJsonLayer = cc.Layer.extend({
6464

6565
var guiReader = ccs.uiReader;
6666

67-
guiReader.registerTypeAndCallBack("CustomImageView",
68-
CustomImageView,
69-
customImageViewReader,
70-
customImageViewReader.setProperties);
71-
guiReader.registerTypeAndCallBack("CustomParticleWidget",
72-
CustomParticleWidget,
73-
customParticleWidgetReader,
74-
customParticleWidgetReader.setProperties);
67+
// guiReader.registerTypeAndCallBack("CustomImageView",
68+
// CustomImageView,
69+
// customImageViewReader,
70+
// customImageViewReader.setProperties);
71+
// guiReader.registerTypeAndCallBack("CustomParticleWidget",
72+
// CustomParticleWidget,
73+
// customParticleWidgetReader,
74+
// customParticleWidgetReader.setProperties);
7575

7676
var layout = guiReader.widgetFromJsonFile(this._jsonFile);
7777
layout.setScale(0.7);

samples/js-tests/src/ExtensionsTest/ExtensionsTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var extensionsTestItemNames = [
103103
}
104104
];
105105

106-
if (cc.sys.OS_IOS == cc.sys.os) {
106+
if (cc.sys.isNative && cc.sys.OS_IOS == cc.sys.os) {
107107
extensionsTestItemNames.push({
108108
itemTitle:"PluginTest",
109109
testScene:function () {

templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,7 @@
892892
SDKROOT = iphoneos;
893893
TARGETED_DEVICE_FAMILY = "1,2";
894894
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../../js-bindings/external/spidermonkey/include/ios $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/manual";
895+
VALID_ARCHS = "arm64 armv7";
895896
};
896897
name = Debug;
897898
};
@@ -917,6 +918,7 @@
917918
SDKROOT = iphoneos;
918919
TARGETED_DEVICE_FAMILY = "1,2";
919920
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../../js-bindings/external/spidermonkey/include/ios $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/manual";
921+
VALID_ARCHS = "arm64 armv7";
920922
};
921923
name = Release;
922924
};

templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,7 @@
11771177
SDKROOT = iphoneos;
11781178
TARGETED_DEVICE_FAMILY = "1,2";
11791179
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../js-bindings/cocos2d-x/cocos $(SRCROOT)/../../js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../../js-bindings/external/spidermonkey/include/ios $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/manual";
1180+
VALID_ARCHS = "arm64 armv7";
11801181
};
11811182
name = Debug;
11821183
};
@@ -1202,6 +1203,7 @@
12021203
SDKROOT = iphoneos;
12031204
TARGETED_DEVICE_FAMILY = "1,2";
12041205
USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../../js-bindings/cocos2d-x/cocos $(SRCROOT)/../../js-bindings/cocos2d-x/cocos/platform/ios $(SRCROOT)/../../js-bindings/external/spidermonkey/include/ios $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/auto $(SRCROOT)/../../js-bindings/cocos2d-x/plugin/jsbindings/manual";
1206+
VALID_ARCHS = "arm64 armv7";
12051207
};
12061208
name = Release;
12071209
};

0 commit comments

Comments
 (0)