lyra-wasm-scripting-test/guests/csharp/dotnet-guest-test/wit/deps/lyraapi/asset.wit

27 lines
800 B
Plaintext

interface asset {
resource asset-handle {
set-watched: func(watched: bool);
version: func() -> u64;
uuid: func() -> string;
path: func() -> option<string>;
is-watched: func() -> bool;
is-loaded: func() -> bool;
wait-for-load: func();
wait-recurse-dependencies-load: func();
}
resource image-handle {
from-raw-handle: static func(raw-handle: borrow<asset-handle>) -> option<image-handle>;
height: func() -> option<u32>;
width: func() -> option<u32>;
get-bytes: func() -> option<list<u8>>;
}
use ecs.{ecs-world};
resource asset-manager {
from-world: static func(w: borrow<ecs-world>) -> option<asset-manager>;
request: func(path: string) -> asset-handle;
}
}