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

[PoemBot][HOC] Make foreground effects one-time bursts #42259

Merged
merged 8 commits into from Aug 31, 2021

Conversation

ajpal
Copy link
Contributor

@ajpal ajpal commented Aug 30, 2021

Request from Amy: could we do all the foreground effects with a do [dropdown] and in the dropdown all the foreground effects are there? We basically do 1 second of the effect. That 1 second varies based on the when the animation "ends" for something like ripple or starburst.

Basically, makes it so that instead of foreground effects continuously cycling through the effect, it just happens once.

There are two pieces here:

  1. Make it so there can be multiple foreground effects at once. This is commits a658861 and 1faffe5.
  2. Update each effect so that it works as a burst. This is commit 0f3684b. There might be some additional parameter tuning needed here as follow-up work once Amy and Mike start playing with the effects.

Aug-30-2021 15-30-31

@ajpal ajpal requested a review from a team August 30, 2021 22:31
@@ -2,7 +2,7 @@
"category": "",
"config": {
"func": "setForegroundEffect",
"blockText": "set foreground effect {EFFECT}",
"blockText": "do {EFFECT} effect",
Copy link
Contributor

Choose a reason for hiding this comment

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

[this can happen post-playtest] should we rename the func/file for this block?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's a good callout. Changing the names of blocks is tough because it requires updating all the levels that use the block, and also breaks existing student projects that use the block. As a result, we've ended up with a bunch of block names that aren't quite right, but aren't worth fixing.
In this case, I held off on doing it as part of this change because I'm not sure whether this block is 100% settled or still iterating. Also, I didn't want to have to update all the playtest levels right away :) I think we should wait until after the playtest and get the block 100% finalized, then change the name before launch.

Copy link
Contributor

Choose a reason for hiding this comment

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

perfect, i think that's the right direction here

});
confetti = confetti.filter(confetto => confetto.y < 420);
this.p5.noStroke();
confetti.forEach(confetto => {
Copy link
Contributor

Choose a reason for hiding this comment

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

lol'ing that i never thought about the singular of "confetti"

break;
}
case 'bubbles': {
let bubbles = [];
this.foregroundEffect = () => {
for (let i = 0; i < 25; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit for this effect and others that now generate a set number of items in the effect: we should pull this value into a constant so we can easily identify/change how many bubbles are generated as part of the effect

@ajpal ajpal merged commit dcafd50 into staging Aug 31, 2021
@ajpal ajpal deleted the aug30-foreground-effects branch August 31, 2021 19:16
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

Successfully merging this pull request may close these issues.

None yet

2 participants