Commit b96bf6ce authored by wjf's avatar wjf

l

parent 4e3fe988
import { EventDispatcher } from "../events/EventDispatcher";
import { Parser } from "../svga/parser";
import { VideoEntity } from "../svga/VideoEntity";
import { TextureCache } from "../utils";
import { Texture } from "../texture";
export class Loader extends EventDispatcher {
......@@ -76,8 +78,11 @@ export class Loader extends EventDispatcher {
}
}
loadTexture(url: string) {
this.loadImage((s, img) => { if (s) this.cache(url, img) }, url)
loadTexture(url: string, uuid?) {
this.loadImage((s, img) => {
if (s) this.cache(url, img)
TextureCache[uuid || url] = Texture.from(img);
}, url)
}
loadImage(callback: Function, url: string, crossOrigin: boolean = true) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment