Ripples pass now supports five simultaneous clicks; the ripples are circular, accounting for the aspect ratio; click event is handled within the ripples pass module.

This commit is contained in:
Rezmason
2022-08-02 03:39:57 -07:00
parent f0ffa6fce2
commit 503c97adeb
3 changed files with 35 additions and 42 deletions

View File

@@ -58,15 +58,6 @@ export default async (canvas, config) => {
// }
resize();
window.ripples = [0,0,0]
window.onclick = (e) => { // ripple init
console.log(e)
window.ripples = [Date.now(), (e.clientX/e.srcElement.clientWidth*2)-1, (e.clientY/e.srcElement.clientHeight*2)-1]
// console.log(ripples)
}
const regl = createREGL({
canvas,
extensions: ["OES_texture_half_float", "OES_texture_half_float_linear"],