Première version GPU des effets de fond
This commit is contained in:
+2
-34
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user