234 lines
296 KiB
JavaScript
234 lines
296 KiB
JavaScript
|
/**
|
||
|
* 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.
|
||
|
*/
|
||
|
/**
|
||
|
@license
|
||
|
mersenne-twister.js - https://gist.github.com/banksean/300494
|
||
|
|
||
|
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||
|
All rights reserved.
|
||
|
|
||
|
Redistribution and use in source and binary forms, with or without
|
||
|
modification, are permitted provided that the following conditions
|
||
|
are met:
|
||
|
|
||
|
1. Redistributions of source code must retain the above copyright
|
||
|
notice, this list of conditions and the following disclaimer.
|
||
|
|
||
|
2. Redistributions in binary form must reproduce the above copyright
|
||
|
notice, this list of conditions and the following disclaimer in the
|
||
|
documentation and/or other materials provided with the distribution.
|
||
|
|
||
|
3. The names of its contributors may not be used to endorse or promote
|
||
|
products derived from this software without specific prior written
|
||
|
permission.
|
||
|
|
||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
|
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
|
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
|
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
|
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
@license
|
||
|
when.js - https://github.com/cujojs/when
|
||
|
|
||
|
MIT License (c) copyright B Cavalier & J Hann
|
||
|
|
||
|
* A lightweight CommonJS Promises/A and when() implementation
|
||
|
* when is part of the cujo.js family of libraries (http://cujojs.com/)
|
||
|
*
|
||
|
* Licensed under the MIT License at:
|
||
|
* http://www.opensource.org/licenses/mit-license.php
|
||
|
*
|
||
|
* @version 1.7.1
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
@license
|
||
|
sprintf.js from the php.js project - https://github.com/kvz/phpjs
|
||
|
Directly from https://github.com/kvz/phpjs/blob/master/functions/strings/sprintf.js
|
||
|
|
||
|
php.js is copyright 2012 Kevin van Zonneveld.
|
||
|
|
||
|
Portions copyright Brett Zamir (http://brett-zamir.me), Kevin van Zonneveld
|
||
|
(http://kevin.vanzonneveld.net), Onno Marsman, Theriault, Michael White
|
||
|
(http://getsprink.com), Waldo Malqui Silva, Paulo Freitas, Jack, Jonas
|
||
|
Raoni Soares Silva (http://www.jsfromhell.com), Philip Peterson, Legaev
|
||
|
Andrey, Ates Goral (http://magnetiq.com), Alex, Ratheous, Martijn Wieringa,
|
||
|
Rafa? Kukawski (http://blog.kukawski.pl), lmeyrick
|
||
|
(https://sourceforge.net/projects/bcmath-js/), Nate, Philippe Baumann,
|
||
|
Enrique Gonzalez, Webtoolkit.info (http://www.webtoolkit.info/), Carlos R.
|
||
|
L. Rodrigues (http://www.jsfromhell.com), Ash Searle
|
||
|
(http://hexmen.com/blog/), Jani Hartikainen, travc, Ole Vrijenhoek,
|
||
|
Erkekjetter, Michael Grier, Rafa? Kukawski (http://kukawski.pl), Johnny
|
||
|
Mast (http://www.phpvrouwen.nl), T.Wild, d3x,
|
||
|
http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
|
||
|
Rafa? Kukawski (http://blog.kukawski.pl/), stag019, pilus, WebDevHobo
|
||
|
(http://webdevhobo.blogspot.com/), marrtins, GeekFG
|
||
|
(http://geekfg.blogspot.com), Andrea Giammarchi
|
||
|
(http://webreflection.blogspot.com), Arpad Ray (mailto:arpad@php.net),
|
||
|
gorthaur, Paul Smith, Tim de Koning (http://www.kingsquare.nl), Joris, Oleg
|
||
|
Eremeev, Steve Hilder, majak, gettimeofday, KELAN, Josh Fraser
|
||
|
(http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
|
||
|
Marc Palau, Martin
|
||
|
(http://www.erlenwiese.de/), Breaking Par Consulting Inc
|
||
|
(http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
|
||
|
Chris, Mirek Slugen, saulius, Alfonso Jimenez
|
||
|
(http://www.alfonsojimenez.com), Diplom@t (http://difane.com/), felix,
|
||
|
Mailfaker (http://www.weedem.fr/), Tyler Akins (http://rumkin.com), Caio
|
||
|
Ariede (http://caioariede.com), Robin, Kankrelune
|
||
|
(http://www.webfaktory.info/), Karol Kowalski, Imgen Tata
|
||
|
(http://www.myipdf.com/), mdsjack (http://www.mdsjack.bo.it), Dreamer,
|
||
|
Felix Geisendoerfer (http://www.debuggable.com/felix), Lars Fischer, AJ,
|
||
|
David, Aman Gupta, Michael White, Public Domain
|
||
|
(http://www.json.org/json2.js), Steven Levithan
|
||
|
(http://blog.stevenlevithan.com), Sakimori, Pellentesque Malesuada,
|
||
|
Thunder.m, Dj (http://phpjs.org/functions/htmlentities:425#comment_134018),
|
||
|
Steve Clay, David James, Francois, class_exists, nobbler, T. Wild, Itsacon
|
||
|
(http://www.itsacon.net/), date, Ole Vrijenhoek (http://www.nervous.nl/),
|
||
|
Fox, Raphael (Ao RUDLER), Marco, noname, Mateusz "loonquawl" Zalega, Frank
|
||
|
Forte, Arno, ger, mktime, john (http://www.jd-tech.net), Nick Kolosov
|
||
|
(http://sammy.ru), marc andreu, Scott Cariss, Douglas Crockford
|
||
|
(http://javascript.crockford.com), madipta, Slawomir Kaniecki,
|
||
|
ReverseSyntax, Nathan, Alex Wilson, kenneth, Bayron Guevara, Adam Wallner
|
||
|
(http://web2.bitbaro.hu/), paulo kuong, jmweb, Lincoln Ramsay, djmix,
|
||
|
Pyerre, Jon Hohle, Thiago Mata (http://thiagomata.blog.com), lmeyrick
|
||
|
(https://sourceforge.net/projects/bcmath-js/this.), Linuxworld, duncan,
|
||
|
Gilbert, Sanjoy Roy, Shingo, sankai, Oskar Larsson H?gfeldt
|
||
|
(http://oskar-lh.name/), Denny Wardhana, 0m3r, Everlasto, Subhasis Deb,
|
||
|
josh, jd, Pier Paolo Ramon (http://www.mastersoup.com/), P, merabi, Soren
|
||
|
Hansen, Eugene Bulkin (http://doubleaw.com/), Der Simon
|
||
|
(http://innerdom.sourceforge.net/), echo is bad, Ozh, XoraX
|
||
|
(http://www.xorax.info), EdorFaus, JB, J A R, Marc Jansen, Francesco, LH,
|
||
|
Stoyan Kyosev (http://www.svest.org/), nord_ua, omid
|
||
|
(http://phpjs.org/functions/380:380#comment_137122), Brad Touesnard, MeEtc
|
||
|
(http://yass.meetcweb.com), Peter-Paul Koch
|
||
|
(http://www.quirksmode.org/js/beat.html), Olivier Louvignes
|
||
|
(http://mg-crea.com/), T0bsn, Tim Wiel, Bryan Elliott, Jalal Berrami,
|
||
|
Martin, JT, David Randall, Thomas Beaucourt (http://www.webapp.fr), taith,
|
||
|
vlado houba, Pierre-Luc Paour, Kristof Coomans (SCK-CEN Belgian Nucleair
|
||
|
Research Centre), Martin Pool, Kirk Strobeck, Rick Waldron, Brant Messenger
|
||
|
(http://www.brantmessenger.com/), Devan Penner-Woelk, Saulo Vallory, Wagner
|
||
|
B. Soares, Artur Tchernychev, Valentina De Rosa, Jason Wong
|
||
|
(http://carrot.org/), Christoph, Daniel Esteban, strftime, Mick@el, rezna,
|
||
|
Simon Willison (http://simonwillison.net), Anton Ongson, Gabriel Paderni,
|
||
|
Marco van Oort, penutbutterjelly, Philipp Lenssen, Bjorn Roesbeke
|
||
|
(http://www.bjornroesbeke.be/), Bug?, Eric Nagel, Tomasz Wesolowski,
|
||
|
Evertjan Garretsen, Bobby Drake, Blues (http://tech.bluesmoon.info/), Luke
|
||
|
Godfrey, Pul, uestla, Alan C, Ulrich, Rafal Kukawski, Yves Sucaet,
|
||
|
sowberry, Norman "zEh" Fuchs, hitwork, Zahlii, johnrembo, Nick Callen,
|
||
|
Steven Levithan (stevenlevithan.com), ejsanders, Scott Baker, Brian Tafoya
|
||
|
(http://www.premasolutions.com/), Philippe Jausions
|
||
|
(http://pear.php.net/user/jausions), Aidan Lister
|
||
|
(http://aidanlister.com/), Rob, e-mike, HKM, ChaosNo1, metjay, strcasecmp,
|
||
|
strcmp, Taras Bogach, jpfle, Alexander Ermolaev
|
||
|
(http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, kilops, Orlando,
|
||
|
dptr1988, Le Torbi, James (http://www.james-bell.co.uk/), Pedro Tainha
|
||
|
(http://www.pedrotainha.com), James, Arnout Kazemier
|
||
|
(http://www.3rd-Eden.com), Chris McMacken, gabriel paderni, Yannoo,
|
||
|
FGFEmperor, baris ozdil, Tod Gentille, Greg Frazier, jakes, 3D-GRAF, Allan
|
||
|
Jensen (http://www.winternet.no), Howard Yeend, Benjamin Lupton, davook,
|
||
|
daniel airton wermann (http://wermann.com.br), Atli T¨®r, Maximusya, Ryan
|
||
|
W Tenney (http://ryan.10e.us), Alexander M Beedie, fearphage
|
||
|
(http://http/my.opera.com/fearphage/), Nathan Sepulveda, Victor, Matteo,
|
||
|
Billy, stensi, Cord, Manish, T.J. Leahy, Riddler
|
||
|
(http://www.frontierwebdev.com/), Rafa? Kukawski, FremyCompany, Matt
|
||
|
Bradley, Tim de Koning, Luis Salazar (http://www.freaky-media.com/), Diogo
|
||
|
Resende, Rival, Andrej Pavlovic, Garagoth, Le Torbi
|
||
|
(http://www.letorbi.de/), Dino, Josep Sanz (http://www.ws3.es/), rem,
|
||
|
Russell Walker (http://www.nbill.co.uk/), Jamie Beck
|
||
|
(http://www.terabit.ca/), setcookie, Michael, YUI Library:
|
||
|
http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, Blues at
|
||
|
http://hacks.bluesmoon.info/strftime/strftime.js, Ben
|
||
|
(http://benblume.co.uk/), DtTvB
|
||
|
(http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, William,
|
||
|
meo, incidence, Cagri Ekin, Amirouche, Amir Habibi
|
||
|
(http://www.residence-mixte.com/), Luke Smith (http://lucassmith.name),
|
||
|
Kheang Hok Chin (http://www.distantia.ca/), Jay Klehr, Lorenzo Pisani,
|
||
|
Tony, Yen-Wei Liu, Greenseed, mk.keck, Leslie Hoare, dude, booeyOH, Ben
|
||
|
Bryan
|
||
|
|
||
|
Licensed under the MIT (MIT-LICENSE.txt) license.
|
||
|
|
||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||
|
copy of this software and associated documentation files (the
|
||
|
"Software"), to deal in the Software without restriction, including
|
||
|
without limitation the rights to use, copy, modify, merge, publish,
|
||
|
distribute, sublicense, and/or sell copies of the Software, and to
|
||
|
permit persons to whom the Software is furnished to do so, subject to
|
||
|
the following conditions:
|
||
|
|
||
|
The above copyright notice and this permission notice shall be included
|
||
|
in all copies or substantial portions of the Software.
|
||
|
|
||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||
|
IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
|
||
|
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||
|
*/
|
||
|
|
||
|
/**
|
||
|
* @license
|
||
|
*
|
||
|
* Grauw URI utilities
|
||
|
*
|
||
|
* See: http://hg.grauw.nl/grauw-lib/file/tip/src/uri.js
|
||
|
*
|
||
|
* @author Laurens Holst (http://www.grauw.nl/)
|
||
|
*
|
||
|
* Copyright 2012 Laurens Holst
|
||
|
*
|
||
|
* 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.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
!function(){define("Core/defined",[],function(){"use strict";function e(e){return void 0!==e&&null!==e}return e}),define("Core/DeveloperError",["./defined"],function(e){"use strict";function t(e){this.name="DeveloperError",this.message=e;var t;try{throw new Error}catch(r){t=r.stack}this.stack=t}return e(Object.create)&&(t.prototype=Object.create(Error.prototype),t.prototype.constructor=t),t.prototype.toString=function(){var t=this.name+": "+this.message;return e(this.stack)&&(t+="\n"+this.stack.toString()),t},t.throwInstantiationError=function(){throw new t("This function defines an interface and should not be called directly.")},t}),define("Core/Check",["./defined","./DeveloperError"],function(e,t){"use strict";function r(e){return e+" is required, actual value was undefined"}function n(e,t,r){return"Expected "+r+" to be typeof "+t+", actual typeof was "+e}var i={};return i.typeOf={},i.defined=function(n,i){if(!e(i))throw new t(r(n))},i.typeOf.func=function(e,r){if("function"!=typeof r)throw new t(n(typeof r,"function",e))},i.typeOf.string=function(e,r){if("string"!=typeof r)throw new t(n(typeof r,"string",e))},i.typeOf.number=function(e,r){if("number"!=typeof r)throw new t(n(typeof r,"number",e))},i.typeOf.number.lessThan=function(e,r,n){if(i.typeOf.number(e,r),r>=n)throw new t("Expected "+e+" to be less than "+n+", actual value was "+r)},i.typeOf.number.lessThanOrEquals=function(e,r,n){if(i.typeOf.number(e,r),r>n)throw new t("Expected "+e+" to be less than or equal to "+n+", actual value was "+r)},i.typeOf.number.greaterThan=function(e,r,n){if(i.typeOf.number(e,r),n>=r)throw new t("Expected "+e+" to be greater than "+n+", actual value was "+r)},i.typeOf.number.greaterThanOrEquals=function(e,r,n){if(i.typeOf.number(e,r),n>r)throw new t("Expected "+e+" to be greater than or equal to"+n+", actual value was "+r)},i.typeOf.object=function(e,r){if("object"!=typeof r)throw new t(n(typeof r,"object",e))},i.typeOf.bool=function(e,r){if("boolean"!=typeof r)throw new t(n(typeof r,"boolean",e))},i.typeOf.number.equals=function(e,r,n,a){if(i.typeOf.number(e,n),i.typeOf.number(r,a),n!==a)throw new t(e+" must be equal to "+r+", the actual values are "+n+" and "+a)},i}),define("Core/freezeObject",["./defined"],function(e){"use strict";var t=Object.freeze;return e(t)||(t=function(e){return e}),t}),define("Core/defaultValue",["./freezeObject"],function(e){"use strict";function t(e,t){return void 0!==e&&null!==e?e:t}return t.EMPTY_OBJECT=e({}),t}),define("ThirdParty/mersenne-twister",[],function(){var e=function(e){void 0==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,this.init_genrand(e)};return e.prototype.init_genrand=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){var e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},e.prototype.genrand_int32=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var r;for(this.mti==this.N+1&&this.init_genrand(5489),r=0;r<this.N-this.M;r++)e=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+this.M]^e>>>1^t[1&e];for(;r<this.N-1;r++)e=this.mt[r]&this.UPPER_MASK|this.mt[r+1]&this.LOWER_MASK,this.mt[r]=this.mt[r+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^=e>>>18,e>>>0},e.prototype.random=function(){return this.genrand_int32()*(1/4294967296)},e}),define("Core/Math",["../ThirdParty/mersenne-twister","./Check","./defaultValue","./defined","./DeveloperError"],function(e,t,r,n,i){"use strict";var a={};a.Radious=6378137,a.EPSILON1=.1,a.EPSILON2=.01,a.EPSILON3=.001,a.EPSILON4=1e-4,a.EPSILON5=1e-5,a.EPSILON6=1e-6,a.EPSILON7=1e-7,a.EPSILON8=1e-8,a.EPSILON9=1e-9,a.EPSILON10=1e-10,a.EPSILON11=1e-11,a.EPSILON12=1e-12,a.EPSILON13=1e-13
|
||
|
}},height:{get:function(){return u.computeHeight(this)}}}),u.packedLength=4,u.pack=function(e,n,i){return t.typeOf.object("value",e),t.defined("array",n),i=r(i,0),n[i++]=e.west,n[i++]=e.south,n[i++]=e.east,n[i]=e.north,n},u.unpack=function(e,i,a){return t.defined("array",e),i=r(i,0),n(a)||(a=new u),a.west=e[i++],a.south=e[i++],a.east=e[i++],a.north=e[i],a},u.computeWidth=function(e){t.typeOf.object("rectangle",e);var r=e.east,n=e.west;return n>r&&(r+=s.TWO_PI),r-n},u.computeHeight=function(e){return t.typeOf.object("rectangle",e),e.north-e.south},u.fromDegrees=function(e,t,i,a,o){return e=s.toRadians(r(e,0)),t=s.toRadians(r(t,0)),i=s.toRadians(r(i,0)),a=s.toRadians(r(a,0)),n(o)?(o.west=e,o.south=t,o.east=i,o.north=a,o):new u(e,t,i,a)},u.fromRadians=function(e,t,i,a,o){return n(o)?(o.west=r(e,0),o.south=r(t,0),o.east=r(i,0),o.north=r(a,0),o):new u(e,t,i,a)},u.fromCartographicArray=function(e,r){t.defined("cartographics",e);for(var i=Number.MAX_VALUE,a=-Number.MAX_VALUE,o=Number.MAX_VALUE,c=-Number.MAX_VALUE,l=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=0,p=e.length;p>h;h++){var d=e[h];i=Math.min(i,d.longitude),a=Math.max(a,d.longitude),l=Math.min(l,d.latitude),f=Math.max(f,d.latitude);var y=d.longitude>=0?d.longitude:d.longitude+s.TWO_PI;o=Math.min(o,y),c=Math.max(c,y)}return a-i>c-o&&(i=o,a=c,a>s.PI&&(a-=s.TWO_PI),i>s.PI&&(i-=s.TWO_PI)),n(r)?(r.west=i,r.south=l,r.east=a,r.north=f,r):new u(i,l,a,f)},u.fromCartesianArray=function(e,i,o){t.defined("cartesians",e),i=r(i,a.WGS84);for(var c=Number.MAX_VALUE,l=-Number.MAX_VALUE,f=Number.MAX_VALUE,h=-Number.MAX_VALUE,p=Number.MAX_VALUE,d=-Number.MAX_VALUE,y=0,m=e.length;m>y;y++){var E=i.cartesianToCartographic(e[y]);c=Math.min(c,E.longitude),l=Math.max(l,E.longitude),p=Math.min(p,E.latitude),d=Math.max(d,E.latitude);var v=E.longitude>=0?E.longitude:E.longitude+s.TWO_PI;f=Math.min(f,v),h=Math.max(h,v)}return l-c>h-f&&(c=f,l=h,l>s.PI&&(l-=s.TWO_PI),c>s.PI&&(c-=s.TWO_PI)),n(o)?(o.west=c,o.south=p,o.east=l,o.north=d,o):new u(c,p,l,d)},u.clone=function(e,t){return n(e)?n(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new u(e.west,e.south,e.east,e.north):void 0},u.equalsEpsilon=function(e,r,i){return t.typeOf.number("absoluteEpsilon",i),e===r||n(e)&&n(r)&&Math.abs(e.west-r.west)<=i&&Math.abs(e.south-r.south)<=i&&Math.abs(e.east-r.east)<=i&&Math.abs(e.north-r.north)<=i},u.prototype.clone=function(e){return u.clone(this,e)},u.prototype.equals=function(e){return u.equals(this,e)},u.equals=function(e,t){return e===t||n(e)&&n(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},u.prototype.equalsEpsilon=function(e,r){return t.typeOf.number("epsilon",r),u.equalsEpsilon(this,e,r)},u.validate=function(e){t.typeOf.object("rectangle",e);var r=e.north;t.typeOf.number.greaterThanOrEquals("north",r,-s.PI_OVER_TWO),t.typeOf.number.lessThanOrEquals("north",r,s.PI_OVER_TWO);var n=e.south;t.typeOf.number.greaterThanOrEquals("south",n,-s.PI_OVER_TWO),t.typeOf.number.lessThanOrEquals("south",n,s.PI_OVER_TWO);var i=e.west;t.typeOf.number.greaterThanOrEquals("west",i,-Math.PI),t.typeOf.number.lessThanOrEquals("west",i,Math.PI);var a=e.east;t.typeOf.number.greaterThanOrEquals("east",a,-Math.PI),t.typeOf.number.lessThanOrEquals("east",a,Math.PI)},u.southwest=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.west,i.latitude=r.south,i.height=0,i):new e(r.west,r.south)},u.northwest=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.west,i.latitude=r.north,i.height=0,i):new e(r.west,r.north)},u.northeast=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.east,i.latitude=r.north,i.height=0,i):new e(r.east,r.north)},u.southeast=function(r,i){return t.typeOf.object("rectangle",r),n(i)?(i.longitude=r.east,i.latitude=r.south,i.height=0,i):new e(r.east,r.south)},u.center=function(r,i){t.typeOf.object("rectangle",r);var a=r.east,o=r.west;o>a&&(a+=s.TWO_PI);var u=s.negativePiToPi(.5*(o+a)),c=.5*(r.south+r.north);return n(i)?(i.longitude=u,i.latitude=c,i.height=0,i):new e(u,c)},u.intersection=function(e,r,i){t.typeOf.o
|
||
|
r.typeOf.object("direction",n),r.typeOf.object("up",i),r.typeOf.object("right",a),r.typeOf.object("result",o),o[0]=a.x,o[1]=i.x,o[2]=-n.x,o[3]=0,o[4]=a.y,o[5]=i.y,o[6]=-n.y,o[7]=0,o[8]=a.z,o[9]=i.z,o[10]=-n.z,o[11]=0,o[12]=-e.dot(a,t),o[13]=-e.dot(i,t),o[14]=e.dot(n,t),o[15]=1,o},l.toArray=function(e,t){return r.typeOf.object("matrix",e),i(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},l.getElementIndex=function(e,t){return r.typeOf.number.greaterThanOrEquals("row",t,0),r.typeOf.number.lessThanOrEquals("row",t,3),r.typeOf.number.greaterThanOrEquals("column",e,0),r.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},l.getColumn=function(e,t,n){r.typeOf.object("matrix",e),r.typeOf.number.greaterThanOrEquals("index",t,0),r.typeOf.number.lessThanOrEquals("index",t,3),r.typeOf.object("result",n);var i=4*t,a=e[i],o=e[i+1],s=e[i+2],u=e[i+3];return n.x=a,n.y=o,n.z=s,n.w=u,n},l.setColumn=function(e,t,n,i){r.typeOf.object("matrix",e),r.typeOf.number.greaterThanOrEquals("index",t,0),r.typeOf.number.lessThanOrEquals("index",t,3),r.typeOf.object("cartesian",n),r.typeOf.object("result",i),i=l.clone(e,i);var a=4*t;return i[a]=n.x,i[a+1]=n.y,i[a+2]=n.z,i[a+3]=n.w,i},l.setTranslation=function(e,t,n){return r.typeOf.object("matrix",e),r.typeOf.object("translation",t),r.typeOf.object("result",n),n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=e[15],n};var d=new e;l.setScale=function(t,n,i){r.typeOf.object("matrix",t),r.typeOf.object("scale",n),r.typeOf.object("result",i);var a=l.getScale(t,d),o=e.divideComponents(n,a,d);return l.multiplyByScale(t,o,i)},l.getRow=function(e,t,n){r.typeOf.object("matrix",e),r.typeOf.number.greaterThanOrEquals("index",t,0),r.typeOf.number.lessThanOrEquals("index",t,3),r.typeOf.object("result",n);var i=e[t],a=e[t+4],o=e[t+8],s=e[t+12];return n.x=i,n.y=a,n.z=o,n.w=s,n},l.setRow=function(e,t,n,i){return r.typeOf.object("matrix",e),r.typeOf.number.greaterThanOrEquals("index",t,0),r.typeOf.number.lessThanOrEquals("index",t,3),r.typeOf.object("cartesian",n),r.typeOf.object("result",i),i=l.clone(e,i),i[t]=n.x,i[t+4]=n.y,i[t+8]=n.z,i[t+12]=n.w,i};var y=new e;l.getScale=function(t,n){return r.typeOf.object("matrix",t),r.typeOf.object("result",n),n.x=e.magnitude(e.fromElements(t[0],t[1],t[2],y)),n.y=e.magnitude(e.fromElements(t[4],t[5],t[6],y)),n.z=e.magnitude(e.fromElements(t[8],t[9],t[10],y)),n};var m=new e;l.getMaximumScale=function(t){return l.getScale(t,m),e.maximumComponent(m)},l.multiply=function(e,t,n){r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",n);var i=e[0],a=e[1],o=e[2],s=e[3],u=e[4],c=e[5],l=e[6],f=e[7],h=e[8],p=e[9],d=e[10],y=e[11],m=e[12],E=e[13],v=e[14],O=e[15],g=t[0],_=t[1],w=t[2],T=t[3],b=t[4],R=t[5],A=t[6],S=t[7],x=t[8],I=t[9],N=t[10],M=t[11],P=t[12],C=t[13],D=t[14],U=t[15],L=i*g+u*_+h*w+m*T,q=a*g+c*_+p*w+E*T,F=o*g+l*_+d*w+v*T,j=s*g+f*_+y*w+O*T,B=i*b+u*R+h*A+m*S,z=a*b+c*R+p*A+E*S,G=o*b+l*R+d*A+v*S,V=s*b+f*R+y*A+O*S,H=i*x+u*I+h*N+m*M,W=a*x+c*I+p*N+E*M,X=o*x+l*I+d*N+v*M,k=s*x+f*I+y*N+O*M,Y=i*P+u*C+h*D+m*U,Z=a*P+c*C+p*D+E*U,K=o*P+l*C+d*D+v*U,J=s*P+f*C+y*D+O*U;return n[0]=L,n[1]=q,n[2]=F,n[3]=j,n[4]=B,n[5]=z,n[6]=G,n[7]=V,n[8]=H,n[9]=W,n[10]=X,n[11]=k,n[12]=Y,n[13]=Z,n[14]=K,n[15]=J,n},l.add=function(e,t,n){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",n),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},l.subtract=function(e,t,n){return r.typeOf.object("left",e),r.typeOf.object("right",t),r.typeOf.object("result",n),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]
|
||
|
CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTR
|
||
|
if(p.length>0){var d,y,m=p[0],E=i-m,v=E*E,O=t/2,g=E/2,_=v-4*o,w=v+4*Math.abs(o),T=c-4*m,b=c+4*Math.abs(m);if(0>m||T*w>_*b){var R=Math.sqrt(T);d=R/2,y=0===R?0:(t*g-a)/R}else{var A=Math.sqrt(_);d=0===A?0:(t*g-a)/A,y=A/2}var S,x;0===O&&0===d?(S=0,x=0):r.sign(O)===r.sign(d)?(S=O+d,x=m/S):(x=O-d,S=m/x);var I,N;0===g&&0===y?(I=0,N=0):r.sign(g)===r.sign(y)?(I=g+y,N=o/I):(N=g-y,I=o/N);var M=n.computeRealRoots(1,S,I),P=n.computeRealRoots(1,x,N);if(0!==M.length)return 0!==P.length?M[1]<=P[0]?[M[0],M[1],P[0],P[1]]:P[1]<=M[0]?[P[0],P[1],M[0],M[1]]:M[0]>=P[0]&&M[1]<=P[1]?[P[0],M[0],M[1],P[1]]:P[0]>=M[0]&&P[1]<=M[1]?[M[0],P[0],P[1],M[1]]:M[0]>P[0]&&M[0]<P[1]?[P[0],M[0],P[1],M[1]]:[M[0],P[0],M[1],P[1]]:M;if(0!==P.length)return P}return[]}var o={};return o.computeDiscriminant=function(e,r,n,i,a){if("number"!=typeof e)throw new t("a is a required number.");if("number"!=typeof r)throw new t("b is a required number.");if("number"!=typeof n)throw new t("c is a required number.");if("number"!=typeof i)throw new t("d is a required number.");if("number"!=typeof a)throw new t("e is a required number.");var o=e*e,s=o*e,u=r*r,c=u*r,l=n*n,f=l*n,h=i*i,p=h*i,d=a*a,y=d*a,m=u*l*h-4*c*p-4*e*f*h+18*e*r*n*p-27*o*h*h+256*s*y+a*(18*c*n*i-4*u*f+16*e*l*l-80*e*r*l*i-6*e*u*h+144*o*n*h)+d*(144*e*u*n-27*u*u-128*o*l-192*o*r*i);return m},o.computeRealRoots=function(n,o,s,u,c){if("number"!=typeof n)throw new t("a is a required number.");if("number"!=typeof o)throw new t("b is a required number.");if("number"!=typeof s)throw new t("c is a required number.");if("number"!=typeof u)throw new t("d is a required number.");if("number"!=typeof c)throw new t("e is a required number.");if(Math.abs(n)<r.EPSILON15)return e.computeRealRoots(o,s,u,c);var l=o/n,f=s/n,h=u/n,p=c/n,d=0>l?1:0;switch(d+=0>f?d+1:d,d+=0>h?d+1:d,d+=0>p?d+1:d){case 0:return i(l,f,h,p);case 1:return a(l,f,h,p);case 2:return a(l,f,h,p);case 3:return i(l,f,h,p);case 4:return i(l,f,h,p);case 5:return a(l,f,h,p);case 6:return i(l,f,h,p);case 7:return i(l,f,h,p);case 8:return a(l,f,h,p);case 9:return i(l,f,h,p);case 10:return i(l,f,h,p);case 11:return a(l,f,h,p);case 12:return i(l,f,h,p);case 13:return i(l,f,h,p);case 14:return i(l,f,h,p);case 15:return i(l,f,h,p);default:return}},o}),define("Core/Ray",["./Cartesian3","./Check","./defaultValue","./defined"],function(e,t,r,n){"use strict";function i(t,n){n=e.clone(r(n,e.ZERO)),e.equals(n,e.ZERO)||e.normalize(n,n),this.origin=e.clone(r(t,e.ZERO)),this.direction=n}return i.clone=function(t,r){return n(t)?n(r)?(r.origin=e.clone(t.origin),r.direction=e.clone(t.direction),r):new i(t.origin,t.direction):void 0},i.getPoint=function(r,i,a){return t.typeOf.object("ray",r),t.typeOf.number("t",i),n(a)||(a=new e),a=e.multiplyByScalar(r.direction,i,a),e.add(r.origin,a,a)},i}),define("Core/IntersectionTests",["./Cartesian3","./Cartographic","./defaultValue","./defined","./DeveloperError","./Interval","./Math","./Matrix3","./QuadraticRealPolynomial","./QuarticRealPolynomial","./Ray"],function(e,t,r,n,i,a,o,s,u,c,l){"use strict";function f(e,t,r,n){var i=t*t-4*e*r;if(!(0>i)){if(i>0){var a=1/(2*e),o=Math.sqrt(i),s=(-t+o)*a,u=(-t-o)*a;return u>s?(n.root0=s,n.root1=u):(n.root0=u,n.root1=s),n}var c=-t/(2*e);if(0!==c)return n.root0=n.root1=c,n}}function h(t,r,i){n(i)||(i=new a);var o=t.origin,s=t.direction,u=r.center,c=r.radius*r.radius,l=e.subtract(o,u,v),h=e.dot(s,s),p=2*e.dot(s,l),d=e.magnitudeSquared(l)-c,y=f(h,p,d,w);return n(y)?(i.start=y.root0,i.stop=y.root1,i):void 0}function p(e,t,r){var n=e+t;return o.sign(e)!==o.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))<r?0:n}function d(t,r,n,i,a){var l,f=i*i,h=a*a,d=(t[s.COLUMN1ROW1]-t[s.COLUMN2ROW2])*h,y=a*(i*p(t[s.COLUMN1ROW0],t[s.COLUMN0ROW1],o.EPSILON15)+r.y),m=t[s.COLUMN0ROW0]*f+t[s.COLUMN2ROW2]*h+i*r.x+n,E=h*p(t[s.COLUMN2ROW1],t[s.COLUMN1ROW2],o.EPSILON15),v=a*(i*p(t[s.COLUMN2ROW0],t[s.COLUMN0ROW2])+r.z),O=[];if(0===v&&0===E){if(l=u.computeRealRoots(d,y,m),0===l.length)return O;var g=l[0],_=Math.sqrt(Math.max(1-g*g,0));if(O.push(new e(i,a*g,a*-_)),O.push(new e(i,a*g,a*_)),2===l.length){var w=l[1],T=Math.sqrt(Math.max(
|
||
|
this.deferred=void 0,this.cancelled=!1}return i.prototype.cancel=function(){this.cancelled=!0},i.prototype.clone=function(e){return t(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new i(this)},i}),define("Core/parseResponseHeaders",[],function(){"use strict";function e(e){var t={};if(!e)return t;for(var r=e.split("\r\n"),n=0;n<r.length;++n){var i=r[n],a=i.indexOf(": ");if(a>0){var o=i.substring(0,a),s=i.substring(a+2);t[o]=s}}return t}return e}),define("Core/RequestErrorEvent",["./defined","./parseResponseHeaders"],function(e,t){"use strict";function r(e,r,n){this.statusCode=e,this.response=r,this.responseHeaders=n,"string"==typeof this.responseHeaders&&(this.responseHeaders=t(this.responseHeaders))}return r.prototype.toString=function(){var t="Request has failed.";return e(this.statusCode)&&(t+=" Status Code: "+this.statusCode),t},r}),define("Core/Event",["./Check","./defined","./defineProperties"],function(e,t,r){"use strict";function n(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function i(e,t){return t-e}return r(n.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),n.prototype.addEventListener=function(t,r){e.typeOf.func("listener",t),this._listeners.push(t),this._scopes.push(r);var n=this;return function(){n.removeEventListener(t,r)}},n.prototype.removeEventListener=function(t,r){e.typeOf.func("listener",t);for(var n=this._listeners,i=this._scopes,a=-1,o=0;o<n.length;o++)if(n[o]===t&&i[o]===r){a=o;break}return-1!==a?(this._insideRaiseEvent?(this._toRemove.push(a),n[a]=void 0,i[a]=void 0):(n.splice(a,1),i.splice(a,1)),!0):!1},n.prototype.raiseEvent=function(){this._insideRaiseEvent=!0;var e,r=this._listeners,n=this._scopes,a=r.length;for(e=0;a>e;e++){var o=r[e];t(o)&&r[e].apply(n[e],arguments)}var s=this._toRemove;if(a=s.length,a>0){for(s.sort(i),e=0;a>e;e++){var u=s[e];r.splice(u,1),n.splice(u,1)}s.length=0}this._insideRaiseEvent=!1},n}),define("Core/Heap",["./Check","./defaultValue","./defined","./defineProperties"],function(e,t,r,n){"use strict";function i(t){e.typeOf.object("options",t),e.defined("options.comparator",t.comparator),this._comparator=t.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function a(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}return n(i.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){this._maximumLength=e,this._length>e&&e>0&&(this._length=e,this._array.length=e)}},comparator:{get:function(){return this._comparator}}}),i.prototype.reserve=function(e){e=t(e,this._length),this._array.length=e},i.prototype.heapify=function(e){e=t(e,0);for(var r=this._length,n=this._comparator,i=this._array,o=-1,s=!0;s;){var u=2*(e+1),c=u-1;o=r>c&&n(i[c],i[e])<0?c:e,r>u&&n(i[u],i[o])<0&&(o=u),o!==e?(a(i,o,e),e=o):s=!1}},i.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},i.prototype.insert=function(t){e.defined("element",t);var n=this._array,i=this._comparator,o=this._maximumLength,s=this._length++;for(s<n.length?n[s]=t:n.push(t);0!==s;){var u=Math.floor((s-1)/2);if(!(i(n[s],n[u])<0))break;a(n,s,u),s=u}var c;return r(o)&&this._length>o&&(c=n[o],this._length=o),c},i.prototype.pop=function(r){if(r=t(r,0),0!==this._length){e.typeOf.number.lessThan("index",r,this._length);var n=this._array,i=n[r];return a(n,r,--this._length),this.heapify(r),i}},i}),define("Core/RequestScheduler",["../ThirdParty/Uri","../ThirdParty/when","./Check","./defaultValue","./defined","./defineProperties","./Event","./Heap","./isBlobUri","./isDataUri","./RequestState"],function(e,t,r,n,i,a,o,s,u,c,l){"use strict";function f(e,t){return e.priority-t.priority}function h(){}functio
|
||
|
}function c(e,t,r){var n=f;return n.dayNumber=t,n.secondsOfDay=r,a.daysDifference(n,e._sampleZeroDateTT)}function l(r,i){if(r._chunkDownloadsInProgress[i])return r._chunkDownloadsInProgress[i];var a=e.defer();r._chunkDownloadsInProgress[i]=a;var s,u=r._xysFileUrlTemplate;return s=n(u)?u.getDerivedResource({templateValues:{0:i}}):new o({url:t("Assets/IAU2006_XYS/IAU2006_XYS_"+i+".json")}),e(s.fetchJson(),function(e){r._chunkDownloadsInProgress[i]=!1;for(var t=r._samples,n=e.samples,o=i*r._samplesPerXysFile*3,s=0,u=n.length;u>s;++s)t[o+s]=n[s];a.resolve()}),a.promise}var f=new a(0,0,s.TAI);return u.prototype.preload=function(t,r,n,i){var a=c(this,t,r),o=c(this,n,i),s=a/this._stepSizeDays-this._interpolationOrder/2|0;0>s&&(s=0);var u=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;u>=this._totalSamples&&(u=this._totalSamples-1);for(var f=s/this._samplesPerXysFile|0,h=u/this._samplesPerXysFile|0,p=[],d=f;h>=d;++d)p.push(l(this,d));return e.all(p)},u.prototype.computeXysRadians=function(e,t,r){var a=c(this,e,t);if(!(0>a)){var o=a/this._stepSizeDays|0;if(!(o>=this._totalSamples)){var s=this._interpolationOrder,u=o-(s/2|0);0>u&&(u=0);var f=u+s;f>=this._totalSamples&&(f=this._totalSamples-1,u=f-s,0>u&&(u=0));var h=!1,p=this._samples;if(n(p[3*u])||(l(this,u/this._samplesPerXysFile|0),h=!0),n(p[3*f])||(l(this,f/this._samplesPerXysFile|0),h=!0),!h){n(r)?(r.x=0,r.y=0,r.s=0):r=new i(0,0,0);var d,y,m=a-u*this._stepSizeDays,E=this._work,v=this._denominators,O=this._coef,g=this._xTable;for(d=0;s>=d;++d)E[d]=m-g[d];for(d=0;s>=d;++d){for(O[d]=1,y=0;s>=y;++y)y!==d&&(O[d]*=E[y]);O[d]*=v[d];var _=3*(u+d);r.x+=O[d]*p[_++],r.y+=O[d]*p[_++],r.s+=O[d]*p[_]}return r}}}},u}),define("Core/Quaternion",["./Cartesian3","./Check","./defaultValue","./defined","./FeatureDetection","./freezeObject","./Math","./Matrix3"],function(e,t,r,n,i,a,o,s){"use strict";function u(e,t,n,i){this.x=r(e,0),this.y=r(t,0),this.z=r(n,0),this.w=r(i,0)}var c=new e;u.fromAxisAngle=function(r,i,a){t.typeOf.object("axis",r),t.typeOf.number("angle",i);var o=i/2,s=Math.sin(o);c=e.normalize(r,c);var l=c.x*s,f=c.y*s,h=c.z*s,p=Math.cos(o);return n(a)?(a.x=l,a.y=f,a.z=h,a.w=p,a):new u(l,f,h,p)};var l=[1,2,0],f=new Array(3);u.fromRotationMatrix=function(e,r){t.typeOf.object("matrix",e);var i,a,o,c,h,p=e[s.COLUMN0ROW0],d=e[s.COLUMN1ROW1],y=e[s.COLUMN2ROW2],m=p+d+y;if(m>0)i=Math.sqrt(m+1),h=.5*i,i=.5/i,a=(e[s.COLUMN1ROW2]-e[s.COLUMN2ROW1])*i,o=(e[s.COLUMN2ROW0]-e[s.COLUMN0ROW2])*i,c=(e[s.COLUMN0ROW1]-e[s.COLUMN1ROW0])*i;else{var E=l,v=0;d>p&&(v=1),y>p&&y>d&&(v=2);var O=E[v],g=E[O];i=Math.sqrt(e[s.getElementIndex(v,v)]-e[s.getElementIndex(O,O)]-e[s.getElementIndex(g,g)]+1);var _=f;_[v]=.5*i,i=.5/i,h=(e[s.getElementIndex(g,O)]-e[s.getElementIndex(O,g)])*i,_[O]=(e[s.getElementIndex(O,v)]+e[s.getElementIndex(v,O)])*i,_[g]=(e[s.getElementIndex(g,v)]+e[s.getElementIndex(v,g)])*i,a=-_[0],o=-_[1],c=-_[2]}return n(r)?(r.x=a,r.y=o,r.z=c,r.w=h,r):new u(a,o,c,h)};var h=new u,p=new u,d=new u,y=new u;u.fromHeadingPitchRoll=function(r,n){return t.typeOf.object("headingPitchRoll",r),y=u.fromAxisAngle(e.UNIT_X,r.roll,h),d=u.fromAxisAngle(e.UNIT_Y,-r.pitch,n),n=u.multiply(d,y,d),p=u.fromAxisAngle(e.UNIT_Z,-r.heading,h),u.multiply(p,n,n)};var m=new e,E=new e,v=new u,O=new u,g=new u;u.packedLength=4,u.pack=function(e,n,i){return t.typeOf.object("value",e),t.defined("array",n),i=r(i,0),n[i++]=e.x,n[i++]=e.y,n[i++]=e.z,n[i]=e.w,n},u.unpack=function(e,i,a){return t.defined("array",e),i=r(i,0),n(a)||(a=new u),a.x=e[i],a.y=e[i+1],a.z=e[i+2],a.w=e[i+3],a},u.packedInterpolationLength=3,u.convertPackedArrayForInterpolation=function(e,t,r,n){u.unpack(e,4*r,g),u.conjugate(g,g);for(var i=0,a=r-t+1;a>i;i++){var o=3*i;u.unpack(e,4*(t+i),v),u.multiply(v,g,v),v.w<0&&u.negate(v,v),u.computeAxis(v,m);var s=u.computeAngle(v);n[o]=m.x*s,n[o+1]=m.y*s,n[o+2]=m.z*s}},u.unpackInterpolationResult=function(t,r,i,a,o){n(o)||(o=new u),e.fromArray(t,0,E);var s=e.magnitude(E);return u.unpack(r,4*a,O),0===s?u.clone(u.IDENTITY,v):u.fromAxisAngle(E,s,v),u.multiply(v,O,o)},u.clone=function(e,t){return n(e)?n(t)
|
||
|
return 4096*t+n},l.decompressTextureCoordinates=function(e,t){r.defined("compressed",e),r.defined("result",t);var n=e/4096,i=Math.floor(n);return t.x=i/4095,t.y=(e-4096*i)/4095,t},l.zigZagDeltaDecode=function(e,t,i){r.defined("uBuffer",e),r.defined("vBuffer",t),r.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),n(i)&&r.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,i.length);for(var a=e.length,o=0,u=0,c=0,l=0;a>l;++l)o+=s(e[l]),u+=s(t[l]),e[l]=o,t[l]=u,n(i)&&(c+=s(i[l]),i[l]=c)},l.octShortToFloat=function(e){return a.clamp(3051850947599719e-20*e,-1,1)},l.octShortDecode=function(e,n,i){if(r.defined("result",i),i.x=l.octShortToFloat(e),i.y=l.octShortToFloat(n),i.z=1-(Math.abs(i.x)+Math.abs(i.y)),i.z<0){var o=i.x;i.x=(1-Math.abs(i.y))*a.signNotZero(o),i.y=(1-Math.abs(o))*a.signNotZero(i.y)}return t.normalize(i,i)},l}),define("Core/barycentricCoordinates",["./Cartesian2","./Cartesian3","./Check","./defined","./Math"],function(e,t,r,n,i){"use strict";function a(a,c,l,f,h){r.defined("point",a),r.defined("p0",c),r.defined("p1",l),r.defined("p2",f),n(h)||(h=new t);var p,d,y,m,E,v,O,g;if(n(c.z)){if(t.equalsEpsilon(a,c,i.EPSILON14))return t.clone(t.UNIT_X,h);if(t.equalsEpsilon(a,l,i.EPSILON14))return t.clone(t.UNIT_Y,h);if(t.equalsEpsilon(a,f,i.EPSILON14))return t.clone(t.UNIT_Z,h);p=t.subtract(l,c,o),d=t.subtract(f,c,s),y=t.subtract(a,c,u),m=t.dot(p,p),E=t.dot(p,d),v=t.dot(p,y),O=t.dot(d,d),g=t.dot(d,y)}else{if(e.equalsEpsilon(a,c,i.EPSILON14))return t.clone(t.UNIT_X,h);if(e.equalsEpsilon(a,l,i.EPSILON14))return t.clone(t.UNIT_Y,h);if(e.equalsEpsilon(a,f,i.EPSILON14))return t.clone(t.UNIT_Z,h);p=e.subtract(l,c,o),d=e.subtract(f,c,s),y=e.subtract(a,c,u),m=e.dot(p,p),E=e.dot(p,d),v=e.dot(p,y),O=e.dot(d,d),g=e.dot(d,y)}var _=m*O-E*E,w=1/_;return h.y=(O*v-E*g)*w,h.z=(m*g-E*v)*w,h.x=1-h.y-h.z,h}var o=new t,s=new t,u=new t;return a}),define("Core/EncodedCartesian3",["./Cartesian3","./Check","./defined"],function(e,t,r){"use strict";function n(){this.high=e.clone(e.ZERO),this.low=e.clone(e.ZERO)}n.encode=function(e,n){t.typeOf.number("value",e),r(n)||(n={high:0,low:0});var i;return e>=0?(i=65536*Math.floor(e/65536),n.high=i,n.low=e-i):(i=65536*Math.floor(-e/65536),n.high=-i,n.low=e+i),n};var i={high:0,low:0};n.fromCartesian=function(e,a){t.typeOf.object("cartesian",e),r(a)||(a=new n);var o=a.high,s=a.low;return n.encode(e.x,i),o.x=i.high,s.x=i.low,n.encode(e.y,i),o.y=i.high,s.y=i.low,n.encode(e.z,i),o.z=i.high,s.z=i.low,a};var a=new n;return n.writeElements=function(e,r,i){t.defined("cartesianArray",r),t.typeOf.number("index",i),t.typeOf.number.greaterThanOrEquals("index",i,0),n.fromCartesian(e,a);var o=a.high,s=a.low;r[i]=o.x,r[i+1]=o.y,r[i+2]=o.z,r[i+3]=s.x,r[i+4]=s.y,r[i+5]=s.z},n}),define("Core/IndexDatatype",["./defined","./DeveloperError","./freezeObject","./Math","./WebGLConstants"],function(e,t,r,n,i){"use strict";var a={UNSIGNED_BYTE:i.UNSIGNED_BYTE,UNSIGNED_SHORT:i.UNSIGNED_SHORT,UNSIGNED_INT:i.UNSIGNED_INT};return a.getSizeInBytes=function(e){switch(e){case a.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case a.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case a.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new t("indexDatatype is required and must be a valid IndexDatatype constant.")},a.fromSizeInBytes=function(e){switch(e){case 2:return a.UNSIGNED_SHORT;case 4:return a.UNSIGNED_INT;case 1:return a.UNSIGNED_BYTE;default:throw new t("Size in bytes cannot be mapped to an IndexDatatype")}},a.validate=function(t){return e(t)&&(t===a.UNSIGNED_BYTE||t===a.UNSIGNED_SHORT||t===a.UNSIGNED_INT)},a.createTypedArray=function(r,i){if(!e(r))throw new t("numberOfVertices is required.");return r>=n.SIXTY_FOUR_KILOBYTES?new Uint32Array(i):new Uint16Array(i)},a.createTypedArrayFromArrayBuffer=function(r,i,a,o){if(!e(r))throw new t("numberOfVertices is required.");if(!e(i))throw new t("sourceArray is required.");if(!e(a))throw new t("byteOffset is required.");return r>=n.SIXTY_FOUR_KILOBYTES?new Uint32Array(i,a,o):new Uint16Array(i,a,o)},r(a)}),define("Core/Tipsify",["./defau
|
||
|
f[h++]=Te.x,f[h++]=Te.y);return t.attributes.compressedAttributes=new d({componentDatatype:s.FLOAT,componentsPerAttribute:2,values:f}),delete t.attributes.extrudeDirection,t}var p=t.attributes.normal,y=t.attributes.st,m=c(p),E=c(y);if(!m&&!E)return t;var v,O,g,_,w=t.attributes.tangent,T=t.attributes.bitangent,b=c(w),R=c(T);m&&(v=p.values),E&&(O=y.values),b&&(g=w.values),R&&(_=T.values);var A=m?v.length:O.length,S=m?3:2;a=A/S;var x=a,I=E&&m?2:1;I+=b||R?1:0,x*=I;var N=new Float32Array(x),M=0;for(r=0;a>r;++r){E&&(n.fromArray(O,2*r,Oe),N[M++]=e.compressTextureCoordinates(Oe));var P=3*r;m&&c(g)&&c(_)?(i.fromArray(v,P,ge),i.fromArray(g,P,_e),i.fromArray(_,P,we),e.octPack(ge,_e,we,Oe),N[M++]=Oe.x,N[M++]=Oe.y):(m&&(i.fromArray(v,P,ge),N[M++]=e.octEncodeFloat(ge)),b&&(i.fromArray(g,P,ge),N[M++]=e.octEncodeFloat(ge)),R&&(i.fromArray(_,P,ge),N[M++]=e.octEncodeFloat(ge)))}return t.attributes.compressedAttributes=new d({componentDatatype:s.FLOAT,componentsPerAttribute:I,values:N}),m&&delete t.attributes.normal,E&&delete t.attributes.st,R&&delete t.attributes.bitangent,b&&delete t.attributes.tangent,t};var be=new i,Re=new i,Ae=new i,Se=new i,xe=new i,Ie={positions:new Array(7),indices:new Array(9)},Ne=Z(a,4),Me=Z(i,3),Pe=Z(n,2),Ce=function(e,t,r,n,i,a,o){var s=i[e]*n.x,u=i[t]*n.y,c=i[r]*n.z;a[o]=s+u+c>O.EPSILON6?1:0},De=new i,Ue=new i,Le=new i,qe=new i,Fe={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0},je=w.fromPointNormal(i.ZERO,i.UNIT_Y),Be=new i,ze=new i,Ge=new n,Ve=new n,He=new i,We=new i,Xe=new i,ke=new i,Ye=new i,Ze=new i,Ke=new i,Je=new a,Qe=5*O.EPSILON9,$e=O.EPSILON6;return ie.splitLongitude=function(e){if(!c(e))throw new l("instance is required.");var t=e.geometry,n=t.boundingSphere;if(c(n)){var i=n.center.x-n.radius;if(i>0||r.intersectPlane(n,w.ORIGIN_ZX_PLANE)!==E.INTERSECTING)return e}if(t.geometryType!==y.NONE)switch(t.geometryType){case y.POLYLINES:ne(e);break;case y.TRIANGLES:$(e);break;case y.LINES:te(e)}else z(t),t.primitiveType===T.TRIANGLES?$(e):t.primitiveType===T.LINES&&te(e);return e},ie}),define("Core/arrayRemoveDuplicates",["./Check","./defaultValue","./defined","./Math"],function(e,t,r,n){"use strict";function i(n,i,o){if(e.defined("equalsEpsilon",i),r(n)){o=t(o,!1);var s=n.length;if(2>s)return n;var u,c,l;for(u=1;s>u&&(c=n[u-1],l=n[u],!i(c,l,a));++u);if(u===s)return o&&i(n[0],n[n.length-1],a)?n.slice(1):n;for(var f=n.slice(0,u);s>u;++u)l=n[u],i(c,l,a)||(f.push(l),c=l);return o&&f.length>1&&i(f[0],f[f.length-1],a)&&f.shift(),f}}var a=n.EPSILON10;return i}),define("Core/GeometryAttributes",["./defaultValue"],function(e){"use strict";function t(t){t=e(t,e.EMPTY_OBJECT),this.position=t.position,this.normal=t.normal,this.st=t.st,this.bitangent=t.bitangent,this.tangent=t.tangent,this.color=t.color}return t}),define("ThirdParty/earcut-2.1.1",[],function(){"use strict";function e(e,r,i){i=i||2;var a=r&&r.length,o=a?r[0]*i:e.length,s=t(e,0,o,i,!0),c=[];if(!s)return c;var l,f,h,p,d,y,m;if(a&&(s=u(e,r,s,i)),e.length>80*i){l=h=e[0],f=p=e[1];for(var E=i;o>E;E+=i)d=e[E],y=e[E+1],l>d&&(l=d),f>y&&(f=y),d>h&&(h=d),y>p&&(p=y);m=Math.max(h-l,p-f)}return n(s,c,i,l,f,m),c}function t(e,t,r,n,i){var a,o;if(i===x(e,t,r,n)>0)for(a=t;r>a;a+=n)o=R(a,e[a],e[a+1],o);else for(a=r-n;a>=t;a-=n)o=R(a,e[a],e[a+1],o);return o&&O(o,o.next)&&(A(o),o=o.next),o}function r(e,t){if(!e)return e;t||(t=e);var r,n=e;do if(r=!1,n.steiner||!O(n,n.next)&&0!==v(n.prev,n,n.next))n=n.next;else{if(A(n),n=t=n.prev,n===n.next)return null;r=!0}while(r||n!==t);return t}function n(e,t,u,c,l,f,p){if(e){!p&&f&&h(e,c,l,f);for(var d,y,m=e;e.prev!==e.next;)if(d=e.prev,y=e.next,f?a(e,c,l,f):i(e))t.push(d.i/u),t.push(e.i/u),t.push(y.i/u),A(e),e=y.next,m=y.next;else if(e=y,e===m){p?1===p?(e=o(e,t,u),n(e,t,u,c,l,f,2)):2===p&&s(e,t,u,c,l,f):n(r(e),t,u,c,l,f,1);break}}}function i(e){var t=e.prev,r=e,n=e.next;if(v(t,r,n)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(m(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&v(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function a(e,t,r,n){var i=e.prev,a=e,o=e.next;if(v(i,a,o)>=0)return!1;for(var s=i.x
|
||
|
var n=c(t.granularity,T.RADIANS_PER_DEGREE),i=c(t.arcType,e.GEODESIC);if(i!==e.GEODESIC&&i!==e.RHUMB)throw new h("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var a=t.polygonHierarchy,o=c(t.ellipsoid,p.WGS84);return D(a.positions,o,i,n,r)},q.createGeometry=function(e){var r=e._vertexFormat,i=e._ellipsoid,a=e._granularity,o=e._stRotation,s=e._polygonHierarchy,c=e._perPositionHeight,f=e._closeTop,h=e._closeBottom,p=e._arcType,d=s.positions;if(!(d.length<3)){var y=m.fromPoints(d,i),b=A.polygonsFromHierarchy(s,y.projectPointsOntoPlane.bind(y),!c,i),R=b.hierarchy,x=b.polygons;if(0!==R.length){d=R[0].outerRing;var I,N=A.computeBoundingRectangle(y.plane.normal,y.projectPointOntoPlane.bind(y),d,o,z),M=[],P=e._height,D=e._extrudedHeight,U=e._perPositionHeightExtrude||!T.equalsEpsilon(P,D,0,T.EPSILON2),q={perPositionHeight:c,vertexFormat:r,geometry:void 0,tangentPlane:y,boundingRectangle:N,ellipsoid:i,stRotation:o,bottom:!1,top:!0,wall:!1,extrude:!1,arcType:p};if(U)for(q.extrude=!0,q.top=f,q.bottom=h,q.shadowVolume=e._shadowVolume,q.offsetAttribute=e._offsetAttribute,I=0;I<x.length;I++){var F,j=L(i,x[I],a,R[I],c,f,h,r,p);f&&h?(F=j.topAndBottom,q.geometry=A.scaleToGeodeticHeightExtruded(F.geometry,P,D,i,c)):f?(F=j.topAndBottom,F.geometry.attributes.position.values=S.scaleToGeodeticHeight(F.geometry.attributes.position.values,P,i,!c),q.geometry=F.geometry):h&&(F=j.topAndBottom,F.geometry.attributes.position.values=S.scaleToGeodeticHeight(F.geometry.attributes.position.values,D,i,!0),q.geometry=F.geometry),(f||h)&&(q.wall=!1,F.geometry=C(q),M.push(F));var B=j.walls;q.wall=!0;for(var G=0;G<B.length;G++){var V=B[G];q.geometry=A.scaleToGeodeticHeightExtruded(V.geometry,P,D,i,c),V.geometry=C(q),M.push(V)}}else for(I=0;I<x.length;I++){var H=new O({geometry:A.createGeometryFromPositions(i,x[I],a,c,r,p)});if(H.geometry.attributes.position.values=S.scaleToGeodeticHeight(H.geometry.attributes.position.values,P,i,!c),q.geometry=H.geometry,H.geometry=C(q),l(e._offsetAttribute)){var W=H.geometry.attributes.position.values.length,X=new Uint8Array(W/3),k=e._offsetAttribute===g.NONE?0:1;t(X,k),H.geometry.attributes.applyOffset=new v({componentDatatype:u.UNSIGNED_BYTE,componentsPerAttribute:1,values:X})}M.push(H)}var Y=_.combineInstances(M)[0];Y.attributes.position.values=new Float64Array(Y.attributes.position.values),Y.indices=w.createTypedArray(Y.attributes.position.values.length/3,Y.indices);var Z=Y.attributes,K=n.fromVertices(Z.position.values);return r.position||delete Z.position,new E({attributes:Z,indices:Y.indices,primitiveType:Y.primitiveType,boundingSphere:K,offsetAttribute:e._offsetAttribute})}}},q.createShadowVolume=function(e,t,r){var n=e._granularity,i=e._ellipsoid,a=t(n,i),o=r(n,i);return new q({polygonHierarchy:e._polygonHierarchy,ellipsoid:i,stRotation:e._stRotation,granularity:n,perPositionHeight:!1,extrudedHeight:a,height:o,vertexFormat:N.POSITION_ONLY,shadowVolume:!0,arcType:e._arcType})},f(q.prototype,{rectangle:{get:function(){if(!l(this._rectangle)){var e=this._polygonHierarchy.positions;this._rectangle=D(e,this._ellipsoid,this._arcType,this._granularity)}return this._rectangle}},textureCoordinateRotationPoints:{get:function(){return l(this._textureCoordinateRotationPoints)||(this._textureCoordinateRotationPoints=F(this)),this._textureCoordinateRotationPoints}}}),q}),define("Workers/createPolygonGeometry",["../Core/defined","../Core/Ellipsoid","../Core/PolygonGeometry"],function(e,t,r){"use strict";function n(n,i){return e(i)&&(n=r.unpack(n,i)),n._ellipsoid=t.clone(n._ellipsoid),r.createGeometry(n)}return n})}();
|