-
Notifications
You must be signed in to change notification settings - Fork 486
Add SkeletonAnimation and GLProgram to the list of extendable classes. #1132
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
Conversation
Build was failed because cocos2d-x branch need to merge this pull request: cocos2d/cocos2d-x#9199 |
@@ -241,3 +241,5 @@ cc.ScrollView.extend = cc.Class.extend; | |||
cc.TableView.extend = cc.Class.extend; | |||
cc.TableViewCell.extend = cc.Class.extend; | |||
|
|||
sp.SkeletonAnimation.extend = cc.Class.extend; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please create frameworks/js-bindings/bindings/script/jsb_spine.js
file and put all related scripts there, for package division purpose we need to separate scripts for different modules
Please do not commit anything under |
Hi @pandamicro. Please take a look at the fixed implementation. Thanks. |
It should be ok, can you add a test case for it ? We can't merge any feature without a test case |
Yeah, I will do it ASAP. |
As it won't work unless the C++ API get bound, I'm not sure it worth your time now to create a test case |
@pandamicro, okay. I will try to send pull request to the spine runtimes repository first. |
@pandamicro, or maybe you can suggest how we can solve this on javascript level? Because I not understand yet how we can bind class with protected empty constructor. |
In fact, we used CC_CONSTRUCTOR_ACCESS macro for constructors and init functions, the value is |
It's ok, but current version of |
I think that Spine guys haven't taken account of JSB needs when they implement it. |
Sure! Therefore, we return to the previous question. |
I think you mean: how we can bind class with protected empty constructor. We can't, all protected functions are ignored by bindings generator |
So it's mean that if we can't change Spine runtime do not accept that changes. In that case I don't know what can I do with it. |
Can you give the link of the discussion? |
@pandamicro sorry, it was just my guess. I created a pull request at spine-runtimes repo: EsotericSoftware/spine-runtimes#333 but as @NathanSweet wrote he is will travel a few weeks and can not accept any pull requests. |
Hi. So, @NathanSweet closed my pull request. Can we move forward with my feature request? Thanks. |
Yes, I saw it, finally. I will try to sync spine runtime for Cocos2d-x tomorrow then we can finally get to this PR. Really appreciate your effort |
@IgorMats I have a question about your modification, Why are you skipping the default |
@pandamicro I don't remember exactly. It was a too long time ago) Sorry. |
I think there was a some problem related to the empty constructor and priority of calling constructor, |
Hi, @pandamicro thanks. I'm alredy do it right now. I will finish ASAP. |
@pandamicro ok, so build was successful. Now I will try to add some test case. |
@pandamicro I tested it on our company project just now and it works like a charm for both: Android, iOS and Web. Now, can your tell me please what kind of test I must to implement? Thanks. |
Great ! You are so efficient ! |
If you can do it within one day, I think I can merge it into 3.3, because it's supposed to be released by the end of this week. |
OK, I will do it today. Thanks. |
@pandamicro sorry, but I can't do it today. Now we have some active hostilities in our country :( |
Hang in there man ! I want you to know that the cocos team are all with you ! |
Add SkeletonAnimation and GLProgram to the list of extendable classes.
@IgorMats 小伙子加油! Hope the world will be peace! |
…nding SkeletonAnimation
#1132: Improved `_ctor` implementation and added test for extending SkeletonAnimation
Everything will be ok |
my first message ,Good Luck for you and your family! |
Oh, thank you guys! Now we have a big problem with safety, but I will try to continue work on cocos2d-js. @pandamicro thank you for completion of my PR. I apologize that I could not finish it myself. |
It's totally ok, we really appreciate your effort on Cocos2d-JS ! Take care and be safe ! |
I admire you, and Thanks! |
Hi.
In my case it was very useful to add
SkeletonAnimation
andGLProgram
to the list of extendable classes...For
GLProgram
extend I've added onlycc.GLProgram.extend = cc.Class.extend
, but it was very hard to extendSkeletonAnimation
class:This branch:
SkeletonAnimation
to the list of extendable classes;Cocos2d-x branch:
SkeletonAnimation
visible (public);initWithFiles
method which will be called from:_ctor
function.What do you think about it?
Thank you!