dat.gui/build/dat.gui.min.js

4 lines
105 KiB
JavaScript
Raw Normal View History

2015-08-15 01:45:28 +00:00
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):"object"==typeof exports?exports.dat=e():t.dat=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";e.__esModule=!0,n(1),e["default"]=n(169),t.exports=e["default"]},function(t,e,n){t.exports=n(2)},function(t,e,n){t.exports=n(3)},function(t,e,n){(function(t){"use strict";if(n(4),n(167),t._babelPolyfill)throw new Error("only one instance of babel/polyfill is allowed");t._babelPolyfill=!0}).call(e,function(){return this}())},function(t,e,n){n(5),n(34),n(42),n(44),n(46),n(48),n(50),n(51),n(52),n(53),n(54),n(55),n(56),n(58),n(59),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(69),n(70),n(71),n(73),n(74),n(75),n(76),n(77),n(78),n(79),n(80),n(81),n(82),n(83),n(84),n(85),n(91),n(92),n(94),n(95),n(97),n(98),n(103),n(104),n(107),n(109),n(110),n(111),n(112),n(113),n(115),n(116),n(118),n(119),n(120),n(121),n(126),n(129),n(130),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(145),n(146),n(147),n(148),n(149),n(150),n(152),n(153),n(154),n(155),n(157),n(158),n(160),n(161),n(162),n(165),n(166),t.exports=n(16)},function(t,e,n){function r(t,e){return function(n){var r,o=w(n),i=0,a=[];for(r in o)r!=m&&h(o,r)&&a.push(r);for(;e>i;)h(o,r=t[i++])&&(~R(a,r)||a.push(r));return a}}function o(){}function i(t,e,n){if(!(e in V)){for(var r=[],o=0;e>o;o++)r[o]="a["+o+"]";V[e]=Function("F,a","return new F("+r.join(",")+")")}return V[e](t,n)}function a(t){return function(e,n){x(e);var r=w(this),o=A(r.length),i=t?o-1:0,a=t?-1:1;if(arguments.length<2)for(;;){if(i in r){n=r[i],i+=a;break}if(i+=a,t?0>i:i>=o)throw TypeError("Reduce of empty array with no initial value")}for(;t?i>=0:o>i;i+=a)i in r&&(n=e(n,r[i],i,this));return n}}function u(t){return t>9?t:"0"+t}var s=n(6),c=n(7),l=n(8),f=n(9),d=n(11),h=n(13),p=n(14),_=n(15),g=n(20),v=n(21),m=n(19)("__proto__"),y=n(12),b=n(29),x=n(26),w=n(22),E=n(28),S=n(30),A=n(27),C=n(23),O=Object.prototype,k=[],M=k.slice,T=k.join,N=s.setDesc,P=s.getDesc,j=s.setDescs,L=!1,R=n(31)(!1),F=v(0),D=v(1),I=v(2),B=v(3),U=v(4),V={},H=n(32)(/^\s*([\s\S]*\S)?\s*$/,"$1");if(!c){try{L=8==N(d("div"),"x",{get:function(){return 8}}).x}catch(z){}s.setDesc=function(t,e,n){if(L)try{return N(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(b(t)[e]=n.value),t},s.getDesc=function(t,e){if(L)try{return P(t,e)}catch(n){}return h(t,e)?l(!O.propertyIsEnumerable.call(t,e),t[e]):void 0},s.setDescs=j=function(t,e){b(t);for(var n,r=s.getKeys(e),o=r.length,i=0;o>i;)s.setDesc(t,n=r[i++],e[n]);return t}}_(_.S+_.F*!c,"Object",{getOwnPropertyDescriptor:s.getDesc,defineProperty:s.setDesc,defineProperties:j});var G="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),W=G.concat("length","prototype"),K=G.length,X=function(){var t,e=d("iframe"),n=K,r=">";for(e.style.display="none",f.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+r),t.close(),X=t.F;n--;)delete X.prototype[G[n]];return X()};_(_.S,"Object",{getPrototypeOf:s.getProto=s.getProto||function(t){return t=w(t,!0),h(t,m)?t[m]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?O:null},getOwnPropertyNames:s.getNames=s.getNames||r(W,W.length,!0),create:s.create=s.create||function(t,e){var n;return null!==t?(o.prototype=b(t),n=new o,o.prototype=null,n[m]=t):n=X(),void 0===e?n:j(n,e)},keys:s.getKeys=s.getKeys||r(G,K,!1),seal:function(t){return t},freeze:function(t){return t},preventExtensions:function(t){return t},isSealed:function(t){return!y(t)},isFrozen:function(t){return!y(t)},isExtensible:function(t){return y(t)}}),_(_.P,"Function",{bind:function(t){function e(){var o=r.concat(M.call(arguments));return this ins
}},function(t,e,n){"use strict";function r(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}}function o(t){r.call(t.data)}var i,a,u,s=n(25),c=n(20),l=n(9),f=n(11),d=n(10),h=d.process,p=d.setImmediate,_=d.clearImmediate,g=d.MessageChannel,v=0,m={},y="onreadystatechange";p&&_||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return m[++v]=function(){c("function"==typeof t?t:Function(t),e)},i(v),v},_=function(t){delete m[t]},"process"==n(14)(h)?i=function(t){h.nextTick(s(r,t,1))}:d.addEventListener&&"function"==typeof postMessage&&!d.importScripts?(i=function(t){d.postMessage(t,"*")},d.addEventListener("message",o,!1)):g?(a=new g,u=a.port2,a.port1.onmessage=o,i=s(u.postMessage,u,1)):i=y in f("script")?function(t){l.appendChild(f("script"))[y]=function(){l.removeChild(this),r.call(t)}}:function(t){setTimeout(s(r,t,1),0)}),t.exports={set:p,clear:_}},function(t,e,n){var r=n(18);t.exports=function(t,e){for(var n in e)r(t,n,e[n]);return t}},function(t,e,n){"use strict";var r=n(127);n(128)("Map",function(t){return function(){return t(this,arguments[0])}},{get:function(t){var e=r.getEntry(this,t);return e&&e.v},set:function(t,e){return r.def(this,0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";function r(t,e){if(!_(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!p(t,h)){if(!g(t))return"F";if(!e)return"E";a(t,h,++y)}return"O"+t[h]}function o(t,e){var n,o=r(e);if("F"!==o)return t._i[o];for(n=t._f;n;n=n.n)if(n.k==e)return n}var i=n(6),a=n(17),u=n(25),s=n(108),c=n(122),l=n(24),f=n(123),d=n(106),h=n(19)("id"),p=n(13),_=n(12),g=Object.isExtensible||_,v=n(7),m=v?"_s":"size",y=0;t.exports={getConstructor:function(t,e,r,a){var s=t(function(t,n){c(t,s,e),t._i=i.create(null),t._f=void 0,t._l=void 0,t[m]=0,void 0!=n&&f(n,r,t[a],t)});return n(125)(s.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[m]=0},"delete":function(t){var e=this,n=o(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[m]--}return!!n},forEach:function(t){for(var e,n=u(t,arguments[1],3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!o(this,t)}}),v&&i.setDesc(s.prototype,"size",{get:function(){return l(this[m])}}),s},def:function(t,e,n){var i,a,u=o(t,e);return u?u.v=n:(t._l=u={i:a=r(e,!0),k:e,v:n,p:i=t._l,n:void 0,r:!1},t._f||(t._f=u),i&&(i.n=u),t[m]++,"F"!==a&&(t._i[a]=u)),t},getEntry:o,setStrong:function(t,e,r){n(87)(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?d(0,n.k):"values"==e?d(0,n.v):d(0,[n.k,n.v]):(t._t=void 0,d(1))},r?"entries":"values",!r,!0),s(t),s(n(16)[e])}}},function(t,e,n){"use strict";var r=n(10),o=n(15),i=n(90),a=n(123),u=n(122);t.exports=function(t,e,s,c,l,f){function d(t){var e=g[t];n(18)(g,t,"delete"==t?function(t){return e.call(this,0===t?0:t)}:"has"==t?function(t){return e.call(this,0===t?0:t)}:"get"==t?function(t){return e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})}var h=r[t],p=h,_=l?"set":"add",g=p&&p.prototype,v={};if("function"==typeof p&&(f||!i&&g.forEach&&g.entries)){var m,y=new p,b=y[_](f?{}:-0,1);n(102)(function(t){new p(t)})||(p=e(function(e,n){u(e,p,t);var r=new h;return void 0!=n&&a(n,l,r[_],r),r}),p.prototype=g,g.constructor=p),f||y.forEach(function(t,e){m=1/e===-(1/0)}),m&&(d("delete"),d("has"),l&&d("get")),(m||b!==y)&&d(_),f&&g.clear&&delete g.clear}else p=c.getConstructor(e,t,l,_),n(125)(p.prototype,s);return n(36)(p,t),v[t]=p,o(o.G+o.W+o.F*(p!=h),v),f||c.setStrong(p,t,l),p}},function(t,e,n){"use strict";var r=n(127);n(128)("Set",function(t){return function(){return t(this,arguments[0])}},{add:function(t){return r.def(this,t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r=n(6),o=n(131),i=n(12),a=n(13),u=o.frozenStore,s=o.WEAK,c=Object.isExtensible||i,l={},f=n(128)("WeakMap",function(t){return function(){return
function e(n,r,i){o(this,e),t.call(this,n,r);var a=i,u=this;this.__select=document.createElement("select"),f["default"].isArray(a)&&!function(){var t={};f["default"].each(a,function(e){t[e]=e}),a=t}(),f["default"].each(a,function(t,e){var n=document.createElement("option");n.innerHTML=e,n.setAttribute("value",t),u.__select.appendChild(n)}),this.updateDisplay(),c["default"].bind(this.__select,"change",function(){var t=this.options[this.selectedIndex].value;u.setValue(t)}),this.domElement.appendChild(this.__select)}return i(e,t),e.prototype.setValue=function(e){var n=t.prototype.setValue.call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n},e.prototype.updateDisplay=function(){return this.__select.value=this.getValue(),t.prototype.updateDisplay.call(this)},e}(u["default"]);e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.__esModule=!0;var a=n(175),u=r(a),s=n(177),c=r(s),l=function(t){function e(n,r){function i(){u.setValue(u.__input.value)}function a(){u.__onFinishChange&&u.__onFinishChange.call(u,u.getValue())}o(this,e),t.call(this,n,r);var u=this;this.__input=document.createElement("input"),this.__input.setAttribute("type","text"),c["default"].bind(this.__input,"keyup",i),c["default"].bind(this.__input,"change",i),c["default"].bind(this.__input,"blur",a),c["default"].bind(this.__input,"keydown",function(t){13===t.keyCode&&this.blur()}),this.updateDisplay(),this.domElement.appendChild(this.__input)}return i(e,t),e.prototype.updateDisplay=function(){return c["default"].isActive(this.__input)||(this.__input.value=this.getValue()),t.prototype.updateDisplay.call(this)},e}(u["default"]);e["default"]=l,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=t.toString();return e.indexOf(".")>-1?e.length-e.indexOf(".")-1:0}e.__esModule=!0;var u=n(175),s=r(u),c=n(173),l=r(c),f=function(t){function e(n,r,i){o(this,e),t.call(this,n,r);var u=i||{};this.__min=u.min,this.__max=u.max,this.__step=u.step,l["default"].isUndefined(this.__step)?0===this.initialValue?this.__impliedStep=1:this.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(this.initialValue))/Math.LN10))/10:this.__impliedStep=this.__step,this.__precision=a(this.__impliedStep)}return i(e,t),e.prototype.setValue=function(e){var n=e;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!==0&&(n=Math.round(n/this.__step)*this.__step),t.prototype.setValue.call(this,n)},e.prototype.min=function(t){return this.__min=t,this},e.prototype.max=function(t){return this.__max=t,this},e.prototype.step=function(t){return this.__step=t,this.__impliedStep=t,this.__precision=a(t),this},e}(s["default"]);e["default"]=f,t.exports=e["default"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumera
this.closed=!0},onResize:function(){var t=this.getRoot();if(t.scrollable){var e=z["default"].getOffset(t.__ul).top,n=0;W["default"].each(t.__ul.childNodes,function(e){t.autoPlace&&e===t.__save_row||(n+=z["default"].getHeight(e))}),window.innerHeight-e-Y<n?(z["default"].addClass(t.domElement,nt.CLASS_TOO_TALL),t.__ul.style.height=window.innerHeight-e-Y+"px"):(z["default"].removeClass(t.domElement,nt.CLASS_TOO_TALL),t.__ul.style.height="auto")}t.__resize_handle&&W["default"].defer(function(){t.__resize_handle.style.height=t.__ul.offsetHeight+"px"}),t.__closeButton&&(t.__closeButton.style.width=t.width+"px")},remember:function(){if(W["default"].isUndefined(q)&&(q=new V["default"],q.domElement.innerHTML=x["default"]),this.parent)throw new Error("You can only call remember on a top level GUI.");var t=this;W["default"].each(Array.prototype.slice.call(arguments),function(e){0===t.__rememberedObjects.length&&d(t),-1===t.__rememberedObjects.indexOf(e)&&t.__rememberedObjects.push(e)}),this.autoPlace&&p(this,this.width)},getRoot:function(){for(var t=this;t.parent;)t=t.parent;return t},getSaveObject:function(){var t=this.load;return t.closed=this.closed,this.__rememberedObjects.length>0&&(t.preset=this.preset,t.remembered||(t.remembered={}),t.remembered[this.preset]=_(this)),t.folders={},W["default"].each(this.__folders,function(e,n){t.folders[n]=e.getSaveObject()}),t},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=_(this),i(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(t){this.load.remembered||(this.load.remembered={},this.load.remembered[J]=_(this,!0)),this.load.remembered[t]=_(this),this.preset=t,l(this,t,!0),this.saveToLocalStorageIfPossible()},revert:function(t){W["default"].each(this.__controllers,function(e){this.getRoot().load.remembered?u(t||this.getRoot(),e):e.setValue(e.initialValue)},this),W["default"].each(this.__folders,function(t){t.revert(t)}),t||i(this.getRoot(),!1)},listen:function(t){var e=0===this.__listening.length;this.__listening.push(t),e&&v(this.__listening)}}),t.exports=nt},function(t,e){t.exports='<div id=dg-save class="dg dialogue">Here\'s the new load parameter for your <code>GUI</code>\'s constructor:<textarea id=dg-new-constructor></textarea><div id=dg-save-locally><input id=dg-local-storage type="checkbox"> Automatically save values to <code>localStorage</code> on exit.<div id=dg-local-explain>The values saved to <code>localStorage</code> will override those passed to <code>dat.GUI</code>\'s constructor. This makes it easier to work incrementally, but <code>localStorage</code> is fragile, and your friends may not see the same values you do.</div></div></div>'},function(t,e,n){var r=n(193);"string"==typeof r&&(r=[[t.id,r,""]]);n(187)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(186)(),e.push([t.id,".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1!important}.dg.main .close-button.drag,.dg.main:hover .close-button{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;transition:opacity .1s linear;border:0;position:absolute;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-x:hidden}.dg.a.has-save>ul{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{position:fixed;top:0;z-index:1002}.dg li{-webkit-transition:height .1s ease-out;transition:height .1s ease-out}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;overflow:hidden;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid transparent}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .c