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

Canvas Render: Animation doesn't run if color setted in the sprite #3549

Open
milomartinez opened this issue Feb 8, 2018 · 0 comments
Open

Comments

@milomartinez
Copy link

Hello Mates, I found a weird behaviour with animation,
first i set “debugMode” : 1, (so should be using canvas mode render), then i run a simple animation into a sprite:

cc.spriteFrameCache.addSpriteFrames(res.celebrations_plist);
        var aAnimationFrames = [];
        for (var i = 1; i <= 7; i++) {
            var seqStr = "tail_";
            var str = seqStr + i + ".png";
            var frame = cc.spriteFrameCache.getSpriteFrame(str);
            aAnimationFrames.push(frame);
        }

        var cAnimations = new cc.Animation(aAnimationFrames, 0.05, 10);
        var animate = cc.repeatForever (new cc.Animate(cAnimations));
        this.setColor(cc.color(255,0,255));
        this.runAction(animate)

and the animation doesn’t work, if i comment setColor out it works, and also works if i set OPENGL render mode.
tested on chomium Version 64.0.3282.119 (ubuntu and windows, same behaviour)

any thoughts guys?

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

No branches or pull requests

1 participant