examples

cloud-delay.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
display.color = color.hsb(0, 0, 92)

repeat(25, () => {
  display.cloud(random.pos(), 50)
})

timer.every(3000, () => {
  display.each("cloud", (cloud) => {
    cloud.animate(
      {
        duration: random.num(400, 2000),
        easing: Easing.easeInOutCubic
      }, (to) => {
      to.angle += 360
      to.color = color.hsb(
        random.num(0, 360),
        42,
        92
      )
      to.position = random.pos()
      to.alpha = random.num(0, 1)
    })
  })
})