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

repeatYoYo bug #7

Closed
playif opened this issue Aug 6, 2014 · 6 comments
Closed

repeatYoYo bug #7

playif opened this issue Aug 6, 2014 · 6 comments
Assignees
Labels

Comments

@playif
Copy link

playif commented Aug 6, 2014

Please take a look at the post for details.
https://code.google.com/p/java-universal-tween-engine/issues/detail?id=14

@xaguzman xaguzman added the bug label Aug 6, 2014
@xaguzman
Copy link
Owner

xaguzman commented Aug 6, 2014

I have been meaning to take a look into this, just haven't had time in the last couple days...
will see how to fix this ASAP

@xaguzman
Copy link
Owner

xaguzman commented Aug 6, 2014

I just tried to run your tests, I was unable to do so. Seems the version you have up is not fully set to run the tests.

Would you mind helping me by updating your github's repo?

Would help me a lot to test this

@xaguzman xaguzman self-assigned this Aug 6, 2014
@playif
Copy link
Author

playif commented Aug 6, 2014

You mean you can't run my examples? I don't really know what's wrong with my repo... I just worked fine before pushing my codes.
Could you please tell me what problems have you encountered?

In fact, I fixed the issue internally...and did some changes on Tween Engine to fit my dart Phaser...
(some changes may decrease the scalability or security, but make it easy to be wrapped)

However...I believe that you can fix it by simply add one line.

In line 244 of https://github.com/xaguzman/tween-engine-dart/blob/master/lib/src/timeline.dart

    if (!isIterationStep && step < lastStep) {
      assert(delta <= 0);
      num dt = isReverse(lastStep) ? -delta - 1 : delta + 1;
// set the _IsIterationStep to false;
      _children.reversed.forEach((BaseTween tween){
        tween._isIterationStep=false;
        tween.update(dt);
      });
      return

@xaguzman
Copy link
Owner

xaguzman commented Aug 6, 2014

actually, the problem seems to be the line right before your comment:

num dt = isReverse(lastStep) ? -delta - 1 : delta + 1; 

It is just the same as when delta is positive ( step > lastStep)
So, switching the values should work. I did that, but can't test it with your code.

You mean you can't run my examples? I don't really know what's wrong with my repo... I just worked fine before pushing my codes.
Could you please tell me what problems have you encountered?
It throws an noSuchMethod error.
it comes from the Color class, these lines :

 static Color getRGB(int color) {
    Color c = new Color();
    if (color > 16777215) {

for some reason, when the stage builds tries to set the background color...it doesn't happen.

Basically, in the stage constructor there seems to be an issue here:

setBackgroundColor(backgroundColor) {
    Color rgb;
    if (backgroundColor is String) {
      rgb = Color.hexToColor(backgroundColor);
      this._backgroundColor = Color.getColor(rgb.r, rgb.g, rgb.b);
    } else {
      rgb = Color.getRGB(backgroundColor); //when it gets to this line...backgroundColor doesn't exist within the class
      this._backgroundColor = backgroundColor;
    }

    this.backgroundColorSplit = [rgb.r / 255, rgb.g / 255, rgb.b / 255];
    this.backgroundColorString = Color.RGBtoString(rgb.r, rgb.g, rgb.b, 255, '#');

  }

I guess it may be an issue with my dart editor ( currently it's version 1.5.3).
Will update and see if it keeps happening

EDIT: just tried with DartEditor 1.5.8 (currently, the latest stable version) and it's still happening

@xaguzman
Copy link
Owner

xaguzman commented Aug 6, 2014

This has been solved in version 0.10.1

Please grab latest version from pub

@playif
Copy link
Author

playif commented Aug 6, 2014

I found out the problem... the dart Phaser use a local PIXI libary, which is not updated to pub.

Any way, I have upgraded to 0.10.1, and everything works fine, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants