UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

16 lines (14 loc) 433 B
import xhr from "../../network/xhr.js"; import { AssetLoader } from "./AssetLoader.js"; export class TextAssetLoader extends AssetLoader { load(scope,path, callback, failure, progress) { xhr(path, function (data) { const asset = { create: function () { return data; } }; callback(asset); }, failure); } }