Again, this demo doesn’t add much from the last demo, but demonstrates another use of the SineOscillator. This time, it shows 1180 Orbs oscillating in a grid shape, giving an impression of a waving flag, 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 in a grid and applies the SineOscillator behaviour to oscillate the x, y and alpha values, which gives the impression of a waving flag.
You can grab the source code from GitHub and have a play.