Skip to content

Commit 594cd04

Browse files
committed
Merge pull request #898 from dingpinglv/develop
Merge develop to master branch
2 parents 8e9b6c7 + bcfda75 commit 594cd04

File tree

415 files changed

+155917
-99369
lines changed

Some content is hidden

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

415 files changed

+155917
-99369
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ CMakeCache.txt
9393
CMakeFiles
9494
Makefile
9595
cmake_install.cmake
96+
CMakeLists.txt.user
9697
templates/js-template-default/frameworks/js-bindings
9798

9899
# Ignore files generated by console

AUTHORS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Current Core Developers of Cocos2d-JS:
2121
Zhiming Wu
2222
Sijie Wang
2323
Jialong Zhai
24+
Long Jiang
2425

2526
For the full list of all contributors and retired core developers, please refer to the authors list of cocos2d-x and cocos2d-html5.
2627

@@ -54,6 +55,14 @@ Ninja Lau @mutoo Fix cocoslib_path issue
5455

5556
tkowalski @tkowalski Add missing affine transform functions rename
5657

58+
Minh Quy @MQuy Fix url matching regex issue
59+
60+
Park Hyun Chen @sincntx Fix cc.ScrollView constructor issue in JSB
61+
62+
Vincent Chou @go3k Update README.md, add submodule update command suggestion
63+
Fix bug: Runtime.cpp protobuf object parseFromString may result in an incomplete protobuf object
64+
65+
5766
Cocos2d-JS can not grow so fast without the active community.
5867
Thanks to all developers who report & trace bugs, discuss the engine usage in forum & QQ groups!
5968
Special thanks to Ricardo Quesada for giving us lots of guidances & suggestions.

CHANGELOG

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,98 @@
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+
45+
Cocos2d-JS v3.1 beta @ Oct.13, 2014
46+
47+
* Refactoration of the web engine with new renderer on the architecture level, optimization is under going.
48+
* Released Facebook SDK for Cocos2d-JS beta2, its API have been significantly improved and stablized.
49+
* Upgraded MoonWarriors sample with new set of graphical assets.
50+
* Automatically enabled WebGL on iOS 8 safari.
51+
* Upgraded chipmunk.js to the newest version.
52+
* Supported setting color of shadow for `cc.LabelTTF`.
53+
* Added `getTitleRenderer` function to ccui.Button.
54+
* Supported Coco Studio timeline animation.
55+
* Set the default value of LabelAtlas's `cascadeOpacityEnabled` and `cascadeColorEnabled` to true.
56+
* Added a listener of texture to `cc.Sprite#setTexture` when the texture hasn't loaded.
57+
* Activated `cc.pool` for all kind of objects.
58+
* Added query test for chipmunk and added necessary JavaScript bindings.
59+
* [JSB] Added properties for `cp.Shape`, added missed methods for `cp.Vect` and `cp.v`.
60+
* [JSB] Added missed constant for `ccui.ListView`.
61+
* [JSB] Ignored alpha value in `cc.Node#setColor`.
62+
* [JSB] Used Object.create for creating prototype during inheritance to avoid potential memory leak.
63+
* [JSB] Made regular expression for URL check more reliable using third party code.
64+
65+
* Bugs fix:
66+
1. Fixed a bug of `cc.ComponentContainer` that a 'if' statement behavior is incorrect.
67+
2. Fixed a bug of `cc.Scale9Sprite` that the behavior of Canvas and WebGL is different.
68+
3. Fixed a bug of `cc.EventListener` that its pause state should set to true.
69+
4. Fixed a bug of `cc.ParticleSystem` that it should apply canvas scaling on canvas rendering mode.
70+
5. Fixed a bug of CCBoot.js that `cc.loader` should add a condition to check whether `crossOrign` property is undefined on IE9 and IE10.
71+
6. Fixed a bug of `ccui.Widget` that its `setPosition` function's behavior is incorrect.
72+
7. Fixed a bug of `ccui.LoadingBar` that its `barRenderer` should add to protected children array.
73+
8. Fixed a bug of `cc.Texture2D` that its `TEXTURE_MAG_FILTER` should set to LINEAR.
74+
9. Fixed a bug of `cc.TMXMapInfo` that its doesn't parse `rotation` property.
75+
10. Fixed a bug of `cc.TMXLayer` that it should apply canvas scaling on Canvas rendering mode.
76+
11. [JSB] Fixed an issue of incorrect return value in `cc.textureCache.addImage`.
77+
12. [JSB] Fixed an issue of `cc.loader.getRes` for supporting cached resources.
78+
13. [JSB] Fixed an issue of `cc.loader.loadImg` for supporting local image loading.
79+
14. [JSB] Fixed `cocos run -p ios` command issue with Xcode 6.
80+
15. [JSB] Fixed `cc.EditBox` behavior issue on iOS8.
81+
16. [JSB] Fixed an issue of `cc.Scale9Sprite` that it may mask its child node content.
82+
17. [JSB] Fixed an issue that `arrivalOrder` get reset after being visited and cause children order chaos.
83+
18. [JSB] Fixed an issue of `_ctor` function check in construction.
84+
19. [JSB] Fixed a bug of `cpGroup` type definition inconsistence between iOS 8 and other platforms.
85+
20. [JSB] Fixed API inconsistence between web and JSB engine for `cc.Touch#getID`.
86+
21. [JSB] Fixed memory leak issue of cc.pool in JSB.
87+
22. [JSB] Fixed a bug that `cc.ScrollView`'s construction haven't been implemented in JSB.
88+
23. [JSB] Fixed arguments processing error in chipmunk bindings by adding safe guard.
89+
24. [JSB] Fixed a bug in particle system test case.
90+
25. [JSB] Fixed a potential crash issue for `cc.CallFunc`.
91+
92+
* Known Issues:
93+
1. AssetsManager doesn't work on windows due to a bug in libcurl
94+
2. Timeline animation haven't been bound to JSB
95+
396
Cocos2d-JS-v3.0 Final @ Sep.10, 2014
497

598
* Facebook SDK Beta2: Added `appRequest` API.

CMakeLists.txt

Lines changed: 25 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ project (Cocos2djs)
2929
#set(Cocos2djsSamples_VERSION_MAJOR 3)
3030
#set(Cocos2djsSamples_VERSION_MINOR 0)
3131

32-
include(frameworks/js-bindings/cocos2d-x/build/BuildHelpers.CMakeLists.txt)
32+
include(frameworks/js-bindings/cocos2d-x/cmake/BuildHelpers.CMakeLists.txt)
3333

3434

3535
option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
@@ -114,6 +114,7 @@ endif()
114114
include_directories(
115115
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x
116116
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos
117+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/platform
117118
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/platform/desktop
118119
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/platform/${PLATFORM_FOLDER}
119120
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/audio/include
@@ -158,111 +159,45 @@ else()
158159
endif()
159160

160161

161-
if(WIN32)
162-
163-
if(NOT MINGW)
164-
link_directories(
165-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/jpeg/prebuilt/${PLATFORM_FOLDER}
166-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/tiff/prebuilt/${PLATFORM_FOLDER}
167-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/png/prebuilt/${PLATFORM_FOLDER}
168-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/freetype2/prebuilt/${PLATFORM_FOLDER}
169-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/curl/prebuilt/${PLATFORM_FOLDER}
170-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/icon/prebuilt
171-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/zlib/prebuilt
172-
)
173-
endif()
174-
175-
elseif(APPLE)
176-
177-
else()
178162

179-
link_directories(
180-
/usr/local/lib
181-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/jpeg/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
182-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/tiff/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
183-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/webp/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
184-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/png/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
185-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
186-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/websockets/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
187-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR}
188-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/external/spidermonkey/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
189-
)
190-
191-
endif()
192163

193-
# chipmunk library
194-
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/chipmunk/src)
164+
link_directories(
165+
/usr/local/lib
166+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/chipmunk/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
167+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/jpeg/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
168+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/tiff/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
169+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/webp/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
170+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/png/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
171+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
172+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/websockets/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
173+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR}
174+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/external/spidermonkey/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
175+
)
195176

196-
# box2d library
197-
#add_subdirectory(frameworks/js-bindings/cocos2d-x/external/Box2D)
198177

199-
# unzip library
178+
# build for 3rd party libraries
179+
if(LINUX OR APPLE)
180+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/Box2D)
200181
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/unzip)
201-
202-
# tinyxml2 library
203-
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/tinyxml2)
204-
205-
# xxhash library
206182
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/xxhash)
207-
208-
# audio
209-
add_subdirectory(frameworks/js-bindings/cocos2d-x/cocos/audio)
183+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/tinyxml2)
184+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/protobuf-lite)
185+
endif()
210186

211187
# cocos2d library
212188
add_subdirectory(frameworks/js-bindings/cocos2d-x/cocos)
213189

214-
if(BUILD_EXTENSIONS)
215-
# extensions
216-
add_subdirectory(frameworks/js-bindings/cocos2d-x/extensions)
217-
# jsb extensions
218-
add_subdirectory(frameworks/js-bindings/bindings/manual/extension)
219-
endif(BUILD_EXTENSIONS)
220-
221-
## Editor Support
222-
223-
if(BUILD_EDITOR_SPINE)
224-
# spine
225-
add_subdirectory(frameworks/js-bindings/cocos2d-x/cocos/editor-support/spine)
226-
#jsb spine
227-
add_subdirectory(frameworks/js-bindings/bindings/manual/spine)
228-
endif(BUILD_EDITOR_SPINE)
229-
230-
if(BUILD_EDITOR_COCOSBUILDER)
231-
# cocosbuilder
232-
add_subdirectory(frameworks/js-bindings/cocos2d-x/cocos/editor-support/cocosbuilder)
233-
#jsb cocosbuilder
234-
add_subdirectory(frameworks/js-bindings/bindings/manual/cocosbuilder)
235-
endif(BUILD_EDITOR_COCOSBUILDER)
236-
237-
if(BUILD_EDITOR_COCOSTUDIO)
238-
# cocostudio
239-
add_subdirectory(frameworks/js-bindings/cocos2d-x/cocos/editor-support/cocostudio)
240-
#jsb cocostudio
241-
add_subdirectory(frameworks/js-bindings/bindings/manual/cocostudio)
242-
endif(BUILD_EDITOR_COCOSTUDIO)
243-
244-
#jsbinding library
190+
# jsbindings library
245191
add_subdirectory(frameworks/js-bindings/bindings)
246192

247-
#jsbinding_chipmunk library
248-
add_subdirectory(frameworks/js-bindings/bindings/manual/chipmunk)
249-
250-
#jsbinding_localstorage library
251-
add_subdirectory(frameworks/js-bindings/bindings/manual/localstorage)
252-
253-
#jsbinding_network library
254-
add_subdirectory(frameworks/js-bindings/bindings/manual/network)
255-
256-
#jsbinding_ui library
257-
add_subdirectory(frameworks/js-bindings/bindings/manual/ui)
193+
#js-moonwarriors sample
194+
if(BUILD_JSMOONWARRIORS)
195+
add_subdirectory(samples/js-moonwarriors)
196+
endif(BUILD_JSMOONWARRIORS)
258197

259198
#js-tests sample
260199
if(BUILD_JSTests)
261200
add_subdirectory(samples/js-tests)
262201
endif(BUILD_JSTests)
263202

264-
#js-moonwarriors sample
265-
if(BUILD_JSMOONWARRIORS)
266-
add_subdirectory(samples/js-moonwarriors)
267-
endif(BUILD_JSMOONWARRIORS)
268203

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
![](https://travis-ci.org/cocos2d/cocos2d-js.svg?branch=master)
2-
31
<img src="http://www.cocos2d-x.org/attachments/1508/2dh5-logo.png" width=200>
42

53
Cocos2d-JS
@@ -45,7 +43,7 @@ Furthermore, JavaScript friendly APIs make your game development experience a br
4543

4644
With any problems you might have, our communities are happy to help:
4745

48-
- [Online forum](http://discuss.cocos2d-x.org/category/javascript)
46+
- [Online forum](http://discuss.cocos2d-x.org/category/cocos2d-x/javascript)
4947
- [Document root](http://cocos2d-x.org/docs/manual/framework/html5/en)
5048
- [Github repository](https://github.com/cocos2d/cocos2d-js)
5149

@@ -162,6 +160,7 @@ For JSB build, there are some restrictions :
162160

163161
If you fork our github repository or download the package from github, you will need to do some extra tasks:
164162

163+
- Run `git submodule update --init --recursive` in the `cocos2d-js` root folder, to init and update submodules recursively, such as `cocos2dx/plugin`.
165164
- Run `frameworks/js-bindings/cocos2d-x/download-deps.py` to download external dependencies for Cocos2d-x
166165
- Run `tools/cocos2d-console/download-bin.py` to download bin files for some cocos2d-console plugins like Google Closure Compiler and JSC Compiler.
167166

0 commit comments

Comments
 (0)