diff --git a/main.lua b/main.lua index 8c5fd44..159a145 100644 --- a/main.lua +++ b/main.lua @@ -109,6 +109,7 @@ function love.draw() lg.line(p3) end end + --[[ 3D tangent lines not working do -- Draw tangent line local mx = love.mouse.getX() local my = love.mouse.getY()/2 - 1/3*H @@ -122,6 +123,7 @@ function love.draw() lg.line(mx-h, y - h*dydx, mx + h, y + h*dydx) lg.setColor(255,255,255) end + ]] local shader shader = love.keyboard.isDown('g') and s1g or s1 @@ -142,7 +144,7 @@ function love.draw() lg.draw(canv,W-cw,2*ch) lg.setShader(nil) - lg.setColor(0,0,0,100) + lg.setColor(0,0,0,150) lg.rectangle('fill',0,0,W,font:getHeight()+love.window.toPixels(5)) lg.rectangle('fill',0,H/3,W,font:getHeight()+love.window.toPixels(5)) lg.rectangle('fill',0,2*H/3,W,font:getHeight()+love.window.toPixels(5)) @@ -154,6 +156,9 @@ function love.draw() lg.printf("1D_Noise_Shader(x)", 0,5, W-5, 'right') lg.printf("2D_Noise_Shader(x,y)", 0,5+H/3, W-5, 'right') lg.printf("3D_Noise_Shader(x,y,time)", 0,5+2*H/3, W-5, 'right') + + lg.setColor(20,200,20) + lg.printf("hold 'h' for histograms, 'g' for gradients", 5,5, W-5, 'center') end function love.update(dt)