final commit
This commit is contained in:
@@ -6,6 +6,7 @@ const params = {
|
||||
fps: 60,
|
||||
zoom: 1, //in pixels per pixel
|
||||
backgroundTicks: 60,
|
||||
disableScreen: false,
|
||||
textSpread: 0,
|
||||
maxSpawns: 1,
|
||||
textAlpha: 0.0,
|
||||
@@ -17,6 +18,11 @@ socket.on("paramUpdate", ({ key, value }) => {
|
||||
console.log(`Updated param ${key} to ${value}`);
|
||||
});
|
||||
|
||||
let bgTick = 0;
|
||||
socket.on("pulse", () => {
|
||||
bgTick = 0;
|
||||
});
|
||||
|
||||
const poem =
|
||||
"everybody is pretty ugly \
|
||||
lover \
|
||||
@@ -119,7 +125,6 @@ const sketch = (p) => {
|
||||
// const stream = c.elt.captureStream(60);
|
||||
};
|
||||
|
||||
let bgTick = 0;
|
||||
let textTick = 0;
|
||||
let sx, sy;
|
||||
let cw, ch;
|
||||
@@ -186,6 +191,7 @@ const sketch = (p) => {
|
||||
function drawTiles(x, y, width, height) {
|
||||
// clear screen
|
||||
p.background(p.color(1, 0, 0, 0));
|
||||
if (params.disableScreen) return;
|
||||
|
||||
p.shader(shaderProgram);
|
||||
// p.ortho(0, p.width, -p.height, 0);
|
||||
|
||||
Reference in New Issue
Block a user