diff --git a/packages/spritesheet/src/Spritesheet.ts b/packages/spritesheet/src/Spritesheet.ts index 7b324f3763..616f08ad99 100644 --- a/packages/spritesheet/src/Spritesheet.ts +++ b/packages/spritesheet/src/Spritesheet.ts @@ -43,7 +43,7 @@ export interface ISpritesheetData { * Utility class for maintaining reference to a collection * of Textures on a single Spritesheet. * - * To access a sprite sheet from your code pass its JSON data file to Pixi's loader: + * To access a sprite sheet from your code you may pass its JSON data file to Pixi's loader: * * ```js * PIXI.Loader.shared.add("images/spritesheet.json").load(setup); @@ -53,6 +53,13 @@ export interface ISpritesheetData { * ... * } * ``` + * + * Alternately, you may circumvent the loader by instantiating the Spritesheet directly: + * ```js + * const sheet = new PIXI.Spritesheet(texture, spritesheetData); + * sheet.parse(() => console.log('Spritesheet ready to use!')); + * ``` + * * With the `sheet.textures` you can create Sprite objects,`sheet.animations` can be used to create an AnimatedSprite. * * Sprite sheets can be packed using tools like {@link https://codeandweb.com/texturepacker|TexturePacker},