PageSourceSearch

https://aunyks.com/js/art/antsy.js

js aunyks.com collected 2026-10-05 21:29:35 UTC 898 bytes, 46 lines download raw bytes

1function setup() {
2  const cnv = createCanvas(CANVAS_WIDTH, CANVAS_HEIGHT)
3  cnv.parent('sketch-container')
4}
5
6let lastX = randBw(0, CANVAS_WIDTH)
7let lastY = randBw(0, CANVAS_HEIGHT)
8let x = randBw(0, CANVAS_WIDTH)
9let y = randBw(0, CANVAS_HEIGHT)
10let paused = false
11let black = true
12const speed = 15
13let t = Date.now()
14function draw() {
15  if (!black) {
16    stroke(random(0, 255), random(0, 255), random(0, 255))
17  } else {
18    stroke(128)
19  }
20  line(lastX, lastY, x, y)
21  lastX = x
22  lastY = y
23  if (!paused) {
24    x += random(-1 * speed, 1 * speed)
25    y += random(-1 * speed, 1 * speed)
26  }
27  if (x > CANVAS_WIDTH || x < 0 || y > CANVAS_HEIGHT || y < 0) {
28    x = random(0, CANVAS_WIDTH)
29    y = random(0, CANVAS_HEIGHT)
30  }
31}
32
33function touchStarted() {
34  paused = !paused
35  t = Date.now()
36}
37
38function touchEnded() {
39  if (Date.now() - t > 750) {
40    black = !black
41    paused = false
42  }
43}
44
45
46

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.