javascript/skfb_texture_swap.js
// mix the two images in a hidden canvas
mix the two images in a hidden canvas
mix the two images in a hidden canvas
function mixTextures() {
    ctx.globalAlpha = 1;                        
    ctx.drawImage(img,0,0,c.width,c.height);
    ctx.globalAlpha = slider.value/100;         
    ctx.drawImage(img2,0,0,c.width,c.height);
  }
function mixTextures ( ) { ctx . globalAlpha = 1 ; ctx . drawImage ( img , 0 , 0 , c . width , c . height ) ; ctx . globalAlpha = slider . value / 100 ; ctx . drawImage ( img2 , 0 , 0 , c . width , c . height ) ; }
mix the two images in a hidden canvas
mix the two images in a hidden canvas
// sets the background image opacity to be maximum // set the opacity of the overlying image to transparency of the slider.