1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
display.color=color.hsb(0,0,0,10)
let grv = display.circle(display.center, 50)
grv.color = color.clear
grv.tag = "gravity"
times(1000, () => {
let orb = display.circle(display.width / 2, 100, 4)
orb.velocity = Vec2(2, random.num(-1, 1) * 2)
orb.color = color.hsb(random.num(0,360), 75, 95)
})
update(() => {
display.each("circle", (el) => {
grv.applyGravity(el)
})
})
display.color=color.hsb(0,0,0,10)
let grv = display.circle(display.center, 50)
grv.color = color.clear
grv.tag = "gravity"
times(1000, () => {
let orb = display.circle(display.width / 2, 100, 4)
orb.velocity = Vec2(2, random.num(-1, 1) * 2)
orb.color = color.hsb(random.num(0,360), 75, 95)
})
update(() => {
display.each("circle", (el) => {
grv.applyGravity(el)
})
})