Files

82 lines
1.2 KiB
JavaScript
Raw Permalink Normal View History

2025-12-25 11:16:59 +01:00
export default class frostedGlass{
//backgroundImage = "url('/assets/images/frosted.png')";
backgroundSize;
backgroundPosition;
clickPosition = [0,0];
#ifdef WINDOWS
#ifdef DARK
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.png')";
#endif
#ifdef LIGHT
//backgroundImage = "url('/assets/images/wallpapers/windows/lightBlur.png')";
#endif
#endif
#ifdef MACOS
#ifdef DARK
//backgroundImage = "url('/assets/images/wallpapers/ventura/darkBlur.jpg')";
#endif
#ifdef LIGHT
//backgroundImage = "url('/assets/images/wallpapers/ventura/light/lightBlur.jpg')";
#endif
#endif
updateBackgroundCoordinates() {
var backgroundSize = window.innerWidth + "px " + window.innerHeight + "px"
this.backgroundSize = backgroundSize;
this.boxBackgroundSize = backgroundSize;
var boundBox = this.defaultElement.getBoundingClientRect();
var x = boundBox.x * -1;
var y = boundBox.y * -1;
var backgroundPosition = x + "px " + y + "px";
this.backgroundPosition = backgroundPosition;
}
create() {
this.updateBackgroundCoordinates();
}
windowResize() {
this.updateBackgroundCoordinates();
}
}