text: /**
   * Cesium - https://github.com/AnalyticalGraphicsInc/cesium
   *
   * Copyright 2011-2017 Cesium Contributors
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   *
   * Columbus View (Pat. Pend.)
   *
   * Portions licensed separately.
   * See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
   */
  define(['./defined-2a4f2d00', './Check-e5651467', './freezeObject-a51e076f', './defaultValue-29c9b1af', './Math-9620d065', './Cartesian2-8defcb50', './defineProperties-c817531e', './Transforms-02186f8d', './RuntimeError-51c34ab4', './WebGLConstants-90dbfe2f', './ComponentDatatype-30d0acd7', './GeometryAttribute-4163fce2', './when-1faa3867', './GeometryAttributes-f8548d3f', './AttributeCompression-bb5cef3d', './GeometryPipeline-25624326', './EncodedCartesian3-323e61aa', './IndexDatatype-85d10a10', './IntersectionTests-61ae5e02', './Plane-eeb8d7d9', './PrimitivePipeline-5265436e', './WebMercatorProjection-2a43d110', './createTaskProcessorWorker'], function (defined, Check, freezeObject, defaultValue, _Math, Cartesian2, defineProperties, Transforms, RuntimeError, WebGLConstants, ComponentDatatype, GeometryAttribute, when, GeometryAttributes, AttributeCompression, GeometryPipeline, EncodedCartesian3, IndexDatatype, IntersectionTests, Plane, PrimitivePipeline, WebMercatorProjection, createTaskProcessorWorker) { 'use strict';
  
      /* global require */
  
          var moduleCache = {};
  
          function getModule(moduleName) {
              var module = moduleCache[moduleName];
              if (!defined.defined(module)) {
                  if (typeof exports === 'object') {
                      // Use CommonJS-style require.
                      moduleCache[module] = module = require('Workers/' + moduleName);
                  } else {
                      // Use AMD-style require.
                      // in web workers, require is synchronous
                      require(['Workers/' + moduleName], function(f) {
                          module = f;
                          moduleCache[module] = f;
                      });
                  }
              }
              return module;
          }
  
          function createGeometry(parameters, transferableObjects) {
              var subTasks = parameters.subTasks;
              var length = subTasks.length;
              var resultsOrPromises = new Array(length);
  
              for (var i = 0; i < length; i++) {
                  var task = subTasks[i];
                  var geometry = task.geometry;
                  var moduleName = task.moduleName;
  
                  if (defined.defined(moduleName)) {
                      var createFunction = getModule(moduleName);
                      resultsOrPromises[i] = createFunction(geometry, task.offset);
                  } else {
                      //Already created geometry
                      resultsOrPromises[i] = geometry;
                  }
              }
  
              return when.when.all(resultsOrPromises, function(results) {
                  return PrimitivePipeline.PrimitivePipeline.packCreateGeometryResults(results, transferableObjects);
              });
          }
      var createGeometry$1 = createTaskProcessorWorker(createGeometry);
  
      return createGeometry$1;
  
  });
  