回复:答复: holiday tomorrow friday: 4th july

13 views
Skip to first unread message

张晓龙

unread,
Jul 7, 2014, 1:51:24 AM7/7/14
to 张成(引擎), Xiao Yang, Xiaoming Zhang, 谢鑫, 尹凯乐, Ricardo Quesada, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com

I don’t think using namespace is a best way.

Too many namespace will confuse users,and it is not too convenient.


Ricardo, what’s your opinion?


_________________
Eddy Zhang 张晓龙

Chukong Technologies, Inc.
Cocos Engine | Cocos Studio


Disclaimer
The information contained in this e-mail message (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s). If you are not an intended addressee, any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited. If you have received this communication in error, please delete this communication and contact us by replying to this e-mail or by fax or phone immediately.
本电子邮件包含的信息(及其传送的附件)载有保密内容,且仅为指定收件人使用。若您并非指定收件人,请切勿披露、复印、分发或以其他方式散发或使用本电子邮件。若您误收到本电子邮件,请立即删除本电子邮件,并回复此邮件或以电话或传真方式与我们联系。

 原始邮件 
发件人: 尹凯乐<kail...@chukong-inc.com>
收件人: 张成(引擎)<zhang...@chukong-inc.com>; Xiao Yang<yang...@cocos2d-x.org>; Xiaoming Zhang<xiaomin...@cocos2d-x.org>; 张晓龙<xiaolon...@chukong-inc.com>; 谢鑫<xie...@chukong-inc.com>
发送时间: 2014年7月7日(周一) 13:27
主题: 答复: holiday tomorrow friday: 4th july

Hi, xiao yang
    Spine also has a class named Bone, so I think using namespace maybe better.


发件人: 张成(引擎)
发送时间: 2014年7月7日 13:02
收件人: Xiao Yang; Xiaoming Zhang; 张晓龙; 谢鑫; 尹凯乐
抄送: Ricardo Quesada; cocos2d-...@googlegroups.com; cocos3d...@googlegroups.com
主题: 答复: holiday tomorrow friday: 4th july
 

+kaile


发件人: Xiao Yang <yang...@cocos2d-x.org>
发送时间: 2014年7月7日 12:09
收件人: Xiaoming Zhang; 张晓龙; 张成(引擎); 谢鑫
抄送: Ricardo Quesada; cocos2d-...@googlegroups.com; cocos3d...@googlegroups.com
主题: Re: holiday tomorrow friday: 4th july
 

Hi xiaolong, zhangcheng and xiexin,

3D has a class named Bone that conflicts with cocostudio's.

So I can not add some 3D files to the cocos2d.h

There are two solutions for this, 

1. Change 3D bone to another name

2. As minggo suggested, they are in different namespace. However, ArmatureScene.cpp in the cpp-tests using both cocos2d and cocostudio namespace. So we should change it. But I am afraid that many user may use like this, they may complain.

So what is your idea?



On Mon, Jul 7, 2014 at 11:40 AM, Xiaoming Zhang <xiaomin...@cocos2d-x.org> wrote:
Please discuss with Studio team, they maintain these codes.

Best Regards
Minggo




On Jul 7, 2014, at 11:39 AM, Xiao Yang <yang...@cocos2d-x.org> wrote:

Hi minggo,

You are right they are in different namespaces, but ArmatureScene.cpp using both cocos2d and cocostudio namespace. Can I Change the code there.


On Mon, Jul 7, 2014 at 10:45 AM, Xiaoming Zhang <xiaomin...@cocos2d-x.org> wrote:
Another issue is that. We have a class named Bone, but cocostudio also has a class named Bone. Does anybody has a better name for the 3D bone. It will conflict when adding to cocos2d.h otherwise

They are in different namespaces, so i think it is not problem.

Best Regards
Minggo




On Jul 7, 2014, at 10:42 AM, Xiao Yang <yang...@cocos2d-x.org> wrote:

Hi all,

Sprite3D with animation3D calls setUniformLocationWith4fv every frame, and I find Sprite3DTest will crash when changing scene after switching foreground and background back and forth. However, replacing setUniformLocationWith4fv with glUniform4fv will fix the bug.  
So I think there may be bugs of freeing memory on the _hashForUniforms of GLProgram. I am downloading ndk r9d and need to check with the latest code.

Another issue is that. We have a class named Bone, but cocostudio also has a class named Bone. Does anybody has a better name for the 3D bone. It will conflict when adding to cocos2d.h otherwise.


On Fri, Jul 4, 2014 at 9:50 AM, Ricardo Quesada <ricardo...@gmail.com> wrote:
Hey guys,

Tomorrow Friday is holiday in USA, so you might not get any email answer from us.
Have a good weekend!


--
You received this message because you are subscribed to the Google Groups "cocos3d-x-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocos3d-x-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "cocos3d-x-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocos3d-x-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




Xiaoming Zhang

unread,
Jul 7, 2014, 5:48:55 AM7/7/14
to 张晓龙, 张成(引擎), Xiao Yang, 谢鑫, 尹凯乐, Ricardo Quesada, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
namespace is used for this purpose.
Every editor has similar concept, it is common to use the same class name.

It is why we remove CC in v3.c.

Best Regards
Minggo



Ricardo Quesada

unread,
Jul 7, 2014, 1:03:20 PM7/7/14
to Xiaoming Zhang, 张晓龙, 张成(引擎), Xiao Yang, 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Correct,

The namespace helps us with that. But if we could find a better name, it would be great too.

In which context are we using Bone ? In the animations ? If so, what about using the name "AnimationBone", or "SkeletonBone", or something like that ?
And perhaps prefixing all the classes associated with skeleton animation with Skeleton.

ideas?

Xiao Yang

unread,
Jul 7, 2014, 9:27:50 PM7/7/14
to Ricardo Quesada, Xiaoming Zhang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com

The 3D Bone is used in the Animate3D. Animation3D and Animate3D are public to the user. It is not a good idea to prefix them with Skeleton. So we should change Bone only. SkeletonBone or Animate3DBone?

However, minggo and you are right. namespace is for this purpose, there will be many concept conflict in different namespace and we can not change all of them. Therefore, I would like cpp-tests of cocostudio do some change.  And also the users maybe need some change. They should know that there may be some class conflicts using namespace both cocos2d and cocostudio.

So can I do the change? Or some guys from cocostudio do the change? 

Xiaoming Zhang

unread,
Jul 7, 2014, 9:38:11 PM7/7/14
to Xiao Yang, Ricardo Quesada, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Yep. You are right. 
We can not just add prefix when it is conflict. 
I think you can change it.

Best Regards
Minggo



Ricardo Quesada

unread,
Jul 8, 2014, 5:20:53 PM7/8/14
to Xiaoming Zhang, Xiao Yang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
I think what you can do is to create an "internal" namespace for non public classes.

eg:

namespace cocos2d::Skeleton3D {

And here you put all your "private" classes, like Bone and others.
}

But users will use the Public classes for this, like:

cocos2d::Animate3D, or cocos2d::Animation

Xiao Yang

unread,
Jul 8, 2014, 10:27:18 PM7/8/14
to Ricardo Quesada, Xiaoming Zhang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
That is a great idea for non public classes. 

But I think the Bone should be a public class. The user may get the transform of Bones or attach a weapon to a Bone. So the user need to know the concept of Bone. 

Ricardo Quesada

unread,
Jul 8, 2014, 10:29:52 PM7/8/14
to Xiao Yang, Xiaoming Zhang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
How different is this bone from a possible 2d bone ?
Can we reuse this bone for 2d as well ? Or is it different ?

If it is different, perhaps we can call it Bone3D.


You received this message because you are subscribed to the Google Groups "cocos2d JS development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cocos2d-js-dev...@googlegroups.com.
To post to this group, send email to cocos2d-...@googlegroups.com.

Xiaoming Zhang

unread,
Jul 8, 2014, 10:35:30 PM7/8/14
to Ricardo Quesada, Xiao Yang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
I don’t think we should not change class name:
* The issue just exists in a test case, which write “using namespace cocos2d” and “using namespace cocostudio” in cpp. It is fixed just write “cocostudio::bone”.
* The Bone name in 3d exists in alpha version? And rc0 version is released. We can not change name, many guys complained it a lot.
* Spine also have a class named Bone. Should we rename it or change cocostudio::Bone?
* As i said, it is easy to have conflict in different namespaces, we should change the name every time?

Best Regards
Minggo



Xiao Yang

unread,
Jul 8, 2014, 10:46:59 PM7/8/14
to Ricardo Quesada, Xiaoming Zhang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Do you mean cocostudio's bone?

1. The bone doest need many properties that used by Node, so I don't want to inherit from Node.
2. There are some difference how to express the animation data for 2D and 3D. For 3D we use translation, rotation(quaternion) and scale. And use those data to drive the bone.
3. And I find the cocostudio's bone contain a reference to Armature.
 

Ricardo Quesada

unread,
Jul 10, 2014, 1:59:18 PM7/10/14
to Xiao Yang, Xiaoming Zhang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Hi Minggo and rest of the team,

I agree that we shouldn't change the name of class in an RC version.
But if the name is not good, the only chance that we have to change it is RIGHT NOW!. We can only make changes in an RC if it is a blocker.
Because after the final version is released, we won't be able to change it.
Also, I don't think users are using Bone since it was introduced only a few weeks ago.

Since this Bone can't be reused for 2D it make sense to rename it to Bone3D or SkelotonBone3D or something like that.

Xiao Yang

unread,
Jul 10, 2014, 9:57:18 PM7/10/14
to hytcqq, Ricardo Quesada, Xiaoming Zhang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Ok, I will send a pull request a few minutes latter.


On Fri, Jul 11, 2014 at 9:40 AM, hytcqq <hyt...@gmail.com> wrote:
Minggo and Tony,please rename to Bone3D, It's better.

Thanks.

Yingtao

Xiaoming Zhang

unread,
Jul 10, 2014, 10:08:29 PM7/10/14
to hytcqq, Ricardo Quesada, Xiao Yang, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
@Tony
Could you please rename it?

Best Regards
Minggo




On Jul 11, 2014, at 9:40 AM, hytcqq <hyt...@gmail.com> wrote:

Minggo and Tony,please rename to Bone3D, It's better.

Thanks.

Yingtao

在 2014年7月11日,1:59,Ricardo Quesada <ricardo...@gmail.com> 写道:

Xiao Yang

unread,
Jul 10, 2014, 10:13:41 PM7/10/14
to Xiaoming Zhang, hytcqq, Ricardo Quesada, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Yes, I am doing that. 

Ricardo Quesada

unread,
Jul 11, 2014, 12:06:50 PM7/11/14
to Xiao Yang, Xiaoming Zhang, hytcqq, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Minggo and team.

I'll receive the game controllers this Monday / Tuesday.
And I want to test the game controller code before releasing v3.2-fina.

If you plan to release a new version today or Monday, please release v3.2-rc1 (but not the final). And I just a few days to test the controllers.

Thanks!

Xiaoming Zhang

unread,
Jul 12, 2014, 7:51:33 AM7/12/14
to Ricardo Quesada, Xiao Yang, hytcqq, 张晓龙, 张成(引擎), 谢鑫, 尹凯乐, cocos2d-...@googlegroups.com, cocos3d...@googlegroups.com
Ok,  got it.

Best Regards
Minggo



Reply all
Reply to author
Forward
0 new messages