fixing mouse interaction

This commit is contained in:
Patricio Gonzalez Vivo 2015-03-18 09:03:20 -04:00
parent 7565766024
commit e5115ade1f

View File

@ -455,7 +455,7 @@ function renderShader( _billboard ) {
mouse.y <= rect.bottom){ mouse.y <= rect.bottom){
var mouseLocation = _billboard.gl.getUniformLocation(_billboard.program, "u_mouse"); var mouseLocation = _billboard.gl.getUniformLocation(_billboard.program, "u_mouse");
_billboard.gl.uniform2f(mouseLocation,mouse.x-rect.left,_billboard.canvas.height-mouse.y-rect.top); _billboard.gl.uniform2f(mouseLocation,mouse.x-rect.left,_billboard.canvas.height-(mouse.y-rect.top));
} }
// set the resolution uniform // set the resolution uniform