Skip to content

Commit af3d698

Browse files
committed
Merge pull request #1568 from pandamicro/develop
Add release docs for v3.4 beta0
2 parents e545cb1 + f5efa36 commit af3d698

File tree

7 files changed

+213
-2
lines changed

7 files changed

+213
-2
lines changed

CHANGELOG

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

3+
Cocos2d-JS v3.4 Beta0 @ March 19 2015
4+
5+
* Added Windows Phone 8.0 platform support.
6+
* Upgraded SpiderMonkey to v33, greatly improved JS object garbage collection and performance.
7+
* Bound 3D modules including camera, light, sprite 3d, animation 3d, billboard, etc.
8+
* Improved `cc.FontDefinition` & `ccui.RichText` in the web engine.
9+
* Added gradient stops feature to `cc.LayerGradient` [Web exclusive].
10+
* Upgraded `cc.Scheduler` in the web engine with Cocos2d-x v3.4 implementation.
11+
* Added a loading screen when scripts are loading.
12+
* Improved performance by replacing `Object.defineProperties` with `cc.defineGetterSetter`.
13+
* Supported loading sprite frames from json object.
14+
* Refactored math library to improve web engine performance.
15+
* Removed some variables from `cc` namespace to improve web engine performance.
16+
* Added the Firefox OS Web manifest to support Firefox OS apps.
17+
* Added `cocos` attr to the script element in templates.
18+
* Moved loading.js to res folder for Cocos Console release mode.
19+
* [JSB] Defined properties for TextureData.
20+
* [JSB] Upgrade auto and manual bindings to SpiderMonkey v33.
21+
* [JSB] Added 3D object conversions.
22+
* [JSB] Added full featured 3D test cases including: camera, light, sprite 3d, animation 3d, billboard, effect.
23+
* [JSB] Improved auto and manual bindings rooting code for creating objects.
24+
* [JSB] Added 3d transform getter functions to `cc.Node`.
25+
* [JSB] Added some useful callbacks to XMLHttpRequest.
26+
27+
* Bug fixes:
28+
1. Added `getSpriteFrame` to `cc.Sprite` to fix API inconsistency.
29+
2. Added `getObejct` to `cc.TMXObjectGroup` to fix API inconsistency.
30+
3. Added `addImageAsync` to `cc.textureCache` to fix API inconsistency.
31+
4. Fixed a bug of `cc.text` that its default font name is incorrect.
32+
5. Fixed a bug of `ccui.PageView` that its `getPage` doesn't work.
33+
6. Fixed a bug of `ccui.ImageView` that its `loadTexture` doesn't work while it's invoked multiple times at the same frame.
34+
7. Fixed a bug of `ccui` that its load event callbacks have some mistakes.
35+
8. Fixed a bug of `cc.Layer` that its bake function doesn't work when the layer has a parent node.
36+
9. Fixed typos in `cc.ClippingNode.WebGLRenderCmd` and `cc.ParticleSystem.WebGLRenderCmd` creation.
37+
10. Fixed a bug of `cc.Sprite` in `setTextureRect`.
38+
11. Fixed a bug of `cc.Screen`.
39+
12. Fixed a bug of `cc.view` that it doesn't work on iOS 8.1.2.
40+
13. Fixed a bug of cc.DrawNode that its lineWidth is always to default value when set linewidth to zero.
41+
14. Fixed a bug in hack for particles performance on canvas.
42+
15. Fixed a bug of `cc.audioEngine` that it doesn't work after minified/compiled.
43+
16. Fixed a bug in `CCBoot.js` that WebGL is not activated in web view of iOS 8.
44+
17. Fixed a bug of `cc.CheckBox` that its position is incorrect when its texture isn't preloaded.
45+
18. Fixed a bug of `cc.TMXLayer` that it stops to work after `setTileGID` called.
46+
19. Fixed a bug of Cocos parser 2.x that it doesn't set widget's LayoutComponent.
47+
20. Fixed a bug of `cc.isObject` that it considered function as an object.
48+
21. [JSB] Fixed runScript error on win32 platform.
49+
22. [JSB] Fixed issues of generated binding codes for spine and ccs.
50+
23. [JSB] Fixed char16_t redefinition issue for wp8.
51+
24. [JSB] Fixed an issue that string value with line break characters will cause cc.plistParser fail to parse.
52+
25. [JSB] Refactored `cc.textureCache.addImageAsync` to support fully asynchronoused remote image loading.
53+
26. [JSB] Fixed an issue of `GLProgramState::setVertexAttribPointer` function binding.
54+
27. [JSB] Fixed a bug in `GLProgram`'s constructor.
55+
28. [JSB] Fixed http response header parsing issue.
56+
29. [JSB] Fixed jsc file check issue on windows.
57+
30. [JSB] Fixed `jsval_to_long_long` conversion issue.
58+
31. [JSB] Fixed `strtoll` undefined error in visual studio.
59+
32. [JSB] Fixed an issue that `cc.MenuItem`'s `setCallback` function invoked with wrong this object.
60+
33. [JSB] Fixed parameter issue for constructor of `cc.MenuItemImage`.
61+
34. [JSB] Fixed `ccs.Armature`'s `setBlendFunc` parameter inconsistency issue.
62+
35. [JSB] Fixed `JSStringWrapper` issue on windows platform.
63+
36. [JSB] Fixed a chinese character issue on WP8.
64+
37. [JSB] Fixed new object failed issue on windows.
65+
38. [JSB] Fixed an issue that `cc.Label.createWithTTF` is undefined.
66+
39. [JSB] Fixed audio loader absent issue.
67+
40. [JSB] Fixed a test case issue of native feature usage.
68+
69+
370
Cocos2d-JS v3.3 @ Feb.9, 2015
471

572
* Upgraded spine runtime to support the latest version and updated its test case.

docs/gradient-color-stop.jpg

82.7 KB
Loading

docs/release-note-v3.4.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Cocos2d-JS v3.4 Beta0 release note
2+
3+
<img src="http://files.cocos2d-x.org/images/orgsite/logo.png" height=180>
4+
5+
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.
6+
7+
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.
8+
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+
* 3D feature ready! Bound 3D modules including camera, light, sprite 3d, animation 3d, billboard, etc.
16+
* Windows Phone 8.0 platform support is finally ready! Thanks to the contribution from Microsoft.
17+
* Upgraded SpiderMonkey to v33, greatly improved JavaScript memory management and performance.
18+
* Continuously improved web engine performance.
19+
20+
## Notice
21+
22+
For JSB build, there are some restrictions :
23+
24+
- [Android build] Suggested NDK version is r10c, if you don't need Android 5.0 compatibility, you can also use r9d, other NDKs are not supported.
25+
- [iOS build] Xcode version must be 5.1.1 +
26+
- [Web code obfuscation] JRE or JDK version must be 1.6+
27+
28+
## Download
29+
30+
- [Cocos2d-JS v3.4 Beta0](http://www.cocos2d-x.org/filedown/cocos2d-js-v3.4-beta0.zip)
31+
- [Cocos2d-JS Lite Version](http://cocos2d-x.org/filecenter/jsbuilder/)
32+
- [Cocos Dev Tool](http://h5.cocos.com/static/cocos-devtools/index-en.html)
33+
- [Online API reference](http://www.cocos2d-x.org/wiki/reference/)
34+
- [Downloadable API Reference](http://www.cocos2d-x.org/filedown/Cocos2d-JS-v3.3-API.zip)
35+
- [Online test cases](http://cocos2d-x.org/js-tests/)
36+
37+
## More information
38+
39+
Read more about all the features and bug fixes
40+
41+
- [Cocos2d-JS v3.4 Beta0 changelog](http://www.cocos2d-x.org/docs/manual/framework/html5/release-notes/v3.4b/changelog/en)
42+
- [Cocos2d-JS v3.4 Beta0 upgrade guide](http://www.cocos2d-x.org/docs/manual/framework/html5/release-notes/v3.4/upgrade-guide/en)
43+
44+
## Upgrade your project from previous versions
45+
46+
If you want to upgrade your game based on v3.0 previous version to the v3.4, you should follow these steps:
47+
48+
1. Download the Cocos2d-JS v3.4 package.
49+
2. Upgrade cocos command with `setup.py`.
50+
3. Create a new project with `cocos new` command.
51+
4. Replace the "src", "res", "index.html", "project.json", "main.js" etc with your old project.
52+
5. Then you may need to refer to the upgrade guide to solve some API change issues.
53+
54+
## About Cocos2d family
55+
56+
- Cocos2d-JS v3.4 uses Cocos2d-x v3.4 as base of JSB solution.
57+
- Cocos2d-JS v3.4 uses SpiderMonkey v33 as builtin JavaScript engine.
58+
- Cocos2d-JS v3.4 is compatible with Cocos Code IDE v1.1.0, but you need to rebuild the runtime with source code.
59+
- Cocos2d-JS v3.4 is compatible with Cocos Studio v1.2 - v1.6 and Cocos Studio 2.1+. Cocos Studio 2.x support need JSON export file, and Cocos2d-JS won't support flatbuffer files.
60+
61+
With any problems you might have, our communities are happy to help:
62+
63+
- [Online forum](http://discuss.cocos2d-x.org/category/cocos2d-x/javascript)
64+
- [Document root](http://cocos2d-x.org/wiki/Cocos2d-JS)
65+
- [Github repository](https://github.com/cocos2d/cocos2d-js)
66+
- [Issue tracker](https://github.com/cocos2d/cocos2d-js/issues)

docs/upgrade-guide-from-3.3-to-3.4.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#Upgrade guide from Cocos2d-JS v3.3 to Cocos2d-JS v3.4
2+
3+
## 0. Upgrade to Cocos2d-JS v3.3
4+
5+
If you are still using Cocos2d-html5 or previous version of Cocos2d-JS, you may need to read the previous upgrade guides first : [Historic upgrade guides](../../en.md)
6+
7+
## 1. Pulish to Windows Phone 8 (Windows Phone 8.1 is not supported yet)
8+
9+
Follow these steps can help you upgrade to v3.4, then create a project and at last working for Windows Phone 8.
10+
11+
1. You need to upgrade cocos console with the `setup.py` in Cocos2d-JS v3.4 package:
12+
13+
```
14+
$ cd cocos2d-js-v3.4
15+
$ ./setup.py
16+
```
17+
18+
2. Create a Cocos2d-JS v3.4 project:
19+
20+
```
21+
$ cocos new -l js WinPhone8Game
22+
```
23+
24+
3. Open the Windows Phone 8 project in `WinPhone8Game/frameworks/runtime-src/proj.wp8-xaml/WinPhone8Game.sln`. Note that you need Visual Studio 2012 to open it.
25+
26+
4. Now you can start to compile or publish the Cocos2d-JS project for Windows Phone 8.
27+
28+
## 2. [Native Exclusive] Create 3D games
29+
30+
The biggest feature in Cocos2d-JS v3.4 is the 3D modules. We have bound Cocos2d-x's 3D modules to JSB, so that you can now code 3D games using JavaScript. Please note that it's a native engine exclusive feature, you can not use 3D classes in the web engine. We are not planning to support 3D for the web in the near future.
31+
32+
Sorry that we don't have a JavaScript document for 3D modules, we will add them as soon as possible.
33+
34+
To know how to use the new 3D modules, please refer to the following documents:
35+
36+
- Cocos [3d module's API reference](http://www.cocos2d-x.org/reference/native-cpp/V3.4/dir_0cec398151724e9e1c180a4e8f99801b.html)
37+
- Cocos [Camera API reference](http://www.cocos2d-x.org/reference/native-cpp/V3.4/d6/d2b/classcocos2d_1_1_camera.html)
38+
- Cocos [Light API reference](http://www.cocos2d-x.org/reference/native-cpp/V3.4/d2/d85/classcocos2d_1_1_base_light.html)
39+
- Test cases in the Cocos2d-JS v3.4 package, run it with projects in `build` folder or using `cocos run` command under `samples/js-tests` folder. You can refer to the following test cases:
40+
- BillBoardTest: source code in `samples/js-tests/src/BillBoardTest`.
41+
- Camera3DTest: source code in `samples/js-tests/src/Camera3DTest`.
42+
- LightTest: source code in `samples/js-tests/src/LightTest`.
43+
- Sprite3DTest: source code in `samples/js-tests/src/Sprite3DTest`.
44+
45+
## 3. [Web Exclusive] cc.LayerGradient with color stops
46+
47+
In the web engine of Cocos2d-JS v3.4, you can now define color stops for a layer gradient. It's a web exclusive feature but it's safe to use the same code in native engine.
48+
49+
API:
50+
51+
```
52+
new cc.LayerGradient(beginColor, endColor, positionInPercent, colorStops);
53+
```
54+
55+
Sample code:
56+
57+
```
58+
// Color stops is represented by an array, where each entry is an object composed by positionInPercent and the color.
59+
var colorStops = [
60+
{p: 0.25, color: cc.color(0, 0, 255, 128)},
61+
{p: 0.5, color: cc.color(128, 128, 128, 128)},
62+
{p: 0.75, color: cc.color(255, 255, 0, 128)}
63+
];
64+
65+
var gradient = new cc.LayerGradient(cc.color(255, 0, 0, 255), cc.color(0, 255, 0, 255), cc.p(0, 1), colorStops);
66+
this.addChild(gradient, 10);
67+
```
68+
69+
Result:
70+
71+
![](gradient-color-stop.jpg)

frameworks/cocos2d-html5

Submodule cocos2d-html5 updated 2 files

samples/js-tests/src/tests_resources.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,4 +1072,11 @@ var g_spine = [
10721072
"res/skeletons/spineboy.atlas",
10731073
"res/skeletons/spineboy.json",
10741074
"res/skeletons/spineboy.png"
1075+
];
1076+
1077+
var g_ccs2 = [
1078+
"res/ActionTimeline/boy_1.csb",
1079+
"res/ActionTimeline/armature/Cowboy0.plist",
1080+
"res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.fnt",
1081+
"res/cocosui/UIEditorTest/UILabelBMFont_Editor/GUI/missing-font.png"
10751082
];

tools/cocos2d-console

Submodule cocos2d-console updated 2 files

0 commit comments

Comments
 (0)