Première version GPU des effets de fond

This commit is contained in:
2026-08-02 15:31:55 +02:00
parent 9f67c28bc0
commit 3e7c9475e5
7 changed files with 363 additions and 104 deletions
+2 -34
View File
@@ -1,41 +1,9 @@
import { loadEvents } from './events.js'
import { loadStatus } from './status.js'
import { scanlinesAnimation } from './cuteTexture.js'
import { noiseAnimation } from './cuteTexture.js'
import { loadCanvas } from './cuteTexture.js'
import { initCuteTexture } from './cuteTexture.js'
// =================================== background texture
loadCanvas();
let backgroundVideo = document.querySelector('main > #background');
let proxyTarget = {};
let proxyHandler = {
};
export let statusProxy = new Proxy(proxyTarget, {
set(obj, prop, value){
if(prop === 'lolStatus'){
if (value){
backgroundVideo.style.visibility = 'visible';
scanlinesAnimation();
return true
} else {
backgroundVideo.style.visibility = 'collapse';
noiseAnimation();
return true
}
}
}
})
statusProxy.lolStatus = false;
//console.log(proxyTarget.lolStatus);
initCuteTexture()
// ======================================== events & statut d'ouverture
loadEvents();