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

[cocos2dx] Unexpected first frame #1216

Closed
rekcah1986 opened this Issue Nov 27, 2018 · 4 comments

Comments

2 participants
@rekcah1986
Copy link

rekcah1986 commented Nov 27, 2018

Spine: 3.6.53 Professional
Runtime: cocos2d-x 3.17
Spine Runtime: 3.6

gif

Code:

    skeletonNode = SkeletonAnimation::createWithBinaryFile("spine/xmfs.skel", "spine/xmfs.atlas", 1.0f);
    skeletonNode->setAnimation(0, "fx_xmfs_ptgj_attack", false);
	    
    skeletonNode->setPosition(Vec2(_contentSize.width / 2, 120));
    skeletonNode->setScale(0.3);
    addChild(skeletonNode);

xmfs.zip

@rekcah1986 rekcah1986 changed the title Strange Frame Unexpected Frame at create Nov 27, 2018

@rekcah1986 rekcah1986 changed the title Unexpected Frame at create Unexpected frame at create Nov 27, 2018

@badlogic

This comment has been minimized.

Copy link
Collaborator

badlogic commented Nov 27, 2018

I can not reproduce this. I've added your assets to our CoinExample.cpp but do not see the superfluous frame you show in your GIF.

Please provide me with code that reproduces the issue reliably and I'll re-open the issue.

@badlogic badlogic closed this Nov 27, 2018

@rekcah1986

This comment has been minimized.

Copy link
Author

rekcah1986 commented Nov 27, 2018

@badlogic
Try this code and click it more times:

	EventListenerTouchOneByOne* listener = EventListenerTouchOneByOne::create();
	listener->onTouchBegan = [this] (Touch* touch, Event* event) -> bool {
		Director::getInstance()->replaceScene(CoinExample::create()->scene());
		return true;
	};

@badlogic badlogic reopened this Nov 27, 2018

@badlogic badlogic changed the title Unexpected frame at create [cocos2dx] Unexpected first frame Nov 29, 2018

@badlogic badlogic self-assigned this Nov 29, 2018

@badlogic badlogic added bug labels Nov 29, 2018

@rekcah1986

This comment has been minimized.

Copy link
Author

rekcah1986 commented Nov 29, 2018

output.zip
I uploaded the project file if it's helpful, Thanks for helping.

@badlogic badlogic added in progress and removed bug labels Dec 3, 2018

@badlogic badlogic added this to the v3.7 milestone Dec 3, 2018

badlogic added a commit that referenced this issue Dec 4, 2018

[cocos2dx] Closes #1216. Cocos2dx may draw a SkeletonAnimation node b…
…efore its update method is called. The skeleton is thus rendered in the setup pose for the first frame.

@badlogic badlogic closed this in ef5f68d Dec 4, 2018

@badlogic badlogic removed the in progress label Dec 4, 2018

@badlogic

This comment has been minimized.

Copy link
Collaborator

badlogic commented Dec 4, 2018

This has been fixed in the 3.6, 3.7-beta, and 3.7-beta-cpp branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.