examples
_animations
- animating-circles.js
- circle-grid.js
- circles-border-timer.js
- circles-inout.js
- circles.js
- cloud-delay.js
- clown.js
- drops.js
- grid.js
- helloworld-animate.js
- keyframe.js
- shapes-border.js
- square-grid.js
- squares-border-timer.js
- squares-timer-overlap.js
- troll.js
- circles2.js
- helloworld-animate2.js
- keyframe2.js
- keyframe3.js
_audio
_gravity
_particles
_sub
display
movement
- arrows-aim-shoot.js
- arrows-line.js
- arrows-rotate.js
- arrows-shift.js
- arrows-x.js
- arrows-y.js
- drag-drop.js
- falling-click.js
- follow-line.js
- follow-x.js
- follow-y.js
- follow.js
- if-on-edge-bounce.js
- input-aim-shoot.js
- input-point-goto.js
- input-point-moveto.js
- joystick.js
- strech-back-release-physics.js
- stretch-front-release-physics.js
- stretch-front-release.js
- drag-drop2.js
physics
showcase
tests
user-interface
display-each.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.circle(480, 320, 50)
display.cloud(100, 200, 50)
display.ellipse(100, 300, 20, 40)
display.heart(100, 200, 50)
display.line(100, 200, 200, 300)
display.polygon(480, 320, 50, 5)
display.rect(100, 100, 100, 100)
display.star(100, 200, 50)
let changeProperties = (element) => {
element.position = random.position()
element.color = color.hsb(random.number(0, 360), 75, 95)
element.borderColor = element.color.darker(5)
element.borderWidth = 10
}
display.each("circle", changeProperties)
display.each("cloud", changeProperties)
display.each("ellipse", changeProperties)
display.each("heart", changeProperties)
display.each("line", changeProperties)
display.each("polygon", changeProperties)
display.each("rect", changeProperties)
display.each("star", changeProperties)