|
|
hace 1 mes | |
|---|---|---|
| .. | ||
| dist | hace 1 mes | |
| LICENSE | hace 1 mes | |
| README.md | hace 1 mes | |
| global.d.ts | hace 1 mes | |
| index.d.ts | hace 1 mes | |
| package.json | hace 1 mes | |
npm install @pixi/loaders
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 { AppLoaderPlugin } from '@pixi/loaders';
import { Application } from '@pixi/app';
import { extensions } from '@pixi/core';
extensions.add(AppLoaderPlugin);
const app = new Application();
app.loader.add('path/to/file.jpg');
app.loader.load(() => {});