fix asset paths for subdirectory hosting, bump to 0.1.1
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
The deployed build is served from /file/<name>-<version>/, but Vite emitted absolute /assets/ URLs and BootScene loaded sprites from /sprites/. Set base: "./" in vite.config.ts and make the sprite paths relative so everything resolves next to index.html. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,18 +15,18 @@ interface SpriteAsset {
|
||||
}
|
||||
|
||||
const SPRITE_ASSETS: SpriteAsset[] = [
|
||||
{ key: Player.TEXTURE_KEY, path: "/sprites/player.svg", width: Player.SIZE, height: Player.SIZE },
|
||||
{ key: Exit.TEXTURE_KEY, path: "/sprites/exit.svg", width: Exit.WIDTH, height: Exit.HEIGHT },
|
||||
{ key: Platform.TEXTURE_KEY, path: "/sprites/platform.svg", width: 40, height: 40 },
|
||||
{ key: Player.TEXTURE_KEY, path: "sprites/player.svg", width: Player.SIZE, height: Player.SIZE },
|
||||
{ key: Exit.TEXTURE_KEY, path: "sprites/exit.svg", width: Exit.WIDTH, height: Exit.HEIGHT },
|
||||
{ key: Platform.TEXTURE_KEY, path: "sprites/platform.svg", width: 40, height: 40 },
|
||||
{
|
||||
key: ObstacleSpikeNormal.TEXTURE_KEY,
|
||||
path: "/sprites/spike-normal.svg",
|
||||
path: "sprites/spike-normal.svg",
|
||||
width: ObstacleSpikeNormal.WIDTH,
|
||||
height: ObstacleSpikeNormal.HEIGHT,
|
||||
},
|
||||
{
|
||||
key: ObstacleSpikeTricky.TEXTURE_KEY,
|
||||
path: "/sprites/spike-tricky.svg",
|
||||
path: "sprites/spike-tricky.svg",
|
||||
width: ObstacleSpikeTricky.WIDTH,
|
||||
height: ObstacleSpikeTricky.HEIGHT,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user