shadow$provide.module$node_modules$pixi_DOT_js$lib$scene$sprite_tiling$canvas$CanvasTilingSpritePipe = function(global, require, module, exports) {
  global = require("module$node_modules$pixi_DOT_js$lib$extensions$Extensions");
  module = require("module$node_modules$pixi_DOT_js$lib$maths$matrix$Matrix");
  var Point = require("module$node_modules$pixi_DOT_js$lib$maths$point$Point"), canvasUtils = require("module$node_modules$pixi_DOT_js$lib$rendering$renderers$canvas$utils$canvasUtils"), getGlobalMixin = require("module$node_modules$pixi_DOT_js$lib$scene$container$container_mixins$getGlobalMixin"), multiplyHexColors = require("module$node_modules$pixi_DOT_js$lib$scene$container$utils$multiplyHexColors");
  "use strict";
  const worldMatrix = new module.Matrix(), patternMatrix = new module.Matrix(), patternRect = [new Point.Point(), new Point.Point(), new Point.Point(), new Point.Point()];
  class CanvasTilingSpritePipe {
    constructor(renderer) {
      this._renderer = renderer;
    }
    validateRenderable(_renderable) {
      return !1;
    }
    addRenderable(tilingSprite, instructionSet) {
      this._renderer.renderPipes.batch.break(instructionSet);
      instructionSet.add(tilingSprite);
    }
    updateRenderable(_tilingSprite) {
    }
    execute(tilingSprite) {
      var renderer = this._renderer;
      const contextSystem = renderer.canvasContext, context = contextSystem.activeContext;
      context.save();
      contextSystem.setBlendMode(tilingSprite.groupBlendMode);
      var globalColor = renderer.globalUniforms.globalUniformData?.worldColor ?? 4294967295, groupColorAlpha = tilingSprite.groupColorAlpha, alpha = (globalColor >>> 24 & 255) / 255 * ((groupColorAlpha >>> 24 & 255) / 255) * (renderer.filter?.alphaMultiplier ?? 1);
      if (!(0 >= alpha)) {
        context.globalAlpha = alpha;
        globalColor = getGlobalMixin.bgr2rgb(multiplyHexColors.multiplyHexColors(groupColorAlpha & 16777215, globalColor & 16777215));
        var texture = tilingSprite.texture;
        alpha = canvasUtils.canvasUtils.getTintedPattern(texture, globalColor);
        globalColor = tilingSprite.width;
        groupColorAlpha = tilingSprite.height;
        var transform = tilingSprite.groupTransform;
        texture = texture.source._resolution ?? texture.source.resolution ?? 1;
        patternMatrix.copyFrom(tilingSprite._tileTransform.matrix);
        tilingSprite.applyAnchorToTexture || patternMatrix.translate(-tilingSprite.anchor.x * globalColor, -tilingSprite.anchor.y * groupColorAlpha);
        var savedTx = patternMatrix.tx, savedTy = patternMatrix.ty;
        patternMatrix.scale(1 / texture, 1 / texture);
        patternMatrix.tx = savedTx;
        patternMatrix.ty = savedTy;
        worldMatrix.identity();
        worldMatrix.prepend(patternMatrix);
        worldMatrix.prepend(transform);
        contextSystem.setContextTransform(worldMatrix, 1 === (renderer._roundPixels | tilingSprite._roundPixels));
        context.fillStyle = alpha;
        renderer = tilingSprite.anchor.x * -globalColor;
        tilingSprite = tilingSprite.anchor.y * -groupColorAlpha;
        patternRect[0].set(renderer, tilingSprite);
        patternRect[1].set(renderer + globalColor, tilingSprite);
        patternRect[2].set(renderer + globalColor, tilingSprite + groupColorAlpha);
        patternRect[3].set(renderer, tilingSprite + groupColorAlpha);
        for (tilingSprite = 0; 4 > tilingSprite; tilingSprite++) {
          patternMatrix.applyInverse(patternRect[tilingSprite], patternRect[tilingSprite]);
        }
        context.beginPath();
        context.moveTo(patternRect[0].x, patternRect[0].y);
        for (tilingSprite = 1; 4 > tilingSprite; tilingSprite++) {
          context.lineTo(patternRect[tilingSprite].x, patternRect[tilingSprite].y);
        }
        context.closePath();
        context.fill();
      }
      context.restore();
    }
    destroy() {
      this._renderer = null;
    }
  }
  CanvasTilingSpritePipe.extension = {type:[global.ExtensionType.CanvasPipes], name:"tilingSprite"};
  exports.CanvasTilingSpritePipe = CanvasTilingSpritePipe;
};

//# sourceMappingURL=module$node_modules$pixi_DOT_js$lib$scene$sprite_tiling$canvas$CanvasTilingSpritePipe.js.map
