Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
jcponce committed Nov 1, 2024
1 parent 01b5bf9 commit 1043a84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sketches/shaders/julia-mandelbrot/shader.frag
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void main(void)

if (mouseActive == 0. || iMouse.z > 0.) {
colj = mix(colm, colj, clamp(length(colj), 0., 1.)); // mix between mandelbrot and julia
colj = mix(colj, vec3(0.,1.,0.), smoothstep(.03, .02, length(mouse - p))); // add dot
colj = mix(colj, vec3(0.,1.,1.), smoothstep(.03, .02, length(mouse - p))); // add dot
}


Expand Down
10 changes: 8 additions & 2 deletions sketches/shaders/julia-mandelbrot/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function setup() {
createCanvas(windowWidth, windowHeight);
noStroke();

cursor('crosshair')



// shaders require WEBGL mode to work
Expand Down Expand Up @@ -57,8 +57,14 @@ function draw() {
// rect gives us some geometry on the screen to draw the shader on
shaderBg.rect(0, 0, width, height);
image(shaderBg, 0, 0, width, height);
}

if(mouseIsPressed){
cursor('none');
} else {
cursor('crosshair');
}

}

function windowResized() {
resizeCanvas(windowWidth, windowHeight);
Expand Down

0 comments on commit 1043a84

Please sign in to comment.