Skip to content

Commit

Permalink
another fkn try
Browse files Browse the repository at this point in the history
  • Loading branch information
bbogdan-ov committed Mar 5, 2024
1 parent 676cfff commit 1c81fe6
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/canvases/background/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const backgroundTween = gsap.to(document.body, {
ease: "none",
paused: true
})
const rainbow = PIXI.Sprite.from(utils.url("assets/images/rainbow.png"));
const rainbow = PIXI.Sprite.from(utils.url("./assets/images/rainbow.png"));
rainbow.x = -64;
rainbow.angle = -36;

Expand Down
2 changes: 1 addition & 1 deletion src/elements/crazy-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as PIXI from "pixi.js";
import * as utils from "../utils";
import gsap from "gsap";

const FONT_SHEET_SOURCE = utils.url("assets/images/crazy-font-sheet.png");
const FONT_SHEET_SOURCE = utils.url("./assets/images/crazy-font-sheet.png");
const CHAR_SLICE_SIZE = 128;
const CHAR_WIDTH = 40;
const CHAR_HEIGHT = 64;
Expand Down
2 changes: 1 addition & 1 deletion src/objects/cloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const CLOUDS_SOURCES_COUNT = 16;

export class Cloud extends PIXI.Sprite {
constructor(x=0, y=0) {
const src = utils.url(`assets/images/clouds/${ utils.randomInt(0, CLOUDS_SOURCES_COUNT)+1 }.png`)
const src = utils.url(`./assets/images/clouds/${ utils.randomInt(0, CLOUDS_SOURCES_COUNT)+1 }.png`)
super(PIXI.Texture.from(src));

this.x = this.moveX = x;
Expand Down
2 changes: 1 addition & 1 deletion src/objects/rain.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const RAIN_SOURCES_COUNT = 5;

export class Rain extends PIXI.Sprite {
constructor(x=0, y=0) {
const src = utils.url(`assets/images/rain/${ utils.randomInt(0, RAIN_SOURCES_COUNT)+1 }.png`);
const src = utils.url(`./assets/images/rain/${ utils.randomInt(0, RAIN_SOURCES_COUNT)+1 }.png`);
super(PIXI.Texture.from(src));

this.x = x;
Expand Down
2 changes: 1 addition & 1 deletion src/objects/thing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const TRASH_THINGS = [...THINGS, "paper", "battery"];

export class Thing extends PIXI.TilingSprite {
constructor(name, x=0, y=0) {
super(PIXI.Texture.from(utils.url(`assets/images/things/${ name }.png`)), 128, 128);
super(PIXI.Texture.from(utils.url(`./assets/images/things/${ name }.png`)), 128, 128);

this.anchor.set(.5);

Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function wave(time, from=0, to=1, func=Math.cos) {
}

export function playSound(name, volume=1) {
const audio = new Audio(url(`assets/audios/${ name }.mp3`));
const audio = new Audio(url(`./assets/audios/${ name }.mp3`));
audio.volume = volume;
audio.play();
return audio
Expand Down

0 comments on commit 1c81fe6

Please sign in to comment.