Back to Contents
First, make sure you have:
(as of June 2020)
This isn't a true tutorial, just pointers:
scripts/firework.js for a simple firework particle effect.
Launch multiple with
launchRandomFireworks(minCount,maxCount,minThrust,maxThrust,minAlt,maxAlt,minX,maxX,spawn,gravity,millisPerFrame,timeToLive,finalLaunchTime, optional fireworkStopEvent)
minCount,maxCount are the potential number of fireworks to use (inclusive)
minThrust,maxThrust are the potential speeds of the fireworks (pixels per
minAlt,maxAlt are the potential heights before the fireworks explode.
minX,maxX, are the range of potential X coordinates the firework may launch from.
spawn is how many particles spawn off of a single firework
gravity is the pull of gravity per frame
millisPerFrame is the length between each update interval, Note that almost all of these values depend on this update interval.
timeToLiveis how long the fireworks exist before being cleared
finalLaunchTime is the longest time to wait before a firework can be launched. The first firework always launches immediately.
optional fireworkStopEventA function to call when the fireworks are considered
Stop the fireworks with
- Start with
- Stop with
rewardAutoScrollStop(); If tying this in with fireworks, call this with