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

Implement TransitionTag #674

Merged
merged 1 commit into from Feb 28, 2022
Merged

Implement TransitionTag #674

merged 1 commit into from Feb 28, 2022

Conversation

MiniDigger
Copy link
Member

@MiniDigger MiniDigger commented Feb 9, 2022

https://streamable.com/ysh2r5

https://streamable.com/o3g0qn

      sender.sendMessage("transition:white:black:red");
      for (float phase = 0; phase <= 1; phase += 1 / 16f) {
        sender.sendMessage(MiniMessage.miniMessage().deserialize("<transition:white:black:red:" + phase + ">Hello World " + phase));
        Thread.sleep(100);
      }
      sender.sendMessage("transition:white:black:red:blue");
      for (float phase = 0; phase <= 1; phase += 1 / 16f) {
        sender.sendMessage(MiniMessage.miniMessage().deserialize("<transition:white:black:red:blue:" + phase + ">Hello World " + phase));
        Thread.sleep(100);
      }
      sender.sendMessage("- 1 transition:white:black:red");
      for (float phase = -1; phase <= 1; phase += 1 / 16f) {
        sender.sendMessage(MiniMessage.miniMessage().deserialize("<transition:white:black:red:" + phase + ">Hello World " + phase));
        Thread.sleep(100);
      }
      sender.sendMessage("- 1transition:white:black:red:blue");
      for (float phase = -1; phase <= 1; phase += 1 / 16f) {
        sender.sendMessage(MiniMessage.miniMessage().deserialize("<transition:white:black:red:blue:" + phase + ">Hello World " + phase));
        Thread.sleep(100);
      }



      for (int i = 0; i < 1000; i++) {
        final double angle = (2.0 * Math.PI * i) / 100;
        final double sin = Math.sin(angle);
        sender.sendMessage(MiniMessage.miniMessage().deserialize("<transition:white:black:red:blue:" + sin + ">Hello World " + sin));
        Thread.sleep(100);
      }

@zml2008
Copy link
Member

zml2008 commented Feb 9, 2022

blocked by #672

@MiniDigger MiniDigger added this to the 4.10.0 milestone Feb 13, 2022
@MiniDigger MiniDigger changed the title Implement TransitionTransformation Implement TransitionTag Feb 14, 2022
Copy link
Member

@kezz kezz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a matching docs PR/issue but LGTM!

@kezz
Copy link
Member

kezz commented Feb 28, 2022

Would be nice in the future to abstract more of this logic out somehow. Still a lot repeated between here and the new abstract class for gradients/rainbows.

@MiniDigger
Copy link
Member Author

docs pr KyoriPowered/adventure-docs#67

This was referenced Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Complete small phase to big phase text gradient transition
3 participants