First commit
This commit is contained in:
82
application/elements/window/frostedGlass.js
Normal file
82
application/elements/window/frostedGlass.js
Normal file
@@ -0,0 +1,82 @@
|
||||
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user