Skip to content

Commit

Permalink
Merge branch 'v3.7.1' of https://github.com/cocos2d/cocos2d-x into v3
Browse files Browse the repository at this point in the history
# Conflicts:
#	.travis.yml
#	build/cocos2d_js_tests.xcodeproj/project.pbxproj
#	build/cocos2d_tests.xcodeproj/project.pbxproj
#	cocos/2d/CCFont.h
#	cocos/2d/CCFontAtlas.cpp
#	cocos/2d/CCFontAtlas.h
#	cocos/2d/CCFontFreeType.cpp
#	cocos/2d/CCFontFreeType.h
#	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.Windows/libcocos2d_8_1.Windows.vcxproj
#	cocos/2d/libcocos2d_8_1/libcocos2d_8_1/libcocos2d_8_1.WindowsPhone/libcocos2d_8_1.WindowsPhone.vcxproj
#	cocos/2d/libcocos2d_win10/libcocos2d.vcxproj
#	cocos/cocos2d.cpp
#	cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp
#	cocos/scripting/js-bindings/auto/jsb_cocos2dx_studio_auto.cpp
#	templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj
#	templates/js-template-default/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj
#	templates/js-template-runtime/frameworks/runtime-src/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj
#	templates/lua-template-default/frameworks/runtime-src/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj
#	tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp
#	tests/cpp-tests/Classes/LabelTest/LabelTestNew.h
#	tools/bindings-generator
#	tools/simulator/frameworks/runtime-src/proj.ios_mac/simulator.xcodeproj/project.pbxproj
#	tools/travis-scripts/generate-bindings.sh
#	tools/travis-scripts/generate-cocosfiles.sh
#	tools/travis-scripts/travis_mac.yml
  • Loading branch information
pandamicro committed Aug 2, 2015
2 parents 8ce8f86 + f995ed8 commit 3c2e66e
Show file tree
Hide file tree
Showing 94 changed files with 10,619 additions and 304 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ before_install:
# whitelist
branches:
only:
- v3.7.1
- v3
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Framework & Tools Developers:

Web Developers:
Sijie Wang (VisualSJ)
Menghe Zhang (ZhangMenghe)

3D Developers:
Xiao Yang (super626)
Expand Down Expand Up @@ -136,6 +137,7 @@ Developers:
Added Dutch Language support.
Added clang support for Windows.
Cmake update and remove old scripts from build folder
Fixed building with system prebuilt libs on Linux

mchinen
fix emulator issue for OpenGL ES 2.0 on Android
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@ cocos2d-x-3.8 ??
[FIX] renderer: UI component can't click correctly by moving UI and camera far away of origin.
[FIX] JS: Fixed issue of iOS/JS reflection `callStaticMethod` with bool arg

cocos2d-x-3.7.1 ??
[HIGHLIGHT] studio: Added new skeleton animation support and csb parser for cocos v2.3.2 beta
[HIGHLIGHT] studio: Added new skeleton animation support and JSON parser in the web engine
[HIGHLIGHT] studio: Added Skybox csb/JSON parser for cocos v2.3.2 beta

[NEW] Node: Added getNodeToParentTransform with selected ancestor
[NEW] studio: Parsed Touch/Click/Event callback in JSON parser
[NEW] web: Added cc.director.setClearColor and support transparent background
[NEW] web: Added Animate's getCurrentFrameIndex function

[REFINE] studio: Optimized JSON parser's performance by removing audio play
[REFINE] studio: Optimized editor related extension data to a component instead of hosting in _userObject
[REFINE] studio: Updated Game3DNodeReader & UserCameraReader
[REFINE] web: Improved color/opacity manipulations in MenuItems

[FIX] Scene: Fixed Scene can't be inherited with std::vector members
[FIX] Label: Fixed creation fail if the font(TTF) contains a non-unicode charmap
[FIX] platform: Fixed building with system prebuilt libs on Linux
[FIX] studio: Fixed ccs.Skin construction issue in JSON parser
[FIX] web: Fixed an issue that loading process won't trigger callback problem
[FIX] web: Fixed a bug where not resetting cc.Audio._ignoreEnded when replaying a sound caused it to stay in a "playing" state
[FIX] web: cc.ScrollView and cc.TableView: added check for parent visibility in onTouchBegan method
[FIX] web: Fixed TurnPageDown effect

cocos2d-x-3.7final July.21 2015
[REFINE] JS: Improve manual binding code for `retain`, `release`, `onEnter`, `onExit`, `onEnterTransitionDidFinish` and `onExitTransitionDidStart`
[REFINE] web: Add compatible Uint16Array defintion
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ endif()
project (Cocos2d-X)

# The version number
set(COCOS2D_X_VERSION 3.7)
set(COCOS2D_X_VERSION 3.7.1)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/")
include(CocosBuildHelpers)
Expand Down
106 changes: 94 additions & 12 deletions build/cocos2d_libs.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

38 changes: 24 additions & 14 deletions cocos/2d/CCNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1771,6 +1771,28 @@ AffineTransform Node::getNodeToParentAffineTransform() const
return ret;
}


Mat4 Node::getNodeToParentTransform(Node* ancestor) const
{
Mat4 t(this->getNodeToParentTransform());

for (Node *p = _parent; p != nullptr && p != ancestor ; p = p->getParent())
{
t = p->getNodeToParentTransform() * t;
}

return t;
}

AffineTransform Node::getNodeToParentAffineTransform(Node* ancestor) const
{
AffineTransform t(this->getNodeToParentAffineTransform());

for (Node *p = _parent; p != nullptr && p != ancestor; p = p->getParent())
t = AffineTransformConcat(t, p->getNodeToParentAffineTransform());

return t;
}
const Mat4& Node::getNodeToParentTransform() const
{
if (_transformDirty)
Expand Down Expand Up @@ -1926,24 +1948,12 @@ const Mat4& Node::getParentToNodeTransform() const

AffineTransform Node::getNodeToWorldAffineTransform() const
{
AffineTransform t(this->getNodeToParentAffineTransform());

for (Node *p = _parent; p != nullptr; p = p->getParent())
t = AffineTransformConcat(t, p->getNodeToParentAffineTransform());

return t;
return this->getNodeToParentAffineTransform(nullptr);
}

Mat4 Node::getNodeToWorldTransform() const
{
Mat4 t(this->getNodeToParentTransform());

for (Node *p = _parent; p != nullptr; p = p->getParent())
{
t = p->getNodeToParentTransform() * t;
}

return t;
return this->getNodeToParentTransform(nullptr);
}

AffineTransform Node::getWorldToNodeAffineTransform() const
Expand Down
23 changes: 23 additions & 0 deletions cocos/2d/CCNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,29 @@ class CC_DLL Node : public Ref
virtual const Mat4& getNodeToParentTransform() const;
virtual AffineTransform getNodeToParentAffineTransform() const;

/**
* Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
* The matrix is in Pixels.
* Note: If acenstor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldTransform
*
* @param ancestor The parent's node pointer.
* @since v3.7
* @return The transformation matrix.
*/
virtual Mat4 getNodeToParentTransform(Node* ancestor) const;

/**
* Returns the affline transform matrix that transform the node's (local) space coordinates into the parent's space coordinates.
* The matrix is in Pixels.
*
* Note: If acenstor is not a valid ancestor of the node, the API would return the same value as @see getNodeToWorldAffineTransform
*
* @param ancestor The parent's node pointer.
* @since v3.7
* @return The affline transformation matrix.
*/
virtual AffineTransform getNodeToParentAffineTransform(Node* ancestor) const;

/**
* Sets the transformation matrix manually.
*
Expand Down
17 changes: 15 additions & 2 deletions cocos/2d/libcocos2d.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,10 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimeline.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCBoneNode.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCSkeletonNode.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCSkinNode.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.cpp" />
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCActionFrame.cpp" />
Expand All @@ -510,7 +513,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\editor-support\cocostudio\CCDisplayFactory.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCDisplayManager.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCInputDelegate.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCObjectExtensionData.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCComExtensionData.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCProcessBase.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCSGUIReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\CCSkin.cpp" />
Expand All @@ -532,6 +535,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\GameNode3DReader\GameNode3DReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.cpp" />
Expand All @@ -544,6 +548,8 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\BoneNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\SkeletonNodeReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.cpp" />
Expand Down Expand Up @@ -1072,7 +1078,10 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimeline.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineCache.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCActionTimelineNode.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCBoneNode.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCFrame.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCSkeletonNode.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCSkinNode.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimeLine.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCTimelineMacro.h" />
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CSLoader.h" />
Expand All @@ -1099,7 +1108,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\editor-support\cocostudio\CCDisplayFactory.h" />
<ClInclude Include="..\editor-support\cocostudio\CCDisplayManager.h" />
<ClInclude Include="..\editor-support\cocostudio\CCInputDelegate.h" />
<ClInclude Include="..\editor-support\cocostudio\CCObjectExtensionData.h" />
<ClInclude Include="..\editor-support\cocostudio\CCComExtensionData.h" />
<ClInclude Include="..\editor-support\cocostudio\CCProcessBase.h" />
<ClInclude Include="..\editor-support\cocostudio\CCSGUIReader.h" />
<ClInclude Include="..\editor-support\cocostudio\CCSkin.h" />
Expand All @@ -1125,6 +1134,7 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\CheckBoxReader\CheckBoxReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ComAudioReader\ComAudioReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\GameMapReader\GameMapReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\GameNode3DReader\GameNode3DReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ImageViewReader\ImageViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\LayoutReader\LayoutReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ListViewReader\ListViewReader.h" />
Expand All @@ -1137,6 +1147,9 @@ xcopy /Y /Q "$(ProjectDir)..\..\external\chipmunk\prebuilt\win32\release-lib\*.*
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ProjectNodeReader\ProjectNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\ScrollViewReader\ScrollViewReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SingleNodeReader\SingleNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\BoneNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\CSBoneBinary_generated.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\SkeletonNodeReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SliderReader\SliderReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SpriteReader\SpriteReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\TextAtlasReader\TextAtlasReader.h" />
Expand Down
53 changes: 47 additions & 6 deletions cocos/2d/libcocos2d.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@
<Filter Include="navmesh">
<UniqueIdentifier>{0f3fa25d-9e2b-4a2e-a1df-834b796b3fb3}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\reader\WidgetReader\SkeletonReader">
<UniqueIdentifier>{8405cf93-e86c-4ec1-8b16-01058f542b09}</UniqueIdentifier>
</Filter>
<Filter Include="cocostudio\TimelineAction\Skeleton">
<UniqueIdentifier>{ca5e1475-3bfd-4aae-ad54-2e19d5021b92}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\physics\CCPhysicsBody.cpp">
Expand Down Expand Up @@ -1815,9 +1821,6 @@
<ClCompile Include="..\..\extensions\Particle3D\CCParticleSystem3D.cpp">
<Filter>extension\Particle3D</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\CCObjectExtensionData.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\CocoStudio.cpp">
<Filter>cocostudio\json</Filter>
</ClCompile>
Expand Down Expand Up @@ -1906,6 +1909,25 @@
<ClCompile Include="..\..\external\clipper\clipper.cpp">
<Filter>external\clipper</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\GameNode3DReader\GameNode3DReader.cpp" />
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\BoneNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SkeletonReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\SkeletonNodeReader.cpp">
<Filter>cocostudio\reader\WidgetReader\SkeletonReader</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCBoneNode.cpp">
<Filter>cocostudio\TimelineAction\Skeleton</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCSkeletonNode.cpp">
<Filter>cocostudio\TimelineAction\Skeleton</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\ActionTimeline\CCSkinNode.cpp">
<Filter>cocostudio\TimelineAction\Skeleton</Filter>
</ClCompile>
<ClCompile Include="..\editor-support\cocostudio\CCComExtensionData.cpp">
<Filter>cocostudio\components</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\physics\CCPhysicsBody.h">
Expand Down Expand Up @@ -3621,9 +3643,6 @@
<ClInclude Include="..\..\extensions\Particle3D\CCParticleSystem3D.h">
<Filter>extension\Particle3D</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\CCObjectExtensionData.h">
<Filter>cocostudio\json</Filter>
</ClInclude>
<ClInclude Include="..\..\external\poly2tri\poly2tri.h">
<Filter>external\poly2tri</Filter>
</ClInclude>
Expand Down Expand Up @@ -3715,6 +3734,28 @@
<ClInclude Include="..\..\external\clipper\clipper.hpp">
<Filter>external\clipper</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\GameNode3DReader\GameNode3DReader.h" />
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\BoneNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\SkeletonReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\CSBoneBinary_generated.h">
<Filter>cocostudio\reader\WidgetReader\SkeletonReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\WidgetReader\SkeletonReader\SkeletonNodeReader.h">
<Filter>cocostudio\reader\WidgetReader\SkeletonReader</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCBoneNode.h">
<Filter>cocostudio\TimelineAction\Skeleton</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCSkeletonNode.h">
<Filter>cocostudio\TimelineAction\Skeleton</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\ActionTimeline\CCSkinNode.h">
<Filter>cocostudio\TimelineAction\Skeleton</Filter>
</ClInclude>
<ClInclude Include="..\editor-support\cocostudio\CCComExtensionData.h">
<Filter>cocostudio\components</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\math\Mat4.inl">
Expand Down
Loading

0 comments on commit 3c2e66e

Please sign in to comment.