pixi.js / packages / loaders /
@Matt Karl Matt Karl authored on 17 Dec 2018
..
src Application plugin structure (#4933) 6 years ago
test Application plugin structure (#4933) 6 years ago
LICENSE Update LICENSE files to 2018 (#4585) 7 years ago
README.md Application plugin structure (#4933) 6 years ago
package.json Updates resource-loader@2.2.3 6 years ago
README.md

@pixi/loaders

Installation

npm install @pixi/loaders

Usage

Using the loader directly:

import { Loader } from '@pixi/loaders';

const loader = new Loader();
loader.add('path/to/file.jpg');
loader.load(() => {});

Using the loader as an Application plugin:

import { LoaderPlugin } from '@pixi/loaders';
import { Application } from '@pixi/app';

Application.registerPlugin(LoaderPlugin);

const app = new Application();
app.loader.add('path/to/file.jpg');
app.loader.load(() => {});