Skip to content

Commit 2a49d3c

Browse files
committed
Merge pull request #1639 from cocos2d/develop
Release Cocos2d-JS v3.5
2 parents 0d45851 + 0300f81 commit 2a49d3c

File tree

1,742 files changed

+320654
-117754
lines changed

Some content is hidden

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

1,742 files changed

+320654
-117754
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Thumbs.db
77
*.pdb
88
*.aps
99
*.vcproj.*.user
10+
*.vcxproj.user
1011
*.vspscc
1112
*_i.c
1213
*.i
@@ -32,6 +33,11 @@ _ReSharper*/
3233
[Tt]est[Rr]esult*
3334
ipch/
3435
*.opensdf
36+
Generated Files
37+
AppPackages
38+
39+
# Ignore zip file created by download-deps.py if saved by user
40+
*-deps-*.zip
3541

3642
# Ignore files build by ndk and eclipse
3743
libs/
@@ -104,3 +110,5 @@ frameworks/js-bindings/bindings/proj.ios_mac/build/
104110

105111
# Ignore files copied in compilation
106112
samples/*/project/proj.android/src
113+
114+
*.jsc

AUTHORS

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Name GithubID Main contribution
3131
seobyeongky @seobyeongky XMLHTTPRequest bug fixes
3232
GLProgram_setUniformLocationWith4f bug fixed
3333
Corrent value of cc.REPEAT_FOREVER
34+
Improved JavaScriptObjCBridge's import order
35+
Added some useful callbacks to XMLHttpRequest
3436

3537
Liang Wu @akira-cn No default font Arial on android bug fix
3638

@@ -59,17 +61,33 @@ Minh Quy @MQuy Fix url matching regex issue
5961

6062
Park Hyun Chen @sincntx Fix cc.ScrollView constructor issue in JSB
6163
Added cc.rectOverlapsRect function in JSB
64+
Fix issue that string value with line break character will cause cc.plistParser fail to parse
6265

6366
Vincent Chou @go3k Update README.md, add submodule update command suggestion
6467
Fix bug: Runtime.cpp protobuf object parseFromString may result in an incomplete protobuf object
6568
Fix bug: PrebuiltRuntime ios version can't support portrait orientation.
6669

6770
Igor Mats @IgorMats Added outline shader sample
71+
Add SkeletonAnimation and GLProgram to the list of extendable classes
6872

6973
G17hao @G17hao Fixed an typo issue in jsb_boot.js
7074

7175
Simon de Lang @simondel Fixed use of deprecated cc, ccs and ccui create functions.
7276

77+
Craig P Jolicoeur @cpjolicoeur Fix typos in setup.py
78+
79+
Dale Stammen @Stammen Add Windows Phone 8 support
80+
Add Windows Universal app support
81+
82+
Jeff Oh @redsim Fixed http response header parsing bug
83+
84+
Thomas Jablonski @thomas-jablonski
85+
Add cocos attr to the script element in templates
86+
87+
James Chen @dumganhar Support to set custom scheduler & actionmanager for node
88+
89+
小马哥 @andot Patch xhr.send for ArrayBuffer & ArrayBufferView.
90+
7391
Cocos2d-JS can not grow so fast without the active community.
7492
Thanks to all developers who report & trace bugs, discuss the engine usage in forum & QQ groups!
7593
Special thanks to Ricardo Quesada for giving us lots of guidances & suggestions.

CHANGELOG

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

3+
Cocos2d-JS v3.5 @ April 1 2015
4+
5+
* Supported Windows Universal application publish which includes Windows, Windows RT, Windows Phone 8.1 platforms.
6+
* Updated Cocos2d-x v3.5.
7+
* Upgraded Cocos Studio parser to support Cocos Studio v2.2.
8+
* Supported Cocos Studio 3D scene editing.
9+
* Upgraded runtime tempalte to support Cocos Code IDE 1.2.0.
10+
* Upgraded Spine support to v2.1, added spine test case with FFD. FFD is supported in native but not in web, both engine can parse the new version file correctly, but the web engine will ignore FFD informations.
11+
* Replaced '==' with '===' for better performance.
12+
* Added `path` parameter in `ccs.load` to support modifying cocostudio project resource path.
13+
* Added animationList to Cocostudio ActionTimeline to support playing animation by name.
14+
* Made ParticleSystem support creation from an map object.
15+
* Added missing functions to `cc.Grid3D` and `cc.PageTurn3D`.
16+
* Added tip message functions to `cc.TextFieldTTF` for mobile browser.
17+
* Added a function `cc.sys.openURL`.
18+
* Disabled retina display by default for better performance.
19+
* Added Bower support.
20+
* Updated `cc.sys.OS_XXX` informations for supported systems.
21+
* [JSB] Moved 3D modules to `jsb` namespace.
22+
* [JSB] Bound `ParticleSystem3D` and `PUParticleSystem3D` which support Particle Universe editor.
23+
* [JSB] Improved bindings registration code.
24+
* [JSB] Supported setting custom scheduler or action manager for node.
25+
* [JSB] Added `enableStroke`, `setBoundingWidth`, `setBoundingHeight` to `cc.Label` to fit web engine API.
26+
* [JSB] Supported ArrayBuffer and ArrayBufferView in `XMLHTTPRequest`'s `send` function.
27+
* [JSB] Made remote image loading fully asynchonous.
28+
* [JSB] Made `cc.Camera`'s `unproject` function support one argument.
29+
30+
* Bug fixes:
31+
1. Fixed a bug of chipmunk.js that it doesn't work under closure compiler advanced mode.
32+
2. Fixed a bug of Cocos Studio parser that widget didn't set its layout component.
33+
3. Fixed grammatical mistakes in cocostudio parser logs.
34+
4. Fixed memory leak issue in `cc.LabelBMFont`.
35+
5. Fixed a bug of `cc.Scale9Sprite` that its `updateDisplayColor` doesn't take effect.
36+
6. Fixed a bug of Cocos Studio parser that `cc.Scale9Sprite` doesn't display correctly if its texture isn't preloaded.
37+
7. Fixed a bug of `cc.MenuItemSprite` that the construction will fail when parameter `selectedSprite` is a Scale9Sprite instance.
38+
8. Fixed a bug of Cocos Studio parser that the background color of `ccui.Layout` can't be parsed correctly.
39+
9. Fixed a bug of `cc.ClippingNode` that it doesn't work when set `inverted` to true in Canvas Mode.
40+
10. Fixed a bug of `ccs.Armature` that its name was modified to animation name when loading from json files.
41+
11. Fixed a bug of `ccui.PageView` that it cancel child touch during movment of page view.
42+
12. Fixed a bug of `cc.Scheduler` that its parameter `repeat` is invalid in schedule function.
43+
13. Fixed a bug of `cc.Scheduler` that `unschedule` function may fail.
44+
14. [JSB] Fixed a crash issue that `ccui.Checkbox` will crash due to conflict usage of `setUserObject`.
45+
15. [JSB] Fixed an issue that `cc.Node`'s `init` function is empty implemented and can't be overrided.
46+
16. [JSB] Fixed `cc.ClippingNode`'s `init` function issue that it didn't support arguments.
47+
17. [JSB] Fixed an issue that TTF Cocos Studio parser can not correctly set TTF font for widgets.
48+
18. [JSB] Fixed relocation overflow compilation issue by adding `LOCAL_ARM_MODE := arm`.
49+
50+
Cocos2d-JS v3.4 Beta0 @ March 19 2015
51+
52+
* Added Windows Phone 8.0 platform support.
53+
* Upgraded SpiderMonkey to v33, greatly improved JS object garbage collection and performance.
54+
* Bound 3D modules including camera, light, sprite 3d, animation 3d, billboard, etc.
55+
* Improved `cc.FontDefinition` & `ccui.RichText` in the web engine.
56+
* Added gradient stops feature to `cc.LayerGradient` [Web exclusive].
57+
* Upgraded `cc.Scheduler` in the web engine with Cocos2d-x v3.4 implementation.
58+
* Added a loading screen when scripts are loading.
59+
* Improved performance by replacing `Object.defineProperties` with `cc.defineGetterSetter`.
60+
* Supported loading sprite frames from json object.
61+
* Refactored math library to improve web engine performance.
62+
* Removed some variables from `cc` namespace to improve web engine performance.
63+
* Added the Firefox OS Web manifest to support Firefox OS apps.
64+
* Added `cocos` attr to the script element in templates.
65+
* Moved loading.js to res folder for Cocos Console release mode.
66+
* [JSB] Defined properties for TextureData.
67+
* [JSB] Upgrade auto and manual bindings to SpiderMonkey v33.
68+
* [JSB] Added 3D object conversions.
69+
* [JSB] Added full featured 3D test cases including: camera, light, sprite 3d, animation 3d, billboard, effect.
70+
* [JSB] Improved auto and manual bindings rooting code for creating objects.
71+
* [JSB] Added 3d transform getter functions to `cc.Node`.
72+
* [JSB] Added some useful callbacks to XMLHttpRequest.
73+
74+
* Bug fixes:
75+
1. Added `getSpriteFrame` to `cc.Sprite` to fix API inconsistency.
76+
2. Added `getObejct` to `cc.TMXObjectGroup` to fix API inconsistency.
77+
3. Added `addImageAsync` to `cc.textureCache` to fix API inconsistency.
78+
4. Fixed a bug of `cc.text` that its default font name is incorrect.
79+
5. Fixed a bug of `ccui.PageView` that its `getPage` doesn't work.
80+
6. Fixed a bug of `ccui.ImageView` that its `loadTexture` doesn't work while it's invoked multiple times at the same frame.
81+
7. Fixed a bug of `ccui` that its load event callbacks have some mistakes.
82+
8. Fixed a bug of `cc.Layer` that its bake function doesn't work when the layer has a parent node.
83+
9. Fixed typos in `cc.ClippingNode.WebGLRenderCmd` and `cc.ParticleSystem.WebGLRenderCmd` creation.
84+
10. Fixed a bug of `cc.Sprite` in `setTextureRect`.
85+
11. Fixed a bug of `cc.Screen`.
86+
12. Fixed a bug of `cc.view` that it doesn't work on iOS 8.1.2.
87+
13. Fixed a bug of cc.DrawNode that its lineWidth is always to default value when set linewidth to zero.
88+
14. Fixed a bug in hack for particles performance on canvas.
89+
15. Fixed a bug of `cc.audioEngine` that it doesn't work after minified/compiled.
90+
16. Fixed a bug in `CCBoot.js` that WebGL is not activated in web view of iOS 8.
91+
17. Fixed a bug of `cc.CheckBox` that its position is incorrect when its texture isn't preloaded.
92+
18. Fixed a bug of `cc.TMXLayer` that it stops to work after `setTileGID` called.
93+
19. Fixed a bug of Cocos parser 2.x that it doesn't set widget's LayoutComponent.
94+
20. Fixed a bug of `cc.isObject` that it considered function as an object.
95+
21. [JSB] Fixed runScript error on win32 platform.
96+
22. [JSB] Fixed issues of generated binding codes for spine and ccs.
97+
23. [JSB] Fixed char16_t redefinition issue for wp8.
98+
24. [JSB] Fixed an issue that string value with line break characters will cause cc.plistParser fail to parse.
99+
25. [JSB] Refactored `cc.textureCache.addImageAsync` to support fully asynchronoused remote image loading.
100+
26. [JSB] Fixed an issue of `GLProgramState::setVertexAttribPointer` function binding.
101+
27. [JSB] Fixed a bug in `GLProgram`'s constructor.
102+
28. [JSB] Fixed http response header parsing issue.
103+
29. [JSB] Fixed jsc file check issue on windows.
104+
30. [JSB] Fixed `jsval_to_long_long` conversion issue.
105+
31. [JSB] Fixed `strtoll` undefined error in visual studio.
106+
32. [JSB] Fixed an issue that `cc.MenuItem`'s `setCallback` function invoked with wrong this object.
107+
33. [JSB] Fixed parameter issue for constructor of `cc.MenuItemImage`.
108+
34. [JSB] Fixed `ccs.Armature`'s `setBlendFunc` parameter inconsistency issue.
109+
35. [JSB] Fixed `JSStringWrapper` issue on windows platform.
110+
36. [JSB] Fixed a chinese character issue on WP8.
111+
37. [JSB] Fixed new object failed issue on windows.
112+
38. [JSB] Fixed an issue that `cc.Label.createWithTTF` is undefined.
113+
39. [JSB] Fixed audio loader absent issue.
114+
40. [JSB] Fixed a test case issue of native feature usage.
115+
116+
117+
Cocos2d-JS v3.3 @ Feb.9, 2015
118+
119+
* Upgraded spine runtime to support the latest version and updated its test case.
120+
* Added an option "noCache" for debugging on browsers.
121+
* Set the default value of `cc.ParticleSystem`'s draw mode to texture mode.
122+
* Added message to `ccs.load` when loading armature json file.
123+
* Improved particle system test case.
124+
* [JSB] Bound `cc.Image` and `cc.GLProgram`.
125+
* [JSB] Supported extending `sp.SkeletonAnimation`.
126+
127+
* Bug fixes:
128+
1. Fixed a bug of `cc.Sprite` that its `setSpriteFrame` doesn't work when sprite frame's `rotated` property is true.
129+
2. Fixed a bug of `cc.ClippingNode` when its stencil is `cc.Node` object in canvas mode.
130+
3. Fixed a ccui bug that the position of widgets is incorrect after loaded v2.x json file with `ccs.load`.
131+
4. Fixed a bug of `cc.PhysicsSprite` that `setIgnoreBodyRotation` function doesn't work.
132+
5. Fixed a bug of `ccui.Button` that setting pressed texture doesn't work when scale9 enabled.
133+
6. Fixed a bug of `ccui.ScrollView` that its `dir` property is null when passing `DIR_NONE` as `direction` in `_endRecordSlidAction` function.
134+
7. [JSB] Fixed spine animation listener binding issues.
135+
8. [JSB] Fixed `cc.MenuItemToggle`'s `setCallback` issue.
136+
137+
Cocos2d-JS v3.3 RC0 @ Feb.1, 2015
138+
139+
* Added web exclusive functions: `_getFontStyle`, `_setFontStyle`, `_getFontWeight` and `_setFontWeight` APIs to `cc.LabelTTF`.
140+
* Observed orientation change event on mobile for resolution policy adaptation.
141+
* [JSB] Added bindings for `ccs.TextureData` and `ccs.ContourData`.
142+
143+
* Bug fixes:
144+
1. Fixed Cocos Studio JSON parser's issues for parsing nested animation.
145+
2. Fixed Cocos Studio JSON parser's parameters parsing issues.
146+
3. Fixed Cocos Studio JSON parser's issue for parsing layer.
147+
4. Fixed Cocos Studio JSON action parser's issues.
148+
5. Fixed Cocos Studio JSON parser's issue for parsing Scale9Sprite.
149+
6. Fixed Cocos Studio JSON parser's issues caused by parsing process order.
150+
7. Fixed Cocos Studio JSON parser's issue for parsing loading bar's direction.
151+
8. Fixed UI layout system issues.
152+
9. Fixed `cc.EditBox`'s position issue under certain resolution policies.
153+
10. Fixed `ccui.ListView`'s issue for setting direction.
154+
11. Fixed an issue of `cc.Tween` that its `_currentPercent` is incorrect in `updateHandler` function.
155+
12. Fixed an issue of `ccui.Button` that its state is incorrect in `_onPressStateChangedToNormal`.
156+
13. Fixed an issue of `cc.ArmatureAnimation`'s `setMovementEventCallFunc`.
157+
14. Fixed an issue of `cc.Sequence` action when it's repeated.
158+
15. Fixed `_anchorPointInPoints` usage issue.
159+
16. Fixed an issue of `cc.GLProgram` that it doesn't work on some devices which didn't support highp float precision.
160+
17. Fixed an issue of fade actions that they don't work when duration is 0.
161+
18. Fixed `onended` callback issue of audio engine on iOS.
162+
19. Fixed Cocos Builder's parser issue for auto playing animations.
163+
20. Added a message to `ccs.Armature` that it doesn't support adding widget as its child.
164+
21. Improved test cases for stability.
165+
22. [JSB]Fixed `setBackGroundColorVector` parameter issue.
166+
23. [JSB]Fixed `animationInfo` manual conversion issue.
167+
24. [JSB]Added `ccs.AnimationInfo` struct.
168+
25. [JSB]Improved JavaScriptObjCBridge's import order.
169+
26. [JSB]Fixed `cc.SpriteBatchNode.DEFAULT_CAPACITY` inconsistency issue.
170+
27. [JSB]Fixed `cc.MenuItemImage`'s children class's callback issue.
171+
28. [JSB]Enhanced `executeJSFunctionFromReservedSpot` function.
172+
29. [JSB]Fixed `cc.LabelTTF`'s `setDimensions` API inconsistency issue.
173+
174+
Cocos2d-JS v3.3 Beta @ Jan.24, 2015
175+
176+
* Added Cocos Studio v2.x parser and refactored 1.x parser.
177+
* Upgraded new flow layout UI system in web engine.
178+
* Refactored `load` events of texture2d, sprite and so on to be more intuitive.
179+
* Added JavaScript file loader.
180+
* Allowed set texture to null in `cc.Sprite`.
181+
* Added full test cases for Cocos Studio v2.x parser and the new flow layout UI system.
182+
* Upgraded MoonWarriors sample's UI and graphic design.
183+
* [JSB] Upgraded Cocos2d-x to v3.4 RC1.
184+
* [JSB] Unified keycode between web engine and native engine to web standard values.
185+
* [JSB] Added animation info's manual conversion for bindings.
186+
* [JSB] Made local IP address url pass the url check of `cc.loader.loadImg` function.
187+
* [JSB] Bound `ccs.AlphaFrame` for Cocos Studio animations.
188+
* [JSB] Moved manual conversions of chipmunk to its own manual bindings file for better module support.
189+
190+
* Bug fixes:
191+
1. Fixed a bug of Cocos2d UI, their focus event has been supported.
192+
2. Fixed a buf of `ccui.Widget` that its percent position doesn't work.
193+
3. Fixed a bug of `ccs.Armature` that its position doesn't update in visit on WebGL render mode.
194+
4. Fixed a bug of `cc.Sprite` that its `setTextureRect` function doesn't work when `setColor` invoked.
195+
5. Fixed a bug of `cc.PhysicsSprite` that its position is incorrect.
196+
6. Fixed a bug of `ccs.Bone` that its `setOpacity` and `setColor` doesn't work.
197+
7. Fixed a bug of `cc.LabelBMFont` that its word wrap doesn't work.
198+
8. Fixed a bug of `cc.sys` that it gets the incorrect OS type when system is Linux.
199+
9. Fixed a bug of `cc.audioEngine` that its loading path is incorrect.
200+
10. Fixed a bug of `ccui.Widget` that it can't touch when it's reused.
201+
11. Fixed a bug of UI system that the `setNormalizedPosition` doesn't work.
202+
12. Fixed a bug of `cc.ActionInterval` that its `_times` conflict with `cc.Blink`.
203+
13. Fixed release texture issue in canvas mode.
204+
14. Fixed a bug of `ccs.actionManager` that its `getActionByName` doesn't work.
205+
15. Fixed a bug of `cc.Sprite` that it can't draw without texture on WebGL mode.
206+
16. Fixed a bug of `cc.audioEngine` that it doesn't work on baidu browser.
207+
17. Fixed a bug of `cc.EditBox` that its position is incorrect on Canvas Mode and its string value is wrong when PlaceHolder is showing.
208+
18. Fixed a bug of `cc.loader` that its `loadImg` function doesn't work when image is accessed cross origin.
209+
19. Fixed a bug of `ccui.TextField` that its `contentSize` is incorrect in text field event.
210+
20. [JSB] Fixed restart game feature issue that action manager is not rescheduled after restarting game.
211+
21. [JSB] Fixed `jsb.AssetsManager`'s issue that manifest files progression is inversed.
212+
22. [JSB] Fixed `jsb.AssetsManager`'s issue that asset id isn't dispatched with progression event.
213+
23. [JSB] Fixed `Vec3` conversion issue.
214+
24. [JSB] Added missed `cc.AnimationFrame`'s `_ctor` function.
215+
25. [JSB] Added `cc.MenuItemToggle`'s `selectedItem` function to fix API inconsistence.
216+
26. [JSB] Fixed `LayoutParameter`'s `setMargin` function's API inconsistence with web engine.
217+
27. [JSB] Fixed `ccui.Button`'s constructor issue.
218+
28. [JSB] Fixed `ccui.Button`'s `setNormalizedPosition` function's API inconsistence with web engine.
219+
29. [JSB] Fixed `ccui.CheckBox`'s intialization issue.
220+
30. [JSB] Fixed `ccui.ImageView`'s constructor issue.
221+
31. [JSB] Fixed JSON parse issue in `XMLHTTPRequest`.
222+
32. [JSB] Fixed a wired compilation issue which reports `JSVAL_TO_IMPL` is not a function on win32.
223+
33. [JSB] Fixed image view test's implementation bug.
224+
34. [JSB] Fixed an UI button test's implementation bug.
225+
35. [JSB] Fixed list view test case's bug.
226+
36. [JSB] Fixed issues of `ccui.TextField`'s test cases.
227+
3228
Cocos2d-JS v3.2 @ Dec.29, 2014
4229

5230
* Replaced `transform` function with `setTransform` function under canvas render mode for better performance.

CMakeLists.txt

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -233,28 +233,16 @@ cocos_find_package(TIFF TIFF REQUIRED)
233233
cocos_find_package(WEBSOCKETS WEBSOCKETS REQUIRED)
234234
cocos_find_package(CURL CURL REQUIRED)
235235

236-
# protobuf-lite (not prebuilded, exists as source)
237-
# TODO: for now we can't use upstream protobuf because these files:
238-
# cocos/editor-support/cocostudio/CSParseBinary.pb.h
239-
# cocos/editor-support/cocostudio/CSParseBinary.pb.cc
240-
# was generated by concrete version of protobuf compiler
241-
# and source file not provided. So these files can be
242-
# compiled only with our in-source version of protobuf-lite
243-
## if(USE_PREBUILT_LIBS)
244-
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/protobuf-lite)
245-
set(PROTOBUF_LITE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/protobuf-lite/src)
246-
set(PROTOBUF_LITE_LIBRARIES protobuf)
247-
## else()
248-
## cocos_find_package(Protobuf REQUIRED PROTOBUF_LITE_LIBRARIES)
249-
## set(PROTOBUF_LITE_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS})
250-
## endif()
251-
message(STATUS "Protobuf lite libs: ${PROTOBUF_LITE_LIBRARIES}")
252-
message(STATUS "Protobuf include dirs: ${PROTOBUF_LITE_INCLUDE_DIRS}")
253-
254-
# build for 3rd party libraries
255-
if(LINUX OR APPLE)
236+
237+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/flatbuffers)
238+
set(FLATBUFFERS_INCLUDE_DIRS frameworks/js-bindings/cocos2d-x/external)
239+
message(STATUS "Flatbuffers include dirs: ${FLATBUFFERS_INCLUDE_DIRS}")
240+
241+
242+
# build xxhash
256243
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/xxhash)
257-
endif()
244+
include_directories(frameworks/js-bindings/cocos2d-x/external/xxhash)
245+
258246

259247
# cocos2d library
260248
add_subdirectory(frameworks/js-bindings/cocos2d-x/cocos)

0 commit comments

Comments
 (0)