Closed ajpal closed 5 years ago
Merging #594 into master will increase coverage by
0.02%
. The diff coverage is26.66%
.
@@ Coverage Diff @@
## master #594 +/- ##
==========================================
+ Coverage 31.36% 31.39% +0.02%
==========================================
Files 28 28
Lines 3931 3937 +6
==========================================
+ Hits 1233 1236 +3
- Misses 2698 2701 +3
Impacted Files | Coverage Δ | |
---|---|---|
src/Effects.js | 34.98% <0%> (-0.08%) |
:arrow_down: |
src/p5.dance.js | 84.1% <80%> (-0.06%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update a9b105a...5304fa0. Read the comment docs.
Rad, thanks for fixing!
There were two issues here- not resetting state and creating additional sprites
I added a reset function to the Effect and called it from
p5.dance.reset()
I think this is a pattern we should follow for all backgrounds that have state to clean up, rather than the current practice of doing that cleanup work at the beginning of the nextinit()
The
all dancers do move
block usedthis.p5_.allSprites
, but this background creates 12 additional sprites (4 edges, 8 vertices). Then when we tried to change the animation for these sprites, it failed with: Fixed by settingisDancer
totrue
for all dance sprites when we create dancers, then filteringthis.p5_.allSprites
to only include dancer sprites forall dancers do more