pixels(target) {
    const renderer = this.renderer;
    let context;
    let resolution;
    let frame;
    let renderTexture;

    if (target) {
      if (target instanceof Tiny.RenderTexture) {
        renderTexture = target;
      } else {
        renderTexture = renderer.generateTexture(target);
      }
    }

    if (renderTexture) {
      context = renderTexture.baseTexture._canvasRenderTarget.context;
      resolution = renderTexture.baseTexture._canvasRenderTarget.resolution;
      frame = renderTexture.frame;
    } else {
      context = renderer.rootContext;

      frame = TEMP_RECT;
      frame.width = renderer.width;
      frame.height = renderer.height;
    }

    return context.getImageData(0, 0, frame.width * resolution, frame.height * resolution).data;
  }
/**
   * Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included).
   *
   * @param {Tiny.DisplayObject|Tiny.RenderTexture} target - A displayObject or renderTexture to convert. If left empty will use use the main renderer
   * @return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture
   */
Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included).
@param {Tiny.DisplayObject|Tiny.RenderTexture} target - A displayObject or renderTexture to convert. If left empty will use use the main renderer
@return {Uint8ClampedArray} One-dimensional array containing the pixel data of the entire texture
Will return a one - dimensional array containing the pixel data of the entire texture in RGBA order with integer values between 0 and 255 ( included ) . @param { Tiny . DisplayObject|Tiny . RenderTexture } target - A displayObject or renderTexture to convert . If left empty will use use the main renderer @return { Uint8ClampedArray } One - dimensional array containing the pixel data of the entire texture
pixels(target) {
    const renderer = this.renderer;
    let context;
    let resolution;
    let frame;
    let renderTexture;
    if (target) {
      if (target instanceof Tiny.RenderTexture) {
        renderTexture = target;
      } else {
        renderTexture = renderer.generateTexture(target);
      }
    }
    if (renderTexture) {
      context = renderTexture.baseTexture._canvasRenderTarget.context;
      resolution = renderTexture.baseTexture._canvasRenderTarget.resolution;
      frame = renderTexture.frame;
    } else {
      context = renderer.rootContext;
      frame = TEMP_RECT;
      frame.width = renderer.width;
      frame.height = renderer.height;
    }
    return context.getImageData(0, 0, frame.width * resolution, frame.height * resolution).data;
  }
pixels ( target ) { const renderer = this . renderer ; let context ; let resolution ; let frame ; let renderTexture ; if ( target ) { if ( target instanceof Tiny . RenderTexture ) { renderTexture = target ; } else { renderTexture = renderer . generateTexture ( target ) ; } } if ( renderTexture ) { context = renderTexture . baseTexture . _canvasRenderTarget . context ; resolution = renderTexture . baseTexture . _canvasRenderTarget . resolution ; frame = renderTexture . frame ; } else { context = renderer . rootContext ; frame = TEMP_RECT ; frame . width = renderer . width ; frame . height = renderer . height ; } return context . getImageData ( 0 , 0 , frame . width * resolution , frame . height * resolution ) . data ; }
Will return a one-dimensional array containing the pixel data of the entire texture in RGBA order, with integer values between 0 and 255 (included).
Will return a one - dimensional array containing the pixel data of the entire texture in RGBA order with integer values between 0 and 255 ( included ) .