Animations
Step 1
Use [light.showAnimationFrame(light.rainbowCycleAnimation())]
and make your code look like this:
light.showAnimationFrame(light.rainbowCycleAnimation())
Step 2
Put a while loop around it, so it runs indefinitely.
control.forever(() => {
light.showAnimationFrame(light.rainbowCycleAnimation())
})
control.forever(() => {
light.showAnimationFrame(light.rainbowCycleAnimation())
})
Try some of the other animations:
Sparkle
control.forever(() => {
light.showAnimationFrame(light.sparkleAnimation())
})
Color Wipe
control.forever(() => {
light.showAnimationFrame(light.colorWipeAnimation(light.colors(0xff0000)))
})
Theatre Chase
control.forever(() => {
light.showAnimationFrame(light.theatreChaseAnimation())
})