examples

star.js

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
world.frame()

st=display.star(100, 200, 50)
st.color = color.hsb(180, 50, 10)
st.borderColor = color.hsb(180, 50, 100)
st.borderWidth = 2
physics.add(st)

poly=display.polygon(200, 200, 50, 5)
physics.add(poly)

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

app.clicked((elem) => {
  elem.applyImpulse(random.num(-50, 50), -100)
})