add AssetFS hook so assets can load from an embed.FS (js/wasm)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-30 07:23:20 +02:00
co-authored by Claude Fable 5
parent 5ed7ac4ed9
commit 99902e0ab4
3 changed files with 33 additions and 4 deletions
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"image/color"
_ "image/jpeg"
_ "image/png"
"os"
"github.com/hajimehoshi/ebiten/v2"
)
@@ -57,7 +56,7 @@ func (la *loadedAssets) isPlaceholder(name string) bool {
}
func loadImageFile(path string) *ebiten.Image {
f, err := os.Open(path)
f, err := openAsset(path)
if err != nil {
return nil
}