-
Notifications
You must be signed in to change notification settings - Fork 0
/
444idk.js
56 lines (37 loc) · 1000 Bytes
/
444idk.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
let video;
let tex,tex2;
function preload(){
myShader = loadShader("444.vert", "444.frag");
img = loadImage('idk.png');
}
function setup() {
createCanvas(1920, 1080,WEBGL);
tex = createGraphics(1920, 1080);
tex2 = createGraphics(1920, 1080, WEBGL);
}
function draw() {
// image(video, 0, 0);
background(0);
translate(-width/2,-height/2);
tex.image(img,0,0, width, height);
// tex.push();
// tex.background(0);
// tex.textFont(font);
// tex.textSize(width / 10);
// tex.textAlign(CENTER, CENTER);
// tex.fill(255);
// tex.text(quotes[0],0,0);
// tex.pop();
shader(myShader);
myShader.setUniform("u_time", frameCount * 0.01);
myShader.setUniform("u_resolution", [width, height]);
myShader.setUniform("tex", tex);
myShader.setUniform('texelSize', [1.0/width, 1.0/height]);
rect(0,0,width,height);
}
function mousePressed() {
if (mouseX > 0 && mouseX < 100 && mouseY > 0 && mouseY < 100) {
let fs = fullscreen();
fullscreen(!fs);
}
}