Created
March 21, 2022 18:19
-
-
Save qpwo/3ea6d98ea950b12fd0646ab1adbee527 to your computer and use it in GitHub Desktop.
pixi js v6 load single asset typescript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Loader } from 'pixi.js' | |
export function loadSingleAsset(url: string) { | |
return new Promise(resolve => | |
new Loader().add(url).load(() => resolve(null)) | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment