diff --git a/.DS_Store b/.DS_Store index 0e60c88..2e03283 100644 --- a/.DS_Store +++ b/.DS_Store Binary files differ diff --git a/Araki/loading.jpg b/Araki/loading.jpg new file mode 100644 index 0000000..4d85b2e --- /dev/null +++ b/Araki/loading.jpg Binary files differ diff --git a/Araki/loading2.jpg b/Araki/loading2.jpg new file mode 100644 index 0000000..fd946b3 --- /dev/null +++ b/Araki/loading2.jpg Binary files differ diff --git a/Araki/ramen3.jpg b/Araki/ramen3.jpg new file mode 100644 index 0000000..96052e0 --- /dev/null +++ b/Araki/ramen3.jpg Binary files differ diff --git a/Araki/ramen4.jpg b/Araki/ramen4.jpg new file mode 100644 index 0000000..9a3a0cc --- /dev/null +++ b/Araki/ramen4.jpg Binary files differ diff --git a/Araki/ramen5.jpg b/Araki/ramen5.jpg new file mode 100644 index 0000000..f9ab8ed --- /dev/null +++ b/Araki/ramen5.jpg Binary files differ diff --git a/Araki/system_d.css b/Araki/system_d.css new file mode 100644 index 0000000..d6421b4 --- /dev/null +++ b/Araki/system_d.css @@ -0,0 +1,143 @@ +@charset "utf-8"; + + +/*========= レイアウトのためのCSS ===============*/ + +h1{ + font-size:1.2rem; +} + +h2{ + font-size:1.2rem; + text-align: center; + margin: 0 0 30px 0; +} + +p{ + margin-top:20px; +} + +small{ + background:#333; + color:#fff; + display: block; + text-align: center; + padding:20px; +} + +#header{ + background:rgb(208, 187, 29); + color:rgb(243, 242, 239); + text-align: center; + padding: 20px; +} + +section{ + padding:30px; +} + +section:nth-child(2n){ + background:#f5deb3; +} + +#main-vidual img{ + width: 100%; +} + +#page-link{ + display: flex; + justify-content: center; + padding: 20px; +} + +#page-link li{ + list-style: none; +} + +#page-link li a{ + color: rgb(2, 2, 20); + padding:0 20px; + text-decoration: none; +} + +#page-link li a::before{ + content:'▼'; + font-size:0.8rem; + padding:0 10px 0 0; + color: #4169e1; +} + +#footer{ + position: relative; + z-index: 2; +} + +/*========= LoadingのためのCSS ===============*/ + +/* Loading背景画面設定 */ +#splash { + /*fixedで全面に固定*/ + position: fixed; + width: 100%; + height: 100%; + z-index: 999; + background:rgb(254, 254, 254); + text-align:center; + color:rgb(255, 249, 249); +} + +/* Loading画像中央配置 */ +#splash_logo { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} + +/* Loading アイコンの大きさ設定 */ +#splash_logo img { + width: 800px; +} + +/* fadeUpをするアイコンの動き */ + +.fadeUp{ +animation-name: fadeUpAnime; +animation-duration:0.5s; +animation-fill-mode:forwards; +opacity: 0; +} + +@keyframes fadeUpAnime{ + from { + opacity: 0; + transform: translateY(100px); + } + + to { + opacity: 1; + transform: translateY(0); + } +} + + + +/*========= レイアウトのためのCSS ===============*/ + +#container{ + width:100%; + height: 100vh; + background: #ccc; + display: flex; + justify-content: center; + align-items: center; + text-align: center; +} + +a{ + color: #333; +} + +a:hover{ + text-decoration: none; +} \ No newline at end of file diff --git a/Araki/system_d.html b/Araki/system_d.html new file mode 100644 index 0000000..52b6082 --- /dev/null +++ b/Araki/system_d.html @@ -0,0 +1,84 @@ + + + + +8-2-1 ページ内の指定の場所にスクロール + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + +
+ +
+
+ +
+

悟空

+ +

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+
+
+

Area 2

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+ +
+
+

Area 3

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+

テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。テキストが入ります。

+ +
+
+ + + + + + + \ No newline at end of file diff --git a/Araki/system_d.js b/Araki/system_d.js new file mode 100644 index 0000000..23fcd1e --- /dev/null +++ b/Araki/system_d.js @@ -0,0 +1,12 @@ +$('#page-link a[href*="#"]').click(function () { + var elmHash = $(this).attr('href'); //ページ内リンクのHTMLタグhrefから、リンクされているエリアidの値を取得 + var pos = $(elmHash).offset().top; //idの上部の距離を取得 + $('body,html').animate({scrollTop: pos}, 500); //取得した位置にスクロール。500の数値が大きくなるほどゆっくりスクロール + return false; + }); + + //logoの表示 +$(window).on('load',function(){ + $("#splash").delay(1500).fadeOut('slow');//ローディング画面を1.5秒(1500ms)待機してからフェードアウト + $("#splash_logo").delay(1200).fadeOut('slow');//ロゴを1.2秒(1200ms)待機してからフェードアウト + }); \ No newline at end of file diff --git a/Araki/system_d2.css b/Araki/system_d2.css new file mode 100644 index 0000000..1b1b3f8 --- /dev/null +++ b/Araki/system_d2.css @@ -0,0 +1,334 @@ +/*! + * ress.css 窶「 v1.2.2 + * MIT License + * github.com/filipelinhares/ress + */ + +/* # ================================================================= + # Global selectors + # ================================================================= */ + + html { + box-sizing: border-box; + overflow-y: scroll; /* All browsers without overlaying scrollbars */ + -webkit-text-size-adjust: 100%; /* iOS 8+ */ + } + + *, + ::before, + ::after { + background-repeat: no-repeat; /* Set `background-repeat: no-repeat` to all elements and pseudo elements */ + box-sizing: inherit; + } + + ::before, + ::after { + text-decoration: inherit; /* Inherit text-decoration and vertical align to ::before and ::after pseudo elements */ + vertical-align: inherit; + } + + * { + padding: 0; /* Reset `padding` and `margin` of all elements */ + margin: 0; + } + + /* # ================================================================= + # General elements + # ================================================================= */ + + /* Add the correct display in iOS 4-7.*/ + audio:not([controls]) { + display: none; + height: 0; + } + + hr { + overflow: visible; /* Show the overflow in Edge and IE */ + } + + /* + * Correct `block` display not defined for any HTML5 element in IE 8/9 + * Correct `block` display not defined for `details` or `summary` in IE 10/11 + * and Firefox + * Correct `block` display not defined for `main` in IE 11 + */ + article, + aside, + details, + figcaption, + figure, + footer, + header, + main, + menu, + nav, + section, + summary { + display: block; + } + + summary { + display: list-item; /* Add the correct display in all browsers */ + } + + small { + font-size: 80%; /* Set font-size to 80% in `small` elements */ + } + + [hidden], + template { + display: none; /* Add the correct display in IE */ + } + + abbr[title] { + border-bottom: 1px dotted; /* Add a bordered underline effect in all browsers */ + text-decoration: none; /* Remove text decoration in Firefox 40+ */ + } + + a { + background-color: transparent; /* Remove the gray background on active links in IE 10 */ + -webkit-text-decoration-skip: objects; /* Remove gaps in links underline in iOS 8+ and Safari 8+ */ + } + + a:active, + a:hover { + outline-width: 0; /* Remove the outline when hovering in all browsers */ + } + + code, + kbd, + pre, + samp { + font-family: monospace, monospace; /* Specify the font family of code elements */ + } + + b, + strong { + font-weight: bolder; /* Correct style set to `bold` in Edge 12+, Safari 6.2+, and Chrome 18+ */ + } + + dfn { + font-style: italic; /* Address styling not present in Safari and Chrome */ + } + + /* Address styling not present in IE 8/9 */ + mark { + background-color: #ff0; + color: #000; + } + + /* https://gist.github.com/unruthless/413930 */ + sub, + sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; + } + + sub { + bottom: -0.25em; + } + + sup { + top: -0.5em; + } + + /* # ================================================================= + # Forms + # ================================================================= */ + + input { + border-radius: 0; + } + + /* Apply cursor pointer to button elements */ + button, + [type="button"], + [type="reset"], + [type="submit"], + [role="button"] { + cursor: pointer; + } + + /* Replace pointer cursor in disabled elements */ + [disabled] { + cursor: default; + } + + [type="number"] { + width: auto; /* Firefox 36+ */ + } + + [type="search"] { + -webkit-appearance: textfield; /* Safari 8+ */ + } + + [type="search"]::-webkit-search-cancel-button, + [type="search"]::-webkit-search-decoration { + -webkit-appearance: none; /* Safari 8 */ + } + + textarea { + overflow: auto; /* Internet Explorer 11+ */ + resize: vertical; /* Specify textarea resizability */ + } + + button, + input, + optgroup, + select, + textarea { + font: inherit; /* Specify font inheritance of form elements */ + } + + optgroup { + font-weight: bold; /* Restore the font weight unset by the previous rule. */ + } + + button { + overflow: visible; /* Address `overflow` set to `hidden` in IE 8/9/10/11 */ + } + + /* Remove inner padding and border in Firefox 4+ */ + button::-moz-focus-inner, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + border-style: 0; + padding: 0; + } + + /* Replace focus style removed in the border reset above */ + button:-moz-focusring, + [type="button"]::-moz-focus-inner, + [type="reset"]::-moz-focus-inner, + [type="submit"]::-moz-focus-inner { + outline: 1px dotted ButtonText; + } + + button, + html [type="button"], /* Prevent a WebKit bug where (2) destroys native `audio` and `video`controls in Android 4 */ + [type="reset"], + [type="submit"] { + -webkit-appearance: button; /* Correct the inability to style clickable types in iOS */ + } + + button, + select { + text-transform: none; /* Firefox 40+, Internet Explorer 11- */ + } + + /* Remove the default button styling in all browsers */ + button, + input, + select, + textarea { + background-color: transparent; + border-style: none; + color: inherit; + } + + /* Style select like a standard input */ + select { + -moz-appearance: none; /* Firefox 36+ */ + -webkit-appearance: none; /* Chrome 41+ */ + } + + select::-ms-expand { + display: none; /* Internet Explorer 11+ */ + } + + select::-ms-value { + color: currentColor; /* Internet Explorer 11+ */ + } + + legend { + border: 0; /* Correct `color` not being inherited in IE 8/9/10/11 */ + color: inherit; /* Correct the color inheritance from `fieldset` elements in IE */ + display: table; /* Correct the text wrapping in Edge and IE */ + max-width: 100%; /* Correct the text wrapping in Edge and IE */ + white-space: normal; /* Correct the text wrapping in Edge and IE */ + } + + ::-webkit-file-upload-button { + -webkit-appearance: button; /* Correct the inability to style clickable types in iOS and Safari */ + font: inherit; /* Change font properties to `inherit` in Chrome and Safari */ + } + + [type="search"] { + -webkit-appearance: textfield; /* Correct the odd appearance in Chrome and Safari */ + outline-offset: -2px; /* Correct the outline style in Safari */ + } + + /* # ================================================================= + # Specify media element style + # ================================================================= */ + + img { + border-style: none; /* Remove border when inside `a` element in IE 8/9/10 */ + } + + /* Add the correct vertical alignment in Chrome, Firefox, and Opera */ + progress { + vertical-align: baseline; + } + + svg:not(:root) { + overflow: hidden; /* Internet Explorer 11- */ + } + + audio, + canvas, + progress, + video { + display: inline-block; /* Internet Explorer 11+, Windows Phone 8.1+ */ + } + + /* # ================================================================= + # Accessibility + # ================================================================= */ + + /* Hide content from screens but not screenreaders */ + @media screen { + [hidden~="screen"] { + display: inherit; + } + [hidden~="screen"]:not(:active):not(:focus):not(:target) { + position: absolute !important; + clip: rect(0 0 0 0) !important; + } + } + + /* Specify the progress cursor of updating elements */ + [aria-busy="true"] { + cursor: progress; + } + + /* Specify the pointer cursor of trigger elements */ + [aria-controls] { + cursor: pointer; + } + + /* Specify the unstyled cursor of disabled, not-editable, or otherwise inoperable elements */ + [aria-disabled] { + cursor: default; + } + + /* # ================================================================= + # Selection + # ================================================================= */ + + /* Specify text selection background color and omit drop shadow */ + + ::-moz-selection { + background-color: #ebb14b; /* Required when declaring ::selection */ + color: #000; + text-shadow: none; + } + + ::selection { + background-color: #b3d4fc; /* Required when declaring ::selection */ + color: #000; + text-shadow: none; + } \ No newline at end of file diff --git a/Araki/title.jpg b/Araki/title.jpg new file mode 100644 index 0000000..d36d3d4 --- /dev/null +++ b/Araki/title.jpg Binary files differ diff --git a/komatsu/VR.html b/komatsu/VR.html index c4f7c05..8c29d98 100644 --- a/komatsu/VR.html +++ b/komatsu/VR.html @@ -1,121 +1,45 @@ - - - - - vr - - - - - - - - - - - - - - - - - - - + + + + + + VR a-frame + + + + + + + +
+

loading...

+
+
+ A-Frame +

一押し!みそ坦々麺スペシャル

+ 味わいの中には辛さだけでなく、うまさがぎゅっと濃縮されており、汗とよだれがとまりません。 +

+

320px × 200px

+
+ + + + + + + + + + + \ No newline at end of file diff --git a/komatsu/js/README.md b/komatsu/js/README.md new file mode 100644 index 0000000..a38a018 --- /dev/null +++ b/komatsu/js/README.md @@ -0,0 +1 @@ +add js diff --git a/komatsu/js/aframe-html-shader.min.js b/komatsu/js/aframe-html-shader.min.js new file mode 100644 index 0000000..355ac41 --- /dev/null +++ b/komatsu/js/aframe-html-shader.min.js @@ -0,0 +1,2 @@ +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return{status:"error",target:e,message:t,timestamp:Date.now()}}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=n(7),a=r(s);if("undefined"==typeof AFRAME)throw"Component attempted to register before AFRAME was available.";var c=AFRAME.utils.debug;c.enable("shader:html:warn");var h=c("shader:html:warn"),u=c("shader:html:debug");AFRAME.registerShader("html",{schema:{color:{type:"color"},fog:{"default":!0},src:{"default":null},target:{"default":null},debug:{"default":null},fps:{type:"number","default":0},width:{"default":null},height:{"default":null},ratio:{"default":null}},init:function(t){return u("init",t),this.__cnv=document.createElement("canvas"),this.__cnv.width=2,this.__cnv.height=2,this.__ctx=this.__cnv.getContext("2d"),this.__texture=new THREE.Texture(this.__cnv),this.__reset(),this.material=new THREE.MeshBasicMaterial({map:this.__texture}),this.el.sceneEl.addBehavior(this),this.material},update:function(t){return u("update",t),this.__updateMaterial(t),this.__updateTexture(t),this.material},tick:function(t){if(!this.__paused&&this.__target&&this.__nextTime){var e=Date.now();e>this.__nextTime&&this.__render()}},__updateMaterial:function(t){var e=this.material,n=this.__getMaterialData(t);Object.keys(n).forEach(function(t){e[t]=n[t]})},__getMaterialData:function(t){return{fog:t.fog,color:new THREE.Color(t.color)}},__setTexure:function(t){u("__setTexure",t),"error"===t.status?(h("Error: "+t.message+"\ntarget: "+t.target),this.__reset()):"success"===t.status&&t.target!==this.__textureSrc&&this.__ready(t)},__updateTexture:function(t){var e=this,n=t.target,r=t.fps,i=t.width,o=t.height,s=t.ratio;this.__width=i||this.schema.width["default"],this.__height=o||this.schema.height["default"];var a=function(){e.__debugEl&&(e.__debugEl.innerHTML="",e.__debugEl=e.schema.debug["default"])};if(t.debug){var c=this.__validateAndGetQuerySelector(t.debug);c&&!c.error?this.__debugEl=c:a()}else a();if(s&&"width"===s||"height"===s?this.__ratio=s:this.__ratio=this.schema.ratio["default"],r)if(this.__fps>0)this.__fps=r;else if(-1===r){this.__fps=this.schema.fps["default"],this.__target&&this.__render();var h=Object.assign({},this.el.getAttribute("material"));delete h.fps,this.el.setAttribute("material",h)}else this.__fps=r,this.__target&&(this.play(),this.__render());else this.__fps>0?this.pause():this.__fps=this.schema.fps["default"];if(n){if(n===this.__target)return;this.__target=n,this.__validateSrc(n,this.__setTexure.bind(this))}else this.__reset()},__validateSrc:function(t,e){var n=void 0,r=this.__validateAndGetQuerySelector(t);if(r&&"object"===("undefined"==typeof r?"undefined":o(r))){if(r.error)n=r.error;else{var s=r.tagName.toLowerCase();"img"===s||"video"===s?n="For <"+s+"> element, please use `shader:flat`":e({status:"success",target:t,targetEl:r,timestamp:Date.now()})}if(n){var a=i(n,t);e(a)}}},__validateAndGetQuerySelector:function(t){try{var e=document.querySelector(t);return e?e:{error:"No element was found matching the selector"}}catch(n){return{error:"no valid selector"}}},pause:function(){u("pause"),this.__paused=!0,this.__nextTime=null},play:function(){u("play"),this.__paused=!1},togglePlayback:function(){this.paused()?this.play():this.pause()},paused:function(){return this.__paused},__clearCanvas:function(){this.__ctx&&this.__texture&&(this.__ctx.clearRect(0,0,this.__width,this.__height),this.__texture.needsUpdate=!0)},__draw:function(t){if(u("__draw"),this.__ctx&&this.__texture){var e=t.width/t.height,n=this.__cnv.width=THREE.Math.nearestPowerOfTwo(t.width),r=this.__cnv.height=THREE.Math.nearestPowerOfTwo(t.height);if(this.__ctx.drawImage(t,0,0,n,r),this.__texture.needsUpdate=!0,this.__ratio){var i=this.el.getObject3D("mesh").geometry.parameters,o=i.width,s=i.height;this.el.setAttribute("geometry",Object.assign({},this.el.getAttribute("geometry"),{width:"width"===this.__ratio?o:s*e,height:"width"===this.__ratio?o/e:s}))}this.__debugEl&&(this.__debugEl.innerHTML="",this.__debugEl.appendChild(t)),this.__setNextTick()}},__render:function(){if(this.__nextTime=null,this.__targetEl){var t=this.__targetEl.getBoundingClientRect(),e=t.width,n=t.height;(0,a["default"])(this.__targetEl,{background:void 0,width:this.__width||e,height:this.__height||n,onrendered:this.__draw.bind(this)})}},__setNextTick:function(){this.__fps>0&&(this.__nextTime=Date.now()+1e3/this.__fps)},__ready:function(t){var e=t.target,n=t.targetEl;u("__ready"),this.__target=e,this.__targetEl=n,this.play(),this.__render()},__reset:function(){this.pause(),this.__clearCanvas(),this.__target=null,this.__targetEl=null,this.__debugEl=null}})},function(t,e){"use strict";e.smallImage=function(){return"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"},e.bind=function(t,e){return function(){return t.apply(e,arguments)}},e.decode64=function(t){var e,n,r,i,o,s,a,c,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=t.length,l="";for(e=0;u>e;e+=4)n=h.indexOf(t[e]),r=h.indexOf(t[e+1]),i=h.indexOf(t[e+2]),o=h.indexOf(t[e+3]),s=n<<2|r>>4,a=(15&r)<<4|i>>2,c=(3&i)<<6|o,l+=64===i?String.fromCharCode(s):64===o||-1===o?String.fromCharCode(s,a):String.fromCharCode(s,a,c);return l},e.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),n=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+n,left:e.left,width:n,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},e.offsetBounds=function(t){var n=t.offsetParent?e.offsetBounds(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+n.top,bottom:t.offsetTop+t.offsetHeight+n.top,right:t.offsetLeft+n.left+t.offsetWidth,left:t.offsetLeft+n.left,width:t.offsetWidth,height:t.offsetHeight}},e.parseBackgrounds=function(t){var e,n,r,i,o,s,a,c=" \r\n ",h=[],u=0,l=0,d=function(){e&&('"'===n.substr(0,1)&&(n=n.substr(1,n.length-2)),n&&a.push(n),"-"===e.substr(0,1)&&(i=e.indexOf("-",1)+1)>0&&(r=e.substr(0,i),e=e.substr(i)),h.push({prefix:r,method:e.toLowerCase(),value:o,args:a,image:null})),a=[],e=r=n=o=""};return a=[],e=r=n=o="",t.split("").forEach(function(t){if(!(0===u&&c.indexOf(t)>-1)){switch(t){case'"':s?s===t&&(s=null):s=t;break;case"(":if(s)break;if(0===u)return u=1,void(o+=t);l++;break;case")":if(s)break;if(1===u){if(0===l)return u=0,o+=t,void d();l--}break;case",":if(s)break;if(0===u)return void d();if(1===u&&0===l&&!e.match(/^url$/i))return a.push(n),n="",void(o+=t)}o+=t,0===u?e+=t:n+=t}}),d(),h}},function(t,e){"use strict";var n=function r(){r.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-r.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};n.options={logging:!1},t.exports=n},function(t,e,n){"use strict";function r(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function i(t){var e=t.options[t.selectedIndex||0];return e?e.text||"":""}function o(t){if(t&&"matrix"===t[1])return t[2].split(",").map(function(t){return parseFloat(t.trim())});if(t&&"matrix3d"===t[1]){var e=t[2].split(",").map(function(t){return parseFloat(t.trim())});return[e[0],e[1],e[4],e[5],e[12],e[13]]}}function s(t){return-1!==t.toString().indexOf("%")}function a(t){return t.replace("px","")}function c(t){return parseFloat(t)}var h=n(4),u=n(1),l=u.getBounds,d=u.parseBackgrounds,p=u.offsetBounds;r.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},r.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},r.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},r.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},r.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},r.prototype.prefixedCss=function(t){var e=["webkit","moz","ms","o"],n=this.css(t);return void 0===n&&e.some(function(e){return n=this.css(e+t.substr(0,1).toUpperCase()+t.substr(1)),void 0!==n},this),void 0===n?null:n},r.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},r.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},r.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new h(this.css(t)))},r.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},r.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal"}return t},r.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},r.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=d(this.css("backgroundImage")))},r.prototype.cssList=function(t,e){var n=(this.css(t)||"").split(",");return n=n[e||0]||n[0]||"auto",n=n.trim().split(" "),1===n.length&&(n=[n[0],s(n[0])?"auto":n[0]]),n},r.prototype.parseBackgroundSize=function(t,e,n){var r,i,o=this.cssList("backgroundSize",n);if(s(o[0]))r=t.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var a=t.width/t.height,c=e.width/e.height;return c>a^"contain"===o[0]?{width:t.height*c,height:t.height}:{width:t.width,height:t.width/c}}r=parseInt(o[0],10)}return i="auto"===o[0]&&"auto"===o[1]?e.height:"auto"===o[1]?r/e.width*e.height:s(o[1])?t.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(r=i/e.height*e.width),{width:r,height:i}},r.prototype.parseBackgroundPosition=function(t,e,n,r){var i,o,a=this.cssList("backgroundPosition",n);return i=s(a[0])?(t.width-(r||e).width)*(parseFloat(a[0])/100):parseInt(a[0],10),o="auto"===a[1]?i/e.width*e.height:s(a[1])?(t.height-(r||e).height)*parseFloat(a[1])/100:parseInt(a[1],10),"auto"===a[0]&&(i=o/e.height*e.width),{left:i,top:o}},r.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},r.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var n=t.match(this.TEXT_SHADOW_PROPERTY),r=0;n&&r3&&(this.a=t[3])),Array.isArray(t)};var r=/^#([a-f0-9]{3})$/i;n.prototype.hex3=function(t){var e=null;return null!==(e=t.match(r))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var i=/^#([a-f0-9]{6})$/i;n.prototype.hex6=function(t){var e=null;return null!==(e=t.match(i))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;n.prototype.rgb=function(t){var e=null;return null!==(e=t.match(o))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;n.prototype.rgba=function(t){var e=null;return null!==(e=t.match(s))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},n.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},n.prototype.namedColor=function(t){t=t.toLowerCase();var e=a[t];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t)return this.r=this.g=this.b=this.a=0,!0;return!!e},n.prototype.isColor=!0;var a={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};t.exports=n},function(t,e,n){"use strict";function r(t,e,n){var r="withCredentials"in new XMLHttpRequest;if(!e)return Promise.reject("No proxy configured");var i=s(r),c=a(e,t,i);return r?u(c):o(n,c,i).then(function(t){return f(t.content)})}function i(t,e,n){var r="crossOrigin"in new Image,i=s(r),c=a(e,t,i);return r?Promise.resolve(c):o(n,c,i).then(function(t){return"data:"+t.type+";base64,"+t.content})}function o(t,e,n){return new Promise(function(r,i){var o=t.createElement("script"),s=function(){delete window.html2canvas.proxy[n],t.body.removeChild(o)};window.html2canvas.proxy[n]=function(t){s(),r(t)},o.src=e,o.onerror=function(t){s(),i(t)},t.body.appendChild(o)})}function s(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++g+"_"+Math.round(1e5*Math.random())}function a(t,e,n){return t+"?url="+encodeURIComponent(e)+(n.length?"&callback=html2canvas.proxy."+n:"")}function c(t){return function(e){var n,r=new DOMParser;try{n=r.parseFromString(e,"text/html")}catch(i){d("DOMParser not supported, falling back to createHTMLDocument"),n=document.implementation.createHTMLDocument("");try{n.open(),n.write(e),n.close()}catch(o){d("createHTMLDocument write not supported, falling back to document.body.innerHTML"),n.body.innerHTML=e}}var s=n.querySelector("base");if(!s||!s.href.host){var a=n.createElement("base");a.href=t,n.head.insertBefore(a,n.head.firstChild)}return n}}function h(t,e,n,i,o,s){return new r(t,e,window.document).then(c(t)).then(function(t){return p(t,n,i,o,s,0,0)})}var u=n(11),l=n(1),d=n(2),p=n(6),f=l.decode64,g=0;e.Proxy=r,e.ProxyURL=i,e.loadUrlDocument=h},function(t,e,n){"use strict";function r(t,e,n){!t.defaultView||e===t.defaultView.pageXOffset&&n===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,n)}function i(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(n){a("Unable to copy canvas content from",t,n)}}function o(t,e){for(var n=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),r=t.firstChild;r;)e!==!0&&1===r.nodeType&&"SCRIPT"===r.nodeName||n.appendChild(o(r,e)),r=r.nextSibling;return 1===t.nodeType&&(n._scrollTop=t.scrollTop,n._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?i(t,n):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(n.value=t.value)),n}function s(t){if(1===t.nodeType){t.scrollTop=t._scrollTop,t.scrollLeft=t._scrollLeft;for(var e=t.firstChild;e;)s(e),e=e.nextSibling}}var a=n(2);t.exports=function(t,e,n,i,a,c,h){var u=o(t.documentElement,a.javascriptEnabled),l=e.createElement("iframe");return l.className="html2canvas-container",l.style.visibility="hidden",l.style.position="fixed",l.style.left="-10000px",l.style.top="0px",l.style.border="0",l.width=n,l.height=i,l.scrolling="no",e.body.appendChild(l),new Promise(function(e){var n=l.contentWindow.document;l.contentWindow.onload=l.onload=function(){var t=setInterval(function(){n.body.childNodes.length>0&&(s(n.documentElement),clearInterval(t),"view"===a.type&&(l.contentWindow.scrollTo(c,h),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||l.contentWindow.scrollY===h&&l.contentWindow.scrollX===c||(n.documentElement.style.top=-h+"px",n.documentElement.style.left=-c+"px",n.documentElement.style.position="absolute")),e(l))},50)},n.open(),n.write(""),r(t,c,h),n.replaceChild(n.adoptNode(u),n.documentElement),n.close()})}},function(t,e,n){function r(t,e){g++;e=e||{},e.logging&&(d.options.logging=!0,d.options.start=Date.now()),e.async="undefined"==typeof e.async?!0:e.async,e.allowTaint="undefined"==typeof e.allowTaint?!1:e.allowTaint,e.removeContainer="undefined"==typeof e.removeContainer?!0:e.removeContainer,e.javascriptEnabled="undefined"==typeof e.javascriptEnabled?!1:e.javascriptEnabled,e.imageTimeout="undefined"==typeof e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"==typeof e.renderer?e.renderer:c,e.strict=!!e.strict;var n=e.width||512,r=e.height||512;return i(t,n,r).then(function(t){e.onrendered(t)})}function i(t,e,n){var i=new a(t.ownerDocument),o=new h({useCORS:!0},i),s={renderer:r.CanvasRenderer},c=(f(t),new s.renderer(e,n,o,s,document)),l=new u(t,c,i,o,s);return l.ready.then(function(){return c.canvas})}var o,s,a=n(24),c=n(22),h=n(17),u=n(18),l=n(3),d=n(2),p=n(1),f=(n(6),n(5).loadUrlDocument,p.getBounds),g=0;r.CanvasRenderer=c,r.NodeContainer=l,r.log=d,r.utils=p;var m="undefined"==typeof document||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:r;t.exports=m,o=[],s=function(){return m}.apply(e,o),!(void 0!==s&&(t.exports=s))},function(t,e){"use strict";function n(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}n.TYPES={LINEAR:1,RADIAL:2},n.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,t.exports=n},function(t,e,n){"use strict";function r(t){i.apply(this,arguments),this.type=i.TYPES.LINEAR;var e=r.REGEXP_DIRECTION.test(t.args[0])||!i.REGEXP_COLORSTOP.test(t.args[0]);e?t.args[0].split(/\s+/).reverse().forEach(function(t,e){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var n=this.y0,r=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=r,this.y1=n;break;case"center":break;default:var i=.01*parseFloat(t,10);if(isNaN(i))break;0===e?(this.y0=i,this.y1=1-this.y0):(this.x0=i,this.x1=1-this.x0)}},this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map(function(t){var e=t.match(i.REGEXP_COLORSTOP),n=+e[2],r=0===n?"%":e[3];return{color:new o(e[1]),stop:"%"===r?n/100:null}}),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach(function(t,e){null===t.stop&&this.colorStops.slice(e).some(function(n,r){return null!==n.stop?(t.stop=(n.stop-this.colorStops[e-1].stop)/(r+1)+this.colorStops[e-1].stop,!0):!1},this)},this)}var i=n(8),o=n(4);r.prototype=Object.create(i.prototype),r.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,t.exports=r},function(t,e,n){"use strict";function r(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then(function(){return e.isInline(t)?Promise.resolve(e.inlineFormatting(t)):i(t)}).then(function(t){return new Promise(function(n){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,n))})})}var i=n(11),o=n(1).decode64;r.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},r.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},r.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},r.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},r.prototype.createCanvas=function(t){var e=this;return function(n,r){var i=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=i.lowerCanvasEl,i.setWidth(r.width).setHeight(r.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(n,r)).renderAll(),t(i.lowerCanvasEl)}},r.prototype.decode64=function(t){return"function"==typeof window.atob?window.atob(t):o(t)},t.exports=r},function(t,e){"use strict";function n(t){return new Promise(function(e,n){var r=new XMLHttpRequest;r.open("GET",t),r.onload=function(){200===r.status?e(r.responseText):n(new Error(r.statusText))},r.onerror=function(){n(new Error("Network Error"))},r.send()})}t.exports=n},function(t,e,n){"use strict";function r(t){if(this.src=t,i("DummyImageContainer for",t),!this.promise||!this.image){i("Initiating DummyImageContainer"),r.prototype.image=new Image;var e=this.image;r.prototype.promise=new Promise(function(t,n){e.onload=t,e.onerror=n,e.src=o(),e.complete===!0&&t(e)})}}var i=n(2),o=n(1).smallImage;t.exports=r},function(t,e,n){"use strict";function r(t,e){var n,r,o=document.createElement("div"),s=document.createElement("img"),a=document.createElement("span"),c="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=t,o.style.fontSize=e,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),s.src=i(),s.width=1,s.height=1,s.style.margin=0,s.style.padding=0,s.style.verticalAlign="baseline",a.style.fontFamily=t,a.style.fontSize=e,a.style.margin=0,a.style.padding=0,a.appendChild(document.createTextNode(c)),o.appendChild(a),o.appendChild(s),n=s.offsetTop-a.offsetTop+1,o.removeChild(a),o.appendChild(document.createTextNode(c)),o.style.lineHeight="normal",s.style.verticalAlign="super",r=s.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=n,this.lineWidth=1,this.middle=r}var i=n(1).smallImage;t.exports=r},function(t,e,n){"use strict";function r(){this.data={}}var i=n(13);r.prototype.getMetrics=function(t,e){return void 0===this.data[t+"-"+e]&&(this.data[t+"-"+e]=new i(t,e)),this.data[t+"-"+e]},t.exports=r},function(t,e,n){"use strict";function r(t,e,r){this.image=null,this.src=t;var i=this,s=o(t);this.promise=(e?new Promise(function(e){"about:blank"===t.contentWindow.document.URL||null==t.contentWindow.document.documentElement?t.contentWindow.onload=t.onload=function(){e(t)}:e(t)}):this.proxyLoad(r.proxy,s,r)).then(function(t){var e=n(7);return e(t.contentWindow.document.documentElement,{type:"view",width:t.width,height:t.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})}).then(function(t){return i.image=t})}var i=n(1),o=i.getBounds,s=n(5).loadUrlDocument;r.prototype.proxyLoad=function(t,e,n){var r=this.src;return s(r.src,t,r.ownerDocument,e.width,e.height,n)},t.exports=r},function(t,e){"use strict";function n(t,e){this.src=t,this.image=new Image;var n=this;this.tainted=null,this.promise=new Promise(function(r,i){n.image.onload=r,n.image.onerror=i,e&&(n.image.crossOrigin="anonymous"),n.image.src=t,n.image.complete===!0&&r(n.image)})}t.exports=n},function(t,e,n){"use strict";function r(t,e){this.link=null,this.options=t,this.support=e,this.origin=this.getOrigin(window.location.href)}var i=n(2),o=n(16),s=n(12),a=n(19),c=n(15),h=n(10),u=n(25),l=n(9),d=n(27),p=n(1).bind;r.prototype.findImages=function(t){var e=[];return t.reduce(function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t},[]).forEach(this.addImage(e,this.loadImage),this),e},r.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},r.prototype.addImage=function(t,e){return function(n){n.args.forEach(function(r){this.imageExists(t,r)||(t.splice(0,0,e.call(this,n)),i("Added image #"+t.length,"string"==typeof r?r.substring(0,100):r))},this)}},r.prototype.hasImageBackground=function(t){return"none"!==t.method},r.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new o(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||this.options.allowTaint===!0||this.isSVG(e)?new o(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new o(e,!0):this.options.proxy?new a(e,this.options.proxy):new s(e):new h(e)}return"linear-gradient"===t.method?new l(t):"gradient"===t.method?new d(t):"svg"===t.method?new u(t.args[0],this.support.svg):"IFRAME"===t.method?new c(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new s(t)},r.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||h.prototype.isInline(t)},r.prototype.imageExists=function(t,e){return t.some(function(t){return t.src===e})},r.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},r.prototype.getOrigin=function(t){var e=this.link||(this.link=document.createElement("a"));return e.href=t,e.href=e.href,e.protocol+e.hostname+e.port},r.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout)["catch"](function(){var e=new s(t.src);return e.promise.then(function(e){t.image=e})})},r.prototype.get=function(t){var e=null;return this.images.some(function(n){return(e=n).src===t})?e:null},r.prototype.fetch=function(t){return this.images=t.reduce(p(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach(function(t,e){t.promise.then(function(){i("Succesfully loaded image #"+(e+1),t)},function(n){i("Failed loading image #"+(e+1),t,n)})}),this.ready=Promise.all(this.images.map(this.getPromise,this)),i("Finished searching images"),this},r.prototype.timeout=function(t,e){var n,r=Promise.race([t.promise,new Promise(function(r,o){n=setTimeout(function(){i("Timed out loading image",t),o(t)},e)})]).then(function(t){return clearTimeout(n),t});return r["catch"](function(){clearTimeout(n)}),r},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i){j("Starting NodeParser"),this.renderer=e,this.options=i,this.range=null,this.support=n,this.renderQueue=[],this.stack=new q(!0,1,t.ownerDocument,null);var o=new W(t,null);if(i.background&&e.rectangle(0,0,e.width,e.height,new G(i.background)),t===t.ownerDocument.documentElement){var s=new W(o.color("backgroundColor").isTransparent()?t.ownerDocument.body:t.ownerDocument.documentElement,null);e.rectangle(0,0,e.width,e.height,s.color("backgroundColor"))}o.visibile=o.isElementVisible(), +this.createPseudoHideStyles(t.ownerDocument),this.disableAnimations(t.ownerDocument),this.nodes=B([o].concat(this.getChildren(o)).filter(function(t){return t.visible=t.isElementVisible()}).map(this.getPseudoElements,this)),this.fontMetrics=new X,j("Fetched nodes, total:",this.nodes.length),j("Calculate overflow clips"),this.calculateOverflowClips(),j("Start fetching images"),this.images=r.fetch(this.nodes.filter(S)),this.ready=this.images.ready.then(Q(function(){return j("Images loaded, starting parsing"),j("Creating stacking contexts"),this.createStackingContexts(),j("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),j("Render queue created with "+this.renderQueue.length+" items"),new Promise(Q(function(t){i.async?"function"==typeof i.async?i.async.call(this,this.renderQueue,t):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())},this))},this))}function i(t){return t.parent&&t.parent.clip.length}function o(t){return t.replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")})}function s(){}function a(t,e,n,r){return t.map(function(i,o){if(i.width>0){var s=e.left,a=e.top,c=e.width,h=e.height-t[2].width;switch(o){case 0:h=t[0].width,i.args=l({c1:[s,a],c2:[s+c,a],c3:[s+c-t[1].width,a+h],c4:[s+t[3].width,a+h]},r[0],r[1],n.topLeftOuter,n.topLeftInner,n.topRightOuter,n.topRightInner);break;case 1:s=e.left+e.width-t[1].width,c=t[1].width,i.args=l({c1:[s+c,a],c2:[s+c,a+h+t[2].width],c3:[s,a+h],c4:[s,a+t[0].width]},r[1],r[2],n.topRightOuter,n.topRightInner,n.bottomRightOuter,n.bottomRightInner);break;case 2:a=a+e.height-t[2].width,h=t[2].width,i.args=l({c1:[s+c,a+h],c2:[s,a+h],c3:[s+t[3].width,a],c4:[s+c-t[3].width,a]},r[2],r[3],n.bottomRightOuter,n.bottomRightInner,n.bottomLeftOuter,n.bottomLeftInner);break;case 3:c=t[3].width,i.args=l({c1:[s,a+h+t[2].width],c2:[s,a],c3:[s+c,a+t[0].width],c4:[s+c,a+h]},r[3],r[0],n.bottomLeftOuter,n.bottomLeftInner,n.topLeftOuter,n.topLeftInner)}}return i})}function c(t,e,n,r){var i=4*((Math.sqrt(2)-1)/3),o=n*i,s=r*i,a=t+n,c=e+r;return{topLeft:u({x:t,y:c},{x:t,y:c-s},{x:a-o,y:e},{x:a,y:e}),topRight:u({x:t,y:e},{x:t+o,y:e},{x:a,y:c-s},{x:a,y:c}),bottomRight:u({x:a,y:e},{x:a,y:e+s},{x:t+o,y:c},{x:t,y:c}),bottomLeft:u({x:a,y:c},{x:a-o,y:c},{x:t,y:e+s},{x:t,y:e})}}function h(t,e,n){var r=t.left,i=t.top,o=t.width,s=t.height,a=e[0][0]o+n[3].width?0:u-n[3].width,l-n[0].width).topRight.subdivide(.5),bottomRightOuter:c(r+w,i+y,d,p).bottomRight.subdivide(.5),bottomRightInner:c(r+Math.min(w,o-n[3].width),i+Math.min(y,s+n[0].width),Math.max(0,d-n[1].width),p-n[2].width).bottomRight.subdivide(.5),bottomLeftOuter:c(r,i+b,f,g).bottomLeft.subdivide(.5),bottomLeftInner:c(r+n[3].width,i+b,Math.max(0,f-n[3].width),g-n[2].width).bottomLeft.subdivide(.5)}}function u(t,e,n,r){var i=function(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}};return{start:t,startControl:e,endControl:n,end:r,subdivide:function(o){var s=i(t,e,o),a=i(e,n,o),c=i(n,r,o),h=i(s,a,o),l=i(a,c,o),d=i(h,l,o);return[u(t,s,h,d),u(d,l,c,r)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,n.x,n.y,r.x,r.y])},curveToReversed:function(r){r.push(["bezierCurve",n.x,n.y,e.x,e.y,t.x,t.y])}}}function l(t,e,n,r,i,o,s){var a=[];return e[0]>0||e[1]>0?(a.push(["line",r[1].start.x,r[1].start.y]),r[1].curveTo(a)):a.push(["line",t.c1[0],t.c1[1]]),n[0]>0||n[1]>0?(a.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(a),a.push(["line",s[0].end.x,s[0].end.y]),s[0].curveToReversed(a)):(a.push(["line",t.c2[0],t.c2[1]]),a.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(a.push(["line",i[1].end.x,i[1].end.y]),i[1].curveToReversed(a)):a.push(["line",t.c4[0],t.c4[1]]),a}function d(t,e,n,r,i,o,s){e[0]>0||e[1]>0?(t.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(t),r[1].curveTo(t)):t.push(["line",o,s]),(n[0]>0||n[1]>0)&&t.push(["line",i[0].start.x,i[0].start.y])}function p(t){return t.cssInt("zIndex")<0}function f(t){return t.cssInt("zIndex")>0}function g(t){return 0===t.cssInt("zIndex")}function m(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function y(t){return t instanceof q}function w(t){return t.node.data.trim().length>0}function b(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function v(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(e){var n=t.css("border"+e+"Radius"),r=n.split(" ");return r.length<=1&&(r[1]=r[0]),r.map(P)})}function x(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function _(t){var e=t.css("position"),n=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==n}function E(t){return"static"!==t.css("position")}function T(t){return"none"!==t.css("float")}function k(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function C(t){var e=this;return function(){return!t.apply(e,arguments)}}function S(t){return t.node.nodeType===Node.ELEMENT_NODE}function I(t){return t.isPseudoElement===!0}function R(t){return t.node.nodeType===Node.TEXT_NODE}function O(t){return function(e,n){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(n.cssInt("zIndex")+t.indexOf(n)/t.length)}}function A(t){return t.getOpacity()<1}function P(t){return parseInt(t,10)}function L(t){return t.width}function N(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function B(t){return[].concat.apply([],t)}function M(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}function D(t){for(var e,n=[],r=0,i=!1;t.length;)F(t[r])===i?(e=t.splice(0,r),e.length&&n.push(V.ucs2.encode(e)),i=!i,r=0):r++,r>=t.length&&(e=t.splice(0,r),e.length&&n.push(V.ucs2.encode(e)));return n}function F(t){return-1!==[32,13,10,9,45].indexOf(t)}function H(t){return/[^\u0000-\u00ff]/.test(t)}var j=n(2),V=n(28),W=n(3),z=n(26),U=n(20),X=n(14),G=n(4),q=n(23),Y=n(1),Q=Y.bind,$=Y.getBounds,J=Y.parseBackgrounds,K=Y.offsetBounds;r.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(t){if(S(t)){I(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],n=t.parseClip();n&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+n.left,t.bounds.top+n.top,n.right-n.left,n.bottom-n.top]]),t.clip=i(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,I(t)&&t.cleanDOM()}else R(t)&&(t.clip=i(t)?t.parent.clip:[]);I(t)||(t.bounds=null)},this)},r.prototype.asyncRenderer=function(t,e,n){n=n||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():n+20>Date.now()?this.asyncRenderer(t,e,n):setTimeout(Q(function(){this.asyncRenderer(t,e)},this),0)},r.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},r.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},r.prototype.createStyles=function(t,e){if(!window.hidePseudoElementsAdded){window.hidePseudoElementsAdded=!0;var n=t.createElement("style");n.innerHTML=e,t.body.appendChild(n)}},r.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var n=this.getPseudoElement(t,":before"),r=this.getPseudoElement(t,":after");n&&e.push(n),r&&e.push(r)}return B(e)},r.prototype.getPseudoElement=function(t,e){var n=t.computedStyle(e);if(!n||!n.content||"none"===n.content||"-moz-alt-content"===n.content||"none"===n.display)return null;for(var r=M(n.content),i="url"===r.substr(0,3),s=document.createElement(i?"img":"html2canvaspseudoelement"),a=new U(s,t,e),c=n.length-1;c>=0;c--){var h=o(n.item(c));s.style[h]=n[h]}if(s.className=U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,i)return s.src=J(r)[0].args[0],[a];var u=document.createTextNode(r);return s.appendChild(u),[a,new z(u,a)]},r.prototype.getChildren=function(t){return B([].filter.call(t.node.childNodes,x).map(function(e){var n=[e.nodeType===Node.TEXT_NODE?new z(e,t):new W(e,t)].filter(N);return e.nodeType===Node.ELEMENT_NODE&&n.length&&"TEXTAREA"!==e.tagName?n[0].isElementVisible()?n.concat(this.getChildren(n[0])):[]:n},this))},r.prototype.newStackingContext=function(t,e){var n=new q(e,t.getOpacity(),t.node,t.parent);t.cloneTo(n);var r=e?n.getParentStack(this):n.parent.stack;r.contexts.push(n),t.stack=n},r.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){S(t)&&(this.isRootElement(t)||A(t)||_(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):S(t)&&(E(t)&&g(t)||k(t)||T(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)},this)},r.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},r.prototype.isRootElement=function(t){return null===t.parent},r.prototype.sortStackingContexts=function(t){t.contexts.sort(O(t.contexts.slice(0))),t.contexts.forEach(this.sortStackingContexts,this)},r.prototype.parseTextBounds=function(t){return function(e,n,r){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var i=r.slice(0,n).join("").length;return this.getRangeBounds(t.node,i,e.length)}if(t.node&&"string"==typeof t.node.data){var o=t.node.splitText(e.length),s=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=o,s}}else this.support.rangeBounds&&!t.parent.hasTransform()||(t.node=t.node.splitText(e.length));return{}}},r.prototype.getWrapperBounds=function(t,e){var n=t.ownerDocument.createElement("html2canvaswrapper"),r=t.parentNode,i=t.cloneNode(!0);n.appendChild(t.cloneNode(!0)),r.replaceChild(n,t);var o=e?K(n):$(n);return r.replaceChild(i,n),o},r.prototype.getRangeBounds=function(t,e,n){var r=this.range||(this.range=t.ownerDocument.createRange());return r.setStart(t,e),r.setEnd(t,e+n),r.getBoundingClientRect()},r.prototype.parse=function(t){var e=t.contexts.filter(p),n=t.children.filter(S),r=n.filter(C(T)),i=r.filter(C(E)).filter(C(m)),o=n.filter(C(E)).filter(T),a=r.filter(C(E)).filter(m),c=t.contexts.concat(r.filter(E)).filter(g),h=t.children.filter(R).filter(w),u=t.contexts.filter(f);e.concat(i).concat(o).concat(a).concat(c).concat(h).concat(u).forEach(function(t){this.renderQueue.push(t),y(t)&&(this.parse(t),this.renderQueue.push(new s))},this)},r.prototype.paint=function(t){try{t instanceof s?this.renderer.ctx.restore():R(t)?(I(t.parent)&&t.parent.appendToDOM(),this.paintText(t),I(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(j(e),this.options.strict)throw e}},r.prototype.paintNode=function(t){y(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},r.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,function(){this.renderer.renderBackground(t,e,t.borders.borders.map(L))},this),this.renderer.clip(t.clip,function(){this.renderer.renderBorders(t.borders.borders)},this),this.renderer.clip(t.backgroundClip,function(){switch(t.node.nodeName){case"svg":case"IFRAME":var n=this.images.get(t.node);n?this.renderer.renderImage(t,e,t.borders,n):j("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var r=this.images.get(t.node.src);r?this.renderer.renderImage(t,e,t.borders,r):j("Error loading ",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this)},r.prototype.paintCheckbox=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height),r={width:n-1,height:n-1,top:e.top,left:e.left},i=[3,3],o=[i,i,i,i],s=[1,1,1,1].map(function(t){return{color:new G("#A5A5A5"),width:t}}),c=h(r,o,s);this.renderer.clip(t.backgroundClip,function(){this.renderer.rectangle(r.left+1,r.top+1,r.width-2,r.height-2,new G("#DEDEDE")),this.renderer.renderBorders(a(s,r,c,o)),t.node.checked&&(this.renderer.font(new G("#424242"),"normal","normal","bold",n-3+"px","arial"),this.renderer.text("✔",r.left+n/6,r.top+n-1))},this)},r.prototype.paintRadio=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,function(){this.renderer.circleStroke(e.left+1,e.top+1,n,new G("#DEDEDE"),1,new G("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+n/4)+1,Math.ceil(e.top+n/4)+1,Math.floor(n/2),new G("#424242"))},this)},r.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var n=t.node.ownerDocument,r=n.createElement("html2canvaswrapper"),i=["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"];i.forEach(function(e){try{r.style[e]=t.css(e)}catch(n){j("html2canvas: Parse: Exception caught in renderFormValue: "+n.message)}});var o=t.parseBounds();r.style.position="fixed",r.style.left=o.left+"px",r.style.top=o.top+"px",r.textContent=e,n.body.appendChild(r),this.paintText(new z(r.firstChild,t)),n.body.removeChild(r)}},r.prototype.paintText=function(t){t.applyTextTransform();var e=V.ucs2.decode(t.node.data),n=this.options.letterRendering&&!b(t)||H(t.node.data)?e.map(function(t){return V.ucs2.encode([t])}):D(e),r=t.parent.fontWeight(),i=t.parent.css("fontSize"),o=t.parent.css("fontFamily"),s=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),r,i,o),s.length?this.renderer.fontShadow(s[0].color,s[0].offsetX,s[0].offsetY,s[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){n.map(this.parseTextBounds(t),this).forEach(function(e,r){e&&(this.renderer.text(n[r],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(o,i)))},this)},this)},r.prototype.renderTextDecoration=function(t,e,n){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+n.baseline+n.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+n.middle+n.lineWidth),e.width,1,t.color("color"))}};var Z={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};r.prototype.parseBorders=function(t){var e=t.parseBounds(),n=v(t),r=["Top","Right","Bottom","Left"].map(function(e,n){var r=t.css("border"+e+"Style"),i=t.color("border"+e+"Color");"inset"===r&&i.isBlack()&&(i=new G([255,255,255,i.a]));var o=Z[r]?Z[r][n]:null;return{width:t.cssInt("border"+e+"Width"),color:o?i[o[0]](o[1]):i,args:null}}),i=h(e,n,r);return{clip:this.parseBackgroundClip(t,i,r,n,e),borders:a(r,e,i,n)}},r.prototype.parseBackgroundClip=function(t,e,n,r,i){var o=t.css("backgroundClip"),s=[];switch(o){case"content-box":case"padding-box":d(s,r[0],r[1],e.topLeftInner,e.topRightInner,i.left+n[3].width,i.top+n[0].width),d(s,r[1],r[2],e.topRightInner,e.bottomRightInner,i.left+i.width-n[1].width,i.top+n[0].width),d(s,r[2],r[3],e.bottomRightInner,e.bottomLeftInner,i.left+i.width-n[1].width,i.top+i.height-n[2].width),d(s,r[3],r[0],e.bottomLeftInner,e.topLeftInner,i.left+n[3].width,i.top+i.height-n[2].width);break;default:d(s,r[0],r[1],e.topLeftOuter,e.topRightOuter,i.left,i.top),d(s,r[1],r[2],e.topRightOuter,e.bottomRightOuter,i.left+i.width,i.top),d(s,r[2],r[3],e.bottomRightOuter,e.bottomLeftOuter,i.left+i.width,i.top+i.height),d(s,r[3],r[0],e.bottomLeftOuter,e.topLeftOuter,i.left,i.top+i.height)}return s},t.exports=r},function(t,e,n){"use strict";function r(t,e){var n=document.createElement("a");n.href=t,t=n.href,this.src=t,this.image=new Image;var r=this;this.promise=new Promise(function(n,o){r.image.crossOrigin="Anonymous",r.image.onload=n,r.image.onerror=o,new i(t,e,document).then(function(t){r.image.src=t})["catch"](o)})}var i=n(5).ProxyURL;t.exports=r},function(t,e,n){"use strict";function r(t,e,n){i.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===n}var i=n(3);r.prototype.cloneTo=function(t){r.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},r.prototype=Object.create(i.prototype),r.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r,i){this.width=t,this.height=e,this.images=n,this.options=r,this.document=i}var i=n(2);r.prototype.renderImage=function(t,e,n,r){var i=t.cssInt("paddingLeft"),o=t.cssInt("paddingTop"),s=t.cssInt("paddingRight"),a=t.cssInt("paddingBottom"),c=n.borders,h=e.width-(c[1].width+c[3].width+i+s),u=e.height-(c[0].width+c[2].width+o+a);this.drawImage(r,0,0,r.image.width||h,r.image.height||u,e.left+i+c[3].width,e.top+o+c[0].width,h,u)},r.prototype.renderBackground=function(t,e,n){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,n))},r.prototype.renderBackgroundColor=function(t,e){var n=t.color("backgroundColor");n.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,n)},r.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(t){t.color.isTransparent()||null===t.args||this.drawShape(t.args,t.color)},r.prototype.renderBackgroundImage=function(t,e,n){var r=t.parseBackgroundImages();r.reverse().forEach(function(r,o,s){switch(r.method){case"url":var a=this.images.get(r.args[0]);a?this.renderBackgroundRepeating(t,e,a,s.length-(o+1),n):i("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var c=this.images.get(r.value);c?this.renderBackgroundGradient(c,e,n):i("Error loading background-image",r.args[0]);break;case"none":break;default:i("Unknown background-image type",r.args[0])}},this)},r.prototype.renderBackgroundRepeating=function(t,e,n,r,i){var o=t.parseBackgroundSize(e,n.image,r),s=t.parseBackgroundPosition(e,n.image,r,o),a=t.parseBackgroundRepeat(r);switch(a){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(n,s,o,e,e.left+i[3],e.top+s.top+i[0],99999,o.height,i);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(n,s,o,e,e.left+s.left+i[3],e.top+i[0],o.width,99999,i);break;case"no-repeat":this.backgroundRepeatShape(n,s,o,e,e.left+s.left+i[3],e.top+s.top+i[0],o.width,o.height,i);break;default:this.renderBackgroundRepeat(n,s,o,{top:e.top,left:e.left},i[3],i[0])}},t.exports=r},function(t,e,n){"use strict";function r(t,e){s.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.options.canvas||(this.canvas.width=t,this.canvas.height=e),this.ctx=this.canvas.getContext("2d"),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},c("Initialized CanvasRenderer with size",t,"x",e)}function i(t){return t.length>0}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},s=n(21),a=n(9),c=n(2);r.prototype=Object.create(s.prototype),r.prototype.setFillStyle=function(t){return this.ctx.fillStyle="object"===("undefined"==typeof t?"undefined":o(t))&&t.isColor?t.toString():t,this.ctx},r.prototype.rectangle=function(t,e,n,r,i){this.setFillStyle(i).fillRect(t,e,n,r)},r.prototype.circle=function(t,e,n,r){this.setFillStyle(r),this.ctx.beginPath(),this.ctx.arc(t+n/2,e+n/2,n/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},r.prototype.circleStroke=function(t,e,n,r,i,o){this.circle(t,e,n,r),this.ctx.strokeStyle=o.toString(),this.ctx.stroke()},r.prototype.drawShape=function(t,e){this.shape(t),this.setFillStyle(e).fill()},r.prototype.taints=function(t){if(null===t.tainted){this.taintCtx.drawImage(t.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),t.tainted=!1}catch(e){this.taintCtx=document.createElement("canvas").getContext("2d"),t.tainted=!0}}return t.tainted},r.prototype.drawImage=function(t,e,n,r,i,o,s,a,c){this.taints(t)&&!this.options.allowTaint||this.ctx.drawImage(t.image,e,n,r,i,o,s,a,c)},r.prototype.clip=function(t,e,n){this.ctx.save(),t.filter(i).forEach(function(t){this.shape(t).clip()},this),e.call(n),this.ctx.restore()},r.prototype.shape=function(t){return this.ctx.beginPath(),t.forEach(function(t,e){"rect"===t[0]?this.ctx.rect.apply(this.ctx,t.slice(1)):this.ctx[0===e?"moveTo":t[0]+"To"].apply(this.ctx,t.slice(1))},this),this.ctx.closePath(),this.ctx},r.prototype.font=function(t,e,n,r,i,o){this.setFillStyle(t).font=[e,n,r,i,o].join(" ").split(",")[0]},r.prototype.fontShadow=function(t,e,n,r){this.setVariable("shadowColor",t.toString()).setVariable("shadowOffsetY",e).setVariable("shadowOffsetX",n).setVariable("shadowBlur",r)},r.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},r.prototype.setOpacity=function(t){this.ctx.globalAlpha=t},r.prototype.setTransform=function(t){this.ctx.translate(t.origin[0],t.origin[1]),this.ctx.transform.apply(this.ctx,t.matrix),this.ctx.translate(-t.origin[0],-t.origin[1])},r.prototype.setVariable=function(t,e){return this.variables[t]!==e&&(this.variables[t]=this.ctx[t]=e),this},r.prototype.text=function(t,e,n){this.ctx.fillText(t,e,n)},r.prototype.backgroundRepeatShape=function(t,e,n,r,i,o,s,a,c){var h=[["line",Math.round(i),Math.round(o)],["line",Math.round(i+s),Math.round(o)],["line",Math.round(i+s),Math.round(a+o)],["line",Math.round(i),Math.round(a+o)]];this.clip([h],function(){this.renderBackgroundRepeat(t,e,n,r,c[3],c[0])},this)},r.prototype.renderBackgroundRepeat=function(t,e,n,r,i,o){var s=Math.round(r.left+e.left+i),a=Math.round(r.top+e.top+o);this.setFillStyle(this.ctx.createPattern(this.resizeImage(t,n),"repeat")),this.ctx.translate(s,a),this.ctx.fill(),this.ctx.translate(-s,-a)},r.prototype.renderBackgroundGradient=function(t,e){if(t instanceof a){var n=this.ctx.createLinearGradient(e.left+e.width*t.x0,e.top+e.height*t.y0,e.left+e.width*t.x1,e.top+e.height*t.y1);t.colorStops.forEach(function(t){n.addColorStop(t.stop,t.color.toString())}),this.rectangle(e.left,e.top,e.width,e.height,n)}},r.prototype.resizeImage=function(t,e){var n=t.image;if(n.width===e.width&&n.height===e.height)return n;var r,i=document.createElement("canvas");return i.width=e.width,i.height=e.height,r=i.getContext("2d"),r.drawImage(n,0,0,n.width,n.height,0,0,e.width,e.height),i},t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){i.call(this,n,r),this.ownStacking=t,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*e}var i=n(3);r.prototype=Object.create(i.prototype),r.prototype.getParentStack=function(t){var e=this.parent?this.parent.stack:null;return e?e.ownStacking?e:e.getParentStack(t):t.stack},t.exports=r},function(t,e){"use strict";function n(t){this.rangeBounds=this.testRangeBounds(t),this.cors=this.testCORS(),this.svg=this.testSVG()}n.prototype.testRangeBounds=function(t){var e,n,r,i,o=!1;return t.createRange&&(e=t.createRange(),e.getBoundingClientRect&&(n=t.createElement("boundtest"),n.style.height="123px",n.style.display="block",t.body.appendChild(n),e.selectNode(n),r=e.getBoundingClientRect(),i=r.height,123===i&&(o=!0),t.body.removeChild(n))),o},n.prototype.testCORS=function(){return"undefined"!=typeof(new Image).crossOrigin},n.prototype.testSVG=function(){var t=new Image,e=document.createElement("canvas"),n=e.getContext("2d");t.src="data:image/svg+xml,";try{n.drawImage(t,0,0),e.toDataURL()}catch(r){return!1}return!0},t.exports=n},function(t,e,n){"use strict";function r(t,e){this.src=t,this.image=null;var n=this;this.promise=e?new Promise(function(e,r){n.image=new Image,n.image.onload=e,n.image.onerror=r,n.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),n.image.complete===!0&&e(n.image)}):this.hasFabric().then(function(){return new Promise(function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,n.createCanvas.call(n,e))})})}var i=n(10);r.prototype=Object.create(i.prototype),t.exports=r},function(t,e,n){"use strict";function r(t,e){o.call(this,t,e)}function i(t,e,n){return t.length>0?e+n.toUpperCase():void 0}var o=n(3);r.prototype=Object.create(o.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,i);case"uppercase":return e.toUpperCase();default:return e}},t.exports=r},function(t,e,n){"use strict";function r(t){i.apply(this,arguments),this.type="linear"===t.args[0]?i.TYPES.LINEAR:i.TYPES.RADIAL}var i=n(8);r.prototype=Object.create(i.prototype),t.exports=r},function(t,e,n){var r;(function(t,i){!function(o){function s(t){throw new RangeError(P[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function c(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(A,".");var i=t.split("."),o=a(i,e).join(".");return r+o}function h(t){for(var e,n,r=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function u(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=B(t>>>10&1023|55296),t=56320|1023&t),e+=B(t)}).join("")}function l(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:x}function d(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function p(t,e,n){var r=0;for(t=n?N(t/k):t>>1,t+=N(t/e);t>L*E>>1;r+=x)t=N(t/L);return N(r+(L+1)*t/(t+T))}function f(t){var e,n,r,i,o,a,c,h,d,f,g=[],m=t.length,y=0,w=S,b=C;for(n=t.lastIndexOf(I),0>n&&(n=0),r=0;n>r;++r)t.charCodeAt(r)>=128&&s("not-basic"),g.push(t.charCodeAt(r));for(i=n>0?n+1:0;m>i;){for(o=y,a=1,c=x;i>=m&&s("invalid-input"),h=l(t.charCodeAt(i++)),(h>=x||h>N((v-y)/a))&&s("overflow"),y+=h*a,d=b>=c?_:c>=b+E?E:c-b,!(d>h);c+=x)f=x-d,a>N(v/f)&&s("overflow"),a*=f;e=g.length+1,b=p(y-o,e,0==o),N(y/e)>v-w&&s("overflow"),w+=N(y/e),y%=e,g.splice(y++,0,w)}return u(g)}function g(t){var e,n,r,i,o,a,c,u,l,f,g,m,y,w,b,T=[];for(t=h(t),m=t.length,e=S,n=0,o=C,a=0;m>a;++a)g=t[a],128>g&&T.push(B(g));for(r=i=T.length,i&&T.push(I);m>r;){for(c=v,a=0;m>a;++a)g=t[a],g>=e&&c>g&&(c=g);for(y=r+1,c-e>N((v-n)/y)&&s("overflow"),n+=(c-e)*y,e=c,a=0;m>a;++a)if(g=t[a],e>g&&++n>v&&s("overflow"),g==e){for(u=n,l=x;f=o>=l?_:l>=o+E?E:l-o,!(f>u);l+=x)b=u-f,w=x-f,T.push(B(d(f+b%w,0))),u=N(b/w);T.push(B(d(u,0))),o=p(n,y,r==i),n=0,++r}++n,++e}return T.join("")}function m(t){return c(t,function(t){return R.test(t)?f(t.slice(4).toLowerCase()):t})}function y(t){return c(t,function(t){return O.test(t)?"xn--"+g(t):t})}var w=("object"==typeof e&&e&&!e.nodeType&&e,"object"==typeof t&&t&&!t.nodeType&&t,"object"==typeof i&&i);w.global!==w&&w.window!==w&&w.self!==w||(o=w);var b,v=2147483647,x=36,_=1,E=26,T=38,k=700,C=72,S=128,I="-",R=/^xn--/,O=/[^\x20-\x7E]/,A=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=x-_,N=Math.floor,B=String.fromCharCode;b={version:"1.4.1",ucs2:{decode:h,encode:u},decode:f,encode:g,toASCII:y,toUnicode:m},r=function(){return b}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(29)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}}]); \ No newline at end of file diff --git a/komatsu/js/aframe.min.js b/komatsu/js/aframe.min.js new file mode 100644 index 0000000..b982e0d --- /dev/null +++ b/komatsu/js/aframe.min.js @@ -0,0 +1,294 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.AFRAME = f()}})(function(){var define,module,exports;return (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;o1)for(var u=1;u=31}function formatArgs(){var o=arguments,e=this.useColors;if(o[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+o[0]+(e?"%c ":" ")+"+"+exports.humanize(this.diff),!e)return o;var r="color: "+this.color;o=[o[0],r,"color: inherit"].concat(Array.prototype.slice.call(o,1));var t=0,s=0;return o[0].replace(/%[a-z%]/g,function(o){"%%"!==o&&(t++,"%c"===o&&(s=t))}),o.splice(s,0,r),o}function log(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function save(o){try{null==o?exports.storage.removeItem("debug"):exports.storage.debug=o}catch(o){}}function load(){var o;try{o=exports.storage.debug}catch(o){}return o}function localstorage(){try{return window.localStorage}catch(o){}}exports=module.exports=_dereq_("./debug"),exports.log=log,exports.formatArgs=formatArgs,exports.save=save,exports.load=load,exports.useColors=useColors,exports.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:localstorage(),exports.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],exports.formatters.j=function(o){return JSON.stringify(o)},exports.enable(load()); +},{"./debug":4}],4:[function(_dereq_,module,exports){ +function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(e){function r(){}function o(){var e=o,r=+new Date,s=r-(prevTime||r);e.diff=s,e.prev=prevTime,e.curr=r,prevTime=r,null==e.useColors&&(e.useColors=exports.useColors()),null==e.color&&e.useColors&&(e.color=selectColor());var t=Array.prototype.slice.call(arguments);t[0]=exports.coerce(t[0]),"string"!=typeof t[0]&&(t=["%o"].concat(t));var n=0;t[0]=t[0].replace(/%([a-z%])/g,function(r,o){if("%%"===r)return r;n++;var s=exports.formatters[o];if("function"==typeof s){var p=t[n];r=s.call(e,p),t.splice(n,1),n--}return r}),"function"==typeof exports.formatArgs&&(t=exports.formatArgs.apply(e,t));var p=o.log||exports.log||console.log.bind(console);p.apply(e,t)}r.enabled=!1,o.enabled=!0;var s=exports.enabled(e)?o:r;return s.namespace=e,s}function enable(e){exports.save(e);for(var r=(e||"").split(/[\s,]+/),o=r.length,s=0;s1e4)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(a){var r=parseFloat(a[1]),c=(a[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return r*y;case"days":case"day":case"d":return r*d;case"hours":case"hour":case"hrs":case"hr":case"h":return r*h;case"minutes":case"minute":case"mins":case"min":case"m":return r*m;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function short(e){return e>=d?Math.round(e/d)+"d":e>=h?Math.round(e/h)+"h":e>=m?Math.round(e/m)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function long(e){return plural(e,d,"day")||plural(e,h,"hour")||plural(e,m,"minute")||plural(e,s,"second")||e+" ms"}function plural(s,e,a){if(!(s>0),L="attached",T="detached",M="extends",F="ADDITION",V="MODIFICATION",I="REMOVAL",D="DOMAttrModified",P="DOMContentLoaded",R="DOMSubtreeModified",_="<",k="=",q=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,S=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],U=[],H=[],x="",Z=r.documentElement,G=U.indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},j=n.prototype,z=j.hasOwnProperty,K=j.isPrototypeOf,W=n.defineProperty,X=n.getOwnPropertyDescriptor,Y=n.getOwnPropertyNames,$=n.getPrototypeOf,B=n.setPrototypeOf,J=!!n.__proto__,Q=n.create||function e(t){return t?(e.prototype=t,new e):this},ee=B||(J?function(e,t){return e.__proto__=t,e}:Y&&X?function(){function e(e,t){for(var r,n=Y(t),a=0,l=n.length;a0?t:"visual_scene0"]}return null}function n(){var e=qe.querySelectorAll("instance_kinematics_model")[0];if(e){var t=e.getAttribute("url").replace(/^#/,"");return Me[t.length>0?t:"kinematics_model0"]}return null}function o(){Ce=[],h(Ve)}function h(e){var t=_e.getChildById(e.colladaId,!0),i=null;if(t&&t.keys){i={fps:60,hierarchy:[{node:t,keys:t.keys,sids:t.sids}],node:e,name:"animation_"+e.name,length:0},Ce.push(i);for(var s=0,r=t.keys.length;s=0){var n=t.invBindMatrices[r];s.invBindMatrix=n,s.skinningMatrix=new THREE.Matrix4,s.skinningMatrix.multiplyMatrices(s.world,n),s.animatrix=new THREE.Matrix4,s.animatrix.copy(s.localworld),s.weights=[];for(var a=0;aa.limits.max||i1)for(C=new THREE.MultiMaterial(w),a=0;a0?(C.morphTargets=!0,C.skinning=!1):(C.morphTargets=!1,C.skinning=!0),A=new THREE.SkinnedMesh(j,C,(!1)),A.name="skin_"+Ie.length,Ie.push(A)):void 0!==s?(c(j,s),C.morphTargets=!0,A=new THREE.Mesh(j,C),A.name="morph_"+Se.length,Se.push(A)):A=j.isLineStrip===!0?new THREE.Line(j):new THREE.Mesh(j,C),n.add(A)}}for(r=0;rt)break}return i}function N(e,t){for(var i=-1,s=0,r=e.length;s=t&&(i=s)}return i}function k(e,t,i,s){var r=E(e,s,i?i-1:0),a=T(e,s,i+1);if(r&&a){var n,o=(t.time-r.time)/(a.time-r.time),h=r.getTarget(s),l=a.getTarget(s).data,c=h.data;if("matrix"===h.type)n=c;else if(c.length){n=[];for(var d=0;d=0?i:i+e.length;i>=0;i--){var s=e[i];if(s.hasTarget(t))return s}return null}function R(){this.id="",this.init_from=""}function _(){this.id="",this.name="",this.type="",this.skin=null,this.morph=null}function A(){this.method=null,this.source=null,this.targets=null,this.weights=null}function C(){this.source="",this.bindShapeMatrix=null,this.invBindMatrices=[],this.joints=[],this.weights=[]}function j(){this.id="",this.name="",this.nodes=[],this.scene=new THREE.Group}function H(){this.id="",this.name="",this.sid="",this.nodes=[],this.controllers=[],this.transforms=[],this.geometries=[],this.channels=[],this.matrix=new THREE.Matrix4}function M(){this.sid="",this.type="",this.data=[],this.obj=null}function O(){this.url="",this.skeleton=[],this.instance_material=[]}function S(){this.symbol="",this.target=""}function I(){this.url="",this.instance_material=[]}function q(){this.id="",this.mesh=null}function V(e){this.geometry=e.id,this.primitives=[],this.vertices=null,this.geometry3js=null}function X(){this.material="",this.count=0,this.inputs=[],this.vcount=null,this.p=[],this.geometry=new THREE.Geometry}function L(){X.call(this),this.vcount=[]}function Y(){X.call(this),this.vcount=1}function Z(){X.call(this),this.vcount=3}function z(){this.source="",this.count=0,this.stride=0,this.params=[]}function F(){this.input={}}function B(){this.semantic="",this.offset=0,this.source="",this.set=0}function D(e){this.id=e,this.type=null}function U(){this.id="",this.name="",this.instance_effect=null}function P(){this.color=new THREE.Color,this.color.setRGB(Math.random(),Math.random(),Math.random()),this.color.a=1,this.texture=null,this.texcoord=null,this.texOpts=null}function G(e,t){this.type=e,this.effect=t,this.material=null}function J(e){this.effect=e,this.init_from=null,this.format=null}function W(e){this.effect=e,this.source=null,this.wrap_s=null,this.wrap_t=null,this.minfilter=null,this.magfilter=null,this.mipfilter=null}function Q(){this.id="",this.name="",this.shader=null,this.surface={},this.sampler={}}function $(){this.url=""}function K(){this.id="",this.name="",this.source={},this.sampler=[],this.channel=[]}function ee(e){this.animation=e,this.source="",this.target="",this.fullSid=null,this.sid=null,this.dotSyntax=null,this.arrSyntax=null,this.arrIndices=null,this.member=null}function te(e){this.id="",this.animation=e,this.inputs=[],this.input=null,this.output=null,this.strideOut=null,this.interpolation=null,this.startTime=null,this.endTime=null,this.duration=0}function ie(e){this.targets=[],this.time=e}function se(){this.id="",this.name="",this.technique=""}function re(){this.url=""}function ae(){this.id="",this.name="",this.technique=""}function ne(){this.url=""}function oe(){this.id="",this.name="",this.joints=[],this.links=[]}function he(){this.sid="",this.name="",this.axis=new THREE.Vector3,this.limits={min:0,max:0},this.type="",this.static=!1,this.zeroPosition=0,this.middlePosition=0}function le(){this.sid="",this.name="",this.transforms=[],this.attachments=[]}function ce(){this.joint="",this.transforms=[],this.links=[]}function de(e){var t=e.getAttribute("id");return void 0!=Le[t]?Le[t]:(Le[t]=new D(t).parse(e),Le[t])}function pe(e){for(var t=me(e),i=[],s=0,r=t.length;s0?ge(e).split(/\s+/):[]}function ge(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function ve(e,t,i){return e.hasAttribute(t)?parseInt(e.getAttribute(t),10):i}function ye(e,t){var i=new THREE.ImageLoader;i.load(t,function(t){e.image=t,e.needsUpdate=!0})}function be(e,t){e.doubleSided=!1;var i=t.querySelectorAll("extra double_sided")[0];i&&i&&1===parseInt(i.textContent,10)&&(e.doubleSided=!0)}function we(){if(Je.convertUpAxis!==!0||Qe===Je.upAxis)$e=null;else switch(Qe){case"X":$e="Y"===Je.upAxis?"XtoY":"XtoZ";break;case"Y":$e="X"===Je.upAxis?"YtoX":"YtoZ";break;case"Z":$e="X"===Je.upAxis?"ZtoX":"ZtoY"}}function xe(e,t){if(Je.convertUpAxis===!0&&Qe!==Je.upAxis)switch($e){case"XtoY":var i=e[0];e[0]=t*e[1],e[1]=i;break;case"XtoZ":var i=e[2];e[2]=e[1],e[1]=e[0],e[0]=i;break;case"YtoX":var i=e[0];e[0]=e[1],e[1]=t*i;break;case"YtoZ":var i=e[1];e[1]=t*e[2],e[2]=i;break;case"ZtoX":var i=e[0];e[0]=e[1],e[1]=e[2],e[2]=i;break;case"ZtoY":var i=e[1];e[1]=e[2],e[2]=t*i}}function Ne(e,t){if(Je.convertUpAxis!==!0||Qe===Je.upAxis)return t;switch(e){case"X":t="XtoY"===$e?t*-1:t;break;case"Y":t="YtoZ"===$e||"YtoX"===$e?t*-1:t;break;case"Z":t="ZtoY"===$e?t*-1:t}return t}function ke(e,t){var i=[e[t],e[t+1],e[t+2]];return xe(i,-1),new THREE.Vector3(i[0],i[1],i[2])}function Te(e){if(Je.convertUpAxis){var t=[e[0],e[4],e[8]];xe(t,-1),e[0]=t[0],e[4]=t[1],e[8]=t[2],t=[e[1],e[5],e[9]],xe(t,-1),e[1]=t[0],e[5]=t[1],e[9]=t[2],t=[e[2],e[6],e[10]],xe(t,-1),e[2]=t[0],e[6]=t[1],e[10]=t[2],t=[e[0],e[1],e[2]],xe(t,-1),e[0]=t[0],e[1]=t[1],e[2]=t[2],t=[e[4],e[5],e[6]],xe(t,-1),e[4]=t[0],e[5]=t[1],e[6]=t[2],t=[e[8],e[9],e[10]],xe(t,-1),e[8]=t[0],e[9]=t[1],e[10]=t[2],t=[e[3],e[7],e[11]],xe(t,-1),e[3]=t[0],e[7]=t[1],e[11]=t[2]}return(new THREE.Matrix4).set(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])}function Ee(e){if(e>-1&&e<3){var t=["X","Y","Z"],i={X:0,Y:1,Z:2};e=Re(t[e]),e=i[e]}return e}function Re(e){if(Je.convertUpAxis)switch(e){case"X":switch($e){case"XtoY":case"XtoZ":case"YtoX":e="Y";break;case"ZtoX":e="Z"}break;case"Y":switch($e){case"XtoY":case"YtoX":case"ZtoX":e="X";break;case"XtoZ":case"YtoZ":case"ZtoY":e="Z"}break;case"Z":switch($e){case"XtoZ":e="X";break;case"YtoZ":case"ZtoX":case"ZtoY":e="Y"}}return e}var _e,Ae,Ce,je,He,Me,Oe,Se,Ie,qe=null,Ve=null,Xe=null,Le={},Ye={},Ze={},ze={},Fe={},Be={},De={},Ue={},Pe={},Ge=THREE.SmoothShading,Je={centerGeometry:!1,convertUpAxis:!1,subdivideFaces:!0,upAxis:"Y",defaultEnvMap:null},We=1,Qe="Y",$e=null;return R.prototype.parse=function(e){this.id=e.getAttribute("id");for(var t=0;t=0,h=n.indexOf("(")>=0;if(o)a=n.split("."),n=a.shift(),s=a.shift();else if(h){i=n.split("("),n=i.shift();for(var l=0;l4&&Je.subdivideFaces){var C=N.length?N:new THREE.Color;for(s=1;s4?[E[0],E[k+1],E[k+2]]:4===p?0===k?[E[0],E[1],E[3]]:[E[1].clone(),E[2],E[3].clone()]:[E[0],E[1],E[2]],void 0===t.faceVertexUvs[s]&&(t.faceVertexUvs[s]=[]),t.faceVertexUvs[s].push(R);else console.log("dropped face with vcount "+p+" for geometry with id: "+t.id);y+=u*p}},X.prototype.setVertices=function(e){for(var t=0;t0&&(this[i.nodeName]=parseFloat(r[0].textContent))}}return this.create(),this},G.prototype.create=function(){var e={},t=!1;if(void 0!==this.transparency&&void 0!==this.transparent){var i=(this.transparent,(this.transparent.color.r+this.transparent.color.g+this.transparent.color.b)/3*this.transparency);i>0&&(t=!0,e.transparent=!0,e.opacity=1-i)}var s={diffuse:"map",ambient:"lightMap",specular:"specularMap",emission:"emissionMap",bump:"bumpMap",normal:"normalMap"};for(var r in this)switch(r){case"ambient":case"emission":case"diffuse":case"specular":case"bump":case"normal":var a=this[r];if(a instanceof P)if(a.isTexture()){var n=a.texture,o=this.effect.sampler[n];if(void 0!==o&&void 0!==o.source){var h=this.effect.surface[o.source];if(void 0!==h){var l=Ye[h.init_from];if(l){var c,d=Oe+l.init_from,p=THREE.Loader.Handlers.get(d);null!==p?c=p.load(d):(c=new THREE.Texture,ye(c,d)),c.wrapS=a.texOpts.wrapU?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,c.wrapT=a.texOpts.wrapV?THREE.RepeatWrapping:THREE.ClampToEdgeWrapping,c.offset.x=a.texOpts.offsetU,c.offset.y=a.texOpts.offsetV,c.repeat.x=a.texOpts.repeatU,c.repeat.y=a.texOpts.repeatV,e[s[r]]=c,"emission"===r&&(e.emissive=16777215)}}}}else"diffuse"!==r&&t||("emission"===r?e.emissive=a.color.getHex():e[r]=a.color.getHex());break;case"shininess":e[r]=this[r];break;case"reflectivity":e[r]=this[r],e[r]>0&&(e.envMap=Je.defaultEnvMap),e.combine=THREE.MixOperation;break;case"index_of_refraction":e.refractionRatio=this[r],1!==this[r]&&(e.envMap=Je.defaultEnvMap);break;case"transparency":}switch(e.shading=Ge,e.side=this.effect.doubleSided?THREE.DoubleSide:THREE.FrontSide,void 0!==e.diffuse&&(e.color=e.diffuse,delete e.diffuse),this.type){case"constant":void 0!=e.emissive&&(e.color=e.emissive),this.material=new THREE.MeshBasicMaterial(e);break;case"phong":case"blinn":this.material=new THREE.MeshPhongMaterial(e);break;case"lambert":default:this.material=new THREE.MeshLambertMaterial(e)}return this.material},J.prototype.parse=function(e){for(var t=0;t=0,r=i.indexOf("(")>=0;if(s)t=i.split("."),this.sid=t.shift(),this.member=t.shift();else if(r){var a=i.split("(");this.sid=a.shift();for(var n=0;n1){s=[],t*=this.strideOut;for(var r=0;r1&&(o=1),l.length){r=[];for(var c=0;c=this.limits.max&&(this.static=!0),this.middlePosition=(this.limits.min+this.limits.max)/2,this},le.prototype.parse=function(e){this.sid=e.getAttribute("sid"),this.name=e.getAttribute("name"),this.transforms=[],this.attachments=[];for(var t=0;t=0?o.substring(0,n):o;h=h.toLowerCase();var p=n>=0?o.substring(n+1):"";if(p=p.trim(),"newmtl"===h)r={name:p},i[p]=r;else if(r)if("ka"===h||"kd"===h||"ks"===h){var l=p.split(s,3);r[h]=[parseFloat(l[0]),parseFloat(l[1]),parseFloat(l[2])]}else r[h]=p}}var c=new THREE.MTLLoader.MaterialCreator(this.baseUrl,this.materialOptions);return c.setCrossOrigin(this.crossOrigin),c.setManager(this.manager),c.setMaterials(i),c}},THREE.MTLLoader.MaterialCreator=function(a,t){this.baseUrl=a,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.side=this.options&&this.options.side?this.options.side:THREE.FrontSide,this.wrap=this.options&&this.options.wrap?this.options.wrap:THREE.RepeatWrapping},THREE.MTLLoader.MaterialCreator.prototype={constructor:THREE.MTLLoader.MaterialCreator,setCrossOrigin:function(a){this.crossOrigin=a},setManager:function(a){this.manager=a},setMaterials:function(a){this.materialsInfo=this.convert(a),this.materials={},this.materialsArray=[],this.nameLookup={}},convert:function(a){if(!this.options)return a;var t={};for(var r in a){var s=a[r],i={};t[r]=i;for(var e in s){var o=!0,n=s[e],h=e.toLowerCase();switch(h){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(n=[n[0]/255,n[1]/255,n[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===n[0]&&0===n[1]&&0===n[1]&&(o=!1)}o&&(i[h]=n)}}return t},preload:function(){for(var a in this.materialsInfo)this.create(a)},getIndex:function(a){return this.nameLookup[a]},getAsArray:function(){var a=0;for(var t in this.materialsInfo)this.materialsArray[a]=this.create(t),this.nameLookup[t]=a,a++;return this.materialsArray},create:function(a){return void 0===this.materials[a]&&this.createMaterial_(a),this.materials[a]},createMaterial_:function(a){var t=this.materialsInfo[a],r={name:a,side:this.side};for(var s in t){var i=t[s];if(""!==i)switch(s.toLowerCase()){case"kd":r.color=(new THREE.Color).fromArray(i);break;case"ks":r.specular=(new THREE.Color).fromArray(i);break;case"map_kd":r.map=this.loadTexture(this.baseUrl+i),r.map.wrapS=this.wrap,r.map.wrapT=this.wrap;break;case"ns":r.shininess=parseFloat(i);break;case"d":i<1&&(r.opacity=i,r.transparent=!0);break;case"Tr":i>0&&(r.opacity=1-i,r.transparent=!0);break;case"map_bump":case"bump":if(r.bumpMap)break;r.bumpMap=this.loadTexture(this.baseUrl+i),r.bumpMap.wrapS=this.wrap,r.bumpMap.wrapT=this.wrap}}return this.materials[a]=new THREE.MeshPhongMaterial(r),this.materials[a]},loadTexture:function(a,t,r,s,i){var e,o=THREE.Loader.Handlers.get(a),n=void 0!==this.manager?this.manager:THREE.DefaultLoadingManager;return null===o&&(o=new THREE.TextureLoader(n)),o.setCrossOrigin&&o.setCrossOrigin(this.crossOrigin),e=o.load(a,r,s,i),void 0!==t&&(e.mapping=t),e}},THREE.EventDispatcher.prototype.apply(THREE.MTLLoader.prototype); +},{}],16:[function(_dereq_,module,exports){ +THREE.OBJLoader=function(e){this.manager=void 0!==e?e:THREE.DefaultLoadingManager,this.materials=null,this.regexp={vertex_pattern:/^v\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)/,normal_pattern:/^vn\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)/,uv_pattern:/^vt\s+([\d|\.|\+|\-|e|E]+)\s+([\d|\.|\+|\-|e|E]+)/,face_vertex:/^f\s+(-?\d+)\s+(-?\d+)\s+(-?\d+)(?:\s+(-?\d+))?/,face_vertex_uv:/^f\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+))?/,face_vertex_uv_normal:/^f\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)\s+(-?\d+)\/(-?\d+)\/(-?\d+)(?:\s+(-?\d+)\/(-?\d+)\/(-?\d+))?/,face_vertex_normal:/^f\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)\s+(-?\d+)\/\/(-?\d+)(?:\s+(-?\d+)\/\/(-?\d+))?/,object_pattern:/^[og]\s*(.+)?/,smoothing_pattern:/^s\s+(\d+|on|off)/,material_library_pattern:/^mtllib /,material_use_pattern:/^usemtl /}},THREE.OBJLoader.prototype={constructor:THREE.OBJLoader,load:function(e,t,r,a){var s=this,i=new THREE.XHRLoader(s.manager);i.setPath(this.path),i.load(e,function(e){t(s.parse(e))},r,a)},setPath:function(e){this.path=e},setMaterials:function(e){this.materials=e},_createParserState:function(){var e={objects:[],object:{},vertices:[],normals:[],uvs:[],materialLibraries:[],startObject:function(e,t){return this.object&&this.object.fromDeclaration===!1?(this.object.name=e,void(this.object.fromDeclaration=t!==!1)):(this.object={name:e||"",geometry:{vertices:[],normals:[],uvs:[]},material:{name:"",smooth:!0},fromDeclaration:t!==!1},void this.objects.push(this.object))},parseVertexIndex:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)},parseNormalIndex:function(e,t){var r=parseInt(e,10);return 3*(r>=0?r-1:r+t/3)},parseUVIndex:function(e,t){var r=parseInt(e,10);return 2*(r>=0?r-1:r+t/2)},addVertex:function(e,t,r){var a=this.vertices,s=this.object.geometry.vertices;s.push(a[e+0]),s.push(a[e+1]),s.push(a[e+2]),s.push(a[t+0]),s.push(a[t+1]),s.push(a[t+2]),s.push(a[r+0]),s.push(a[r+1]),s.push(a[r+2])},addVertexLine:function(e){var t=this.vertices,r=this.object.geometry.vertices;r.push(t[e+0]),r.push(t[e+1]),r.push(t[e+2])},addNormal:function(e,t,r){var a=this.normals,s=this.object.geometry.normals;s.push(a[e+0]),s.push(a[e+1]),s.push(a[e+2]),s.push(a[t+0]),s.push(a[t+1]),s.push(a[t+2]),s.push(a[r+0]),s.push(a[r+1]),s.push(a[r+2])},addUV:function(e,t,r){var a=this.uvs,s=this.object.geometry.uvs;s.push(a[e+0]),s.push(a[e+1]),s.push(a[t+0]),s.push(a[t+1]),s.push(a[r+0]),s.push(a[r+1])},addUVLine:function(e){var t=this.uvs,r=this.object.geometry.uvs;r.push(t[e+0]),r.push(t[e+1])},addFace:function(e,t,r,a,s,i,n,o,d,h,l,u){var p,c=this.vertices.length,m=this.parseVertexIndex(e,c),v=this.parseVertexIndex(t,c),f=this.parseVertexIndex(r,c);if(void 0===a?this.addVertex(m,v,f):(p=this.parseVertexIndex(a,c),this.addVertex(m,v,p),this.addVertex(v,f,p)),void 0!==s){var x=this.uvs.length;m=this.parseUVIndex(s,x),v=this.parseUVIndex(i,x),f=this.parseUVIndex(n,x),void 0===a?this.addUV(m,v,f):(p=this.parseUVIndex(o,x),this.addUV(m,v,p),this.addUV(v,f,p))}if(void 0!==d){var g=this.normals.length;m=this.parseNormalIndex(d,g),v=d===h?m:this.parseNormalIndex(h,g),f=d===l?m:this.parseNormalIndex(l,g),void 0===a?this.addNormal(m,v,f):(p=this.parseNormalIndex(u,g),this.addNormal(m,v,p),this.addNormal(v,f,p))}},addLineGeometry:function(e,t){this.object.geometry.type="Line";for(var r=this.vertices.length,a=this.uvs.length,s=0,i=e.length;s0?V.addAttribute("normal",new THREE.BufferAttribute(new Float32Array(_.normals),3)):V.computeVertexNormals(),_.uvs.length>0&&V.addAttribute("uv",new THREE.BufferAttribute(new Float32Array(_.uvs),2));var j;if(null!==this.materials&&(j=this.materials.create(b.material.name),L&&j&&!(j instanceof THREE.LineBasicMaterial))){var w=new THREE.LineBasicMaterial;w.copy(j),j=w}j||(j=L?new THREE.LineBasicMaterial:new THREE.MeshPhongMaterial,j.name=b.material.name),j.shading=b.material.smooth?THREE.SmoothShading:THREE.FlatShading;var y=L?new THREE.Line(V,j):new THREE.Mesh(V,j);y.name=b.name,E.add(y)}}return console.timeEnd("OBJLoader"),E}}; +},{}],17:[function(_dereq_,module,exports){ +var self=self||{},THREE={REVISION:"76"};"function"==typeof define&&define.amd?define("three",THREE):"undefined"!=typeof exports&&"undefined"!=typeof module&&(module.exports=THREE),void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),void 0===Function.prototype.name&&void 0!==Object.defineProperty&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]}}),void 0===Object.assign&&Object.defineProperty(Object,"assign",{writable:!0,configurable:!0,value:function(t){"use strict";if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),r=1,i=arguments.length;r!==i;++r){var n=arguments[r];if(void 0!==n&&null!==n){n=Object(n);for(var a=Object.keys(n),o=0,s=a.length;o!==s;++o){var c=a[o],h=Object.getOwnPropertyDescriptor(n,c);void 0!==h&&h.enumerable&&(e[c]=n[c])}}}return e}}),THREE.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},THREE.CullFaceNone=0,THREE.CullFaceBack=1,THREE.CullFaceFront=2,THREE.CullFaceFrontBack=3,THREE.FrontFaceDirectionCW=0,THREE.FrontFaceDirectionCCW=1,THREE.BasicShadowMap=0,THREE.PCFShadowMap=1,THREE.PCFSoftShadowMap=2,THREE.FrontSide=0,THREE.BackSide=1,THREE.DoubleSide=2,THREE.FlatShading=1,THREE.SmoothShading=2,THREE.NoColors=0,THREE.FaceColors=1,THREE.VertexColors=2,THREE.NoBlending=0,THREE.NormalBlending=1,THREE.AdditiveBlending=2,THREE.SubtractiveBlending=3,THREE.MultiplyBlending=4,THREE.CustomBlending=5,THREE.AddEquation=100,THREE.SubtractEquation=101,THREE.ReverseSubtractEquation=102,THREE.MinEquation=103,THREE.MaxEquation=104,THREE.ZeroFactor=200,THREE.OneFactor=201,THREE.SrcColorFactor=202,THREE.OneMinusSrcColorFactor=203,THREE.SrcAlphaFactor=204,THREE.OneMinusSrcAlphaFactor=205,THREE.DstAlphaFactor=206,THREE.OneMinusDstAlphaFactor=207,THREE.DstColorFactor=208,THREE.OneMinusDstColorFactor=209,THREE.SrcAlphaSaturateFactor=210,THREE.NeverDepth=0,THREE.AlwaysDepth=1,THREE.LessDepth=2,THREE.LessEqualDepth=3,THREE.EqualDepth=4,THREE.GreaterEqualDepth=5,THREE.GreaterDepth=6,THREE.NotEqualDepth=7,THREE.MultiplyOperation=0,THREE.MixOperation=1,THREE.AddOperation=2,THREE.NoToneMapping=0,THREE.LinearToneMapping=1,THREE.ReinhardToneMapping=2,THREE.Uncharted2ToneMapping=3,THREE.CineonToneMapping=4,THREE.UVMapping=300,THREE.CubeReflectionMapping=301,THREE.CubeRefractionMapping=302,THREE.EquirectangularReflectionMapping=303,THREE.EquirectangularRefractionMapping=304,THREE.SphericalReflectionMapping=305,THREE.CubeUVReflectionMapping=306,THREE.CubeUVRefractionMapping=307,THREE.RepeatWrapping=1e3,THREE.ClampToEdgeWrapping=1001,THREE.MirroredRepeatWrapping=1002,THREE.NearestFilter=1003,THREE.NearestMipMapNearestFilter=1004,THREE.NearestMipMapLinearFilter=1005,THREE.LinearFilter=1006,THREE.LinearMipMapNearestFilter=1007,THREE.LinearMipMapLinearFilter=1008,THREE.UnsignedByteType=1009,THREE.ByteType=1010,THREE.ShortType=1011,THREE.UnsignedShortType=1012,THREE.IntType=1013,THREE.UnsignedIntType=1014,THREE.FloatType=1015,THREE.HalfFloatType=1025,THREE.UnsignedShort4444Type=1016,THREE.UnsignedShort5551Type=1017,THREE.UnsignedShort565Type=1018,THREE.AlphaFormat=1019,THREE.RGBFormat=1020,THREE.RGBAFormat=1021,THREE.LuminanceFormat=1022,THREE.LuminanceAlphaFormat=1023,THREE.RGBEFormat=THREE.RGBAFormat,THREE.DepthFormat=1026,THREE.RGB_S3TC_DXT1_Format=2001,THREE.RGBA_S3TC_DXT1_Format=2002,THREE.RGBA_S3TC_DXT3_Format=2003,THREE.RGBA_S3TC_DXT5_Format=2004,THREE.RGB_PVRTC_4BPPV1_Format=2100,THREE.RGB_PVRTC_2BPPV1_Format=2101,THREE.RGBA_PVRTC_4BPPV1_Format=2102,THREE.RGBA_PVRTC_2BPPV1_Format=2103,THREE.RGB_ETC1_Format=2151,THREE.LoopOnce=2200,THREE.LoopRepeat=2201,THREE.LoopPingPong=2202,THREE.InterpolateDiscrete=2300,THREE.InterpolateLinear=2301,THREE.InterpolateSmooth=2302,THREE.ZeroCurvatureEnding=2400,THREE.ZeroSlopeEnding=2401,THREE.WrapAroundEnding=2402,THREE.TrianglesDrawMode=0,THREE.TriangleStripDrawMode=1,THREE.TriangleFanDrawMode=2,THREE.LinearEncoding=3e3,THREE.sRGBEncoding=3001,THREE.GammaEncoding=3007,THREE.RGBEEncoding=3002,THREE.LogLuvEncoding=3003,THREE.RGBM7Encoding=3004,THREE.RGBM16Encoding=3005,THREE.RGBDEncoding=3006,THREE.BasicDepthPacking=3200,THREE.RGBADepthPacking=3201,THREE.Color=function(t){return 3===arguments.length?this.fromArray(arguments):this.set(t)},THREE.Color.prototype={constructor:THREE.Color,r:1,g:1,b:1,set:function(t){return t instanceof THREE.Color?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){this.r=t,this.g=t,this.b=t},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,r){return this.r=t,this.g=e,this.b=r,this},setHSL:function(){function t(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+6*(e-t)*(2/3-r):t}return function(e,r,i){if(e=THREE.Math.euclideanModulo(e,1),r=THREE.Math.clamp(r,0,1),i=THREE.Math.clamp(i,0,1),0===r)this.r=this.g=this.b=i;else{var n=i<=.5?i*(1+r):i+r-i*r,a=2*i-n;this.r=t(a,n,e+1/3),this.g=t(a,n,e),this.b=t(a,n,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var r;if(r=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var i,n=r[1],a=r[2];switch(n){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(i[1])/360,s=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(o,s,c)}}}else if(r=/^\#([A-Fa-f0-9]+)$/.exec(t)){var h=r[1],l=h.length;if(3===l)return this.r=parseInt(h.charAt(0)+h.charAt(0),16)/255,this.g=parseInt(h.charAt(1)+h.charAt(1),16)/255,this.b=parseInt(h.charAt(2)+h.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(h.charAt(0)+h.charAt(1),16)/255,this.g=parseInt(h.charAt(2)+h.charAt(3),16)/255,this.b=parseInt(h.charAt(4)+h.charAt(5),16)/255,this}if(t&&t.length>0){var h=THREE.ColorKeywords[t];void 0!==h?this.setHex(h):console.warn("THREE.Color: Unknown color "+t)}return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var r=e>0?1/e:1;return this.r=Math.pow(t.r,r),this.g=Math.pow(t.g,r),this.b=Math.pow(t.b,r),this},convertGammaToLinear:function(){var t=this.r,e=this.g,r=this.b;return this.r=t*t,this.g=e*e,this.b=r*r,this},convertLinearToGamma:function(){return this.r=Math.sqrt(this.r),this.g=Math.sqrt(this.g),this.b=Math.sqrt(this.b),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){var e,r,i=t||{h:0,s:0,l:0},n=this.r,a=this.g,o=this.b,s=Math.max(n,a,o),c=Math.min(n,a,o),h=(c+s)/2;if(c===s)e=0,r=0;else{var l=s-c;switch(r=h<=.5?l/(s+c):l/(2-s-c),s){case n:e=(a-o)/l+(a0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(a-h)*e,this._z=(o-n)*e):i>s&&i>u?(e=2*Math.sqrt(1+i-s-u),this._w=(l-c)/e,this._x=.25*e,this._y=(n+o)/e,this._z=(a+h)/e):s>u?(e=2*Math.sqrt(1+s-i-u),this._w=(a-h)/e,this._x=(n+o)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+u-i-s),this._w=(o-n)/e,this._x=(a+h)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e,r=1e-6;return function(i,n){return void 0===t&&(t=new THREE.Vector3),e=i.dot(n)+1,eMath.abs(i.z)?t.set(-i.y,i.x,0):t.set(0,-i.z,i.y)):t.crossVectors(i,n),this._x=t.x,this._y=t.y,this._z=t.z,this._w=e,this.normalize(),this}}(),inverse:function(){return this.conjugate().normalize(),this},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},multiplyQuaternions:function(t,e){var r=t._x,i=t._y,n=t._z,a=t._w,o=e._x,s=e._y,c=e._z,h=e._w;return this._x=r*h+a*o+i*c-n*s,this._y=i*h+a*s+n*o-r*c,this._z=n*h+a*c+r*s-i*o,this._w=a*h-r*o-i*s-n*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var r=this._x,i=this._y,n=this._z,a=this._w,o=a*t._w+r*t._x+i*t._y+n*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=r,this._y=i,this._z=n,this;var s=Math.sqrt(1-o*o);if(Math.abs(s)<.001)return this._w=.5*(a+this._w),this._x=.5*(r+this._x),this._y=.5*(i+this._y),this._z=.5*(n+this._z),this;var c=Math.atan2(s,o),h=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=a*h+this._w*l,this._x=r*h+this._x*l,this._y=i*h+this._y*l,this._z=n*h+this._z*l,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}},Object.assign(THREE.Quaternion,{slerp:function(t,e,r,i){return r.copy(t).slerp(e,i)},slerpFlat:function(t,e,r,i,n,a,o){var s=r[i+0],c=r[i+1],h=r[i+2],l=r[i+3],u=n[a+0],p=n[a+1],d=n[a+2],E=n[a+3];if(l!==E||s!==u||c!==p||h!==d){var f=1-o,m=s*u+c*p+h*d+l*E,g=m>=0?1:-1,v=1-m*m;if(v>Number.EPSILON){var T=Math.sqrt(v),y=Math.atan2(T,m*g);f=Math.sin(f*y)/T,o=Math.sin(o*y)/T}var R=o*g;if(s=s*f+u*R,c=c*f+p*R,h=h*f+d*R,l=l*f+E*R,f===1-o){var H=1/Math.sqrt(s*s+c*c+h*h+l*l);s*=H,c*=H,h*=H,l*=H}}t[e]=s,t[e+1]=c,t[e+2]=h,t[e+3]=l}}),THREE.Vector2=function(t,e){this.x=t||0,this.y=e||0},THREE.Vector2.prototype={constructor:THREE.Vector2,get width(){return this.x},set width(t){this.x=t},get height(){return this.y},set height(t){this.y=t},set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:function(){var t,e;return function(r,i){return void 0===t&&(t=new THREE.Vector2,e=new THREE.Vector2),t.set(r,r),e.set(i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,r))/r),this},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length())},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y;return e*e+r*r},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t),this},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromAttribute:function(t,e,r){return void 0===r&&(r=0),e=e*t.itemSize+r,this.x=t.array[e],this.y=t.array[e+1],this},rotateAround:function(t,e){var r=Math.cos(e),i=Math.sin(e),n=this.x-t.x,a=this.y-t.y;return this.x=n*r-a*i+t.x,this.y=n*i+a*r+t.y,this}},THREE.Vector3=function(t,e,r){this.x=t||0,this.y=e||0,this.z=r||0},THREE.Vector3.prototype={constructor:THREE.Vector3,set:function(t,e,r){return this.x=t,this.y=e,this.z=r,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:function(){var t;return function(e){return e instanceof THREE.Euler==!1&&console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),void 0===t&&(t=new THREE.Quaternion),this.applyQuaternion(t.setFromEuler(e)),this}}(),applyAxisAngle:function(){var t;return function(e,r){return void 0===t&&(t=new THREE.Quaternion),this.applyQuaternion(t.setFromAxisAngle(e,r)),this}}(),applyMatrix3:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[3]*r+n[6]*i,this.y=n[1]*e+n[4]*r+n[7]*i,this.z=n[2]*e+n[5]*r+n[8]*i,this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[4]*r+n[8]*i+n[12],this.y=n[1]*e+n[5]*r+n[9]*i+n[13],this.z=n[2]*e+n[6]*r+n[10]*i+n[14],this},applyProjection:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements,a=1/(n[3]*e+n[7]*r+n[11]*i+n[15]);return this.x=(n[0]*e+n[4]*r+n[8]*i+n[12])*a,this.y=(n[1]*e+n[5]*r+n[9]*i+n[13])*a,this.z=(n[2]*e+n[6]*r+n[10]*i+n[14])*a,this},applyQuaternion:function(t){var e=this.x,r=this.y,i=this.z,n=t.x,a=t.y,o=t.z,s=t.w,c=s*e+a*i-o*r,h=s*r+o*e-n*i,l=s*i+n*r-a*e,u=-n*e-a*r-o*i;return this.x=c*s+u*-n+h*-o-l*-a,this.y=h*s+u*-a+l*-n-c*-o,this.z=l*s+u*-o+c*-a-h*-n,this},project:function(){var t;return function(e){return void 0===t&&(t=new THREE.Matrix4),t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyProjection(t)}}(),unproject:function(){var t;return function(e){return void 0===t&&(t=new THREE.Matrix4),t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyProjection(t)}}(),transformDirection:function(t){var e=this.x,r=this.y,i=this.z,n=t.elements;return this.x=n[0]*e+n[4]*r+n[8]*i,this.y=n[1]*e+n[5]*r+n[9]*i,this.z=n[2]*e+n[6]*r+n[10]*i,this.normalize(),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t,e;return function(r,i){return void 0===t&&(t=new THREE.Vector3,e=new THREE.Vector3),t.set(r,r,r),e.set(i,i,i),this.clamp(t,e)}}(),clampLength:function(t,e){var r=this.length();return this.multiplyScalar(Math.max(t,Math.min(e,r))/r),this},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},lengthManhattan:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length())},setLength:function(t){return this.multiplyScalar(t/this.length())},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,r){return this.subVectors(e,t).multiplyScalar(r).add(t),this},cross:function(t,e){if(void 0!==e)return console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e);var r=this.x,i=this.y,n=this.z;return this.x=i*t.z-n*t.y,this.y=n*t.x-r*t.z,this.z=r*t.y-i*t.x,this},crossVectors:function(t,e){var r=t.x,i=t.y,n=t.z,a=e.x,o=e.y,s=e.z;return this.x=i*s-n*o,this.y=n*a-r*s,this.z=r*o-i*a,this},projectOnVector:function(){var t,e;return function(r){return void 0===t&&(t=new THREE.Vector3),t.copy(r).normalize(),e=this.dot(t),this.copy(t).multiplyScalar(e)}}(),projectOnPlane:function(){var t;return function(e){return void 0===t&&(t=new THREE.Vector3),t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t;return function(e){return void 0===t&&(t=new THREE.Vector3),this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(THREE.Math.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return e*e+r*r+i*i},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromMatrixPosition:function(t){return this.setFromMatrixColumn(t,3)},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),r=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=r,this.z=i,this},setFromMatrixColumn:function(t,e){return"number"==typeof t&&(console.warn("THREE.Vector3: setFromMatrixColumn now expects ( matrix, index )."),t=arguments[1],e=arguments[0]),this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromAttribute:function(t,e,r){return void 0===r&&(r=0),e=e*t.itemSize+r,this.x=t.array[e],this.y=t.array[e+1],this.z=t.array[e+2],this}},THREE.Vector4=function(t,e,r,i){this.x=t||0,this.y=e||0,this.z=r||0,this.w=void 0!==i?i:1},THREE.Vector4.prototype={constructor:THREE.Vector4,set:function(t,e,r,i){return this.x=t,this.y=e,this.z=r,this.w=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t,this.w*=t):(this.x=0,this.y=0,this.z=0,this.w=0),this},applyMatrix4:function(t){var e=this.x,r=this.y,i=this.z,n=this.w,a=t.elements;return this.x=a[0]*e+a[4]*r+a[8]*i+a[12]*n,this.y=a[1]*e+a[5]*r+a[9]*i+a[13]*n,this.z=a[2]*e+a[6]*r+a[10]*i+a[14]*n,this.w=a[3]*e+a[7]*r+a[11]*i+a[15]*n,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,r,i,n,a=.01,o=.1,s=t.elements,c=s[0],h=s[4],l=s[8],u=s[1],p=s[5],d=s[9],E=s[2],f=s[6],m=s[10];if(Math.abs(h-u)v&&g>T?gT?vthis.max.x||t.ythis.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){var r=e||new THREE.Vector2;return r.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)},clampPoint:function(t,e){var r=e||new THREE.Vector2;return r.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new THREE.Vector2;return function(e){var r=t.copy(e).clamp(this.min,this.max);return r.sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},THREE.Box3=function(t,e){this.min=void 0!==t?t:new THREE.Vector3((+(1/0)),(+(1/0)),(+(1/0))),this.max=void 0!==e?e:new THREE.Vector3((-(1/0)),(-(1/0)),(-(1/0)))},THREE.Box3.prototype={constructor:THREE.Box3,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=+(1/0),r=+(1/0),i=+(1/0),n=-(1/0),a=-(1/0),o=-(1/0),s=0,c=t.length;sn&&(n=h),l>a&&(a=l),u>o&&(o=u)}this.min.set(e,r,i),this.max.set(n,a,o)},setFromPoints:function(t){this.makeEmpty();for(var e=0,r=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){var r=e||new THREE.Vector3;return r.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)},intersectsSphere:function(){var t;return function(e){return void 0===t&&(t=new THREE.Vector3),this.clampPoint(e.center,t),t.distanceToSquared(e.center)<=e.radius*e.radius}}(),intersectsPlane:function(t){var e,r;return t.normal.x>0?(e=t.normal.x*this.min.x,r=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,r=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,r+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,r+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,r+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,r+=t.normal.z*this.min.z),e<=t.constant&&r>=t.constant},clampPoint:function(t,e){var r=e||new THREE.Vector3;return r.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new THREE.Vector3;return function(e){var r=t.copy(e).clamp(this.min,this.max);return r.sub(e).length()}}(),getBoundingSphere:function(){var t=new THREE.Vector3;return function(e){var r=e||new THREE.Sphere;return r.center=this.center(),r.radius=.5*this.size(t).length(),r}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(){var t=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3,new THREE.Vector3];return function(e){return this.isEmpty()?this:(t[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),t[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),t[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),t[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),t[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),t[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),t[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),t[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(t),this)}}(),translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}},THREE.Matrix3=function(){this.elements=new Float32Array([1,0,0,0,1,0,0,0,1]),arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")},THREE.Matrix3.prototype={constructor:THREE.Matrix3,set:function(t,e,r,i,n,a,o,s,c){var h=this.elements;return h[0]=t,h[1]=i,h[2]=o,h[3]=e,h[4]=n,h[5]=s,h[6]=r,h[7]=a,h[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=t.elements;return this.set(e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]),this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToVector3Array:function(){var t;return function(e,r,i){void 0===t&&(t=new THREE.Vector3),void 0===r&&(r=0),void 0===i&&(i=e.length);for(var n=0,a=r;n0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")},THREE.Matrix4.prototype={constructor:THREE.Matrix4,set:function(t,e,r,i,n,a,o,s,c,h,l,u,p,d,E,f){var m=this.elements;return m[0]=t,m[4]=e,m[8]=r,m[12]=i,m[1]=n,m[5]=a,m[9]=o,m[13]=s,m[2]=c,m[6]=h,m[10]=l,m[14]=u,m[3]=p,m[7]=d,m[11]=E,m[15]=f,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new THREE.Matrix4).fromArray(this.elements)},copy:function(t){return this.elements.set(t.elements),this},copyPosition:function(t){var e=this.elements,r=t.elements;return e[12]=r[12],e[13]=r[13],e[14]=r[14],this},extractBasis:function(t,e,r){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),r.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,r){return this.set(t.x,e.x,r.x,0,t.y,e.y,r.y,0,t.z,e.z,r.z,0,0,0,0,1),this},extractRotation:function(){var t;return function(e){void 0===t&&(t=new THREE.Vector3);var r=this.elements,i=e.elements,n=1/t.setFromMatrixColumn(e,0).length(),a=1/t.setFromMatrixColumn(e,1).length(),o=1/t.setFromMatrixColumn(e,2).length();return r[0]=i[0]*n,r[1]=i[1]*n,r[2]=i[2]*n,r[4]=i[4]*a,r[5]=i[5]*a,r[6]=i[6]*a,r[8]=i[8]*o,r[9]=i[9]*o,r[10]=i[10]*o,this}}(),makeRotationFromEuler:function(t){t instanceof THREE.Euler==!1&&console.error("THREE.Matrix: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,r=t.x,i=t.y,n=t.z,a=Math.cos(r),o=Math.sin(r),s=Math.cos(i),c=Math.sin(i),h=Math.cos(n),l=Math.sin(n);if("XYZ"===t.order){var u=a*h,p=a*l,d=o*h,E=o*l;e[0]=s*h,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=u-E*c,e[9]=-o*s,e[2]=E-u*c,e[6]=d+p*c,e[10]=a*s}else if("YXZ"===t.order){var f=s*h,m=s*l,g=c*h,v=c*l;e[0]=f+v*o,e[4]=g*o-m,e[8]=a*c,e[1]=a*l,e[5]=a*h,e[9]=-o,e[2]=m*o-g,e[6]=v+f*o,e[10]=a*s}else if("ZXY"===t.order){var f=s*h,m=s*l,g=c*h,v=c*l;e[0]=f-v*o,e[4]=-a*l,e[8]=g+m*o,e[1]=m+g*o,e[5]=a*h,e[9]=v-f*o,e[2]=-a*c,e[6]=o,e[10]=a*s}else if("ZYX"===t.order){var u=a*h,p=a*l,d=o*h,E=o*l;e[0]=s*h,e[4]=d*c-p,e[8]=u*c+E,e[1]=s*l,e[5]=E*c+u,e[9]=p*c-d,e[2]=-c,e[6]=o*s,e[10]=a*s}else if("YZX"===t.order){var T=a*s,y=a*c,R=o*s,H=o*c;e[0]=s*h,e[4]=H-T*l,e[8]=R*l+y,e[1]=l,e[5]=a*h,e[9]=-o*h,e[2]=-c*h,e[6]=y*l+R,e[10]=T-H*l}else if("XZY"===t.order){var T=a*s,y=a*c,R=o*s,H=o*c;e[0]=s*h,e[4]=-l,e[8]=c*h,e[1]=T*l+H,e[5]=a*h,e[9]=y*l-R,e[2]=R*l-y,e[6]=o*h,e[10]=H*l+T}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:function(t){var e=this.elements,r=t.x,i=t.y,n=t.z,a=t.w,o=r+r,s=i+i,c=n+n,h=r*o,l=r*s,u=r*c,p=i*s,d=i*c,E=n*c,f=a*o,m=a*s,g=a*c;return e[0]=1-(p+E),e[4]=l-g,e[8]=u+m,e[1]=l+g,e[5]=1-(h+E),e[9]=d-f,e[2]=u-m,e[6]=d+f,e[10]=1-(h+p),e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},lookAt:function(){var t,e,r;return function(i,n,a){void 0===t&&(t=new THREE.Vector3),void 0===e&&(e=new THREE.Vector3),void 0===r&&(r=new THREE.Vector3);var o=this.elements;return r.subVectors(i,n).normalize(),0===r.lengthSq()&&(r.z=1),t.crossVectors(a,r).normalize(),0===t.lengthSq()&&(r.x+=1e-4,t.crossVectors(a,r).normalize()),e.crossVectors(r,t),o[0]=t.x,o[4]=e.x,o[8]=r.x,o[1]=t.y,o[5]=e.y,o[9]=r.y,o[2]=t.z,o[6]=e.z,o[10]=r.z,this}}(),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var r=t.elements,i=e.elements,n=this.elements,a=r[0],o=r[4],s=r[8],c=r[12],h=r[1],l=r[5],u=r[9],p=r[13],d=r[2],E=r[6],f=r[10],m=r[14],g=r[3],v=r[7],T=r[11],y=r[15],R=i[0],H=i[4],x=i[8],b=i[12],_=i[1],M=i[5],w=i[9],S=i[13],L=i[2],A=i[6],C=i[10],P=i[14],B=i[3],D=i[7],I=i[11],U=i[15];return n[0]=a*R+o*_+s*L+c*B,n[4]=a*H+o*M+s*A+c*D,n[8]=a*x+o*w+s*C+c*I,n[12]=a*b+o*S+s*P+c*U,n[1]=h*R+l*_+u*L+p*B,n[5]=h*H+l*M+u*A+p*D,n[9]=h*x+l*w+u*C+p*I,n[13]=h*b+l*S+u*P+p*U,n[2]=d*R+E*_+f*L+m*B,n[6]=d*H+E*M+f*A+m*D,n[10]=d*x+E*w+f*C+m*I,n[14]=d*b+E*S+f*P+m*U,n[3]=g*R+v*_+T*L+y*B,n[7]=g*H+v*M+T*A+y*D,n[11]=g*x+v*w+T*C+y*I,n[15]=g*b+v*S+T*P+y*U,this},multiplyToArray:function(t,e,r){var i=this.elements;return this.multiplyMatrices(t,e),r[0]=i[0],r[1]=i[1],r[2]=i[2],r[3]=i[3],r[4]=i[4],r[5]=i[5],r[6]=i[6],r[7]=i[7],r[8]=i[8],r[9]=i[9],r[10]=i[10],r[11]=i[11],r[12]=i[12],r[13]=i[13],r[14]=i[14],r[15]=i[15],this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToVector3Array:function(){var t;return function(e,r,i){void 0===t&&(t=new THREE.Vector3),void 0===r&&(r=0),void 0===i&&(i=e.length);for(var n=0,a=r;n0)if(s=p*E-d,c=p*d-E,l=u*m,s>=0)if(c>=-l)if(c<=l){var g=1/m;s*=g,c*=g,h=s*(s+p*c+2*d)+c*(p*s+c+2*E)+f}else c=u,s=Math.max(0,-(p*c+d)),h=-s*s+c*(c+2*E)+f;else c=-u,s=Math.max(0,-(p*c+d)),h=-s*s+c*(c+2*E)+f;else c<=-l?(s=Math.max(0,-(-p*u+d)),c=s>0?-u:Math.min(Math.max(-u,-E),u),h=-s*s+c*(c+2*E)+f):c<=l?(s=0,c=Math.min(Math.max(-u,-E),u),h=c*(c+2*E)+f):(s=Math.max(0,-(p*u+d)),c=s>0?u:Math.min(Math.max(-u,-E),u),h=-s*s+c*(c+2*E)+f);else c=p>0?-u:u,s=Math.max(0,-(p*c+d)),h=-s*s+c*(c+2*E)+f;return a&&a.copy(this.direction).multiplyScalar(s).add(this.origin),o&&o.copy(e).multiplyScalar(c).add(t),h}}(),intersectSphere:function(){var t=new THREE.Vector3;return function(e,r){t.subVectors(e.center,this.origin);var i=t.dot(this.direction),n=t.dot(t)-i*i,a=e.radius*e.radius;if(n>a)return null;var o=Math.sqrt(a-n),s=i-o,c=i+o;return s<0&&c<0?null:s<0?this.at(c,r):this.at(s,r)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var r=-(this.origin.dot(t.normal)+t.constant)/e;return r>=0?r:null},intersectPlane:function(t,e){var r=this.distanceToPlane(t);return null===r?null:this.at(r,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);if(0===e)return!0;var r=t.normal.dot(this.direction);return r*e<0},intersectBox:function(t,e){var r,i,n,a,o,s,c=1/this.direction.x,h=1/this.direction.y,l=1/this.direction.z,u=this.origin;return c>=0?(r=(t.min.x-u.x)*c,i=(t.max.x-u.x)*c):(r=(t.max.x-u.x)*c,i=(t.min.x-u.x)*c),h>=0?(n=(t.min.y-u.y)*h,a=(t.max.y-u.y)*h):(n=(t.max.y-u.y)*h,a=(t.min.y-u.y)*h),r>a||n>i?null:((n>r||r!==r)&&(r=n),(a=0?(o=(t.min.z-u.z)*l,s=(t.max.z-u.z)*l):(o=(t.max.z-u.z)*l,s=(t.min.z-u.z)*l),r>s||o>i?null:((o>r||r!==r)&&(r=o),(s=0?r:i,e)))},intersectsBox:function(){var t=new THREE.Vector3;return function(e){return null!==this.intersectBox(e,t)}}(),intersectTriangle:function(){var t=new THREE.Vector3,e=new THREE.Vector3,r=new THREE.Vector3,i=new THREE.Vector3;return function(n,a,o,s,c){e.subVectors(a,n),r.subVectors(o,n),i.crossVectors(e,r);var h,l=this.direction.dot(i);if(l>0){if(s)return null;h=1}else{if(!(l<0))return null;h=-1,l=-l}t.subVectors(this.origin,n);var u=h*this.direction.dot(r.crossVectors(t,r));if(u<0)return null;var p=h*this.direction.dot(e.cross(t));if(p<0)return null;if(u+p>l)return null;var d=-h*t.dot(i);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.direction.add(this.origin).applyMatrix4(t),this.origin.applyMatrix4(t),this.direction.sub(this.origin),this.direction.normalize(),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}},THREE.Sphere=function(t,e){this.center=void 0!==t?t:new THREE.Vector3,this.radius=void 0!==e?e:0},THREE.Sphere.prototype={constructor:THREE.Sphere,set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:function(){var t=new THREE.Box3;return function(e,r){var i=this.center;void 0!==r?i.copy(r):t.setFromPoints(e).center(i);for(var n=0,a=0,o=e.length;athis.radius*this.radius&&(i.sub(this.center).normalize(),i.multiplyScalar(this.radius).add(this.center)),i},getBoundingBox:function(t){var e=t||new THREE.Box3;return e.set(this.center,this.center),e.expandByScalar(this.radius),e},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}},THREE.Frustum=function(t,e,r,i,n,a){this.planes=[void 0!==t?t:new THREE.Plane,void 0!==e?e:new THREE.Plane,void 0!==r?r:new THREE.Plane,void 0!==i?i:new THREE.Plane,void 0!==n?n:new THREE.Plane,void 0!==a?a:new THREE.Plane]},THREE.Frustum.prototype={constructor:THREE.Frustum,set:function(t,e,r,i,n,a){var o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(r),o[3].copy(i),o[4].copy(n),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,r=0;r<6;r++)e[r].copy(t.planes[r]);return this},setFromMatrix:function(t){var e=this.planes,r=t.elements,i=r[0],n=r[1],a=r[2],o=r[3],s=r[4],c=r[5],h=r[6],l=r[7],u=r[8],p=r[9],d=r[10],E=r[11],f=r[12],m=r[13],g=r[14],v=r[15];return e[0].setComponents(o-i,l-s,E-u,v-f).normalize(),e[1].setComponents(o+i,l+s,E+u,v+f).normalize(),e[2].setComponents(o+n,l+c,E+p,v+m).normalize(),e[3].setComponents(o-n,l-c,E-p,v-m).normalize(),e[4].setComponents(o-a,l-h,E-d,v-g).normalize(),e[5].setComponents(o+a,l+h,E+d,v+g).normalize(),this},intersectsObject:function(){var t=new THREE.Sphere;return function(e){var r=e.geometry;return null===r.boundingSphere&&r.computeBoundingSphere(),t.copy(r.boundingSphere),t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,r=t.center,i=-t.radius,n=0;n<6;n++){var a=e[n].distanceToPoint(r);if(a0?r.min.x:r.max.x,e.x=a.normal.x>0?r.max.x:r.min.x,t.y=a.normal.y>0?r.min.y:r.max.y,e.y=a.normal.y>0?r.max.y:r.min.y,t.z=a.normal.z>0?r.min.z:r.max.z,e.z=a.normal.z>0?r.max.z:r.min.z;var o=a.distanceToPoint(t),s=a.distanceToPoint(e);if(o<0&&s<0)return!1}return!0}}(),containsPoint:function(t){for(var e=this.planes,r=0;r<6;r++)if(e[r].distanceToPoint(t)<0)return!1;return!0}},THREE.Plane=function(t,e){this.normal=void 0!==t?t:new THREE.Vector3(1,0,0),this.constant=void 0!==e?e:0},THREE.Plane.prototype={constructor:THREE.Plane,set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,r,i){return this.normal.set(t,e,r),this.constant=i,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(r,i,n){var a=t.subVectors(n,i).cross(e.subVectors(r,i)).normalize();return this.setFromNormalAndCoplanarPoint(a,r),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return this.orthoPoint(t,e).sub(t).negate()},orthoPoint:function(t,e){var r=this.distanceToPoint(t),i=e||new THREE.Vector3;return i.copy(this.normal).multiplyScalar(r)},intersectLine:function(){var t=new THREE.Vector3;return function(e,r){var i=r||new THREE.Vector3,n=e.delta(t),a=this.normal.dot(n);if(0!==a){var o=-(e.start.dot(this.normal)+this.constant)/a;if(!(o<0||o>1))return i.copy(n).multiplyScalar(o).add(e.start)}else if(0===this.distanceToPoint(e.start))return i.copy(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),r=this.distanceToPoint(t.end);return e<0&&r>0||r<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){var e=t||new THREE.Vector3;return e.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new THREE.Vector3,e=new THREE.Matrix3;return function(r,i){var n=this.coplanarPoint(t).applyMatrix4(r),a=i||e.getNormalMatrix(r),o=this.normal.applyMatrix3(a).normalize();return this.constant=-n.dot(o),this}}(),translate:function(t){return this.constant=this.constant-t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}},THREE.Spherical=function(t,e,r){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==r?r:0,this},THREE.Spherical.prototype={constructor:THREE.Spherical,set:function(t,e,r){this.radius=t,this.phi=e,this.theta=r},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius.copy(t.radius),this.phi.copy(t.phi),this.theta.copy(t.theta),this},makeSafe:function(){var t=1e-6;this.phi=Math.max(t,Math.min(Math.PI-t,this.phi))},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(THREE.Math.clamp(t.y/this.radius,-1,1))),this}},THREE.Math={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){var t,e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),r=new Array(36),i=0;return function(){for(var n=0;n<36;n++)8===n||13===n||18===n||23===n?r[n]="-":14===n?r[n]="4":(i<=2&&(i=33554432+16777216*Math.random()|0),t=15&i,i>>=4,r[n]=e[19===n?3&t|8:t]);return r.join("")}}(),clamp:function(t,e,r){return Math.max(e,Math.min(r,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,r,i,n){return i+(t-e)*(n-i)/(r-e)},smoothstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e),t*t*(3-2*t))},smootherstep:function(t,e,r){return t<=e?0:t>=r?1:(t=(t-e)/(r-e),t*t*t*(t*(6*t-15)+10))},random16:function(){return console.warn("THREE.Math.random16() has been deprecated. Use Math.random() instead."),Math.random()},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*THREE.Math.DEG2RAD},radToDeg:function(t){return t*THREE.Math.RAD2DEG},isPowerOfTwo:function(t){return 0===(t&t-1)&&0!==t},nearestPowerOfTwo:function(t){return Math.pow(2,Math.round(Math.log(t)/Math.LN2))},nextPowerOfTwo:function(t){return t--,t|=t>>1,t|=t>>2,t|=t>>4,t|=t>>8,t|=t>>16,t++,t}},THREE.Spline=function(t){function e(t,e,r,i,n,a,o){var s=.5*(r-t),c=.5*(i-e);return(2*(e-r)+s+c)*o+(-3*(e-r)-2*s-c)*a+s*n+e}this.points=t;var r,i,n,a,o,s,c,h,l,u=[],p={x:0,y:0,z:0};this.initFromArray=function(t){this.points=[];for(var e=0;ethis.points.length-2?this.points.length-1:i+1,u[3]=i>this.points.length-3?this.points.length-1:i+2,s=this.points[u[0]],c=this.points[u[1]],h=this.points[u[2]],l=this.points[u[3]],a=n*n,o=n*a,p.x=e(s.x,c.x,h.x,l.x,n,a,o),p.y=e(s.y,c.y,h.y,l.y,n,a,o),p.z=e(s.z,c.z,h.z,l.z,n,a,o),p},this.getControlPointsArray=function(){var t,e,r=this.points.length,i=[];for(t=0;t0?a.multiplyScalar(1/Math.sqrt(o)):a.set(0,0,0)}}(),THREE.Triangle.barycoordFromPoint=function(){var t=new THREE.Vector3,e=new THREE.Vector3,r=new THREE.Vector3;return function(i,n,a,o,s){t.subVectors(o,n),e.subVectors(a,n),r.subVectors(i,n);var c=t.dot(t),h=t.dot(e),l=t.dot(r),u=e.dot(e),p=e.dot(r),d=c*u-h*h,E=s||new THREE.Vector3;if(0===d)return E.set(-2,-1,-1);var f=1/d,m=(u*l-h*p)*f,g=(c*p-h*l)*f;return E.set(1-m-g,g,m)}}(),THREE.Triangle.containsPoint=function(){var t=new THREE.Vector3;return function(e,r,i,n){var a=THREE.Triangle.barycoordFromPoint(e,r,i,n,t);return a.x>=0&&a.y>=0&&a.x+a.y<=1}}(),THREE.Triangle.prototype={constructor:THREE.Triangle,set:function(t,e,r){return this.a.copy(t),this.b.copy(e),this.c.copy(r),this},setFromPointsAndIndices:function(t,e,r,i){return this.a.copy(t[e]),this.b.copy(t[r]),this.c.copy(t[i]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},area:function(){var t=new THREE.Vector3,e=new THREE.Vector3;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),midpoint:function(t){var e=t||new THREE.Vector3;return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},normal:function(t){return THREE.Triangle.normal(this.a,this.b,this.c,t)},plane:function(t){var e=t||new THREE.Plane;return e.setFromCoplanarPoints(this.a,this.b,this.c)},barycoordFromPoint:function(t,e){return THREE.Triangle.barycoordFromPoint(t,this.a,this.b,this.c,e)},containsPoint:function(t){return THREE.Triangle.containsPoint(t,this.a,this.b,this.c)},closestPointToPoint:function(){var t,e,r,i;return function(n,a){void 0===t&&(t=new THREE.Plane,e=[new THREE.Line3,new THREE.Line3,new THREE.Line3],r=new THREE.Vector3,i=new THREE.Vector3);var o=a||new THREE.Vector3,s=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(n,r),this.containsPoint(r)===!0)o.copy(r);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var c=0;c=n)break t;var s=e[1];t=n)break e}a=r,r=0}}for(;r>>1;t1){for(var e=0;e1)for(var e=0;e0){n.children=[];for(var a=0;a0&&(i.geometries=o),s.length>0&&(i.materials=s),c.length>0&&(i.textures=c),h.length>0&&(i.images=h)}return i.object=n,i},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.rotationAutoUpdate=t.rotationAutoUpdate,this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(var r=0;r0)for(var d=0;d0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,r,i,n;for(r=0,i=this.faces.length;r0&&(t+=e[r].distanceTo(e[r-1])),this.lineDistances[r]=t},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,r){if(t instanceof THREE.Geometry==!1)return void console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t);var i,n=this.vertices.length,a=this.vertices,o=t.vertices,s=this.faces,c=t.faces,h=this.faceVertexUvs[0],l=t.faceVertexUvs[0];void 0===r&&(r=0),void 0!==e&&(i=(new THREE.Matrix3).getNormalMatrix(e));for(var u=0,p=o.length;u=0;r--){var m=d[r];for(this.faces.splice(m,1),o=0,s=this.faceVertexUvs.length;o0,H=g.vertexNormals.length>0,x=1!==g.color.r||1!==g.color.g||1!==g.color.b,b=g.vertexColors.length>0,_=0;if(_=t(_,0,0),_=t(_,1,v),_=t(_,2,T),_=t(_,3,y),_=t(_,4,R),_=t(_,5,H),_=t(_,6,x),_=t(_,7,b),l.push(_),l.push(g.a,g.b,g.c),l.push(g.materialIndex),y){var M=this.faceVertexUvs[0][c];l.push(i(M[0]),i(M[1]),i(M[2]))}if(R&&l.push(e(g.normal)),H){var w=g.vertexNormals;l.push(e(w[0]),e(w[1]),e(w[2]))}if(x&&l.push(r(g.color)),b){var S=g.vertexColors;l.push(r(S[0]),r(S[1]),r(S[2]))}}return n.data={},n.data.vertices=s,n.data.normals=u,d.length>0&&(n.data.colors=d),f.length>0&&(n.data.uvs=[f]),n.data.faces=l,n},clone:function(){return(new THREE.Geometry).copy(this)},copy:function(t){this.vertices=[],this.faces=[],this.faceVertexUvs=[[]];for(var e=t.vertices,r=0,i=e.length;r0,o=n[1]&&n[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var h=0;h0){l=[];for(var h=0;h0){var r=new Float32Array(3*t.normals.length);this.addAttribute("normal",new THREE.BufferAttribute(r,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var i=new Float32Array(3*t.colors.length);this.addAttribute("color",new THREE.BufferAttribute(i,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var n=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new THREE.BufferAttribute(n,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var a=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new THREE.BufferAttribute(a,2).copyVector2sArray(t.uvs2))}if(t.indices.length>0){var o=t.vertices.length>65535?Uint32Array:Uint16Array,s=new o(3*t.indices.length);this.setIndex(new THREE.BufferAttribute(s,1).copyIndicesArray(t.indices))}this.groups=t.groups;for(var c in t.morphTargets){for(var h=[],l=t.morphTargets[c],u=0,p=l.length;u0){var f=new THREE.Float32Attribute(4*t.skinIndices.length,4);this.addAttribute("skinIndex",f.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var m=new THREE.Float32Attribute(4*t.skinWeights.length,4);this.addAttribute("skinWeight",m.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new THREE.Box3);var t=this.attributes.position.array;void 0!==t?this.boundingBox.setFromArray(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new THREE.Box3,e=new THREE.Vector3;return function(){null===this.boundingSphere&&(this.boundingSphere=new THREE.Sphere);var r=this.attributes.position.array;if(r){var i=this.boundingSphere.center;t.setFromArray(r),t.center(i);for(var n=0,a=0,o=r.length;a0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new THREE.BufferGeometry).copy(this)},copy:function(t){var e=t.index;null!==e&&this.setIndex(e.clone());var r=t.attributes;for(var i in r){var n=r[i];this.addAttribute(i,n.clone())}for(var a=t.groups,o=0,s=a.length;o1){var h=c[1],l=i[h];l||(i[h]=l=[]),l.push(s)}}var u=[];for(var h in i)u.push(THREE.AnimationClip.CreateFromMorphTargetSequence(h,i[h],e,r));return u},parseAnimation:function(t,e,r){if(!t)return console.error(" no animation in JSONLoader data"),null;for(var i=function(t,e,r,i,n){if(0!==r.length){var a=[],o=[];THREE.AnimationUtils.flattenJSON(r,a,o,i),0!==a.length&&n.push(new t(e,a,o))}},n=[],a=t.name||"default",o=t.length||-1,s=t.fps||30,c=t.hierarchy||[],h=0;h0)for(var c=this._interpolants,h=this._propertyBindings,l=0,u=c.length;l!==u;++l)c[l].evaluate(o),h[l].accumulate(i,s)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var r=this._weightInterpolant;if(null!==r){var i=r.evaluate(t)[0];e*=i,t>r.parameterPositions[1]&&(this.stopFading(),0===i&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var r=this._timeScaleInterpolant;if(null!==r){var i=r.evaluate(t)[0];e*=i,t>r.parameterPositions[1]&&(this.stopWarping(),0===e?this.pause=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var r=this._clip.duration,i=this.loop,n=this._loopCount,a=!1;switch(i){case THREE.LoopOnce:if(n===-1&&(this.loopCount=0,this._setEndings(!0,!0,!1)),e>=r)e=r;else{if(!(e<0))break;e=0}this.clampWhenFinished?this.pause=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1});break;case THREE.LoopPingPong:a=!0;case THREE.LoopRepeat:if(n===-1&&(t>0?(n=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),e>=r||e<0){var o=Math.floor(e/r);e-=r*o,n+=Math.abs(o);var s=this.repetitions-n;if(s<0){this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?r:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});break}if(0===s){var c=t<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}if(i===THREE.LoopPingPong&&1===(1&n))return this.time=e,r-e}return this.time=e,e},_setEndings:function(t,e,r){var i=this._interpolantSettings;r?(i.endingStart=THREE.ZeroSlopeEnding,i.endingEnd=THREE.ZeroSlopeEnding):(t?i.endingStart=this.zeroSlopeAtStart?THREE.ZeroSlopeEnding:THREE.ZeroCurvatureEnding:i.endingStart=THREE.WrapAroundEnding,e?i.endingEnd=this.zeroSlopeAtEnd?THREE.ZeroSlopeEnding:THREE.ZeroCurvatureEnding:i.endingEnd=THREE.WrapAroundEnding)},_scheduleFading:function(t,e,r){var i=this._mixer,n=i.time,a=this._weightInterpolant;null===a&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=n,s[0]=e,o[1]=n+t,s[1]=r,this}},Object.assign(THREE.AnimationMixer.prototype,{_bindAction:function(t,e){var r=t._localRoot||this._root,i=t._clip.tracks,n=i.length,a=t._propertyBindings,o=t._interpolants,s=r.uuid,c=this._bindingsByRootAndName,h=c[s];void 0===h&&(h={},c[s]=h);for(var l=0;l!==n;++l){var u=i[l],p=u.name,d=h[p];if(void 0!==d)a[l]=d;else{if(d=a[l],void 0!==d){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var E=e&&e._propertyBindings[l].binding.parsedPath;d=new THREE.PropertyMixer(THREE.PropertyBinding.create(r,p,E),u.ValueTypeName,u.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,s,p),a[l]=d}o[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,r=t._clip.name,i=this._actionsByClip[r];this._bindAction(t,i&&i.knownActions[0]),this._addInactiveAction(t,r,e)}for(var n=t._propertyBindings,a=0,o=n.length;a!==o;++a){var s=n[a];0===s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,r=0,i=e.length;r!==i;++r){var n=e[r];0===--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e=r){var u=r++,p=e[u];i[p.uuid]=l,e[l]=p,i[h]=u,e[u]=c;for(var d=0,E=a;d!==E;++d){var f=n[d],m=f[u],g=f[l];f[l]=m,f[u]=g}}}this.nCachedObjects_=r},uncache:function(t){for(var e=this._objects,r=e.length,i=this.nCachedObjects_,n=this._indicesByUUID,a=this._bindings,o=a.length,s=0,c=arguments.length;s!==c;++s){var h=arguments[s],l=h.uuid,u=n[l];if(void 0!==u)if(delete n[l],ue;)--a;if(++a,0!==n||a!==i){n>=a&&(a=Math.max(a,1),n=a-1);var o=this.getValueSize();this.times=THREE.AnimationUtils.arraySlice(r,n,a),this.values=THREE.AnimationUtils.arraySlice(this.values,n*o,a*o)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("invalid value size in track",this),t=!1);var r=this.times,i=this.values,n=r.length;0===n&&(console.error("track is empty",this),t=!1);for(var a=null,o=0;o!==n;o++){var s=r[o];if("number"==typeof s&&isNaN(s)){console.error("time is not a valid number",this,o,s),t=!1;break}if(null!==a&&a>s){console.error("out of order keys",this,o,s,a),t=!1;break}a=s}if(void 0!==i&&THREE.AnimationUtils.isTypedArray(i))for(var o=0,c=i.length;o!==c;++o){var h=i[o];if(isNaN(h)){console.error("value is not a valid number",this,o,h),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,r=this.getValueSize(),i=1,n=1,a=t.length-1;n<=a;++n){var o=!1,s=t[n],c=t[n+1];if(s!==c&&(1!==n||s!==s[0]))for(var h=n*r,l=h-r,u=h+r,p=0;p!==r;++p){var d=e[h+p];if(d!==e[l+p]||d!==e[u+p]){o=!0;break}}if(o){if(n!==i){t[i]=t[n];for(var E=n*r,f=i*r,p=0;p!==r;++p)e[f+p]=e[E+p]}++i}}return i!==t.length&&(this.times=THREE.AnimationUtils.arraySlice(t,0,i),this.values=THREE.AnimationUtils.arraySlice(e,0,i*r)),this}},Object.assign(THREE.KeyframeTrack,{parse:function(t){if(void 0===t.type)throw new Error("track type undefined, can not parse");var e=THREE.KeyframeTrack._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){console.warn("legacy JSON format detected, converting");var r=[],i=[];THREE.AnimationUtils.flattenJSON(t.keys,r,i,"value"),t.times=r,t.values=i}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,r=t.constructor;if(void 0!==r.toJSON)e=r.toJSON(t);else{e={name:t.name,times:THREE.AnimationUtils.convertArray(t.times,Array),values:THREE.AnimationUtils.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return THREE.NumberKeyframeTrack;case"vector":case"vector2":case"vector3":case"vector4":return THREE.VectorKeyframeTrack;case"color":return THREE.ColorKeyframeTrack;case"quaternion":return THREE.QuaternionKeyframeTrack;case"bool":case"boolean":return THREE.BooleanKeyframeTrack;case"string":return THREE.StringKeyframeTrack}throw new Error("Unsupported typeName: "+t)}}),THREE.PropertyBinding=function(t,e,r){this.path=e,this.parsedPath=r||THREE.PropertyBinding.parseTrackName(e),this.node=THREE.PropertyBinding.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t},THREE.PropertyBinding.prototype={constructor:THREE.PropertyBinding,getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,r=e.objectName,i=e.propertyName,n=e.propertyIndex;if(t||(t=THREE.PropertyBinding.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.error(" trying to update node for track: "+this.path+" but it wasn't found.");if(r){var a=e.objectIndex;switch(r){case"materials":if(!t.material)return void console.error(" can not bind to material as node does not have a material",this);if(!t.material.materials)return void console.error(" can not bind to material.materials as node.material does not have a materials array",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error(" can not bind to bones as node does not have a skeleton",this);t=t.skeleton.bones;for(var o=0;o=.5)for(var a=0;a!==n;++a)t[e+a]=t[r+a]},_slerp:function(t,e,r,i,n){THREE.Quaternion.slerpFlat(t,e,t,e,t,r,i)},_lerp:function(t,e,r,i,n){for(var a=1-i,o=0;o!==n;++o){var s=e+o;t[s]=t[s]*a+t[r+o]*i}}},THREE.BooleanKeyframeTrack=function(t,e,r){THREE.KeyframeTrack.call(this,t,e,r)},THREE.BooleanKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.BooleanKeyframeTrack,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:THREE.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),THREE.ColorKeyframeTrack=function(t,e,r,i){THREE.KeyframeTrack.call(this,t,e,r,i)},THREE.ColorKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.ColorKeyframeTrack,ValueTypeName:"color"}),THREE.NumberKeyframeTrack=function(t,e,r,i){THREE.KeyframeTrack.call(this,t,e,r,i)},THREE.NumberKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.NumberKeyframeTrack,ValueTypeName:"number"}),THREE.QuaternionKeyframeTrack=function(t,e,r,i){THREE.KeyframeTrack.call(this,t,e,r,i)},THREE.QuaternionKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.QuaternionKeyframeTrack,ValueTypeName:"quaternion",DefaultInterpolation:THREE.InterpolateLinear,InterpolantFactoryMethodLinear:function(t){return new THREE.QuaternionLinearInterpolant(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),THREE.StringKeyframeTrack=function(t,e,r,i){THREE.KeyframeTrack.call(this,t,e,r,i)},THREE.StringKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.StringKeyframeTrack,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:THREE.InterpolateDiscrete,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),THREE.VectorKeyframeTrack=function(t,e,r,i){THREE.KeyframeTrack.call(this,t,e,r,i)},THREE.VectorKeyframeTrack.prototype=Object.assign(Object.create(THREE.KeyframeTrack.prototype),{constructor:THREE.VectorKeyframeTrack,ValueTypeName:"vector"}),THREE.Audio=function(t){THREE.Object3D.call(this),this.type="Audio",this.context=t.context,this.source=this.context.createBufferSource(),this.source.onended=this.onEnded.bind(this),this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.startTime=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filter=null},THREE.Audio.prototype=Object.create(THREE.Object3D.prototype),THREE.Audio.prototype.constructor=THREE.Audio,THREE.Audio.prototype.getOutput=function(){return this.gain},THREE.Audio.prototype.setNodeSource=function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},THREE.Audio.prototype.setBuffer=function(t){var e=this;return e.source.buffer=t,e.sourceType="buffer",e.autoplay&&e.play(),this},THREE.Audio.prototype.play=function(){if(this.isPlaying===!0)return void console.warn("THREE.Audio: Audio is already playing.");if(this.hasPlaybackControl===!1)return void console.warn("THREE.Audio: this Audio has no playback control.");var t=this.context.createBufferSource();t.buffer=this.source.buffer,t.loop=this.source.loop,t.onended=this.source.onended,t.start(0,this.startTime),t.playbackRate.value=this.playbackRate,this.isPlaying=!0,this.source=t,this.connect()},THREE.Audio.prototype.pause=function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),void(this.startTime=this.context.currentTime))},THREE.Audio.prototype.stop=function(){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.source.stop(),void(this.startTime=0))},THREE.Audio.prototype.connect=function(){null!==this.filter?(this.source.connect(this.filter),this.filter.connect(this.getOutput())):this.source.connect(this.getOutput())},THREE.Audio.prototype.disconnect=function(){null!==this.filter?(this.source.disconnect(this.filter),this.filter.disconnect(this.getOutput())):this.source.disconnect(this.getOutput())},THREE.Audio.prototype.getFilter=function(){return this.filter},THREE.Audio.prototype.setFilter=function(t){void 0===t&&(t=null),this.isPlaying===!0?(this.disconnect(),this.filter=t,this.connect()):this.filter=t},THREE.Audio.prototype.setPlaybackRate=function(t){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):(this.playbackRate=t,void(this.isPlaying===!0&&(this.source.playbackRate.value=this.playbackRate)))},THREE.Audio.prototype.getPlaybackRate=function(){return this.playbackRate},THREE.Audio.prototype.onEnded=function(){this.isPlaying=!1},THREE.Audio.prototype.setLoop=function(t){return this.hasPlaybackControl===!1?void console.warn("THREE.Audio: this Audio has no playback control."):void(this.source.loop=t)},THREE.Audio.prototype.getLoop=function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.source.loop},THREE.Audio.prototype.setVolume=function(t){this.gain.gain.value=t},THREE.Audio.prototype.getVolume=function(){return this.gain.gain.value},THREE.AudioAnalyser=function(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)},THREE.AudioAnalyser.prototype={constructor:THREE.AudioAnalyser,getData:function(){return this.analyser.getByteFrequencyData(this.data),this.data}},Object.defineProperty(THREE,"AudioContext",{get:function(){var t; +return function(){return void 0===t&&(t=new(window.AudioContext||window.webkitAudioContext)),t}}()}),THREE.PositionalAudio=function(t){THREE.Audio.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)},THREE.PositionalAudio.prototype=Object.create(THREE.Audio.prototype),THREE.PositionalAudio.prototype.constructor=THREE.PositionalAudio,THREE.PositionalAudio.prototype.getOutput=function(){return this.panner},THREE.PositionalAudio.prototype.setRefDistance=function(t){this.panner.refDistance=t},THREE.PositionalAudio.prototype.getRefDistance=function(){return this.panner.refDistance},THREE.PositionalAudio.prototype.setRolloffFactor=function(t){this.panner.rolloffFactor=t},THREE.PositionalAudio.prototype.getRolloffFactor=function(){return this.panner.rolloffFactor},THREE.PositionalAudio.prototype.setDistanceModel=function(t){this.panner.distanceModel=t},THREE.PositionalAudio.prototype.getDistanceModel=function(){return this.panner.distanceModel},THREE.PositionalAudio.prototype.setMaxDistance=function(t){this.panner.maxDistance=t},THREE.PositionalAudio.prototype.getMaxDistance=function(){return this.panner.maxDistance},THREE.PositionalAudio.prototype.updateMatrixWorld=function(){var t=new THREE.Vector3;return function(e){THREE.Object3D.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}(),THREE.AudioListener=function(){THREE.Object3D.call(this),this.type="AudioListener",this.context=THREE.AudioContext,this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null},THREE.AudioListener.prototype=Object.create(THREE.Object3D.prototype),THREE.AudioListener.prototype.constructor=THREE.AudioListener,THREE.AudioListener.prototype.getInput=function(){return this.gain},THREE.AudioListener.prototype.removeFilter=function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},THREE.AudioListener.prototype.setFilter=function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},THREE.AudioListener.prototype.getFilter=function(){return this.filter},THREE.AudioListener.prototype.setMasterVolume=function(t){this.gain.gain.value=t},THREE.AudioListener.prototype.getMasterVolume=function(){return this.gain.gain.value},THREE.AudioListener.prototype.updateMatrixWorld=function(){var t=new THREE.Vector3,e=new THREE.Quaternion,r=new THREE.Vector3,i=new THREE.Vector3;return function(n){THREE.Object3D.prototype.updateMatrixWorld.call(this,n);var a=this.context.listener,o=this.up;this.matrixWorld.decompose(t,e,r),i.set(0,0,-1).applyQuaternion(e),a.setPosition(t.x,t.y,t.z),a.setOrientation(i.x,i.y,i.z,o.x,o.y,o.z)}}(),THREE.Camera=function(){THREE.Object3D.call(this),this.type="Camera",this.matrixWorldInverse=new THREE.Matrix4,this.projectionMatrix=new THREE.Matrix4},THREE.Camera.prototype=Object.create(THREE.Object3D.prototype),THREE.Camera.prototype.constructor=THREE.Camera,THREE.Camera.prototype.getWorldDirection=function(){var t=new THREE.Quaternion;return function(e){var r=e||new THREE.Vector3;return this.getWorldQuaternion(t),r.set(0,0,-1).applyQuaternion(t)}}(),THREE.Camera.prototype.lookAt=function(){var t=new THREE.Matrix4;return function(e){t.lookAt(this.position,e,this.up),this.quaternion.setFromRotationMatrix(t)}}(),THREE.Camera.prototype.clone=function(){return(new this.constructor).copy(this)},THREE.Camera.prototype.copy=function(t){return THREE.Object3D.prototype.copy.call(this,t),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},THREE.CubeCamera=function(t,e,r){THREE.Object3D.call(this),this.type="CubeCamera";var i=90,n=1,a=new THREE.PerspectiveCamera(i,n,t,e);a.up.set(0,-1,0),a.lookAt(new THREE.Vector3(1,0,0)),this.add(a);var o=new THREE.PerspectiveCamera(i,n,t,e);o.up.set(0,-1,0),o.lookAt(new THREE.Vector3((-1),0,0)),this.add(o);var s=new THREE.PerspectiveCamera(i,n,t,e);s.up.set(0,0,1),s.lookAt(new THREE.Vector3(0,1,0)),this.add(s);var c=new THREE.PerspectiveCamera(i,n,t,e);c.up.set(0,0,-1),c.lookAt(new THREE.Vector3(0,(-1),0)),this.add(c);var h=new THREE.PerspectiveCamera(i,n,t,e);h.up.set(0,-1,0),h.lookAt(new THREE.Vector3(0,0,1)),this.add(h);var l=new THREE.PerspectiveCamera(i,n,t,e);l.up.set(0,-1,0),l.lookAt(new THREE.Vector3(0,0,(-1))),this.add(l);var u={format:THREE.RGBFormat,magFilter:THREE.LinearFilter,minFilter:THREE.LinearFilter};this.renderTarget=new THREE.WebGLRenderTargetCube(r,r,u),this.updateCubeMap=function(t,e){null===this.parent&&this.updateMatrixWorld();var r=this.renderTarget,i=r.texture.generateMipmaps;r.texture.generateMipmaps=!1,r.activeCubeFace=0,t.render(e,a,r),r.activeCubeFace=1,t.render(e,o,r),r.activeCubeFace=2,t.render(e,s,r),r.activeCubeFace=3,t.render(e,c,r),r.activeCubeFace=4,t.render(e,h,r),r.texture.generateMipmaps=i,r.activeCubeFace=5,t.render(e,l,r),t.setRenderTarget(null)}},THREE.CubeCamera.prototype=Object.create(THREE.Object3D.prototype),THREE.CubeCamera.prototype.constructor=THREE.CubeCamera,THREE.OrthographicCamera=function(t,e,r,i,n,a){THREE.Camera.call(this),this.type="OrthographicCamera",this.zoom=1,this.left=t,this.right=e,this.top=r,this.bottom=i,this.near=void 0!==n?n:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()},THREE.OrthographicCamera.prototype=Object.create(THREE.Camera.prototype),THREE.OrthographicCamera.prototype.constructor=THREE.OrthographicCamera,THREE.OrthographicCamera.prototype.updateProjectionMatrix=function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),r=(this.right+this.left)/2,i=(this.top+this.bottom)/2;this.projectionMatrix.makeOrthographic(r-t,r+t,i+e,i-e,this.near,this.far)},THREE.OrthographicCamera.prototype.copy=function(t){return THREE.Camera.prototype.copy.call(this,t),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this},THREE.OrthographicCamera.prototype.toJSON=function(t){var e=THREE.Object3D.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,e},THREE.PerspectiveCamera=function(t,e,r,i){THREE.Camera.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==r?r:.1,this.far=void 0!==i?i:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()},THREE.PerspectiveCamera.prototype=Object.create(THREE.Camera.prototype),THREE.PerspectiveCamera.prototype.constructor=THREE.PerspectiveCamera,THREE.PerspectiveCamera.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},THREE.PerspectiveCamera.prototype.setFocalLength=function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*THREE.Math.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},THREE.PerspectiveCamera.prototype.getFocalLength=function(){var t=Math.tan(.5*THREE.Math.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},THREE.PerspectiveCamera.prototype.getEffectiveFOV=function(){return 2*THREE.Math.RAD2DEG*Math.atan(Math.tan(.5*THREE.Math.DEG2RAD*this.fov)/this.zoom)},THREE.PerspectiveCamera.prototype.getFilmWidth=function(){return this.filmGauge*Math.min(this.aspect,1)},THREE.PerspectiveCamera.prototype.getFilmHeight=function(){return this.filmGauge/Math.max(this.aspect,1)},THREE.PerspectiveCamera.prototype.setViewOffset=function(t,e,r,i,n,a){this.aspect=t/e,this.view={fullWidth:t,fullHeight:e,offsetX:r,offsetY:i,width:n,height:a},this.updateProjectionMatrix()},THREE.PerspectiveCamera.prototype.updateProjectionMatrix=function(){var t=this.near,e=t*Math.tan(.5*THREE.Math.DEG2RAD*this.fov)/this.zoom,r=2*e,i=this.aspect*r,n=-.5*i,a=this.view;if(null!==a){var o=a.fullWidth,s=a.fullHeight;n+=a.offsetX*i/o,e-=a.offsetY*r/s,i*=a.width/o,r*=a.height/s}var c=this.filmOffset;0!==c&&(n+=t*c/this.getFilmWidth()),this.projectionMatrix.makeFrustum(n,n+i,e-r,e,t,this.far)},THREE.PerspectiveCamera.prototype.copy=function(t){return THREE.Camera.prototype.copy.call(this,t),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},THREE.PerspectiveCamera.prototype.toJSON=function(t){var e=THREE.Object3D.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e},THREE.StereoCamera=function(){this.type="StereoCamera",this.aspect=1,this.cameraL=new THREE.PerspectiveCamera,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new THREE.PerspectiveCamera,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1},THREE.StereoCamera.prototype={constructor:THREE.StereoCamera,update:function(){var t,e,r,i,n,a=new THREE.Matrix4,o=new THREE.Matrix4;return function(s){var c=t!==s.focus||e!==s.fov||r!==s.aspect*this.aspect||i!==s.near||n!==s.far;if(c){t=s.focus,e=s.fov,r=s.aspect*this.aspect,i=s.near,n=s.far;var h,l,u=s.projectionMatrix.clone(),p=.032,d=p*i/t,E=i*Math.tan(THREE.Math.DEG2RAD*e*.5);o.elements[12]=-p,a.elements[12]=p,h=-E*r+d,l=E*r+d,u.elements[0]=2*i/(l-h),u.elements[8]=(l+h)/(l-h),this.cameraL.projectionMatrix.copy(u),h=-E*r-d,l=E*r-d,u.elements[0]=2*i/(l-h),u.elements[8]=(l+h)/(l-h),this.cameraR.projectionMatrix.copy(u)}this.cameraL.matrixWorld.copy(s.matrixWorld).multiply(o),this.cameraR.matrixWorld.copy(s.matrixWorld).multiply(a)}}()},THREE.Light=function(t,e){THREE.Object3D.call(this),this.type="Light",this.color=new THREE.Color(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0},THREE.Light.prototype=Object.create(THREE.Object3D.prototype),THREE.Light.prototype.constructor=THREE.Light,THREE.Light.prototype.copy=function(t){return THREE.Object3D.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},THREE.Light.prototype.toJSON=function(t){var e=THREE.Object3D.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),e},THREE.LightShadow=function(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new THREE.Vector2(512,512),this.map=null,this.matrix=new THREE.Matrix4},THREE.LightShadow.prototype={constructor:THREE.LightShadow,copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)}},THREE.AmbientLight=function(t,e){THREE.Light.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0},THREE.AmbientLight.prototype=Object.create(THREE.Light.prototype),THREE.AmbientLight.prototype.constructor=THREE.AmbientLight,THREE.DirectionalLight=function(t,e){THREE.Light.call(this,t,e),this.type="DirectionalLight",this.position.set(0,1,0),this.updateMatrix(),this.target=new THREE.Object3D,this.shadow=new THREE.DirectionalLightShadow},THREE.DirectionalLight.prototype=Object.create(THREE.Light.prototype),THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight,THREE.DirectionalLight.prototype.copy=function(t){return THREE.Light.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this},THREE.DirectionalLightShadow=function(t){THREE.LightShadow.call(this,new THREE.OrthographicCamera((-5),5,5,(-5),.5,500))},THREE.DirectionalLightShadow.prototype=Object.create(THREE.LightShadow.prototype),THREE.DirectionalLightShadow.prototype.constructor=THREE.DirectionalLightShadow,THREE.HemisphereLight=function(t,e,r){THREE.Light.call(this,t,r),this.type="HemisphereLight",this.castShadow=void 0,this.position.set(0,1,0),this.updateMatrix(),this.groundColor=new THREE.Color(e)},THREE.HemisphereLight.prototype=Object.create(THREE.Light.prototype),THREE.HemisphereLight.prototype.constructor=THREE.HemisphereLight,THREE.HemisphereLight.prototype.copy=function(t){return THREE.Light.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this},THREE.PointLight=function(t,e,r,i){THREE.Light.call(this,t,e),this.type="PointLight",this.distance=void 0!==r?r:0,this.decay=void 0!==i?i:1,this.shadow=new THREE.LightShadow(new THREE.PerspectiveCamera(90,1,.5,500))},THREE.PointLight.prototype=Object.create(THREE.Light.prototype),THREE.PointLight.prototype.constructor=THREE.PointLight,Object.defineProperty(THREE.PointLight.prototype,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),THREE.PointLight.prototype.copy=function(t){return THREE.Light.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this},THREE.SpotLight=function(t,e,r,i,n,a){THREE.Light.call(this,t,e),this.type="SpotLight",this.position.set(0,1,0),this.updateMatrix(),this.target=new THREE.Object3D,this.distance=void 0!==r?r:0,this.angle=void 0!==i?i:Math.PI/3,this.penumbra=void 0!==n?n:0,this.decay=void 0!==a?a:1,this.shadow=new THREE.SpotLightShadow},THREE.SpotLight.prototype=Object.create(THREE.Light.prototype),THREE.SpotLight.prototype.constructor=THREE.SpotLight,Object.defineProperty(THREE.SpotLight.prototype,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),THREE.SpotLight.prototype.copy=function(t){return THREE.Light.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this},THREE.SpotLightShadow=function(){THREE.LightShadow.call(this,new THREE.PerspectiveCamera(50,1,.5,500))},THREE.SpotLightShadow.prototype=Object.create(THREE.LightShadow.prototype),THREE.SpotLightShadow.prototype.constructor=THREE.SpotLightShadow,THREE.SpotLightShadow.prototype.update=function(t){var e=2*THREE.Math.RAD2DEG*t.angle,r=this.mapSize.width/this.mapSize.height,i=t.distance||500,n=this.camera;e===n.fov&&r===n.aspect&&i===n.far||(n.fov=e,n.aspect=r,n.far=i,n.updateProjectionMatrix())},THREE.AudioLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.AudioLoader.prototype={constructor:THREE.AudioLoader,load:function(t,e,r,i){var n=new THREE.XHRLoader(this.manager);n.setResponseType("arraybuffer"),n.load(t,function(t){var r=THREE.AudioContext;r.decodeAudioData(t,function(t){e(t)})},r,i)}},THREE.Cache={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},THREE.Loader=function(){this.onLoadStart=function(){},this.onLoadProgress=function(){},this.onLoadComplete=function(){}},THREE.Loader.prototype={constructor:THREE.Loader,crossOrigin:void 0,extractUrlBase:function(t){var e=t.split("/");return 1===e.length?"./":(e.pop(),e.join("/")+"/")},initMaterials:function(t,e,r){for(var i=[],n=0;n1?t.skinWeights[r+1]:0,s=e>2?t.skinWeights[r+2]:0,c=e>3?t.skinWeights[r+3]:0;o.skinWeights.push(new THREE.Vector4(n,a,s,c))}if(t.skinIndices)for(var r=0,i=t.skinIndices.length;r1?t.skinIndices[r+1]:0,u=e>2?t.skinIndices[r+2]:0,p=e>3?t.skinIndices[r+3]:0;o.skinIndices.push(new THREE.Vector4(h,l,u,p))}o.bones=t.bones,o.bones&&o.bones.length>0&&(o.skinWeights.length!==o.skinIndices.length||o.skinIndices.length!==o.vertices.length)&&console.warn("When skinning, number of vertices ("+o.vertices.length+"), skinIndices ("+o.skinIndices.length+"), and skinWeights ("+o.skinWeights.length+") should match.")}function n(e){if(void 0!==t.morphTargets)for(var r=0,i=t.morphTargets.length;r0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');for(var l=o.faces,u=t.morphColors[0].colors,r=0,i=l.length;r0&&(o.animations=e)}var o=new THREE.Geometry,s=void 0!==t.scale?1/t.scale:1;if(r(s),i(),n(s),a(),o.computeFaceNormals(),o.computeBoundingSphere(),void 0===t.materials||0===t.materials.length)return{geometry:o};var c=THREE.Loader.prototype.initMaterials(t.materials,e,this.crossOrigin);return{geometry:o,materials:c}}};THREE.LoadingManager=function(t,e,r){var i=this,n=!1,a=0,o=0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=r,this.itemStart=function(t){o++,n===!1&&void 0!==i.onStart&&i.onStart(t,a,o),n=!0},this.itemEnd=function(t){a++,void 0!==i.onProgress&&i.onProgress(t,a,o),a===o&&(n=!1,void 0!==i.onLoad&&i.onLoad())},this.itemError=function(t){void 0!==i.onError&&i.onError(t)}},THREE.DefaultLoadingManager=new THREE.LoadingManager,THREE.BufferGeometryLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager},THREE.BufferGeometryLoader.prototype={constructor:THREE.BufferGeometryLoader,load:function(t,e,r,i){var n=this,a=new THREE.XHRLoader(n.manager);a.load(t,function(t){e(n.parse(JSON.parse(t)))},r,i)},parse:function(t){var e=new THREE.BufferGeometry,r=t.data.index,i={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};if(void 0!==r){var n=new i[r.type](r.array);e.setIndex(new THREE.BufferAttribute(n,1))}var a=t.data.attributes;for(var o in a){var s=a[o],n=new i[s.type](s.array);e.addAttribute(o,new THREE.BufferAttribute(n,s.itemSize,s.normalized))}var c=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==c)for(var h=0,l=c.length;h!==l;++h){var u=c[h];e.addGroup(u.start,u.count,u.materialIndex)}var p=t.data.boundingSphere;if(void 0!==p){var d=new THREE.Vector3;void 0!==p.center&&d.fromArray(p.center),e.boundingSphere=new THREE.Sphere(d,p.radius)}return e}},THREE.MaterialLoader=function(t){this.manager=void 0!==t?t:THREE.DefaultLoadingManager,this.textures={}},THREE.MaterialLoader.prototype={constructor:THREE.MaterialLoader,load:function(t,e,r,i){var n=this,a=new THREE.XHRLoader(n.manager);a.load(t,function(t){e(n.parse(JSON.parse(t)))},r,i)},setTextures:function(t){this.textures=t},getTexture:function(t){var e=this.textures;return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]},parse:function(t){var e=new THREE[t.type];if(void 0!==t.uuid&&(e.uuid=t.uuid),void 0!==t.name&&(e.name=t.name),void 0!==t.color&&e.color.setHex(t.color),void 0!==t.roughness&&(e.roughness=t.roughness),void 0!==t.metalness&&(e.metalness=t.metalness),void 0!==t.emissive&&e.emissive.setHex(t.emissive),void 0!==t.specular&&e.specular.setHex(t.specular),void 0!==t.shininess&&(e.shininess=t.shininess),void 0!==t.uniforms&&(e.uniforms=t.uniforms),void 0!==t.vertexShader&&(e.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(e.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(e.vertexColors=t.vertexColors),void 0!==t.shading&&(e.shading=t.shading),void 0!==t.blending&&(e.blending=t.blending),void 0!==t.side&&(e.side=t.side),void 0!==t.opacity&&(e.opacity=t.opacity),void 0!==t.transparent&&(e.transparent=t.transparent),void 0!==t.alphaTest&&(e.alphaTest=t.alphaTest),void 0!==t.depthTest&&(e.depthTest=t.depthTest),void 0!==t.depthWrite&&(e.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(e.colorWrite=t.colorWrite),void 0!==t.wireframe&&(e.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(e.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.size&&(e.size=t.size),void 0!==t.sizeAttenuation&&(e.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(e.map=this.getTexture(t.map)),void 0!==t.alphaMap&&(e.alphaMap=this.getTexture(t.alphaMap),e.transparent=!0),void 0!==t.bumpMap&&(e.bumpMap=this.getTexture(t.bumpMap)),void 0!==t.bumpScale&&(e.bumpScale=t.bumpScale),void 0!==t.normalMap&&(e.normalMap=this.getTexture(t.normalMap)),void 0!==t.normalScale){var r=t.normalScale;Array.isArray(r)===!1&&(r=[r,r]),e.normalScale=(new THREE.Vector2).fromArray(r)}if(void 0!==t.displacementMap&&(e.displacementMap=this.getTexture(t.displacementMap)),void 0!==t.displacementScale&&(e.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(e.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(e.roughnessMap=this.getTexture(t.roughnessMap)),void 0!==t.metalnessMap&&(e.metalnessMap=this.getTexture(t.metalnessMap)),void 0!==t.emissiveMap&&(e.emissiveMap=this.getTexture(t.emissiveMap)),void 0!==t.emissiveIntensity&&(e.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(e.specularMap=this.getTexture(t.specularMap)),void 0!==t.envMap&&(e.envMap=this.getTexture(t.envMap),e.combine=THREE.MultiplyOperation),t.reflectivity&&(e.reflectivity=t.reflectivity),void 0!==t.lightMap&&(e.lightMap=this.getTexture(t.lightMap)),void 0!==t.lightMapIntensity&&(e.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(e.aoMap=this.getTexture(t.aoMap)),void 0!==t.aoMapIntensity&&(e.aoMapIntensity=t.aoMapIntensity),void 0!==t.materials)for(var i=0,n=t.materials.length;i0){var a=new THREE.LoadingManager(e),o=new THREE.ImageLoader(a);o.setCrossOrigin(this.crossOrigin);for(var s=0,c=t.length;s0?new THREE.SkinnedMesh(s,c):new THREE.Mesh(s,c);break;case"LOD":o=new THREE.LOD;break;case"Line":o=new THREE.Line(n(e.geometry),a(e.material),e.mode);break;case"PointCloud":case"Points":o=new THREE.Points(n(e.geometry),a(e.material));break;case"Sprite":o=new THREE.Sprite(a(e.material));break;case"Group":o=new THREE.Group;break;default:o=new THREE.Object3D}if(o.uuid=e.uuid,void 0!==e.name&&(o.name=e.name),void 0!==e.matrix?(t.fromArray(e.matrix),t.decompose(o.position,o.quaternion,o.scale)):(void 0!==e.position&&o.position.fromArray(e.position),void 0!==e.rotation&&o.rotation.fromArray(e.rotation),void 0!==e.scale&&o.scale.fromArray(e.scale)),void 0!==e.castShadow&&(o.castShadow=e.castShadow),void 0!==e.receiveShadow&&(o.receiveShadow=e.receiveShadow),void 0!==e.visible&&(o.visible=e.visible),void 0!==e.userData&&(o.userData=e.userData),void 0!==e.children)for(var h in e.children)o.add(this.parseObject(e.children[h],r,i));if("LOD"===e.type)for(var l=e.levels,u=0;u0&&(i.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),r){var n=e(t.textures),a=e(t.images);n.length>0&&(i.textures=n),a.length>0&&(i.images=a)}return i},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.side=t.side,this.opacity=t.opacity,this.transparent=t.transparent,this.blending=t.blending,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.clipShadows=t.clipShadows;var e=t.clippingPlanes,r=null;if(null!==e){var i=e.length;r=new Array(i);for(var n=0;n!==i;++n)r[n]=e[n].clone()}return this.clippingPlanes=r,this},update:function(){this.dispatchEvent({type:"update"})},dispose:function(){this.dispatchEvent({type:"dispose"})}},THREE.EventDispatcher.prototype.apply(THREE.Material.prototype),THREE.MaterialIdCount=0,THREE.LineBasicMaterial=function(t){THREE.Material.call(this),this.type="LineBasicMaterial",this.color=new THREE.Color(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.blending=THREE.NormalBlending,this.vertexColors=THREE.NoColors,this.fog=!0,this.setValues(t)},THREE.LineBasicMaterial.prototype=Object.create(THREE.Material.prototype),THREE.LineBasicMaterial.prototype.constructor=THREE.LineBasicMaterial,THREE.LineBasicMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.vertexColors=t.vertexColors,this.fog=t.fog,this},THREE.LineDashedMaterial=function(t){THREE.Material.call(this),this.type="LineDashedMaterial",this.color=new THREE.Color(16777215),this.linewidth=1,this.scale=1,this.dashSize=3,this.gapSize=1,this.blending=THREE.NormalBlending,this.vertexColors=THREE.NoColors,this.fog=!0,this.setValues(t)},THREE.LineDashedMaterial.prototype=Object.create(THREE.Material.prototype),THREE.LineDashedMaterial.prototype.constructor=THREE.LineDashedMaterial,THREE.LineDashedMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this.vertexColors=t.vertexColors,this.fog=t.fog,this},THREE.MeshBasicMaterial=function(t){THREE.Material.call(this),this.type="MeshBasicMaterial",this.color=new THREE.Color(16777215),this.map=null,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=THREE.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.shading=THREE.SmoothShading,this.blending=THREE.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=THREE.NoColors,this.skinning=!1,this.morphTargets=!1,this.setValues(t)},THREE.MeshBasicMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshBasicMaterial.prototype.constructor=THREE.MeshBasicMaterial,THREE.MeshBasicMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.fog=t.fog,this.shading=t.shading,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.vertexColors=t.vertexColors,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},THREE.MeshDepthMaterial=function(t){THREE.Material.call(this),this.type="MeshDepthMaterial",this.depthPacking=THREE.BasicDepthPacking,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)},THREE.MeshDepthMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshDepthMaterial.prototype.constructor=THREE.MeshDepthMaterial,THREE.MeshDepthMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},THREE.MeshLambertMaterial=function(t){THREE.Material.call(this),this.type="MeshLambertMaterial",this.color=new THREE.Color(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new THREE.Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=THREE.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.blending=THREE.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=THREE.NoColors,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)},THREE.MeshLambertMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshLambertMaterial.prototype.constructor=THREE.MeshLambertMaterial,THREE.MeshLambertMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.fog=t.fog,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.vertexColors=t.vertexColors,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},THREE.MeshNormalMaterial=function(t){THREE.Material.call(this,t),this.type="MeshNormalMaterial",this.wireframe=!1,this.wireframeLinewidth=1,this.morphTargets=!1,this.setValues(t)},THREE.MeshNormalMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshNormalMaterial.prototype.constructor=THREE.MeshNormalMaterial,THREE.MeshNormalMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},THREE.MeshPhongMaterial=function(t){THREE.Material.call(this),this.type="MeshPhongMaterial",this.color=new THREE.Color(16777215),this.specular=new THREE.Color(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new THREE.Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new THREE.Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=THREE.MultiplyOperation,this.reflectivity=1,this.refractionRatio=.98,this.fog=!0,this.shading=THREE.SmoothShading,this.blending=THREE.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=THREE.NoColors,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)},THREE.MeshPhongMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshPhongMaterial.prototype.constructor=THREE.MeshPhongMaterial,THREE.MeshPhongMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.fog=t.fog,this.shading=t.shading,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.vertexColors=t.vertexColors,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},THREE.MeshStandardMaterial=function(t){THREE.Material.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new THREE.Color(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new THREE.Color(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new THREE.Vector2(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.fog=!0,this.shading=THREE.SmoothShading,this.blending=THREE.NormalBlending,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.vertexColors=THREE.NoColors,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)},THREE.MeshStandardMaterial.prototype=Object.create(THREE.Material.prototype),THREE.MeshStandardMaterial.prototype.constructor=THREE.MeshStandardMaterial,THREE.MeshStandardMaterial.prototype.copy=function(t){return THREE.Material.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.fog=t.fog,this.shading=t.shading,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.vertexColors=t.vertexColors,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},THREE.MeshPhysicalMaterial=function(t){THREE.MeshStandardMaterial.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.setValues(t)},THREE.MeshPhysicalMaterial.prototype=Object.create(THREE.MeshStandardMaterial.prototype),THREE.MeshPhysicalMaterial.prototype.constructor=THREE.MeshPhysicalMaterial,THREE.MeshPhysicalMaterial.prototype.copy=function(t){return THREE.MeshStandardMaterial.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this},THREE.MultiMaterial=function(t){this.uuid=THREE.Math.generateUUID(),this.type="MultiMaterial",this.materials=t instanceof Array?t:[],this.visible=!0},THREE.MultiMaterial.prototype={constructor:THREE.MultiMaterial,toJSON:function(t){for(var e={metadata:{version:4.2,type:"material",generator:"MaterialExporter"},uuid:this.uuid,type:this.type,materials:[]},r=this.materials,i=0,n=r.length;i2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}if(void 0!==t.textures[this.uuid])return t.textures[this.uuid];var r={metadata:{version:4.4,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping, +repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],wrap:[this.wrapS,this.wrapT],minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy};if(void 0!==this.image){var i=this.image;void 0===i.uuid&&(i.uuid=THREE.Math.generateUUID()),void 0===t.images[i.uuid]&&(t.images[i.uuid]={uuid:i.uuid,url:e(i)}),r.image=i.uuid}return t.textures[this.uuid]=r,r},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(this.mapping===THREE.UVMapping){if(t.multiply(this.repeat),t.add(this.offset),t.x<0||t.x>1)switch(this.wrapS){case THREE.RepeatWrapping:t.x=t.x-Math.floor(t.x);break;case THREE.ClampToEdgeWrapping:t.x=t.x<0?0:1;break;case THREE.MirroredRepeatWrapping:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case THREE.RepeatWrapping:t.y=t.y-Math.floor(t.y);break;case THREE.ClampToEdgeWrapping:t.y=t.y<0?0:1;break;case THREE.MirroredRepeatWrapping:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}},THREE.EventDispatcher.prototype.apply(THREE.Texture.prototype),THREE.TextureIdCount=0,THREE.DepthTexture=function(t,e,r,i,n,a,o,s,c){THREE.Texture.call(this,null,i,n,a,o,s,THREE.DepthFormat,r,c),this.image={width:t,height:e},this.type=void 0!==r?r:THREE.UnsignedShortType,this.magFilter=void 0!==o?o:THREE.NearestFilter,this.minFilter=void 0!==s?s:THREE.NearestFilter,this.flipY=!1,this.generateMipmaps=!1},THREE.DepthTexture.prototype=Object.create(THREE.Texture.prototype),THREE.DepthTexture.prototype.constructor=THREE.DepthTexture,THREE.CanvasTexture=function(t,e,r,i,n,a,o,s,c){THREE.Texture.call(this,t,e,r,i,n,a,o,s,c),this.needsUpdate=!0},THREE.CanvasTexture.prototype=Object.create(THREE.Texture.prototype),THREE.CanvasTexture.prototype.constructor=THREE.CanvasTexture,THREE.CubeTexture=function(t,e,r,i,n,a,o,s,c,h){t=void 0!==t?t:[],e=void 0!==e?e:THREE.CubeReflectionMapping,THREE.Texture.call(this,t,e,r,i,n,a,o,s,c,h),this.flipY=!1},THREE.CubeTexture.prototype=Object.create(THREE.Texture.prototype),THREE.CubeTexture.prototype.constructor=THREE.CubeTexture,Object.defineProperty(THREE.CubeTexture.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),THREE.CompressedTexture=function(t,e,r,i,n,a,o,s,c,h,l,u){THREE.Texture.call(this,null,a,o,s,c,h,i,n,l,u),this.image={width:e,height:r},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1},THREE.CompressedTexture.prototype=Object.create(THREE.Texture.prototype),THREE.CompressedTexture.prototype.constructor=THREE.CompressedTexture,THREE.DataTexture=function(t,e,r,i,n,a,o,s,c,h,l,u){THREE.Texture.call(this,null,a,o,s,c,h,i,n,l,u),this.image={data:t,width:e,height:r},this.magFilter=void 0!==c?c:THREE.NearestFilter,this.minFilter=void 0!==h?h:THREE.NearestFilter,this.flipY=!1,this.generateMipmaps=!1},THREE.DataTexture.prototype=Object.create(THREE.Texture.prototype),THREE.DataTexture.prototype.constructor=THREE.DataTexture,THREE.VideoTexture=function(t,e,r,i,n,a,o,s,c){function h(){requestAnimationFrame(h),t.readyState>=t.HAVE_CURRENT_DATA&&(l.needsUpdate=!0)}THREE.Texture.call(this,t,e,r,i,n,a,o,s,c),this.generateMipmaps=!1;var l=this;h()},THREE.VideoTexture.prototype=Object.create(THREE.Texture.prototype),THREE.VideoTexture.prototype.constructor=THREE.VideoTexture,THREE.Group=function(){THREE.Object3D.call(this),this.type="Group"},THREE.Group.prototype=Object.create(THREE.Object3D.prototype),THREE.Group.prototype.constructor=THREE.Group,THREE.Points=function(t,e){THREE.Object3D.call(this),this.type="Points",this.geometry=void 0!==t?t:new THREE.Geometry,this.material=void 0!==e?e:new THREE.PointsMaterial({color:16777215*Math.random()})},THREE.Points.prototype=Object.create(THREE.Object3D.prototype),THREE.Points.prototype.constructor=THREE.Points,THREE.Points.prototype.raycast=function(){var t=new THREE.Matrix4,e=new THREE.Ray,r=new THREE.Sphere;return function(i,n){function a(t,r){var a=e.distanceSqToPoint(t);if(ai.far)return;n.push({distance:h,distanceToRay:Math.sqrt(a),point:s.clone(),index:r,face:null,object:o})}}var o=this,s=this.geometry,c=this.matrixWorld,h=i.params.Points.threshold;if(null===s.boundingSphere&&s.computeBoundingSphere(),r.copy(s.boundingSphere),r.applyMatrix4(c),i.ray.intersectsSphere(r)!==!1){t.getInverse(c),e.copy(i.ray).applyMatrix4(t);var l=h/((this.scale.x+this.scale.y+this.scale.z)/3),u=l*l,p=new THREE.Vector3;if(s instanceof THREE.BufferGeometry){var d=s.index,E=s.attributes,f=E.position.array;if(null!==d)for(var m=d.array,g=0,v=m.length;go)){p.applyMatrix4(this.matrixWorld);var x=i.ray.origin.distanceTo(p);xi.far||n.push({distance:x,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else for(var v=0,T=m.length/3-1;vo)){p.applyMatrix4(this.matrixWorld);var x=i.ray.origin.distanceTo(p);xi.far||n.push({distance:x,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}else if(s instanceof THREE.Geometry)for(var b=s.vertices,_=b.length,v=0;v<_-1;v+=d){var H=e.distanceSqToSegment(b[v],b[v+1],p,u);if(!(H>o)){p.applyMatrix4(this.matrixWorld);var x=i.ray.origin.distanceTo(p);xi.far||n.push({distance:x,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}}}(),THREE.Line.prototype.clone=function(){return new this.constructor(this.geometry,this.material).copy(this)},THREE.LineStrip=0,THREE.LinePieces=1,THREE.LineSegments=function(t,e){THREE.Line.call(this,t,e),this.type="LineSegments"},THREE.LineSegments.prototype=Object.create(THREE.Line.prototype),THREE.LineSegments.prototype.constructor=THREE.LineSegments,THREE.Mesh=function(t,e){THREE.Object3D.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new THREE.Geometry,this.material=void 0!==e?e:new THREE.MeshBasicMaterial({color:16777215*Math.random()}),this.drawMode=THREE.TrianglesDrawMode,this.updateMorphTargets()},THREE.Mesh.prototype=Object.create(THREE.Object3D.prototype),THREE.Mesh.prototype.constructor=THREE.Mesh,THREE.Mesh.prototype.setDrawMode=function(t){this.drawMode=t},THREE.Mesh.prototype.updateMorphTargets=function(){if(void 0!==this.geometry.morphTargets&&this.geometry.morphTargets.length>0){this.morphTargetBase=-1,this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var t=0,e=this.geometry.morphTargets.length;te.far?null:{distance:h,point:g.clone(),object:t}}function r(r,i,n,a,h,l,u,f){o.fromArray(a,3*l),s.fromArray(a,3*u),c.fromArray(a,3*f);var g=e(r,i,n,o,s,c,m);return g&&(h&&(p.fromArray(h,2*l),d.fromArray(h,2*u),E.fromArray(h,2*f),g.uv=t(m,o,s,c,p,d,E)),g.face=new THREE.Face3(l,u,f,THREE.Triangle.normal(o,s,c)),g.faceIndex=l),g}var i=new THREE.Matrix4,n=new THREE.Ray,a=new THREE.Sphere,o=new THREE.Vector3,s=new THREE.Vector3,c=new THREE.Vector3,h=new THREE.Vector3,l=new THREE.Vector3,u=new THREE.Vector3,p=new THREE.Vector2,d=new THREE.Vector2,E=new THREE.Vector2,f=new THREE.Vector3,m=new THREE.Vector3,g=new THREE.Vector3;return function(f,g){var v=this.geometry,T=this.material,y=this.matrixWorld;if(void 0!==T&&(null===v.boundingSphere&&v.computeBoundingSphere(),a.copy(v.boundingSphere),a.applyMatrix4(y),f.ray.intersectsSphere(a)!==!1&&(i.getInverse(y),n.copy(f.ray).applyMatrix4(i),null===v.boundingBox||n.intersectsBox(v.boundingBox)!==!1))){var R,H;if(v instanceof THREE.BufferGeometry){var x,b,_,M=v.index,w=v.attributes,S=w.position.array;if(void 0!==w.uv&&(R=w.uv.array),null!==M)for(var L=M.array,A=0,C=L.length;A0&&(R=O);for(var V=0,G=N.length;V1){t.setFromMatrixPosition(r.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var n=t.distanceTo(e);i[0].object.visible=!0;for(var a=1,o=i.length;a=i[a].distance;a++)i[a-1].object.visible=!1,i[a].object.visible=!0;for(;an||r.push({distance:Math.sqrt(i),point:this.position,face:null,object:this})}}(),THREE.Sprite.prototype.clone=function(){return new this.constructor(this.material).copy(this)},THREE.Particle=THREE.Sprite,THREE.LensFlare=function(t,e,r,i,n){THREE.Object3D.call(this),this.lensFlares=[],this.positionScreen=new THREE.Vector3,this.customUpdateCallback=void 0,void 0!==t&&this.add(t,e,r,i,n)},THREE.LensFlare.prototype=Object.create(THREE.Object3D.prototype),THREE.LensFlare.prototype.constructor=THREE.LensFlare,THREE.LensFlare.prototype.add=function(t,e,r,i,n,a){void 0===e&&(e=-1),void 0===r&&(r=0),void 0===a&&(a=1),void 0===n&&(n=new THREE.Color(16777215)),void 0===i&&(i=THREE.NormalBlending),r=Math.min(r,Math.max(0,r)),this.lensFlares.push({texture:t,size:e,distance:r,x:0,y:0,z:0,scale:1,rotation:0,opacity:a,color:n,blending:i})},THREE.LensFlare.prototype.updateLensFlares=function(){var t,e,r=this.lensFlares.length,i=2*-this.positionScreen.x,n=2*-this.positionScreen.y;for(t=0;t=0){var l=a[c];if(void 0!==l){var u=re.FLOAT,p=l.array,d=l.normalized;p instanceof Float32Array?u=re.FLOAT:p instanceof Float64Array?console.warn("Unsupported data buffer format: Float64Array"):p instanceof Uint16Array?u=re.UNSIGNED_SHORT:p instanceof Int16Array?u=re.SHORT:p instanceof Uint32Array?u=re.UNSIGNED_INT:p instanceof Int32Array?u=re.INT:p instanceof Int8Array?u=re.BYTE:p instanceof Uint8Array&&(u=re.UNSIGNED_BYTE);var E=l.itemSize,f=he.getAttributeBuffer(l);if(l instanceof THREE.InterleavedBufferAttribute){var m=l.data,g=m.stride,v=l.offset;m instanceof THREE.InstancedInterleavedBuffer?(se.enableAttributeAndDivisor(h,m.meshPerAttribute,n),void 0===r.maxInstancedCount&&(r.maxInstancedCount=m.meshPerAttribute*m.count)):se.enableAttribute(h),re.bindBuffer(re.ARRAY_BUFFER,f),re.vertexAttribPointer(h,E,u,d,g*m.array.BYTES_PER_ELEMENT,(i*g+v)*m.array.BYTES_PER_ELEMENT)}else l instanceof THREE.InstancedBufferAttribute?(se.enableAttributeAndDivisor(h,l.meshPerAttribute,n),void 0===r.maxInstancedCount&&(r.maxInstancedCount=l.meshPerAttribute*l.count)):se.enableAttribute(h),re.bindBuffer(re.ARRAY_BUFFER,f),re.vertexAttribPointer(h,E,u,d,0,i*E*l.array.BYTES_PER_ELEMENT)}else if(void 0!==s){var T=s[c];if(void 0!==T)switch(T.length){case 2:re.vertexAttrib2fv(h,T);break;case 3:re.vertexAttrib3fv(h,T);break;case 4:re.vertexAttrib4fv(h,T);break;default:re.vertexAttrib1fv(h,T)}}}}se.disableUnusedAttributes()}function E(t,e){return Math.abs(e[0])-Math.abs(t[0])}function f(t,e){return t.object.renderOrder!==e.object.renderOrder?t.object.renderOrder-e.object.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function m(t,e){return t.object.renderOrder!==e.object.renderOrder?t.object.renderOrder-e.object.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function g(t,e,r,i,n){var a,o;r.transparent?(a=mt,o=++gt):(a=Et,o=++ft);var s=a[o];void 0!==s?(s.id=t.id,s.object=t,s.geometry=e,s.material=r,s.z=Jt.z,s.group=n):(s={id:t.id,object:t,geometry:e,material:r,z:Jt.z,group:n},a.push(s))}function v(t){var e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere();var r=Zt.copy(e.boundingSphere).applyMatrix4(t.matrixWorld);if(!Vt.intersectsSphere(r))return!1;if(0===jt)return!0;var i=Rt.clippingPlanes,n=r.center,a=-r.radius,o=0;do if(i[o].distanceToPoint(n)=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(var u=0;u=0&&t.numSupportedMorphNormals++}var d=i.__webglShader.uniforms;(t instanceof THREE.ShaderMaterial||t instanceof THREE.RawShaderMaterial)&&t.clipping!==!0||(i.numClippingPlanes=jt,d.clippingPlanes=Wt),(t instanceof THREE.MeshPhongMaterial||t instanceof THREE.MeshLambertMaterial||t instanceof THREE.MeshStandardMaterial||t.lights)&&(i.lightsHash=$t.hash,d.ambientLightColor.value=$t.ambient,d.directionalLights.value=$t.directional,d.spotLights.value=$t.spot,d.pointLights.value=$t.point,d.hemisphereLights.value=$t.hemi,d.directionalShadowMap.value=$t.directionalShadowMap,d.directionalShadowMatrix.value=$t.directionalShadowMatrix,d.spotShadowMap.value=$t.spotShadowMap,d.spotShadowMatrix.value=$t.spotShadowMatrix,d.pointShadowMap.value=$t.pointShadowMap,d.pointShadowMatrix.value=$t.pointShadowMatrix);var E=i.program.getUniforms(),f=THREE.WebGLUniforms.seqWithValue(E.seq,d);i.uniformsList=f,i.dynamicUniforms=THREE.WebGLUniforms.splitDynamic(f,d)}function H(t){x(t),t.transparent===!0?se.setBlending(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha):se.setBlending(THREE.NoBlending),se.setDepthFunc(t.depthFunc),se.setDepthTest(t.depthTest),se.setDepthWrite(t.depthWrite),se.setColorWrite(t.colorWrite),se.setPolygonOffset(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits)}function x(t){t.side!==THREE.DoubleSide?se.enable(re.CULL_FACE):se.disable(re.CULL_FACE),se.setFlipSided(t.side===THREE.BackSide)}function b(t,e,r,i){Ct=0;var n=ce.get(r);if(Gt){if(zt||t!==wt){var a=t===wt&&r.id===_t;V(r.clippingPlanes,r.clipShadows,t,n,a)}void 0!==n.numClippingPlanes&&n.numClippingPlanes!==jt&&(r.needsUpdate=!0)}void 0===n.program&&(r.needsUpdate=!0),void 0!==n.lightsHash&&n.lightsHash!==$t.hash&&(r.needsUpdate=!0),r.needsUpdate&&(R(r,e,i),r.needsUpdate=!1);var o=!1,s=!1,c=!1,h=n.program,l=h.getUniforms(),u=n.__webglShader.uniforms;if(h.id!==Ht&&(re.useProgram(h.program),Ht=h.id,o=!0,s=!0,c=!0),r.id!==_t&&(_t=r.id,s=!0),o||t!==wt){if(l.set(re,t,"projectionMatrix"),oe.logarithmicDepthBuffer&&l.setValue(re,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),t!==wt&&(wt=t,s=!0,c=!0),r instanceof THREE.ShaderMaterial||r instanceof THREE.MeshPhongMaterial||r instanceof THREE.MeshStandardMaterial||r.envMap){var p=l.map.cameraPosition;void 0!==p&&p.setValue(re,Jt.setFromMatrixPosition(t.matrixWorld))}(r instanceof THREE.MeshPhongMaterial||r instanceof THREE.MeshLambertMaterial||r instanceof THREE.MeshBasicMaterial||r instanceof THREE.MeshStandardMaterial||r instanceof THREE.ShaderMaterial||r.skinning)&&l.setValue(re,"viewMatrix",t.matrixWorldInverse),l.set(re,Rt,"toneMappingExposure"),l.set(re,Rt,"toneMappingWhitePoint")}if(r.skinning){l.setOptional(re,i,"bindMatrix"),l.setOptional(re,i,"bindMatrixInverse");var d=i.skeleton;d&&(oe.floatVertexTextures&&d.useVertexTexture?(l.set(re,d,"boneTexture"),l.set(re,d,"boneTextureWidth"),l.set(re,d,"boneTextureHeight")):l.setOptional(re,d,"boneMatrices"))}s&&((r instanceof THREE.MeshPhongMaterial||r instanceof THREE.MeshLambertMaterial||r instanceof THREE.MeshStandardMaterial||r.lights)&&D(u,c),e&&r.fog&&L(u,e),(r instanceof THREE.MeshBasicMaterial||r instanceof THREE.MeshLambertMaterial||r instanceof THREE.MeshPhongMaterial||r instanceof THREE.MeshStandardMaterial||r instanceof THREE.MeshDepthMaterial)&&_(u,r),r instanceof THREE.LineBasicMaterial?M(u,r):r instanceof THREE.LineDashedMaterial?(M(u,r),w(u,r)):r instanceof THREE.PointsMaterial?S(u,r):r instanceof THREE.MeshLambertMaterial?A(u,r):r instanceof THREE.MeshPhongMaterial?C(u,r):r instanceof THREE.MeshPhysicalMaterial?B(u,r):r instanceof THREE.MeshStandardMaterial?P(u,r):r instanceof THREE.MeshDepthMaterial?r.displacementMap&&(u.displacementMap.value=r.displacementMap,u.displacementScale.value=r.displacementScale,u.displacementBias.value=r.displacementBias):r instanceof THREE.MeshNormalMaterial&&(u.opacity.value=r.opacity),THREE.WebGLUniforms.upload(re,n.uniformsList,u,Rt)),l.set(re,i,"modelViewMatrix"),l.set(re,i,"normalMatrix"),l.setValue(re,"modelMatrix",i.matrixWorld);var E=n.dynamicUniforms;return null!==E&&(THREE.WebGLUniforms.evalDynamic(E,u,i,t),THREE.WebGLUniforms.upload(re,E,u,Rt)),h}function _(t,e){t.opacity.value=e.opacity,t.diffuse.value=e.color,e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),t.map.value=e.map,t.specularMap.value=e.specularMap,t.alphaMap.value=e.alphaMap,e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity);var r;if(e.map?r=e.map:e.specularMap?r=e.specularMap:e.displacementMap?r=e.displacementMap:e.normalMap?r=e.normalMap:e.bumpMap?r=e.bumpMap:e.roughnessMap?r=e.roughnessMap:e.metalnessMap?r=e.metalnessMap:e.alphaMap?r=e.alphaMap:e.emissiveMap&&(r=e.emissiveMap),void 0!==r){r instanceof THREE.WebGLRenderTarget&&(r=r.texture);var i=r.offset,n=r.repeat;t.offsetRepeat.value.set(i.x,i.y,n.x,n.y)}t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap instanceof THREE.WebGLRenderTargetCube?1:-1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio}function M(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}function w(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}function S(t,e){if(t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*Ut,t.scale.value=.5*at.clientHeight,t.map.value=e.map,null!==e.map){var r=e.map.offset,i=e.map.repeat;t.offsetRepeat.value.set(r.x,r.y,i.x,i.y)}}function L(t,e){t.fogColor.value=e.color,e instanceof THREE.Fog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e instanceof THREE.FogExp2&&(t.fogDensity.value=e.density)}function A(t,e){e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}function C(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function P(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale)),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}function B(t,e){P(t,e)}function D(t,e){t.ambientLightColor.needsUpdate=e,t.directionalLights.needsUpdate=e,t.pointLights.needsUpdate=e,t.spotLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}function I(t){for(var e=0,r=0,i=t.length;r0),jt=qt}function V(t,e,r,i,n){if(!zt||null===t||0===t.length||kt&&!e)kt?N(null):O();else{var a=kt?0:qt,o=4*a,s=i.clippingState||null;Wt.value=s,s=N(t,r,o,n);for(var c=0;c!==o;++c)s[c]=Xt[c];i.clippingState=s,jt+=a}}function G(){var t=Ct;return t>=oe.maxTextures&&console.warn("WebGLRenderer: trying to use "+t+" texture units while this GPU supports only "+oe.maxTextures),Ct+=1,t}function z(t,e,r){var i;if(r?(re.texParameteri(t,re.TEXTURE_WRAP_S,nt(e.wrapS)),re.texParameteri(t,re.TEXTURE_WRAP_T,nt(e.wrapT)),re.texParameteri(t,re.TEXTURE_MAG_FILTER,nt(e.magFilter)),re.texParameteri(t,re.TEXTURE_MIN_FILTER,nt(e.minFilter))):(re.texParameteri(t,re.TEXTURE_WRAP_S,re.CLAMP_TO_EDGE),re.texParameteri(t,re.TEXTURE_WRAP_T,re.CLAMP_TO_EDGE),e.wrapS===THREE.ClampToEdgeWrapping&&e.wrapT===THREE.ClampToEdgeWrapping||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",e),re.texParameteri(t,re.TEXTURE_MAG_FILTER,it(e.magFilter)),re.texParameteri(t,re.TEXTURE_MIN_FILTER,it(e.minFilter)),e.minFilter!==THREE.NearestFilter&&e.minFilter!==THREE.LinearFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",e)),i=ae.get("EXT_texture_filter_anisotropic")){if(e.type===THREE.FloatType&&null===ae.get("OES_texture_float_linear"))return;if(e.type===THREE.HalfFloatType&&null===ae.get("OES_texture_half_float_linear"))return;(e.anisotropy>1||ce.get(e).__currentAnisotropy)&&(re.texParameterf(t,i.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(e.anisotropy,Rt.getMaxAnisotropy())),ce.get(e).__currentAnisotropy=e.anisotropy)}}function k(t,e,r){void 0===t.__webglInit&&(t.__webglInit=!0,e.addEventListener("dispose",o),t.__webglTexture=re.createTexture(),te.textures++),se.activeTexture(re.TEXTURE0+r),se.bindTexture(re.TEXTURE_2D,t.__webglTexture),re.pixelStorei(re.UNPACK_FLIP_Y_WEBGL,e.flipY),re.pixelStorei(re.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),re.pixelStorei(re.UNPACK_ALIGNMENT,e.unpackAlignment);var i=W(e.image,oe.maxTextureSize);q(e)&&X(i)===!1&&(i=Y(i));var n=X(i),a=nt(e.format),s=nt(e.type);z(re.TEXTURE_2D,e,n);var c,h=e.mipmaps;if(e instanceof THREE.DepthTexture){var l=re.DEPTH_COMPONENT;if(e.type===THREE.FloatType){if(!ne)throw new Error("Float Depth Texture only supported in WebGL2.0");l=re.DEPTH_COMPONENT32F}else ne&&(l=re.DEPTH_COMPONENT16);se.texImage2D(re.TEXTURE_2D,0,l,i.width,i.height,0,a,s,null)}else if(e instanceof THREE.DataTexture)if(h.length>0&&n){for(var u=0,p=h.length;u-1?se.compressedTexImage2D(re.TEXTURE_2D,u,a,c.width,c.height,0,c.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):se.texImage2D(re.TEXTURE_2D,u,a,c.width,c.height,0,a,s,c.data);else if(h.length>0&&n){for(var u=0,p=h.length;u0&&r.__version!==t.version){var i=t.image;return void 0===i?void console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",t):i.complete===!1?void console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",t):void k(r,t,e)}se.activeTexture(re.TEXTURE0+e),se.bindTexture(re.TEXTURE_2D,r.__webglTexture)}function W(t,e){if(t.width>e||t.height>e){var r=e/Math.max(t.width,t.height),i=document.createElement("canvas");i.width=Math.floor(t.width*r),i.height=Math.floor(t.height*r);var n=i.getContext("2d");return n.drawImage(t,0,0,t.width,t.height,0,0,i.width,i.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+i.width+"x"+i.height,t),i}return t}function X(t){return THREE.Math.isPowerOfTwo(t.width)&&THREE.Math.isPowerOfTwo(t.height)}function q(t){return t.wrapS!==THREE.ClampToEdgeWrapping||t.wrapT!==THREE.ClampToEdgeWrapping||t.minFilter!==THREE.NearestFilter&&t.minFilter!==THREE.LinearFilter}function Y(t){if(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement){var e=document.createElement("canvas");e.width=THREE.Math.nearestPowerOfTwo(t.width),e.height=THREE.Math.nearestPowerOfTwo(t.height);var r=e.getContext("2d");return r.drawImage(t,0,0,e.width,e.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+e.width+"x"+e.height,t),e}return t}function Z(t,e){var r=ce.get(t);if(6===t.image.length)if(t.version>0&&r.__version!==t.version){r.__image__webglTextureCube||(t.addEventListener("dispose",o),r.__image__webglTextureCube=re.createTexture(),te.textures++),se.activeTexture(re.TEXTURE0+e),se.bindTexture(re.TEXTURE_CUBE_MAP,r.__image__webglTextureCube),re.pixelStorei(re.UNPACK_FLIP_Y_WEBGL,t.flipY);for(var i=t instanceof THREE.CompressedTexture,n=t.image[0]instanceof THREE.DataTexture,a=[],s=0;s<6;s++)!Rt.autoScaleCubemaps||i||n?a[s]=n?t.image[s].image:t.image[s]:a[s]=W(t.image[s],oe.maxCubemapSize);var c=a[0],h=X(c),l=nt(t.format),u=nt(t.type);z(re.TEXTURE_CUBE_MAP,t,h);for(var s=0;s<6;s++)if(i)for(var p,d=a[s].mipmaps,E=0,f=d.length;E-1?se.compressedTexImage2D(re.TEXTURE_CUBE_MAP_POSITIVE_X+s,E,l,p.width,p.height,0,p.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setCubeTexture()"):se.texImage2D(re.TEXTURE_CUBE_MAP_POSITIVE_X+s,E,l,p.width,p.height,0,l,u,p.data);else n?se.texImage2D(re.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,l,a[s].width,a[s].height,0,l,u,a[s].data):se.texImage2D(re.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,l,l,u,a[s]);t.generateMipmaps&&h&&re.generateMipmap(re.TEXTURE_CUBE_MAP),r.__version=t.version,t.onUpdate&&t.onUpdate(t)}else se.activeTexture(re.TEXTURE0+e),se.bindTexture(re.TEXTURE_CUBE_MAP,r.__image__webglTextureCube)}function K(t,e){se.activeTexture(re.TEXTURE0+e),se.bindTexture(re.TEXTURE_CUBE_MAP,ce.get(t).__webglTexture)}function Q(t,e,r,i){var n=nt(e.texture.format),a=nt(e.texture.type);se.texImage2D(i,0,n,e.width,e.height,0,n,a,null),re.bindFramebuffer(re.FRAMEBUFFER,t),re.framebufferTexture2D(re.FRAMEBUFFER,r,i,ce.get(e.texture).__webglTexture,0),re.bindFramebuffer(re.FRAMEBUFFER,null)}function J(t,e){re.bindRenderbuffer(re.RENDERBUFFER,t),e.depthBuffer&&!e.stencilBuffer?(re.renderbufferStorage(re.RENDERBUFFER,re.DEPTH_COMPONENT16,e.width,e.height),re.framebufferRenderbuffer(re.FRAMEBUFFER,re.DEPTH_ATTACHMENT,re.RENDERBUFFER,t)):e.depthBuffer&&e.stencilBuffer?(re.renderbufferStorage(re.RENDERBUFFER,re.DEPTH_STENCIL,e.width,e.height),re.framebufferRenderbuffer(re.FRAMEBUFFER,re.DEPTH_STENCIL_ATTACHMENT,re.RENDERBUFFER,t)):re.renderbufferStorage(re.RENDERBUFFER,re.RGBA4,e.width,e.height),re.bindRenderbuffer(re.RENDERBUFFER,null)}function $(t,e){var r=e instanceof THREE.WebGLRenderTargetCube;if(r)throw new Error("Depth Texture with cube render targets is not supported!");if(re.bindFramebuffer(re.FRAMEBUFFER,t),!(e.depthTexture instanceof THREE.DepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");ce.get(e.depthTexture).__webglTexture&&e.depthTexture.image.width===e.width&&e.depthTexture.image.height===e.height||(e.depthTexture.image.width=e.width,e.depthTexture.image.height=e.height,e.depthTexture.needsUpdate=!0),Rt.setTexture(e.depthTexture,0);var i=ce.get(e.depthTexture).__webglTexture;re.framebufferTexture2D(re.FRAMEBUFFER,re.DEPTH_ATTACHMENT,re.TEXTURE_2D,i,0)}function tt(t){var e=ce.get(t),r=t instanceof THREE.WebGLRenderTargetCube;if(t.depthTexture){if(r)throw new Error("target.depthTexture not supported in Cube render targets");$(e.__webglFramebuffer,t)}else if(r){e.__webglDepthbuffer=[];for(var i=0;i<6;i++)re.bindFramebuffer(re.FRAMEBUFFER,e.__webglFramebuffer[i]),e.__webglDepthbuffer[i]=re.createRenderbuffer(),J(e.__webglDepthbuffer[i],t)}else re.bindFramebuffer(re.FRAMEBUFFER,e.__webglFramebuffer),e.__webglDepthbuffer=re.createRenderbuffer(),J(e.__webglDepthbuffer,t);re.bindFramebuffer(re.FRAMEBUFFER,null)}function et(t){var e=ce.get(t),r=ce.get(t.texture);t.addEventListener("dispose",s),r.__webglTexture=re.createTexture(),te.textures++;var i=t instanceof THREE.WebGLRenderTargetCube,n=THREE.Math.isPowerOfTwo(t.width)&&THREE.Math.isPowerOfTwo(t.height);if(i){e.__webglFramebuffer=[];for(var a=0;a<6;a++)e.__webglFramebuffer[a]=re.createFramebuffer()}else e.__webglFramebuffer=re.createFramebuffer();if(i){se.bindTexture(re.TEXTURE_CUBE_MAP,r.__webglTexture),z(re.TEXTURE_CUBE_MAP,t.texture,n);for(var a=0;a<6;a++)Q(e.__webglFramebuffer[a],t,re.COLOR_ATTACHMENT0,re.TEXTURE_CUBE_MAP_POSITIVE_X+a);t.texture.generateMipmaps&&n&&re.generateMipmap(re.TEXTURE_CUBE_MAP),se.bindTexture(re.TEXTURE_CUBE_MAP,null)}else se.bindTexture(re.TEXTURE_2D,r.__webglTexture),z(re.TEXTURE_2D,t.texture,n),Q(e.__webglFramebuffer,t,re.COLOR_ATTACHMENT0,re.TEXTURE_2D),t.texture.generateMipmaps&&n&&re.generateMipmap(re.TEXTURE_2D),se.bindTexture(re.TEXTURE_2D,null);t.depthBuffer&&tt(t)}function rt(t){var e=t instanceof THREE.WebGLRenderTargetCube?re.TEXTURE_CUBE_MAP:re.TEXTURE_2D,r=ce.get(t.texture).__webglTexture;se.bindTexture(e,r),re.generateMipmap(e),se.bindTexture(e,null)}function it(t){return t===THREE.NearestFilter||t===THREE.NearestMipMapNearestFilter||t===THREE.NearestMipMapLinearFilter?re.NEAREST:re.LINEAR}function nt(t){var e;if(t===THREE.RepeatWrapping)return re.REPEAT;if(t===THREE.ClampToEdgeWrapping)return re.CLAMP_TO_EDGE;if(t===THREE.MirroredRepeatWrapping)return re.MIRRORED_REPEAT;if(t===THREE.NearestFilter)return re.NEAREST;if(t===THREE.NearestMipMapNearestFilter)return re.NEAREST_MIPMAP_NEAREST;if(t===THREE.NearestMipMapLinearFilter)return re.NEAREST_MIPMAP_LINEAR;if(t===THREE.LinearFilter)return re.LINEAR;if(t===THREE.LinearMipMapNearestFilter)return re.LINEAR_MIPMAP_NEAREST;if(t===THREE.LinearMipMapLinearFilter)return re.LINEAR_MIPMAP_LINEAR;if(t===THREE.UnsignedByteType)return re.UNSIGNED_BYTE;if(t===THREE.UnsignedShort4444Type)return re.UNSIGNED_SHORT_4_4_4_4;if(t===THREE.UnsignedShort5551Type)return re.UNSIGNED_SHORT_5_5_5_1;if(t===THREE.UnsignedShort565Type)return re.UNSIGNED_SHORT_5_6_5;if(t===THREE.ByteType)return re.BYTE;if(t===THREE.ShortType)return re.SHORT;if(t===THREE.UnsignedShortType)return re.UNSIGNED_SHORT;if(t===THREE.IntType)return re.INT;if(t===THREE.UnsignedIntType)return re.UNSIGNED_INT;if(t===THREE.FloatType)return re.FLOAT;if(e=ae.get("OES_texture_half_float"),null!==e&&t===THREE.HalfFloatType)return e.HALF_FLOAT_OES;if(t===THREE.AlphaFormat)return re.ALPHA;if(t===THREE.RGBFormat)return re.RGB;if(t===THREE.RGBAFormat)return re.RGBA;if(t===THREE.LuminanceFormat)return re.LUMINANCE;if(t===THREE.LuminanceAlphaFormat)return re.LUMINANCE_ALPHA;if(t===THREE.DepthFormat)return re.DEPTH_COMPONENT;if(t===THREE.AddEquation)return re.FUNC_ADD;if(t===THREE.SubtractEquation)return re.FUNC_SUBTRACT;if(t===THREE.ReverseSubtractEquation)return re.FUNC_REVERSE_SUBTRACT;if(t===THREE.ZeroFactor)return re.ZERO;if(t===THREE.OneFactor)return re.ONE;if(t===THREE.SrcColorFactor)return re.SRC_COLOR;if(t===THREE.OneMinusSrcColorFactor)return re.ONE_MINUS_SRC_COLOR;if(t===THREE.SrcAlphaFactor)return re.SRC_ALPHA;if(t===THREE.OneMinusSrcAlphaFactor)return re.ONE_MINUS_SRC_ALPHA;if(t===THREE.DstAlphaFactor)return re.DST_ALPHA;if(t===THREE.OneMinusDstAlphaFactor)return re.ONE_MINUS_DST_ALPHA;if(t===THREE.DstColorFactor)return re.DST_COLOR;if(t===THREE.OneMinusDstColorFactor)return re.ONE_MINUS_DST_COLOR;if(t===THREE.SrcAlphaSaturateFactor)return re.SRC_ALPHA_SATURATE;if(e=ae.get("WEBGL_compressed_texture_s3tc"),null!==e){if(t===THREE.RGB_S3TC_DXT1_Format)return e.COMPRESSED_RGB_S3TC_DXT1_EXT;if(t===THREE.RGBA_S3TC_DXT1_Format)return e.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(t===THREE.RGBA_S3TC_DXT3_Format)return e.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(t===THREE.RGBA_S3TC_DXT5_Format)return e.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(e=ae.get("WEBGL_compressed_texture_pvrtc"),null!==e){if(t===THREE.RGB_PVRTC_4BPPV1_Format)return e.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(t===THREE.RGB_PVRTC_2BPPV1_Format)return e.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(t===THREE.RGBA_PVRTC_4BPPV1_Format)return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(t===THREE.RGBA_PVRTC_2BPPV1_Format)return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(e=ae.get("WEBGL_compressed_texture_etc1"),null!==e&&t===THREE.RGB_ETC1_Format)return e.COMPRESSED_RGB_ETC1_WEBGL;if(e=ae.get("EXT_blend_minmax"),null!==e){if(t===THREE.MinEquation)return e.MIN_EXT;if(t===THREE.MaxEquation)return e.MAX_EXT}return 0}console.log("THREE.WebGLRenderer",THREE.REVISION),t=t||{};var at=void 0!==t.canvas?t.canvas:document.createElement("canvas"),ot=void 0!==t.context?t.context:null,st=void 0!==t.alpha&&t.alpha,ct=void 0===t.depth||t.depth,ht=void 0===t.stencil||t.stencil,lt=void 0!==t.antialias&&t.antialias,ut=void 0===t.premultipliedAlpha||t.premultipliedAlpha,pt=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,dt=[],Et=[],ft=-1,mt=[],gt=-1,vt=new Float32Array(8),Tt=[],yt=[];this.domElement=at,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=THREE.LinearToneMapping,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4,this.autoScaleCubemaps=!0;var Rt=this,Ht=null,xt=null,bt=null,_t=-1,Mt="",wt=null,St=new THREE.Vector4,Lt=null,At=new THREE.Vector4,Ct=0,Pt=new THREE.Color(0),Bt=0,Dt=at.width,It=at.height,Ut=1,Ft=new THREE.Vector4(0,0,Dt,It),Nt=!1,Ot=new THREE.Vector4(0,0,Dt,It),Vt=new THREE.Frustum,Gt=!1,zt=!1,kt=!1,jt=0,Wt={type:"4fv",value:null,needsUpdate:!1},Xt=null,qt=0,Yt=new THREE.Matrix3,Zt=new THREE.Sphere,Kt=new THREE.Plane,Qt=new THREE.Matrix4,Jt=new THREE.Vector3,$t={hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],point:[],pointShadowMap:[], +pointShadowMatrix:[],hemi:[],shadows:[]},te={geometries:0,textures:0},ee={calls:0,vertices:0,faces:0,points:0};this.info={render:ee,memory:te,programs:null};var re;try{var ie={alpha:st,depth:ct,stencil:ht,antialias:lt,premultipliedAlpha:ut,preserveDrawingBuffer:pt};if(re=ot||at.getContext("webgl",ie)||at.getContext("experimental-webgl",ie),null===re)throw null!==at.getContext("webgl")?"Error creating WebGL context with your selected attributes.":"Error creating WebGL context.";void 0===re.getShaderPrecisionFormat&&(re.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}}),at.addEventListener("webglcontextlost",a,!1)}catch(t){console.error("THREE.WebGLRenderer: "+t)}var ne="undefined"!=typeof WebGL2RenderingContext&&re instanceof WebGL2RenderingContext,ae=new THREE.WebGLExtensions(re);ae.get("WEBGL_depth_texture"),ae.get("OES_texture_float"),ae.get("OES_texture_float_linear"),ae.get("OES_texture_half_float"),ae.get("OES_texture_half_float_linear"),ae.get("OES_standard_derivatives"),ae.get("ANGLE_instanced_arrays"),ae.get("OES_element_index_uint")&&(THREE.BufferGeometry.MaxIndex=4294967296);var oe=new THREE.WebGLCapabilities(re,ae,t),se=new THREE.WebGLState(re,ae,nt),ce=new THREE.WebGLProperties,he=new THREE.WebGLObjects(re,ce,this.info),le=new THREE.WebGLPrograms(this,oe),ue=new THREE.WebGLLights;this.info.programs=le.programs;var pe=new THREE.WebGLBufferRenderer(re,ae,ee),de=new THREE.WebGLIndexedBufferRenderer(re,ae,ee);i(),this.context=re,this.capabilities=oe,this.extensions=ae,this.properties=ce,this.state=se;var Ee=new THREE.WebGLShadowMap(this,$t,he);this.shadowMap=Ee;var fe=new THREE.SpritePlugin(this,Tt),me=new THREE.LensFlarePlugin(this,yt);this.getContext=function(){return re},this.getContextAttributes=function(){return re.getContextAttributes()},this.forceContextLoss=function(){ae.get("WEBGL_lose_context").loseContext()},this.getMaxAnisotropy=function(){var t;return function(){if(void 0!==t)return t;var e=ae.get("EXT_texture_filter_anisotropic");return t=null!==e?re.getParameter(e.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}}(),this.getPrecision=function(){return oe.precision},this.getPixelRatio=function(){return Ut},this.setPixelRatio=function(t){void 0!==t&&(Ut=t,this.setSize(Ot.z,Ot.w,!1))},this.getSize=function(){return{width:Dt,height:It}},this.setSize=function(t,e,r){Dt=t,It=e,at.width=t*Ut,at.height=e*Ut,r!==!1&&(at.style.width=t+"px",at.style.height=e+"px"),this.setViewport(0,0,t,e)},this.setViewport=function(t,e,r,i){se.viewport(Ot.set(t,e,r,i))},this.setScissor=function(t,e,r,i){se.scissor(Ft.set(t,e,r,i))},this.setScissorTest=function(t){se.setScissorTest(Nt=t)},this.getClearColor=function(){return Pt},this.setClearColor=function(t,e){Pt.set(t),Bt=void 0!==e?e:1,r(Pt.r,Pt.g,Pt.b,Bt)},this.getClearAlpha=function(){return Bt},this.setClearAlpha=function(t){Bt=t,r(Pt.r,Pt.g,Pt.b,Bt)},this.clear=function(t,e,r){var i=0;(void 0===t||t)&&(i|=re.COLOR_BUFFER_BIT),(void 0===e||e)&&(i|=re.DEPTH_BUFFER_BIT),(void 0===r||r)&&(i|=re.STENCIL_BUFFER_BIT),re.clear(i)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,r,i){this.setRenderTarget(t),this.clear(e,r,i)},this.resetGLState=n,this.dispose=function(){at.removeEventListener("webglcontextlost",a,!1)},this.renderBufferImmediate=function(t,e,r){se.initAttributes();var i=ce.get(t);t.hasPositions&&!i.position&&(i.position=re.createBuffer()),t.hasNormals&&!i.normal&&(i.normal=re.createBuffer()),t.hasUvs&&!i.uv&&(i.uv=re.createBuffer()),t.hasColors&&!i.color&&(i.color=re.createBuffer());var n=e.getAttributes();if(t.hasPositions&&(re.bindBuffer(re.ARRAY_BUFFER,i.position),re.bufferData(re.ARRAY_BUFFER,t.positionArray,re.DYNAMIC_DRAW),se.enableAttribute(n.position),re.vertexAttribPointer(n.position,3,re.FLOAT,!1,0,0)),t.hasNormals){if(re.bindBuffer(re.ARRAY_BUFFER,i.normal),"MeshPhongMaterial"!==r.type&&"MeshStandardMaterial"!==r.type&&"MeshPhysicalMaterial"!==r.type&&r.shading===THREE.FlatShading)for(var a=0,o=3*t.count;a8&&(u.length=8);for(var g=i.morphAttributes,p=0,f=u.length;p0&&y.renderInstances(i,L,C):y.render(L,C)},this.render=function(t,e,r,i){if(e instanceof THREE.Camera==!1)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");var n=t.fog;if(Mt="",_t=-1,wt=null,t.autoUpdate===!0&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),e.matrixWorldInverse.getInverse(e.matrixWorld),Qt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),Vt.setFromMatrix(Qt),dt.length=0,ft=-1,gt=-1,Tt.length=0,yt.length=0,F(this.clippingPlanes,e),T(t,e),Et.length=ft+1,mt.length=gt+1,Rt.sortObjects===!0&&(Et.sort(f),mt.sort(m)),Gt&&(kt=!0,N(null)),I(dt),Ee.render(t,e),U(dt,e),Gt&&(kt=!1,O()),ee.calls=0,ee.vertices=0,ee.faces=0,ee.points=0,void 0===r&&(r=null),this.setRenderTarget(r),(this.autoClear||i)&&this.clear(this.autoClearColor,this.autoClearDepth,this.autoClearStencil),t.overrideMaterial){var a=t.overrideMaterial;y(Et,e,n,a),y(mt,e,n,a)}else se.setBlending(THREE.NoBlending),y(Et,e,n),y(mt,e,n);if(fe.render(t,e),me.render(t,e,At),r){var o=r.texture;o.generateMipmaps&&X(r)&&o.minFilter!==THREE.NearestFilter&&o.minFilter!==THREE.LinearFilter&&rt(r)}se.setDepthTest(!0),se.setDepthWrite(!0),se.setColorWrite(!0)},this.setFaceCulling=function(t,e){t===THREE.CullFaceNone?se.disable(re.CULL_FACE):(e===THREE.FrontFaceDirectionCW?re.frontFace(re.CW):re.frontFace(re.CCW),t===THREE.CullFaceBack?re.cullFace(re.BACK):t===THREE.CullFaceFront?re.cullFace(re.FRONT):re.cullFace(re.FRONT_AND_BACK),se.enable(re.CULL_FACE))};var ge=!1;this.setTexture=function(t,e){ge||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),ge=!0),j(t,e)},this.allocTextureUnit=G,this.setTexture2D=j,this.setTextureCube=function(t,e){t instanceof THREE.CubeTexture||Array.isArray(t.image)&&6===t.image.length?Z(t,e):K(t.texture,e)},this.getCurrentRenderTarget=function(){return xt},this.setRenderTarget=function(t){xt=t,t&&void 0===ce.get(t).__webglFramebuffer&&et(t);var e,r=t instanceof THREE.WebGLRenderTargetCube;if(t){var i=ce.get(t);e=r?i.__webglFramebuffer[t.activeCubeFace]:i.__webglFramebuffer,St.copy(t.scissor),Lt=t.scissorTest,At.copy(t.viewport)}else e=null,St.copy(Ft).multiplyScalar(Ut),Lt=Nt,At.copy(Ot).multiplyScalar(Ut);if(bt!==e&&(re.bindFramebuffer(re.FRAMEBUFFER,e),bt=e),se.scissor(St),se.setScissorTest(Lt),se.viewport(At),r){var n=ce.get(t.texture);re.framebufferTexture2D(re.FRAMEBUFFER,re.COLOR_ATTACHMENT0,re.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,n.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,r,i,n,a){if(t instanceof THREE.WebGLRenderTarget==!1)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");var o=ce.get(t).__webglFramebuffer;if(o){var s=!1;o!==bt&&(re.bindFramebuffer(re.FRAMEBUFFER,o),s=!0);try{var c=t.texture;if(c.format!==THREE.RGBAFormat&&nt(c.format)!==re.getParameter(re.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(c.type===THREE.UnsignedByteType||nt(c.type)===re.getParameter(re.IMPLEMENTATION_COLOR_READ_TYPE)||c.type===THREE.FloatType&&ae.get("WEBGL_color_buffer_float")||c.type===THREE.HalfFloatType&&ae.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");re.checkFramebufferStatus(re.FRAMEBUFFER)===re.FRAMEBUFFER_COMPLETE?e>0&&e<=t.width-i&&r>0&&r<=t.height-n&&re.readPixels(e,r,i,n,nt(c.format),nt(c.type),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&re.bindFramebuffer(re.FRAMEBUFFER,bt)}}}},THREE.WebGLRenderTarget=function(t,e,r){this.uuid=THREE.Math.generateUUID(),this.width=t,this.height=e,this.scissor=new THREE.Vector4(0,0,t,e),this.scissorTest=!1,this.viewport=new THREE.Vector4(0,0,t,e),r=r||{},void 0===r.minFilter&&(r.minFilter=THREE.LinearFilter),this.texture=new THREE.Texture((void 0),(void 0),r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.depthBuffer=void 0===r.depthBuffer||r.depthBuffer,this.stencilBuffer=void 0===r.stencilBuffer||r.stencilBuffer,this.depthTexture=null},THREE.WebGLRenderTarget.prototype={constructor:THREE.WebGLRenderTarget,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}},THREE.EventDispatcher.prototype.apply(THREE.WebGLRenderTarget.prototype),THREE.WebGLRenderTargetCube=function(t,e,r){THREE.WebGLRenderTarget.call(this,t,e,r),this.activeCubeFace=0,this.activeMipMapLevel=0},THREE.WebGLRenderTargetCube.prototype=Object.create(THREE.WebGLRenderTarget.prototype),THREE.WebGLRenderTargetCube.prototype.constructor=THREE.WebGLRenderTargetCube,THREE.WebGLBufferRenderer=function(t,e,r){function i(t){o=t}function n(e,i){t.drawArrays(o,e,i),r.calls++,r.vertices+=i,o===t.TRIANGLES&&(r.faces+=i/3)}function a(i){var n=e.get("ANGLE_instanced_arrays");if(null===n)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");var a=i.attributes.position,s=0;a instanceof THREE.InterleavedBufferAttribute?(s=a.data.count,n.drawArraysInstancedANGLE(o,0,s,i.maxInstancedCount)):(s=a.count,n.drawArraysInstancedANGLE(o,0,s,i.maxInstancedCount)),r.calls++,r.vertices+=s*i.maxInstancedCount,o===t.TRIANGLES&&(r.faces+=i.maxInstancedCount*s/3)}var o;this.setMode=i,this.render=n,this.renderInstances=a},THREE.WebGLIndexedBufferRenderer=function(t,e,r){function i(t){s=t}function n(r){r.array instanceof Uint32Array&&e.get("OES_element_index_uint")?(c=t.UNSIGNED_INT,h=4):(c=t.UNSIGNED_SHORT,h=2)}function a(e,i){t.drawElements(s,i,c,e*h),r.calls++,r.vertices+=i,s===t.TRIANGLES&&(r.faces+=i/3)}function o(i,n,a){var o=e.get("ANGLE_instanced_arrays");return null===o?void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays."):(o.drawElementsInstancedANGLE(s,a,c,n*h,i.maxInstancedCount),r.calls++,r.vertices+=a*i.maxInstancedCount,void(s===t.TRIANGLES&&(r.faces+=i.maxInstancedCount*a/3)))}var s,c,h;this.setMode=i,this.setIndex=n,this.render=a,this.renderInstances=o},THREE.WebGLExtensions=function(t){var e={};this.get=function(r){if(void 0!==e[r])return e[r];var i;switch(r){case"WEBGL_depth_texture":i=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");case"EXT_texture_filter_anisotropic":i=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;case"WEBGL_compressed_texture_etc1":i=t.getExtension("WEBGL_compressed_texture_etc1");break;default:i=t.getExtension(r)}return null===i&&console.warn("THREE.WebGLRenderer: "+r+" extension not supported."),e[r]=i,i}},THREE.WebGLCapabilities=function(t,e,r){function i(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}this.getMaxPrecision=i,this.precision=void 0!==r.precision?r.precision:"highp",this.logarithmicDepthBuffer=void 0!==r.logarithmicDepthBuffer&&r.logarithmicDepthBuffer,this.maxTextures=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),this.maxVertexTextures=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this.maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),this.maxCubemapSize=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),this.maxAttributes=t.getParameter(t.MAX_VERTEX_ATTRIBS),this.maxVertexUniforms=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),this.maxVaryings=t.getParameter(t.MAX_VARYING_VECTORS),this.maxFragmentUniforms=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),this.vertexTextures=this.maxVertexTextures>0,this.floatFragmentTextures=!!e.get("OES_texture_float"),this.floatVertexTextures=this.vertexTextures&&this.floatFragmentTextures;var n=i(this.precision);n!==this.precision&&(console.warn("THREE.WebGLRenderer:",this.precision,"not supported, using",n,"instead."),this.precision=n),this.logarithmicDepthBuffer&&(this.logarithmicDepthBuffer=!!e.get("EXT_frag_depth"))},THREE.WebGLGeometries=function(t,e,r){function i(t){var e=t.geometry;if(void 0!==h[e.id])return h[e.id];e.addEventListener("dispose",n);var i;return e instanceof THREE.BufferGeometry?i=e:e instanceof THREE.Geometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new THREE.BufferGeometry).setFromObject(t)),i=e._bufferGeometry),h[e.id]=i,r.memory.geometries++,i}function n(t){var i=t.target,a=h[i.id];null!==a.index&&o(a.index),s(a.attributes),i.removeEventListener("dispose",n),delete h[i.id];var c=e.get(i);c.wireframe&&o(c.wireframe),e.delete(i);var l=e.get(a);l.wireframe&&o(l.wireframe),e.delete(a),r.memory.geometries--}function a(t){return t instanceof THREE.InterleavedBufferAttribute?e.get(t.data).__webglBuffer:e.get(t).__webglBuffer}function o(e){var r=a(e);void 0!==r&&(t.deleteBuffer(r),c(e))}function s(t){for(var e in t)o(t[e])}function c(t){t instanceof THREE.InterleavedBufferAttribute?e.delete(t.data):e.delete(t)}var h={};this.get=i},THREE.WebGLLights=function(){var t={};this.get=function(e){if(void 0!==t[e.id])return t[e.id];var r;switch(e.type){case"DirectionalLight":r={direction:new THREE.Vector3,color:new THREE.Color,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new THREE.Vector2};break;case"SpotLight":r={position:new THREE.Vector3,direction:new THREE.Vector3,color:new THREE.Color,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new THREE.Vector2};break;case"PointLight":r={position:new THREE.Vector3,color:new THREE.Color,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new THREE.Vector2};break;case"HemisphereLight":r={direction:new THREE.Vector3,skyColor:new THREE.Color,groundColor:new THREE.Color}}return t[e.id]=r,r}},THREE.WebGLObjects=function(t,e,r){function i(e){var r=l.get(e);e.geometry instanceof THREE.Geometry&&r.updateFromObject(e);var i=r.index,a=r.attributes;null!==i&&n(i,t.ELEMENT_ARRAY_BUFFER);for(var o in a)n(a[o],t.ARRAY_BUFFER);var s=r.morphAttributes;for(var o in s)for(var c=s[o],h=0,u=c.length;h65535?Uint32Array:Uint16Array,v=new THREE.BufferAttribute(new g(a),1);return n(v,t.ELEMENT_ARRAY_BUFFER),i.wireframe=v,v}function h(t,e,r){if(e>r){var i=e;e=r,r=i}var n=t[e];return void 0===n?(t[e]=[r],!0):n.indexOf(r)===-1&&(n.push(r),!0)}var l=new THREE.WebGLGeometries(t,e,r);this.getAttributeBuffer=s,this.getWireframeAttribute=c,this.update=i},THREE.WebGLProgram=function(){function t(t){switch(t){case THREE.LinearEncoding:return["Linear","( value )"];case THREE.sRGBEncoding:return["sRGB","( value )"];case THREE.RGBEEncoding:return["RGBE","( value )"];case THREE.RGBM7Encoding:return["RGBM","( value, 7.0 )"];case THREE.RGBM16Encoding:return["RGBM","( value, 16.0 )"];case THREE.RGBDEncoding:return["RGBD","( value, 256.0 )"];case THREE.GammaEncoding:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function e(e,r){var i=t(r);return"vec4 "+e+"( vec4 value ) { return "+i[0]+"ToLinear"+i[1]+"; }"}function r(e,r){var i=t(r);return"vec4 "+e+"( vec4 value ) { return LinearTo"+i[0]+i[1]+"; }"}function i(t,e){var r;switch(e){case THREE.LinearToneMapping:r="Linear";break;case THREE.ReinhardToneMapping:r="Reinhard";break;case THREE.Uncharted2ToneMapping:r="Uncharted2";break;case THREE.CineonToneMapping:r="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function n(t,e,r){t=t||{};var i=[t.derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&r.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&r.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&r.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""];return i.filter(s).join("\n")}function a(t){var e=[];for(var r in t){var i=t[r];i!==!1&&e.push("#define "+r+" "+i)}return e.join("\n")}function o(t,e,r){for(var i={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),a=0;a");return h(r)}var r=/#include +<([\w\d.]+)>/g;return t.replace(r,e)}function l(t){function e(t,e,r,i){for(var n="",a=parseInt(e);a0?t.gammaFactor:1,w=n(m,E,t.extensions),S=a(g),L=f.createProgram();d instanceof THREE.RawShaderMaterial?(b="",_=""):(b=["precision "+E.precision+" float;","precision "+E.precision+" int;","#define SHADER_NAME "+d.__webglShader.name,S,E.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+M,"#define MAX_BONES "+E.maxBones,E.map?"#define USE_MAP":"",E.envMap?"#define USE_ENVMAP":"",E.envMap?"#define "+H:"",E.lightMap?"#define USE_LIGHTMAP":"",E.aoMap?"#define USE_AOMAP":"",E.emissiveMap?"#define USE_EMISSIVEMAP":"",E.bumpMap?"#define USE_BUMPMAP":"",E.normalMap?"#define USE_NORMALMAP":"",E.displacementMap&&E.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",E.specularMap?"#define USE_SPECULARMAP":"",E.roughnessMap?"#define USE_ROUGHNESSMAP":"",E.metalnessMap?"#define USE_METALNESSMAP":"",E.alphaMap?"#define USE_ALPHAMAP":"",E.vertexColors?"#define USE_COLOR":"",E.flatShading?"#define FLAT_SHADED":"",E.skinning?"#define USE_SKINNING":"",E.useVertexTexture?"#define BONE_TEXTURE":"",E.morphTargets?"#define USE_MORPHTARGETS":"",E.morphNormals&&E.flatShading===!1?"#define USE_MORPHNORMALS":"",E.doubleSided?"#define DOUBLE_SIDED":"",E.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+E.numClippingPlanes,E.shadowMapEnabled?"#define USE_SHADOWMAP":"",E.shadowMapEnabled?"#define "+y:"",E.sizeAttenuation?"#define USE_SIZEATTENUATION":"",E.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",E.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(s).join("\n"),_=[w,"precision "+E.precision+" float;","precision "+E.precision+" int;","#define SHADER_NAME "+d.__webglShader.name,S,E.alphaTest?"#define ALPHATEST "+E.alphaTest:"","#define GAMMA_FACTOR "+M,E.useFog&&E.fog?"#define USE_FOG":"",E.useFog&&E.fogExp?"#define FOG_EXP2":"",E.map?"#define USE_MAP":"",E.envMap?"#define USE_ENVMAP":"",E.envMap?"#define "+R:"",E.envMap?"#define "+H:"",E.envMap?"#define "+x:"",E.lightMap?"#define USE_LIGHTMAP":"",E.aoMap?"#define USE_AOMAP":"",E.emissiveMap?"#define USE_EMISSIVEMAP":"",E.bumpMap?"#define USE_BUMPMAP":"",E.normalMap?"#define USE_NORMALMAP":"",E.specularMap?"#define USE_SPECULARMAP":"",E.roughnessMap?"#define USE_ROUGHNESSMAP":"",E.metalnessMap?"#define USE_METALNESSMAP":"",E.alphaMap?"#define USE_ALPHAMAP":"",E.vertexColors?"#define USE_COLOR":"",E.flatShading?"#define FLAT_SHADED":"",E.doubleSided?"#define DOUBLE_SIDED":"",E.flipSided?"#define FLIP_SIDED":"","#define NUM_CLIPPING_PLANES "+E.numClippingPlanes,E.shadowMapEnabled?"#define USE_SHADOWMAP":"",E.shadowMapEnabled?"#define "+y:"",E.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",E.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",E.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",E.logarithmicDepthBuffer&&t.extensions.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",E.envMap&&t.extensions.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",E.toneMapping!==THREE.NoToneMapping?"#define TONE_MAPPING":"",E.toneMapping!==THREE.NoToneMapping?THREE.ShaderChunk.tonemapping_pars_fragment:"",E.toneMapping!==THREE.NoToneMapping?i("toneMapping",E.toneMapping):"",E.outputEncoding||E.mapEncoding||E.envMapEncoding||E.emissiveMapEncoding?THREE.ShaderChunk.encodings_pars_fragment:"",E.mapEncoding?e("mapTexelToLinear",E.mapEncoding):"",E.envMapEncoding?e("envMapTexelToLinear",E.envMapEncoding):"",E.emissiveMapEncoding?e("emissiveMapTexelToLinear",E.emissiveMapEncoding):"",E.outputEncoding?r("linearToOutputTexel",E.outputEncoding):"",E.depthPacking?"#define DEPTH_PACKING "+d.depthPacking:"","\n"].filter(s).join("\n")),v=h(v,E),v=c(v,E),T=h(T,E),T=c(T,E),d instanceof THREE.ShaderMaterial==!1&&(v=l(v),T=l(T));var A=b+v,C=_+T,P=THREE.WebGLShader(f,f.VERTEX_SHADER,A),B=THREE.WebGLShader(f,f.FRAGMENT_SHADER,C);f.attachShader(L,P),f.attachShader(L,B),void 0!==d.index0AttributeName?f.bindAttribLocation(L,0,d.index0AttributeName):E.morphTargets===!0&&f.bindAttribLocation(L,0,"position"),f.linkProgram(L);var D=f.getProgramInfoLog(L),I=f.getShaderInfoLog(P),U=f.getShaderInfoLog(B),F=!0,N=!0;f.getProgramParameter(L,f.LINK_STATUS)===!1?(F=!1,console.error("THREE.WebGLProgram: shader error: ",f.getError(),"gl.VALIDATE_STATUS",f.getProgramParameter(L,f.VALIDATE_STATUS),"gl.getProgramInfoLog",D,I,U)):""!==D?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",D):""!==I&&""!==U||(N=!1),N&&(this.diagnostics={runnable:F,material:d,programLog:D,vertexShader:{log:I,prefix:b},fragmentShader:{log:U,prefix:_}}),f.deleteShader(P),f.deleteShader(B);var O;this.getUniforms=function(){return void 0===O&&(O=new THREE.WebGLUniforms(f,L,t)),O};var V;return this.getAttributes=function(){return void 0===V&&(V=o(f,L)),V},this.destroy=function(){f.deleteProgram(L),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.id=u++,this.code=p,this.usedTimes=1,this.program=L,this.vertexShader=P,this.fragmentShader=B,this}}(),THREE.WebGLPrograms=function(t,e){function r(t){if(e.floatVertexTextures&&t&&t.skeleton&&t.skeleton.useVertexTexture)return 1024;var r=e.maxVertexUniforms,i=Math.floor((r-20)/4),n=i;return void 0!==t&&t instanceof THREE.SkinnedMesh&&(n=Math.min(t.skeleton.bones.length,n),n0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:n.premultipliedAlpha,alphaTest:n.alphaTest,doubleSided:n.side===THREE.DoubleSide,flipSided:n.side===THREE.BackSide,depthPacking:void 0!==n.depthPacking&&n.depthPacking};return d},this.getProgramCode=function(t,e){var r=[];if(e.shaderID?r.push(e.shaderID):(r.push(t.fragmentShader),r.push(t.vertexShader)),void 0!==t.defines)for(var i in t.defines)r.push(i),r.push(t.defines[i]);for(var n=0;n0&&r.morphTargets,l=e instanceof THREE.SkinnedMesh&&r.skinning,u=0;h&&(u|=E),l&&(u|=f),o=s[u]}if(t.localClippingEnabled&&r.clipShadows===!0&&0!==r.clippingPlanes.length){var p=o.uuid,d=r.uuid,m=T[p];void 0===m&&(m={},T[p]=m);var y=m[d];void 0===y&&(y=o.clone(),m[d]=y),o=y}return o.visible=r.visible,o.wireframe=r.wireframe,o.side=r.side,o.clipShadows=r.clipShadows,o.clippingPlanes=r.clippingPlanes,o.wireframeLinewidth=r.wireframeLinewidth,o.linewidth=r.linewidth,i&&void 0!==o.uniforms.lightPos&&o.uniforms.lightPos.value.copy(n),o}function n(t,e,r){if(t.visible!==!1){if(t.layers.test(e.layers)&&(t instanceof THREE.Mesh||t instanceof THREE.Line||t instanceof THREE.Points)&&t.castShadow&&(t.frustumCulled===!1||s.intersectsObject(t)===!0)){var i=t.material;i.visible===!0&&(t.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse,t.matrixWorld),d.push(t))}for(var a=t.children,o=0,c=a.length;o0)return t;var a=r*i,o=e[a];if(void 0===o&&(o=new Float32Array(a),e[a]=o),0!==r){n.toArray(o,0);for(var s=1,c=0;s!==r;++s)c+=i,t[s].toArray(o,c)}return o},n=function(t,e){var i=r[e];void 0===i&&(i=new Int32Array(e),r[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i},a=function(t,e){t.uniform1f(this.addr,e)},o=function(t,e){t.uniform1i(this.addr,e)},s=function(t,e){void 0===e.x?t.uniform2fv(this.addr,e):t.uniform2f(this.addr,e.x,e.y)},c=function(t,e){void 0!==e.x?t.uniform3f(this.addr,e.x,e.y,e.z):void 0!==e.r?t.uniform3f(this.addr,e.r,e.g,e.b):t.uniform3fv(this.addr,e)},h=function(t,e){void 0===e.x?t.uniform4fv(this.addr,e):t.uniform4f(this.addr,e.x,e.y,e.z,e.w)},l=function(t,e){t.uniformMatrix2fv(this.addr,!1,e.elements||e)},u=function(t,e){t.uniformMatrix3fv(this.addr,!1,e.elements||e)},p=function(t,e){t.uniformMatrix4fv(this.addr,!1,e.elements||e)},d=function(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),e&&r.setTexture2D(e,i)},E=function(t,e,r){var i=r.allocTextureUnit();t.uniform1i(this.addr,i),e&&r.setTextureCube(e,i)},f=function(t,e){t.uniform2iv(this.addr,e)},m=function(t,e){t.uniform3iv(this.addr,e)},g=function(t,e){t.uniform4iv(this.addr,e)},v=function(t){switch(t){case 5126:return a;case 35664:return s;case 35665:return c;case 35666:return h;case 35674:return l;case 35675:return u;case 35676:return p;case 35678:return d;case 35680:return E;case 5124:case 35670:return o;case 35667:case 35671:return f;case 35668:case 35672:return m;case 35669:case 35673:return g}},T=function(t,e){t.uniform1fv(this.addr,e)},y=function(t,e){t.uniform1iv(this.addr,e)},R=function(t,e){t.uniform2fv(this.addr,i(e,this.size,2))},H=function(t,e){t.uniform3fv(this.addr,i(e,this.size,3))},x=function(t,e){t.uniform4fv(this.addr,i(e,this.size,4))},b=function(t,e){t.uniformMatrix2fv(this.addr,!1,i(e,this.size,4))},_=function(t,e){t.uniformMatrix3fv(this.addr,!1,i(e,this.size,9))},M=function(t,e){t.uniformMatrix4fv(this.addr,!1,i(e,this.size,16))},w=function(t,e,r){var i=e.length,a=n(r,i);t.uniform1iv(this.addr,a);for(var o=0;o!==i;++o){var s=e[o];s&&r.setTexture2D(s,a[o])}},S=function(t,e,r){var i=e.length,a=n(r,i);t.uniform1iv(this.addr,a);for(var o=0;o!==i;++o){var s=e[o];s&&r.setTextureCube(s,a[o])}},L=function(t){switch(t){case 5126:return T;case 35664:return R;case 35665:return H;case 35666:return x;case 35674:return b;case 35675:return _;case 35676:return M;case 35678:return w;case 35680:return S;case 5124:case 35670:return y;case 35667:case 35671:return f;case 35668:case 35672:return m;case 35669:case 35673:return g}},A=function(t,e,r){this.id=t,this.addr=r,this.setValue=v(e.type)},C=function(t,e,r){this.id=t,this.addr=r,this.size=e.size,this.setValue=L(e.type)},P=function(e){this.id=e,t.call(this)};P.prototype.setValue=function(t,e){for(var r=this.seq,i=0,n=r.length;i!==n;++i){var a=r[i];a.setValue(t,e[a.id])}};var B=/([\w\d_]+)(\])?(\[|\.)?/g,D=function(t,e){t.seq.push(e),t.map[e.id]=e},I=function(t,e,r){var i=t.name,n=i.length;for(B.lastIndex=0;;){var a=B.exec(i),o=B.lastIndex,s=a[1],c="]"===a[2],h=a[3];if(c&&(s=0|s),void 0===h||"["===h&&o+2===n){D(r,void 0===h?new A(s,t,e):new C(s,t,e));break}var l=r.map,u=l[s];void 0===u&&(u=new P(s),D(r,u)),r=u}},U=function(e,r,i){t.call(this),this.renderer=i;for(var n=e.getProgramParameter(r,e.ACTIVE_UNIFORMS),a=0;a!==n;++a){var o=e.getActiveUniform(r,a),s=o.name,c=e.getUniformLocation(r,s);I(o,c,this)}};return U.prototype.setValue=function(t,e,r){var i=this.map[e];void 0!==i&&i.setValue(t,r,this.renderer)},U.prototype.set=function(t,e,r){var i=this.map[r];void 0!==i&&i.setValue(t,e[r],this.renderer)},U.prototype.setOptional=function(t,e,r){var i=e[r];void 0!==i&&this.setValue(t,r,i)},U.upload=function(t,e,r,i){for(var n=0,a=e.length;n!==a;++n){var o=e[n],s=r[o.id];s.needsUpdate!==!1&&o.setValue(t,s.value,i)}},U.seqWithValue=function(t,e){for(var r=[],i=0,n=t.length;i!==n;++i){var a=t[i];a.id in e&&r.push(a)}return r},U.splitDynamic=function(t,e){for(var r=null,i=t.length,n=0,a=0;a!==i;++a){var o=t[a],s=e[o.id];s&&s.dynamic===!0?(null===r&&(r=[]),r.push(o)):(n.001&&L.scale>.001&&(R.x=L.x,R.y=L.y,R.z=L.z,T=L.size*L.scale/E.w,y.x=T*m,y.y=T,p.uniform3f(h.screenPosition,R.x,R.y,R.z),p.uniform2f(h.scale,y.x,y.y),p.uniform1f(h.rotation,L.rotation),p.uniform1f(h.opacity,L.opacity),p.uniform3f(h.color,L.color.r,L.color.g,L.color.b),d.setBlending(L.blending,L.blendEquation,L.blendSrc,L.blendDst),t.setTexture2D(L.texture,1),p.drawElements(p.TRIANGLES,6,p.UNSIGNED_SHORT,0))}}}d.enable(p.CULL_FACE),d.enable(p.DEPTH_TEST),d.setDepthWrite(!0),t.resetGLState()}}},THREE.SpritePlugin=function(t,e){function r(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),e=new Uint16Array([0,1,2,0,2,3]);a=u.createBuffer(),o=u.createBuffer(),u.bindBuffer(u.ARRAY_BUFFER,a),u.bufferData(u.ARRAY_BUFFER,t,u.STATIC_DRAW),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,o),u.bufferData(u.ELEMENT_ARRAY_BUFFER,e,u.STATIC_DRAW),s=i(),c={position:u.getAttribLocation(s,"position"),uv:u.getAttribLocation(s,"uv")},h={uvOffset:u.getUniformLocation(s,"uvOffset"),uvScale:u.getUniformLocation(s,"uvScale"),rotation:u.getUniformLocation(s,"rotation"),scale:u.getUniformLocation(s,"scale"),color:u.getUniformLocation(s,"color"),map:u.getUniformLocation(s,"map"),opacity:u.getUniformLocation(s,"opacity"),modelViewMatrix:u.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:u.getUniformLocation(s,"projectionMatrix"),fogType:u.getUniformLocation(s,"fogType"),fogDensity:u.getUniformLocation(s,"fogDensity"),fogNear:u.getUniformLocation(s,"fogNear"),fogFar:u.getUniformLocation(s,"fogFar"),fogColor:u.getUniformLocation(s,"fogColor"),alphaTest:u.getUniformLocation(s,"alphaTest")};var r=document.createElement("canvas");r.width=8,r.height=8;var n=r.getContext("2d");n.fillStyle="white",n.fillRect(0,0,8,8),l=new THREE.Texture(r),l.needsUpdate=!0}function i(){var e=u.createProgram(),r=u.createShader(u.VERTEX_SHADER),i=u.createShader(u.FRAGMENT_SHADER);return u.shaderSource(r,["precision "+t.getPrecision()+" float;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","void main() {","vUV = uvOffset + uv * uvScale;","vec2 alignedPosition = position * scale;","vec2 rotatedPosition;","rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","vec4 finalPosition;","finalPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","finalPosition.xy += rotatedPosition;","finalPosition = projectionMatrix * finalPosition;","gl_Position = finalPosition;","}"].join("\n")),u.shaderSource(i,["precision "+t.getPrecision()+" float;","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","void main() {","vec4 texture = texture2D( map, vUV );","if ( texture.a < alphaTest ) discard;","gl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","if ( fogType > 0 ) {","float depth = gl_FragCoord.z / gl_FragCoord.w;","float fogFactor = 0.0;","if ( fogType == 1 ) {","fogFactor = smoothstep( fogNear, fogFar, depth );","} else {","const float LOG2 = 1.442695;","fogFactor = exp2( - fogDensity * fogDensity * depth * depth * LOG2 );","fogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","}","gl_FragColor = mix( gl_FragColor, vec4( fogColor, gl_FragColor.w ), fogFactor );","}","}"].join("\n")),u.compileShader(r),u.compileShader(i),u.attachShader(e,r),u.attachShader(e,i),u.linkProgram(e),e}function n(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}var a,o,s,c,h,l,u=t.context,p=t.state,d=new THREE.Vector3,E=new THREE.Quaternion,f=new THREE.Vector3;this.render=function(i,m){if(0!==e.length){void 0===s&&r(),u.useProgram(s),p.initAttributes(),p.enableAttribute(c.position),p.enableAttribute(c.uv),p.disableUnusedAttributes(),p.disable(u.CULL_FACE),p.enable(u.BLEND),u.bindBuffer(u.ARRAY_BUFFER,a),u.vertexAttribPointer(c.position,2,u.FLOAT,!1,16,0),u.vertexAttribPointer(c.uv,2,u.FLOAT,!1,16,8),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,o),u.uniformMatrix4fv(h.projectionMatrix,!1,m.projectionMatrix.elements),p.activeTexture(u.TEXTURE0),u.uniform1i(h.map,0);var g=0,v=0,T=i.fog;T?(u.uniform3f(h.fogColor,T.color.r,T.color.g,T.color.b),T instanceof THREE.Fog?(u.uniform1f(h.fogNear,T.near),u.uniform1f(h.fogFar,T.far),u.uniform1i(h.fogType,1),g=1,v=1):T instanceof THREE.FogExp2&&(u.uniform1f(h.fogDensity,T.density),u.uniform1i(h.fogType,2),g=2,v=2)):(u.uniform1i(h.fogType,0),g=0,v=0);for(var y=0,R=e.length;y(h-s)*(p-c)-(l-c)*(u-s))return!1;var f,m,g,v,T,y,R,H,x,b,_,M,w,S,L;for(f=u-h,m=p-l,g=s-u,v=c-p,T=h-s,y=l-c,o=0;o=-Number.EPSILON&&S>=-Number.EPSILON&&w>=-Number.EPSILON))return!1;return!0}return function(e,r){var i=e.length;if(i<3)return null;var n,a,o,s=[],c=[],h=[];if(THREE.ShapeUtils.area(e)>0)for(a=0;a2;){if(u--<=0)return console.warn("THREE.ShapeUtils: Unable to triangulate polygon! in triangulate()"),r?h:s;if(n=a,l<=n&&(n=0),a=n+1,l<=a&&(a=0),o=a+1,l<=o&&(o=0),t(e,n,a,o,l,c)){var p,d,E,f,m;for(p=c[n],d=c[a],E=c[o],s.push([e[p],e[d],e[E]]),h.push([c[n],c[a],c[o]]),f=a,m=a+1;mNumber.EPSILON){var E;if(p>0){if(d<0||d>p)return[];if(E=h*l-c*u,E<0||E>p)return[]}else{if(d>0||d0||E_?[]:y===_?a?[]:[v]:R<=_?[v,T]:[v,x]}function n(t,e,r,i){var n=e.x-t.x,a=e.y-t.y,o=r.x-t.x,s=r.y-t.y,c=i.x-t.x,h=i.y-t.y,l=n*s-a*o,u=n*h-a*c;if(Math.abs(l)>Number.EPSILON){var p=c*s-h*o;return l>0?u>=0&&p>=0:u>=0||p>=0}return u>0}function a(t,e){function r(t,e){var r=v.length-1,i=t-1;i<0&&(i=r);var a=t+1;a>r&&(a=0);var o=n(v[t],v[i],v[a],s[e]);if(!o)return!1;var c=s.length-1,h=e-1;h<0&&(h=c);var l=e+1;return l>c&&(l=0),o=n(s[e],s[h],s[l],v[t]),!!o}function a(t,e){var r,n,a;for(r=0;r0)return!0;return!1}function o(t,r){var n,a,o,s,c;for(n=0;n0)return!0;return!1}for(var s,c,h,l,u,p,d,E,f,m,g,v=t.concat(),T=[],y=[],R=0,H=e.length;R0;){if(b--,b<0){console.log("Infinite Loop! Holes left:"+T.length+", Probably Hole outside Shape!");break}for(h=x;h=0)break;y[d]=!0}if(c>=0)break}}return v}for(var o,s,c,h,l,u,p={},d=t.concat(),E=0,f=e.length;E0)){c=n;break}c=n-1}if(n=c,i[n]===r){var h=n/(a-1);return h}var l=i[n],u=i[n+1],p=u-l,d=(r-l)/p,h=(n+d)/(a-1);return h},getTangent:function(t){var e=1e-4,r=t-e,i=t+e;r<0&&(r=0),i>1&&(i=1);var n=this.getPoint(r),a=this.getPoint(i),o=a.clone().sub(n);return o.normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)}},THREE.Curve.create=function(t,e){return t.prototype=Object.create(THREE.Curve.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},THREE.CurvePath=function(){this.curves=[],this.autoClose=!1},THREE.CurvePath.prototype=Object.create(THREE.Curve.prototype),THREE.CurvePath.prototype.constructor=THREE.CurvePath,THREE.CurvePath.prototype.add=function(t){this.curves.push(t)},THREE.CurvePath.prototype.closePath=function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new THREE.LineCurve(e,t))},THREE.CurvePath.prototype.getPoint=function(t){for(var e=t*this.getLength(),r=this.getCurveLengths(),i=0;i=e){var n=r[i]-e,a=this.curves[i],o=1-n/a.getLength();return a.getPointAt(o)}i++}return null},THREE.CurvePath.prototype.getLength=function(){var t=this.getCurveLengths();return t[t.length-1]},THREE.CurvePath.prototype.getCurveLengths=function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,r=0,i=this.curves.length;r0?(h=E[E.length-1],s=h.x,c=h.y):(h=this.actions[f-1].args,s=h[h.length-2],c=h[h.length-1]);for(var y=1;y<=t;y++){var R=y/t;l=p(R,s,a,e),u=p(R,c,o,r),E.push(new THREE.Vector2(l,u))}break;case"bezierCurveTo":e=T[4],r=T[5],a=T[0],o=T[1],i=T[2],n=T[3],E.length>0?(h=E[E.length-1],s=h.x,c=h.y):(h=this.actions[f-1].args,s=h[h.length-2],c=h[h.length-1]);for(var y=1;y<=t;y++){var R=y/t;l=d(R,s,a,i,e),u=d(R,c,o,n,r),E.push(new THREE.Vector2(l,u))}break;case"splineThru":h=this.actions[f-1].args;var H=new THREE.Vector2(h[h.length-2],h[h.length-1]),x=[H],b=t*T[0].length;x=x.concat(T[0]);for(var _=new THREE.SplineCurve(x),y=1;y<=b;y++)E.push(_.getPointAt(y/b));break;case"arc":for(var M,w=T[0],S=T[1],L=T[2],A=T[3],C=T[4],P=!!T[5],B=C-A,D=2*t,y=1;y<=D;y++){var R=y/D;P||(R=1-R),M=A+R*B,l=w+L*Math.cos(M),u=S+L*Math.sin(M),E.push(new THREE.Vector2(l,u))}break;case"ellipse":var M,I,U,w=T[0],S=T[1],F=T[2],N=T[3],A=T[4],C=T[5],P=!!T[6],O=T[7],B=C-A,D=2*t;0!==O&&(I=Math.cos(O),U=Math.sin(O));for(var y=1;y<=D;y++){var R=y/D;if(P||(R=1-R),M=A+R*B,l=w+F*Math.cos(M),u=S+N*Math.sin(M),0!==O){var V=l,G=u;l=(V-w)*I-(G-S)*U+w,u=(V-w)*U+(G-S)*I+S}E.push(new THREE.Vector2(l,u))}}}var z=E[E.length-1];return Math.abs(z.x-E[0].x)Number.EPSILON){if(h<0&&(o=e[a],c=-c,s=e[n],h=-h),t.ys.y)continue;if(t.y===o.y){if(t.x===o.x)return!0}else{var l=h*(t.x-o.x)-c*(t.y-o.y);if(0===l)return!0;if(l<0)continue;i=!i}}else{if(t.y!==o.y)continue;if(s.x<=t.x&&t.x<=o.x||o.x<=t.x&&t.x<=s.x)return!0}}return i}var a=THREE.ShapeUtils.isClockWise,o=r(this.actions);if(0===o.length)return[];if(e===!0)return i(o);var s,c,h,l=[];if(1===o.length)return c=o[0],h=new THREE.Shape,h.actions=c.actions,h.curves=c.curves,l.push(h),l;var u=!a(o[0].getPoints());u=t?!u:u;var p,d=[],E=[],f=[],m=0;E[m]=void 0,f[m]=[];for(var g=0,v=o.length;g1){for(var T=!1,y=[],R=0,H=E.length;R0&&(T||(f=d))}for(var S,g=0,L=E.length;ge.length-2?e.length-1:i+1],c=e[i>e.length-3?e.length-1:i+2],h=THREE.CurveUtils.interpolate;return new THREE.Vector2(h(a.x,o.x,s.x,c.x,n),h(a.y,o.y,s.y,c.y,n))},THREE.EllipseCurve=function(t,e,r,i,n,a,o,s){this.aX=t,this.aY=e,this.xRadius=r,this.yRadius=i,this.aStartAngle=n,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s||0},THREE.EllipseCurve.prototype=Object.create(THREE.Curve.prototype),THREE.EllipseCurve.prototype.constructor=THREE.EllipseCurve,THREE.EllipseCurve.prototype.getPoint=function(t){var e=this.aEndAngle-this.aStartAngle;e<0&&(e+=2*Math.PI),e>2*Math.PI&&(e-=2*Math.PI);var r;r=this.aClockwise===!0?this.aEndAngle+(1-t)*(2*Math.PI-e):this.aStartAngle+t*e;var i=this.aX+this.xRadius*Math.cos(r),n=this.aY+this.yRadius*Math.sin(r);if(0!==this.aRotation){var a=Math.cos(this.aRotation),o=Math.sin(this.aRotation),s=i,c=n;i=(s-this.aX)*a-(c-this.aY)*o+this.aX,n=(s-this.aX)*o+(c-this.aY)*a+this.aY}return new THREE.Vector2(i,n)},THREE.ArcCurve=function(t,e,r,i,n,a){THREE.EllipseCurve.call(this,t,e,r,r,i,n,a)},THREE.ArcCurve.prototype=Object.create(THREE.EllipseCurve.prototype),THREE.ArcCurve.prototype.constructor=THREE.ArcCurve,THREE.LineCurve3=THREE.Curve.create(function(t,e){this.v1=t,this.v2=e},function(t){var e=new THREE.Vector3;return e.subVectors(this.v2,this.v1),e.multiplyScalar(t),e.add(this.v1),e}),THREE.QuadraticBezierCurve3=THREE.Curve.create(function(t,e,r){this.v0=t,this.v1=e,this.v2=r},function(t){var e=THREE.ShapeUtils.b2;return new THREE.Vector3(e(t,this.v0.x,this.v1.x,this.v2.x),e(t,this.v0.y,this.v1.y,this.v2.y),e(t,this.v0.z,this.v1.z,this.v2.z))});THREE.CubicBezierCurve3=THREE.Curve.create(function(t,e,r,i){this.v0=t,this.v1=e,this.v2=r,this.v3=i},function(t){var e=THREE.ShapeUtils.b3;return new THREE.Vector3(e(t,this.v0.x,this.v1.x,this.v2.x,this.v3.x),e(t,this.v0.y,this.v1.y,this.v2.y,this.v3.y),e(t,this.v0.z,this.v1.z,this.v2.z,this.v3.z))});THREE.SplineCurve3=THREE.Curve.create(function(t){console.warn("THREE.SplineCurve3 will be deprecated. Please use THREE.CatmullRomCurve3"),this.points=void 0==t?[]:t},function(t){var e=this.points,r=(e.length-1)*t,i=Math.floor(r),n=r-i,a=e[0==i?i:i-1],o=e[i],s=e[i>e.length-2?e.length-1:i+1],c=e[i>e.length-3?e.length-1:i+2],h=THREE.CurveUtils.interpolate;return new THREE.Vector3(h(a.x,o.x,s.x,c.x,n),h(a.y,o.y,s.y,c.y,n),h(a.z,o.z,s.z,c.z,n))}),THREE.CatmullRomCurve3=function(){function t(){}var e=new THREE.Vector3,r=new t,i=new t,n=new t;return t.prototype.init=function(t,e,r,i){this.c0=t,this.c1=r,this.c2=-3*t+3*e-2*r-i,this.c3=2*t-2*e+r+i},t.prototype.initNonuniformCatmullRom=function(t,e,r,i,n,a,o){var s=(e-t)/n-(r-t)/(n+a)+(r-e)/a,c=(r-e)/a-(i-e)/(a+o)+(i-r)/o;s*=a,c*=a,this.init(e,r,s,c)},t.prototype.initCatmullRom=function(t,e,r,i,n){this.init(e,r,n*(r-t),n*(i-e))},t.prototype.calc=function(t){var e=t*t,r=e*t;return this.c0+this.c1*t+this.c2*e+this.c3*r},THREE.Curve.create(function(t){this.points=t||[],this.closed=!1},function(t){var a,o,s,c,h=this.points;c=h.length,c<2&&console.log("duh, you need at least 2 points"),a=(c-(this.closed?0:1))*t,o=Math.floor(a),s=a-o,this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/h.length)+1)*h.length:0===s&&o===c-1&&(o=c-2,s=1);var l,u,p,d;if(this.closed||o>0?l=h[(o-1)%c]:(e.subVectors(h[0],h[1]).add(h[0]),l=e),u=h[o%c],p=h[(o+1)%c],this.closed||o+20?1:-1,d[f]=A.x,d[f+1]=A.y,d[f+2]=A.z,E[m]=B/h,E[m+1]=1-C/l,f+=3,m+=2,S+=1}for(C=0;C65535?Uint32Array:Uint16Array)(l),p=new Float32Array(3*h),d=new Float32Array(3*h),E=new Float32Array(2*h),f=0,m=0,g=0,v=0,T=0;s("z","y","x",-1,-1,r,e,t,a,n,0),s("z","y","x",1,-1,r,e,-t,a,n,1),s("x","z","y",1,1,t,r,e,i,a,2),s("x","z","y",1,-1,t,r,-e,i,a,3),s("x","y","z",1,-1,t,e,r,i,n,4),s("x","y","z",-1,-1,t,e,-r,i,n,5),this.setIndex(new THREE.BufferAttribute(u,1)),this.addAttribute("position",new THREE.BufferAttribute(p,3)),this.addAttribute("normal",new THREE.BufferAttribute(d,3)),this.addAttribute("uv",new THREE.BufferAttribute(E,2))},THREE.BoxBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype),THREE.BoxBufferGeometry.prototype.constructor=THREE.BoxBufferGeometry,THREE.CircleGeometry=function(t,e,r,i){THREE.Geometry.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},this.fromBufferGeometry(new THREE.CircleBufferGeometry(t,e,r,i))},THREE.CircleGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.CircleGeometry.prototype.constructor=THREE.CircleGeometry,THREE.CircleBufferGeometry=function(t,e,r,i){THREE.BufferGeometry.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:r,thetaLength:i},t=t||50,e=void 0!==e?Math.max(3,e):8,r=void 0!==r?r:0,i=void 0!==i?i:2*Math.PI;var n=e+2,a=new Float32Array(3*n),o=new Float32Array(3*n),s=new Float32Array(2*n);o[2]=1,s[0]=.5,s[1]=.5;for(var c=0,h=3,l=2;c<=e;c++,h+=3,l+=2){var u=r+c/e*i;a[h]=t*Math.cos(u),a[h+1]=t*Math.sin(u),o[h+2]=1,s[l]=(a[h]/t+1)/2,s[l+1]=(a[h+1]/t+1)/2}for(var p=[],h=1;h<=e;h++)p.push(h,h+1,0);this.setIndex(new THREE.BufferAttribute(new Uint16Array(p),1)),this.addAttribute("position",new THREE.BufferAttribute(a,3)),this.addAttribute("normal",new THREE.BufferAttribute(o,3)),this.addAttribute("uv",new THREE.BufferAttribute(s,2)),this.boundingSphere=new THREE.Sphere(new THREE.Vector3,t)},THREE.CircleBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype),THREE.CircleBufferGeometry.prototype.constructor=THREE.CircleBufferGeometry,THREE.CylinderBufferGeometry=function(t,e,r,i,n,a,o,s){function c(){var t=(i+1)*(n+1);return a===!1&&(t+=2*(i+1)+2*i),t}function h(){var t=i*n*2*3;return a===!1&&(t+=2*i*3),t}function l(){var a,c,h=new THREE.Vector3,l=new THREE.Vector3,u=0,d=(e-t)/r;for(c=0;c<=n;c++){var E=[],b=c/n,_=b*(e-t)+t;for(a=0;a<=i;a++){var M=a/i;l.x=_*Math.sin(M*s+o),l.y=-b*r+H,l.z=_*Math.cos(M*s+o),m.setXYZ(T,l.x,l.y,l.z),h.copy(l),(0===t&&0===c||0===e&&c===n)&&(h.x=Math.sin(M*s+o),h.z=Math.cos(M*s+o)),h.setY(Math.sqrt(h.x*h.x+h.z*h.z)*d).normalize(),g.setXYZ(T,h.x,h.y,h.z),v.setXY(T,M,1-b),E.push(T),T++}R.push(E)}for(a=0;a65535?Uint32Array:Uint16Array)(E),1),m=new THREE.BufferAttribute(new Float32Array(3*d),3),g=new THREE.BufferAttribute(new Float32Array(3*d),3),v=new THREE.BufferAttribute(new Float32Array(2*d),2),T=0,y=0,R=[],H=r/2,x=0;l(),a===!1&&(t>0&&u(!0),e>0&&u(!1)),this.setIndex(f),this.addAttribute("position",m),this.addAttribute("normal",g),this.addAttribute("uv",v)},THREE.CylinderBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype),THREE.CylinderBufferGeometry.prototype.constructor=THREE.CylinderBufferGeometry,THREE.CylinderGeometry=function(t,e,r,i,n,a,o,s){THREE.Geometry.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:r,radialSegments:i,heightSegments:n,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new THREE.CylinderBufferGeometry(t,e,r,i,n,a,o,s)),this.mergeVertices()},THREE.CylinderGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.CylinderGeometry.prototype.constructor=THREE.CylinderGeometry,THREE.EdgesGeometry=function(t,e){function r(t,e){return t-e}THREE.BufferGeometry.call(this),e=void 0!==e?e:1;var i,n=Math.cos(THREE.Math.DEG2RAD*e),a=[0,0],o={},s=["a","b","c"];t instanceof THREE.BufferGeometry?(i=new THREE.Geometry,i.fromBufferGeometry(t)):i=t.clone(),i.mergeVertices(),i.computeFaceNormals();for(var c=i.vertices,h=i.faces,l=0,u=h.length;lNumber.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+h*h),E=e.x-s/p,f=e.y+o/p,m=r.x-h/d,g=r.y+c/d,v=((m-E)*h-(g-f)*c)/(o*h-s*c);i=E+o*v-t.x,n=f+s*v-t.y;var T=i*i+n*n;if(T<=2)return new THREE.Vector2(i,n);a=Math.sqrt(T/2)}else{var y=!1;o>Number.EPSILON?c>Number.EPSILON&&(y=!0):o<-Number.EPSILON?c<-Number.EPSILON&&(y=!0):Math.sign(s)===Math.sign(h)&&(y=!0),y?(i=-s,n=o,a=Math.sqrt(l)):(i=o,n=s,a=Math.sqrt(l/2))}return new THREE.Vector2(i/a,n/a)}function n(){if(T){var t=0,e=z*t;for(W=0;W=0;){r=W,i=W-1,i<0&&(i=t.length-1);var n=0,a=R+2*v;for(n=0;n=0;U--){for(N=U/v,O=m*(1-N),F=g*Math.sin(N*Math.PI/2),W=0,X=I.length;W65535?Uint32Array:Uint16Array)(c),1),l=new THREE.BufferAttribute(new Float32Array(3*s),3),u=new THREE.BufferAttribute(new Float32Array(2*s),2),p=0,d=0,E=(1/(t.length-1),1/e),f=new THREE.Vector3,m=new THREE.Vector2;for(a=0;a<=e;a++){var g=r+a*E*i,v=Math.sin(g),T=Math.cos(g);for(o=0;o<=t.length-1;o++)f.x=t[o].x*v,f.y=t[o].y,f.z=t[o].x*T,l.setXYZ(p,f.x,f.y,f.z),m.x=a/e,m.y=o/(t.length-1),u.setXY(p,m.x,m.y),p++}for(a=0;a65535?Uint32Array:Uint16Array)(o*s*6),g=0;g65535?Uint32Array:Uint16Array)(l),1),p=new THREE.BufferAttribute(new Float32Array(3*h),3),d=new THREE.BufferAttribute(new Float32Array(3*h),3),E=new THREE.BufferAttribute(new Float32Array(2*h),2),f=0,m=0,g=t,v=(e-t)/i,T=new THREE.Vector3,y=new THREE.Vector2;for(s=0;s<=i;s++){for(c=0;c<=r;c++)o=n+c/r*a,T.x=g*Math.cos(o),T.y=g*Math.sin(o),p.setXYZ(f,T.x,T.y,T.z),d.setXYZ(f,0,0,1),y.x=(T.x/e+1)/2,y.y=(T.y/e+1)/2,E.setXY(f,y.x,y.y),f++;g+=v}for(s=0;s0)&&x.push(b,_,w),(f!==r-1||s65535?THREE.Uint32Attribute:THREE.Uint16Attribute)(x,1)),this.addAttribute("position",h),this.addAttribute("normal",l),this.addAttribute("uv",u),this.boundingSphere=new THREE.Sphere(new THREE.Vector3,t)},THREE.SphereBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype),THREE.SphereBufferGeometry.prototype.constructor=THREE.SphereBufferGeometry,THREE.TextGeometry=function(t,e){e=e||{};var r=e.font;if(r instanceof THREE.Font==!1)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new THREE.Geometry;var i=r.generateShapes(t,e.size,e.curveSegments);e.amount=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),THREE.ExtrudeGeometry.call(this,i,e),this.type="TextGeometry"},THREE.TextGeometry.prototype=Object.create(THREE.ExtrudeGeometry.prototype),THREE.TextGeometry.prototype.constructor=THREE.TextGeometry,THREE.TorusBufferGeometry=function(t,e,r,i,n){THREE.BufferGeometry.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:r,tubularSegments:i,arc:n},t=t||100,e=e||40,r=Math.floor(r)||8,i=Math.floor(i)||6,n=n||2*Math.PI;var a,o,s=(r+1)*(i+1),c=r*i*2*3,h=new(c>65535?Uint32Array:Uint16Array)(c),l=new Float32Array(3*s),u=new Float32Array(3*s),p=new Float32Array(2*s),d=0,E=0,f=0,m=new THREE.Vector3,g=new THREE.Vector3,v=new THREE.Vector3;for(a=0;a<=r;a++)for(o=0;o<=i;o++){var T=o/i*n,y=a/r*Math.PI*2;g.x=(t+e*Math.cos(y))*Math.cos(T),g.y=(t+e*Math.cos(y))*Math.sin(T),g.z=e*Math.sin(y),l[d]=g.x,l[d+1]=g.y,l[d+2]=g.z,m.x=t*Math.cos(T),m.y=t*Math.sin(T),v.subVectors(g,m).normalize(),u[d]=v.x,u[d+1]=v.y,u[d+2]=v.z,p[E]=o/i,p[E+1]=a/r,d+=3,E+=2}for(a=1;a<=r;a++)for(o=1;o<=i;o++){var R=(i+1)*a+o-1,H=(i+1)*(a-1)+o-1,x=(i+1)*(a-1)+o,b=(i+1)*a+o;h[f]=R,h[f+1]=H,h[f+2]=b,h[f+3]=H,h[f+4]=x,h[f+5]=b,f+=6}this.setIndex(new THREE.BufferAttribute(h,1)),this.addAttribute("position",new THREE.BufferAttribute(l,3)),this.addAttribute("normal",new THREE.BufferAttribute(u,3)),this.addAttribute("uv",new THREE.BufferAttribute(p,2))},THREE.TorusBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype),THREE.TorusBufferGeometry.prototype.constructor=THREE.TorusBufferGeometry,THREE.TorusGeometry=function(t,e,r,i,n){THREE.Geometry.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:r,tubularSegments:i,arc:n},this.fromBufferGeometry(new THREE.TorusBufferGeometry(t,e,r,i,n))},THREE.TorusGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.TorusGeometry.prototype.constructor=THREE.TorusGeometry,THREE.TorusKnotBufferGeometry=function(t,e,r,i,n,a){function o(t,e,r,i,n){var a=Math.cos(t),o=Math.sin(t),s=r/e*t,c=Math.cos(s);n.x=i*(2+c)*.5*a,n.y=i*(2+c)*o*.5,n.z=i*Math.sin(s)*.5}THREE.BufferGeometry.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:r,radialSegments:i,p:n,q:a},t=t||100,e=e||40,r=Math.floor(r)||64,i=Math.floor(i)||8,n=n||2,a=a||3;var s,c,h=(i+1)*(r+1),l=i*r*2*3,u=new THREE.BufferAttribute(new(l>65535?Uint32Array:Uint16Array)(l),1),p=new THREE.BufferAttribute(new Float32Array(3*h),3),d=new THREE.BufferAttribute(new Float32Array(3*h),3),E=new THREE.BufferAttribute(new Float32Array(2*h),2),f=0,m=0,g=new THREE.Vector3,v=new THREE.Vector3,T=new THREE.Vector2,y=new THREE.Vector3,R=new THREE.Vector3,H=new THREE.Vector3,x=new THREE.Vector3,b=new THREE.Vector3;for(s=0;s<=r;++s){var _=s/r*n*Math.PI*2;for(o(_,n,a,t,y),o(_+.01,n,a,t,R),x.subVectors(R,y),b.addVectors(R,y),H.crossVectors(x,b),b.crossVectors(H,x),H.normalize(),b.normalize(),c=0;c<=i;++c){var M=c/i*Math.PI*2,w=-e*Math.cos(M),S=e*Math.sin(M);g.x=y.x+(w*b.x+S*H.x),g.y=y.y+(w*b.y+S*H.y),g.z=y.z+(w*b.z+S*H.z),p.setXYZ(f,g.x,g.y,g.z),v.subVectors(g,y).normalize(),d.setXYZ(f,v.x,v.y,v.z),T.x=s/r,T.y=c/i,E.setXY(f,T.x,T.y),f++}}for(c=1;c<=r;c++)for(s=1;s<=i;s++){var L=(i+1)*(c-1)+(s-1),A=(i+1)*c+(s-1),C=(i+1)*c+s,P=(i+1)*(c-1)+s;u.setX(m,L),m++,u.setX(m,A),m++,u.setX(m,P),m++,u.setX(m,A),m++,u.setX(m,C),m++,u.setX(m,P),m++}this.setIndex(u),this.addAttribute("position",p),this.addAttribute("normal",d),this.addAttribute("uv",E)},THREE.TorusKnotBufferGeometry.prototype=Object.create(THREE.BufferGeometry.prototype),THREE.TorusKnotBufferGeometry.prototype.constructor=THREE.TorusKnotBufferGeometry,THREE.TorusKnotGeometry=function(t,e,r,i,n,a,o){THREE.Geometry.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:r,radialSegments:i,p:n,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new THREE.TorusKnotBufferGeometry(t,e,r,i,n,a)),this.mergeVertices()},THREE.TorusKnotGeometry.prototype=Object.create(THREE.Geometry.prototype),THREE.TorusKnotGeometry.prototype.constructor=THREE.TorusKnotGeometry,THREE.TubeGeometry=function(t,e,r,i,n,a){function o(t,e,r){return L.vertices.push(new THREE.Vector3(t,e,r))-1}THREE.Geometry.call(this),this.type="TubeGeometry",this.parameters={path:t,segments:e,radius:r,radialSegments:i,closed:n,taper:a},e=e||64,r=r||1,i=i||8,n=n||!1,a=a||THREE.TubeGeometry.NoTaper;var s,c,h,l,u,p,d,E,f,m,g,v,T,y,R,H,x,b,_,M,w,S=[],L=this,A=e+1,C=new THREE.Vector3,P=new THREE.TubeGeometry.FrenetFrames(t,e,n),B=P.tangents,D=P.normals,I=P.binormals;for(this.tangents=B,this.normals=D,this.binormals=I,m=0;mNumber.EPSILON&&(f.normalize(),n=Math.acos(THREE.Math.clamp(p[h-1].dot(p[h]),-1,1)),d[h].applyMatrix4(m.makeRotationAxis(f,n))),E[h].crossVectors(p[h],d[h]);if(r)for(n=Math.acos(THREE.Math.clamp(d[0].dot(d[g-1]),-1,1)),n/=g-1,p[0].dot(f.crossVectors(d[0],d[g-1]))>0&&(n=-n),h=1;h.9&&_<.1&&(R<.2&&(y[0].x+=1),H<.2&&(y[1].x+=1),x<.2&&(y[2].x+=1))}for(var u=0,p=this.vertices.length;u.99999?this.quaternion.set(0,0,0,1):r.y<-.99999?this.quaternion.set(1,0,0,0):(e.set(r.z,0,-r.x).normalize(),t=Math.acos(r.y),this.quaternion.setFromAxisAngle(e,t))}}(),THREE.ArrowHelper.prototype.setLength=function(t,e,r){void 0===e&&(e=.2*t),void 0===r&&(r=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(r,e,r),this.cone.position.y=t,this.cone.updateMatrix()},THREE.ArrowHelper.prototype.setColor=function(t){this.line.material.color.set(t),this.cone.material.color.set(t)},THREE.BoxHelper=function(t){var e=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new THREE.BufferGeometry;i.setIndex(new THREE.BufferAttribute(e,1)),i.addAttribute("position",new THREE.BufferAttribute(r,3)),THREE.LineSegments.call(this,i,new THREE.LineBasicMaterial({color:16776960})),void 0!==t&&this.update(t)},THREE.BoxHelper.prototype=Object.create(THREE.LineSegments.prototype),THREE.BoxHelper.prototype.constructor=THREE.BoxHelper,THREE.BoxHelper.prototype.update=function(){var t=new THREE.Box3;return function(e){if(e instanceof THREE.Box3?t.copy(e):t.setFromObject(e),!t.isEmpty()){var r=t.min,i=t.max,n=this.geometry.attributes.position,a=n.array;a[0]=i.x,a[1]=i.y,a[2]=i.z,a[3]=r.x,a[4]=i.y,a[5]=i.z,a[6]=r.x,a[7]=r.y,a[8]=i.z,a[9]=i.x,a[10]=r.y,a[11]=i.z,a[12]=i.x,a[13]=i.y,a[14]=r.z,a[15]=r.x,a[16]=i.y,a[17]=r.z,a[18]=r.x,a[19]=r.y,a[20]=r.z,a[21]=i.x,a[22]=r.y,a[23]=r.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),THREE.BoundingBoxHelper=function(t,e){var r=void 0!==e?e:8947848;this.object=t,this.box=new THREE.Box3,THREE.Mesh.call(this,new THREE.BoxGeometry(1,1,1),new THREE.MeshBasicMaterial({color:r,wireframe:!0}))},THREE.BoundingBoxHelper.prototype=Object.create(THREE.Mesh.prototype),THREE.BoundingBoxHelper.prototype.constructor=THREE.BoundingBoxHelper,THREE.BoundingBoxHelper.prototype.update=function(){this.box.setFromObject(this.object),this.box.size(this.scale),this.box.center(this.position)},THREE.CameraHelper=function(t){function e(t,e,i){r(t,i),r(e,i)}function r(t,e){i.vertices.push(new THREE.Vector3),i.colors.push(new THREE.Color(e)),void 0===a[t]&&(a[t]=[]),a[t].push(i.vertices.length-1)}var i=new THREE.Geometry,n=new THREE.LineBasicMaterial({color:16777215,vertexColors:THREE.FaceColors}),a={},o=16755200,s=16711680,c=43775,h=16777215,l=3355443;e("n1","n2",o),e("n2","n4",o),e("n4","n3",o),e("n3","n1",o),e("f1","f2",o),e("f2","f4",o),e("f4","f3",o),e("f3","f1",o),e("n1","f1",o),e("n2","f2",o),e("n3","f3",o),e("n4","f4",o),e("p","n1",s),e("p","n2",s),e("p","n3",s),e("p","n4",s),e("u1","u2",c),e("u2","u3",c),e("u3","u1",c),e("c","t",h),e("p","c",l),e("cn1","cn2",l),e("cn3","cn4",l),e("cf1","cf2",l),e("cf3","cf4",l),THREE.LineSegments.call(this,i,n),this.camera=t,this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()},THREE.CameraHelper.prototype=Object.create(THREE.LineSegments.prototype),THREE.CameraHelper.prototype.constructor=THREE.CameraHelper,THREE.CameraHelper.prototype.update=function(){function t(t,a,o,s){i.set(a,o,s).unproject(n);var c=r[t];if(void 0!==c)for(var h=0,l=c.length;h1){var h=c[1];i[h]||(i[h]={start:1/0,end:-(1/0)});var l=i[h];al.end&&(l.end=a),e||(e=h)}}for(var h in i){var l=i[h];this.createAnimation(h,l.start,l.end,t)}this.firstAnimation=e},THREE.MorphBlendMesh.prototype.setAnimationDirectionForward=function(t){var e=this.animationsMap[t];e&&(e.direction=1,e.directionBackwards=!1)},THREE.MorphBlendMesh.prototype.setAnimationDirectionBackward=function(t){var e=this.animationsMap[t];e&&(e.direction=-1,e.directionBackwards=!0)},THREE.MorphBlendMesh.prototype.setAnimationFPS=function(t,e){var r=this.animationsMap[t];r&&(r.fps=e,r.duration=(r.end-r.start)/r.fps)},THREE.MorphBlendMesh.prototype.setAnimationDuration=function(t,e){var r=this.animationsMap[t];r&&(r.duration=e,r.fps=(r.end-r.start)/r.duration)},THREE.MorphBlendMesh.prototype.setAnimationWeight=function(t,e){var r=this.animationsMap[t];r&&(r.weight=e)},THREE.MorphBlendMesh.prototype.setAnimationTime=function(t,e){var r=this.animationsMap[t];r&&(r.time=e)},THREE.MorphBlendMesh.prototype.getAnimationTime=function(t){var e=0,r=this.animationsMap[t];return r&&(e=r.time),e},THREE.MorphBlendMesh.prototype.getAnimationDuration=function(t){var e=-1,r=this.animationsMap[t];return r&&(e=r.duration),e},THREE.MorphBlendMesh.prototype.playAnimation=function(t){var e=this.animationsMap[t];e?(e.time=0,e.active=!0):console.warn("THREE.MorphBlendMesh: animation["+t+"] undefined in .playAnimation()")},THREE.MorphBlendMesh.prototype.stopAnimation=function(t){var e=this.animationsMap[t];e&&(e.active=!1)},THREE.MorphBlendMesh.prototype.update=function(t){for(var e=0,r=this.animationsList.length;ei.duration||i.time<0)&&(i.direction*=-1,i.time>i.duration&&(i.time=i.duration,i.directionBackwards=!0),i.time<0&&(i.time=0,i.directionBackwards=!1)):(i.time=i.time%i.duration,i.time<0&&(i.time+=i.duration));var a=i.start+THREE.Math.clamp(Math.floor(i.time/n),0,i.length-1),o=i.weight;a!==i.currentFrame&&(this.morphTargetInfluences[i.lastFrame]=0,this.morphTargetInfluences[i.currentFrame]=1*o,this.morphTargetInfluences[a]=0,i.lastFrame=i.currentFrame,i.currentFrame=a);var s=i.time%n/n;i.directionBackwards&&(s=1-s),i.currentFrame!==i.lastFrame?(this.morphTargetInfluences[i.currentFrame]=s*o,this.morphTargetInfluences[i.lastFrame]=(1-s)*o):this.morphTargetInfluences[i.currentFrame]=o}}},"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=THREE),exports.THREE=THREE):this.THREE=THREE; +},{}],18:[function(_dereq_,module,exports){ +!function(n){if("performance"in n==!1&&(n.performance={}),Date.now=Date.now||function(){return(new Date).getTime()},"now"in n.performance==!1){var t=n.performance.timing&&n.performance.timing.navigationStart?performance.timing.navigationStart:Date.now();n.performance.now=function(){return Date.now()-t}}}(this);var TWEEN=TWEEN||function(){var n=[];return{REVISION:"14",getAll:function(){return n},removeAll:function(){n=[]},add:function(t){n.push(t)},remove:function(t){var r=n.indexOf(t);r!==-1&&n.splice(r,1)},update:function(t){if(0===n.length)return!1;var r=0;for(t=void 0!==t?t:window.performance.now();r1?1:w;var d=l(w);for(f in i){var O=r[f]||0,T=i[f];T instanceof Array?t[f]=p(T,d):("string"==typeof T&&(T=O+parseFloat(T,10)),"number"==typeof T&&(t[f]=O+(T-O)*d))}if(null!==M&&M.call(t,d),1==w){if(o>0){isFinite(o)&&o--;for(f in u){if("string"==typeof i[f]&&(u[f]=u[f]+parseFloat(i[f],10)),a){var g=u[f];u[f]=i[f],i[f]=g}r[f]=u[f]}return a&&(c=!c),h=n+s,!0}null!==m&&m.call(t);for(var N=0,W=E.length;N1?e(n[r],n[r-1],r-i):e(n[u],n[u+1>r?r:u+1],i-u)},Bezier:function(n,t){var r,i=0,u=n.length-1,e=Math.pow,o=TWEEN.Interpolation.Utils.Bernstein;for(r=0;r<=u;r++)i+=e(1-t,u-r)*e(t,r)*n[r]*o(u,r);return i},CatmullRom:function(n,t){var r=n.length-1,i=r*t,u=Math.floor(i),e=TWEEN.Interpolation.Utils.CatmullRom;return n[0]===n[r]?(t<0&&(u=Math.floor(i=r*(1+t))),e(n[(u-1+r)%r],n[u],n[(u+1)%r],n[(u+2)%r],i-u)):t<0?n[0]-(e(n[0],n[0],n[1],n[1],-i)-n[0]):t>1?n[r]-(e(n[r],n[r],n[r-1],n[r-1],i-r)-n[r]):e(n[u?u-1:0],n[u],n[r1;r--)i*=r;return n[t]=i}}(),CatmullRom:function(n,t,r,i,u){var e=.5*(r-n),o=.5*(i-t),a=u*u,f=u*a;return(2*t-2*r+e+o)*f+(-3*t+3*r-2*e-o)*a+e*u+t}}},function(n){"function"==typeof define&&define.amd?define([],function(){return TWEEN}):"object"==typeof exports?module.exports=TWEEN:n.TWEEN=TWEEN}(this); +},{}],19:[function(_dereq_,module,exports){ +(function (global){ +!function e(t,i,M){function s(r,N){if(!i[r]){if(!t[r]){var n="function"==typeof _dereq_&&_dereq_;if(!N&&n)return n(r,!0);if(A)return A(r,!0);var D=new Error("Cannot find module '"+r+"'");throw D.code="MODULE_NOT_FOUND",D}var u=i[r]={exports:{}};t[r][0].call(u.exports,function(e){var i=t[r][1][e];return s(i?i:e)},u,u.exports,e,t,i,M)}return i[r].exports}for(var A="function"==typeof _dereq_&&_dereq_,r=0;r1)for(var i=1;it.capabilities.maxLayers)return void M(new Error("Invalid number of layers."));if(t.layer_=e[0],t.waitingForPresent_=!1,t.layer_&&t.layer_.source){var r=t.wrapForFullscreen(t.layer_.source);t.addFullscreenListeners_(r,s,A),N.requestFullscreen(r)?(t.wakelock_.request(),t.waitingForPresent_=!0):N.isIOS()&&(t.wakelock_.request(),t.isPresenting=!0,t.beginPresent_(),t.fireVRDisplayPresentChange_(),i())}t.waitingForPresent_||N.isIOS()||(N.exitFullscreen(),M(new Error("Unable to present.")))})},M.prototype.exitPresent=function(){var e=this.isPresenting,t=this;return this.isPresenting=!1,this.layer_=null,this.wakelock_.release(),new Promise(function(i,M){e?(!N.exitFullscreen()&&N.isIOS()&&(t.endPresent_(),t.fireVRDisplayPresentChange_()),i()):M(new Error("Was not presenting to VRDisplay."))})},M.prototype.getLayers=function(){return this.layer_?[this.layer_]:[]},M.prototype.fireVRDisplayPresentChange_=function(){var e=new CustomEvent("vrdisplaypresentchange",{detail:{vrdisplay:this}});window.dispatchEvent(e)},M.prototype.addFullscreenListeners_=function(e,t,i){this.removeFullscreenListeners_(),this.fullscreenEventTarget_=e,this.fullscreenChangeHandler_=t,this.fullscreenErrorHandler_=i,t&&(e.addEventListener("fullscreenchange",t,!1),e.addEventListener("webkitfullscreenchange",t,!1),document.addEventListener("mozfullscreenchange",t,!1),e.addEventListener("msfullscreenchange",t,!1)),i&&(e.addEventListener("fullscreenerror",i,!1),e.addEventListener("webkitfullscreenerror",i,!1),document.addEventListener("mozfullscreenerror",i,!1),e.addEventListener("msfullscreenerror",i,!1))},M.prototype.removeFullscreenListeners_=function(){if(this.fullscreenEventTarget_){var e=this.fullscreenEventTarget_;if(this.fullscreenChangeHandler_){var t=this.fullscreenChangeHandler_;e.removeEventListener("fullscreenchange",t,!1),e.removeEventListener("webkitfullscreenchange",t,!1),document.removeEventListener("mozfullscreenchange",t,!1),e.removeEventListener("msfullscreenchange",t,!1)}if(this.fullscreenErrorHandler_){var i=this.fullscreenErrorHandler_;e.removeEventListener("fullscreenerror",i,!1),e.removeEventListener("webkitfullscreenerror",i,!1),document.removeEventListener("mozfullscreenerror",i,!1),e.removeEventListener("msfullscreenerror",i,!1)}this.fullscreenEventTarget_=null,this.fullscreenChangeHandler_=null,this.fullscreenErrorHandler_=null}},M.prototype.beginPresent_=function(){},M.prototype.endPresent_=function(){},M.prototype.submitFrame=function(e){},M.prototype.getEyeParameters=function(e){return null},A.prototype=new s,r.prototype=new s,t.exports.VRDisplay=M,t.exports.VRDevice=s,t.exports.HMDVRDevice=A,t.exports.PositionSensorVRDevice=r},{"./util.js":24,"./wakelock.js":26}],5:[function(e,t,i){function M(e){this.gl=e,this.ctxAttribs=e.getContextAttributes(),this.meshWidth=20,this.meshHeight=20,this.bufferScale=WebVRConfig.BUFFER_SCALE,this.bufferWidth=e.drawingBufferWidth,this.bufferHeight=e.drawingBufferHeight,this.realBindFramebuffer=e.bindFramebuffer,this.realEnable=e.enable,this.realDisable=e.disable,this.realColorMask=e.colorMask,this.realClearColor=e.clearColor,this.realViewport=e.viewport,A.isIOS()||(this.realCanvasWidth=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"width"),this.realCanvasHeight=Object.getOwnPropertyDescriptor(e.canvas.__proto__,"height")),this.isPatched=!1,this.lastBoundFramebuffer=null,this.cullFace=!1,this.depthTest=!1,this.blend=!1,this.scissorTest=!1,this.stencilTest=!1,this.viewport=[0,0,0,0],this.colorMask=[!0,!0,!0,!0],this.clearColor=[0,0,0,0],this.attribs={position:0,texCoord:1},this.program=A.linkProgram(e,N,n,this.attribs),this.uniforms=A.getProgramUniforms(e,this.program),this.viewportOffsetScale=new Float32Array(8),this.setTextureBounds(),this.vertexBuffer=e.createBuffer(),this.indexBuffer=e.createBuffer(),this.indexCount=0,this.renderTarget=e.createTexture(),this.framebuffer=e.createFramebuffer(),this.depthStencilBuffer=null,this.depthBuffer=null,this.stencilBuffer=null,this.ctxAttribs.depth&&this.ctxAttribs.stencil?this.depthStencilBuffer=e.createRenderbuffer():this.ctxAttribs.depth?this.depthBuffer=e.createRenderbuffer():this.ctxAttribs.stencil&&(this.stencilBuffer=e.createRenderbuffer()),this.patch(),this.onResize(),WebVRConfig.CARDBOARD_UI_DISABLED||(this.cardboardUI=new s(e))}var s=e("./cardboard-ui.js"),A=e("./util.js"),r=e("./deps/wglu-preserve-state.js"),N=["attribute vec2 position;","attribute vec3 texCoord;","varying vec2 vTexCoord;","uniform vec4 viewportOffsetScale[2];","void main() {"," vec4 viewport = viewportOffsetScale[int(texCoord.z)];"," vTexCoord = (texCoord.xy * viewport.zw) + viewport.xy;"," gl_Position = vec4( position, 1.0, 1.0 );","}"].join("\n"),n=["precision mediump float;","uniform sampler2D diffuse;","varying vec2 vTexCoord;","void main() {"," gl_FragColor = texture2D(diffuse, vTexCoord);","}"].join("\n");M.prototype.destroy=function(){var e=this.gl;this.unpatch(),e.deleteProgram(this.program),e.deleteBuffer(this.vertexBuffer),e.deleteBuffer(this.indexBuffer),e.deleteTexture(this.renderTarget),e.deleteFramebuffer(this.framebuffer),this.depthStencilBuffer&&e.deleteRenderbuffer(this.depthStencilBuffer),this.depthBuffer&&e.deleteRenderbuffer(this.depthBuffer),this.stencilBuffer&&e.deleteRenderbuffer(this.stencilBuffer),this.cardboardUI&&this.cardboardUI.destroy()},M.prototype.onResize=function(){var e=this.gl,t=this,i=[e.RENDERBUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0];r(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.framebuffer),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.texImage2D(e.TEXTURE_2D,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,t.bufferWidth,t.bufferHeight,0,t.ctxAttribs.alpha?e.RGBA:e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t.renderTarget,0),t.ctxAttribs.depth&&t.ctxAttribs.stencil?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthStencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t.depthStencilBuffer)):t.ctxAttribs.depth?(e.bindRenderbuffer(e.RENDERBUFFER,t.depthBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t.depthBuffer)):t.ctxAttribs.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,t.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.STENCIL_INDEX8,t.bufferWidth,t.bufferHeight),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.STENCIL_ATTACHMENT,e.RENDERBUFFER,t.stencilBuffer)),!e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer incomplete!"),t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),t.realClearColor.apply(e,t.clearColor)}),this.cardboardUI&&this.cardboardUI.onResize()},M.prototype.patch=function(){if(!this.isPatched){var e=this,t=this.gl.canvas,i=this.gl;A.isIOS()||(t.width=A.getScreenWidth()*this.bufferScale,t.height=A.getScreenHeight()*this.bufferScale,Object.defineProperty(t,"width",{configurable:!0,enumerable:!0,get:function(){return e.bufferWidth},set:function(t){e.bufferWidth=t,e.onResize()}}),Object.defineProperty(t,"height",{configurable:!0,enumerable:!0,get:function(){return e.bufferHeight},set:function(t){e.bufferHeight=t,e.onResize()}})),this.lastBoundFramebuffer=i.getParameter(i.FRAMEBUFFER_BINDING),null==this.lastBoundFramebuffer&&(this.lastBoundFramebuffer=this.framebuffer,this.gl.bindFramebuffer(i.FRAMEBUFFER,this.framebuffer)),this.gl.bindFramebuffer=function(t,M){e.lastBoundFramebuffer=M?M:e.framebuffer,e.realBindFramebuffer.call(i,t,e.lastBoundFramebuffer)},this.cullFace=i.getParameter(i.CULL_FACE),this.depthTest=i.getParameter(i.DEPTH_TEST),this.blend=i.getParameter(i.BLEND),this.scissorTest=i.getParameter(i.SCISSOR_TEST),this.stencilTest=i.getParameter(i.STENCIL_TEST),i.enable=function(t){switch(t){case i.CULL_FACE:e.cullFace=!0;break;case i.DEPTH_TEST:e.depthTest=!0;break;case i.BLEND:e.blend=!0;break;case i.SCISSOR_TEST:e.scissorTest=!0;break;case i.STENCIL_TEST:e.stencilTest=!0}e.realEnable.call(i,t)},i.disable=function(t){switch(t){case i.CULL_FACE:e.cullFace=!1;break;case i.DEPTH_TEST:e.depthTest=!1;break;case i.BLEND:e.blend=!1;break;case i.SCISSOR_TEST:e.scissorTest=!1;break;case i.STENCIL_TEST:e.stencilTest=!1}e.realDisable.call(i,t)},this.colorMask=i.getParameter(i.COLOR_WRITEMASK),i.colorMask=function(t,M,s,A){e.colorMask[0]=t,e.colorMask[1]=M,e.colorMask[2]=s,e.colorMask[3]=A,e.realColorMask.call(i,t,M,s,A)},this.clearColor=i.getParameter(i.COLOR_CLEAR_VALUE),i.clearColor=function(t,M,s,A){e.clearColor[0]=t,e.clearColor[1]=M,e.clearColor[2]=s,e.clearColor[3]=A,e.realClearColor.call(i,t,M,s,A)},this.viewport=i.getParameter(i.VIEWPORT),i.viewport=function(t,M,s,A){e.viewport[0]=t,e.viewport[1]=M,e.viewport[2]=s,e.viewport[3]=A,e.realViewport.call(i,t,M,s,A)},this.isPatched=!0,A.safariCssSizeWorkaround(t)}},M.prototype.unpatch=function(){if(this.isPatched){var e=this.gl,t=this.gl.canvas;A.isIOS()||(Object.defineProperty(t,"width",this.realCanvasWidth),Object.defineProperty(t,"height",this.realCanvasHeight)),t.width=this.bufferWidth,t.height=this.bufferHeight,e.bindFramebuffer=this.realBindFramebuffer,e.enable=this.realEnable,e.disable=this.realDisable,e.colorMask=this.realColorMask,e.clearColor=this.realClearColor,e.viewport=this.realViewport,this.lastBoundFramebuffer==this.framebuffer&&e.bindFramebuffer(e.FRAMEBUFFER,null),this.isPatched=!1,setTimeout(function(){A.safariCssSizeWorkaround(t)},1)}},M.prototype.setTextureBounds=function(e,t){e||(e=[0,0,.5,1]),t||(t=[.5,0,.5,1]),this.viewportOffsetScale[0]=e[0],this.viewportOffsetScale[1]=e[1],this.viewportOffsetScale[2]=e[2],this.viewportOffsetScale[3]=e[3],this.viewportOffsetScale[4]=t[0],this.viewportOffsetScale[5]=t[1],this.viewportOffsetScale[6]=t[2],this.viewportOffsetScale[7]=t[3]},M.prototype.submitFrame=function(){var e=this.gl,t=this,i=[];if(WebVRConfig.DIRTY_SUBMIT_FRAME_BINDINGS||i.push(e.CURRENT_PROGRAM,e.ARRAY_BUFFER_BINDING,e.ELEMENT_ARRAY_BUFFER_BINDING,e.TEXTURE_BINDING_2D,e.TEXTURE0),r(e,i,function(e){t.realBindFramebuffer.call(e,e.FRAMEBUFFER,null),t.cullFace&&t.realDisable.call(e,e.CULL_FACE),t.depthTest&&t.realDisable.call(e,e.DEPTH_TEST),t.blend&&t.realDisable.call(e,e.BLEND),t.scissorTest&&t.realDisable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realDisable.call(e,e.STENCIL_TEST),t.realColorMask.call(e,!0,!0,!0,!0),t.realViewport.call(e,0,0,e.drawingBufferWidth,e.drawingBufferHeight),(t.ctxAttribs.alpha||A.isIOS())&&(t.realClearColor.call(e,0,0,0,1),e.clear(e.COLOR_BUFFER_BIT)),e.useProgram(t.program),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t.indexBuffer),e.bindBuffer(e.ARRAY_BUFFER,t.vertexBuffer),e.enableVertexAttribArray(t.attribs.position),e.enableVertexAttribArray(t.attribs.texCoord),e.vertexAttribPointer(t.attribs.position,2,e.FLOAT,!1,20,0),e.vertexAttribPointer(t.attribs.texCoord,3,e.FLOAT,!1,20,8),e.activeTexture(e.TEXTURE0),e.uniform1i(t.uniforms.diffuse,0),e.bindTexture(e.TEXTURE_2D,t.renderTarget),e.uniform4fv(t.uniforms.viewportOffsetScale,t.viewportOffsetScale),e.drawElements(e.TRIANGLES,t.indexCount,e.UNSIGNED_SHORT,0),t.cardboardUI&&t.cardboardUI.renderNoState(),t.realBindFramebuffer.call(t.gl,e.FRAMEBUFFER,t.framebuffer),t.ctxAttribs.preserveDrawingBuffer||(t.realClearColor.call(e,0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)),WebVRConfig.DIRTY_SUBMIT_FRAME_BINDINGS||t.realBindFramebuffer.call(e,e.FRAMEBUFFER,t.lastBoundFramebuffer),t.cullFace&&t.realEnable.call(e,e.CULL_FACE),t.depthTest&&t.realEnable.call(e,e.DEPTH_TEST),t.blend&&t.realEnable.call(e,e.BLEND),t.scissorTest&&t.realEnable.call(e,e.SCISSOR_TEST),t.stencilTest&&t.realEnable.call(e,e.STENCIL_TEST),t.realColorMask.apply(e,t.colorMask),t.realViewport.apply(e,t.viewport),!t.ctxAttribs.alpha&&t.ctxAttribs.preserveDrawingBuffer||t.realClearColor.apply(e,t.clearColor)}),A.isIOS()){var M=e.canvas;M.width==t.bufferWidth&&M.height==t.bufferHeight||(t.bufferWidth=M.width,t.bufferHeight=M.height,t.onResize())}},M.prototype.updateDeviceInfo=function(e){var t=this.gl,i=this,M=[t.ARRAY_BUFFER_BINDING,t.ELEMENT_ARRAY_BUFFER_BINDING];r(t,M,function(t){var M=i.computeMeshVertices_(i.meshWidth,i.meshHeight,e);if(t.bindBuffer(t.ARRAY_BUFFER,i.vertexBuffer),t.bufferData(t.ARRAY_BUFFER,M,t.STATIC_DRAW),!i.indexCount){var s=i.computeMeshIndices_(i.meshWidth,i.meshHeight);t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,i.indexBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,s,t.STATIC_DRAW),i.indexCount=s.length}})},M.prototype.computeMeshVertices_=function(e,t,i){for(var M=new Float32Array(2*e*t*5),s=i.getLeftEyeVisibleTanAngles(),r=i.getLeftEyeNoLensTanAngles(),N=i.getLeftEyeVisibleScreenRect(r),n=0,D=0;D<2;D++){for(var u=0;us-A&&M.clientXi.clientHeight-A?e(M):M.clientXe.TEXTURE31){console.error("TEXTURE_BINDING_2D or TEXTURE_BINDING_CUBE_MAP must be followed by a valid texture unit"),M.push(null,null);break}s||(s=e.getParameter(e.ACTIVE_TEXTURE)),e.activeTexture(N),M.push(e.getParameter(r),null);break;case e.ACTIVE_TEXTURE:s=e.getParameter(e.ACTIVE_TEXTURE),M.push(null);break;default:M.push(e.getParameter(r))}}i(e);for(var A=0;Ae.TEXTURE31)break;e.activeTexture(N),e.bindTexture(e.TEXTURE_2D,n);break;case e.TEXTURE_BINDING_CUBE_MAP:var N=t[++A];if(Ne.TEXTURE31)break;e.activeTexture(N),e.bindTexture(e.TEXTURE_CUBE_MAP,n);break;case e.VIEWPORT:e.viewport(n[0],n[1],n[2],n[3]);break;case e.BLEND:case e.CULL_FACE:case e.DEPTH_TEST:case e.SCISSOR_TEST:case e.STENCIL_TEST:n?e.enable(r):e.disable(r);break;default:console.log("No GL restore behavior for 0x"+r.toString(16))}s&&e.activeTexture(s)}}t.exports=M},{}],9:[function(e,t,i){function M(e){this.width=e.width||n.getScreenWidth(),this.height=e.height||n.getScreenHeight(),this.widthMeters=e.widthMeters,this.heightMeters=e.heightMeters,this.bevelMeters=e.bevelMeters}function s(e){this.viewer=o.CardboardV2,this.updateDeviceParams(e),this.distortion=new r(this.viewer.distortionCoefficients)}function A(e){this.id=e.id,this.label=e.label,this.fov=e.fov,this.interLensDistance=e.interLensDistance,this.baselineLensDistance=e.baselineLensDistance,this.screenLensDistance=e.screenLensDistance,this.distortionCoefficients=e.distortionCoefficients,this.inverseCoefficients=e.inverseCoefficients}var r=e("./distortion/distortion.js"),N=e("./math-util.js"),n=e("./util.js"),D=new M({widthMeters:.11,heightMeters:.062,bevelMeters:.004}),u=new M({widthMeters:.1038,heightMeters:.0584,bevelMeters:.004}),o={CardboardV1:new A({id:"CardboardV1",label:"Cardboard I/O 2014",fov:40,interLensDistance:.06,baselineLensDistance:.035,screenLensDistance:.042,distortionCoefficients:[.441,.156],inverseCoefficients:[-.4410035,.42756155,-.4804439,.5460139,-.58821183,.5733938,-.48303202,.33299083,-.17573841,.0651772,-.01488963,.001559834]}),CardboardV2:new A({id:"CardboardV2",label:"Cardboard I/O 2015",fov:60,interLensDistance:.064,baselineLensDistance:.035,screenLensDistance:.039,distortionCoefficients:[.34,.55],inverseCoefficients:[-.33836704,-.18162185,.862655,-1.2462051,1.0560602,-.58208317,.21609078,-.05444823,.009177956,-.0009904169,6183535e-11,-16981803e-13]})};s.prototype.updateDeviceParams=function(e){this.device=this.determineDevice_(e)||this.device},s.prototype.getDevice=function(){return this.device},s.prototype.setViewer=function(e){this.viewer=e,this.distortion=new r(this.viewer.distortionCoefficients)},s.prototype.determineDevice_=function(e){if(!e)return n.isIOS()?(console.warn("Using fallback iOS device measurements."),u):(console.warn("Using fallback Android device measurements."),D);var t=.0254,i=t/e.xdpi,s=t/e.ydpi,A=n.getScreenWidth(),r=n.getScreenHeight();return new M({widthMeters:i*A,heightMeters:s*r,bevelMeters:.001*e.bevelMm})},s.prototype.getDistortedFieldOfViewLeftEye=function(){var e=this.viewer,t=this.device,i=this.distortion,M=e.screenLensDistance,s=(t.widthMeters-e.interLensDistance)/2,A=e.interLensDistance/2,r=e.baselineLensDistance-t.bevelMeters,n=t.heightMeters-r,D=N.radToDeg*Math.atan(i.distort(s/M)),u=N.radToDeg*Math.atan(i.distort(A/M)),o=N.radToDeg*Math.atan(i.distort(r/M)),a=N.radToDeg*Math.atan(i.distort(n/M));return{leftDegrees:Math.min(D,e.fov),rightDegrees:Math.min(u,e.fov),downDegrees:Math.min(o,e.fov),upDegrees:Math.min(a,e.fov)}},s.prototype.getLeftEyeVisibleTanAngles=function(){var e=this.viewer,t=this.device,i=this.distortion,M=Math.tan(-N.degToRad*e.fov),s=Math.tan(N.degToRad*e.fov),A=Math.tan(N.degToRad*e.fov),r=Math.tan(-N.degToRad*e.fov),n=t.widthMeters/4,D=t.heightMeters/2,u=e.baselineLensDistance-t.bevelMeters-D,o=e.interLensDistance/2-n,a=-u,g=e.screenLensDistance,j=i.distort((o-n)/g),I=i.distort((a+D)/g),L=i.distort((o+n)/g),c=i.distort((a-D)/g),T=new Float32Array(4);return T[0]=Math.max(M,j),T[1]=Math.min(s,I),T[2]=Math.min(A,L),T[3]=Math.max(r,c),T},s.prototype.getLeftEyeNoLensTanAngles=function(){var e=this.viewer,t=this.device,i=this.distortion,M=new Float32Array(4),s=i.distortInverse(Math.tan(-N.degToRad*e.fov)),A=i.distortInverse(Math.tan(N.degToRad*e.fov)),r=i.distortInverse(Math.tan(N.degToRad*e.fov)),n=i.distortInverse(Math.tan(-N.degToRad*e.fov)),D=t.widthMeters/4,u=t.heightMeters/2,o=e.baselineLensDistance-t.bevelMeters-u,a=e.interLensDistance/2-D,g=-o,j=e.screenLensDistance,I=(a-D)/j,L=(g+u)/j,c=(a+D)/j,T=(g-u)/j;return M[0]=Math.max(s,I),M[1]=Math.min(A,L),M[2]=Math.min(r,c),M[3]=Math.max(n,T),M},s.prototype.getLeftEyeVisibleScreenRect=function(e){var t=this.viewer,i=this.device,M=t.screenLensDistance,s=(i.widthMeters-t.interLensDistance)/2,A=t.baselineLensDistance-i.bevelMeters,r=(e[0]*M+s)/i.widthMeters,N=(e[1]*M+A)/i.heightMeters,n=(e[2]*M+s)/i.widthMeters,D=(e[3]*M+A)/i.heightMeters;return{x:r,y:D,width:n-r,height:N-D}},s.prototype.getFieldOfViewLeftEye=function(e){return e?this.getUndistortedFieldOfViewLeftEye():this.getDistortedFieldOfViewLeftEye()},s.prototype.getFieldOfViewRightEye=function(e){var t=this.getFieldOfViewLeftEye(e);return{leftDegrees:t.rightDegrees,rightDegrees:t.leftDegrees,upDegrees:t.upDegrees,downDegrees:t.downDegrees}},s.prototype.getUndistortedFieldOfViewLeftEye=function(){var e=this.getUndistortedParams_();return{leftDegrees:N.radToDeg*Math.atan(e.outerDist),rightDegrees:N.radToDeg*Math.atan(e.innerDist),downDegrees:N.radToDeg*Math.atan(e.bottomDist),upDegrees:N.radToDeg*Math.atan(e.topDist)}},s.prototype.getUndistortedViewportLeftEye=function(){var e=this.getUndistortedParams_(),t=this.viewer,i=this.device,M=t.screenLensDistance,s=i.widthMeters/M,A=i.heightMeters/M,r=i.width/s,N=i.height/A,n=Math.round((e.eyePosX-e.outerDist)*r),D=Math.round((e.eyePosY-e.bottomDist)*N);return{x:n,y:D,width:Math.round((e.eyePosX+e.innerDist)*r)-n,height:Math.round((e.eyePosY+e.topDist)*N)-D}},s.prototype.getUndistortedParams_=function(){var e=this.viewer,t=this.device,i=this.distortion,M=e.screenLensDistance,s=e.interLensDistance/2/M,A=t.widthMeters/M,r=t.heightMeters/M,n=A/2-s,D=(e.baselineLensDistance-t.bevelMeters)/M,u=e.fov,o=i.distortInverse(Math.tan(N.degToRad*u)),a=Math.min(n,o),g=Math.min(s,o),j=Math.min(D,o),I=Math.min(r-D,o);return{outerDist:a,innerDist:g,topDist:I,bottomDist:j,eyePosX:n,eyePosY:D}},s.Viewers=o,t.exports=s},{"./distortion/distortion.js":11,"./math-util.js":16,"./util.js":24}],10:[function(e,t,i){function M(e){this.display=e,this.hardwareUnitId=e.displayId,this.deviceId="webvr-polyfill:HMD:"+e.displayId,this.deviceName=e.displayName+" (HMD)"}function s(e){this.display=e,this.hardwareUnitId=e.displayId,this.deviceId="webvr-polyfill:PositionSensor: "+e.displayId,this.deviceName=e.displayName+" (PositionSensor)"}var A=(e("./base.js").VRDisplay,e("./base.js").HMDVRDevice),r=e("./base.js").PositionSensorVRDevice;M.prototype=new A,M.prototype.getEyeParameters=function(e){var t=this.display.getEyeParameters(e);return{currentFieldOfView:t.fieldOfView,maximumFieldOfView:t.fieldOfView,minimumFieldOfView:t.fieldOfView,recommendedFieldOfView:t.fieldOfView,eyeTranslation:{x:t.offset[0],y:t.offset[1],z:t.offset[2]},renderRect:{x:"right"==e?t.renderWidth:0,y:0,width:t.renderWidth,height:t.renderHeight}}},M.prototype.setFieldOfView=function(e,t,i,M){},s.prototype=new r,s.prototype.getState=function(){var e=this.display.getPose();return{position:e.position?{x:e.position[0],y:e.position[1],z:e.position[2]}:null,orientation:e.orientation?{x:e.orientation[0],y:e.orientation[1],z:e.orientation[2],w:e.orientation[3]}:null,linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},s.prototype.resetState=function(){return this.positionDevice.resetPose()},t.exports.VRDisplayHMDDevice=M,t.exports.VRDisplayPositionSensorDevice=s},{"./base.js":4}],11:[function(e,t,i){function M(e){this.coefficients=e}M.prototype.distortInverse=function(e){for(var t=0,i=1,M=e-this.distort(t);Math.abs(i-t)>1e-4;){var s=e-this.distort(i),A=i-s*((i-t)/(s-M));t=i,i=A,M=s}return i},M.prototype.distort=function(e){for(var t=e*e,i=0,M=0;M=0;--M){for(var n=t[M],r=M+1;r=200&&i.status<=299?(console.log("Successfully loaded online DPDB."),M.dpdb=JSON.parse(i.response),M.recalculateDeviceParams_()):console.error("Error loading online DPDB!")}),i.send()}}function s(e){this.xdpi=e.xdpi,this.ydpi=e.ydpi,this.bevelMm=e.bevelMm}var A=e("./dpdb-cache.js"),r=e("../util.js"),N="https://storage.googleapis.com/cardboard-dpdb/dpdb.json";M.prototype.getDeviceParams=function(){return this.deviceParams},M.prototype.recalculateDeviceParams_=function(){console.log("Recalculating device params.");var e=this.calcDeviceParams_();console.log("New device parameters:"),console.log(e),e?(this.deviceParams=e,this.onDeviceParamsUpdated&&this.onDeviceParamsUpdated(this.deviceParams)):console.error("Failed to recalculate device parameters.")},M.prototype.calcDeviceParams_=function(){var e=this.dpdb;if(!e)return console.error("DPDB not available."),null;if(1!=e.format)return console.error("DPDB has unexpected format version."),null;if(!e.devices||!e.devices.length)return console.error("DPDB does not have a devices section."),null;var t=navigator.userAgent||navigator.vendor||window.opera,i=r.getScreenWidth(),M=r.getScreenHeight();if(console.log("User agent: "+t),console.log("Pixel width: "+i),console.log("Pixel height: "+M),!e.devices)return console.error("DPDB has no devices section."),null;for(var A=0;A=1)return this.w=A,this.x=i,this.y=M,this.z=s,this;var N=Math.acos(r),n=Math.sqrt(1-r*r);if(Math.abs(n)<.001)return this.w=.5*(A+this.w),this.x=.5*(i+this.x),this.y=.5*(M+this.y),this.z=.5*(s+this.z),this;var D=Math.sin((1-t)*N)/n,u=Math.sin(t*N)/n;return this.w=A*D+this.w*u,this.x=i*D+this.x*u,this.y=M*D+this.y*u,this.z=s*D+this.z*u,this},setFromUnitVectors:function(){var e,t,i=1e-6;return function(s,A){return void 0===e&&(e=new M.Vector3),t=s.dot(A)+1,tMath.abs(s.z)?e.set(-s.y,s.x,0):e.set(0,-s.z,s.y)):e.crossVectors(s,A),this.x=e.x,this.y=e.y,this.z=e.z,this.w=t,this.normalize(),this}}()},t.exports=M},{}],17:[function(e,t,i){function M(){this.displayName="Mouse and Keyboard VRDisplay (webvr-polyfill)",this.capabilities.hasOrientation=!0,window.addEventListener("keydown",this.onKeyDown_.bind(this)),window.addEventListener("mousemove",this.onMouseMove_.bind(this)),window.addEventListener("mousedown",this.onMouseDown_.bind(this)),window.addEventListener("mouseup",this.onMouseUp_.bind(this)),this.phi_=0,this.theta_=0,this.targetAngle_=null,this.angleAnimation_=null,this.orientation_=new A.Quaternion,this.rotateStart_=new A.Vector2,this.rotateEnd_=new A.Vector2,this.rotateDelta_=new A.Vector2,this.isDragging_=!1,this.orientationOut_=new Float32Array(4)}var s=e("./base.js").VRDisplay,A=e("./math-util.js"),r=e("./util.js"),N=.15,n=80,D=.5,u=.3;M.prototype=new s,M.prototype.getImmediatePose=function(){return this.orientation_.setFromEulerYXZ(this.phi_,this.theta_,0),this.orientationOut_[0]=this.orientation_.x,this.orientationOut_[1]=this.orientation_.y,this.orientationOut_[2]=this.orientation_.z,this.orientationOut_[3]=this.orientation_.w,{position:null,orientation:this.orientationOut_,linearVelocity:null,linearAcceleration:null,angularVelocity:null,angularAcceleration:null}},M.prototype.onKeyDown_=function(e){38==e.keyCode?this.animatePhi_(this.phi_+N):39==e.keyCode?this.animateTheta_(this.theta_-N):40==e.keyCode?this.animatePhi_(this.phi_-N):37==e.keyCode&&this.animateTheta_(this.theta_+N)},M.prototype.animateTheta_=function(e){this.animateKeyTransitions_("theta_",e)},M.prototype.animatePhi_=function(e){e=r.clamp(e,-Math.PI/2,Math.PI/2),this.animateKeyTransitions_("phi_",e)},M.prototype.animateKeyTransitions_=function(e,t){this.angleAnimation_&&cancelAnimationFrame(this.angleAnimation_);var i=this[e],M=new Date;this.angleAnimation_=requestAnimationFrame(function s(){var A=new Date-M;if(A>=n)return this[e]=t,void cancelAnimationFrame(this.angleAnimation_);this.angleAnimation_=requestAnimationFrame(s.bind(this));var r=A/n;this[e]=i+(t-i)*r}.bind(this))},M.prototype.onMouseDown_=function(e){this.rotateStart_.set(e.clientX,e.clientY),this.isDragging_=!0},M.prototype.onMouseMove_=function(e){if(this.isDragging_||this.isPointerLocked_()){if(this.isPointerLocked_()){var t=e.movementX||e.mozMovementX||0,i=e.movementY||e.mozMovementY||0;this.rotateEnd_.set(this.rotateStart_.x-t,this.rotateStart_.y-i)}else this.rotateEnd_.set(e.clientX,e.clientY);this.rotateDelta_.subVectors(this.rotateEnd_,this.rotateStart_),this.rotateStart_.copy(this.rotateEnd_),this.phi_+=2*Math.PI*this.rotateDelta_.y/screen.height*u,this.theta_+=2*Math.PI*this.rotateDelta_.x/screen.width*D,this.phi_=r.clamp(this.phi_,-Math.PI/2,Math.PI/2)}},M.prototype.onMouseUp_=function(e){this.isDragging_=!1},M.prototype.isPointerLocked_=function(){var e=document.pointerLockElement||document.mozPointerLockElement||document.webkitPointerLockElement;return void 0!==e},M.prototype.resetPose=function(){this.phi_=0,this.theta_=0},t.exports=M},{"./base.js":4,"./math-util.js":16,"./util.js":24}],18:[function(e,t,i){function M(){this.loadIcon_();var e=document.createElement("div"),t=e.style;t.position="fixed",t.top=0,t.right=0,t.bottom=0,t.left=0,t.backgroundColor="gray",t.fontFamily="sans-serif",t.zIndex=1e6;var i=document.createElement("img");i.src=this.icon;var t=i.style;t.marginLeft="25%",t.marginTop="25%",t.width="50%",e.appendChild(i);var M=document.createElement("div"),t=M.style;t.textAlign="center",t.fontSize="16px",t.lineHeight="24px",t.margin="24px 25%",t.width="50%",M.innerHTML="Place your phone into your Cardboard viewer.",e.appendChild(M);var s=document.createElement("div"),t=s.style;t.backgroundColor="#CFD8DC",t.position="fixed",t.bottom=0,t.width="100%",t.height="48px",t.padding="14px 24px",t.boxSizing="border-box",t.color="#656A6B",e.appendChild(s);var A=document.createElement("div");A.style.float="left",A.innerHTML="No Cardboard viewer?";var r=document.createElement("a");r.href="https://www.google.com/get/cardboard/get-cardboard/",r.innerHTML="get one",r.target="_blank"; +var t=r.style;t.float="right",t.fontWeight=600,t.textTransform="uppercase",t.borderLeft="1px solid gray",t.paddingLeft="24px",t.textDecoration="none",t.color="#656A6B",s.appendChild(A),s.appendChild(r),this.overlay=e,this.text=M,this.hide()}var s=e("./util.js");M.prototype.show=function(e){e||this.overlay.parentElement?e&&(this.overlay.parentElement&&this.overlay.parentElement!=e&&this.overlay.parentElement.removeChild(this.overlay),e.appendChild(this.overlay)):document.body.appendChild(this.overlay),this.overlay.style.display="block";var t=this.overlay.querySelector("img"),i=t.style;s.isLandscapeMode()?(i.width="20%",i.marginLeft="40%",i.marginTop="3%"):(i.width="50%",i.marginLeft="25%",i.marginTop="25%")},M.prototype.hide=function(){this.overlay.style.display="none"},M.prototype.showTemporarily=function(e,t){this.show(t),this.timer=setTimeout(this.hide.bind(this),e)},M.prototype.disableShowTemporarily=function(){clearTimeout(this.timer)},M.prototype.update=function(){this.disableShowTemporarily(),!s.isLandscapeMode()&&s.isMobile()?this.show():this.hide()},M.prototype.loadIcon_=function(){this.icon=s.base64("image/svg+xml","PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjE5OHB4IiBoZWlnaHQ9IjI0MHB4IiB2aWV3Qm94PSIwIDAgMTk4IDI0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpza2V0Y2g9Imh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaC9ucyI+CiAgICA8IS0tIEdlbmVyYXRvcjogU2tldGNoIDMuMy4zICgxMjA4MSkgLSBodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2ggLS0+CiAgICA8dGl0bGU+dHJhbnNpdGlvbjwvdGl0bGU+CiAgICA8ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz4KICAgIDxkZWZzPjwvZGVmcz4KICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPS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LjM3NSBaIE0xMC4zMzMsNDYuNTY0IEwxMC4zMzMsODkuOTQ0IEw3Ny4xNTQsNTEuMzY1IEw3Ny4xNTQsNy45ODUgTDEwLjMzMyw0Ni41NjQgTDEwLjMzMyw0Ni41NjQgWiIgaWQ9IkZpbGwtMjAiIGZpbGw9IiM2MDdEOEIiPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0xMjUuNzM3LDg4LjY0NyBMMTE4LjA5OCw5MS45ODEgTDExOC4wOTgsODQgTDEwNi42MzksODguNzEzIEwxMDYuNjM5LDk2Ljk4MiBMOTksMTAwLjMxNSBMMTEyLjM2OSwxMDMuOTYxIEwxMjUuNzM3LDg4LjY0NyIgaWQ9IkltcG9ydGVkLUxheWVycy1Db3B5LTIiIGZpbGw9IiM0NTVBNjQiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiPjwvcGF0aD4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+"); +},t.exports=M},{"./util.js":24}],19:[function(e,t,i){function M(e){this.kFilter=e,this.currentAccelMeasurement=new s,this.currentGyroMeasurement=new s,this.previousGyroMeasurement=new s,this.filterQ=new A.Quaternion,this.previousFilterQ=new A.Quaternion,this.accelQ=new A.Quaternion,this.isOrientationInitialized=!1,this.estimatedGravity=new A.Vector3,this.measuredGravity=new A.Vector3,this.gyroIntegralQ=new A.Quaternion}var s=e("./sensor-sample.js"),A=e("../math-util.js"),r=e("../util.js"),N=!1;M.prototype.addAccelMeasurement=function(e,t){this.currentAccelMeasurement.set(e,t)},M.prototype.addGyroMeasurement=function(e,t){this.currentGyroMeasurement.set(e,t);var i=t-this.previousGyroMeasurement.timestampS;r.isTimestampDeltaValid(i)&&this.run_(),this.previousGyroMeasurement.copy(this.currentGyroMeasurement)},M.prototype.run_=function(){if(!this.isOrientationInitialized)return this.accelQ=this.accelToQuaternion_(this.currentAccelMeasurement.sample),this.previousFilterQ.copy(this.accelQ),void(this.isOrientationInitialized=!0);var e=this.currentGyroMeasurement.timestampS-this.previousGyroMeasurement.timestampS,t=this.gyroToQuaternionDelta_(this.currentGyroMeasurement.sample,e);this.gyroIntegralQ.multiply(t),this.filterQ.copy(this.previousFilterQ),this.filterQ.multiply(t);var i=new A.Quaternion;i.copy(this.filterQ),i.inverse(),this.estimatedGravity.set(0,0,-1),this.estimatedGravity.applyQuaternion(i),this.estimatedGravity.normalize(),this.measuredGravity.copy(this.currentAccelMeasurement.sample),this.measuredGravity.normalize();var M=new A.Quaternion;M.setFromUnitVectors(this.estimatedGravity,this.measuredGravity),M.inverse(),N&&console.log("Delta: %d deg, G_est: (%s, %s, %s), G_meas: (%s, %s, %s)",A.radToDeg*r.getQuaternionAngle(M),this.estimatedGravity.x.toFixed(1),this.estimatedGravity.y.toFixed(1),this.estimatedGravity.z.toFixed(1),this.measuredGravity.x.toFixed(1),this.measuredGravity.y.toFixed(1),this.measuredGravity.z.toFixed(1));var s=new A.Quaternion;s.copy(this.filterQ),s.multiply(M),this.filterQ.slerp(s,1-this.kFilter),this.previousFilterQ.copy(this.filterQ)},M.prototype.getOrientation=function(){return this.filterQ},M.prototype.accelToQuaternion_=function(e){var t=new A.Vector3;t.copy(e),t.normalize();var i=new A.Quaternion;return i.setFromUnitVectors(new A.Vector3(0,0,(-1)),t),i.inverse(),i},M.prototype.gyroToQuaternionDelta_=function(e,t){var i=new A.Quaternion,M=new A.Vector3;return M.copy(e),M.normalize(),i.setFromAxisAngle(M,e.length()*t),i},t.exports=M},{"../math-util.js":16,"../util.js":24,"./sensor-sample.js":22}],20:[function(e,t,i){function M(){this.deviceId="webvr-polyfill:fused",this.deviceName="VR Position Device (webvr-polyfill:fused)",this.accelerometer=new N.Vector3,this.gyroscope=new N.Vector3,window.addEventListener("devicemotion",this.onDeviceMotionChange_.bind(this)),window.addEventListener("orientationchange",this.onScreenOrientationChange_.bind(this)),this.filter=new s(WebVRConfig.K_FILTER),this.posePredictor=new A(WebVRConfig.PREDICTION_TIME_S),this.touchPanner=new r,this.filterToWorldQ=new N.Quaternion,n.isIOS()?this.filterToWorldQ.setFromAxisAngle(new N.Vector3(1,0,0),Math.PI/2):this.filterToWorldQ.setFromAxisAngle(new N.Vector3(1,0,0),-Math.PI/2),this.inverseWorldToScreenQ=new N.Quaternion,this.worldToScreenQ=new N.Quaternion,this.originalPoseAdjustQ=new N.Quaternion,this.originalPoseAdjustQ.setFromAxisAngle(new N.Vector3(0,0,1),-window.orientation*Math.PI/180),this.setScreenTransform_(),n.isLandscapeMode()&&this.filterToWorldQ.multiply(this.inverseWorldToScreenQ),this.resetQ=new N.Quaternion,this.isFirefoxAndroid=n.isFirefoxAndroid(),this.isIOS=n.isIOS(),this.orientationOut_=new Float32Array(4)}var s=e("./complementary-filter.js"),A=e("./pose-predictor.js"),r=e("../touch-panner.js"),N=e("../math-util.js"),n=e("../util.js");M.prototype.getPosition=function(){return null},M.prototype.getOrientation=function(){var e=this.filter.getOrientation();this.predictedQ=this.posePredictor.getPrediction(e,this.gyroscope,this.previousTimestampS);var t=new N.Quaternion;return t.copy(this.filterToWorldQ),t.multiply(this.resetQ),WebVRConfig.TOUCH_PANNER_DISABLED||t.multiply(this.touchPanner.getOrientation()),t.multiply(this.predictedQ),t.multiply(this.worldToScreenQ),WebVRConfig.YAW_ONLY&&(t.x=0,t.z=0,t.normalize()),this.orientationOut_[0]=t.x,this.orientationOut_[1]=t.y,this.orientationOut_[2]=t.z,this.orientationOut_[3]=t.w,this.orientationOut_},M.prototype.resetPose=function(){this.resetQ.copy(this.filter.getOrientation()),this.resetQ.x=0,this.resetQ.y=0,this.resetQ.z*=-1,this.resetQ.normalize(),n.isLandscapeMode()&&this.resetQ.multiply(this.inverseWorldToScreenQ),this.resetQ.multiply(this.originalPoseAdjustQ),WebVRConfig.TOUCH_PANNER_DISABLED||this.touchPanner.resetSensor()},M.prototype.onDeviceMotionChange_=function(e){var t=e.accelerationIncludingGravity,i=e.rotationRate,M=e.timeStamp/1e3;this.isFirefoxAndroid&&(M/=1e3);var s=M-this.previousTimestampS;return s<=n.MIN_TIMESTEP||s>n.MAX_TIMESTEP?(console.warn("Invalid timestamps detected. Time step between successive gyroscope sensor samples is very small or not monotonic"),void(this.previousTimestampS=M)):(this.accelerometer.set(-t.x,-t.y,-t.z),this.gyroscope.set(i.alpha,i.beta,i.gamma),(this.isIOS||this.isFirefoxAndroid)&&this.gyroscope.multiplyScalar(Math.PI/180),this.filter.addAccelMeasurement(this.accelerometer,M),this.filter.addGyroMeasurement(this.gyroscope,M),void(this.previousTimestampS=M))},M.prototype.onScreenOrientationChange_=function(e){this.setScreenTransform_()},M.prototype.setScreenTransform_=function(){switch(this.worldToScreenQ.set(0,0,0,1),window.orientation){case 0:break;case 90:this.worldToScreenQ.setFromAxisAngle(new N.Vector3(0,0,1),-Math.PI/2);break;case-90:this.worldToScreenQ.setFromAxisAngle(new N.Vector3(0,0,1),Math.PI/2);break;case 180:}this.inverseWorldToScreenQ.copy(this.worldToScreenQ),this.inverseWorldToScreenQ.inverse()},t.exports=M},{"../math-util.js":16,"../touch-panner.js":23,"../util.js":24,"./complementary-filter.js":19,"./pose-predictor.js":21}],21:[function(e,t,i){function M(e){this.predictionTimeS=e,this.previousQ=new s.Quaternion,this.previousTimestampS=null,this.deltaQ=new s.Quaternion,this.outQ=new s.Quaternion}var s=e("../math-util.js"),A=!1;M.prototype.getPrediction=function(e,t,i){if(!this.previousTimestampS)return this.previousQ.copy(e),this.previousTimestampS=i,e;var M=new s.Vector3;M.copy(t),M.normalize();var r=t.length();if(r<20*s.degToRad)return A&&console.log("Moving slowly, at %s deg/s: no prediction",(s.radToDeg*r).toFixed(1)),this.outQ.copy(e),this.previousQ.copy(e),this.outQ;var N=(i-this.previousTimestampS,r*this.predictionTimeS);return this.deltaQ.setFromAxisAngle(M,N),this.outQ.copy(this.previousQ),this.outQ.multiply(this.deltaQ),this.previousQ.copy(e),this.outQ},t.exports=M},{"../math-util.js":16}],22:[function(e,t,i){function M(e,t){this.set(e,t)}M.prototype.set=function(e,t){this.sample=e,this.timestampS=t},M.prototype.copy=function(e){this.set(e.sample,e.timestampS)},t.exports=M},{}],23:[function(e,t,i){function M(){window.addEventListener("touchstart",this.onTouchStart_.bind(this)),window.addEventListener("touchmove",this.onTouchMove_.bind(this)),window.addEventListener("touchend",this.onTouchEnd_.bind(this)),this.isTouching=!1,this.rotateStart=new s.Vector2,this.rotateEnd=new s.Vector2,this.rotateDelta=new s.Vector2,this.theta=0,this.orientation=new s.Quaternion}var s=e("./math-util.js"),A=e("./util.js"),r=.5;M.prototype.getOrientation=function(){return this.orientation.setFromEulerXYZ(0,0,this.theta),this.orientation},M.prototype.resetSensor=function(){this.theta=0},M.prototype.onTouchStart_=function(e){1==e.touches.length&&(this.rotateStart.set(e.touches[0].pageX,e.touches[0].pageY),this.isTouching=!0)},M.prototype.onTouchMove_=function(e){if(this.isTouching){this.rotateEnd.set(e.touches[0].pageX,e.touches[0].pageY),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart),this.rotateStart.copy(this.rotateEnd),A.isIOS()&&(this.rotateDelta.x*=-1);var t=document.body;this.theta+=2*Math.PI*this.rotateDelta.x/t.clientWidth*r}},M.prototype.onTouchEnd_=function(e){this.isTouching=!1},t.exports=M},{"./math-util.js":16,"./util.js":24}],24:[function(e,t,i){var M=e("object-assign"),s=window.Util||{};s.MIN_TIMESTEP=.001,s.MAX_TIMESTEP=1,s.base64=function(e,t){return"data:"+e+";base64,"+t},s.clamp=function(e,t,i){return Math.min(Math.max(t,e),i)},s.lerp=function(e,t,i){return e+(t-e)*i},s.isIOS=function(){var e=/iPad|iPhone|iPod/.test(navigator.platform);return function(){return e}}(),s.isSafari=function(){var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return function(){return e}}(),s.isFirefoxAndroid=function(){var e=navigator.userAgent.indexOf("Firefox")!==-1&&navigator.userAgent.indexOf("Android")!==-1;return function(){return e}}(),s.isLandscapeMode=function(){return 90==window.orientation||window.orientation==-90},s.isTimestampDeltaValid=function(e){return!isNaN(e)&&(!(e<=s.MIN_TIMESTEP)&&!(e>s.MAX_TIMESTEP))},s.getScreenWidth=function(){return Math.max(window.screen.width,window.screen.height)*window.devicePixelRatio},s.getScreenHeight=function(){return Math.min(window.screen.width,window.screen.height)*window.devicePixelRatio},s.requestFullscreen=function(e){if(e.requestFullscreen)e.requestFullscreen();else if(e.webkitRequestFullscreen)e.webkitRequestFullscreen();else if(e.mozRequestFullScreen)e.mozRequestFullScreen();else{if(!e.msRequestFullscreen)return!1;e.msRequestFullscreen()}return!0},s.exitFullscreen=function(){if(document.exitFullscreen)document.exitFullscreen();else if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)document.mozCancelFullScreen();else{if(!document.msExitFullscreen)return!1;document.msExitFullscreen()}return!0},s.getFullscreenElement=function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},s.linkProgram=function(e,t,i,M){var s=e.createShader(e.VERTEX_SHADER);e.shaderSource(s,t),e.compileShader(s);var A=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(A,i),e.compileShader(A);var r=e.createProgram();e.attachShader(r,s),e.attachShader(r,A);for(var N in M)e.bindAttribLocation(r,M[N],N);return e.linkProgram(r),e.deleteShader(s),e.deleteShader(A),r},s.getProgramUniforms=function(e,t){for(var i={},M=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),s="",A=0;A dist/aframe.js","dist:min":"npm run browserify -s -- --debug -p [minifyify --map aframe.min.js.map --output dist/aframe.min.js.map] -o dist/aframe.min.js","dist:release":"npm run dist:release:min && npm run dist:release:max","dist:release:max":"npm run browserify -s -- --debug | exorcist dist/aframe-v0.3.2.js.map > dist/aframe-v0.3.2.js","dist:release:min":"npm run browserify -s -- --debug -p [minifyify --map aframe-v0.3.2.min.js.map --output dist/aframe-v0.3.2.min.js.map] -o dist/aframe-v0.3.2.min.js","gh-pages":"npm run ghpages","ghpages":"node ./scripts/gh-pages","lint":"semistandard -v | snazzy","precommit":"npm run lint","preghpages":"npm run dist && rimraf gh-pages && mkdirp gh-pages && cp -r {.nojekyll,dist,lib,examples,index.html,style} gh-pages/. 2>/dev/null || : && git checkout dist/ && replace 'build/aframe.js' 'dist/aframe.min.js' gh-pages/ -r --silent","release:bump":"npm run dist && git commit -am 'bump dist' && npm version patch --preminor","release:push":"npm login && npm publish && git push --follow-tags","start":"npm run dev","test":"karma start ./tests/karma.conf.js","test:firefox":"karma start ./tests/karma.conf.js --browsers Firefox","test:chrome":"karma start ./tests/karma.conf.js --browsers Chrome","test:ci":"TEST_ENV=ci karma start ./tests/karma.conf.js --single-run --browsers Firefox","version":"npm run dist"},"repository":"aframevr/aframe","license":"MIT","dependencies":{"browserify-css":"^0.8.2","debug":"^2.2.0","deep-assign":"^2.0.0","document-register-element":"dmarcos/document-register-element#8ccc532b7","object-assign":"^4.0.1","present":"0.0.6","promise-polyfill":"^3.1.0","style-attr":"^1.0.2","three":"^0.76.1","tween.js":"^15.0.0","webvr-polyfill":"0.9.15"},"devDependencies":{"browserify":"^13.1.0","browserify-derequire":"^0.9.4","browserify-istanbul":"^2.0.0","budo":"^8.1.0","chai":"^3.5.0","chai-shallow-deep-equal":"^1.3.0","codecov":"^1.0.1","exorcist":"^0.4.0","gh-pages":"^0.6.0","husky":"^0.10.1","istanbul":"^0.4.4","karma":"^1.2.0","karma-browserify":"^5.1.0","karma-chai-shallow-deep-equal":"0.0.4","karma-chrome-launcher":"^1.0.1","karma-coverage":"^1.1.1","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.0.0","karma-mocha":"^1.1.1","karma-mocha-reporter":"^2.1.0","karma-sinon-chai":"^1.2.3","lolex":"^1.5.1","minifyify":"^7.3.3","mkdirp":"0.5.1","mocha":"^3.0.2","mozilla-download":"^1.0.5","open":"0.0.5","replace":"^0.3.0","rimraf":"2.5.0","semistandard":"^7.0.2","sinon":"^1.17.5","sinon-chai":"^2.8.0","snazzy":"^3.0.0","uglifyjs":"^2.4.10"},"link":true,"browserify":{"transform":["browserify-css"]},"semistandard":{"ignore":["build/**","dist/**","examples/**/shaders/*.js","**/vendor/**"]},"keywords":["3d","aframe","cardboard","components","oculus","three","three.js","rift","vive","vr","web-components","webvr"],"browserify-css":{"minify":true},"engines":{"node":">= 0.12.7","npm":"^2.12.1"}} +},{}],21:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three");module.exports.Component=registerComponent("blend-character-model",{schema:{type:"src"},init:function(){this.model=null},update:function(){var e=this,o=this.el,t=this.data;t&&(this.remove(),this.model=new THREE.BlendCharacter,this.model.load(t,function(){o.setObject3D("mesh",e.model),o.emit("model-loaded",{format:"blend",model:e.model}),e.model.castShadow=!0,e.model.receiveShadow=!0,e.model.material.shading=THREE.FlatShading,e.model.geometry.computeBoundingBox()}))},remove:function(){this.model&&this.el.removeObject3D("mesh")}}); +},{"../core/component":59,"../lib/three":103}],22:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),utils=_dereq_("../utils/"),checkHeadsetConnected=utils.checkHeadsetConnected;module.exports.Component=registerComponent("camera",{schema:{active:{default:!0},far:{default:1e4},fov:{default:80,min:0},near:{default:.005,min:0},userHeight:{default:0,min:0},zoom:{default:1,min:0}},init:function(){var e,t=this.el,i=t.sceneEl;this.savedPose=null,e=this.camera=new THREE.PerspectiveCamera,t.setObject3D("camera",e),this.onEnterVR=this.onEnterVR.bind(this),this.onExitVR=this.onExitVR.bind(this),i.addEventListener("enter-vr",this.onEnterVR),i.addEventListener("exit-vr",this.onExitVR)},update:function(e){var t=this.el,i=this.data,s=this.camera,n=this.system;this.addHeightOffset(e.userHeight),s.aspect=i.aspect||window.innerWidth/window.innerHeight,s.far=i.far,s.fov=i.fov,s.near=i.near,s.zoom=i.zoom,s.updateProjectionMatrix(),e&&e.active===i.active||(i.active&&n.activeCameraEl!==t?n.setActiveCamera(t):i.active||n.activeCameraEl!==t||n.disableActiveCamera())},remove:function(){var e=this.el.sceneEl;this.el.removeObject3D("camera"),e.removeEventListener("enter-vr",this.onEnterVR),e.removeEventListener("exit-vr",this.onExitVR)},onEnterVR:function(){this.saveCameraPose(),this.removeHeightOffset()},onExitVR:function(){this.restoreCameraPose()},addHeightOffset:function(e){var t,i=this.el,s=this.data.userHeight;e=e||0,t=i.getComputedAttribute("position")||{x:0,y:0,z:0},i.setAttribute("position",{x:t.x,y:t.y-e+s,z:t.z})},removeHeightOffset:function(){var e,t,i=this.el,s=i.sceneEl,n=this.data.userHeight;t=this.headsetConnected||checkHeadsetConnected(),!s.isMobile&&n&&t&&(e=i.getAttribute("position")||{x:0,y:0,z:0},i.setAttribute("position",{x:e.x,y:e.y-n,z:e.z}))},saveCameraPose:function(){var e=this.el,t=this.headsetConnected||checkHeadsetConnected();!this.savedPose&&t&&(this.savedPose={position:e.getAttribute("position"),rotation:e.getAttribute("rotation")})},restoreCameraPose:function(){var e=this.el,t=this.savedPose,i=this.headsetConnected||checkHeadsetConnected();t&&i&&(e.setAttribute("position",t.position),e.setAttribute("rotation",t.rotation),this.savedPose=null)}}); +},{"../core/component":59,"../lib/three":103,"../utils/":120}],23:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three");module.exports.Component=registerComponent("collada-model",{schema:{type:"src"},init:function(){this.model=null,this.loader=new THREE.ColladaLoader,this.loader.options.convertUpAxis=!0},update:function(){var e=this,o=this.el,t=this.data;t&&(this.remove(),this.loader.load(t,function(t){e.model=t.scene,o.setObject3D("mesh",e.model),o.emit("model-loaded",{format:"collada",model:e.model})}))},remove:function(){this.model&&this.el.removeObject3D("mesh")}}); +},{"../core/component":59,"../lib/three":103}],24:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent,utils=_dereq_("../utils/"),EVENTS={CLICK:"click",MOUSEENTER:"mouseenter",MOUSEDOWN:"mousedown",MOUSELEAVE:"mouseleave",MOUSEUP:"mouseup"},STATES={FUSING:"cursor-fusing",HOVERING:"cursor-hovering",HOVERED:"cursor-hovered"};module.exports.Component=registerComponent("cursor",{dependencies:["raycaster"],schema:{fuse:{default:utils.isMobile()},fuseTimeout:{default:1500,min:0}},init:function(){var e=this.el,t=e.sceneEl.canvas;return this.fuseTimeout=void 0,this.mouseDownEl=null,this.intersectedEl=null,t?(t.addEventListener("mousedown",this.onMouseDown.bind(this)),t.addEventListener("mouseup",this.onMouseUp.bind(this)),e.addEventListener("raycaster-intersection",this.onIntersection.bind(this)),void e.addEventListener("raycaster-intersection-cleared",this.onIntersectionCleared.bind(this))):void e.sceneEl.addEventListener("render-target-loaded",this.init.bind(this))},onMouseDown:function(e){this.twoWayEmit(EVENTS.MOUSEDOWN),this.mouseDownEl=this.intersectedEl},onMouseUp:function(){this.twoWayEmit(EVENTS.MOUSEUP),!this.data.fuse&&this.intersectedEl&&this.mouseDownEl===this.intersectedEl&&this.twoWayEmit(EVENTS.CLICK)},onIntersection:function(e){var t=this,i=this.el,s=this.data,n=e.detail.els[0];this.intersectedEl!==n&&(this.intersectedEl=n,i.addState(STATES.HOVERING),n.addState(STATES.HOVERED),t.twoWayEmit(EVENTS.MOUSEENTER),0!==s.fuseTimeout&&s.fuse&&(i.addState(STATES.FUSING),this.fuseTimeout=setTimeout(function(){i.removeState(STATES.FUSING),t.twoWayEmit(EVENTS.CLICK)},s.fuseTimeout)))},onIntersectionCleared:function(e){var t=this.el,i=e.detail.el;i&&this.intersectedEl&&(i.removeState(STATES.HOVERED),t.removeState(STATES.HOVERING),t.removeState(STATES.FUSING),this.twoWayEmit(EVENTS.MOUSELEAVE),this.intersectedEl=null,clearTimeout(this.fuseTimeout))},twoWayEmit:function(e){var t=this.intersectedEl;this.el.emit(e,{intersectedEl:this.intersectedEl}),t&&t.emit(e,{cursorEl:this.el})}}); +},{"../core/component":59,"../utils/":120}],25:[function(_dereq_,module,exports){ +var debug=_dereq_("../utils/debug"),geometries=_dereq_("../core/geometry").geometries,geometryNames=_dereq_("../core/geometry").geometryNames,registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),dummyGeometry=new THREE.Geometry,warn=debug("components:geometry:warn");module.exports.Component=registerComponent("geometry",{schema:{buffer:{default:!0},mergeTo:{type:"selector"},primitive:{default:"box",oneOf:geometryNames},skipCache:{default:!1}},init:function(){this.geometry=null},update:function(e){var t=this.data,r=this.el.getOrCreateObject3D("mesh",THREE.Mesh),o=this.system;this.geometry&&(o.unuseGeometry(e),this.geometry=null),this.geometry=r.geometry=o.getOrCreateGeometry(t),t.mergeTo&&this.mergeTo(t.mergeTo)},mergeTo:function(e){var t,r=this.el,o=r.getObject3D("mesh");return e?e===r?void warn("Source and target geometries cannot be the same for merge"):(t=e.getObject3D("mesh"))?t.geometry instanceof THREE.Geometry==!1||o.geometry instanceof THREE.Geometry==!1?void warn("Geometry merge is only available for `THREE.Geometry` types. Check that both of the merging geometry and the target geometry have `buffer` set to false"):this.data.skipCache===!1?void warn("Cached geometries are not allowed to merge. Set `skipCache` to true"):(o.parent.updateMatrixWorld(),t.geometry.merge(o.geometry,o.matrixWorld),r.emit("geometry-merged",{mergeTarget:e}),void r.parentNode.removeChild(r)):(t=e.getOrCreateObject3D("mesh",THREE.Mesh),void e.setAttribute("material",r.getComputedAttribute("material"))):void warn("There is not a valid entity to merge the geometry to")},remove:function(){this.system.unuseGeometry(this.data),this.el.getObject3D("mesh").geometry=dummyGeometry,this.geometry=null},updateSchema:function(e){var t=e.primitive,r=this.data&&this.data.primitive,o=geometries[t]&&geometries[t].schema;if(!o)throw new Error("Unknown geometry schema `"+t+"`");r&&r===t||this.extendSchema(o)}}); +},{"../core/component":59,"../core/geometry":60,"../lib/three":103,"../utils/debug":117}],26:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent,LEFT_HAND_MODEL_URL="https://cdn.aframe.io/controllers/hands/leftHand.json",RIGHT_HAND_MODEL_URL="https://cdn.aframe.io/controllers/hands/rightHand.json";module.exports.Component=registerComponent("hand-controls",{schema:{default:"left"},init:function(){var t=this;this.onGripDown=function(){t.handleButton("grip","down")},this.onGripUp=function(){t.handleButton("grip","up")},this.onTrackpadDown=function(){t.handleButton("trackpad","down")},this.onTrackpadUp=function(){t.handleButton("trackpad","up")},this.onTriggerDown=function(){t.handleButton("trigger","down")},this.onTriggerUp=function(){t.handleButton("trigger","up")}},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},addEventListeners:function(){var t=this.el;t.addEventListener("gripdown",this.onGripDown),t.addEventListener("gripup",this.onGripUp),t.addEventListener("trackpaddown",this.onTrackpadDown),t.addEventListener("trackpadup",this.onTrackpadUp),t.addEventListener("triggerdown",this.onTriggerDown),t.addEventListener("triggerup",this.onTriggerUp)},removeEventListeners:function(){var t=this.el;t.removeEventListener("gripdown",this.onGripDown),t.removeEventListener("gripup",this.onGripUp),t.removeEventListener("trackpaddown",this.onTrackpadDown),t.removeEventListener("trackpadup",this.onTrackpadUp),t.removeEventListener("triggerdown",this.onTriggerDown),t.removeEventListener("triggerup",this.onTriggerUp)},update:function(){var t,e=this.el,n=this.data;t="left"===n?"url("+LEFT_HAND_MODEL_URL+")":"url("+RIGHT_HAND_MODEL_URL+")",e.setAttribute("vive-controls",{hand:n,model:!1}),e.setAttribute("blend-character-model",t)},handleButton:function(t,e){var n=this.el,i="down"===e;switch(t){case"trackpad":if(i===this.trackpadPressed)return;this.trackpadPressed=i,this.playAnimation("thumb",!i),e=i?"thumbup":"thumbdown",n.emit(e);break;case"trigger":if(i===this.triggerPressed)return;this.triggerPressed=i,this.playAnimation("pointing",!i),e=i?"pointup":"pointdown",n.emit(e);break;case"grip":if(i===this.gripPressed)return;this.gripPressed=i,this.playAnimation("close",!i),e=i?"gripclose":"gripopen",n.emit(e)}},playAnimation:function(t,e){var n=this.animationActive,i=1,r=this.el.getObject3D("mesh");r&&(e&&(i=-1),n&&r.play(n,0),r.mixer.clipAction(t).loop=2200,r.mixer.clipAction(t).clampWhenFinished=!0,r.mixer.clipAction(t).timeScale=i,r.play(t,1),this.animationActive=t)}}); +},{"../core/component":59}],27:[function(_dereq_,module,exports){ +_dereq_("./blend-character-model"),_dereq_("./camera"),_dereq_("./collada-model"),_dereq_("./cursor"),_dereq_("./geometry"),_dereq_("./hand-controls"),_dereq_("./light"),_dereq_("./look-at"),_dereq_("./look-controls"),_dereq_("./material"),_dereq_("./obj-model"),_dereq_("./position"),_dereq_("./raycaster"),_dereq_("./rotation"),_dereq_("./scale"),_dereq_("./sound"),_dereq_("./tracked-controls"),_dereq_("./visible"),_dereq_("./vive-controls"),_dereq_("./wasd-controls"),_dereq_("./scene/canvas"),_dereq_("./scene/debug"),_dereq_("./scene/embedded"),_dereq_("./scene/inspector"),_dereq_("./scene/fog"),_dereq_("./scene/keyboard-shortcuts"),_dereq_("./scene/stats"),_dereq_("./scene/vr-mode-ui"); +},{"./blend-character-model":21,"./camera":22,"./collada-model":23,"./cursor":24,"./geometry":25,"./hand-controls":26,"./light":28,"./look-at":29,"./look-controls":30,"./material":31,"./obj-model":32,"./position":33,"./raycaster":34,"./rotation":35,"./scale":36,"./scene/canvas":37,"./scene/debug":38,"./scene/embedded":39,"./scene/fog":40,"./scene/inspector":41,"./scene/keyboard-shortcuts":42,"./scene/stats":43,"./scene/vr-mode-ui":44,"./sound":45,"./tracked-controls":46,"./visible":47,"./vive-controls":48,"./wasd-controls":49}],28:[function(_dereq_,module,exports){ +var diff=_dereq_("../utils").diff,debug=_dereq_("../utils/debug"),registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),degToRad=THREE.Math.degToRad,warn=debug("components:light:warn");module.exports.Component=registerComponent("light",{schema:{angle:{default:60,if:{type:["spot"]}},color:{type:"color"},groundColor:{type:"color",if:{type:["hemisphere"]}},decay:{default:1,if:{type:["point","spot"]}},distance:{default:0,min:0,if:{type:["point","spot"]}},intensity:{default:1,min:0,if:{type:["ambient","directional","hemisphere","point","spot"]}},penumbra:{default:0,min:0,max:1,if:{type:["spot"]}},type:{default:"directional",oneOf:["ambient","directional","hemisphere","point","spot"]},target:{type:"selector",if:{type:["spot","directional"]}}},init:function(){var t=this.el;this.light=null,this.defaultTarget=null,this.system.registerLight(t)},update:function(t){var e=this.data,i=diff(e,t),o=this.light,r=this;return!o||"type"in i?void this.setLight(this.data):void Object.keys(i).forEach(function(t){var i=e[t];switch(t){case"color":o.color.set(i);break;case"groundcolor":o.groundColor.set(i);break;case"angle":o.angle=degToRad(i);break;case"target":null===i?"spot"!==e.type&&"directional"!==e.type||(o.target=r.defaultTarget):i.hasLoaded?r.onSetTarget(i):i.addEventListener("loaded",r.onSetTarget.bind(r,i));break;default:o[t]=i}})},setLight:function(t){var e=this.el,i=this.getLight(t);i&&(this.light&&e.removeObject3D("light"),this.light=i,this.light.el=e,e.setObject3D("light",this.light),"spot"!==t.type&&"directional"!==t.type&&"hemisphere"!==t.type||e.getObject3D("light").translateY(-1),"spot"===t.type&&(e.setObject3D("light-target",this.defaultTarget),e.getObject3D("light-target").position.set(0,0,-1)))},getLight:function(t){var e=t.angle,i=new THREE.Color(t.color).getHex(),o=t.decay,r=t.distance,a=new THREE.Color(t.groundColor).getHex(),n=t.intensity,s=t.type,l=t.target,h=null;switch(s.toLowerCase()){case"ambient":return new THREE.AmbientLight(i,n);case"directional":return h=new THREE.DirectionalLight(i,n),this.defaultTarget=h.target,l&&(l.hasLoaded?this.onSetTarget(l):l.addEventListener("loaded",this.onSetTarget.bind(this,l))),h;case"hemisphere":return new THREE.HemisphereLight(i,a,n);case"point":return new THREE.PointLight(i,n,r,o);case"spot":return h=new THREE.SpotLight(i,n,r,degToRad(e),t.penumbra,o),this.defaultTarget=h.target,l&&(l.hasLoaded?this.onSetTarget(l):l.addEventListener("loaded",this.onSetTarget.bind(this,l))),h;default:warn("%s is not a valid light type. Choose from ambient, directional, hemisphere, point, spot.",s)}},onSetTarget:function(t){this.light.target=t.object3D},remove:function(){this.el.removeObject3D("light")}}); +},{"../core/component":59,"../lib/three":103,"../utils":120,"../utils/debug":117}],29:[function(_dereq_,module,exports){ +var debug=_dereq_("../utils/debug"),coordinates=_dereq_("../utils/coordinates"),registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),warn=debug("components:look-at:warn"),isCoordinate=coordinates.isCoordinate;module.exports.Component=registerComponent("look-at",{schema:{default:"",parse:function(e){return isCoordinate(e)||"object"==typeof e?coordinates.parse(e):e},stringify:function(e){return"object"==typeof e?coordinates.stringify(e):e}},init:function(){this.target3D=null,this.vector=new THREE.Vector3,warn("The `look-at` component is deprecated - use https://github.com/ngokevin/aframe-look-at-component instead.")},update:function(){var e,t=this,o=t.data,n=t.el.object3D;return!o||"object"==typeof o&&!Object.keys(o).length?t.remove():"object"==typeof o?n.lookAt(new THREE.Vector3(o.x,o.y,o.z)):(e=t.el.sceneEl.querySelector(o),e?e.hasLoaded?t.beginTracking(e):e.addEventListener("loaded",function(){t.beginTracking(e)}):void warn('"'+o+'" does not point to a valid entity to look-at'))},tick:function(e){var t=this.target3D;if(t)return this.el.object3D.lookAt(this.vector.setFromMatrixPosition(t.matrixWorld))},beginTracking:function(e){this.target3D=e.object3D}}); +},{"../core/component":59,"../lib/three":103,"../utils/coordinates":116,"../utils/debug":117}],30:[function(_dereq_,module,exports){ +function isNullVector(t){return 0===t.x&&0===t.y&&0===t.z}var registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),isMobile=_dereq_("../utils/").isMobile(),PI_2=Math.PI/2,radToDeg=THREE.Math.radToDeg;module.exports.Component=registerComponent("look-controls",{dependencies:["position","rotation"],schema:{enabled:{default:!0},hmdEnabled:{default:!0},standing:{default:!0}},init:function(){function t(){e.canvas.classList.add("a-grab-cursor")}var e=this.el.sceneEl;this.previousHMDPosition=new THREE.Vector3,this.setupMouseControls(),this.setupHMDControls(),this.bindMethods(),e.canvas?t():e.addEventListener("render-target-loaded",t)},update:function(t){var e=this.data,o=e.hmdEnabled;e.enabled&&(!o&&t&&o!==t.hmdEnabled&&(this.pitchObject.rotation.set(0,0,0),this.yawObject.rotation.set(0,0,0)),this.controls.standing=e.standing,this.controls.update(),this.updateOrientation(),this.updatePosition())},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners()},tick:function(t){this.update()},remove:function(){this.pause()},bindMethods:function(){this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.releaseMouse=this.releaseMouse.bind(this),this.onTouchStart=this.onTouchStart.bind(this),this.onTouchMove=this.onTouchMove.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this)},setupMouseControls:function(){this.mouseDown=!1,this.pitchObject=new THREE.Object3D,this.yawObject=new THREE.Object3D,this.yawObject.position.y=10,this.yawObject.add(this.pitchObject)},setupHMDControls:function(){this.dolly=new THREE.Object3D,this.euler=new THREE.Euler,this.controls=new THREE.VRControls(this.dolly),this.controls.userHeight=0},addEventListeners:function(){var t=this.el.sceneEl,e=t.canvas;return e?(e.addEventListener("mousedown",this.onMouseDown,!1),window.addEventListener("mousemove",this.onMouseMove,!1),window.addEventListener("mouseup",this.releaseMouse,!1),e.addEventListener("touchstart",this.onTouchStart),window.addEventListener("touchmove",this.onTouchMove),void window.addEventListener("touchend",this.onTouchEnd)):void t.addEventListener("render-target-loaded",this.addEventListeners.bind(this))},removeEventListeners:function(){var t=this.el.sceneEl,e=t&&t.canvas;e&&(e.removeEventListener("mousedown",this.onMouseDown),e.removeEventListener("mousemove",this.onMouseMove),e.removeEventListener("mouseup",this.releaseMouse),e.removeEventListener("mouseout",this.releaseMouse),e.removeEventListener("touchstart",this.onTouchStart),e.removeEventListener("touchmove",this.onTouchMove),e.removeEventListener("touchend",this.onTouchEnd))},updateOrientation:function(){var t=new THREE.Euler;return function(){var e,o,n,i=this.pitchObject,s=this.yawObject,r=this.calculateHMDQuaternion(),a=this.el.sceneEl;t.setFromQuaternion(r,"YXZ"),isMobile?n={x:radToDeg(t.x)+radToDeg(i.rotation.x),y:radToDeg(t.y)+radToDeg(s.rotation.y),z:radToDeg(t.z)}:a.is("vr-mode")&&!isNullVector(t)&&this.data.hmdEnabled?n={x:radToDeg(t.x),y:radToDeg(t.y),z:radToDeg(t.z)}:(e=this.el.getComputedAttribute("rotation"),o=this.calculateDeltaRotation(),n={x:e.x+o.x,y:e.y+o.y,z:e.z}),this.el.setAttribute("rotation",n)}}(),calculateDeltaRotation:function(){var t,e;return function(){var o,n=radToDeg(this.pitchObject.rotation.x),i=radToDeg(this.yawObject.rotation.y);return t=t||n,e=e||i,o={x:n-t,y:i-e},t=n,e=i,o}}(),calculateHMDQuaternion:function(){var t=new THREE.Quaternion;return function(){return t.copy(this.dolly.quaternion),t}}(),updatePosition:function(){var t=new THREE.Vector3;return function(){var e,o=this.el,n=o.getComputedAttribute("position"),i=this.previousHMDPosition,s=this.el.sceneEl;e=this.calculateHMDPosition(),t.copy(e).sub(i),s.is("vr-mode")&&!isNullVector(t)&&(i.copy(e),s.is("vr-mode")&&o.setAttribute("position",{x:n.x+t.x,y:n.y+t.y,z:n.z+t.z}))}}(),calculateHMDPosition:function(){var t=this.dolly,e=new THREE.Vector3;return t.updateMatrix(),e.setFromMatrixPosition(t.matrix),e},onMouseMove:function(t){var e=this.pitchObject,o=this.yawObject,n=this.previousMouseEvent;if(this.mouseDown&&this.data.enabled){var i=t.movementX||t.mozMovementX,s=t.movementY||t.mozMovementY;void 0!==i&&void 0!==s||(i=t.screenX-n.screenX,s=t.screenY-n.screenY),this.previousMouseEvent=t,o.rotation.y-=.002*i,e.rotation.x-=.002*s,e.rotation.x=Math.max(-PI_2,Math.min(PI_2,e.rotation.x))}},onMouseDown:function(t){this.mouseDown=!0,this.previousMouseEvent=t,document.body.classList.add("a-grabbing")},releaseMouse:function(){this.mouseDown=!1,document.body.classList.remove("a-grabbing")},onTouchStart:function(t){1===t.touches.length&&(this.touchStart={x:t.touches[0].pageX,y:t.touches[0].pageY},this.touchStarted=!0)},onTouchMove:function(t){var e,o=this.yawObject;this.touchStarted&&(e=2*Math.PI*(t.touches[0].pageX-this.touchStart.x)/this.el.sceneEl.canvas.clientWidth,o.rotation.y-=.5*e,this.touchStart={x:t.touches[0].pageX,y:t.touches[0].pageY})},onTouchEnd:function(){this.touchStarted=!1}}); +},{"../core/component":59,"../lib/three":103,"../utils/":120}],31:[function(_dereq_,module,exports){ +function parseSide(e){switch(e){case"back":return THREE.BackSide;case"double":return THREE.DoubleSide;default:return THREE.FrontSide}}function disposeMaterial(e,a){e.dispose(),a.unregisterMaterial(e)}var utils=_dereq_("../utils/"),component=_dereq_("../core/component"),THREE=_dereq_("../lib/three"),shader=_dereq_("../core/shader"),error=utils.debug("components:material:error"),registerComponent=component.registerComponent,shaders=shader.shaders,shaderNames=shader.shaderNames;module.exports.Component=registerComponent("material",{schema:{depthTest:{default:!0},flatShading:{default:!1},opacity:{default:1,min:0,max:1},shader:{default:"standard",oneOf:shaderNames},side:{default:"front",oneOf:["front","back","double"]},transparent:{default:!1},visible:{default:!0}},init:function(){this.material=null},update:function(e){var a=this.data;this.shader&&a.shader===e.shader||this.updateShader(a.shader),this.shader.update(this.data),this.updateMaterial()},updateSchema:function(e){var a=e.shader,t=this.data&&this.data.shader,r=a||t,s=shaders[r]&&shaders[r].schema;s||error("Unknown shader schema "+r),t&&a===t||(this.extendSchema(s),this.updateBehavior())},updateBehavior:function(){var e=this.el.sceneEl,a=this.schema,t=this,r={},s=function(e,a){function s(a){r[a]=e}var i=Object.keys(r);i.forEach(s),t.shader.update(r)},i=Object.keys(a);i.forEach(function(i){"time"===a[i].type&&(t.tick=s,r[i]=!0,e.addBehavior(t))}),0===Object.keys(r).length&&e.removeBehavior(this)},updateShader:function(e){var a,t=this.data,r=shaders[e]&&shaders[e].Shader;if(!r)throw new Error("Unknown shader "+e);a=this.shader=new r,a.el=this.el,a.init(t),this.setMaterial(a.material),this.updateSchema(t)},updateMaterial:function(){var e=this.data,a=this.material;a.side=parseSide(e.side),a.opacity=e.opacity,a.transparent=e.transparent!==!1||e.opacity<1,a.depthTest=e.depthTest!==!1,a.shading=e.flatShading?THREE.FlatShading:THREE.SmoothShading,a.visible=e.visible},remove:function(){var e=new THREE.MeshBasicMaterial,a=this.material,t=this.el.getObject3D("mesh");t&&(t.material=e),disposeMaterial(a,this.system)},setMaterial:function(e){var a=this.el.getOrCreateObject3D("mesh",THREE.Mesh),t=this.system;this.material&&disposeMaterial(this.material,t),this.material=a.material=e,t.registerMaterial(e)}}); +},{"../core/component":59,"../core/shader":67,"../lib/three":103,"../utils/":120}],32:[function(_dereq_,module,exports){ +var debug=_dereq_("../utils/debug"),registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),warn=debug("components:obj-model:warn");module.exports.Component=registerComponent("obj-model",{dependencies:["material"],schema:{mtl:{type:"src"},obj:{type:"src"}},init:function(){this.model=null,this.objLoader=new THREE.OBJLoader,this.mtlLoader=new THREE.MTLLoader(this.objLoader.manager),this.mtlLoader.crossOrigin=""},update:function(){var e=this.data;e.obj&&(this.remove(),this.loadObj(e.obj,e.mtl))},remove:function(){this.model&&this.el.removeObject3D("mesh")},loadObj:function(e,o){var t=this,r=this.el,a=this.mtlLoader,i=this.objLoader;return o?(r.hasAttribute("material")&&warn("Material component properties are ignored when a .MTL is provided"),a.setBaseUrl(o.substr(0,o.lastIndexOf("/")+1)),void a.load(o,function(o){o.preload(),i.setMaterials(o),i.load(e,function(e){t.model=e,r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})})})):void i.load(e,function(e){var o=r.components.material;o&&e.traverse(function(e){e instanceof THREE.Mesh&&(e.material=o.material)}),t.model=e,r.setObject3D("mesh",e),r.emit("model-loaded",{format:"obj",model:e})})}}); +},{"../core/component":59,"../lib/three":103,"../utils/debug":117}],33:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent;module.exports.Component=registerComponent("position",{schema:{type:"vec3"},update:function(){var e=this.el.object3D,o=this.data;e.position.set(o.x,o.y,o.z)}}); +},{"../core/component":59}],34:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),scaleDummy=new THREE.Vector3;module.exports.Component=registerComponent("raycaster",{schema:{far:{default:1/0},interval:{default:100},near:{default:0},objects:{default:""},recursive:{default:!0}},init:function(){this.direction=new THREE.Vector3,this.intersectedEls=[],this.objects=null,this.prevCheckTime=void 0,this.raycaster=new THREE.Raycaster,this.updateOriginDirection()},update:function(){var e=this.data,t=this.raycaster;t.far=e.far,t.near=e.near,this.refreshObjects()},refreshObjects:function(){var e,t,i=this.data;if(i.objects)for(t=this.el.sceneEl.querySelectorAll(i.objects),this.objects=[],e=0;e")},remove:function(){var e=this.el.object3D.fog;e&&(e.density=0,e.far=0,e.near=0)}}); +},{"../../core/component":59,"../../lib/three":103,"../../utils/debug":117}],41:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../../core/component").registerComponent,pkg=_dereq_("../../../package"),INSPECTOR_URL=pkg.homepage+"releases/"+pkg.version+"/aframe-inspector.min.js";module.exports.Component=registerComponent("inspector",{schema:{url:{default:INSPECTOR_URL}},init:function(){this.onKeydown=this.onKeydown.bind(this),window.addEventListener("keydown",this.onKeydown)},onKeydown:function(e){var n=73===e.keyCode&&e.ctrlKey&&e.altKey;this.data&&n&&this.injectInspector()},injectInspector:function(){var e,n=this;AFRAME.INSPECTOR||AFRAME.inspectorInjected||(e=document.createElement("script"),e.src=this.data.url,e.onload=function(){AFRAME.INSPECTOR.open(),window.removeEventListener("keydown",n.onKeydown)},document.head.appendChild(e),AFRAME.inspectorInjected=!0)},remove:function(){window.removeEventListener("keydown",this.onKeydown)}}); +},{"../../../package":20,"../../core/component":59}],42:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../../core/component").registerComponent,shouldCaptureKeyEvent=_dereq_("../../utils/").shouldCaptureKeyEvent,THREE=_dereq_("../../lib/three"),controls=new THREE.VRControls(new THREE.Object3D);module.exports.Component=registerComponent("keyboard-shortcuts",{schema:{enterVR:{default:!0},exitVR:{default:!0},resetSensor:{default:!0}},init:function(){var e=this,t=this.el;this.listener=window.addEventListener("keyup",function(n){shouldCaptureKeyEvent(n)&&(e.enterVREnabled&&70===n.keyCode&&t.enterVR(),e.enterVREnabled&&27===n.keyCode&&t.exitVR(),e.resetSensorEnabled&&90===n.keyCode&&controls.resetSensor())},!1)},update:function(e){var t=this.data;this.enterVREnabled=t.enterVR,this.resetSensorEnabled=t.resetSensor},remove:function(){window.removeEventListener("keyup",this.listener)}}); +},{"../../core/component":59,"../../lib/three":103,"../../utils/":120}],43:[function(_dereq_,module,exports){ +function createStats(t){var e=new ThreeStats(t.renderer),s=new AFrameStats(t),r=t.isMobile?[]:[e,s];return new RStats({css:[],values:{fps:{caption:"fps",below:30}},groups:[{caption:"Framerate",values:["fps","raf"]}],plugins:r})}var registerComponent=_dereq_("../../core/component").registerComponent,RStats=_dereq_("../../../vendor/rStats");_dereq_("../../../vendor/rStats.extras"),_dereq_("../../lib/rStatsAframe");var HIDDEN_CLASS="a-hidden",ThreeStats=window.threeStats,AFrameStats=window.aframeStats;module.exports.Component=registerComponent("stats",{schema:{default:!0},init:function(){var t=this.el;this.stats=createStats(t),this.statsEl=document.querySelector(".rs-base"),this.hideBound=this.hide.bind(this),this.showBound=this.show.bind(this),t.addEventListener("enter-vr",this.hideBound),t.addEventListener("exit-vr",this.showBound)},update:function(){return this.data?this.show():this.hide()},remove:function(){this.el.removeEventListener("enter-vr",this.hideBound),this.el.removeEventListener("exit-vr",this.showBound),this.statsEl.parentNode.removeChild(this.statsEl)},tick:function(){var t=this.stats;t("rAF").tick(),t("FPS").frame(),t().update()},hide:function(){this.statsEl.classList.add(HIDDEN_CLASS)},show:function(){this.statsEl.classList.remove(HIDDEN_CLASS)}}); +},{"../../../vendor/rStats":127,"../../../vendor/rStats.extras":126,"../../core/component":59,"../../lib/rStatsAframe":102}],44:[function(_dereq_,module,exports){ +function createEnterVRButton(e){var t,n;return n=document.createElement("div"),n.classList.add(ENTER_VR_CLASS),n.setAttribute(constants.AFRAME_INJECTED,""),t=document.createElement("button"),t.className=ENTER_VR_BTN_CLASS,t.setAttribute(constants.AFRAME_INJECTED,""),n.appendChild(t),t.addEventListener("click",e),n}function createOrientationModal(e){var t=document.createElement("div");t.className=ORIENTATION_MODAL_CLASS,t.classList.add(HIDDEN_CLASS),t.setAttribute(constants.AFRAME_INJECTED,"");var n=document.createElement("button");return n.setAttribute(constants.AFRAME_INJECTED,""),n.innerHTML="Exit VR",n.addEventListener("click",e),t.appendChild(n),t}var registerComponent=_dereq_("../../core/component").registerComponent,constants=_dereq_("../../constants/"),utils=_dereq_("../../utils/"),ENTER_VR_CLASS="a-enter-vr",ENTER_VR_BTN_CLASS="a-enter-vr-button",HIDDEN_CLASS="a-hidden",ORIENTATION_MODAL_CLASS="a-orientation-modal";module.exports.Component=registerComponent("vr-mode-ui",{dependencies:["canvas"],schema:{enabled:{default:!0}},init:function(){var e=this,t=this.el;"false"!==utils.getUrlParameter("ui")&&(this.enterVR=t.enterVR.bind(t),this.exitVR=t.exitVR.bind(t),this.insideLoader=!1,this.enterVREl=null,this.orientationModalEl=null,t.addEventListener("enter-vr",this.updateEnterVRInterface.bind(this)),t.addEventListener("exit-vr",this.updateEnterVRInterface.bind(this)),window.addEventListener("message",function(t){"loaderReady"===t.data.type&&(e.insideLoader=!0,e.remove())}),window.addEventListener("orientationchange",this.toggleOrientationModalIfNeeded.bind(this)))},update:function(){var e=this.el;return!this.data.enabled||this.insideLoader||"false"===utils.getUrlParameter("ui")?this.remove():void(this.enterVREl||this.orientationModalEl||(this.enterVREl=createEnterVRButton(this.enterVR),e.appendChild(this.enterVREl),this.orientationModalEl=createOrientationModal(this.exitVR),e.appendChild(this.orientationModalEl),this.updateEnterVRInterface()))},remove:function(){[this.enterVREl,this.orientationModalEl].forEach(function(e){e&&e.parentNode.removeChild(e)})},updateEnterVRInterface:function(){this.toggleEnterVRButtonIfNeeded(),this.toggleOrientationModalIfNeeded()},toggleEnterVRButtonIfNeeded:function(){var e=this.el;this.enterVREl&&(e.is("vr-mode")?this.enterVREl.classList.add(HIDDEN_CLASS):this.enterVREl.classList.remove(HIDDEN_CLASS))},toggleOrientationModalIfNeeded:function(){var e=this.el,t=this.orientationModalEl;t&&e.isMobile&&(!utils.isLandscape()&&e.is("vr-mode")?t.classList.remove(HIDDEN_CLASS):t.classList.add(HIDDEN_CLASS))}}); +},{"../../constants/":51,"../../core/component":59,"../../utils/":120}],45:[function(_dereq_,module,exports){ +var debug=_dereq_("../utils/debug"),registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three"),warn=debug("components:sound:warn");module.exports.Component=registerComponent("sound",{schema:{src:{type:"src"},on:{default:""},autoplay:{default:!1},loop:{default:!1},volume:{default:1}},multiple:!0,init:function(){this.listener=null,this.audioLoader=new THREE.AudioLoader,this.sound=null,this.playSound=this.playSound.bind(this)},update:function(e){var t=this.data,n=this.sound,o=t.src!==e.src;if(o){if(!t.src)return void warn("Audio source was not specified with `src`");n=this.setupSound()}n.autoplay=t.autoplay,n.setLoop(t.loop),n.setVolume(t.volume),t.on!==e.on&&this.updateEventListener(e.on),o&&this.audioLoader.load(t.src,function(e){n.setBuffer(e),THREE.Cache.remove(t.src)})},updateEventListener:function(e){var t=this.el;e&&t.removeEventListener(e,this.playSound),t.addEventListener(this.data.on,this.playSound)},removeEventListener:function(){this.el.removeEventListener(this.data.on,this.playSound)},remove:function(){this.removeEventListener(),this.el.removeObject3D(this.attrName);try{this.sound.disconnect()}catch(e){warn("Audio source not properly disconnected")}},play:function(){this.sound&&(this.sound.source.buffer&&this.data.autoplay&&this.sound.play(),this.updateEventListener())},pause:function(){this.sound&&(this.sound.source.buffer&&this.sound.isPlaying&&this.sound.pause(),this.removeEventListener())},setupSound:function(){var e=this.el,t=e.sceneEl,n=this.sound;n&&(this.stopSound(),e.removeObject3D("sound"));var o=this.listener=t.audioListener||new THREE.AudioListener;return t.audioListener=o,t.camera&&t.camera.add(o),t.addEventListener("camera-set-active",function(e){e.detail.cameraEl.getObject3D("camera").add(o)}),n=this.sound=new THREE.PositionalAudio(o),e.setObject3D(this.attrName,n),n.source.onended=function(){n.onEnded(),e.emit("sound-ended")},n},playSound:function(){this.sound.source.buffer&&this.sound.play()},stopSound:function(){this.sound.source.buffer&&this.sound.stop()}}); +},{"../core/component":59,"../lib/three":103,"../utils/debug":117}],46:[function(_dereq_,module,exports){ +var registerComponent=_dereq_("../core/component").registerComponent,THREE=_dereq_("../lib/three");module.exports.Component=registerComponent("tracked-controls",{schema:{controller:{default:0},id:{default:"OpenVR Gamepad"}},init:function(){this.buttonStates={},this.axisState=[]},update:function(){function t(t){return t.id===r.id}var e=this.system.controllers,r=this.data;e=e.filter(t),this.controller=e[r.controller]},tick:function(t,e){var r=this.el.getObject3D("mesh");r&&(r.update&&r.update(e/1e3),this.updatePose(),this.updateButtons())},updatePose:function(){var t=new THREE.Euler,e=new THREE.Vector3,r=new THREE.Quaternion,o=new THREE.Object3D,n=new THREE.Matrix4;return t.order="YXZ",function(){var i,a,s,u,h=this.el,d=this.system.vrDisplay;this.update(),i=this.controller,i&&(a=i.pose,s=a.orientation||[0,0,0,1],u=a.position||[0,0,0],r.fromArray(s),o.quaternion.fromArray(s),o.position.fromArray(u),o.updateMatrix(),d&&d.stageParameters&&(n.fromArray(d.stageParameters.sittingToStandingTransform),o.applyMatrix(n)),t.setFromRotationMatrix(o.matrix),e.setFromMatrixPosition(o.matrix),h.setAttribute("rotation",{x:THREE.Math.radToDeg(t.x),y:THREE.Math.radToDeg(t.y),z:THREE.Math.radToDeg(t.z)}),h.setAttribute("position",{x:e.x,y:e.y,z:e.z}))}}(),updateButtons:function(){var t,e,r=this.controller;if(this.controller){for(t=0;tMAX_DELTA)return o[h]=0,void(o[l]=0);o[h]-=o[h]*s*u,o[l]-=o[l]*s*u;var E=v.getComputedAttribute("position");i.enabled&&(i.adEnabled&&(d[65]&&(o[h]-=y*n*u),d[68]&&(o[h]+=y*n*u)),i.wsEnabled&&(d[87]&&(o[l]-=c*n*u),d[83]&&(o[l]+=c*n*u))),t=this.getMovementVector(u),v.object3D.translateX(t.x),v.object3D.translateY(t.y),v.object3D.translateZ(t.z),v.setAttribute("position",{x:E.x+t.x,y:E.y+t.y,z:E.z+t.z})},play:function(){this.attachKeyEventListeners()},pause:function(){this.keys={},this.removeKeyEventListeners()},tick:function(e){this.update()},remove:function(){this.pause(),this.removeVisibilityEventListeners()},attachVisibilityEventListeners:function(){window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus),document.addEventListener("visibilitychange",this.onVisibilityChange)},removeVisibilityEventListeners:function(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),document.removeEventListener("visibilitychange",this.onVisibilityChange)},attachKeyEventListeners:function(){window.addEventListener("keydown",this.onKeyDown),window.addEventListener("keyup",this.onKeyUp)},removeKeyEventListeners:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp)},onBlur:function(){this.pause()},onFocus:function(){this.play()},onVisibilityChange:function(){document.hidden?this.onBlur():this.onFocus()},onKeyDown:function(e){shouldCaptureKeyEvent(e)&&(this.keys[e.keyCode]=!0)},onKeyUp:function(e){shouldCaptureKeyEvent(e)&&(this.keys[e.keyCode]=!1)},getMovementVector:function(e){var t=new THREE.Vector3(0,0,0),i=new THREE.Euler(0,0,0,"YXZ");return function(e){var n=this.velocity,s=this.el.getComputedAttribute("rotation");return t.copy(n),t.multiplyScalar(e),s?(this.data.fly||(s.x=0),i.set(THREE.Math.degToRad(s.x),THREE.Math.degToRad(s.y),0),t.applyEuler(i),t):t}}()}); +},{"../core/component":59,"../lib/three":103,"../utils/":120}],50:[function(_dereq_,module,exports){ +var TWEEN=_dereq_("tween.js"),DIRECTIONS={alternate:"alternate",alternateReverse:"alternate-reverse",normal:"normal",reverse:"reverse"},EASING_FUNCTIONS={linear:TWEEN.Easing.Linear.None,ease:TWEEN.Easing.Cubic.InOut,"ease-in":TWEEN.Easing.Cubic.In,"ease-out":TWEEN.Easing.Cubic.Out,"ease-in-out":TWEEN.Easing.Cubic.InOut,"ease-cubic":TWEEN.Easing.Cubic.In,"ease-in-cubic":TWEEN.Easing.Cubic.In,"ease-out-cubic":TWEEN.Easing.Cubic.Out,"ease-in-out-cubic":TWEEN.Easing.Cubic.InOut,"ease-quad":TWEEN.Easing.Quadratic.InOut,"ease-in-quad":TWEEN.Easing.Quadratic.In,"ease-out-quad":TWEEN.Easing.Quadratic.Out,"ease-in-out-quad":TWEEN.Easing.Quadratic.InOut,"ease-quart":TWEEN.Easing.Quartic.InOut,"ease-in-quart":TWEEN.Easing.Quartic.In,"ease-out-quart":TWEEN.Easing.Quartic.Out,"ease-in-out-quart":TWEEN.Easing.Quartic.InOut,"ease-quint":TWEEN.Easing.Quintic.InOut,"ease-in-quint":TWEEN.Easing.Quintic.In,"ease-out-quint":TWEEN.Easing.Quintic.Out,"ease-in-out-quint":TWEEN.Easing.Quintic.InOut,"ease-sine":TWEEN.Easing.Sinusoidal.InOut,"ease-in-sine":TWEEN.Easing.Sinusoidal.In,"ease-out-sine":TWEEN.Easing.Sinusoidal.Out,"ease-in-out-sine":TWEEN.Easing.Sinusoidal.InOut,"ease-expo":TWEEN.Easing.Exponential.InOut,"ease-in-expo":TWEEN.Easing.Exponential.In,"ease-out-expo":TWEEN.Easing.Exponential.Out,"ease-in-out-expo":TWEEN.Easing.Exponential.InOut,"ease-circ":TWEEN.Easing.Circular.InOut,"ease-in-circ":TWEEN.Easing.Circular.In,"ease-out-circ":TWEEN.Easing.Circular.Out,"ease-in-out-circ":TWEEN.Easing.Circular.InOut,"ease-elastic":TWEEN.Easing.Elastic.InOut,"ease-in-elastic":TWEEN.Easing.Elastic.In,"ease-out-elastic":TWEEN.Easing.Elastic.Out,"ease-in-out-elastic":TWEEN.Easing.Elastic.InOut,"ease-back":TWEEN.Easing.Back.InOut,"ease-in-back":TWEEN.Easing.Back.In,"ease-out-back":TWEEN.Easing.Back.Out,"ease-in-out-back":TWEEN.Easing.Back.InOut,"ease-bounce":TWEEN.Easing.Bounce.InOut,"ease-in-bounce":TWEEN.Easing.Bounce.In,"ease-out-bounce":TWEEN.Easing.Bounce.Out,"ease-in-out-bounce":TWEEN.Easing.Bounce.InOut},FILLS={backwards:"backwards",both:"both",forwards:"forwards",none:"none"},REPEATS={indefinite:"indefinite"},DEFAULTS={attribute:"rotation",begin:"",end:"",delay:0,dur:1e3,easing:"ease",direction:DIRECTIONS.normal,fill:FILLS.forwards,from:void 0,repeat:0,to:void 0};module.exports.defaults=DEFAULTS,module.exports.directions=DIRECTIONS,module.exports.easingFunctions=EASING_FUNCTIONS,module.exports.fills=FILLS,module.exports.repeats=REPEATS; +},{"tween.js":18}],51:[function(_dereq_,module,exports){ +module.exports={AFRAME_INJECTED:"aframe-injected",animation:_dereq_("./animation")}; +},{"./animation":50}],52:[function(_dereq_,module,exports){ +function cloneValue(t){return utils.extend({},t)}function getAnimationValues(t,e,i,n,a){function o(){var e=m[0],i=m[1],n=t.components[e],a=n&&n.schema;return a&&a[i]&&"color"===a[i].type}function s(){v=m[0],p=m[1],c=t.components[v],c||(t.setAttribute(v,""),c=t.components[v]),h=c.schema,void 0===i?b[e]=getComponentProperty(t,e):b[e]=i,b[e]=parseProperty(b[e],h[p]),g[e]=parseProperty(n,h[p]),f=function(i){e in i&&t.setAttribute(v,p,i[e])}}function r(){b=i?coordinates.parse(i):a,g=coordinates.parse(n),f=function(i){t.setAttribute(e,i)}}function u(){void 0===i?b[e]=!1:b[e]=strToBool(i),b[e]=boolToNum(b[e]),g[e]=boolToNum(strToBool(n)),f=function(i){t.setAttribute(e,!!i[e])}}function l(){b=new THREE.Color(i),g=new THREE.Color(n),f=function(i){m.length>1&&t.setAttribute(m[0],m[1],rgbVectorToHex(i)),t.setAttribute(e,rgbVectorToHex(i))}}function d(){void 0===i?b[e]=parseFloat(t.getAttribute(e)):b[e]=parseFloat(i),g[e]=parseFloat(n),f=function(i){t.setAttribute(e,i[e])}}var h,c,p,v,f,m=e.split("."),b={},g={};return 2===m.length?o()?l():s():n&&isCoordinate(n)?r():["true","false"].indexOf(n)!==-1?u():isNaN(n)?l():d(),{from:b,partialSetAttribute:f,to:g}}function strToBool(t){return"true"===t}function boolToNum(t){return t?1:0}function componentToHex(t){var e=t.toString(16);return 1===e.length?"0"+e:e}function convertToIntegerColor(t){return Math.floor(255*Math.min(Math.abs(t),1))}function rgbVectorToHex(t){return"#"+["r","g","b"].map(function(e){return componentToHex(convertToIntegerColor(t[e]))}).join("")}var ANode=_dereq_("./a-node"),animationConstants=_dereq_("../constants/animation"),coordinates=_dereq_("../utils/").coordinates,parseProperty=_dereq_("./schema").parseProperty,registerElement=_dereq_("./a-register-element").registerElement,TWEEN=_dereq_("tween.js"),THREE=_dereq_("../lib/three"),utils=_dereq_("../utils/"),getComponentProperty=utils.entity.getComponentProperty,DEFAULTS=animationConstants.defaults,DIRECTIONS=animationConstants.directions,EASING_FUNCTIONS=animationConstants.easingFunctions,FILLS=animationConstants.fills,REPEATS=animationConstants.repeats,isCoordinate=coordinates.isCoordinate;module.exports.AAnimation=registerElement("a-animation",{prototype:Object.create(ANode.prototype,{createdCallback:{value:function(){this.bindMethods(),this.isRunning=!1,this.partialSetAttribute=function(){},this.tween=null}},attachedCallback:{value:function(){this.el=this.parentNode,this.handleMixinUpdate(),this.update(),this.load()}},attributeChangedCallback:{value:function(t,e,i){this.hasLoaded&&this.isRunning&&(this.stop(),this.handleMixinUpdate(),this.update())}},detachedCallback:{value:function(){this.isRunning&&this.stop()}},getTween:{value:function(){var t,e,i,n,a=this,o=a.data,s=a.el,r=o.attribute,u=parseInt(o.delay,10),l=getComponentProperty(s,r),d=a.getDirection(o.direction),h=EASING_FUNCTIONS[o.easing],c=o.fill,p=o.repeat===REPEATS.indefinite?1/0:0,v=!1;return t=getAnimationValues(s,r,o.from||a.initialValue,o.to,l),e=t.from,i=t.to,a.partialSetAttribute=t.partialSetAttribute,void 0===a.count&&(a.count=p===1/0?0:parseInt(o.repeat,10)),isNaN(u)&&(u=0),a.initialValue=a.initialValue||cloneValue(l),p===1/0&&c===FILLS.forwards&&[DIRECTIONS.alternate,DIRECTIONS.alternateReverse].indexOf(o.direction)!==-1&&(v=!0),d===DIRECTIONS.reverse&&(n=i,i=cloneValue(e),e=cloneValue(n)),[FILLS.backwards,FILLS.both].indexOf(c)!==-1&&a.partialSetAttribute(e),new TWEEN.Tween(cloneValue(e)).to(i,o.dur).delay(u).easing(h).repeat(p).yoyo(v).onUpdate(function(){a.partialSetAttribute(this)}).onComplete(a.onCompleted.bind(a))}},update:{value:function(){var t=this.data;"infinite"===t.repeat&&console.warn("Using 'infinite' as 'repeat' value is invalid. Use 'indefinite' instead."),""===t.begin||isNaN(t.begin)||(console.warn("Using 'begin' to specify a delay is deprecated. Use 'delay' instead."),t.delay=t.begin,t.begin="");var e=t.begin,i=t.end;this.evt&&this.removeEventListeners(this.evt),this.evt={begin:e,end:i},this.addEventListeners(this.evt),""===e&&(this.stop(),this.start())},writable:window.debug},onCompleted:{value:function(){var t=this.data;return this.isRunning=!1,[FILLS.backwards,FILLS.none].indexOf(t.fill)!==-1&&this.partialSetAttribute(this.initialValue),0===this.count?(this.count=void 0,void this.emit("animationend")):(this.isRunning=!1,this.count--,void this.start())}},start:{value:function(){var t=this;return this.el.hasLoaded?void(!this.isRunning&&this.el.isPlaying&&(this.tween=this.getTween(),this.isRunning=!0,this.tween.start(),this.emit("animationstart"))):void this.el.addEventListener("loaded",function(){t.start()})},writable:!0},stop:{value:function(){var t=this.tween;t&&(t.stop(),this.isRunning=!1,[FILLS.backwards,FILLS.none].indexOf(this.data.fill)!==-1&&this.partialSetAttribute(this.initialValue),this.emit("animationstop"))},writable:!0},getDirection:{value:function(t){return t===DIRECTIONS.alternate?(this.prevDirection=this.prevDirection===DIRECTIONS.normal?DIRECTIONS.reverse:DIRECTIONS.normal,this.prevDirection):t===DIRECTIONS.alternateReverse?(this.prevDirection=this.prevDirection===DIRECTIONS.reverse?DIRECTIONS.normal:DIRECTIONS.reverse,this.prevDirection):t}},bindMethods:{value:function(){this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.onStateAdded=this.onStateAdded.bind(this),this.onStateRemoved=this.onStateRemoved.bind(this)}},addEventListeners:{value:function(t){var e=this.el,i=this;utils.splitString(t.begin).forEach(function(t){e.addEventListener(t,i.start)}),utils.splitString(t.end).forEach(function(t){e.addEventListener(t,i.stop)}),""===t.begin&&e.addEventListener("play",this.start),e.addEventListener("pause",this.stop),e.addEventListener("stateadded",this.onStateAdded),e.addEventListener("stateremoved",this.onStateRemoved)}},removeEventListeners:{value:function(t){var e=this.el,i=this.start,n=this.stop;utils.splitString(t.begin).forEach(function(t){e.removeEventListener(t,i)}),utils.splitString(t.end).forEach(function(t){e.removeEventListener(t,n)}),e.removeEventListener("stateadded",this.onStateAdded),e.removeEventListener("stateremoved",this.onStateRemoved)}},onStateAdded:{value:function(t){t.detail.state===this.data.begin&&this.start()},writable:!0},onStateRemoved:{value:function(t){t.detail.state===this.data.begin&&this.stop()},writable:!0},handleMixinUpdate:{value:function(){var t,e,i,n={};i=document.querySelector("#"+this.getAttribute("mixin")),e=i?utils.getElData(i,DEFAULTS):{},t=utils.getElData(this,DEFAULTS),utils.extend(n,DEFAULTS,e,t),this.data=n}}})}),module.exports.getAnimationValues=getAnimationValues; +},{"../constants/animation":50,"../lib/three":103,"../utils/":120,"./a-node":57,"./a-register-element":58,"./schema":66,"tween.js":18}],53:[function(_dereq_,module,exports){ +function mediaElementLoaded(e){if(e.hasAttribute("autoplay")||"auto"===e.getAttribute("preload"))return new Promise(function(t,r){function i(){for(var r=0,i=0;i=e.duration&&t()}return 4===e.readyState?t():e.error?r():(e.addEventListener("loadeddata",i,!1),e.addEventListener("progress",i,!1),void e.addEventListener("error",r,!1))})}function setCrossOrigin(e){var t,r;return e.hasAttribute("crossorigin")?e:(r=e.getAttribute("src"),r.indexOf("://")===-1?e:extractDomain(r)===window.location.host?e:(warn("Cross-origin element was requested without `crossorigin` set. A-Frame will re-request the asset with `crossorigin` attribute set.",r),e.crossOrigin="anonymous",t=e.cloneNode(!0),e.parentNode.appendChild(t),e.parentNode.removeChild(e),t))}function extractDomain(e){var t=e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0];return t.split(":")[0]}var ANode=_dereq_("./a-node"),debug=_dereq_("../utils/debug"),registerElement=_dereq_("./a-register-element").registerElement,THREE=_dereq_("../lib/three"),xhrLoader=new THREE.XHRLoader,warn=debug("core:a-assets:warn");module.exports=registerElement("a-assets",{prototype:Object.create(ANode.prototype,{createdCallback:{value:function(){this.isAssets=!0}},attachedCallback:{value:function(){var e,t,r,i,o,a,s=this,n=[];if(!this.parentNode.isScene)throw new Error(" must be a child of a .");for(o=this.querySelectorAll("img"),e=0;e did not contain exactly six elements each with a `src` attribute.")},writable:window.debug}})}); +},{"../utils/debug":117,"./a-register-element":58}],55:[function(_dereq_,module,exports){ +function checkComponentDefined(t,e){return void 0!==t.defaultComponents[e]||(!(!t.components[e]||!t.components[e].attrValue)||isComponentMixedIn(e,t.mixinEls))}function getMixedInComponents(t){var e=[];return t.mixinEls.forEach(function(t){function i(t){e.push(t)}Object.keys(t.componentCache).forEach(i)}),e}function isComponentMixedIn(t,e){var i,n=!1;for(i=0;i has been DEPRECATED. Use https://github.com/ngokevin/aframe-event-set-component instead."),e?this.targetEls=this.el.sceneEl.querySelectorAll(e):this.targetEls=[this.el],this.deprecated&&console.warn("<"+this.tagName.toLowerCase()+'> has been DEPRECATED. Use instead.'),this.hasAttribute("type")&&console.log(" has been DEPRECATED. Use instead."),this.listener=this.attachEventListener(),this.load()}},detachedCallback:{value:function(){var e=this.listener;e&&this.removeEventListener(this.name,e)}},attachEventListener:{value:function(){var e=this.attributes,t=this.el,n=this.name,s=this.targetEls;return t.addEventListener(n,function(){for(var t,n,a,r,i=0;i",e),t.defaultAttributes&&console.warn("The 'defaultAttributes' object is deprecated. Use 'defaultComponents' instead.");var r=registerElement(e,{prototype:Object.create(AEntity.prototype,{defaultComponentsFromPrimitive:{value:t.defaultComponents||t.defaultAttributes||{}},deprecated:{value:t.deprecated||null},deprecatedMappings:{value:t.deprecatedMappings||{}},mappings:{value:t.mappings||{}},transforms:{value:t.transforms||{}},createdCallback:{value:function(){this.componentData={},t.deprecated&&console.warn(t.deprecated)}},attachedCallback:{value:function(){var e=this,t=this.attributes;this.applyDefaultComponents(),Object.keys(t).forEach(function(r){var n=t[r];e.syncAttributeToComponent(n.name,n.value)})}},attributeChangedCallback:{value:function(e,t,r){this.syncAttributeToComponent(e,r)}},applyDefaultComponents:{value:function(){var e=this,t=this.defaultComponentsFromPrimitive;Object.keys(t).forEach(function(r){var n=t[r];if(n instanceof Object){var i=components[r],o=e.getAttribute(r)||{},s=i.parse(o);return Object.keys(n).forEach(function(e){s[e]||(s[e]=n[e])}),void e.setAttribute(r,s)}e.setAttribute(r,n)})}},syncAttributeToComponent:{value:function(e,t){var r=this.mappings[e];e in this.deprecatedMappings&&console.warn(this.deprecatedMappings[e]),e&&r&&(t=this.getTransformedValue(e,t),setComponentProperty(this,r,t))}},getTransformedValue:{value:function(e,t){return this.transforms&&this.transforms[e]?this.transforms[e].bind(this)(t):t}}})});return primitives[e]=r,r}; +},{"../../core/a-entity":55,"../../core/a-register-element":58,"../../core/component":59,"../../utils/":120}],75:[function(_dereq_,module,exports){ +var registerPrimitive=_dereq_("../primitives").registerPrimitive;registerPrimitive("a-camera",{defaultComponents:{camera:{userHeight:1.6},"look-controls":{},"wasd-controls":{}},mappings:{active:"camera.active",far:"camera.far",fov:"camera.fov","look-controls-enabled":"look-controls.enabled",near:"camera.near","wasd-controls-enabled":"wasd-controls.enabled","user-height":"camera.userHeight",zoom:"camera.zoom"},deprecatedMappings:{"cursor-color":"a-camera[cursor-color] has been removed. Use a-cursor[color] instead.","cursor-maxdistance":"a-camera[cursor-maxdistance] has been removed. Use a-cursor[max-distance] instead.","cursor-offset":"a-camera[cursor-offset] has been removed. Use a-cursor[position] instead.","cursor-opacity":"a-camera[cursor-offset] has been removed. Use a-cursor[opacity] instead.","cursor-scale":"a-camera[cursor-scale] has been removed. Use a-cursor[scale] instead.","cursor-visible":"a-camera[cursor-visible] has been removed. Use a-cursor[visible] instead."}}); +},{"../primitives":74}],76:[function(_dereq_,module,exports){ +var getMeshMixin=_dereq_("../getMeshMixin"),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-collada-model",utils.extendDeep({},getMeshMixin(),{mappings:{src:"collada-model"}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],77:[function(_dereq_,module,exports){ +var getMeshMixin=_dereq_("../getMeshMixin"),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-cursor",utils.extendDeep({},getMeshMixin(),{defaultComponents:{cursor:{},geometry:{primitive:"ring",radiusOuter:.016,radiusInner:.01,segmentsTheta:64},material:{color:"#000",shader:"flat",opacity:.8},position:{x:0,y:0,z:-1},raycaster:{far:1e3}},mappings:{far:"raycaster.far",fuse:"cursor.fuse",interval:"raycaster.interval",objects:"raycaster.objects","fuse-timeout":"cursor.fuseTimeout"}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],78:[function(_dereq_,module,exports){ +var getMeshMixin=_dereq_("../getMeshMixin"),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-curvedimage",utils.extendDeep({},getMeshMixin(),{defaultComponents:{geometry:{height:1,primitive:"cylinder",radius:2,segmentsRadial:48,thetaLength:270,openEnded:!0,thetaStart:0},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0,repeat:"-1 1"}},mappings:{height:"geometry.height","open-ended":"geometry.openEnded",radius:"geometry.radius",segments:"geometry.segmentsRadial",start:"geometry.thetaStart","theta-length":"geometry.thetaLength","theta-start":"geometry.thetaStart",width:"geometry.thetaLength"}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],79:[function(_dereq_,module,exports){ +var getMeshMixin=_dereq_("../getMeshMixin"),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-image",utils.extendDeep({},getMeshMixin(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],80:[function(_dereq_,module,exports){ +var registerPrimitive=_dereq_("../primitives").registerPrimitive;registerPrimitive("a-light",{defaultComponents:{light:{}},mappings:{angle:"light.angle",color:"light.color","ground-color":"light.groundColor",decay:"light.decay",distance:"light.distance",intensity:"light.intensity",penumbra:"light.penumbra",type:"light.type",target:"light.target"}}); +},{"../primitives":74}],81:[function(_dereq_,module,exports){ +var meshMixin=_dereq_("../getMeshMixin")(),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-obj-model",utils.extendDeep({},meshMixin,{mappings:{src:"obj-model.obj",mtl:"obj-model.mtl"},transforms:{mtl:meshMixin.transforms.src}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],82:[function(_dereq_,module,exports){ +var getMeshMixin=_dereq_("../getMeshMixin"),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-sky",utils.extendDeep({},getMeshMixin(),{defaultComponents:{geometry:{primitive:"sphere",radius:5e3,segmentsWidth:64,segmentsHeight:20},material:{color:"#FFF",shader:"flat"},scale:"-1 1 1"},mappings:{radius:"geometry.radius","segments-width":"geometry.segmentsWidth","segments-height":"geometry.segmentsHeight"}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],83:[function(_dereq_,module,exports){ +var registerPrimitive=_dereq_("../primitives").registerPrimitive;registerPrimitive("a-sound",{defaultComponents:{sound:{}},mappings:{src:"sound.src",on:"sound.on",autoplay:"sound.autoplay",loop:"sound.loop",volume:"sound.volume"}}); +},{"../primitives":74}],84:[function(_dereq_,module,exports){ +var getMeshMixin=_dereq_("../getMeshMixin"),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-video",utils.extendDeep({},getMeshMixin(),{defaultComponents:{geometry:{primitive:"plane"},material:{color:"#FFF",shader:"flat",side:"double",transparent:!0}},mappings:{height:"geometry.height",width:"geometry.width"}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],85:[function(_dereq_,module,exports){ +var getMeshMixin=_dereq_("../getMeshMixin"),registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/");registerPrimitive("a-videosphere",utils.extendDeep({},getMeshMixin(),{defaultComponents:{geometry:{primitive:"sphere",radius:5e3,segmentsWidth:64,segmentsHeight:20},material:{color:"#FFF",shader:"flat"},scale:"-1 1 1"},mappings:{radius:"geometry.radius","segments-height":"geometry.segmentsHeight","segments-width":"geometry.segmentsWidth"}})); +},{"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],86:[function(_dereq_,module,exports){ +function unCamelCase(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}var getMeshMixin=_dereq_("../getMeshMixin"),geometries=_dereq_("../../../core/geometry").geometries,geometryNames=_dereq_("../../../core/geometry").geometryNames,registerPrimitive=_dereq_("../primitives").registerPrimitive,utils=_dereq_("../../../utils/"),meshPrimitives=module.exports={};geometryNames.forEach(function(e){var i=geometries[e],r=unCamelCase(e),t={};Object.keys(i.schema).forEach(function(e){t[unCamelCase(e)]="geometry."+e});var m="a-"+r,s=registerPrimitive(m,utils.extendDeep({},getMeshMixin(),{defaultComponents:{geometry:{primitive:e}},mappings:t}));meshPrimitives[m]=s}); +},{"../../../core/geometry":60,"../../../utils/":120,"../getMeshMixin":72,"../primitives":74}],87:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three");registerGeometry("box",{schema:{depth:{default:1,min:0},height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"},segmentsDepth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new THREE.BoxGeometry(e.width,e.height,e.depth)}}); +},{"../core/geometry":60,"../lib/three":103}],88:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three"),degToRad=THREE.Math.degToRad;registerGeometry("circle",{schema:{radius:{default:1,min:0},segments:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new THREE.CircleGeometry(e.radius,e.segments,degToRad(e.thetaStart),degToRad(e.thetaLength))}}); +},{"../core/geometry":60,"../lib/three":103}],89:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three"),degToRad=THREE.Math.degToRad;registerGeometry("cone",{schema:{height:{default:1,min:0},openEnded:{default:!1},radiusBottom:{default:1,min:0},radiusTop:{default:.8,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new THREE.CylinderGeometry(e.radiusTop,e.radiusBottom,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,degToRad(e.thetaStart),degToRad(e.thetaLength))}}); +},{"../core/geometry":60,"../lib/three":103}],90:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three"),degToRad=THREE.Math.degToRad;registerGeometry("cylinder",{schema:{height:{default:1,min:0},openEnded:{default:!1},radius:{default:1,min:0},segmentsHeight:{default:18,min:1,type:"int"},segmentsRadial:{default:36,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new THREE.CylinderGeometry(e.radius,e.radius,e.height,e.segmentsRadial,e.segmentsHeight,e.openEnded,degToRad(e.thetaStart),degToRad(e.thetaLength))}}); +},{"../core/geometry":60,"../lib/three":103}],91:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three");registerGeometry("dodecahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new THREE.DodecahedronGeometry(e.radius,e.detail)}}); +},{"../core/geometry":60,"../lib/three":103}],92:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three");registerGeometry("icosahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new THREE.IcosahedronGeometry(e.radius,e.detail)}}); +},{"../core/geometry":60,"../lib/three":103}],93:[function(_dereq_,module,exports){ +_dereq_("./box.js"),_dereq_("./circle.js"),_dereq_("./cone.js"),_dereq_("./cylinder.js"),_dereq_("./dodecahedron.js"),_dereq_("./icosahedron.js"),_dereq_("./octahedron.js"),_dereq_("./plane.js"),_dereq_("./ring.js"),_dereq_("./sphere.js"),_dereq_("./tetrahedron.js"),_dereq_("./torus.js"),_dereq_("./torusKnot.js"); +},{"./box.js":87,"./circle.js":88,"./cone.js":89,"./cylinder.js":90,"./dodecahedron.js":91,"./icosahedron.js":92,"./octahedron.js":94,"./plane.js":95,"./ring.js":96,"./sphere.js":97,"./tetrahedron.js":98,"./torus.js":99,"./torusKnot.js":100}],94:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three");registerGeometry("octahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new THREE.OctahedronGeometry(e.radius,e.detail)}}); +},{"../core/geometry":60,"../lib/three":103}],95:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three");registerGeometry("plane",{schema:{height:{default:1,min:0},width:{default:1,min:0},segmentsHeight:{default:1,min:1,max:20,type:"int"},segmentsWidth:{default:1,min:1,max:20,type:"int"}},init:function(e){this.geometry=new THREE.PlaneGeometry(e.width,e.height)}}); +},{"../core/geometry":60,"../lib/three":103}],96:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three"),degToRad=THREE.Math.degToRad;registerGeometry("ring",{schema:{radiusInner:{default:.8,min:0},radiusOuter:{default:1.2,min:0},segmentsPhi:{default:10,min:1,type:"int"},segmentsTheta:{default:32,min:3,type:"int"},thetaLength:{default:360,min:0},thetaStart:{default:0}},init:function(e){this.geometry=new THREE.RingGeometry(e.radiusInner,e.radiusOuter,e.segmentsTheta,e.segmentsPhi,degToRad(e.thetaStart),degToRad(e.thetaLength))}}); +},{"../core/geometry":60,"../lib/three":103}],97:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three"),degToRad=THREE.Math.degToRad;registerGeometry("sphere",{schema:{radius:{default:1,min:0},phiLength:{default:360},phiStart:{default:0,min:0},thetaLength:{default:180,min:0},thetaStart:{default:0},segmentsHeight:{default:18,min:2,type:"int"},segmentsWidth:{default:36,min:3,type:"int"}},init:function(e){this.geometry=new THREE.SphereGeometry(e.radius,e.segmentsWidth,e.segmentsHeight,degToRad(e.phiStart),degToRad(e.phiLength),degToRad(e.thetaStart),degToRad(e.thetaLength))}}); +},{"../core/geometry":60,"../lib/three":103}],98:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three");registerGeometry("tetrahedron",{schema:{detail:{default:0,min:0,max:5,type:"int"},radius:{default:1,min:0}},init:function(e){this.geometry=new THREE.TetrahedronGeometry(e.radius,e.detail)}}); +},{"../core/geometry":60,"../lib/three":103}],99:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three"),degToRad=THREE.Math.degToRad;registerGeometry("torus",{schema:{arc:{default:360},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:36,min:2,type:"int"},segmentsTubular:{default:32,min:3,type:"int"}},init:function(e){this.geometry=new THREE.TorusGeometry(e.radius,2*e.radiusTubular,e.segmentsRadial,e.segmentsTubular,degToRad(e.arc))}}); +},{"../core/geometry":60,"../lib/three":103}],100:[function(_dereq_,module,exports){ +var registerGeometry=_dereq_("../core/geometry").registerGeometry,THREE=_dereq_("../lib/three");registerGeometry("torusKnot",{schema:{p:{default:2,min:1},q:{default:3,min:1},radius:{default:1,min:0},radiusTubular:{default:.2,min:0},segmentsRadial:{default:8,min:3,type:"int"},segmentsTubular:{default:100,min:3,type:"int"}},init:function(e){this.geometry=new THREE.TorusKnotGeometry(e.radius,2*e.radiusTubular,e.segmentsTubular,e.segmentsRadial,e.p,e.q)}}); +},{"../core/geometry":60,"../lib/three":103}],101:[function(_dereq_,module,exports){ +window.Promise=window.Promise||_dereq_("promise-polyfill"),window.hasNativeWebVRImplementation=!!navigator.getVRDisplays||!!navigator.getVRDevices,window.WebVRConfig=window.WebVRConfig||{BUFFER_SCALE:1,CARDBOARD_UI_DISABLED:!0,ROTATE_INSTRUCTIONS_DISABLED:!0,TOUCH_PANNER_DISABLED:!0,MOUSE_KEYBOARD_CONTROLS_DISABLED:!0},/(iphone|ipod|ipad).*os.*(7|8|9)/i.test(navigator.userAgent)&&(window.WebVRConfig.BUFFER_SCALE=1/window.devicePixelRatio),_dereq_("webvr-polyfill"),_dereq_("present"),_dereq_("./style/aframe.css"),_dereq_("./style/rStats.css");var AScene=_dereq_("./core/scene/a-scene"),components=_dereq_("./core/component").components,registerComponent=_dereq_("./core/component").registerComponent,registerGeometry=_dereq_("./core/geometry").registerGeometry,registerPrimitive=_dereq_("./extras/primitives/primitives").registerPrimitive,registerShader=_dereq_("./core/shader").registerShader,registerSystem=_dereq_("./core/system").registerSystem,shaders=_dereq_("./core/shader").shaders,systems=_dereq_("./core/system").systems,THREE=window.THREE=_dereq_("./lib/three"),TWEEN=window.TWEEN=_dereq_("tween.js"),pkg=_dereq_("../package"),utils=_dereq_("./utils/");_dereq_("./components/index"),_dereq_("./geometries/index"),_dereq_("./shaders/index"),_dereq_("./systems/index");var ANode=_dereq_("./core/a-node"),AEntity=_dereq_("./core/a-entity");_dereq_("./core/a-animation"),_dereq_("./core/a-assets"),_dereq_("./core/a-cubemap"),_dereq_("./core/a-mixin"),_dereq_("./extras/components/"),_dereq_("./extras/declarative-events/"),_dereq_("./extras/primitives/"),console.log("A-Frame Version:",pkg.version),console.log("three Version:",pkg.dependencies.three),console.log("WebVR Polyfill Version:",pkg.dependencies["webvr-polyfill"]),module.exports=window.AFRAME={AEntity:AEntity,ANode:ANode,AScene:AScene,components:components,geometries:_dereq_("./core/geometry").geometries,registerComponent:registerComponent,registerElement:_dereq_("./core/a-register-element").registerElement,registerGeometry:registerGeometry,registerPrimitive:registerPrimitive,registerShader:registerShader,registerSystem:registerSystem,primitives:{getMeshMixin:_dereq_("./extras/primitives/getMeshMixin"),primitives:_dereq_("./extras/primitives/primitives").primitives},schema:_dereq_("./core/schema"),shaders:shaders,systems:systems,THREE:THREE,TWEEN:TWEEN,utils:utils,version:pkg.version}; +},{"../package":20,"./components/index":27,"./core/a-animation":52,"./core/a-assets":53,"./core/a-cubemap":54,"./core/a-entity":55,"./core/a-mixin":56,"./core/a-node":57,"./core/a-register-element":58,"./core/component":59,"./core/geometry":60,"./core/scene/a-scene":62,"./core/schema":66,"./core/shader":67,"./core/system":68,"./extras/components/":69,"./extras/declarative-events/":71,"./extras/primitives/":73,"./extras/primitives/getMeshMixin":72,"./extras/primitives/primitives":74,"./geometries/index":93,"./lib/three":103,"./shaders/index":105,"./style/aframe.css":107,"./style/rStats.css":108,"./systems/index":111,"./utils/":120,"present":10,"promise-polyfill":11,"tween.js":18,"webvr-polyfill":19}],102:[function(_dereq_,module,exports){ +window.aframeStats=function(t){function e(){i("te").set(n()),i("lt").set(window.performance.getEntriesByName("render-started")[0].startTime.toFixed(0))}function n(){var t=u.querySelectorAll("*");return Array.prototype.slice.call(t).filter(function(t){return t.isEntity}),t.length}function a(){}function r(){}function o(t){i=t}var i=null,u=t,c={te:{caption:"Entities"},lt:{caption:"Load Time"}},l=[{caption:"A-Frame",values:["te","lt"]}];return{update:e,start:a,end:r,attach:o,values:c,groups:l,fractions:[]}},"object"==typeof module&&(module.exports={aframeStats:window.aframeStats}); +},{}],103:[function(_dereq_,module,exports){ +(function (global){ +var THREE=global.THREE=_dereq_("three");THREE.TextureLoader&&(THREE.TextureLoader.prototype.crossOrigin="anonymous"),THREE.ImageLoader&&(THREE.ImageLoader.prototype.crossOrigin="anonymous"),THREE.Cache&&(THREE.Cache.enabled=!0),_dereq_("three/examples/js/loaders/OBJLoader"),_dereq_("three/examples/js/loaders/MTLLoader"),_dereq_("three/examples/js/BlendCharacter"),_dereq_("three/examples/js/loaders/ColladaLoader"),_dereq_("../../vendor/VRControls"),_dereq_("../../vendor/VREffect"),THREE.ColladaLoader.prototype.crossOrigin="anonymous",THREE.MTLLoader.prototype.crossOrigin="anonymous",THREE.OBJLoader.prototype.crossOrigin="anonymous",module.exports=THREE; +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + +},{"../../vendor/VRControls":124,"../../vendor/VREffect":125,"three":17,"three/examples/js/BlendCharacter":13,"three/examples/js/loaders/ColladaLoader":14,"three/examples/js/loaders/MTLLoader":15,"three/examples/js/loaders/OBJLoader":16}],104:[function(_dereq_,module,exports){ +function getMaterialData(e){return{fog:e.fog,color:new THREE.Color(e.color)}}var registerShader=_dereq_("../core/shader").registerShader,THREE=_dereq_("../lib/three"),utils=_dereq_("../utils/");module.exports.Component=registerShader("flat",{schema:{color:{type:"color"},fog:{default:!0},height:{default:256},repeat:{default:""},src:{default:""},width:{default:512}},init:function(e){this.textureSrc=null,this.material=new THREE.MeshBasicMaterial(getMaterialData(e)),utils.material.updateMap(this,e)},update:function(e){this.updateMaterial(e),utils.material.updateMap(this,e)},updateMaterial:function(e){var t=this.material;e=getMaterialData(e),Object.keys(e).forEach(function(a){t[a]=e[a]})}}); +},{"../core/shader":67,"../lib/three":103,"../utils/":120}],105:[function(_dereq_,module,exports){ +_dereq_("./flat"),_dereq_("./standard"); +},{"./flat":104,"./standard":106}],106:[function(_dereq_,module,exports){ +function getMaterialData(e){return{color:new THREE.Color(e.color),fog:e.fog,metalness:e.metalness,roughness:e.roughness}}var registerShader=_dereq_("../core/shader").registerShader,THREE=_dereq_("../lib/three"),utils=_dereq_("../utils/"),CubeLoader=new THREE.CubeTextureLoader,texturePromises={};module.exports.Component=registerShader("standard",{schema:{color:{type:"color"},envMap:{default:""},fog:{default:!0},height:{default:256},metalness:{default:0,min:0,max:1},repeat:{default:""},roughness:{default:.5,min:0,max:1},src:{default:""},width:{default:512}},init:function(e){this.material=new THREE.MeshStandardMaterial(getMaterialData(e)),utils.material.updateMap(this,e),this.updateEnvMap(e)},update:function(e){this.updateMaterial(e),utils.material.updateMap(this,e),this.updateEnvMap(e)},updateMaterial:function(e){var a=this.material;e=getMaterialData(e),Object.keys(e).forEach(function(t){a[t]=e[t]})},updateEnvMap:function(e){var a=this,t=this.material,i=e.envMap;return!i||this.isLoadingEnvMap?(t.envMap=null,void(t.needsUpdate=!0)):(this.isLoadingEnvMap=!0,texturePromises[i]?void texturePromises[i].then(function(e){a.isLoadingEnvMap=!1,t.envMap=e,t.needsUpdate=!0}):void(texturePromises[i]=new Promise(function(e){utils.srcLoader.validateCubemapSrc(i,function(i){CubeLoader.load(i,function(i){a.isLoadingEnvMap=!1,t.envMap=i,e(i)})})})))}}); +},{"../core/shader":67,"../lib/three":103,"../utils/":120}],107:[function(_dereq_,module,exports){ +var css = ".a-html{bottom:0;left:0;position:fixed;right:0;top:0}.a-body{height:100%;margin:0;overflow:hidden;padding:0;width:100%}:-webkit-full-screen{background-color:transparent}.a-hidden{display:none!important}.a-canvas{height:100%;left:0;position:absolute;top:0;width:100%}.a-canvas.a-grab-cursor:hover{cursor:grab;cursor:-moz-grabbing;cursor:-webkit-grab}.a-canvas.a-grab-cursor:active,.a-grabbing{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}// Class is removed when doing . .a-canvas.fullscreen{width:100%!important;height:100%!important;top:0!important;left:0!important;right:0!important;bottom:0!important;z-index:999999!important;position:fixed!important}a-scene{display:block;position:relative;height:100%;width:100%}a-assets,a-scene audio,a-scene img,a-scene video{display:none}.a-enter-vr-modal,.a-orientation-modal{font-family:Consolas,Andale Mono,Courier New,monospace}.a-enter-vr-modal a{border-bottom:1px solid #fff;padding:2px 0;text-decoration:none;transition:.1s color ease-in}.a-enter-vr-modal a:hover{background-color:#fff;color:#111;padding:2px 4px;position:relative;left:-4px}.a-enter-vr{font-family:sans-serif,monospace;font-size:13px;width:100%;font-weight:200;line-height:16px;height:10%;position:absolute;right:20px;bottom:20px}.a-enter-vr.embedded{right:5px;bottom:5px}.a-enter-vr-button,.a-enter-vr-modal,.a-enter-vr-modal a{color:#fff}.a-enter-vr-button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20245.82%20141.73%22%3E%3Cdefs%3E%3Cstyle%3E.a%7Bfill%3A%23fff%3Bfill-rule%3Aevenodd%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%3Ctitle%3Emask%3C%2Ftitle%3E%3Cpath%20class%3D%22a%22%20d%3D%22M175.56%2C111.37c-22.52%2C0-40.77-18.84-40.77-42.07S153%2C27.24%2C175.56%2C27.24s40.77%2C18.84%2C40.77%2C42.07S198.08%2C111.37%2C175.56%2C111.37ZM26.84%2C69.31c0-23.23%2C18.25-42.07%2C40.77-42.07s40.77%2C18.84%2C40.77%2C42.07-18.26%2C42.07-40.77%2C42.07S26.84%2C92.54%2C26.84%2C69.31ZM27.27%2C0C11.54%2C0%2C0%2C12.34%2C0%2C28.58V110.9c0%2C16.24%2C11.54%2C30.83%2C27.27%2C30.83H99.57c2.17%2C0%2C4.19-1.83%2C5.4-3.7L116.47%2C118a8%2C8%2C0%2C0%2C1%2C12.52-.18l11.51%2C20.34c1.2%2C1.86%2C3.22%2C3.61%2C5.39%2C3.61h72.29c15.74%2C0%2C27.63-14.6%2C27.63-30.83V28.58C245.82%2C12.34%2C233.93%2C0%2C218.19%2C0H27.27Z%22%2F%3E%3C%2Fsvg%3E) 50% 50%/70% 70% no-repeat rgba(0,0,0,.35);border:0;bottom:0;cursor:pointer;min-width:50px;min-height:30px;padding-right:5%;padding-top:4%;position:absolute;right:0;transition:background-color .05s ease;-webkit-transition:background-color .05s ease;z-index:9999}.a-enter-vr-button:active,.a-enter-vr-button:hover{background-color:#666}[data-a-enter-vr-no-webvr] .a-enter-vr-button{border-color:#666;opacity:.65}[data-a-enter-vr-no-webvr] .a-enter-vr-button:active,[data-a-enter-vr-no-webvr] .a-enter-vr-button:hover{background-color:rgba(0,0,0,.35);cursor:not-allowed}.a-enter-vr-modal{background-color:#666;border-radius:0;display:none;min-height:32px;margin-right:70px;padding:9px;width:280px;right:2%;position:absolute}.a-enter-vr-modal:after{border-bottom:10px solid transparent;border-left:10px solid #666;border-top:10px solid transparent;display:inline-block;content:'';position:absolute;right:-5px;top:5px;width:0;height:0}.a-enter-vr-modal a,.a-enter-vr-modal p{display:inline}.a-enter-vr-modal p{margin:0}.a-enter-vr-modal p:after{content:' '}[data-a-enter-vr-no-headset].a-enter-vr:hover .a-enter-vr-modal,[data-a-enter-vr-no-webvr].a-enter-vr:hover .a-enter-vr-modal{display:block}.a-orientation-modal{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E) center/50% 50% no-repeat rgba(244,244,244,1);bottom:0;font-size:14px;font-weight:600;left:0;line-height:20px;right:0;position:fixed;top:0;z-index:9999999}.a-orientation-modal:after{color:#666;content:\"Insert phone into Cardboard holder.\";display:block;position:absolute;text-align:center;top:70%;transform:translateY(-70%);width:100%}.a-orientation-modal button{background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E) no-repeat;border:none;height:50px;text-indent:-9999px;width:50px}"; (_dereq_("browserify-css").createStyle(css, { "href": "src/style/aframe.css"})); module.exports = css; +},{"browserify-css":1}],108:[function(_dereq_,module,exports){ +var css = ".rs-base{background-color:#333;border-radius:0;font:10px monospace;left:5px;line-height:1em;opacity:.85;overflow:hidden;padding:10px;position:fixed;top:5px;width:300px;z-index:10000}.rs-base div.hidden{display:none}.rs-base h1{color:#fff;cursor:pointer;font-size:1.4em;font-weight:300;margin:0 0 5px;padding:0}.rs-group{display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;margin-bottom:5px}.rs-group:last-child{margin-bottom:0}.rs-counter-base{align-items:center;display:-webkit-box;display:-webkit-flex;display:flex;height:10px;-webkit-justify-content:space-between;justify-content:space-between;margin:2px 0}.rs-counter-id{font-weight:300;-webkit-box-ordinal-group:0;-webkit-order:0;order:0;width:54px}.rs-counter-value{font-weight:300;-webkit-box-ordinal-group:1;-webkit-order:1;order:1;text-align:right;width:35px}.rs-canvas{-webkit-box-ordinal-group:2;-webkit-order:2;order:2}@media (min-width:480px){.rs-base{left:20px;top:20px}}"; (_dereq_("browserify-css").createStyle(css, { "href": "src/style/rStats.css"})); module.exports = css; +},{"browserify-css":1}],109:[function(_dereq_,module,exports){ +function removeDefaultCamera(e){var t,a=e.camera;a&&(t=e.querySelector("["+DEFAULT_CAMERA_ATTR+"]"),t&&e.removeChild(t))}var constants=_dereq_("../constants/"),registerSystem=_dereq_("../core/system").registerSystem,DEFAULT_CAMERA_ATTR="data-aframe-default-camera",DEFAULT_USER_HEIGHT=1.6;module.exports.System=registerSystem("camera",{init:function(){this.activeCameraEl=null,this.sceneEl.addEventListener("loaded",this.setupDefaultCamera.bind(this))},setupDefaultCamera:function(){var e,t=this.sceneEl;return t.camera?void t.emit("camera-ready",{cameraEl:t.camera.el}):(e=document.createElement("a-entity"),e.setAttribute("position","0 0 0"),e.setAttribute(DEFAULT_CAMERA_ATTR,""),e.setAttribute("camera",{active:!0,userHeight:DEFAULT_USER_HEIGHT}),e.setAttribute("wasd-controls",""),e.setAttribute("look-controls",""),e.setAttribute(constants.AFRAME_INJECTED,""),t.appendChild(e),t.addEventListener("enter-vr",this.removeDefaultOffset),t.addEventListener("exit-vr",this.addDefaultOffset),void t.emit("camera-ready",{cameraEl:e}))},disableActiveCamera:function(){var e=this.sceneEl.querySelectorAll("[camera]"),t=e[e.length-1];t.setAttribute("camera","active",!0)},setActiveCamera:function(e){var t,a,r,i,s=this.activeCameraEl,c=this.sceneEl;if(i=e.getObject3D("camera"),i&&e!==this.activeCameraEl){var m=c.querySelector("["+DEFAULT_CAMERA_ATTR+"]"),l=m&&m.querySelector("[camera]");for(e!==l&&removeDefaultCamera(c),this.activeCameraEl=e,this.activeCameraEl.play(),c.camera=i,s&&s.setAttribute("camera","active",!1),a=c.querySelectorAll("[camera]"),r=0;r0||(t=o[r],t.dispose(),delete o[r],delete i[r])))},hash:function(e){return JSON.stringify(e)}}); +},{"../core/geometry":60,"../core/system":68,"../lib/three":103}],111:[function(_dereq_,module,exports){ +_dereq_("./camera"),_dereq_("./geometry"),_dereq_("./light"),_dereq_("./material"),_dereq_("./tracked-controls"); +},{"./camera":109,"./geometry":110,"./light":112,"./material":113,"./tracked-controls":114}],112:[function(_dereq_,module,exports){ +var registerSystem=_dereq_("../core/system").registerSystem,constants=_dereq_("../constants/"),DEFAULT_LIGHT_ATTR="data-aframe-default-light";module.exports.System=registerSystem("light",{init:function(){this.defaultLights=!1,this.userDefinedLights=!1,this.sceneEl.addEventListener("loaded",this.setupDefaultLights.bind(this))},registerLight:function(t){t.hasAttribute(DEFAULT_LIGHT_ATTR)||(this.removeDefaultLights(),this.userDefinedLights=!0)},removeDefaultLights:function(){var t,e=this.sceneEl;if(this.defaultLights){t=document.querySelectorAll("["+DEFAULT_LIGHT_ATTR+"]");for(var i=0;i0&&(t.vrDisplay=e[0])})},tick:function(){var t,e,r=navigator.getGamepads&&navigator.getGamepads(),s=this.controllers=[];if(r)for(e=0;e,