phetsims / vegas

Reusable game components for PhET simulations.
MIT License
1 stars 4 forks source link

Convert RewardNode to use Sprite #84

Open samreid opened 3 years ago

samreid commented 3 years ago

During https://github.com/phetsims/vegas/issues/82 I noticed that even on a very speedy machine the sprites in rewardNode do not animate smoothly, and there is code overhead in setting up a CanvasNode, and calling drawImage on the reward items. Perhaps it would be simpler and have smoother performance to rewrite using SpriteNode? RewardNode already internally converts nodes to images, so that part is already done.

@jonathanolson or @pixelzoom you are more familiar with Sprite, is this a good idea?

pixelzoom commented 3 years ago

RewardNode seems like a perfect fit for Sprites.js -- transforming and drawing many instances of a small set of images. It would probably be < 2 hours work for someone who is already familiar with Sprites.

samreid commented 3 years ago

@ariel-phet can you please assign and prioritize?

pixelzoom commented 1 year ago

Re-assigning to @kathy-phet to prioritize, since that's no longer @ariel-phet's responsibility.