mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-10 09:08:42 +08:00
[flutter] Fix .wasm lookup path on web.
This commit is contained in:
parent
35a0aaf8dc
commit
41aab5579f
@ -63,7 +63,7 @@ Future<SpineFlutterFFI> initSpineFlutterFFI() async {
|
||||
registerOpaqueType<spine_skin_entries_wrapper>();
|
||||
|
||||
await js.importLibrary('$_basePath/libspine_flutter.js');
|
||||
String path = 'libspine_flutter.wasm';
|
||||
String path = '../packages/spine_flutter/assets/libspine_flutter.wasm';
|
||||
Uint8List wasmBinaries = (await rootBundle.load(path)).buffer.asUint8List();
|
||||
_module = await EmscriptenModule.compile(wasmBinaries, 'libspine_flutter');
|
||||
}
|
||||
|
||||
@ -53,9 +53,9 @@ flutter:
|
||||
ffiPlugin: true
|
||||
|
||||
# To add assets to your plugin package, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
assets:
|
||||
- lib/assets/libspine_flutter.js
|
||||
- lib/assets/libspine_flutter.wasm
|
||||
#
|
||||
# For details regarding assets in packages, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user