|
|
il y a 1 mois | |
|---|---|---|
| .. | ||
| dist | il y a 1 mois | |
| LICENSE | il y a 1 mois | |
| README.md | il y a 1 mois | |
| global.d.ts | il y a 1 mois | |
| index.d.ts | il y a 1 mois | |
| package.json | il y a 1 mois | |
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(() => {});