From 4bcb92a2df75a2b788e365ce2a2e34dd46bf8420 Mon Sep 17 00:00:00 2001 From: Brett Camper Date: Thu, 21 Jan 2016 22:45:17 -0800 Subject: [PATCH] v0.5.0 --- dist/tangram.debug.js | 3801 +++++++++++++++++++++++------------------ dist/tangram.min.js | 34 +- src/utils/version.js | 4 +- 3 files changed, 2118 insertions(+), 1721 deletions(-) diff --git a/dist/tangram.debug.js b/dist/tangram.debug.js index be5255cc6..19a4f6835 100644 --- a/dist/tangram.debug.js +++ b/dist/tangram.debug.js @@ -1,36 +1,38 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o index)if(O[key = keys[index++]] === el)return key; }; -},{"./$":87,"./$.to-iobject":106}],89:[function(_dereq_,module,exports){ +},{"./$":89,"./$.to-iobject":108}],91:[function(_dereq_,module,exports){ module.exports = true; -},{}],90:[function(_dereq_,module,exports){ +},{}],92:[function(_dereq_,module,exports){ var global = _dereq_('./$.global') , macrotask = _dereq_('./$.task').set , Observer = global.MutationObserver || global.WebKitMutationObserver @@ -4662,7 +4667,7 @@ module.exports = function asap(fn){ notify(); } last = task; }; -},{"./$.cof":58,"./$.global":72,"./$.task":104}],91:[function(_dereq_,module,exports){ +},{"./$.cof":60,"./$.global":74,"./$.task":106}],93:[function(_dereq_,module,exports){ // 19.1.2.1 Object.assign(target, source, ...) var $ = _dereq_('./$') , toObject = _dereq_('./$.to-object') @@ -4696,7 +4701,7 @@ module.exports = _dereq_('./$.fails')(function(){ } return T; } : Object.assign; -},{"./$":87,"./$.fails":69,"./$.iobject":77,"./$.to-object":108}],92:[function(_dereq_,module,exports){ +},{"./$":89,"./$.fails":71,"./$.iobject":79,"./$.to-object":110}],94:[function(_dereq_,module,exports){ // most Object methods by ES6 should accept primitives var $export = _dereq_('./$.export') , core = _dereq_('./$.core') @@ -4707,7 +4712,7 @@ module.exports = function(KEY, exec){ exp[KEY] = exec(fn); $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); }; -},{"./$.core":62,"./$.export":68,"./$.fails":69}],93:[function(_dereq_,module,exports){ +},{"./$.core":64,"./$.export":70,"./$.fails":71}],95:[function(_dereq_,module,exports){ module.exports = function(bitmap, value){ return { enumerable : !(bitmap & 1), @@ -4716,20 +4721,20 @@ module.exports = function(bitmap, value){ value : value }; }; -},{}],94:[function(_dereq_,module,exports){ +},{}],96:[function(_dereq_,module,exports){ var redefine = _dereq_('./$.redefine'); module.exports = function(target, src){ for(var key in src)redefine(target, key, src[key]); return target; }; -},{"./$.redefine":95}],95:[function(_dereq_,module,exports){ +},{"./$.redefine":97}],97:[function(_dereq_,module,exports){ module.exports = _dereq_('./$.hide'); -},{"./$.hide":74}],96:[function(_dereq_,module,exports){ +},{"./$.hide":76}],98:[function(_dereq_,module,exports){ // 7.2.9 SameValue(x, y) module.exports = Object.is || function is(x, y){ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; }; -},{}],97:[function(_dereq_,module,exports){ +},{}],99:[function(_dereq_,module,exports){ // Works with __proto__ only. Old v8 can't work with null proto objects. /* eslint-disable no-proto */ var getDesc = _dereq_('./$').getDesc @@ -4756,7 +4761,7 @@ module.exports = { }({}, false) : undefined), check: check }; -},{"./$":87,"./$.an-object":56,"./$.ctx":63,"./$.is-object":80}],98:[function(_dereq_,module,exports){ +},{"./$":89,"./$.an-object":58,"./$.ctx":65,"./$.is-object":82}],100:[function(_dereq_,module,exports){ 'use strict'; var core = _dereq_('./$.core') , $ = _dereq_('./$') @@ -4770,7 +4775,7 @@ module.exports = function(KEY){ get: function(){ return this; } }); }; -},{"./$":87,"./$.core":62,"./$.descriptors":65,"./$.wks":110}],99:[function(_dereq_,module,exports){ +},{"./$":89,"./$.core":64,"./$.descriptors":67,"./$.wks":112}],101:[function(_dereq_,module,exports){ var def = _dereq_('./$').setDesc , has = _dereq_('./$.has') , TAG = _dereq_('./$.wks')('toStringTag'); @@ -4778,14 +4783,14 @@ var def = _dereq_('./$').setDesc module.exports = function(it, tag, stat){ if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); }; -},{"./$":87,"./$.has":73,"./$.wks":110}],100:[function(_dereq_,module,exports){ +},{"./$":89,"./$.has":75,"./$.wks":112}],102:[function(_dereq_,module,exports){ var global = _dereq_('./$.global') , SHARED = '__core-js_shared__' , store = global[SHARED] || (global[SHARED] = {}); module.exports = function(key){ return store[key] || (store[key] = {}); }; -},{"./$.global":72}],101:[function(_dereq_,module,exports){ +},{"./$.global":74}],103:[function(_dereq_,module,exports){ // 7.3.20 SpeciesConstructor(O, defaultConstructor) var anObject = _dereq_('./$.an-object') , aFunction = _dereq_('./$.a-function') @@ -4794,12 +4799,12 @@ module.exports = function(O, D){ var C = anObject(O).constructor, S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); }; -},{"./$.a-function":54,"./$.an-object":56,"./$.wks":110}],102:[function(_dereq_,module,exports){ +},{"./$.a-function":56,"./$.an-object":58,"./$.wks":112}],104:[function(_dereq_,module,exports){ module.exports = function(it, Constructor, name){ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!"); return it; }; -},{}],103:[function(_dereq_,module,exports){ +},{}],105:[function(_dereq_,module,exports){ var toInteger = _dereq_('./$.to-integer') , defined = _dereq_('./$.defined'); // true -> String#at @@ -4817,7 +4822,7 @@ module.exports = function(TO_STRING){ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; -},{"./$.defined":64,"./$.to-integer":105}],104:[function(_dereq_,module,exports){ +},{"./$.defined":66,"./$.to-integer":107}],106:[function(_dereq_,module,exports){ var ctx = _dereq_('./$.ctx') , invoke = _dereq_('./$.invoke') , html = _dereq_('./$.html') @@ -4893,40 +4898,40 @@ module.exports = { set: setTask, clear: clearTask }; -},{"./$.cof":58,"./$.ctx":63,"./$.dom-create":66,"./$.global":72,"./$.html":75,"./$.invoke":76}],105:[function(_dereq_,module,exports){ +},{"./$.cof":60,"./$.ctx":65,"./$.dom-create":68,"./$.global":74,"./$.html":77,"./$.invoke":78}],107:[function(_dereq_,module,exports){ // 7.1.4 ToInteger var ceil = Math.ceil , floor = Math.floor; module.exports = function(it){ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); }; -},{}],106:[function(_dereq_,module,exports){ +},{}],108:[function(_dereq_,module,exports){ // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = _dereq_('./$.iobject') , defined = _dereq_('./$.defined'); module.exports = function(it){ return IObject(defined(it)); }; -},{"./$.defined":64,"./$.iobject":77}],107:[function(_dereq_,module,exports){ +},{"./$.defined":66,"./$.iobject":79}],109:[function(_dereq_,module,exports){ // 7.1.15 ToLength var toInteger = _dereq_('./$.to-integer') , min = Math.min; module.exports = function(it){ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; -},{"./$.to-integer":105}],108:[function(_dereq_,module,exports){ +},{"./$.to-integer":107}],110:[function(_dereq_,module,exports){ // 7.1.13 ToObject(argument) var defined = _dereq_('./$.defined'); module.exports = function(it){ return Object(defined(it)); }; -},{"./$.defined":64}],109:[function(_dereq_,module,exports){ +},{"./$.defined":66}],111:[function(_dereq_,module,exports){ var id = 0 , px = Math.random(); module.exports = function(key){ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; -},{}],110:[function(_dereq_,module,exports){ +},{}],112:[function(_dereq_,module,exports){ var store = _dereq_('./$.shared')('wks') , uid = _dereq_('./$.uid') , Symbol = _dereq_('./$.global').Symbol; @@ -4934,7 +4939,7 @@ module.exports = function(name){ return store[name] || (store[name] = Symbol && Symbol[name] || (Symbol || uid)('Symbol.' + name)); }; -},{"./$.global":72,"./$.shared":100,"./$.uid":109}],111:[function(_dereq_,module,exports){ +},{"./$.global":74,"./$.shared":102,"./$.uid":111}],113:[function(_dereq_,module,exports){ var classof = _dereq_('./$.classof') , ITERATOR = _dereq_('./$.wks')('iterator') , Iterators = _dereq_('./$.iterators'); @@ -4943,7 +4948,7 @@ module.exports = _dereq_('./$.core').getIteratorMethod = function(it){ || it['@@iterator'] || Iterators[classof(it)]; }; -},{"./$.classof":57,"./$.core":62,"./$.iterators":86,"./$.wks":110}],112:[function(_dereq_,module,exports){ +},{"./$.classof":59,"./$.core":64,"./$.iterators":88,"./$.wks":112}],114:[function(_dereq_,module,exports){ var anObject = _dereq_('./$.an-object') , get = _dereq_('./core.get-iterator-method'); module.exports = _dereq_('./$.core').getIterator = function(it){ @@ -4951,7 +4956,7 @@ module.exports = _dereq_('./$.core').getIterator = function(it){ if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); }; -},{"./$.an-object":56,"./$.core":62,"./core.get-iterator-method":111}],113:[function(_dereq_,module,exports){ +},{"./$.an-object":58,"./$.core":64,"./core.get-iterator-method":113}],115:[function(_dereq_,module,exports){ var classof = _dereq_('./$.classof') , ITERATOR = _dereq_('./$.wks')('iterator') , Iterators = _dereq_('./$.iterators'); @@ -4961,7 +4966,7 @@ module.exports = _dereq_('./$.core').isIterable = function(it){ || '@@iterator' in O || Iterators.hasOwnProperty(classof(O)); }; -},{"./$.classof":57,"./$.core":62,"./$.iterators":86,"./$.wks":110}],114:[function(_dereq_,module,exports){ +},{"./$.classof":59,"./$.core":64,"./$.iterators":88,"./$.wks":112}],116:[function(_dereq_,module,exports){ 'use strict'; var ctx = _dereq_('./$.ctx') , $export = _dereq_('./$.export') @@ -4999,7 +5004,7 @@ $export($export.S + $export.F * !_dereq_('./$.iter-detect')(function(iter){ Arra } }); -},{"./$.ctx":63,"./$.export":68,"./$.is-array-iter":78,"./$.iter-call":81,"./$.iter-detect":84,"./$.to-length":107,"./$.to-object":108,"./core.get-iterator-method":111}],115:[function(_dereq_,module,exports){ +},{"./$.ctx":65,"./$.export":70,"./$.is-array-iter":80,"./$.iter-call":83,"./$.iter-detect":86,"./$.to-length":109,"./$.to-object":110,"./core.get-iterator-method":113}],117:[function(_dereq_,module,exports){ 'use strict'; var addToUnscopables = _dereq_('./$.add-to-unscopables') , step = _dereq_('./$.iter-step') @@ -5034,7 +5039,7 @@ Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); -},{"./$.add-to-unscopables":55,"./$.iter-define":83,"./$.iter-step":85,"./$.iterators":86,"./$.to-iobject":106}],116:[function(_dereq_,module,exports){ +},{"./$.add-to-unscopables":57,"./$.iter-define":85,"./$.iter-step":87,"./$.iterators":88,"./$.to-iobject":108}],118:[function(_dereq_,module,exports){ 'use strict'; var strong = _dereq_('./$.collection-strong'); @@ -5052,7 +5057,7 @@ _dereq_('./$.collection')('Map', function(get){ return strong.def(this, key === 0 ? 0 : key, value); } }, strong, true); -},{"./$.collection":61,"./$.collection-strong":59}],117:[function(_dereq_,module,exports){ +},{"./$.collection":63,"./$.collection-strong":61}],119:[function(_dereq_,module,exports){ // 20.2.2.22 Math.log2(x) var $export = _dereq_('./$.export'); @@ -5061,12 +5066,21 @@ $export($export.S, 'Math', { return Math.log(x) / Math.LN2; } }); -},{"./$.export":68}],118:[function(_dereq_,module,exports){ +},{"./$.export":70}],120:[function(_dereq_,module,exports){ // 19.1.3.1 Object.assign(target, source) var $export = _dereq_('./$.export'); $export($export.S + $export.F, 'Object', {assign: _dereq_('./$.object-assign')}); -},{"./$.export":68,"./$.object-assign":91}],119:[function(_dereq_,module,exports){ +},{"./$.export":70,"./$.object-assign":93}],121:[function(_dereq_,module,exports){ +// 19.1.2.5 Object.freeze(O) +var isObject = _dereq_('./$.is-object'); + +_dereq_('./$.object-sap')('freeze', function($freeze){ + return function freeze(it){ + return $freeze && isObject(it) ? $freeze(it) : it; + }; +}); +},{"./$.is-object":82,"./$.object-sap":94}],122:[function(_dereq_,module,exports){ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) var toIObject = _dereq_('./$.to-iobject'); @@ -5075,7 +5089,7 @@ _dereq_('./$.object-sap')('getOwnPropertyDescriptor', function($getOwnPropertyDe return $getOwnPropertyDescriptor(toIObject(it), key); }; }); -},{"./$.object-sap":92,"./$.to-iobject":106}],120:[function(_dereq_,module,exports){ +},{"./$.object-sap":94,"./$.to-iobject":108}],123:[function(_dereq_,module,exports){ // 19.1.2.14 Object.keys(O) var toObject = _dereq_('./$.to-object'); @@ -5084,13 +5098,13 @@ _dereq_('./$.object-sap')('keys', function($keys){ return $keys(toObject(it)); }; }); -},{"./$.object-sap":92,"./$.to-object":108}],121:[function(_dereq_,module,exports){ +},{"./$.object-sap":94,"./$.to-object":110}],124:[function(_dereq_,module,exports){ // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = _dereq_('./$.export'); $export($export.S, 'Object', {setPrototypeOf: _dereq_('./$.set-proto').set}); -},{"./$.export":68,"./$.set-proto":97}],122:[function(_dereq_,module,exports){ -module.exports=_dereq_(36) -},{"/Users/bcamper/Documents/dev/vector-map/node_modules/browser-resolve/empty.js":36}],123:[function(_dereq_,module,exports){ +},{"./$.export":70,"./$.set-proto":99}],125:[function(_dereq_,module,exports){ +module.exports=_dereq_(37) +},{"/Users/bcamper/Documents/dev/vector-map/node_modules/browser-resolve/empty.js":37}],126:[function(_dereq_,module,exports){ 'use strict'; var $ = _dereq_('./$') , LIBRARY = _dereq_('./$.library') @@ -5380,7 +5394,7 @@ $export($export.S + $export.F * !(USE_NATIVE && _dereq_('./$.iter-detect')(funct return capability.promise; } }); -},{"./$":87,"./$.a-function":54,"./$.an-object":56,"./$.classof":57,"./$.core":62,"./$.ctx":63,"./$.descriptors":65,"./$.export":68,"./$.for-of":70,"./$.global":72,"./$.is-object":80,"./$.iter-detect":84,"./$.library":89,"./$.microtask":90,"./$.redefine-all":94,"./$.same-value":96,"./$.set-proto":97,"./$.set-species":98,"./$.set-to-string-tag":99,"./$.species-constructor":101,"./$.strict-new":102,"./$.wks":110}],124:[function(_dereq_,module,exports){ +},{"./$":89,"./$.a-function":56,"./$.an-object":58,"./$.classof":59,"./$.core":64,"./$.ctx":65,"./$.descriptors":67,"./$.export":70,"./$.for-of":72,"./$.global":74,"./$.is-object":82,"./$.iter-detect":86,"./$.library":91,"./$.microtask":92,"./$.redefine-all":96,"./$.same-value":98,"./$.set-proto":99,"./$.set-species":100,"./$.set-to-string-tag":101,"./$.species-constructor":103,"./$.strict-new":104,"./$.wks":112}],127:[function(_dereq_,module,exports){ 'use strict'; var strong = _dereq_('./$.collection-strong'); @@ -5393,7 +5407,7 @@ _dereq_('./$.collection')('Set', function(get){ return strong.def(this, value = value === 0 ? 0 : value, value); } }, strong); -},{"./$.collection":61,"./$.collection-strong":59}],125:[function(_dereq_,module,exports){ +},{"./$.collection":63,"./$.collection-strong":61}],128:[function(_dereq_,module,exports){ 'use strict'; var $at = _dereq_('./$.string-at')(true); @@ -5411,7 +5425,7 @@ _dereq_('./$.iter-define')(String, 'String', function(iterated){ this._i += point.length; return {value: point, done: false}; }); -},{"./$.iter-define":83,"./$.string-at":103}],126:[function(_dereq_,module,exports){ +},{"./$.iter-define":85,"./$.string-at":105}],129:[function(_dereq_,module,exports){ 'use strict'; // ECMAScript 6 symbols shim var $ = _dereq_('./$') @@ -5639,21 +5653,21 @@ setToStringTag($Symbol, 'Symbol'); setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); -},{"./$":87,"./$.an-object":56,"./$.descriptors":65,"./$.enum-keys":67,"./$.export":68,"./$.fails":69,"./$.get-names":71,"./$.global":72,"./$.has":73,"./$.is-array":79,"./$.keyof":88,"./$.library":89,"./$.property-desc":93,"./$.redefine":95,"./$.set-to-string-tag":99,"./$.shared":100,"./$.to-iobject":106,"./$.uid":109,"./$.wks":110}],127:[function(_dereq_,module,exports){ +},{"./$":89,"./$.an-object":58,"./$.descriptors":67,"./$.enum-keys":69,"./$.export":70,"./$.fails":71,"./$.get-names":73,"./$.global":74,"./$.has":75,"./$.is-array":81,"./$.keyof":90,"./$.library":91,"./$.property-desc":95,"./$.redefine":97,"./$.set-to-string-tag":101,"./$.shared":102,"./$.to-iobject":108,"./$.uid":111,"./$.wks":112}],130:[function(_dereq_,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = _dereq_('./$.export'); $export($export.P, 'Map', {toJSON: _dereq_('./$.collection-to-json')('Map')}); -},{"./$.collection-to-json":60,"./$.export":68}],128:[function(_dereq_,module,exports){ +},{"./$.collection-to-json":62,"./$.export":70}],131:[function(_dereq_,module,exports){ // https://github.com/DavidBruant/Map-Set.prototype.toJSON var $export = _dereq_('./$.export'); $export($export.P, 'Set', {toJSON: _dereq_('./$.collection-to-json')('Set')}); -},{"./$.collection-to-json":60,"./$.export":68}],129:[function(_dereq_,module,exports){ +},{"./$.collection-to-json":62,"./$.export":70}],132:[function(_dereq_,module,exports){ _dereq_('./es6.array.iterator'); var Iterators = _dereq_('./$.iterators'); Iterators.NodeList = Iterators.HTMLCollection = Iterators.Array; -},{"./$.iterators":86,"./es6.array.iterator":115}],130:[function(_dereq_,module,exports){ +},{"./$.iterators":88,"./es6.array.iterator":117}],133:[function(_dereq_,module,exports){ // (c) Dean McNamee , 2012. // // https://github.com/deanm/css-color-parser-js @@ -5855,7 +5869,7 @@ function parseCSSColor(css_str) { try { exports.parseCSSColor = parseCSSColor } catch(e) { } -},{}],131:[function(_dereq_,module,exports){ +},{}],134:[function(_dereq_,module,exports){ "use strict" function dupe_array(count, value, i) { @@ -5905,7 +5919,7 @@ function dupe(count, value) { } module.exports = dupe -},{}],132:[function(_dereq_,module,exports){ +},{}],135:[function(_dereq_,module,exports){ 'use strict'; module.exports = earcut; @@ -6484,7 +6498,7 @@ function Node(p) { this.nextZ = null; } -},{}],133:[function(_dereq_,module,exports){ +},{}],136:[function(_dereq_,module,exports){ /* Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved. @@ -12227,7 +12241,7 @@ function Node(p) { })); /* vim: set sw=4 ts=4 et tw=80 : */ -},{}],134:[function(_dereq_,module,exports){ +},{}],137:[function(_dereq_,module,exports){ 'use strict'; module.exports = clip; @@ -12380,7 +12394,7 @@ function newSlice(slices, slice, area, dist) { return []; } -},{}],135:[function(_dereq_,module,exports){ +},{}],138:[function(_dereq_,module,exports){ 'use strict'; module.exports = convert; @@ -12526,7 +12540,7 @@ function calcRingBBox(min, max, points) { } } -},{"./simplify":137}],136:[function(_dereq_,module,exports){ +},{"./simplify":140}],139:[function(_dereq_,module,exports){ 'use strict'; module.exports = geojsonvt; @@ -12793,7 +12807,7 @@ function isClippedSquare(tile, extent, buffer) { return true; } -},{"./clip":134,"./convert":135,"./tile":138,"./wrap":139}],137:[function(_dereq_,module,exports){ +},{"./clip":137,"./convert":138,"./tile":141,"./wrap":142}],140:[function(_dereq_,module,exports){ 'use strict'; module.exports = simplify; @@ -12869,7 +12883,7 @@ function getSqSegDist(p, a, b) { return dx * dx + dy * dy; } -},{}],138:[function(_dereq_,module,exports){ +},{}],141:[function(_dereq_,module,exports){ 'use strict'; module.exports = createTile; @@ -12956,7 +12970,7 @@ function addFeature(tile, feature, tolerance, noSimplify) { } } -},{}],139:[function(_dereq_,module,exports){ +},{}],142:[function(_dereq_,module,exports){ 'use strict'; var clip = _dereq_('./clip'); @@ -13019,7 +13033,7 @@ function shiftCoords(points, offset) { return newPoints; } -},{"./clip":134}],140:[function(_dereq_,module,exports){ +},{"./clip":137}],143:[function(_dereq_,module,exports){ /** * @fileoverview gl-matrix - High performance matrix and vector operations * @author Brandon Jones @@ -17269,7 +17283,7 @@ if(typeof(exports) !== 'undefined') { })(shim.exports); })(this); -},{}],141:[function(_dereq_,module,exports){ +},{}],144:[function(_dereq_,module,exports){ module.exports = parseErrors function parseErrors(log) { @@ -17297,7 +17311,7 @@ function parseErrors(log) { return logs } -},{}],142:[function(_dereq_,module,exports){ +},{}],145:[function(_dereq_,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -17383,7 +17397,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],143:[function(_dereq_,module,exports){ +},{}],146:[function(_dereq_,module,exports){ /*! * node-inherit * Copyright(c) 2011 Dmitry Filatov @@ -17392,7 +17406,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { module.exports = _dereq_('./lib/inherit'); -},{"./lib/inherit":144}],144:[function(_dereq_,module,exports){ +},{"./lib/inherit":147}],147:[function(_dereq_,module,exports){ /** * @module inherit * @version 2.2.2 @@ -17582,7 +17596,7 @@ defineAsGlobal && (global.inherit = inherit); })(this); -},{}],145:[function(_dereq_,module,exports){ +},{}],148:[function(_dereq_,module,exports){ /** * isArray @@ -17617,7 +17631,7 @@ module.exports = isArray || function (val) { return !! val && '[object Array]' == str.call(val); }; -},{}],146:[function(_dereq_,module,exports){ +},{}],149:[function(_dereq_,module,exports){ 'use strict'; @@ -17626,7 +17640,7 @@ var yaml = _dereq_('./lib/js-yaml.js'); module.exports = yaml; -},{"./lib/js-yaml.js":147}],147:[function(_dereq_,module,exports){ +},{"./lib/js-yaml.js":150}],150:[function(_dereq_,module,exports){ 'use strict'; @@ -17667,7 +17681,7 @@ module.exports.parse = deprecated('parse'); module.exports.compose = deprecated('compose'); module.exports.addConstructor = deprecated('addConstructor'); -},{"./js-yaml/dumper":149,"./js-yaml/exception":150,"./js-yaml/loader":151,"./js-yaml/schema":153,"./js-yaml/schema/core":154,"./js-yaml/schema/default_full":155,"./js-yaml/schema/default_safe":156,"./js-yaml/schema/failsafe":157,"./js-yaml/schema/json":158,"./js-yaml/type":159}],148:[function(_dereq_,module,exports){ +},{"./js-yaml/dumper":152,"./js-yaml/exception":153,"./js-yaml/loader":154,"./js-yaml/schema":156,"./js-yaml/schema/core":157,"./js-yaml/schema/default_full":158,"./js-yaml/schema/default_safe":159,"./js-yaml/schema/failsafe":160,"./js-yaml/schema/json":161,"./js-yaml/type":162}],151:[function(_dereq_,module,exports){ 'use strict'; @@ -17730,7 +17744,7 @@ module.exports.repeat = repeat; module.exports.isNegativeZero = isNegativeZero; module.exports.extend = extend; -},{}],149:[function(_dereq_,module,exports){ +},{}],152:[function(_dereq_,module,exports){ 'use strict'; /*eslint-disable no-use-before-define*/ @@ -18580,7 +18594,7 @@ function safeDump(input, options) { module.exports.dump = dump; module.exports.safeDump = safeDump; -},{"./common":148,"./exception":150,"./schema/default_full":155,"./schema/default_safe":156}],150:[function(_dereq_,module,exports){ +},{"./common":151,"./exception":153,"./schema/default_full":158,"./schema/default_safe":159}],153:[function(_dereq_,module,exports){ // YAML error class. http://stackoverflow.com/questions/8458984 // 'use strict'; @@ -18628,7 +18642,7 @@ YAMLException.prototype.toString = function toString(compact) { module.exports = YAMLException; -},{"inherit":143}],151:[function(_dereq_,module,exports){ +},{"inherit":146}],154:[function(_dereq_,module,exports){ 'use strict'; /*eslint-disable max-len,no-use-before-define*/ @@ -20208,7 +20222,7 @@ module.exports.load = load; module.exports.safeLoadAll = safeLoadAll; module.exports.safeLoad = safeLoad; -},{"./common":148,"./exception":150,"./mark":152,"./schema/default_full":155,"./schema/default_safe":156}],152:[function(_dereq_,module,exports){ +},{"./common":151,"./exception":153,"./mark":155,"./schema/default_full":158,"./schema/default_safe":159}],155:[function(_dereq_,module,exports){ 'use strict'; @@ -20288,7 +20302,7 @@ Mark.prototype.toString = function toString(compact) { module.exports = Mark; -},{"./common":148}],153:[function(_dereq_,module,exports){ +},{"./common":151}],156:[function(_dereq_,module,exports){ 'use strict'; /*eslint-disable max-len*/ @@ -20394,7 +20408,7 @@ Schema.create = function createSchema() { module.exports = Schema; -},{"./common":148,"./exception":150,"./type":159}],154:[function(_dereq_,module,exports){ +},{"./common":151,"./exception":153,"./type":162}],157:[function(_dereq_,module,exports){ // Standard YAML's Core schema. // http://www.yaml.org/spec/1.2/spec.html#id2804923 // @@ -20414,7 +20428,7 @@ module.exports = new Schema({ ] }); -},{"../schema":153,"./json":158}],155:[function(_dereq_,module,exports){ +},{"../schema":156,"./json":161}],158:[function(_dereq_,module,exports){ // JS-YAML's default schema for `load` function. // It is not described in the YAML specification. // @@ -20441,7 +20455,7 @@ module.exports = Schema.DEFAULT = new Schema({ ] }); -},{"../schema":153,"../type/js/function":164,"../type/js/regexp":165,"../type/js/undefined":166,"./default_safe":156}],156:[function(_dereq_,module,exports){ +},{"../schema":156,"../type/js/function":167,"../type/js/regexp":168,"../type/js/undefined":169,"./default_safe":159}],159:[function(_dereq_,module,exports){ // JS-YAML's default schema for `safeLoad` function. // It is not described in the YAML specification. // @@ -20471,7 +20485,7 @@ module.exports = new Schema({ ] }); -},{"../schema":153,"../type/binary":160,"../type/merge":168,"../type/omap":170,"../type/pairs":171,"../type/set":173,"../type/timestamp":175,"./core":154}],157:[function(_dereq_,module,exports){ +},{"../schema":156,"../type/binary":163,"../type/merge":171,"../type/omap":173,"../type/pairs":174,"../type/set":176,"../type/timestamp":178,"./core":157}],160:[function(_dereq_,module,exports){ // Standard YAML's Failsafe schema. // http://www.yaml.org/spec/1.2/spec.html#id2802346 @@ -20490,7 +20504,7 @@ module.exports = new Schema({ ] }); -},{"../schema":153,"../type/map":167,"../type/seq":172,"../type/str":174}],158:[function(_dereq_,module,exports){ +},{"../schema":156,"../type/map":170,"../type/seq":175,"../type/str":177}],161:[function(_dereq_,module,exports){ // Standard YAML's JSON schema. // http://www.yaml.org/spec/1.2/spec.html#id2803231 // @@ -20517,7 +20531,7 @@ module.exports = new Schema({ ] }); -},{"../schema":153,"../type/bool":161,"../type/float":162,"../type/int":163,"../type/null":169,"./failsafe":157}],159:[function(_dereq_,module,exports){ +},{"../schema":156,"../type/bool":164,"../type/float":165,"../type/int":166,"../type/null":172,"./failsafe":160}],162:[function(_dereq_,module,exports){ 'use strict'; var YAMLException = _dereq_('./exception'); @@ -20580,7 +20594,7 @@ function Type(tag, options) { module.exports = Type; -},{"./exception":150}],160:[function(_dereq_,module,exports){ +},{"./exception":153}],163:[function(_dereq_,module,exports){ 'use strict'; /*eslint-disable no-bitwise*/ @@ -20716,7 +20730,7 @@ module.exports = new Type('tag:yaml.org,2002:binary', { represent: representYamlBinary }); -},{"../type":159,"buffer":36}],161:[function(_dereq_,module,exports){ +},{"../type":162,"buffer":37}],164:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -20755,7 +20769,7 @@ module.exports = new Type('tag:yaml.org,2002:bool', { defaultStyle: 'lowercase' }); -},{"../type":159}],162:[function(_dereq_,module,exports){ +},{"../type":162}],165:[function(_dereq_,module,exports){ 'use strict'; var common = _dereq_('../common'); @@ -20874,7 +20888,7 @@ module.exports = new Type('tag:yaml.org,2002:float', { defaultStyle: 'lowercase' }); -},{"../common":148,"../type":159}],163:[function(_dereq_,module,exports){ +},{"../common":151,"../type":162}],166:[function(_dereq_,module,exports){ 'use strict'; var common = _dereq_('../common'); @@ -21059,7 +21073,7 @@ module.exports = new Type('tag:yaml.org,2002:int', { } }); -},{"../common":148,"../type":159}],164:[function(_dereq_,module,exports){ +},{"../common":151,"../type":162}],167:[function(_dereq_,module,exports){ 'use strict'; var esprima; @@ -21145,7 +21159,7 @@ module.exports = new Type('tag:yaml.org,2002:js/function', { represent: representJavascriptFunction }); -},{"../../type":159,"esprima":133}],165:[function(_dereq_,module,exports){ +},{"../../type":162,"esprima":136}],168:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../../type'); @@ -21230,7 +21244,7 @@ module.exports = new Type('tag:yaml.org,2002:js/regexp', { represent: representJavascriptRegExp }); -},{"../../type":159}],166:[function(_dereq_,module,exports){ +},{"../../type":162}],169:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../../type'); @@ -21260,7 +21274,7 @@ module.exports = new Type('tag:yaml.org,2002:js/undefined', { represent: representJavascriptUndefined }); -},{"../../type":159}],167:[function(_dereq_,module,exports){ +},{"../../type":162}],170:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21270,7 +21284,7 @@ module.exports = new Type('tag:yaml.org,2002:map', { construct: function (data) { return null !== data ? data : {}; } }); -},{"../type":159}],168:[function(_dereq_,module,exports){ +},{"../type":162}],171:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21284,7 +21298,7 @@ module.exports = new Type('tag:yaml.org,2002:merge', { resolve: resolveYamlMerge }); -},{"../type":159}],169:[function(_dereq_,module,exports){ +},{"../type":162}],172:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21322,7 +21336,7 @@ module.exports = new Type('tag:yaml.org,2002:null', { defaultStyle: 'lowercase' }); -},{"../type":159}],170:[function(_dereq_,module,exports){ +},{"../type":162}],173:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21380,7 +21394,7 @@ module.exports = new Type('tag:yaml.org,2002:omap', { construct: constructYamlOmap }); -},{"../type":159}],171:[function(_dereq_,module,exports){ +},{"../type":162}],174:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21443,7 +21457,7 @@ module.exports = new Type('tag:yaml.org,2002:pairs', { construct: constructYamlPairs }); -},{"../type":159}],172:[function(_dereq_,module,exports){ +},{"../type":162}],175:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21453,7 +21467,7 @@ module.exports = new Type('tag:yaml.org,2002:seq', { construct: function (data) { return null !== data ? data : []; } }); -},{"../type":159}],173:[function(_dereq_,module,exports){ +},{"../type":162}],176:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21488,7 +21502,7 @@ module.exports = new Type('tag:yaml.org,2002:set', { construct: constructYamlSet }); -},{"../type":159}],174:[function(_dereq_,module,exports){ +},{"../type":162}],177:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21498,7 +21512,7 @@ module.exports = new Type('tag:yaml.org,2002:str', { construct: function (data) { return null !== data ? data : ''; } }); -},{"../type":159}],175:[function(_dereq_,module,exports){ +},{"../type":162}],178:[function(_dereq_,module,exports){ 'use strict'; var Type = _dereq_('../type'); @@ -21593,7 +21607,7 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', { represent: representYamlTimestamp }); -},{"../type":159}],176:[function(_dereq_,module,exports){ +},{"../type":162}],179:[function(_dereq_,module,exports){ /* * loglevel - https://github.com/pimterry/loglevel * @@ -21752,7 +21766,7 @@ module.exports = new Type('tag:yaml.org,2002:timestamp', { return self; })); -},{}],177:[function(_dereq_,module,exports){ +},{}],180:[function(_dereq_,module,exports){ 'use strict'; var whiteList = ['not', 'any', 'all', 'none']; @@ -21961,7 +21975,7 @@ module.exports = { parseFilter: parseFilter }; -},{}],178:[function(_dereq_,module,exports){ +},{}],181:[function(_dereq_,module,exports){ 'use strict'; // lightweight Buffer shim for pbf browser build @@ -22122,7 +22136,7 @@ function encodeString(str) { return bytes; } -},{"ieee754":142}],179:[function(_dereq_,module,exports){ +},{"ieee754":145}],182:[function(_dereq_,module,exports){ (function (global){ 'use strict'; @@ -22550,7 +22564,7 @@ function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pb }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9wYmYvaW5kZXguanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ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JpdGVQYWNrZWRCb29sZWFuKGFyciwgcGJmKSAgeyBmb3IgKHZhciBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgcGJmLndyaXRlQm9vbGVhbihhcnJbaV0pOyAgfVxuZnVuY3Rpb24gd3JpdGVQYWNrZWRGaXhlZDMyKGFyciwgcGJmKSAgeyBmb3IgKHZhciBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgcGJmLndyaXRlRml4ZWQzMihhcnJbaV0pOyAgfVxuZnVuY3Rpb24gd3JpdGVQYWNrZWRTRml4ZWQzMihhcnIsIHBiZikgeyBmb3IgKHZhciBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgcGJmLndyaXRlU0ZpeGVkMzIoYXJyW2ldKTsgfVxuZnVuY3Rpb24gd3JpdGVQYWNrZWRGaXhlZDY0KGFyciwgcGJmKSAgeyBmb3IgKHZhciBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgcGJmLndyaXRlRml4ZWQ2NChhcnJbaV0pOyAgfVxuZnVuY3Rpb24gd3JpdGVQYWNrZWRTRml4ZWQ2NChhcnIsIHBiZikgeyBmb3IgKHZhciBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykgcGJmLndyaXRlU0ZpeGVkNjQoYXJyW2ldKTsgfVxuIl19 -},{"./buffer":178}],180:[function(_dereq_,module,exports){ +},{"./buffer":181}],183:[function(_dereq_,module,exports){ 'use strict'; module.exports = Point; @@ -22683,7 +22697,7 @@ Point.convert = function (a) { return a; }; -},{}],181:[function(_dereq_,module,exports){ +},{}],184:[function(_dereq_,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -22771,7 +22785,7 @@ process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; -},{}],182:[function(_dereq_,module,exports){ +},{}],185:[function(_dereq_,module,exports){ /*! * strip-comments * @@ -22842,7 +22856,7 @@ strip.line = function(str, opts) { */ module.exports = strip; -},{}],183:[function(_dereq_,module,exports){ +},{}],186:[function(_dereq_,module,exports){ !function() { var topojson = { version: "1.6.19", @@ -23378,7 +23392,7 @@ module.exports = strip; else this.topojson = topojson; }(); -},{}],184:[function(_dereq_,module,exports){ +},{}],187:[function(_dereq_,module,exports){ (function (global,Buffer){ 'use strict' @@ -23596,12 +23610,12 @@ exports.clearCache = function clearCache() { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},_dereq_("buffer").Buffer) //# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy90eXBlZGFycmF5LXBvb2wvcG9vbC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ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BcbiAgICBQT09MLlVJTlQ4Q1tpXS5sZW5ndGggPSAwXG4gICAgREFUQVtpXS5sZW5ndGggPSAwXG4gICAgQlVGRkVSW2ldLmxlbmd0aCA9IDBcbiAgfVxufSJdfQ== -},{"bit-twiddle":28,"buffer":37,"dup":131}],185:[function(_dereq_,module,exports){ +},{"bit-twiddle":29,"buffer":38,"dup":134}],188:[function(_dereq_,module,exports){ module.exports.VectorTile = _dereq_('./lib/vectortile.js'); module.exports.VectorTileFeature = _dereq_('./lib/vectortilefeature.js'); module.exports.VectorTileLayer = _dereq_('./lib/vectortilelayer.js'); -},{"./lib/vectortile.js":186,"./lib/vectortilefeature.js":187,"./lib/vectortilelayer.js":188}],186:[function(_dereq_,module,exports){ +},{"./lib/vectortile.js":189,"./lib/vectortilefeature.js":190,"./lib/vectortilelayer.js":191}],189:[function(_dereq_,module,exports){ 'use strict'; var VectorTileLayer = _dereq_('./vectortilelayer'); @@ -23620,7 +23634,7 @@ function readTile(tag, layers, pbf) { } -},{"./vectortilelayer":188}],187:[function(_dereq_,module,exports){ +},{"./vectortilelayer":191}],190:[function(_dereq_,module,exports){ 'use strict'; var Point = _dereq_('point-geometry'); @@ -23784,7 +23798,7 @@ VectorTileFeature.prototype.toGeoJSON = function(x, y, z) { }; }; -},{"point-geometry":180}],188:[function(_dereq_,module,exports){ +},{"point-geometry":183}],191:[function(_dereq_,module,exports){ 'use strict'; var VectorTileFeature = _dereq_('./vectortilefeature.js'); @@ -23847,7 +23861,7 @@ VectorTileLayer.prototype.feature = function(i) { return new VectorTileFeature(this._pbf, end, this.extent, this._keys, this._values); }; -},{"./vectortilefeature.js":187}],189:[function(_dereq_,module,exports){ +},{"./vectortilefeature.js":190}],192:[function(_dereq_,module,exports){ 'use strict'; var _createClass = _dereq_('babel-runtime/helpers/create-class')['default']; @@ -24200,7 +24214,7 @@ var FlatCamera = (function (_IsometricCamera) { module.exports = exports['default']; -},{"./geo":190,"./gl/shader_program":196,"./utils/utils":239,"babel-runtime/helpers/class-call-check":17,"babel-runtime/helpers/create-class":18,"babel-runtime/helpers/get":20,"babel-runtime/helpers/inherits":21,"babel-runtime/helpers/interop-require-default":22,"gl-matrix":140}],190:[function(_dereq_,module,exports){ +},{"./geo":193,"./gl/shader_program":199,"./utils/utils":241,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/get":21,"babel-runtime/helpers/inherits":22,"babel-runtime/helpers/interop-require-default":23,"gl-matrix":143}],193:[function(_dereq_,module,exports){ // Miscellaneous geo functions 'use strict'; @@ -24516,7 +24530,7 @@ Geo.enforceWinding = function (geom, winding) { }; module.exports = exports['default']; -},{"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/sliced-to-array":23}],191:[function(_dereq_,module,exports){ +},{"babel-runtime/core-js/get-iterator":2,"babel-runtime/helpers/sliced-to-array":24}],194:[function(_dereq_,module,exports){ // WebGL constants - need to import these separately to make them available in the web worker "use strict"; @@ -24537,7 +24551,7 @@ gl.UNSIGNED_INT = 0x1405; gl.FLOAT = 0x1406; module.exports = exports["default"]; -},{}],192:[function(_dereq_,module,exports){ +},{}],195:[function(_dereq_,module,exports){ // WebGL context wrapper 'use strict'; @@ -24587,7 +24601,7 @@ Context.resize = function (gl, width, height, device_pixel_ratio) { }; module.exports = exports['default']; -},{}],193:[function(_dereq_,module,exports){ +},{}],196:[function(_dereq_,module,exports){ // WebGL extension wrapper // Stores extensions by name and GL context @@ -24616,7 +24630,7 @@ function getExtension(gl, name) { module.exports = exports["default"]; -},{"babel-runtime/core-js/map":4}],194:[function(_dereq_,module,exports){ +},{"babel-runtime/core-js/map":4}],197:[function(_dereq_,module,exports){ 'use strict'; var _toConsumableArray = _dereq_('babel-runtime/helpers/to-consumable-array')['default']; @@ -24950,7 +24964,7 @@ GLSL.expandVec4 = function (v) { }; module.exports = exports['default']; -},{"babel-runtime/helpers/to-consumable-array":24}],195:[function(_dereq_,module,exports){ +},{"babel-runtime/helpers/to-consumable-array":25}],198:[function(_dereq_,module,exports){ "use strict"; var _createClass = _dereq_("babel-runtime/helpers/create-class")["default"]; @@ -25030,7 +25044,7 @@ var RenderState = (function () { exports["default"] = RenderState; module.exports = exports["default"]; -},{"babel-runtime/helpers/class-call-check":17,"babel-runtime/helpers/create-class":18}],196:[function(_dereq_,module,exports){ +},{"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19}],199:[function(_dereq_,module,exports){ // GL program wrapper to cache uniform locations/values, do compile-time pre-processing // (injecting #defines and #pragma blocks into shaders), etc. @@ -25492,8 +25506,7 @@ var ShaderProgram = (function () { value: function setTextureUniform(uniform_name, texture_name) { var texture = _texture2['default'].textures[texture_name]; if (texture == null) { - texture = new _texture2['default'](this.gl, texture_name); - texture.load(texture_name); + texture = _texture2['default'].create(this.gl, texture_name, { url: texture_name }); } texture.bind(this.texture_unit); @@ -25862,7 +25875,7 @@ ShaderProgram.createShader = function (gl, source, stype) { }; module.exports = exports['default']; -},{"./extensions":193,"./glsl":194,"./texture":198,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/helpers/class-call-check":17,"babel-runtime/helpers/create-class":18,"babel-runtime/helpers/interop-require-default":22,"babel-runtime/helpers/to-consumable-array":24,"gl-shader-errors":141,"loglevel":176,"strip-comments":182}],197:[function(_dereq_,module,exports){ +},{"./extensions":196,"./glsl":197,"./texture":201,"babel-runtime/core-js/get-iterator":2,"babel-runtime/core-js/object/assign":6,"babel-runtime/helpers/class-call-check":18,"babel-runtime/helpers/create-class":19,"babel-runtime/helpers/interop-require-default":23,"babel-runtime/helpers/to-consumable-array":25,"gl-shader-errors":144,"loglevel":179,"strip-comments":185}],200:[function(_dereq_,module,exports){ // Generated from GLSL files, don't edit! "use strict"; @@ -25871,7 +25884,7 @@ Object.defineProperty(exports, "__esModule", { }); var shaderSources = {}; -shaderSources['gl/shaders/accessors'] = "// Vertex position in model space: [0, 1] range over the local tile\n" + "// Note positions can be outside that range due to unclipped geometry, geometry higher than a unit cube, etc.\n" + "#ifdef TANGRAM_VERTEX_SHADER\n" + "\n" + "vec4 modelPosition() {\n" + " return vec4(SHORT(a_position.xyz) / TANGRAM_TILE_SCALE, 1.);\n" + "}\n" + "\n" + "#endif\n" + "\n" + "// Vertex position in world coordinates, useful for 3d procedural textures, etc.\n" + "vec4 worldPosition() {\n" + " return v_world_position;\n" + "}\n" + "\n" + "// Optionally wrap world coordinates (allows more precision at higher zooms)\n" + "// e.g. at wrap 1000, the world space will wrap every 1000 meters\n" + "#ifdef TANGRAM_VERTEX_SHADER\n" + "\n" + "vec4 wrapWorldPosition(vec4 world_position) {\n" + " #if defined(TANGRAM_WORLD_POSITION_WRAP)\n" + " vec2 anchor = u_tile_origin.xy - mod(u_tile_origin.xy, TANGRAM_WORLD_POSITION_WRAP);\n" + " world_position.xy -= anchor;\n" + " #endif\n" + " return world_position;\n" + "}\n" + "\n" + "#endif\n" + "\n" + "// Normal in world space\n" + "#if defined(TANGRAM_VERTEX_SHADER)\n" + "\n" + "vec3 worldNormal() {\n" + " return TANGRAM_NORMAL;\n" + "}\n" + "\n" + "#elif defined(TANGRAM_FRAGMENT_SHADER)\n" + "\n" + "vec3 worldNormal() {\n" + " return u_inverseNormalMatrix * TANGRAM_NORMAL;\n" + "}\n" + "\n" + "#endif\n" + ""; +shaderSources['gl/shaders/accessors'] = "// Vertex position in model space: [0, 1] range over the local tile\n" + "// Note positions can be outside that range due to unclipped geometry, geometry higher than a unit cube, etc.\n" + "#ifdef TANGRAM_VERTEX_SHADER\n" + "\n" + "vec4 modelPosition() {\n" + " return vec4(SHORT(a_position.xyz) / TANGRAM_TILE_SCALE, 1.) + vec4(0., 1., 0., 0.);\n" + "}\n" + "\n" + "#endif\n" + "\n" + "// Vertex position in world coordinates, useful for 3d procedural textures, etc.\n" + "vec4 worldPosition() {\n" + " return v_world_position;\n" + "}\n" + "\n" + "// Optionally wrap world coordinates (allows more precision at higher zooms)\n" + "// e.g. at wrap 1000, the world space will wrap every 1000 meters\n" + "#ifdef TANGRAM_VERTEX_SHADER\n" + "\n" + "vec4 wrapWorldPosition(vec4 world_position) {\n" + " #if defined(TANGRAM_WORLD_POSITION_WRAP)\n" + " vec2 anchor = u_tile_origin.xy - mod(u_tile_origin.xy, TANGRAM_WORLD_POSITION_WRAP);\n" + " world_position.xy -= anchor;\n" + " #endif\n" + " return world_position;\n" + "}\n" + "\n" + "#endif\n" + "\n" + "// Normal in world space\n" + "#if defined(TANGRAM_VERTEX_SHADER)\n" + "\n" + "vec3 worldNormal() {\n" + " return TANGRAM_NORMAL;\n" + "}\n" + "\n" + "#elif defined(TANGRAM_FRAGMENT_SHADER)\n" + "\n" + "vec3 worldNormal() {\n" + " return u_inverseNormalMatrix * TANGRAM_NORMAL;\n" + "}\n" + "\n" + "#endif\n" + ""; shaderSources['gl/shaders/ambientLight'] = "/*\n" + "\n" + "Expected globals:\n" + "light_accumulator_*\n" + "\n" + "*/\n" + "\n" + "struct AmbientLight {\n" + " vec4 ambient;\n" + "};\n" + "\n" + "void calculateLight(in AmbientLight _light, in vec3 _eyeToPoint, in vec3 _normal) {\n" + " light_accumulator_ambient += _light.ambient;\n" + "}\n" + ""; @@ -25906,7 +25919,7 @@ shaderSources['styles/polygons/polygons_vertex'] = "uniform vec2 u_resolution;\n exports["default"] = shaderSources; module.exports = exports["default"]; -},{}],198:[function(_dereq_,module,exports){ +},{}],201:[function(_dereq_,module,exports){ // Texture management 'use strict'; @@ -25962,19 +25975,20 @@ var Texture = (function () { this.valid = true; } this.bind(); - this.image = null; // an Image object/element that is the source for this texture - this.canvas = null; // a Canvas object/element that is the source for this texture + + this.name = name; + this.source = null; + this.source_type = null; this.loading = null; // a Promise object to track the loading state of this texture + this.filtering = options.filtering; + this.sprites = options.sprites; + this.texcoords = {}; // sprite UVs ([0, 1] range) + this.sizes = {}; // sprite sizes (pixel size) // Default to a 1-pixel black texture so we can safely render while we wait for an image to load // See: http://stackoverflow.com/questions/19722247/webgl-wait-for-texture-to-load this.setData(1, 1, new Uint8Array([0, 0, 0, 255]), { filtering: 'nearest' }); - // TODO: better support for non-URL sources: canvas/video elements, raw pixel buffers - - this.name = name; - this.filtering = options.filtering; - // Destroy previous texture if present if (Texture.textures[this.name]) { Texture.textures[this.name].destroy(); @@ -25984,16 +25998,12 @@ var Texture = (function () { Texture.textures[this.name] = this; Texture.texture_configs[this.name] = _Object$assign({ name: name }, options); - this.sprites = options.sprites; - this.texcoords = {}; // sprite UVs ([0, 1] range) - this.sizes = {}; // sprite sizes (pixel size) + this.load(options); _loglevel2['default'].trace('creating Texture ' + this.name); } // Static/class methods and state - // Destroy all texture instances for a given GL context - // Destroy a single texture instance _createClass(Texture, [{ @@ -26027,13 +26037,36 @@ var Texture = (function () { Texture.activeTexture = this.texture; } } - - // Loads a texture from a URL }, { key: 'load', - value: function load(url) { + value: function load() { var _this = this; + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.loading = null; + + if (typeof options.url === 'string') { + this.setUrl(options.url, options); + } else if (options.element) { + this.setElement(options.element, options); + } else if (options.data && options.width && options.height) { + this.setData(options.width, options.height, options.data, options); + } + + if (this.loading) { + return this.loading.then(function (tex) { + _this.calculateSprites();return tex; + }); + } + } + + // Sets texture from an url + }, { + key: 'setUrl', + value: function setUrl(url) { + var _this2 = this; + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; if (!this.valid) { @@ -26044,33 +26077,30 @@ var Texture = (function () { url = _utilsUtils2['default'].addBaseURL(url, Texture.base_url); } - url = _utilsUtils2['default'].cacheBusterForUrl(url); + this.url = _utilsUtils2['default'].cacheBusterForUrl(url); // save URL reference (will be overwritten when element is loaded below) + this.source = this.url; + this.source_type = 'url'; this.loading = new _Promise(function (resolve, reject) { - _this.image = new Image(); - _this.image.onload = function () { + var image = new Image(); + image.onload = function () { try { - _this.update(options); - _this.setTextureFiltering(options); - _this.calculateSprites(); - - _this.canvas = null; // mutually exclusive with other types - _this.data = null; + _this2.setElement(image, options); } catch (e) { - _loglevel2['default'].warn('Texture: failed to load url: \'' + url + '\'', e, options); - Texture.trigger('warning', { message: 'Failed to load texture from ' + url, error: e, texture: options }); + _loglevel2['default'].warn('Texture \'' + _this2.name + '\': failed to load url: \'' + _this2.source + '\'', e, options); + Texture.trigger('warning', { message: 'Failed to load texture from ' + _this2.source, error: e, texture: options }); } - resolve(_this); + resolve(_this2); }; - _this.image.onerror = function (e) { + image.onerror = function (e) { // Warn and resolve on error - _loglevel2['default'].warn('Texture: failed to load url: \'' + url + '\'', e, options); - Texture.trigger('warning', { message: 'Failed to load texture from ' + url, error: e, texture: options }); - resolve(_this); + _loglevel2['default'].warn('Texture \'' + _this2.name + '\': failed to load url: \'' + _this2.source + '\'', e, options); + Texture.trigger('warning', { message: 'Failed to load texture from ' + _this2.source, error: e, texture: options }); + resolve(_this2); }; - _this.image.crossOrigin = 'anonymous'; - _this.image.src = url; + image.crossOrigin = 'anonymous'; + image.src = _this2.source; }); return this.loading; } @@ -26083,25 +26113,43 @@ var Texture = (function () { this.width = width; this.height = height; - this.data = data; - this.image = null; // mutually exclusive with other types - this.canvas = null; + this.source = data; + this.source_type = 'data'; this.update(options); - this.setTextureFiltering(options); + this.setFiltering(options); + + this.loading = _Promise.resolve(this); + return this.loading; } - // Sets the texture to track a canvas element + // Sets the texture to track a element (canvas/image) }, { - key: 'setCanvas', - value: function setCanvas(canvas, options) { - this.canvas = canvas; - this.update(options); - this.setTextureFiltering(options); + key: 'setElement', + value: function setElement(element, options) { + var el = element; - this.image = null; // mutually exclusive with other types - this.data = null; + // a string element is interpeted as a CSS selector + if (typeof element === 'string') { + element = document.querySelector(element); + } + + if (element instanceof HTMLCanvasElement || element instanceof HTMLImageElement || element instanceof HTMLVideoElement) { + this.source = element; + this.source_type = 'element'; + + this.update(options); + this.setFiltering(options); + } else { + var msg = 'the \'element\' parameter (`element: ' + JSON.stringify(el) + '`) must be a CSS '; + msg += 'selector string, or a , or