make canvas example more fun

pull/5065/head
Richard Harris 4 years ago
parent 8bb0c80c2c
commit 1644f207b1

@ -20,7 +20,7 @@
const t = window.performance.now();
const r = 64 + (128 * x / canvas.width) + (64 * Math.sin(t / 1000));
const g = 64 + (128 * y / canvas.height) + (64 * Math.cos(t / 1000));
const g = 64 + (128 * y / canvas.height) + (64 * Math.cos(t / 1400));
const b = 128;
imageData.data[p + 0] = r;

Loading…
Cancel
Save