Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SceneReader sets contentSize by canvasSize. #7979

Merged
merged 1 commit into from
Oct 10, 2014

Conversation

giginet
Copy link
Contributor

@giginet giginet commented Sep 9, 2014

We could not get the canvas size of the scene which created on CocosStudio.

Thanks to this commit, we can get scene's canvas size by Node::getContentSize()

auto scene = cocos2d::cocostudio::SceneReader::getInstance()->createNodeWithSceneFile("Scene.json");
int width = scene->getContentSize().width;
int height = scene->getContentSize().height;
cocos2d::log("canvasSize = %d, %d", width, height);

We could not get the canvas size of the scene which created on CocosStudio.

Thanks to this commit, we can get scene's canvas size by Node::getContentSize()

```cpp
auto scene = cocos2d::cocostudio::SceneReader::getInstance()->createNodeWithSceneFile("Scene.json");
int width = scene->getContentSize().width;
int height = scene->getContentSize().height;
cocos2d::log("canvasSize = %d, %d", width, height);
```
@zilongshanren
Copy link
Member

[ci rebuild]

1 similar comment
@zilongshanren
Copy link
Member

[ci rebuild]

@chengstory
Copy link
Contributor

Thanks @giginet.
@minggo I think it may be merged!

@minggo
Copy link
Contributor

minggo commented Sep 28, 2014

[ci rebuild]

1 similar comment
@minggo
Copy link
Contributor

minggo commented Oct 10, 2014

[ci rebuild]

minggo added a commit that referenced this pull request Oct 10, 2014
SceneReader sets contentSize by canvasSize.
@minggo minggo merged commit 4856b67 into cocos2d:v3 Oct 10, 2014
cocos-travis-mac pushed a commit to cocos-travis-mac/cocos2d-x that referenced this pull request Oct 10, 2014
SceneReader sets contentSize by canvasSize.
WenhaiLin added a commit to WenhaiLin/cocos2d-x that referenced this pull request Oct 10, 2014
commit 4541150
Merge: b508804 a576198
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Fri Oct 10 16:41:47 2014 +0800

    Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-win32-warn

commit a576198
Merge: d5658a6 53cde3f
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 16:40:56 2014 +0800

    Merge pull request cocos2d#8624 from CocosRobot/update_lua_bindings_1412930259

    [AUTO]: updating luabinding automatically

commit 53cde3f
Author: CocosRobot <redmine@cocos2d-x.org>
Date:   Fri Oct 10 08:39:46 2014 +0000

    [AUTO]: updating luabinding automatically

commit b508804
Merge: 83150aa d5658a6
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Fri Oct 10 16:38:11 2014 +0800

    Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3-win32-warn

    Conflicts:
    	tests/cpp-tests/Classes/UITest/CocoStudioGUITest/UIButtonTest/UIButtonTest.cpp

commit d5658a6
Merge: 985b2a7 72ebd71
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 16:31:01 2014 +0800

    Merge pull request cocos2d#8621 from natural-law/v3

    Update the reference of submodule cocos2d-console.

commit 985b2a7
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 16:30:26 2014 +0800

    [ci skip] Update CHANGELOG

commit 63e4d7c
Merge: 00f8f84 2013cdb
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 16:28:21 2014 +0800

    Merge pull request cocos2d#8614 from andyque/fixEditBoxMaxLengthOnMac

    fix setMaxLength issue of EditBox-mac

commit 72ebd71
Author: zhangbin <zhangbin@cocos2d-x.org>
Date:   Fri Oct 10 16:28:03 2014 +0800

    Update the reference of submodule cocos2d-console.

commit 00f8f84
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:56:15 2014 +0800

    [ci skip] Update CHANGELOG

commit 4b7d569
Merge: c774867 6f50143
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:52:50 2014 +0800

    Merge pull request cocos2d#8573 from Dhilan007/v3-labelatlas

    fix cocos2d#8569: LabelAtlas opacity do not change when setting parent node's opacity

commit c774867
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:37:08 2014 +0800

    [ci skip] Update CHANGELOG

commit 44f3dcd
Merge: a11091a 7fb448e
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:35:43 2014 +0800

    Merge pull request cocos2d#8608 from Dhilan007/v3-fileutil-ios

    issue cocos2d#8568: Fixed FileUtils::removeFile doesn't work on iOS

commit a11091a
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:30:30 2014 +0800

    [ci skip] Update CHANGELOG

commit 7d4a235
Merge: 8964c88 a08d0e4
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:28:23 2014 +0800

    Merge pull request cocos2d#8611 from dabingnn/v3_fixGLProgramCrash

    V3 fix gl program crash

commit 8964c88
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:27:12 2014 +0800

    [ci skip] Update CHANGELOG

commit 2013cdb
Author: andyque <guanghui8827@126.com>
Date:   Fri Oct 10 15:26:33 2014 +0800

    fix setMaxLength issue of EditBox-mac

commit 01e3ae2
Merge: 49b3e90 da48649
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:23:25 2014 +0800

    Merge pull request cocos2d#8606 from andyque/fixButtonContentSize

    fix button title only content size issue

commit 49b3e90
Merge: df60fde f97a7ae
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:22:17 2014 +0800

    Merge pull request cocos2d#8604 from samuele3hu/v3_3D

    Add CameraTest、OBBTest and related lua bindings

commit 7fb448e
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Fri Oct 10 15:13:05 2014 +0800

    add 'static' for global function

commit df60fde
Merge: 4856b67 d5fe075
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:05:39 2014 +0800

    Merge pull request cocos2d#8610 from andyque/fixCocostudioIncludePath

    fix cocostudio include path

commit a08d0e4
Merge: e69465e 2a95286
Author: Huabing.Xu <dabingnn@gmail.com>
Date:   Fri Oct 10 15:05:09 2014 +0800

    Merge branch 'v3' into v3_fixGLProgramCrash

commit 4856b67
Merge: 2a95286 e9e9741
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 15:00:28 2014 +0800

    Merge pull request cocos2d#7979 from giginet/scene-reader-canvas-size

    SceneReader sets contentSize by canvasSize.

commit e69465e
Author: Huabing.Xu <dabingnn@gmail.com>
Date:   Fri Oct 10 14:06:37 2014 +0800

    remove texture unit 4-7, only 0 -3 is reserved

commit f097c76
Author: Huabing.Xu <dabingnn@gmail.com>
Date:   Fri Oct 10 14:05:57 2014 +0800

    fix compile error for macro redefinition

commit 250875b
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Fri Oct 10 14:03:20 2014 +0800

    fixed compile error

commit d5fe075
Author: andyque <guanghui8827@126.com>
Date:   Fri Oct 10 13:48:49 2014 +0800

    fix cocostudio include path

commit 6a8c4f4
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Fri Oct 10 11:59:35 2014 +0800

    Fixed FileUtils::removeFile doesn't work on iOS

commit 2a95286
Merge: ba5ff2e 5b620fb
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 11:13:41 2014 +0800

    Merge pull request cocos2d#7785 from DaisukeHashimoto/fix_CCActionManagerEx_Bug

    use fileName for _actionDic key

commit da48649
Author: andyque <guanghui8827@126.com>
Date:   Fri Oct 10 11:01:51 2014 +0800

    fix button title only content size issue

commit ba5ff2e
Merge: 3aa6337 7a23cc3
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 10:46:24 2014 +0800

    Merge pull request cocos2d#8586 from super626/v3

    Fix warning of Bundle3D and modify light

commit 3aa6337
Merge: d7d52a7 d5e29d2
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 10:41:52 2014 +0800

    Merge pull request cocos2d#8599 from dabingnn/v3_fixEGLConfigOnAndroid

    fix egl config error on android

commit d7d52a7
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 10:19:07 2014 +0800

    [ci skip] Update CHANGELOG

commit 254ee5b
Merge: d5e29d2 f928046
Author: Huabing.Xu <dabingnn@gmail.com>
Date:   Fri Oct 10 10:09:26 2014 +0800

    Merge branch 'v3' into v3_fixGLProgramCrash

commit cbc2a52
Merge: af4a197 5027f24
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 10:08:22 2014 +0800

    Merge pull request cocos2d#8603 from ahlwong/v3

    Fix UIButton Scale 9 Highlight

commit af4a197
Merge: f928046 a5a16ee
Author: minggo <ming@cocos2d-x.org>
Date:   Fri Oct 10 10:02:05 2014 +0800

    Merge pull request cocos2d#8602 from fengl2/patch-1

    the android library path in proj.andriod/project.properties file is wrong

commit 7a23cc3
Merge: 1ef511d b77559f
Author: yangxiao <yangxiao@cocos2d-x.org>
Date:   Fri Oct 10 09:55:56 2014 +0800

    Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3

commit 1ef511d
Merge: 88fc425 f928046
Author: yangxiao <yangxiao@cocos2d-x.org>
Date:   Fri Oct 10 09:53:57 2014 +0800

    Merge branch 'newcode' into v3

commit f97a7ae
Merge: 115d815 f928046
Author: samuele3hu <qingkui.hu@cocos2d-x.org>
Date:   Fri Oct 10 09:52:29 2014 +0800

    Merge branch 'v3' of https://github.com/cocos2d/cocos2d-x into v3_3D

commit 115d815
Author: samuele3hu <qingkui.hu@cocos2d-x.org>
Date:   Fri Oct 10 09:49:25 2014 +0800

    Add CameraTest、OBBTest and related lua bindings

commit 5027f24
Author: Ahlwong <alexanderhlwong@gmail.com>
Date:   Thu Oct 9 12:48:09 2014 -0700

    Fix UIButton Scale 9 Highlight

commit a5a16ee
Author: NeoLeeee <lifengdmu@gmail.com>
Date:   Fri Oct 10 01:33:41 2014 +0800

    the android library path is wrong

    if you run the following command in your game forder

    cocos run -p android

    it will give you the following error since the path is wrong

    BUILD FAILED
    /Users/lifeng/dev/adt_bundle_mac/sdk/tools/ant/build.xml:459: ../../../cocos/platform/android/java resolve to a path with no project.properties file for project /Users/lifeng/study/cosco2dx/MyFirstGame/proj.android

commit d5e29d2
Author: Huabing.Xu <dabingnn@gmail.com>
Date:   Thu Oct 9 18:34:14 2014 +0800

    fix gel Config error on android

commit b77559f
Merge: 88fc425 34efbf1
Author: XiaoYang <yangxiao@cocos2d-x.org>
Date:   Thu Oct 9 18:31:24 2014 +0800

    Merge pull request cocos2d#136 from songchengjiang/new_v3

    Fixed CosOuterAngle error

commit 83150aa
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Thu Oct 9 17:19:43 2014 +0800

    fix warns and memory leak

commit f928046
Merge: db72756 8ea473d
Author: minggo <ming@cocos2d-x.org>
Date:   Thu Oct 9 17:05:39 2014 +0800

    Merge pull request cocos2d#8580 from Dhilan007/v3-labelfix

    issue cocos2d#8492:fix endless loop when dimensions that are not enough to fit one character

commit 88fc425
Merge: 222bf57 7ecd8c5
Author: yangxiao <yangxiao@cocos2d-x.org>
Date:   Thu Oct 9 17:02:10 2014 +0800

    Merge branch 'v3' of https://github.com/super626/cocos2d-x into v3

commit 222bf57
Merge: c087f31 db72756
Author: yangxiao <yangxiao@cocos2d-x.org>
Date:   Thu Oct 9 17:01:35 2014 +0800

    Merge branch 'newcode' into v3

commit 34efbf1
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Thu Oct 9 16:16:02 2014 +0800

    Fixed getCosOuterAngle errors

commit 88012cf
Merge: 9ba70ec 7ecd8c5
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Thu Oct 9 15:49:50 2014 +0800

    Merge branch 'v3_new' into v3

    Conflicts:
    	tests/lua-tests/src/Sprite3DTest/Sprite3DTest.lua

commit 7ecd8c5
Merge: c087f31 cba155b
Author: XiaoYang <yangxiao@cocos2d-x.org>
Date:   Thu Oct 9 10:14:06 2014 +0800

    Merge pull request cocos2d#135 from lvlonggame/v3

    Remove string err that is no used

commit c087f31
Author: yangxiao <yangxiao@cocos2d-x.org>
Date:   Thu Oct 9 10:12:52 2014 +0800

    modify return type of getDirection and getDirectionInWorld

commit 6f50143
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Wed Oct 8 18:28:24 2014 +0800

    Fixed LabelAtlas opacity do not change when setting parent node's opacity

commit 8ea473d
Author: Dhilan007 <wenhai.lin@chukong-inc.com>
Date:   Wed Oct 8 18:22:35 2014 +0800

    fix endless loop when dimensions that are not enough to fit one character

commit cba155b
Author: lvlong <lvlong@chukong-inc.com>
Date:   Wed Oct 8 15:23:31 2014 +0800

    Remove string err no used

commit 9ba70ec
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Mon Sep 29 16:57:45 2014 +0800

    Sprite3DHitTest use BoundingBox

commit a2a5234
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Mon Sep 29 11:43:52 2014 +0800

    Finished Sprite3DHitTest

commit 3b7dd19
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Sun Sep 28 18:05:09 2014 +0800

    Add Sprite3DHitTest

commit ca4fa42
Author: songchengjiang <songcheng.jiang@chukong-inc.com>
Date:   Sun Sep 28 17:01:43 2014 +0800

    Sprite3DTest.lua:
    Add Sprite3DWithSkinTest
    Add AttachmentTest
    Add Sprite3DReskinTest
    Add Sprite3DMirrorTest

commit e9e9741
Author: giginet <giginet.net@gmail.com>
Date:   Tue Sep 9 22:30:52 2014 +0900

    SceneReader sets contentSize by canvasSize.

    We could not get the canvas size of the scene which created on CocosStudio.

    Thanks to this commit, we can get scene's canvas size by Node::getContentSize()

    ```cpp
    auto scene = cocos2d::cocostudio::SceneReader::getInstance()->createNodeWithSceneFile("Scene.json");
    int width = scene->getContentSize().width;
    int height = scene->getContentSize().height;
    cocos2d::log("canvasSize = %d, %d", width, height);
    ```

commit 5b620fb
Author: Daisuke Hashimoto <dsk.hashimoto@gmail.com>
Date:   Thu Aug 14 21:10:51 2014 +0900

    use fileName for _actionDic key
@giginet giginet deleted the scene-reader-canvas-size branch October 19, 2014 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants