warpspeed icon indicating copy to clipboard operation
warpspeed copied to clipboard

Dynamic parameter changes?

Open ogrotten opened this issue 3 years ago • 1 comments

I've created WarpSpeed.prototype.update() method that takes in a complete config object (your copied config) and remaps it to this.VARS just like your prototype constructor.

I have moved the config to the index, and am allowing the user to dynamically change the config parameters by sending to the update method.

I have logs inside of draw() that show that the value has changed, but it doesn't redraw with the new parameters. IOW, if I change STAR_SCALE, the variable changes, but the screen does not.

Right now I'm just sending the config via update, but I've even tried to destroy and recreate the original.

Would you be so kind as to take a look at my source and see what I'm missing?

https://github.com/ogrotten/wallpapers/tree/warpspeed/star_drive (index and starry.js)

ogrotten avatar Jun 18 '22 14:06 ogrotten

Well it seems I figured it out like minutes after posting.

ogrotten avatar Jun 18 '22 15:06 ogrotten