Skip to content

Commit

Permalink
revert-index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
perminder-17 committed Dec 11, 2024
1 parent 3a1df0a commit 5db9a7f
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions preview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,25 @@
import p5 from '../src/app.js';

const sketch = function (p) {
let g, f,s,fragSrc;
let g, f;

p.setup = function () {
p.createCanvas(200, 200);
g = p.createGraphics(200, 200);
f = p.createGraphics(200, 200, p.WEBGL);
fragSrc = `
precision highp float;
void main() {
gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);
}`;
s = p.createFilterShader(fragSrc);
p.fill('red');
p.rect(0,0,100,100)
p.filter(s);
p.filter(p.POSTERIZE, 64);
// p.filter(p.POSTERIZE,64);
// p.filter(s);
};

p.draw = function () {
p.image(f,0,0);
};

p.draw = function () {
p.background(0, 50, 50);
p.circle(100, 100, 50);

p.fill('white');
p.textSize(30);
p.text('hello', 10, 30);

// f.fill('red');
f.sphere();
p.image(f, 0, 0);
};
};

Expand Down

0 comments on commit 5db9a7f

Please sign in to comment.