This demo doesn’t add much from the last demo, but demonstrates another use of the SineOscillator. It shows 120 Orbs oscillating up and down in a sine wave formation, click the image below to see it in action.
Below, I’ve included the source code of the demo. You can have a look through all of the code properly on GitHub, but I’ll give a quick overview.
As mentioned previously, the SineOscillator uses the Sine wave to oscillate the specified property between two values. This demo lays the orbs out evenly across the x axis and applies the SineOscillator behaviour to oscillate the y value from the top to the bottom of the canvas.
You can grab the source code from GitHub and have a play.