fix: assets

This commit is contained in:
cha0s 2020-12-17 02:38:32 -06:00
parent 4ae5307ae1
commit 10c6022261
2 changed files with 6 additions and 3 deletions

View File

@ -23,10 +23,13 @@ module.exports = {
cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'],
}),
copy({
patterns: ['flakes.png'].map((path) => ({
patterns: ['favicon.png'].map((path) => ({
from: `src/assets/${path}`,
to: 'http',
})).concat(['flakes.png'].map((path) => ({
from: `src/assets/${path}`,
to: 'http/assets',
})),
}))),
}),
mocha(),
node(),

View File

@ -18,7 +18,7 @@ export default {
const gravity = 1;
const twoPi = Math.PI * 2;
const slowMotion = 10;
const baseTexture = PIXI.BaseTexture.from('/flakes.png');
const baseTexture = PIXI.BaseTexture.from('/assets/flakes.png');
await new Promise((r) => baseTexture.once('loaded', r));
const flakes = [];
for (let y = 0; y < 5; ++y) {