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)
grv = display.circle(display.center, 100)
grv.color = color.clear
grv.tag = "gravity"
times(100, () => {
let orb = display.circle(display.width / 2, 100, 4)
orb.velocity = new Point(10, random.num(-10, 10))
orb.color = color.hsb(random.num(0,360), 75, 95)
})
update(() => {
display.each("circle", (el) => {
grv.forceOn(el, 0.075)
})
})
|
display.color=color.hsb(0,0,0,10)
grv = display.circle(display.center, 100)
grv.color = color.clear
grv.tag = "gravity"
times(100, () => {
let orb = display.circle(display.width / 2, 100, 4)
orb.velocity = new Point(10, random.num(-10, 10))
orb.color = color.hsb(random.num(0,360), 75, 95)
})
update(() => {
display.each("circle", (el) => {
grv.forceOn(el, 0.075)
})
})