'use strict';

var LayerTextureCache = require('./LayerTextureCache.js');

class LayerPass {
  constructor(options = {}) {
    this.renderer = null;
    this.active = false;
    this.bgColor = options.bgColor ? new Float32Array(options.bgColor) : new Float32Array([0, 0, 0, 0]);
    this.clearColor = options.clearColor ?? false;
    this.clearDepth = options.clearDepth ?? false;
    this.useDoubleBuffer = options.useDoubleBuffer ?? false;
    this.useRenderTexture = options.useRenderTexture ?? false;
    this.screenSize = options.screenSize || null;
    this.transform = options.transform || null;
    this.useTransform = options.useTransform ?? true;
    this.useDepth = options.useDepth ?? false;
    this.textureCache = new LayerTextureCache.LayerTextureCache(this);
  }
  getRenderTexture() {
    return this.useRenderTexture ? this.textureCache.getRenderTexture() : null;
  }
  destroy() {
    this.textureCache.destroy();
  }
}

exports.LayerPass = LayerPass;
//# sourceMappingURL=LayerPass.js.map
