"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getShaderAssembler = getShaderAssembler;
exports.getPipelineFactory = getPipelineFactory;
Object.defineProperty(exports, "gouraudLighting", {
  enumerable: true,
  get: function get() {
    return _shadertools.gouraudLighting;
  }
});
Object.defineProperty(exports, "phongLighting", {
  enumerable: true,
  get: function get() {
    return _shadertools.phongLighting;
  }
});
Object.defineProperty(exports, "project", {
  enumerable: true,
  get: function get() {
    return _project.default;
  }
});
Object.defineProperty(exports, "project32", {
  enumerable: true,
  get: function get() {
    return _project2.default;
  }
});
Object.defineProperty(exports, "shadow", {
  enumerable: true,
  get: function get() {
    return _shadow.default;
  }
});
Object.defineProperty(exports, "picking", {
  enumerable: true,
  get: function get() {
    return _picking.default;
  }
});

var _shadertools = require("@luma.gl/shadertools");

var _project = _interopRequireDefault(require("./project/project"));

var _project2 = _interopRequireDefault(require("./project32/project32"));

var _shadow = _interopRequireDefault(require("./shadow/shadow"));

var _picking = _interopRequireDefault(require("./picking/picking"));

var _engine = require("@luma.gl/engine");

function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }

function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }

function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }

var DEFAULT_MODULES = [_project.default];
var SHADER_HOOKS = ['vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)', 'vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)', 'vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)', 'fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)'];

function getShaderAssembler() {
  var shaderAssembler = _shadertools.ShaderAssembler.getDefaultShaderAssembler();

  var _iterator = _createForOfIteratorHelper(DEFAULT_MODULES),
      _step;

  try {
    for (_iterator.s(); !(_step = _iterator.n()).done;) {
      var shaderModule = _step.value;
      shaderAssembler.addDefaultModule(shaderModule);
    }
  } catch (err) {
    _iterator.e(err);
  } finally {
    _iterator.f();
  }

  var _iterator2 = _createForOfIteratorHelper(SHADER_HOOKS),
      _step2;

  try {
    for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
      var shaderHook = _step2.value;
      shaderAssembler.addShaderHook(shaderHook);
    }
  } catch (err) {
    _iterator2.e(err);
  } finally {
    _iterator2.f();
  }

  return shaderAssembler;
}

function getPipelineFactory(device) {
  var pipelineFactory = _engine.PipelineFactory.getDefaultPipelineFactory(device);

  return pipelineFactory;
}
//# sourceMappingURL=index.js.map