2022-10-10 12:50:21 +00:00
|
|
|
import { SysCallMapping, System } from "../system.ts";
|
|
|
|
|
|
|
|
export default function assetSyscalls(system: System<any>): SysCallMapping {
|
|
|
|
return {
|
2024-01-15 15:43:12 +00:00
|
|
|
"asset.readAsset": (_ctx, plugName: string, name: string): string => {
|
|
|
|
return system.loadedPlugs.get(plugName)!.assets!.readFileAsDataUrl(
|
2022-10-13 13:16:18 +00:00
|
|
|
name,
|
|
|
|
);
|
2022-10-10 12:50:21 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|