Skip to content

Commit

Permalink
make some optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
konekowo committed Jun 15, 2024
1 parent 5457a75 commit 14b303c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/Elements/MainMenu/OsuCircle/Menu/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class Menu extends PIXI.Container {
this.menuBG.scale.set(1, 0);
this.menuBG.alpha = 0;
this.addChild(this.menuBG);

}

public Open() {
Expand Down
2 changes: 2 additions & 0 deletions src/Elements/MainMenu/OsuCircle/Triangles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export class Triangles extends PIXI.Container{

}, 800);

this.graphics.rect(0, 0, 1024, 1024);
this.graphics.fill(this.bgGradient);
this.addChild(this.graphics);

this.flash = PIXI.Sprite.from("mainMenu.logoMask");
Expand Down
12 changes: 6 additions & 6 deletions src/Screens/IntroScreen/IntroScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ export class IntroScreen extends Screen {
this.introTrackUrl = URL.createObjectURL(introTrack);
}
public start() {
this.flash.rect(0, 0, 1, 1);
this.flash.fill("white");
this.flash.position.set(0, 0);
this.flash.width = this.getScreenWidth();
this.flash.height = this.getScreenHeight();
this.flash.blendMode = "add";
this.welcomeText.anchor.set(0.5, 0.5);
this.welcomeText.position.set(this.getScreenWidth()/2, this.getScreenHeight()/2);
// timeout to not give the player a jump scare
Expand Down Expand Up @@ -180,12 +186,6 @@ export class IntroScreen extends Screen {
}, 2080);

setTimeout(() => {
this.flash.rect(0, 0, 1, 1);
this.flash.fill("white");
this.flash.position.set(0, 0);
this.flash.width = this.getScreenWidth();
this.flash.height = this.getScreenHeight();
this.flash.blendMode = "add";
this.addChild(this.flash);
this.flashed = true;
this.logoContainerContainer.visible = false;
Expand Down
2 changes: 1 addition & 1 deletion src/Screens/MainMenu/MainMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {OsuCircle} from "../../Elements/MainMenu/OsuCircle/OsuCircle";

export class MainMenu extends Screen {
private bg = new RandomBackground();
private osuCircle: OsuCircle = new OsuCircle();
private osuCircle = new OsuCircle();
public start() {
this.bg.start();
this.addChild(this.bg);
Expand Down

0 comments on commit 14b303c

Please sign in to comment.