fix: assets
This commit is contained in:
parent
4ae5307ae1
commit
10c6022261
|
@ -23,10 +23,13 @@ module.exports = {
|
||||||
cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'],
|
cleanOnceBeforeBuildPatterns: ['**/*.hot-update.*'],
|
||||||
}),
|
}),
|
||||||
copy({
|
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}`,
|
from: `src/assets/${path}`,
|
||||||
to: 'http/assets',
|
to: 'http/assets',
|
||||||
})),
|
}))),
|
||||||
}),
|
}),
|
||||||
mocha(),
|
mocha(),
|
||||||
node(),
|
node(),
|
||||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
||||||
const gravity = 1;
|
const gravity = 1;
|
||||||
const twoPi = Math.PI * 2;
|
const twoPi = Math.PI * 2;
|
||||||
const slowMotion = 10;
|
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));
|
await new Promise((r) => baseTexture.once('loaded', r));
|
||||||
const flakes = [];
|
const flakes = [];
|
||||||
for (let y = 0; y < 5; ++y) {
|
for (let y = 0; y < 5; ++y) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user