mwg API
    Preparing search index...

    Function croppedTexture

    • Make a cropped view without mutating the shared source texture.

      Parameters

      Returns Texture

      import { Texture } from 'pixi.js';
      import { croppedTexture, parseImagePath } from '@datamoc/mwg/two-d/render';
      const cropped = croppedTexture(Texture.EMPTY, parseImagePath('atlas.png~CROP(0,0,16,16)'));