From b8439d8b58e9f1a8a9065380600adeb589258cd1 Mon Sep 17 00:00:00 2001 From: "J.C" Date: Thu, 21 Sep 2017 17:10:03 +0800 Subject: [PATCH] modify example code --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index aa068aa..1decde2 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,8 @@ class Main extends PIXI.Application { //start to preload resource //test.jpg actually is a binary file but just ends with fake postfix. so here we need to specify the loadType etc. - PIXI.loader.add("test", "images/test.jpg", { loadType: PIXI.loaders.Resource.LOAD_TYPE.XHR, xhrType: PIXI.loaders.Resource.XHR_RESPONSE_TYPE.BUFFER }) + let loader = new fgui.utils.AssetLoader(); + loader.add("test", "images/test.jpg", { loadType: PIXI.loaders.Resource.LOAD_TYPE.XHR, xhrType: PIXI.loaders.Resource.XHR_RESPONSE_TYPE.BUFFER }) .add("test@atlas0", "images/test@atlas0.png") .add("test@atlas0_1", "images/test@atlas0_1.png") .add("test@atlas0_2", "images/test@atlas0_2.png")