@abi-software/scaffoldvuer 0.3.2-beta.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -34
- package/dist/scaffoldvuer-wc.common.js +42 -42
- package/dist/scaffoldvuer-wc.umd.js +42 -42
- package/dist/scaffoldvuer-wc.umd.min.js +42 -42
- package/dist/scaffoldvuer.common.js +52 -48
- package/dist/scaffoldvuer.common.js.map +1 -1
- package/dist/scaffoldvuer.css +1 -1
- package/dist/scaffoldvuer.umd.js +52 -48
- package/dist/scaffoldvuer.umd.js.map +1 -1
- package/dist/scaffoldvuer.umd.min.js +1 -1
- package/dist/scaffoldvuer.umd.min.js.map +1 -1
- package/package-lock.json +80 -32
- package/package.json +2 -2
- package/src/components/ScaffoldVuer.vue +4 -0
|
@@ -140,7 +140,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vue
|
|
|
140
140
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
141
141
|
|
|
142
142
|
"use strict";
|
|
143
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
143
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_AnnotationTool_vue_vue_type_template_id_480ec58a_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../../../cache-loader/dist/cjs.js??ref--13-0!../../../../babel-loader/lib!../../../../vue-loader/lib/loaders/templateLoader.js??ref--6!../../../../cache-loader/dist/cjs.js??ref--1-0!../../../../vue-loader/lib??vue-loader-options!./AnnotationTool.vue?vue&type=template&id=480ec58a&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/AnnotationTool.vue?vue&type=template&id=480ec58a&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_AnnotationTool_vue_vue_type_template_id_480ec58a_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_AnnotationTool_vue_vue_type_template_id_480ec58a_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/AnnotationTool.vue?");
|
|
144
144
|
|
|
145
145
|
/***/ }),
|
|
146
146
|
|
|
@@ -200,7 +200,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vue
|
|
|
200
200
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
201
201
|
|
|
202
202
|
"use strict";
|
|
203
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
203
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_ExternalResourceCard_vue_vue_type_template_id_d3361d06_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../../../cache-loader/dist/cjs.js??ref--13-0!../../../../babel-loader/lib!../../../../vue-loader/lib/loaders/templateLoader.js??ref--6!../../../../cache-loader/dist/cjs.js??ref--1-0!../../../../vue-loader/lib??vue-loader-options!./ExternalResourceCard.vue?vue&type=template&id=d3361d06&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/ExternalResourceCard.vue?vue&type=template&id=d3361d06&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_ExternalResourceCard_vue_vue_type_template_id_d3361d06_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_ExternalResourceCard_vue_vue_type_template_id_d3361d06_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/ExternalResourceCard.vue?");
|
|
204
204
|
|
|
205
205
|
/***/ }),
|
|
206
206
|
|
|
@@ -248,7 +248,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vue
|
|
|
248
248
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
249
249
|
|
|
250
250
|
"use strict";
|
|
251
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
251
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_ProvenancePopup_vue_vue_type_template_id_4a901ae7_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../../../cache-loader/dist/cjs.js??ref--13-0!../../../../babel-loader/lib!../../../../vue-loader/lib/loaders/templateLoader.js??ref--6!../../../../cache-loader/dist/cjs.js??ref--1-0!../../../../vue-loader/lib??vue-loader-options!./ProvenancePopup.vue?vue&type=template&id=4a901ae7&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/ProvenancePopup.vue?vue&type=template&id=4a901ae7&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_ProvenancePopup_vue_vue_type_template_id_4a901ae7_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_ProvenancePopup_vue_vue_type_template_id_4a901ae7_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/ProvenancePopup.vue?");
|
|
252
252
|
|
|
253
253
|
/***/ }),
|
|
254
254
|
|
|
@@ -296,7 +296,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _vue
|
|
|
296
296
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
297
297
|
|
|
298
298
|
"use strict";
|
|
299
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
299
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_Tooltip_vue_vue_type_template_id_11df07df_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../../../cache-loader/dist/cjs.js??ref--13-0!../../../../babel-loader/lib!../../../../vue-loader/lib/loaders/templateLoader.js??ref--6!../../../../cache-loader/dist/cjs.js??ref--1-0!../../../../vue-loader/lib??vue-loader-options!./Tooltip.vue?vue&type=template&id=11df07df&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/Tooltip.vue?vue&type=template&id=11df07df&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_Tooltip_vue_vue_type_template_id_11df07df_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_cache_loader_dist_cjs_js_ref_13_0_babel_loader_lib_index_js_vue_loader_lib_loaders_templateLoader_js_ref_6_cache_loader_dist_cjs_js_ref_1_0_vue_loader_lib_index_js_vue_loader_options_Tooltip_vue_vue_type_template_id_11df07df_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/Tooltip.vue?");
|
|
300
300
|
|
|
301
301
|
/***/ }),
|
|
302
302
|
|
|
@@ -706,7 +706,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var elem
|
|
|
706
706
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
707
707
|
|
|
708
708
|
"use strict";
|
|
709
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var element_ui_lib_theme_chalk_tabs_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! element-ui/lib/theme-chalk/tabs.css */ \"./node_modules/element-ui/lib/theme-chalk/tabs.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_tabs_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_tabs_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! element-ui/lib/tabs */ \"./node_modules/element-ui/lib/tabs.js\");\n/* harmony import */ var element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var element_ui_lib_theme_chalk_tab_pane_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! element-ui/lib/theme-chalk/tab-pane.css */ \"./node_modules/element-ui/lib/theme-chalk/tab-pane.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_tab_pane_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_tab_pane_css__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! element-ui/lib/tab-pane */ \"./node_modules/element-ui/lib/tab-pane.js\");\n/* harmony import */ var element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var element_ui_lib_theme_chalk_slider_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! element-ui/lib/theme-chalk/slider.css */ \"./node_modules/element-ui/lib/theme-chalk/slider.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_slider_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_slider_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! element-ui/lib/slider */ \"./node_modules/element-ui/lib/slider.js\");\n/* harmony import */ var element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var element_ui_lib_theme_chalk_select_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_select_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_select_css__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\");\n/* harmony import */ var element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var element_ui_lib_theme_chalk_row_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! element-ui/lib/theme-chalk/row.css */ \"./node_modules/element-ui/lib/theme-chalk/row.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_row_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_row_css__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! element-ui/lib/row */ \"./node_modules/element-ui/lib/row.js\");\n/* harmony import */ var element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var element_ui_lib_theme_chalk_popover_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! element-ui/lib/theme-chalk/popover.css */ \"./node_modules/element-ui/lib/theme-chalk/popover.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_popover_css__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_popover_css__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! element-ui/lib/popover */ \"./node_modules/element-ui/lib/popover.js\");\n/* harmony import */ var element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var element_ui_lib_theme_chalk_option_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_option_css__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_option_css__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\");\n/* harmony import */ var element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var element_ui_lib_theme_chalk_loading_css__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! element-ui/lib/theme-chalk/loading.css */ \"./node_modules/element-ui/lib/theme-chalk/loading.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_loading_css__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_loading_css__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! element-ui/lib/loading */ \"./node_modules/element-ui/lib/loading.js\");\n/* harmony import */ var element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var element_ui_lib_theme_chalk_col_css__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! element-ui/lib/theme-chalk/col.css */ \"./node_modules/element-ui/lib/theme-chalk/col.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_col_css__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_col_css__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! element-ui/lib/col */ \"./node_modules/element-ui/lib/col.js\");\n/* harmony import */ var element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var element_ui_lib_theme_chalk_button_css__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_button_css__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_button_css__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\");\n/* harmony import */ var element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ \"./node_modules/core-js/modules/es.number.to-fixed.js\");\n/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/web.url.js */ \"./node_modules/core-js/modules/web.url.js\");\n/* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/web.url-search-params.js */ \"./node_modules/core-js/modules/web.url-search-params.js\");\n/* harmony import */ var core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _PrimitiveControls__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./PrimitiveControls */ \"./src/components/PrimitiveControls.vue\");\n/* harmony import */ var _ScaffoldTooltip__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ScaffoldTooltip */ \"./src/components/ScaffoldTooltip.vue\");\n/* harmony import */ var _TreeControls__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./TreeControls */ \"./src/components/TreeControls.vue\");\n/* harmony import */ var _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @abi-software/svg-sprite */ \"./node_modules/@abi-software/svg-sprite/dist/svg-sprite.common.js\");\n/* harmony import */ var _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../scripts/utilities.js */ \"./src/scripts/utilities.js\");\n/* harmony import */ var _scripts_search_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../scripts/search.js */ \"./src/scripts/search.js\");\n/* harmony import */ var element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! element-ui/lib/locale/lang/en */ \"./node_modules/element-ui/lib/locale/lang/en.js\");\n/* harmony import */ var element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var element_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! element-ui/lib/locale */ \"./node_modules/element-ui/lib/locale/index.js\");\n/* harmony import */ var element_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable no-alert, no-console */\n\n\n\n\n\n\n\n\n\nelement_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41___default.a.use(element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16___default.a.directive);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2___default.a);\nvar OrgansViewer = __webpack_require__(/*! ../scripts/organsRenderer */ \"./src/scripts/organsRenderer.js\").OrgansViewer;\nvar EventNotifier = __webpack_require__(/*! ../scripts/eventNotifier */ \"./src/scripts/eventNotifier.js\").EventNotifier;\n\n/**\n * A vue component of the scaffold viewer.\n *\n * @requires ./PrimitveControls.vue\n * @requires ./TreeControls.vue\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"ScaffoldVuer\",\n components: {\n MapSvgIcon: _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__[\"MapSvgIcon\"],\n MapSvgSpriteColor: _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__[\"MapSvgSpriteColor\"],\n PrimitiveControls: _PrimitiveControls__WEBPACK_IMPORTED_MODULE_34__[\"default\"],\n ScaffoldTooltip: _ScaffoldTooltip__WEBPACK_IMPORTED_MODULE_35__[\"default\"],\n TreeControls: _TreeControls__WEBPACK_IMPORTED_MODULE_36__[\"default\"]\n },\n props: {\n /**\n * URL of the zincjs metadata. This value will be ignored if a valid\n * state prop is also provided.\n * If the url needs to be updated with state present, please use\n * the setURL method.\n */\n url: {\n type: String,\n default: \"\"\n },\n /**\n * Show the colour control of set to true.\n */\n showColourPicker: {\n type: Boolean,\n default: false\n },\n /**\n * Flag to show/hide the UI.\n */\n displayUI: {\n type: Boolean,\n default: true\n },\n /**\n * Display all graphics at start.\n *\n * This setting only works when traditional is set to false.\n */\n displayAtStartUp: {\n type: Boolean,\n default: true\n },\n /**\n * Use for toggling the help tooltips.\n */\n helpMode: {\n type: Boolean,\n default: false\n },\n /**\n * Use for show/display beta warning icon.\n */\n displayWarning: {\n type: Boolean,\n default: true\n },\n /**\n * Warning message for the hovered over text\n * on the warning icon.\n */\n warningMessage: {\n type: String,\n default: \"Beta feature - under active development\"\n },\n displayLatestChanges: {\n type: Boolean,\n default: false\n },\n latestChangesMessage: {\n type: String,\n default: \"New feature - Local search is now available\"\n },\n /**\n * Show/hide pickable markers for regions.\n */\n displayMarkers: {\n type: Boolean,\n default: false\n },\n markerLabels: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n /**\n * Show/hide minimap.\n */\n displayMinimap: {\n type: Boolean,\n default: false\n },\n /**\n * Format of the input URL\n */\n format: {\n type: String,\n default: \"metadata\"\n },\n /**\n * Settings for minimap position, size and alignment.\n */\n minimapSettings: {\n type: Object,\n default: function _default() {\n return {\n x_offset: 16,\n y_offset: 16,\n width: 128,\n height: 128,\n align: \"top-right\"\n };\n }\n },\n /**\n * Flag to determine rather open map UI should be\n * presented or not.\n */\n enableOpenMapUI: {\n type: Boolean,\n default: false\n },\n openMapOptions: {\n type: Array,\n default: function _default() {\n return [{\n display: \"Open AC Map\",\n key: \"AC\"\n }, {\n display: \"Open FC Map\",\n key: \"FC\"\n }, {\n display: \"Open 3D Human Map\",\n key: \"3D\"\n }];\n }\n },\n /**\n * State containing state of the scaffold.\n */\n state: {\n type: Object,\n default: undefined\n },\n /**\n * Optional prop for the name of the region to focus on,\n * this option is ignored if state or viewURL is also provided.\n */\n region: {\n type: String,\n default: \"\"\n },\n /**\n * Optional prop for an URL of containing information of a viewport.\n * This option is ignored if state is also provided.\n * It will use the provided URL as base if a relative parth is provided.\n */\n viewURL: {\n type: String,\n default: \"\"\n },\n /**\n * Settings for turning on/off rendering\n */\n render: {\n type: Boolean,\n default: true\n },\n /**\n * Specify the endpoint of the flatmap server.\n * This is used by annotation service included in\n * third party flatmapvuer library.\n */\n flatmapAPI: {\n type: String,\n default: \"https://mapcore-demo.org/current/flatmap/v3/\"\n }\n },\n provide: function provide() {\n return {\n flatmapAPI: this.flatmapAPI,\n scaffoldUrl: this.url\n };\n },\n data: function data() {\n return {\n sceneData: this.$module.sceneData,\n isPlaying: false,\n isReady: false,\n /**\n * This is set when scene is transitioning.\n */\n isTransitioning: false,\n tooltipAppendToBody: false,\n hoverVisibilities: [{\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }],\n inHelp: false,\n loading: false,\n duration: 3000,\n drawerOpen: true,\n currentBackground: \"white\",\n availableBackground: [\"white\", \"lightskyblue\", \"black\"],\n minimisedSlider: false,\n sliderPosition: \"\",\n timeMax: 100,\n orginalDuration: \"\",\n animateDuration: \"6secs\",\n playSpeed: [{\n value: 0.1,\n label: \"0.1x\"\n }, {\n value: 0.5,\n label: \"0.5x\"\n }, {\n value: 1,\n label: \"1x\"\n }, {\n value: 2,\n label: \"2x\"\n }, {\n value: 5,\n label: \"5x\"\n }, {\n value: 10,\n label: \"10x\"\n }],\n currentSpeed: 1,\n timeStamps: {},\n defaultCheckedKeys: [],\n tData: {\n label: \"\",\n region: \"\",\n visible: false,\n x: 200,\n y: 200,\n active: false\n },\n fileFormat: \"metadata\",\n previousMarkerLabels: [],\n viewingMode: \"Exploration\",\n viewingModes: [\"Annotation\", \"Exploration\"]\n };\n },\n watch: {\n format: {\n handler: function handler(value) {\n this.fileFormat = value;\n },\n immediate: true\n },\n url: {\n handler: function handler(newValue) {\n if (this.state === undefined || this.state.url === undefined) this.setURL(newValue);\n },\n immediate: true\n },\n region: {\n handler: function handler(region) {\n if (!(this.state || this.viewURL)) this.setFocusedRegion(region);\n },\n immediate: true\n },\n state: {\n handler: function handler(state) {\n this.setState(state);\n },\n immediate: true,\n deep: true\n },\n viewURL: {\n handler: function handler(viewURL) {\n this.updateViewURL(viewURL);\n },\n immediate: true\n },\n helpMode: function helpMode(val) {\n this.setHelpMode(val);\n },\n displayMarkers: function displayMarkers(val) {\n this.$module.scene.displayMarkers = val;\n //Update pickable objects\n this.$module.scene.forcePickableObjectsUpdate = true;\n },\n displayMinimap: function displayMinimap(val) {\n this.$module.scene.displayMinimap = val;\n },\n \"sceneData.currentTime\": function sceneDataCurrentTime() {\n /**\n * Triggers when scene time changes.\n *\n * @property {number} time Current build-in time of scene.\n * of selected object.\n */\n this.$emit(\"timeChanged\", this.sceneData.currentTime);\n },\n duration: function duration() {\n this.$module.scene.setDuration(this.duration);\n },\n minimapSettings: {\n deep: true,\n handler: \"updateMinimapScissor\"\n },\n render: function render(val) {\n this.toggleRendering(val);\n },\n markerLabels: function markerLabels(labels) {\n var _this = this;\n this.previousMarkerLabels.forEach(function (pml) {\n _this.setMarkerModeForObjectsWithName(pml, \"off\");\n });\n labels.forEach(function (l) {\n _this.setMarkerModeForObjectsWithName(l, \"on\");\n });\n this.previousMarkerLabels = labels;\n }\n },\n beforeCreate: function beforeCreate() {\n this.$module = new OrgansViewer();\n this.selectedObjects = [];\n this.hoveredObjects = [];\n this.currentBackground = \"white\";\n this._currentURL = undefined;\n this.availableBackground = [\"white\", \"black\", \"lightskyblue\"];\n this.$_searchIndex = new _scripts_search_js__WEBPACK_IMPORTED_MODULE_39__[\"SearchIndex\"]();\n },\n mounted: function mounted() {\n this.$refs.treeControls.setModule(this.$module);\n var eventNotifier = new EventNotifier();\n eventNotifier.subscribe(this, this.eventNotifierCallback);\n this.$module.addNotifier(eventNotifier);\n this.$module.addOrganPartAddedCallback(this.zincObjectAdded);\n this.$module.initialiseRenderer(this.$refs.display);\n this.toggleRendering(this.render);\n this.ro = new ResizeObserver(this.adjustLayout).observe(this.$refs.scaffoldContainer);\n this.defaultRate = this.$module.getPlayRate();\n },\n beforeDestroy: function beforeDestroy() {\n if (this.ro) this.ro.disconnect();\n this.$module.destroy();\n this.$module = undefined;\n },\n methods: {\n addZincObject: function addZincObject(zincObject) {\n if (this.$module.scene) {\n this.$module.scene.addZincObject(zincObject);\n this.zincObjectAdded(zincObject);\n if (this.$refs.treeControls) this.$refs.treeControls.zincObjectAdded(zincObject);\n }\n },\n /**\n * This is called when a new zinc object is read into the scene.\n */\n zincObjectAdded: function zincObjectAdded(zincObject) {\n this.loading = false;\n this.$_searchIndex.addZincObject(zincObject, zincObject.uuid);\n this.$emit(\"zinc-object-added\", zincObject);\n },\n /**\n * \n */\n addRegionsToSearchIndex: function addRegionsToSearchIndex() {\n var _this2 = this;\n var rootRegion = this.$module.scene.getRootRegion();\n var regions = rootRegion.getChildRegions(true);\n regions.forEach(function (region) {\n _this2.$_searchIndex.addRegion(region, region.uuid);\n });\n },\n /**\n * This is called when Change backgspeedround colour button\n * is pressed an causes the backgrouColornd colour to be changed\n * to one of the three preset colour: white, black and\n * lightskyblue.\n */\n backgroundChangeCallback: function backgroundChangeCallback(colour) {\n this.currentBackground = colour;\n this.$module.zincRenderer.getThreeJSRenderer().setClearColor(this.currentBackground, 1);\n },\n /**\n * This is called by captueeScreenshot and after the last render\n * loop, it download a screenshot of the current scene with no UI.\n */\n captureScreenshotCallback: function captureScreenshotCallback() {\n //Remove the callback, only needs to happen once\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.captureID);\n var screenshot = this.$module.zincRenderer.getThreeJSRenderer().domElement.toDataURL(\"image/png\");\n var hrefElement = document.createElement(\"a\");\n document.body.append(hrefElement);\n if (!this.captureFilename) hrefElement.download = \"screenshot.png\";else hrefElement.download = this.captureFilename;\n hrefElement.href = screenshot;\n hrefElement.click();\n hrefElement.remove();\n },\n /**\n * Function for capturing a screenshot of the current rendering.\n *\n * @param {String} filename filename given to the screenshot.\n *\n * @public\n */\n captureScreenshot: function captureScreenshot(filename) {\n this.captureFilename = filename;\n this.captureID = this.$module.zincRenderer.addPostRenderCallbackFunction(this.captureScreenshotCallback);\n },\n /**\n * Function to clear current scene, the tree controls and the search index.\n *\n * @public\n */\n clearScene: function clearScene() {\n if (this.$refs.treeControls) this.$refs.treeControls.clear();\n if (this.$_searchIndex) this.$_searchIndex.removeAll();\n if (this.$module.scene) this.$module.scene.clearAll();\n },\n formatTooltip: function formatTooltip(val) {\n if (this.timeMax >= 1000) {\n if (val) {\n var sec = (val % 60000 / 1000).toFixed(2) + \"s\";\n var min = val > 60000 ? (val / 60000).toFixed(0) + \"m \" : \"\";\n return min + sec;\n }\n }\n return val ? val.toFixed(2) + \" ms\" : \"0 ms\";\n },\n /**\n * Function to reset the view to default.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n fitWindow: function fitWindow() {\n if (this.$module.scene) {\n this.$module.scene.viewAll();\n }\n },\n /**\n * Function to zoom in.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n zoomIn: function zoomIn() {\n if (this.$module.scene) {\n this.$module.scene.changeZoomByScrollRateUnit(-1);\n }\n },\n /**\n * Function to zoom out.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n zoomOut: function zoomOut() {\n if (this.$module.scene) {\n this.$module.scene.changeZoomByScrollRateUnit(1);\n }\n },\n /**\n * Function to change the current play speed.\n *\n * @public\n */\n speedChanged: function speedChanged(speed) {\n this.currentSpeed = speed;\n this.$module.setPlayRate(this.defaultRate * this.currentSpeed);\n },\n /**\n * Function used to stop the free spin\n *\n * @public\n */\n stopFreeSpin: function stopFreeSpin() {\n var cameracontrol = this.$module.scene.getZincCameraControls();\n cameracontrol.stopAutoTumble();\n this.isTransitioning = false;\n },\n findObjectsWithGroupName: function findObjectsWithGroupName(name) {\n var objects = [];\n if (name && name != \"\" && this.$module.scene) {\n objects = this.$module.scene.findObjectsWithGroupName(name);\n }\n return objects;\n },\n /**\n * Focus on named region\n */\n viewRegion: function viewRegion(names) {\n var rootRegion = this.$module.scene.getRootRegion();\n var groups = Array.isArray(names) ? names : [names];\n var objects = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"findObjectsWithNames\"])(rootRegion, groups, \"\", true);\n var box = this.$module.scene.getBoundingBoxOfZincObjects(objects);\n if (box) {\n if (this.$module.isSyncControl()) {\n this.$module.setSyncControlZoomToBox(box);\n } else {\n var dist = this.$module.scene.camera.far - this.$module.scene.camera.near;\n this.$module.scene.viewAllWithBoundingBox(box);\n this.$module.scene.camera.far = this.$module.scene.camera.near + dist;\n this.$module.scene.camera.updateProjectionMatrix();\n }\n return true;\n }\n return false;\n },\n setFocusedRegion: function setFocusedRegion(name) {\n if (name) {\n if (this.isReady) {\n this.viewRegion(name);\n } else {\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n region: name\n }));\n }\n }\n },\n updateViewURL: function updateViewURL(viewURL) {\n if (viewURL) {\n if (this.isReady) {\n var url = new URL(viewURL, this.url);\n this.$module.scene.loadViewURL(url);\n } else {\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n viewURL: viewURL\n }));\n }\n }\n },\n getRendererInfo: function getRendererInfo() {\n if (this.$module.zincRenderer) {\n return this.$module.zincRenderer.getThreeJSRenderer().info;\n }\n return undefined;\n },\n /**\n * Function used to rotate the scene.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n freeSpin: function freeSpin() {\n if (this.$module.scene) {\n var cameracontrol = this.$module.scene.getZincCameraControls();\n this.isTransitioning = true;\n cameracontrol.enableAutoTumble();\n cameracontrol.autoTumble([1.0, 0.0], Math.PI, true);\n setTimeout(this.stopFreeSpin, 4000);\n }\n },\n /**\n * Callback when a region is selected/highlighted.\n * It will also update other controls.\n *\n */\n eventNotifierCallback: function eventNotifierCallback(event) {\n var names = [];\n var zincObjects = [];\n var region = undefined;\n if (event.eventType == 1 || event.eventType == 2) {\n event.identifiers.forEach(function (identifier) {\n if (identifier) {\n var id = identifier.data.id ? identifier.data.id : identifier.data.group;\n names.push(id);\n }\n });\n zincObjects = event.zincObjects;\n }\n /*\n * Event Type 1: Selected\n * Event Type 2: Highlighted\n * Event Type 1: Move\n */\n if (event.eventType == 1) {\n if (this.$refs.treeControls) {\n if (names.length > 0) {\n //this.$refs.treeControls.changeActiveByNames(names, region, false);\n this.$refs.treeControls.updateActiveUI(zincObjects);\n } else {\n this.hideRegionTooltip();\n this.$refs.treeControls.removeActive(true);\n }\n }\n // Triggers when an object has been selected\n this.$emit(\"scaffold-selected\", event.identifiers);\n } else if (event.eventType == 2) {\n if (this.selectedObjects.length === 0) {\n this.hideRegionTooltip();\n // const offsets = this.$refs.scaffoldContainer.getBoundingClientRect();\n if (this.$refs.treeControls) {\n if (names.length > 0) {\n //this.$refs.treeControls.changeHoverByNames(names, region, false);\n this.$refs.treeControls.updateHoverUI(zincObjects);\n } else {\n this.$refs.treeControls.removeHover(true);\n }\n }\n if (event.identifiers.length > 0 && event.identifiers[0]) {\n var id = event.identifiers[0].data.id ? event.identifiers[0].data.id : event.identifiers[0].data.group;\n if (event.identifiers[0].coords) {\n this.tData.active = false;\n this.tData.visible = true;\n this.tData.label = id;\n if (event.identifiers[0].data.region) this.tData.region = event.identifiers[0].data.region;else this.tData.region = undefined;\n this.tData.x = event.identifiers[0].coords.x;\n this.tData.y = event.identifiers[0].coords.y;\n }\n }\n // Triggers when an object has been highlighted\n this.$emit(\"scaffold-highlighted\", event.identifiers);\n }\n } else if (event.eventType == 3) {\n //MOVE\n if (event.identifiers.length > 0 && event.identifiers[0]) {\n if (event.identifiers[0].coords) {\n var offsets = this.$refs.scaffoldContainer.getBoundingClientRect();\n this.tData.x = event.identifiers[0].coords.x - offsets.left;\n this.tData.y = event.identifiers[0].coords.y - offsets.top;\n }\n }\n }\n },\n /**\n * Get the coordinates of the current selected region.\n *\n * @public\n */\n getCoordinatesOfSelected: function getCoordinatesOfSelected() {\n if (this.selectedObjects && this.selectedObjects.length > 0) {\n return this.$module.scene.getObjectsScreenXY(this.selectedObjects);\n }\n return undefined;\n },\n /**\n * Return an object containing the window coordinates of the\n * current selected region which will be updated after each render\n * loop.\n *\n * @public\n */\n getDynamicSelectedCoordinates: function getDynamicSelectedCoordinates() {\n return this.$module.selectedScreenCoordinates;\n },\n /**\n * Callback when time is changed through the UI.\n */\n timeChange: function timeChange(event) {\n var normalizedTime = event / this.timeMax * 100;\n if (normalizedTime != this.sceneData.currentTime) this.$module.updateTime(normalizedTime);\n },\n /**\n * A callback used by children components. Set the selected zinc object\n *\n * @param {object} object Zinc object\n */\n objectSelected: function objectSelected(objects, propagate) {\n this.selectedObjects = objects;\n if (this.selectedObjects && this.selectedObjects.length > 0) {\n this.$refs.primitiveControls.setObject(this.selectedObjects[0]);\n }\n this.$module.setSelectedByZincObjects(objects, undefined, propagate);\n },\n /**\n * A callback used by children components. Set the highlighted zinc object\n *\n * @param {object} object Zinc object\n */\n objectHovered: function objectHovered(objects, propagate) {\n this.hoveredObjects = objects;\n this.$module.setHighlightedByZincObjects(objects, undefined, propagate);\n },\n /**\n * Set the selected by name.\n *\n * @param {} name Name of the group\n */\n changeActiveByName: function changeActiveByName(names, region, propagate) {\n var isArray = Array.isArray(names);\n if (names === undefined || isArray && names.length === 0) {\n this.$refs.treeControls.removeActive(propagate);\n } else {\n var array = names;\n if (!isArray) array = [array];\n this.$refs.treeControls.changeActiveByNames(array, region, propagate);\n }\n },\n /**\n * Set the highlighted by name.\n *\n * @param {name} name Name of the group\n */\n changeHighlightedByName: function changeHighlightedByName(names, region, propagate) {\n var isArray = Array.isArray(names);\n if (names === undefined || isArray && names.length === 0) {\n this.$refs.treeControls.removeHover(propagate);\n } else {\n var array = names;\n if (!isArray) array = [array];\n this.$refs.treeControls.changeHoverByNames(array, region, propagate);\n }\n },\n /**\n * Start the animation.\n *\n * @param {object} object Zinc object\n */\n play: function play(flag) {\n this.$module.playAnimation(flag);\n this.isPlaying = flag;\n //Hide tooltip as location may\n //this.hideRegionTooltip();\n },\n\n /**\n * Function to toggle on/off overlay help.\n */\n setHelpMode: function setHelpMode(helpMode) {\n if (helpMode) {\n this.inHelp = true;\n this.hoverVisibilities.forEach(function (item) {\n item.value = true;\n });\n } else {\n this.inHelp = false;\n this.hoverVisibilities.forEach(function (item) {\n item.value = false;\n });\n }\n },\n /**\n * Callback function used by showRegionTooltip in the case when the tooltip\n * is out of view.\n */\n displayTooltipOfObjectsCallback: function displayTooltipOfObjectsCallback(name, objects, regionPath, resetView, liveUpdates) {\n var instance = this;\n return function () {\n instance.$module.zincRenderer.removePostRenderCallbackFunction(instance.$_regionTooltipCallback);\n instance.$_regionTooltipCallback = undefined;\n instance.displayTooltipOfObjects(name, objects, regionPath, resetView, liveUpdates);\n };\n },\n liveUpdateTooltipPosition: function liveUpdateTooltipPosition() {\n if (this.$module.selectedCenter) {\n this.tData.x = this.$module.selectedScreenCoordinates.x;\n this.tData.y = this.$module.selectedScreenCoordinates.y;\n }\n },\n displayTooltipOfObjects: function displayTooltipOfObjects(name, objects, regionPath, resetView, liveUpdates) {\n if (objects.length > 0) {\n var coords = objects[0].getClosestVertexDOMElementCoords(this.$module.scene);\n if (coords) {\n //The coords is not in view, view all if resetView flag is true\n if (!coords.inView) {\n this.hideRegionTooltip();\n if (resetView) {\n this.$module.scene.viewAll();\n //Use the post render callback to make sure the scene has been updated\n //before getting the position of the tooltip.\n if (this.$_regionTooltipCallback) {\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.$_regionTooltipCallback);\n }\n this.$_regionTooltipCallback = this.$module.zincRenderer.addPostRenderCallbackFunction(this.displayTooltipOfObjectsCallback(name, objects, regionPath, resetView, liveUpdates));\n }\n } else {\n if (!name.includes(\"Search Results for\")) {\n this.tData.active = true;\n } else {\n this.tData.active = false;\n }\n this.tData.visible = true;\n this.tData.label = name;\n this.tData.x = coords.position.x;\n this.tData.y = coords.position.y;\n this.tData.region = regionPath;\n if (this.$_liveCoordinatesUpdated) {\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.$_liveCoordinatesUpdated);\n }\n if (liveUpdates) {\n this.$module.setupLiveCoordinates(objects);\n this.$_liveCoordinatesUpdated = this.$module.zincRenderer.addPostRenderCallbackFunction(this.liveUpdateTooltipPosition);\n }\n }\n return true;\n }\n }\n this.hideRegionTooltip();\n return false;\n },\n /**\n * Display the tooltip used for displaying search result.\n * When resetView is set to true, it will\n * reset view if the tooltip is not in view.\n * Setting liveUpdates to true will update the tooltip location\n * at every rendering loop.\n */\n showRegionTooltipWithObjects: function showRegionTooltipWithObjects(label, zincObjects, regionPath, resetView, liveUpdates) {\n if (label && zincObjects && zincObjects.length > 0 && this.$module.scene) {\n return this.displayTooltipOfObjects(label, zincObjects, regionPath, resetView, liveUpdates);\n }\n this.hideRegionTooltip();\n return false;\n },\n /**\n * Display the tooltip. When resetView is set to true, it will\n * reset view if the tooltip is not in view.\n * Setting liveUpdates to true will update the tooltip location\n * at every rendering loop.\n */\n showRegionTooltip: function showRegionTooltip(name, resetView, liveUpdates) {\n if (name && this.$module.scene) {\n var rootRegion = this.$module.scene.getRootRegion();\n var groups = [name];\n var objects = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"findObjectsWithNames\"])(rootRegion, groups, \"\", true);\n var regionPath = undefined;\n if (objects && objects.length > 0) {\n regionPath = objects[0].getRegion().getFullPath();\n }\n return this.showRegionTooltipWithObjects(name, objects, regionPath, resetView, liveUpdates);\n }\n this.hideRegionTooltip();\n return false;\n },\n /**\n * Display the tooltip using the list of annotations.\n * When resetView is set to true, it will\n * reset view if the tooltip is not in view.\n * Setting liveUpdates to true will update the tooltip location\n * at every rendering loop.\n */\n showRegionTooltipWithAnnotations: function showRegionTooltipWithAnnotations(annotations, resetView, liveUpdates) {\n if (this.$module.scene) {\n var result = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"getObjectsFromAnnotations\"])(this.$module.scene, annotations);\n if (result && result.objects.length > 0) {\n return this.showRegionTooltipWithObjects(result.label, result.objects, result.regionPath, resetView, liveUpdates);\n }\n }\n this.hideRegionTooltip();\n return false;\n },\n hideRegionTooltip: function hideRegionTooltip() {\n if (this.$_liveCoordinatesUpdated) {\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.$_liveCoordinatesUpdated);\n //Unset the tracking\n this.$module.setupLiveCoordinates(undefined);\n }\n this.tData.active = false;\n this.tData.visible = false;\n this.tData.region = undefined;\n },\n /**\n * Set the marker modes for objects with the provided name, mode can\n * be \"on\", \"off\" or \"inherited\".\n */\n setMarkerModeForObjectsWithName: function setMarkerModeForObjectsWithName(name, mode) {\n if (name && this.$module.scene) {\n var rootRegion = this.$module.scene.getRootRegion();\n var groups = [name];\n var objects = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"findObjectsWithNames\"])(rootRegion, groups, \"\", true);\n objects.forEach(function (object) {\n return object.setMarkerMode(mode);\n });\n }\n },\n /**\n * Set the marker modes for objects specified by the list of annotations\n */\n setMarkerModeWithAnnotations: function setMarkerModeWithAnnotations(annotations, mode) {\n if (this.$module.scene) {\n var result = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"getObjectsFromAnnotations\"])(this.$module.scene, annotations);\n if (result && result.objects.length > 0) {\n result.objects.forEach(function (object) {\n return object.setMarkerMode(mode);\n });\n }\n }\n },\n /**\n * This is called when mouse cursor enters supported elements\n * with help tootltips.\n */\n showHelpText: function showHelpText(helpTextNumber) {\n var _this3 = this;\n if (!this.inHelp) {\n this.helpTextWait = setTimeout(function () {\n _this3.hoverVisibilities[helpTextNumber].value = true;\n }, 500);\n }\n },\n /**\n * This is called when mouse cursor exits supported element..\n */\n hideHelpText: function hideHelpText(helpTextNumber) {\n if (!this.inHelp) {\n this.hoverVisibilities[helpTextNumber].value = false;\n clearTimeout(this.helpTextWait);\n }\n },\n search: function search(text, displayLabel) {\n if (this.$_searchIndex) {\n if (text === undefined || text === \"\" || Array.isArray(text) && text.length === 0) {\n this.objectSelected([], true);\n return false;\n } else {\n var result = this.$_searchIndex.searchAndProcessResult(text);\n var zincObjects = result.zincObjects;\n if (zincObjects.length > 0) {\n this.objectSelected(zincObjects, true);\n if (displayLabel) {\n for (var i = 0; i < zincObjects.length; i++) {\n if (zincObjects[i] && zincObjects[i].groupName) {\n this.showRegionTooltipWithObjects(result.label, zincObjects, result.regionPath, true, true);\n }\n }\n }\n return true;\n } else {\n this.objectSelected([], true);\n }\n }\n }\n return false;\n },\n /**\n * Get the list of suggested terms\n */\n fetchSuggestions: function fetchSuggestions(term) {\n if (this.$_searchIndex === undefined) return [];\n return this.$_searchIndex.auto_suggest(term);\n },\n /**\n * Called when minimap settings has changed. Pass the\n * parameters to ZincJS and marked it for update.\n */\n updateMinimapScissor: function updateMinimapScissor() {\n var _this4 = this;\n Object.keys(this.minimapSettings).forEach(function (key) {\n _this4.$module.scene.minimapScissor[key] = _this4.minimapSettings[key];\n });\n this.$module.scene.minimapScissor.updateRequired = true;\n },\n updateSettingsfromScene: function updateSettingsfromScene() {\n this.currentSpeed = 1;\n this.$module.setPlayRate(this.defaultRate);\n this.orginalDuration = this.$module.scene.getMetadataTag(\"OriginalDuration\");\n this.animateDuration = this.$module.scene.getMetadataTag(\"Duration\");\n var timeStamps = this.$module.scene.getMetadataTag(\"TimeStamps\");\n this.timeStamps = {};\n for (var key in timeStamps) {\n this.timeStamps[timeStamps[key]] = key;\n }\n this.timeMax = this.$module.scene.getDuration();\n },\n setURLFinishCallback: function setURLFinishCallback(options) {\n var _this5 = this;\n return function () {\n if (options) {\n if (options.viewport) {\n _this5.$module.scene.getZincCameraControls().setCurrentCameraSettings(options.viewport);\n } else if (options.viewURL && options.viewURL !== \"\") {\n var url = new URL(options.viewURL, _this5.url);\n _this5.$module.scene.loadViewURL(url);\n } else if (options.region && options.region !== \"\") {\n _this5.viewRegion(options.region);\n }\n if (options.visibility) {\n // Some UIs may not be ready at this time.\n _this5.$nextTick(function () {\n _this5.$refs.treeControls.setState(options.visibility);\n });\n }\n }\n _this5.updateSettingsfromScene();\n _this5.$module.updateTime(0.01);\n _this5.$module.updateTime(0);\n _this5.$module.unsetFinishDownloadCallback();\n _this5.addRegionsToSearchIndex();\n _this5.$emit(\"on-ready\");\n _this5.setMarkers();\n _this5.isReady = true;\n };\n },\n /**\n * Function used for getting the current states of the scene. This exported states\n * can be imported using the importStates method.\n *\n * @public\n */\n getState: function getState() {\n var state = {\n format: this.fileFormat,\n url: this._currentURL,\n viewport: undefined,\n visibility: undefined\n };\n if (this.$refs.treeControls) state.visibility = this.$refs.treeControls.getState();\n if (this.$module.scene) {\n var zincCameraControls = this.$module.scene.getZincCameraControls();\n state.viewport = zincCameraControls.getCurrentViewport();\n }\n return state;\n },\n /**\n * Function used for importing the states of the scene. This exported states\n * can be imported using the read states method.\n *\n * @public\n */\n setState: function setState(state) {\n if (state) {\n if (state.url && state.url !== this._currentURL) {\n this.setURLAndState(state.url, {\n fileFormat: state.fileFormat,\n viewport: state.viewport,\n visibility: state.visibility\n });\n } else {\n if (state.viewport || state.visibility) {\n if (this.isReady && this.$module.scene) {\n if (state.viewport) this.$module.scene.getZincCameraControls().setCurrentCameraSettings(state.viewport);\n if (state.visibility) this.$refs.treeControls.setState(state.visibility);\n } else {\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n viewport: state.viewport,\n visibility: state.visibility\n }));\n }\n }\n }\n }\n },\n exportGLTF: function exportGLTF(binary) {\n return this.$module.scene.exportGLTF(binary);\n },\n /**\n * Function used for reading in new scaffold metadata and a custom\n * viewport. This function will ignore the state prop and\n * read in the new url.\n *\n * @public\n */\n setURLAndState: function setURLAndState(newValue, state) {\n if (newValue != this._currentURL) {\n if (state && state.format) this.fileFormat = state.format;\n var viewport = state && state.viewport ? state.viewport : undefined;\n var visibility = state && state.visibility ? state.visibility : undefined;\n this._currentURL = newValue;\n if (this.$refs.treeControls) this.$refs.treeControls.clear();\n this.loading = true;\n this.isReady = false;\n this.$_searchIndex.removeAll();\n this.hideRegionTooltip();\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n viewport: viewport,\n region: this.region,\n viewURL: this.viewURL,\n visibility: visibility\n }));\n if (this.fileFormat === \"gltf\") {\n this.$module.loadGLTFFromURL(newValue, \"scene\", true);\n } else {\n this.$module.loadOrgansFromURL(newValue, undefined, undefined, \"scene\", undefined, true);\n }\n this.$module.scene.displayMarkers = this.displayMarkers;\n this.$module.scene.forcePickableObjectsUpdate = true;\n this.$module.scene.displayMinimap = this.displayMinimap;\n this.updateMinimapScissor();\n }\n },\n /**\n * Function used for reading in new scaffold metadata. This function will ignore\n * the state prop and read in the new url.\n *\n * @public\n */\n setURL: function setURL(newValue) {\n this.setURLAndState(newValue, undefined);\n },\n /**\n * Callback when drawer is toggled.\n */\n drawerToggled: function drawerToggled(flag) {\n this.drawerOpen = flag;\n this.adjustLayout();\n },\n /**\n * Callback using ResizeObserver.\n */\n adjustLayout: function adjustLayout() {\n var width = this.$refs.scaffoldContainer.clientWidth;\n this.minimisedSlider = width < 812;\n if (this.minimisedSlider) {\n this.sliderPosition = this.drawerOpen ? \"right\" : \"left\";\n } else {\n this.sliderPosition = \"\";\n }\n },\n toggleRendering: function toggleRendering(flag) {\n if (this.$module.zincRenderer) {\n if (flag) {\n this.$module.zincRenderer.animate();\n } else {\n this.$module.zincRenderer.stopAnimate();\n }\n }\n },\n forceResize: function forceResize() {\n if (this.$module.zincRenderer) {\n this.$module.zincRenderer.onWindowResize();\n }\n },\n syncControlCallback: function syncControlCallback() {\n var payload = this.$module.NDCCameraControl.getPanZoom();\n if (this.tData.visible) {\n this.showRegionTooltip(this.tData.label, true, true);\n }\n this.$emit(\"scaffold-navigated\", payload);\n },\n /**\n * Rotate mode - \"none\", \"horizontal\", \"vertical\", \"free\" but\n * it will be ignored if flag is set to false.\n */\n toggleSyncControl: function toggleSyncControl(flag, rotateMode) {\n this.$module.toggleSyncControl(flag, rotateMode);\n this.$module.setSyncControlCallback(this.syncControlCallback);\n },\n /**\n * Set the markers for the scene.\n */\n setMarkers: function setMarkers() {\n var _this6 = this;\n this.markerLabels.forEach(function (l) {\n _this6.setMarkerModeForObjectsWithName(l, \"on\");\n });\n }\n }\n});\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldVuer.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
709
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var element_ui_lib_theme_chalk_tabs_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! element-ui/lib/theme-chalk/tabs.css */ \"./node_modules/element-ui/lib/theme-chalk/tabs.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_tabs_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_tabs_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! element-ui/lib/theme-chalk/base.css */ \"./node_modules/element-ui/lib/theme-chalk/base.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_base_css__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! element-ui/lib/tabs */ \"./node_modules/element-ui/lib/tabs.js\");\n/* harmony import */ var element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var element_ui_lib_theme_chalk_tab_pane_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! element-ui/lib/theme-chalk/tab-pane.css */ \"./node_modules/element-ui/lib/theme-chalk/tab-pane.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_tab_pane_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_tab_pane_css__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! element-ui/lib/tab-pane */ \"./node_modules/element-ui/lib/tab-pane.js\");\n/* harmony import */ var element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var element_ui_lib_theme_chalk_slider_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! element-ui/lib/theme-chalk/slider.css */ \"./node_modules/element-ui/lib/theme-chalk/slider.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_slider_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_slider_css__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! element-ui/lib/slider */ \"./node_modules/element-ui/lib/slider.js\");\n/* harmony import */ var element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var element_ui_lib_theme_chalk_select_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! element-ui/lib/theme-chalk/select.css */ \"./node_modules/element-ui/lib/theme-chalk/select.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_select_css__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_select_css__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! element-ui/lib/select */ \"./node_modules/element-ui/lib/select.js\");\n/* harmony import */ var element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var element_ui_lib_theme_chalk_row_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! element-ui/lib/theme-chalk/row.css */ \"./node_modules/element-ui/lib/theme-chalk/row.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_row_css__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_row_css__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! element-ui/lib/row */ \"./node_modules/element-ui/lib/row.js\");\n/* harmony import */ var element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var element_ui_lib_theme_chalk_popover_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! element-ui/lib/theme-chalk/popover.css */ \"./node_modules/element-ui/lib/theme-chalk/popover.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_popover_css__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_popover_css__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! element-ui/lib/popover */ \"./node_modules/element-ui/lib/popover.js\");\n/* harmony import */ var element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var element_ui_lib_theme_chalk_option_css__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! element-ui/lib/theme-chalk/option.css */ \"./node_modules/element-ui/lib/theme-chalk/option.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_option_css__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_option_css__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! element-ui/lib/option */ \"./node_modules/element-ui/lib/option.js\");\n/* harmony import */ var element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var element_ui_lib_theme_chalk_loading_css__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! element-ui/lib/theme-chalk/loading.css */ \"./node_modules/element-ui/lib/theme-chalk/loading.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_loading_css__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_loading_css__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! element-ui/lib/loading */ \"./node_modules/element-ui/lib/loading.js\");\n/* harmony import */ var element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var element_ui_lib_theme_chalk_col_css__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! element-ui/lib/theme-chalk/col.css */ \"./node_modules/element-ui/lib/theme-chalk/col.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_col_css__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_col_css__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! element-ui/lib/col */ \"./node_modules/element-ui/lib/col.js\");\n/* harmony import */ var element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var element_ui_lib_theme_chalk_button_css__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! element-ui/lib/theme-chalk/button.css */ \"./node_modules/element-ui/lib/theme-chalk/button.css\");\n/* harmony import */ var element_ui_lib_theme_chalk_button_css__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_theme_chalk_button_css__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! element-ui/lib/button */ \"./node_modules/element-ui/lib/button.js\");\n/* harmony import */ var element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_for_each_js__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ \"./node_modules/core-js/modules/es.number.to-fixed.js\");\n/* harmony import */ var core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_number_to_fixed_js__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n/* harmony import */ var core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_iterator_js__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n/* harmony import */ var core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_iterator_js__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n/* harmony import */ var core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_dom_collections_iterator_js__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! core-js/modules/web.url.js */ \"./node_modules/core-js/modules/web.url.js\");\n/* harmony import */ var core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_js__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! core-js/modules/web.url-search-params.js */ \"./node_modules/core-js/modules/web.url-search-params.js\");\n/* harmony import */ var core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_web_url_search_params_js__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! core-js/modules/es.array.push.js */ \"./node_modules/core-js/modules/es.array.push.js\");\n/* harmony import */ var core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_push_js__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n/* harmony import */ var core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_keys_js__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! vue */ \"vue\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _PrimitiveControls__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./PrimitiveControls */ \"./src/components/PrimitiveControls.vue\");\n/* harmony import */ var _ScaffoldTooltip__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ScaffoldTooltip */ \"./src/components/ScaffoldTooltip.vue\");\n/* harmony import */ var _TreeControls__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./TreeControls */ \"./src/components/TreeControls.vue\");\n/* harmony import */ var _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @abi-software/svg-sprite */ \"./node_modules/@abi-software/svg-sprite/dist/svg-sprite.common.js\");\n/* harmony import */ var _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../scripts/utilities.js */ \"./src/scripts/utilities.js\");\n/* harmony import */ var _scripts_search_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../scripts/search.js */ \"./src/scripts/search.js\");\n/* harmony import */ var element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! element-ui/lib/locale/lang/en */ \"./node_modules/element-ui/lib/locale/lang/en.js\");\n/* harmony import */ var element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var element_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! element-ui/lib/locale */ \"./node_modules/element-ui/lib/locale/index.js\");\n/* harmony import */ var element_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(element_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable no-alert, no-console */\n\n\n\n\n\n\n\n\n\nelement_ui_lib_locale__WEBPACK_IMPORTED_MODULE_41___default.a.use(element_ui_lib_locale_lang_en__WEBPACK_IMPORTED_MODULE_40___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_button__WEBPACK_IMPORTED_MODULE_20___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_col__WEBPACK_IMPORTED_MODULE_18___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_loading__WEBPACK_IMPORTED_MODULE_16___default.a.directive);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_option__WEBPACK_IMPORTED_MODULE_14___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_popover__WEBPACK_IMPORTED_MODULE_12___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_row__WEBPACK_IMPORTED_MODULE_10___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_select__WEBPACK_IMPORTED_MODULE_8___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_slider__WEBPACK_IMPORTED_MODULE_6___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_tab_pane__WEBPACK_IMPORTED_MODULE_4___default.a);\nvue__WEBPACK_IMPORTED_MODULE_33___default.a.use(element_ui_lib_tabs__WEBPACK_IMPORTED_MODULE_2___default.a);\nvar OrgansViewer = __webpack_require__(/*! ../scripts/organsRenderer */ \"./src/scripts/organsRenderer.js\").OrgansViewer;\nvar EventNotifier = __webpack_require__(/*! ../scripts/eventNotifier */ \"./src/scripts/eventNotifier.js\").EventNotifier;\n\n/**\n * A vue component of the scaffold viewer.\n *\n * @requires ./PrimitveControls.vue\n * @requires ./TreeControls.vue\n */\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n name: \"ScaffoldVuer\",\n components: {\n MapSvgIcon: _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__[\"MapSvgIcon\"],\n MapSvgSpriteColor: _abi_software_svg_sprite__WEBPACK_IMPORTED_MODULE_37__[\"MapSvgSpriteColor\"],\n PrimitiveControls: _PrimitiveControls__WEBPACK_IMPORTED_MODULE_34__[\"default\"],\n ScaffoldTooltip: _ScaffoldTooltip__WEBPACK_IMPORTED_MODULE_35__[\"default\"],\n TreeControls: _TreeControls__WEBPACK_IMPORTED_MODULE_36__[\"default\"]\n },\n props: {\n /**\n * URL of the zincjs metadata. This value will be ignored if a valid\n * state prop is also provided.\n * If the url needs to be updated with state present, please use\n * the setURL method.\n */\n url: {\n type: String,\n default: \"\"\n },\n /**\n * Show the colour control of set to true.\n */\n showColourPicker: {\n type: Boolean,\n default: false\n },\n /**\n * Flag to show/hide the UI.\n */\n displayUI: {\n type: Boolean,\n default: true\n },\n /**\n * Display all graphics at start.\n *\n * This setting only works when traditional is set to false.\n */\n displayAtStartUp: {\n type: Boolean,\n default: true\n },\n /**\n * Use for toggling the help tooltips.\n */\n helpMode: {\n type: Boolean,\n default: false\n },\n /**\n * Use for show/display beta warning icon.\n */\n displayWarning: {\n type: Boolean,\n default: true\n },\n /**\n * Warning message for the hovered over text\n * on the warning icon.\n */\n warningMessage: {\n type: String,\n default: \"Beta feature - under active development\"\n },\n displayLatestChanges: {\n type: Boolean,\n default: false\n },\n latestChangesMessage: {\n type: String,\n default: \"New feature - Local search is now available\"\n },\n /**\n * Show/hide pickable markers for regions.\n */\n displayMarkers: {\n type: Boolean,\n default: false\n },\n markerLabels: {\n type: Array,\n default: function _default() {\n return [];\n }\n },\n /**\n * Show/hide minimap.\n */\n displayMinimap: {\n type: Boolean,\n default: false\n },\n /**\n * Format of the input URL\n */\n format: {\n type: String,\n default: \"metadata\"\n },\n /**\n * Settings for minimap position, size and alignment.\n */\n minimapSettings: {\n type: Object,\n default: function _default() {\n return {\n x_offset: 16,\n y_offset: 16,\n width: 128,\n height: 128,\n align: \"top-right\"\n };\n }\n },\n /**\n * Flag to determine rather open map UI should be\n * presented or not.\n */\n enableOpenMapUI: {\n type: Boolean,\n default: false\n },\n openMapOptions: {\n type: Array,\n default: function _default() {\n return [{\n display: \"Open AC Map\",\n key: \"AC\"\n }, {\n display: \"Open FC Map\",\n key: \"FC\"\n }, {\n display: \"Open 3D Human Map\",\n key: \"3D\"\n }];\n }\n },\n /**\n * State containing state of the scaffold.\n */\n state: {\n type: Object,\n default: undefined\n },\n /**\n * Optional prop for the name of the region to focus on,\n * this option is ignored if state or viewURL is also provided.\n */\n region: {\n type: String,\n default: \"\"\n },\n /**\n * Optional prop for an URL of containing information of a viewport.\n * This option is ignored if state is also provided.\n * It will use the provided URL as base if a relative parth is provided.\n */\n viewURL: {\n type: String,\n default: \"\"\n },\n /**\n * Settings for turning on/off rendering\n */\n render: {\n type: Boolean,\n default: true\n },\n /**\n * Specify the endpoint of the flatmap server.\n * This is used by annotation service included in\n * third party flatmapvuer library.\n */\n flatmapAPI: {\n type: String,\n default: \"https://mapcore-demo.org/current/flatmap/v3/\"\n }\n },\n provide: function provide() {\n return {\n flatmapAPI: this.flatmapAPI,\n scaffoldUrl: this.url\n };\n },\n data: function data() {\n return {\n sceneData: this.$module.sceneData,\n isPlaying: false,\n isReady: false,\n /**\n * This is set when scene is transitioning.\n */\n isTransitioning: false,\n tooltipAppendToBody: false,\n hoverVisibilities: [{\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }, {\n value: false\n }],\n inHelp: false,\n loading: false,\n duration: 3000,\n drawerOpen: true,\n currentBackground: \"white\",\n availableBackground: [\"white\", \"lightskyblue\", \"black\"],\n minimisedSlider: false,\n sliderPosition: \"\",\n timeMax: 100,\n orginalDuration: \"\",\n animateDuration: \"6secs\",\n playSpeed: [{\n value: 0.1,\n label: \"0.1x\"\n }, {\n value: 0.5,\n label: \"0.5x\"\n }, {\n value: 1,\n label: \"1x\"\n }, {\n value: 2,\n label: \"2x\"\n }, {\n value: 5,\n label: \"5x\"\n }, {\n value: 10,\n label: \"10x\"\n }],\n currentSpeed: 1,\n timeStamps: {},\n defaultCheckedKeys: [],\n tData: {\n label: \"\",\n region: \"\",\n visible: false,\n x: 200,\n y: 200,\n active: false\n },\n fileFormat: \"metadata\",\n previousMarkerLabels: [],\n viewingMode: \"Exploration\",\n viewingModes: [\"Annotation\", \"Exploration\"]\n };\n },\n watch: {\n format: {\n handler: function handler(value) {\n this.fileFormat = value;\n },\n immediate: true\n },\n url: {\n handler: function handler(newValue) {\n if (this.state === undefined || this.state.url === undefined) this.setURL(newValue);\n },\n immediate: true\n },\n region: {\n handler: function handler(region) {\n if (!(this.state || this.viewURL)) this.setFocusedRegion(region);\n },\n immediate: true\n },\n state: {\n handler: function handler(state) {\n this.setState(state);\n },\n immediate: true,\n deep: true\n },\n viewURL: {\n handler: function handler(viewURL) {\n this.updateViewURL(viewURL);\n },\n immediate: true\n },\n helpMode: function helpMode(val) {\n this.setHelpMode(val);\n },\n displayMarkers: function displayMarkers(val) {\n this.$module.scene.displayMarkers = val;\n //Update pickable objects\n this.$module.scene.forcePickableObjectsUpdate = true;\n },\n displayMinimap: function displayMinimap(val) {\n this.$module.scene.displayMinimap = val;\n },\n \"sceneData.currentTime\": function sceneDataCurrentTime() {\n /**\n * Triggers when scene time changes.\n *\n * @property {number} time Current build-in time of scene.\n * of selected object.\n */\n this.$emit(\"timeChanged\", this.sceneData.currentTime);\n },\n duration: function duration() {\n this.$module.scene.setDuration(this.duration);\n },\n minimapSettings: {\n deep: true,\n handler: \"updateMinimapScissor\"\n },\n render: function render(val) {\n this.toggleRendering(val);\n },\n markerLabels: function markerLabels(labels) {\n var _this = this;\n this.previousMarkerLabels.forEach(function (pml) {\n _this.setMarkerModeForObjectsWithName(pml, \"off\");\n });\n labels.forEach(function (l) {\n _this.setMarkerModeForObjectsWithName(l, \"on\");\n });\n this.previousMarkerLabels = labels;\n }\n },\n beforeCreate: function beforeCreate() {\n this.$module = new OrgansViewer();\n this.selectedObjects = [];\n this.hoveredObjects = [];\n this.currentBackground = \"white\";\n this._currentURL = undefined;\n this.availableBackground = [\"white\", \"black\", \"lightskyblue\"];\n this.$_searchIndex = new _scripts_search_js__WEBPACK_IMPORTED_MODULE_39__[\"SearchIndex\"]();\n },\n mounted: function mounted() {\n this.$refs.treeControls.setModule(this.$module);\n var eventNotifier = new EventNotifier();\n eventNotifier.subscribe(this, this.eventNotifierCallback);\n this.$module.addNotifier(eventNotifier);\n this.$module.addOrganPartAddedCallback(this.zincObjectAdded);\n this.$module.initialiseRenderer(this.$refs.display);\n this.toggleRendering(this.render);\n this.ro = new ResizeObserver(this.adjustLayout).observe(this.$refs.scaffoldContainer);\n this.defaultRate = this.$module.getPlayRate();\n },\n beforeDestroy: function beforeDestroy() {\n if (this.ro) this.ro.disconnect();\n this.$module.destroy();\n this.$module = undefined;\n },\n methods: {\n addZincObject: function addZincObject(zincObject) {\n if (this.$module.scene) {\n this.$module.scene.addZincObject(zincObject);\n this.zincObjectAdded(zincObject);\n if (this.$refs.treeControls) this.$refs.treeControls.zincObjectAdded(zincObject);\n }\n },\n /**\n * This is called when a new zinc object is read into the scene.\n */\n zincObjectAdded: function zincObjectAdded(zincObject) {\n this.loading = false;\n this.$_searchIndex.addZincObject(zincObject, zincObject.uuid);\n this.$emit(\"zinc-object-added\", zincObject);\n },\n /**\n * \n */\n addRegionsToSearchIndex: function addRegionsToSearchIndex() {\n var _this2 = this;\n var rootRegion = this.$module.scene.getRootRegion();\n var regions = rootRegion.getChildRegions(true);\n regions.forEach(function (region) {\n _this2.$_searchIndex.addRegion(region, region.uuid);\n });\n },\n /**\n * This is called when Change backgspeedround colour button\n * is pressed an causes the backgrouColornd colour to be changed\n * to one of the three preset colour: white, black and\n * lightskyblue.\n */\n backgroundChangeCallback: function backgroundChangeCallback(colour) {\n this.currentBackground = colour;\n this.$module.zincRenderer.getThreeJSRenderer().setClearColor(this.currentBackground, 1);\n },\n /**\n * This is called by captueeScreenshot and after the last render\n * loop, it download a screenshot of the current scene with no UI.\n */\n captureScreenshotCallback: function captureScreenshotCallback() {\n //Remove the callback, only needs to happen once\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.captureID);\n var screenshot = this.$module.zincRenderer.getThreeJSRenderer().domElement.toDataURL(\"image/png\");\n var hrefElement = document.createElement(\"a\");\n document.body.append(hrefElement);\n if (!this.captureFilename) hrefElement.download = \"screenshot.png\";else hrefElement.download = this.captureFilename;\n hrefElement.href = screenshot;\n hrefElement.click();\n hrefElement.remove();\n },\n /**\n * Function for capturing a screenshot of the current rendering.\n *\n * @param {String} filename filename given to the screenshot.\n *\n * @public\n */\n captureScreenshot: function captureScreenshot(filename) {\n this.captureFilename = filename;\n this.captureID = this.$module.zincRenderer.addPostRenderCallbackFunction(this.captureScreenshotCallback);\n },\n /**\n * Function to clear current scene, the tree controls and the search index.\n *\n * @public\n */\n clearScene: function clearScene() {\n if (this.$refs.treeControls) this.$refs.treeControls.clear();\n if (this.$_searchIndex) this.$_searchIndex.removeAll();\n if (this.$module.scene) this.$module.scene.clearAll();\n },\n formatTooltip: function formatTooltip(val) {\n if (this.timeMax >= 1000) {\n if (val) {\n var sec = (val % 60000 / 1000).toFixed(2) + \"s\";\n var min = val > 60000 ? (val / 60000).toFixed(0) + \"m \" : \"\";\n return min + sec;\n }\n }\n return val ? val.toFixed(2) + \" ms\" : \"0 ms\";\n },\n /**\n * Function to reset the view to default.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n fitWindow: function fitWindow() {\n if (this.$module.scene) {\n this.$module.scene.viewAll();\n }\n },\n /**\n * Function to zoom in.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n zoomIn: function zoomIn() {\n if (this.$module.scene) {\n this.$module.scene.changeZoomByScrollRateUnit(-1);\n }\n },\n /**\n * Function to zoom out.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n zoomOut: function zoomOut() {\n if (this.$module.scene) {\n this.$module.scene.changeZoomByScrollRateUnit(1);\n }\n },\n /**\n * Function to change the current play speed.\n *\n * @public\n */\n speedChanged: function speedChanged(speed) {\n this.currentSpeed = speed;\n this.$module.setPlayRate(this.defaultRate * this.currentSpeed);\n },\n /**\n * Function used to stop the free spin\n *\n * @public\n */\n stopFreeSpin: function stopFreeSpin() {\n var cameracontrol = this.$module.scene.getZincCameraControls();\n cameracontrol.stopAutoTumble();\n this.isTransitioning = false;\n },\n findObjectsWithGroupName: function findObjectsWithGroupName(name) {\n var objects = [];\n if (name && name != \"\" && this.$module.scene) {\n objects = this.$module.scene.findObjectsWithGroupName(name);\n }\n return objects;\n },\n /**\n * Focus on named region\n */\n viewRegion: function viewRegion(names) {\n var rootRegion = this.$module.scene.getRootRegion();\n var groups = Array.isArray(names) ? names : [names];\n var objects = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"findObjectsWithNames\"])(rootRegion, groups, \"\", true);\n var box = this.$module.scene.getBoundingBoxOfZincObjects(objects);\n if (box) {\n if (this.$module.isSyncControl()) {\n this.$module.setSyncControlZoomToBox(box);\n } else {\n var dist = this.$module.scene.camera.far - this.$module.scene.camera.near;\n this.$module.scene.viewAllWithBoundingBox(box);\n this.$module.scene.camera.far = this.$module.scene.camera.near + dist;\n this.$module.scene.camera.updateProjectionMatrix();\n }\n return true;\n }\n return false;\n },\n setFocusedRegion: function setFocusedRegion(name) {\n if (name) {\n if (this.isReady) {\n this.viewRegion(name);\n } else {\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n region: name\n }));\n }\n }\n },\n updateViewURL: function updateViewURL(viewURL) {\n if (viewURL) {\n if (this.isReady) {\n var url = new URL(viewURL, this.url);\n this.$module.scene.loadViewURL(url);\n } else {\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n viewURL: viewURL\n }));\n }\n }\n },\n getRendererInfo: function getRendererInfo() {\n if (this.$module.zincRenderer) {\n return this.$module.zincRenderer.getThreeJSRenderer().info;\n }\n return undefined;\n },\n /**\n * Function used to rotate the scene.\n * Also called when the associated button is pressed.\n *\n * @public\n */\n freeSpin: function freeSpin() {\n if (this.$module.scene) {\n var cameracontrol = this.$module.scene.getZincCameraControls();\n this.isTransitioning = true;\n cameracontrol.enableAutoTumble();\n cameracontrol.autoTumble([1.0, 0.0], Math.PI, true);\n setTimeout(this.stopFreeSpin, 4000);\n }\n },\n /**\n * Callback when a region is selected/highlighted.\n * It will also update other controls.\n *\n */\n eventNotifierCallback: function eventNotifierCallback(event) {\n var names = [];\n var zincObjects = [];\n var region = undefined;\n if (event.eventType == 1 || event.eventType == 2) {\n event.identifiers.forEach(function (identifier) {\n if (identifier) {\n var id = identifier.data.id ? identifier.data.id : identifier.data.group;\n names.push(id);\n }\n });\n zincObjects = event.zincObjects;\n }\n /*\n * Event Type 1: Selected\n * Event Type 2: Highlighted\n * Event Type 1: Move\n */\n if (event.eventType == 1) {\n if (this.$refs.treeControls) {\n if (names.length > 0) {\n //this.$refs.treeControls.changeActiveByNames(names, region, false);\n this.$refs.treeControls.updateActiveUI(zincObjects);\n } else {\n this.hideRegionTooltip();\n this.$refs.treeControls.removeActive(true);\n }\n }\n // Triggers when an object has been selected\n if (this.viewingMode === 'Annotation') {\n //Make sure the tooltip is displayed with annotation mode\n this.showRegionTooltipWithAnnotations(event.identifiers, true, true);\n }\n this.$emit(\"scaffold-selected\", event.identifiers);\n } else if (event.eventType == 2) {\n if (this.selectedObjects.length === 0) {\n this.hideRegionTooltip();\n // const offsets = this.$refs.scaffoldContainer.getBoundingClientRect();\n if (this.$refs.treeControls) {\n if (names.length > 0) {\n //this.$refs.treeControls.changeHoverByNames(names, region, false);\n this.$refs.treeControls.updateHoverUI(zincObjects);\n } else {\n this.$refs.treeControls.removeHover(true);\n }\n }\n if (event.identifiers.length > 0 && event.identifiers[0]) {\n var id = event.identifiers[0].data.id ? event.identifiers[0].data.id : event.identifiers[0].data.group;\n if (event.identifiers[0].coords) {\n this.tData.active = false;\n this.tData.visible = true;\n this.tData.label = id;\n if (event.identifiers[0].data.region) this.tData.region = event.identifiers[0].data.region;else this.tData.region = undefined;\n this.tData.x = event.identifiers[0].coords.x;\n this.tData.y = event.identifiers[0].coords.y;\n }\n }\n // Triggers when an object has been highlighted\n this.$emit(\"scaffold-highlighted\", event.identifiers);\n }\n } else if (event.eventType == 3) {\n //MOVE\n if (event.identifiers.length > 0 && event.identifiers[0]) {\n if (event.identifiers[0].coords) {\n var offsets = this.$refs.scaffoldContainer.getBoundingClientRect();\n this.tData.x = event.identifiers[0].coords.x - offsets.left;\n this.tData.y = event.identifiers[0].coords.y - offsets.top;\n }\n }\n }\n },\n /**\n * Get the coordinates of the current selected region.\n *\n * @public\n */\n getCoordinatesOfSelected: function getCoordinatesOfSelected() {\n if (this.selectedObjects && this.selectedObjects.length > 0) {\n return this.$module.scene.getObjectsScreenXY(this.selectedObjects);\n }\n return undefined;\n },\n /**\n * Return an object containing the window coordinates of the\n * current selected region which will be updated after each render\n * loop.\n *\n * @public\n */\n getDynamicSelectedCoordinates: function getDynamicSelectedCoordinates() {\n return this.$module.selectedScreenCoordinates;\n },\n /**\n * Callback when time is changed through the UI.\n */\n timeChange: function timeChange(event) {\n var normalizedTime = event / this.timeMax * 100;\n if (normalizedTime != this.sceneData.currentTime) this.$module.updateTime(normalizedTime);\n },\n /**\n * A callback used by children components. Set the selected zinc object\n *\n * @param {object} object Zinc object\n */\n objectSelected: function objectSelected(objects, propagate) {\n this.selectedObjects = objects;\n if (this.selectedObjects && this.selectedObjects.length > 0) {\n this.$refs.primitiveControls.setObject(this.selectedObjects[0]);\n }\n this.$module.setSelectedByZincObjects(objects, undefined, propagate);\n },\n /**\n * A callback used by children components. Set the highlighted zinc object\n *\n * @param {object} object Zinc object\n */\n objectHovered: function objectHovered(objects, propagate) {\n this.hoveredObjects = objects;\n this.$module.setHighlightedByZincObjects(objects, undefined, propagate);\n },\n /**\n * Set the selected by name.\n *\n * @param {} name Name of the group\n */\n changeActiveByName: function changeActiveByName(names, region, propagate) {\n var isArray = Array.isArray(names);\n if (names === undefined || isArray && names.length === 0) {\n this.$refs.treeControls.removeActive(propagate);\n } else {\n var array = names;\n if (!isArray) array = [array];\n this.$refs.treeControls.changeActiveByNames(array, region, propagate);\n }\n },\n /**\n * Set the highlighted by name.\n *\n * @param {name} name Name of the group\n */\n changeHighlightedByName: function changeHighlightedByName(names, region, propagate) {\n var isArray = Array.isArray(names);\n if (names === undefined || isArray && names.length === 0) {\n this.$refs.treeControls.removeHover(propagate);\n } else {\n var array = names;\n if (!isArray) array = [array];\n this.$refs.treeControls.changeHoverByNames(array, region, propagate);\n }\n },\n /**\n * Start the animation.\n *\n * @param {object} object Zinc object\n */\n play: function play(flag) {\n this.$module.playAnimation(flag);\n this.isPlaying = flag;\n //Hide tooltip as location may\n //this.hideRegionTooltip();\n },\n\n /**\n * Function to toggle on/off overlay help.\n */\n setHelpMode: function setHelpMode(helpMode) {\n if (helpMode) {\n this.inHelp = true;\n this.hoverVisibilities.forEach(function (item) {\n item.value = true;\n });\n } else {\n this.inHelp = false;\n this.hoverVisibilities.forEach(function (item) {\n item.value = false;\n });\n }\n },\n /**\n * Callback function used by showRegionTooltip in the case when the tooltip\n * is out of view.\n */\n displayTooltipOfObjectsCallback: function displayTooltipOfObjectsCallback(name, objects, regionPath, resetView, liveUpdates) {\n var instance = this;\n return function () {\n instance.$module.zincRenderer.removePostRenderCallbackFunction(instance.$_regionTooltipCallback);\n instance.$_regionTooltipCallback = undefined;\n instance.displayTooltipOfObjects(name, objects, regionPath, resetView, liveUpdates);\n };\n },\n liveUpdateTooltipPosition: function liveUpdateTooltipPosition() {\n if (this.$module.selectedCenter) {\n this.tData.x = this.$module.selectedScreenCoordinates.x;\n this.tData.y = this.$module.selectedScreenCoordinates.y;\n }\n },\n displayTooltipOfObjects: function displayTooltipOfObjects(name, objects, regionPath, resetView, liveUpdates) {\n if (objects.length > 0) {\n var coords = objects[0].getClosestVertexDOMElementCoords(this.$module.scene);\n if (coords) {\n //The coords is not in view, view all if resetView flag is true\n if (!coords.inView) {\n this.hideRegionTooltip();\n if (resetView) {\n this.$module.scene.viewAll();\n //Use the post render callback to make sure the scene has been updated\n //before getting the position of the tooltip.\n if (this.$_regionTooltipCallback) {\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.$_regionTooltipCallback);\n }\n this.$_regionTooltipCallback = this.$module.zincRenderer.addPostRenderCallbackFunction(this.displayTooltipOfObjectsCallback(name, objects, regionPath, resetView, liveUpdates));\n }\n } else {\n if (!name.includes(\"Search Results for\")) {\n this.tData.active = true;\n } else {\n this.tData.active = false;\n }\n this.tData.visible = true;\n this.tData.label = name;\n this.tData.x = coords.position.x;\n this.tData.y = coords.position.y;\n this.tData.region = regionPath;\n if (this.$_liveCoordinatesUpdated) {\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.$_liveCoordinatesUpdated);\n }\n if (liveUpdates) {\n this.$module.setupLiveCoordinates(objects);\n this.$_liveCoordinatesUpdated = this.$module.zincRenderer.addPostRenderCallbackFunction(this.liveUpdateTooltipPosition);\n }\n }\n return true;\n }\n }\n this.hideRegionTooltip();\n return false;\n },\n /**\n * Display the tooltip used for displaying search result.\n * When resetView is set to true, it will\n * reset view if the tooltip is not in view.\n * Setting liveUpdates to true will update the tooltip location\n * at every rendering loop.\n */\n showRegionTooltipWithObjects: function showRegionTooltipWithObjects(label, zincObjects, regionPath, resetView, liveUpdates) {\n if (label && zincObjects && zincObjects.length > 0 && this.$module.scene) {\n return this.displayTooltipOfObjects(label, zincObjects, regionPath, resetView, liveUpdates);\n }\n this.hideRegionTooltip();\n return false;\n },\n /**\n * Display the tooltip. When resetView is set to true, it will\n * reset view if the tooltip is not in view.\n * Setting liveUpdates to true will update the tooltip location\n * at every rendering loop.\n */\n showRegionTooltip: function showRegionTooltip(name, resetView, liveUpdates) {\n if (name && this.$module.scene) {\n var rootRegion = this.$module.scene.getRootRegion();\n var groups = [name];\n var objects = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"findObjectsWithNames\"])(rootRegion, groups, \"\", true);\n var regionPath = undefined;\n if (objects && objects.length > 0) {\n regionPath = objects[0].getRegion().getFullPath();\n }\n return this.showRegionTooltipWithObjects(name, objects, regionPath, resetView, liveUpdates);\n }\n this.hideRegionTooltip();\n return false;\n },\n /**\n * Display the tooltip using the list of annotations.\n * When resetView is set to true, it will\n * reset view if the tooltip is not in view.\n * Setting liveUpdates to true will update the tooltip location\n * at every rendering loop.\n */\n showRegionTooltipWithAnnotations: function showRegionTooltipWithAnnotations(annotations, resetView, liveUpdates) {\n if (this.$module.scene) {\n var result = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"getObjectsFromAnnotations\"])(this.$module.scene, annotations);\n if (result && result.objects.length > 0) {\n return this.showRegionTooltipWithObjects(result.label, result.objects, result.regionPath, resetView, liveUpdates);\n }\n }\n this.hideRegionTooltip();\n return false;\n },\n hideRegionTooltip: function hideRegionTooltip() {\n if (this.$_liveCoordinatesUpdated) {\n this.$module.zincRenderer.removePostRenderCallbackFunction(this.$_liveCoordinatesUpdated);\n //Unset the tracking\n this.$module.setupLiveCoordinates(undefined);\n }\n this.tData.active = false;\n this.tData.visible = false;\n this.tData.region = undefined;\n },\n /**\n * Set the marker modes for objects with the provided name, mode can\n * be \"on\", \"off\" or \"inherited\".\n */\n setMarkerModeForObjectsWithName: function setMarkerModeForObjectsWithName(name, mode) {\n if (name && this.$module.scene) {\n var rootRegion = this.$module.scene.getRootRegion();\n var groups = [name];\n var objects = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"findObjectsWithNames\"])(rootRegion, groups, \"\", true);\n objects.forEach(function (object) {\n return object.setMarkerMode(mode);\n });\n }\n },\n /**\n * Set the marker modes for objects specified by the list of annotations\n */\n setMarkerModeWithAnnotations: function setMarkerModeWithAnnotations(annotations, mode) {\n if (this.$module.scene) {\n var result = Object(_scripts_utilities_js__WEBPACK_IMPORTED_MODULE_38__[\"getObjectsFromAnnotations\"])(this.$module.scene, annotations);\n if (result && result.objects.length > 0) {\n result.objects.forEach(function (object) {\n return object.setMarkerMode(mode);\n });\n }\n }\n },\n /**\n * This is called when mouse cursor enters supported elements\n * with help tootltips.\n */\n showHelpText: function showHelpText(helpTextNumber) {\n var _this3 = this;\n if (!this.inHelp) {\n this.helpTextWait = setTimeout(function () {\n _this3.hoverVisibilities[helpTextNumber].value = true;\n }, 500);\n }\n },\n /**\n * This is called when mouse cursor exits supported element..\n */\n hideHelpText: function hideHelpText(helpTextNumber) {\n if (!this.inHelp) {\n this.hoverVisibilities[helpTextNumber].value = false;\n clearTimeout(this.helpTextWait);\n }\n },\n search: function search(text, displayLabel) {\n if (this.$_searchIndex) {\n if (text === undefined || text === \"\" || Array.isArray(text) && text.length === 0) {\n this.objectSelected([], true);\n return false;\n } else {\n var result = this.$_searchIndex.searchAndProcessResult(text);\n var zincObjects = result.zincObjects;\n if (zincObjects.length > 0) {\n this.objectSelected(zincObjects, true);\n if (displayLabel) {\n for (var i = 0; i < zincObjects.length; i++) {\n if (zincObjects[i] && zincObjects[i].groupName) {\n this.showRegionTooltipWithObjects(result.label, zincObjects, result.regionPath, true, true);\n }\n }\n }\n return true;\n } else {\n this.objectSelected([], true);\n }\n }\n }\n return false;\n },\n /**\n * Get the list of suggested terms\n */\n fetchSuggestions: function fetchSuggestions(term) {\n if (this.$_searchIndex === undefined) return [];\n return this.$_searchIndex.auto_suggest(term);\n },\n /**\n * Called when minimap settings has changed. Pass the\n * parameters to ZincJS and marked it for update.\n */\n updateMinimapScissor: function updateMinimapScissor() {\n var _this4 = this;\n Object.keys(this.minimapSettings).forEach(function (key) {\n _this4.$module.scene.minimapScissor[key] = _this4.minimapSettings[key];\n });\n this.$module.scene.minimapScissor.updateRequired = true;\n },\n updateSettingsfromScene: function updateSettingsfromScene() {\n this.currentSpeed = 1;\n this.$module.setPlayRate(this.defaultRate);\n this.orginalDuration = this.$module.scene.getMetadataTag(\"OriginalDuration\");\n this.animateDuration = this.$module.scene.getMetadataTag(\"Duration\");\n var timeStamps = this.$module.scene.getMetadataTag(\"TimeStamps\");\n this.timeStamps = {};\n for (var key in timeStamps) {\n this.timeStamps[timeStamps[key]] = key;\n }\n this.timeMax = this.$module.scene.getDuration();\n },\n setURLFinishCallback: function setURLFinishCallback(options) {\n var _this5 = this;\n return function () {\n if (options) {\n if (options.viewport) {\n _this5.$module.scene.getZincCameraControls().setCurrentCameraSettings(options.viewport);\n } else if (options.viewURL && options.viewURL !== \"\") {\n var url = new URL(options.viewURL, _this5.url);\n _this5.$module.scene.loadViewURL(url);\n } else if (options.region && options.region !== \"\") {\n _this5.viewRegion(options.region);\n }\n if (options.visibility) {\n // Some UIs may not be ready at this time.\n _this5.$nextTick(function () {\n _this5.$refs.treeControls.setState(options.visibility);\n });\n }\n }\n _this5.updateSettingsfromScene();\n _this5.$module.updateTime(0.01);\n _this5.$module.updateTime(0);\n _this5.$module.unsetFinishDownloadCallback();\n _this5.addRegionsToSearchIndex();\n _this5.$emit(\"on-ready\");\n _this5.setMarkers();\n _this5.isReady = true;\n };\n },\n /**\n * Function used for getting the current states of the scene. This exported states\n * can be imported using the importStates method.\n *\n * @public\n */\n getState: function getState() {\n var state = {\n format: this.fileFormat,\n url: this._currentURL,\n viewport: undefined,\n visibility: undefined\n };\n if (this.$refs.treeControls) state.visibility = this.$refs.treeControls.getState();\n if (this.$module.scene) {\n var zincCameraControls = this.$module.scene.getZincCameraControls();\n state.viewport = zincCameraControls.getCurrentViewport();\n }\n return state;\n },\n /**\n * Function used for importing the states of the scene. This exported states\n * can be imported using the read states method.\n *\n * @public\n */\n setState: function setState(state) {\n if (state) {\n if (state.url && state.url !== this._currentURL) {\n this.setURLAndState(state.url, {\n fileFormat: state.fileFormat,\n viewport: state.viewport,\n visibility: state.visibility\n });\n } else {\n if (state.viewport || state.visibility) {\n if (this.isReady && this.$module.scene) {\n if (state.viewport) this.$module.scene.getZincCameraControls().setCurrentCameraSettings(state.viewport);\n if (state.visibility) this.$refs.treeControls.setState(state.visibility);\n } else {\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n viewport: state.viewport,\n visibility: state.visibility\n }));\n }\n }\n }\n }\n },\n exportGLTF: function exportGLTF(binary) {\n return this.$module.scene.exportGLTF(binary);\n },\n /**\n * Function used for reading in new scaffold metadata and a custom\n * viewport. This function will ignore the state prop and\n * read in the new url.\n *\n * @public\n */\n setURLAndState: function setURLAndState(newValue, state) {\n if (newValue != this._currentURL) {\n if (state && state.format) this.fileFormat = state.format;\n var viewport = state && state.viewport ? state.viewport : undefined;\n var visibility = state && state.visibility ? state.visibility : undefined;\n this._currentURL = newValue;\n if (this.$refs.treeControls) this.$refs.treeControls.clear();\n this.loading = true;\n this.isReady = false;\n this.$_searchIndex.removeAll();\n this.hideRegionTooltip();\n this.$module.setFinishDownloadCallback(this.setURLFinishCallback({\n viewport: viewport,\n region: this.region,\n viewURL: this.viewURL,\n visibility: visibility\n }));\n if (this.fileFormat === \"gltf\") {\n this.$module.loadGLTFFromURL(newValue, \"scene\", true);\n } else {\n this.$module.loadOrgansFromURL(newValue, undefined, undefined, \"scene\", undefined, true);\n }\n this.$module.scene.displayMarkers = this.displayMarkers;\n this.$module.scene.forcePickableObjectsUpdate = true;\n this.$module.scene.displayMinimap = this.displayMinimap;\n this.updateMinimapScissor();\n }\n },\n /**\n * Function used for reading in new scaffold metadata. This function will ignore\n * the state prop and read in the new url.\n *\n * @public\n */\n setURL: function setURL(newValue) {\n this.setURLAndState(newValue, undefined);\n },\n /**\n * Callback when drawer is toggled.\n */\n drawerToggled: function drawerToggled(flag) {\n this.drawerOpen = flag;\n this.adjustLayout();\n },\n /**\n * Callback using ResizeObserver.\n */\n adjustLayout: function adjustLayout() {\n var width = this.$refs.scaffoldContainer.clientWidth;\n this.minimisedSlider = width < 812;\n if (this.minimisedSlider) {\n this.sliderPosition = this.drawerOpen ? \"right\" : \"left\";\n } else {\n this.sliderPosition = \"\";\n }\n },\n toggleRendering: function toggleRendering(flag) {\n if (this.$module.zincRenderer) {\n if (flag) {\n this.$module.zincRenderer.animate();\n } else {\n this.$module.zincRenderer.stopAnimate();\n }\n }\n },\n forceResize: function forceResize() {\n if (this.$module.zincRenderer) {\n this.$module.zincRenderer.onWindowResize();\n }\n },\n syncControlCallback: function syncControlCallback() {\n var payload = this.$module.NDCCameraControl.getPanZoom();\n if (this.tData.visible) {\n this.showRegionTooltip(this.tData.label, true, true);\n }\n this.$emit(\"scaffold-navigated\", payload);\n },\n /**\n * Rotate mode - \"none\", \"horizontal\", \"vertical\", \"free\" but\n * it will be ignored if flag is set to false.\n */\n toggleSyncControl: function toggleSyncControl(flag, rotateMode) {\n this.$module.toggleSyncControl(flag, rotateMode);\n this.$module.setSyncControlCallback(this.syncControlCallback);\n },\n /**\n * Set the markers for the scene.\n */\n setMarkers: function setMarkers() {\n var _this6 = this;\n this.markerLabels.forEach(function (l) {\n _this6.setMarkerModeForObjectsWithName(l, \"on\");\n });\n }\n }\n});\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldVuer.vue?./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
710
710
|
|
|
711
711
|
/***/ }),
|
|
712
712
|
|
|
@@ -734,123 +734,123 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _hom
|
|
|
734
734
|
|
|
735
735
|
/***/ }),
|
|
736
736
|
|
|
737
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
737
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/AnnotationTool.vue?vue&type=template&id=480ec58a&scoped=true&":
|
|
738
738
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
739
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
739
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@abi-software/flatmapvuer/src/components/AnnotationTool.vue?vue&type=template&id=480ec58a&scoped=true& ***!
|
|
740
740
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
741
741
|
/*! exports provided: render, staticRenderFns */
|
|
742
742
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
743
743
|
|
|
744
744
|
"use strict";
|
|
745
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);\n\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"el-main\", {\n staticClass: \"main\"\n }, [_c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"el-row\", {\n staticClass: \"info-field\"\n }, [_c(\"span\", {\n staticClass: \"title\"\n }, [_vm._v(\"Feature Annotations\")])]), _vm.annotationEntry ? [_vm._l(_vm.displayPair, function (key, label) {\n return _c(\"el-row\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.annotationEntry[key],\n expression: \"annotationEntry[key]\"\n }],\n key: key,\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(_vm._s(label) + \": \")]), _vm._v(\" \" + _vm._s(_vm.annotationEntry[key]) + \" \")]);\n }), _vm.prevSubs.length > 0 ? [_c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showSubmissions,\n expression: \"showSubmissions\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showSubmissions = false;\n }\n }\n }, [_vm._v(\" Hide previous submissions \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-up\"\n })]), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: !_vm.showSubmissions,\n expression: \"!showSubmissions\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showSubmissions = true;\n }\n }\n }, [_vm._v(\" Show previous \" + _vm._s(_vm.prevSubs.length) + \" submission(s) \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-down\"\n })]), _vm.showSubmissions ? [_c(\"el-row\", {\n staticClass: \"dialog-spacer\"\n }), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", {\n staticClass: \"sub-title\"\n }, [_vm._v(\"Previous submissions:\")])]), _vm._l(_vm.prevSubs, function (sub, index) {\n return _c(\"div\", {\n key: index,\n staticClass: \"entry\"\n }, [_c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(_vm._s(_vm.formatTime(sub.created)))]), _vm._v(\" \" + _vm._s(sub.creator.name) + \" \")]), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(\"Evidence: \")]), _vm._l(sub.evidence, function (evidence) {\n return _c(\"el-row\", {\n key: evidence,\n staticClass: \"dialog-text\"\n }, [_c(\"a\", {\n attrs: {\n href: evidence,\n target: \"_blank\"\n }\n }, [_vm._v(\" \" + _vm._s(evidence))])]);\n })], 2), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(\"Comment: \")]), _vm._v(\" \" + _vm._s(sub.comment) + \" \")])], 1);\n })] : _vm._e()] : _vm._e(), _vm.authenticated ? [_vm.isEditable ? [_c(\"el-row\", {\n staticClass: \"dialog-spacer\"\n }), !_vm.editing ? _c(\"el-row\", [_c(\"i\", {\n staticClass: \"el-icon-edit standard-icon\",\n on: {\n click: function click($event) {\n _vm.editing = true;\n }\n }\n })]) : [_c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", {\n staticClass: \"sub-title\"\n }, [_vm._v(\"Suggest changes:\")])]), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(\"Evidvence:\")])]), _vm._l(_vm.evidence, function (value, index) {\n return _c(\"el-row\", {\n key: value\n }, [_c(\"el-col\", {\n attrs: {\n span: 20\n }\n }, [_vm._v(\" \" + _vm._s(_vm.evidence[index]) + \" \")]), _c(\"el-col\", {\n attrs: {\n span: 4\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-close standard-icon\",\n on: {\n click: function click($event) {\n return _vm.removeEvidence(index);\n }\n }\n })])], 1);\n }), _c(\"el-row\", [_c(\"el-input\", {\n attrs: {\n size: \"mini\",\n placeholder: \"Enter\"\n },\n on: {\n change: function change($event) {\n return _vm.evidenceEntered($event);\n }\n },\n model: {\n value: _vm.newEvidence,\n callback: function callback($$v) {\n _vm.newEvidence = $$v;\n },\n expression: \"newEvidence\"\n }\n }, [_c(\"el-select\", {\n staticClass: \"select-box\",\n attrs: {\n slot: \"prepend\",\n \"popper-append-to-body\": false,\n placeholder: \"Select\",\n \"popper-class\": \"flatmap_dropdown\"\n },\n slot: \"prepend\",\n model: {\n value: _vm.evidencePrefix,\n callback: function callback($$v) {\n _vm.evidencePrefix = $$v;\n },\n expression: \"evidencePrefix\"\n }\n }, _vm._l(_vm.evidencePrefixes, function (item) {\n return _c(\"el-option\", {\n key: item,\n attrs: {\n label: item,\n value: item\n }\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 12\n }\n }, [_vm._v(_vm._s(item))])], 1)], 1);\n }), 1)], 1)], 1), _c(\"el-row\", [_c(\"strong\", [_vm._v(\"Comment:\")])]), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"el-input\", {\n attrs: {\n type: \"textarea\",\n autosize: {\n minRows: 2,\n maxRows: 4\n },\n placeholder: \"Enter\"\n },\n model: {\n value: _vm.comment,\n callback: function callback($$v) {\n _vm.comment = $$v;\n },\n expression: \"comment\"\n }\n })], 1), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"el-button\", {\n staticClass: \"button\",\n attrs: {\n type: \"primary\",\n plain: \"\"\n },\n on: {\n click: _vm.submit\n }\n }, [_vm._v(\" Submit \")])], 1)], _vm.errorMessage ? _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", {\n staticClass: \"sub-title\"\n }, [_vm._v(\" \" + _vm._s(_vm.errorMessage) + \" \")])]) : _vm._e()] : _vm._e()] : _vm._e()] : _vm._e()], 2)]);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/AnnotationTool.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
745
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n/* harmony import */ var core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_function_name_js__WEBPACK_IMPORTED_MODULE_0__);\n\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"el-main\", {\n staticClass: \"main\"\n }, [_c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"el-row\", {\n staticClass: \"info-field\"\n }, [_c(\"span\", {\n staticClass: \"title\"\n }, [_vm._v(\"Feature Annotations\")])]), _vm.annotationEntry ? [_vm._l(_vm.displayPair, function (key, label) {\n return _c(\"el-row\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.annotationEntry[key],\n expression: \"annotationEntry[key]\"\n }],\n key: key,\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(_vm._s(label) + \": \")]), _vm._v(\" \" + _vm._s(_vm.annotationEntry[key]) + \" \")]);\n }), _vm.prevSubs.length > 0 ? [_c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showSubmissions,\n expression: \"showSubmissions\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showSubmissions = false;\n }\n }\n }, [_vm._v(\" Hide previous submissions \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-up\"\n })]), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: !_vm.showSubmissions,\n expression: \"!showSubmissions\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showSubmissions = true;\n }\n }\n }, [_vm._v(\" Show previous \" + _vm._s(_vm.prevSubs.length) + \" submission(s) \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-down\"\n })]), _vm.showSubmissions ? [_c(\"el-row\", {\n staticClass: \"dialog-spacer\"\n }), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", {\n staticClass: \"sub-title\"\n }, [_vm._v(\"Previous submissions:\")])]), _vm._l(_vm.prevSubs, function (sub, index) {\n return _c(\"div\", {\n key: index,\n staticClass: \"entry\"\n }, [_c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(_vm._s(_vm.formatTime(sub.created)))]), _vm._v(\" \" + _vm._s(sub.creator.name) + \" \")]), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(\"Evidence: \")]), _vm._l(sub.evidence, function (evidence) {\n return _c(\"el-row\", {\n key: evidence,\n staticClass: \"dialog-text\"\n }, [_c(\"a\", {\n attrs: {\n href: evidence,\n target: \"_blank\"\n }\n }, [_vm._v(\" \" + _vm._s(evidence))])]);\n })], 2), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(\"Comment: \")]), _vm._v(\" \" + _vm._s(sub.comment) + \" \")])], 1);\n })] : _vm._e()] : _vm._e(), _vm.authenticated ? [_vm.isEditable ? [_c(\"el-row\", {\n staticClass: \"dialog-spacer\"\n }), !_vm.editing ? _c(\"el-row\", [_c(\"i\", {\n staticClass: \"el-icon-edit standard-icon\",\n on: {\n click: function click($event) {\n _vm.editing = true;\n }\n }\n })]) : [_c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", {\n staticClass: \"sub-title\"\n }, [_vm._v(\"Suggest changes:\")])]), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", [_vm._v(\"Evidvence:\")])]), _vm._l(_vm.evidence, function (value, index) {\n return _c(\"el-row\", {\n key: value\n }, [_c(\"el-col\", {\n attrs: {\n span: 20\n }\n }, [_vm._v(\" \" + _vm._s(_vm.evidence[index]) + \" \")]), _c(\"el-col\", {\n attrs: {\n span: 4\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-close standard-icon\",\n on: {\n click: function click($event) {\n return _vm.removeEvidence(index);\n }\n }\n })])], 1);\n }), _c(\"el-row\", [_c(\"el-input\", {\n attrs: {\n size: \"mini\",\n placeholder: \"Enter\"\n },\n on: {\n change: function change($event) {\n return _vm.evidenceEntered($event);\n }\n },\n model: {\n value: _vm.newEvidence,\n callback: function callback($$v) {\n _vm.newEvidence = $$v;\n },\n expression: \"newEvidence\"\n }\n }, [_c(\"el-select\", {\n staticClass: \"select-box\",\n attrs: {\n slot: \"prepend\",\n \"popper-append-to-body\": false,\n placeholder: \"Select\",\n \"popper-class\": \"flatmap_dropdown\"\n },\n slot: \"prepend\",\n model: {\n value: _vm.evidencePrefix,\n callback: function callback($$v) {\n _vm.evidencePrefix = $$v;\n },\n expression: \"evidencePrefix\"\n }\n }, _vm._l(_vm.evidencePrefixes, function (item) {\n return _c(\"el-option\", {\n key: item,\n attrs: {\n label: item,\n value: item\n }\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 12\n }\n }, [_vm._v(_vm._s(item))])], 1)], 1);\n }), 1)], 1)], 1), _c(\"el-row\", [_c(\"strong\", [_vm._v(\"Comment:\")])]), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"el-input\", {\n attrs: {\n type: \"textarea\",\n autosize: {\n minRows: 2,\n maxRows: 4\n },\n placeholder: \"Enter\"\n },\n model: {\n value: _vm.comment,\n callback: function callback($$v) {\n _vm.comment = $$v;\n },\n expression: \"comment\"\n }\n })], 1), _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"el-button\", {\n staticClass: \"button\",\n attrs: {\n type: \"primary\",\n plain: \"\"\n },\n on: {\n click: _vm.submit\n }\n }, [_vm._v(\" Submit \")])], 1)], _vm.errorMessage ? _c(\"el-row\", {\n staticClass: \"dialog-text\"\n }, [_c(\"strong\", {\n staticClass: \"sub-title\"\n }, [_vm._v(\" \" + _vm._s(_vm.errorMessage) + \" \")])]) : _vm._e()] : _vm._e()] : _vm._e()] : _vm._e()], 2)]);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/AnnotationTool.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
746
746
|
|
|
747
747
|
/***/ }),
|
|
748
748
|
|
|
749
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
749
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/ExternalResourceCard.vue?vue&type=template&id=d3361d06&scoped=true&":
|
|
750
750
|
/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
751
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
751
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@abi-software/flatmapvuer/src/components/ExternalResourceCard.vue?vue&type=template&id=d3361d06&scoped=true& ***!
|
|
752
752
|
\***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
753
753
|
/*! exports provided: render, staticRenderFns */
|
|
754
754
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
755
755
|
|
|
756
756
|
"use strict";
|
|
757
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"resource-container\"\n }, [_vm._l(_vm.resources, function (resource) {\n return [_c(\"div\", {\n key: resource.id,\n staticClass: \"resource\"\n }, [resource.id === \"pubmed\" ? _c(\"el-button\", {\n staticClass: \"button\",\n attrs: {\n icon: \"el-icon-notebook-2\"\n },\n on: {\n click: function click($event) {\n return _vm.openUrl(resource.url);\n }\n }\n }, [_vm._v(\" Open publications in pubmed \")]) : _vm._e()], 1)];\n })], 2);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/ExternalResourceCard.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
757
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"resource-container\"\n }, [_vm._l(_vm.resources, function (resource) {\n return [_c(\"div\", {\n key: resource.id,\n staticClass: \"resource\"\n }, [resource.id === \"pubmed\" ? _c(\"el-button\", {\n staticClass: \"button\",\n attrs: {\n icon: \"el-icon-notebook-2\"\n },\n on: {\n click: function click($event) {\n return _vm.openUrl(resource.url);\n }\n }\n }, [_vm._v(\" Open publications in pubmed \")]) : _vm._e()], 1)];\n })], 2);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/ExternalResourceCard.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
758
758
|
|
|
759
759
|
/***/ }),
|
|
760
760
|
|
|
761
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
761
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/ProvenancePopup.vue?vue&type=template&id=4a901ae7&scoped=true&":
|
|
762
762
|
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
763
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
763
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@abi-software/flatmapvuer/src/components/ProvenancePopup.vue?vue&type=template&id=4a901ae7&scoped=true& ***!
|
|
764
764
|
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
765
765
|
/*! exports provided: render, staticRenderFns */
|
|
766
766
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
767
767
|
|
|
768
768
|
"use strict";
|
|
769
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _vm.entry ? _c(\"el-main\", {\n directives: [{\n name: \"loading\",\n rawName: \"v-loading\",\n value: _vm.loading,\n expression: \"loading\"\n }],\n staticClass: \"main\"\n }, [_vm.entry.title ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"span\", {\n staticClass: \"title\"\n }, [_vm._v(_vm._s(_vm.capitalise(_vm.entry.title)))]), _vm.entry.provenanceTaxonomyLabel && _vm.entry.provenanceTaxonomyLabel.length > 0 ? _c(\"div\", {\n staticClass: \"subtitle\"\n }, [_vm._v(\" \" + _vm._s(_vm.provSpeciesDescription) + \" \")]) : _vm._e()]) : _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"span\", {\n staticClass: \"title\"\n }, [_vm._v(_vm._s(_vm.entry.featureId))])]), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showDetails,\n expression: \"showDetails\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showDetails = false;\n }\n }\n }, [_vm._v(\" Hide path information \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-up\"\n })]), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: !_vm.showDetails,\n expression: \"!showDetails\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showDetails = true;\n }\n }\n }, [_vm._v(\" Show path information \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-down\"\n })]), _c(\"transition\", {\n attrs: {\n name: \"slide-fade\"\n }\n }, [_c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showDetails,\n expression: \"showDetails\"\n }],\n staticClass: \"content-container scrollbar\"\n }, [_vm._v(\" \" + _vm._s(_vm.entry.paths) + \" \"), _vm.entry.origins && _vm.entry.origins.length > 0 ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"div\", [_c(\"span\", {\n staticClass: \"attribute-title\"\n }, [_vm._v(\"Origin\")]), _c(\"el-popover\", {\n attrs: {\n width: \"250\",\n trigger: \"hover\",\n \"append-to-body\": false,\n \"popper-class\": \"popover-origin-help\"\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-warning-outline info\",\n attrs: {\n slot: \"reference\"\n },\n slot: \"reference\"\n }), _c(\"span\", {\n staticStyle: {\n \"word-break\": \"keep-all\"\n }\n }, [_c(\"i\", [_vm._v(\"Origin\")]), _vm._v(\" \" + _vm._s(_vm.originDescription) + \" \")])])], 1), _vm._l(_vm.entry.origins, function (origin, i) {\n return _c(\"div\", {\n key: origin,\n staticClass: \"attribute-content\"\n }, [_vm._v(\" \" + _vm._s(_vm.capitalise(origin)) + \" \"), i != _vm.entry.origins.length - 1 ? _c(\"div\", {\n staticClass: \"seperator\"\n }) : _vm._e()]);\n }), _c(\"el-button\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.entry.originsWithDatasets && _vm.entry.originsWithDatasets.length > 0,\n expression: \"entry.originsWithDatasets && entry.originsWithDatasets.length > 0\"\n }],\n staticClass: \"button\",\n on: {\n click: _vm.openDendrites\n }\n }, [_vm._v(\" Explore origin data \")])], 2) : _vm._e(), _vm.entry.components && _vm.entry.components.length > 0 ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"div\", {\n staticClass: \"attribute-title\"\n }, [_vm._v(\"Components\")]), _vm._l(_vm.entry.components, function (component, i) {\n return _c(\"div\", {\n key: component,\n staticClass: \"attribute-content\"\n }, [_vm._v(\" \" + _vm._s(_vm.capitalise(component)) + \" \"), i != _vm.entry.components.length - 1 ? _c(\"div\", {\n staticClass: \"seperator\"\n }) : _vm._e()]);\n })], 2) : _vm._e(), _vm.entry.destinations && _vm.entry.destinations.length > 0 ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"div\", [_c(\"span\", {\n staticClass: \"attribute-title\"\n }, [_vm._v(\"Destination\")]), _c(\"el-popover\", {\n attrs: {\n width: \"250\",\n trigger: \"hover\",\n \"append-to-body\": false,\n \"popper-class\": \"popover-origin-help\"\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-warning-outline info\",\n attrs: {\n slot: \"reference\"\n },\n slot: \"reference\"\n }), _c(\"span\", {\n staticStyle: {\n \"word-break\": \"keep-all\"\n }\n }, [_c(\"i\", [_vm._v(\"Destination\")]), _vm._v(\" is where the axons terminate \")])])], 1), _vm._l(_vm.entry.destinations, function (destination, i) {\n return _c(\"div\", {\n key: destination,\n staticClass: \"attribute-content\"\n }, [_vm._v(\" \" + _vm._s(_vm.capitalise(destination)) + \" \"), i != _vm.entry.destinations.length - 1 ? _c(\"div\", {\n staticClass: \"seperator\"\n }) : _vm._e()]);\n }), _c(\"el-button\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.entry.destinationsWithDatasets && _vm.entry.destinationsWithDatasets.length > 0,\n expression: \"entry.destinationsWithDatasets && entry.destinationsWithDatasets.length > 0\"\n }],\n staticClass: \"button\",\n on: {\n click: _vm.openAxons\n }\n }, [_vm._v(\" Explore destination data \")])], 2) : _vm._e(), _c(\"el-button\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.entry.componentsWithDatasets && _vm.entry.componentsWithDatasets.length > 0,\n expression: \"entry.componentsWithDatasets && entry.componentsWithDatasets.length > 0\"\n }],\n staticClass: \"button\",\n on: {\n click: _vm.openAll\n }\n }, [_vm._v(\" Search for data on components \")]), _c(\"external-resource-card\", {\n attrs: {\n resources: _vm.resources\n }\n })], 1)])], 1) : _vm._e();\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/ProvenancePopup.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
769
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _vm.entry ? _c(\"el-main\", {\n directives: [{\n name: \"loading\",\n rawName: \"v-loading\",\n value: _vm.loading,\n expression: \"loading\"\n }],\n staticClass: \"main\"\n }, [_vm.entry.title ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"span\", {\n staticClass: \"title\"\n }, [_vm._v(_vm._s(_vm.capitalise(_vm.entry.title)))]), _vm.entry.provenanceTaxonomyLabel && _vm.entry.provenanceTaxonomyLabel.length > 0 ? _c(\"div\", {\n staticClass: \"subtitle\"\n }, [_vm._v(\" \" + _vm._s(_vm.provSpeciesDescription) + \" \")]) : _vm._e()]) : _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"span\", {\n staticClass: \"title\"\n }, [_vm._v(_vm._s(_vm.entry.featureId))])]), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showDetails,\n expression: \"showDetails\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showDetails = false;\n }\n }\n }, [_vm._v(\" Hide path information \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-up\"\n })]), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: !_vm.showDetails,\n expression: \"!showDetails\"\n }],\n staticClass: \"hide\",\n on: {\n click: function click($event) {\n _vm.showDetails = true;\n }\n }\n }, [_vm._v(\" Show path information \"), _c(\"i\", {\n staticClass: \"el-icon-arrow-down\"\n })]), _c(\"transition\", {\n attrs: {\n name: \"slide-fade\"\n }\n }, [_c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.showDetails,\n expression: \"showDetails\"\n }],\n staticClass: \"content-container scrollbar\"\n }, [_vm._v(\" \" + _vm._s(_vm.entry.paths) + \" \"), _vm.entry.origins && _vm.entry.origins.length > 0 ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"div\", [_c(\"span\", {\n staticClass: \"attribute-title\"\n }, [_vm._v(\"Origin\")]), _c(\"el-popover\", {\n attrs: {\n width: \"250\",\n trigger: \"hover\",\n \"append-to-body\": false,\n \"popper-class\": \"popover-origin-help\"\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-warning-outline info\",\n attrs: {\n slot: \"reference\"\n },\n slot: \"reference\"\n }), _c(\"span\", {\n staticStyle: {\n \"word-break\": \"keep-all\"\n }\n }, [_c(\"i\", [_vm._v(\"Origin\")]), _vm._v(\" \" + _vm._s(_vm.originDescription) + \" \")])])], 1), _vm._l(_vm.entry.origins, function (origin, i) {\n return _c(\"div\", {\n key: origin,\n staticClass: \"attribute-content\"\n }, [_vm._v(\" \" + _vm._s(_vm.capitalise(origin)) + \" \"), i != _vm.entry.origins.length - 1 ? _c(\"div\", {\n staticClass: \"seperator\"\n }) : _vm._e()]);\n }), _c(\"el-button\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.entry.originsWithDatasets && _vm.entry.originsWithDatasets.length > 0,\n expression: \"entry.originsWithDatasets && entry.originsWithDatasets.length > 0\"\n }],\n staticClass: \"button\",\n on: {\n click: _vm.openDendrites\n }\n }, [_vm._v(\" Explore origin data \")])], 2) : _vm._e(), _vm.entry.components && _vm.entry.components.length > 0 ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"div\", {\n staticClass: \"attribute-title\"\n }, [_vm._v(\"Components\")]), _vm._l(_vm.entry.components, function (component, i) {\n return _c(\"div\", {\n key: component,\n staticClass: \"attribute-content\"\n }, [_vm._v(\" \" + _vm._s(_vm.capitalise(component)) + \" \"), i != _vm.entry.components.length - 1 ? _c(\"div\", {\n staticClass: \"seperator\"\n }) : _vm._e()]);\n })], 2) : _vm._e(), _vm.entry.destinations && _vm.entry.destinations.length > 0 ? _c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"div\", [_c(\"span\", {\n staticClass: \"attribute-title\"\n }, [_vm._v(\"Destination\")]), _c(\"el-popover\", {\n attrs: {\n width: \"250\",\n trigger: \"hover\",\n \"append-to-body\": false,\n \"popper-class\": \"popover-origin-help\"\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-warning-outline info\",\n attrs: {\n slot: \"reference\"\n },\n slot: \"reference\"\n }), _c(\"span\", {\n staticStyle: {\n \"word-break\": \"keep-all\"\n }\n }, [_c(\"i\", [_vm._v(\"Destination\")]), _vm._v(\" is where the axons terminate \")])])], 1), _vm._l(_vm.entry.destinations, function (destination, i) {\n return _c(\"div\", {\n key: destination,\n staticClass: \"attribute-content\"\n }, [_vm._v(\" \" + _vm._s(_vm.capitalise(destination)) + \" \"), i != _vm.entry.destinations.length - 1 ? _c(\"div\", {\n staticClass: \"seperator\"\n }) : _vm._e()]);\n }), _c(\"el-button\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.entry.destinationsWithDatasets && _vm.entry.destinationsWithDatasets.length > 0,\n expression: \"entry.destinationsWithDatasets && entry.destinationsWithDatasets.length > 0\"\n }],\n staticClass: \"button\",\n on: {\n click: _vm.openAxons\n }\n }, [_vm._v(\" Explore destination data \")])], 2) : _vm._e(), _c(\"el-button\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.entry.componentsWithDatasets && _vm.entry.componentsWithDatasets.length > 0,\n expression: \"entry.componentsWithDatasets && entry.componentsWithDatasets.length > 0\"\n }],\n staticClass: \"button\",\n on: {\n click: _vm.openAll\n }\n }, [_vm._v(\" Search for data on components \")]), _c(\"external-resource-card\", {\n attrs: {\n resources: _vm.resources\n }\n })], 1)])], 1) : _vm._e();\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/ProvenancePopup.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
770
770
|
|
|
771
771
|
/***/ }),
|
|
772
772
|
|
|
773
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
773
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./node_modules/@abi-software/flatmapvuer/src/components/Tooltip.vue?vue&type=template&id=11df07df&scoped=true&":
|
|
774
774
|
/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
775
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
775
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/@abi-software/flatmapvuer/src/components/Tooltip.vue?vue&type=template&id=11df07df&scoped=true& ***!
|
|
776
776
|
\**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
777
777
|
/*! exports provided: render, staticRenderFns */
|
|
778
778
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
779
779
|
|
|
780
780
|
"use strict";
|
|
781
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"tooltip-container\"\n }, [_vm.annotationDisplay ? [_c(\"annotation-tool\", {\n attrs: {\n annotationEntry: _vm.annotationEntry\n }\n })] : [_c(\"provenance-popup\", {\n attrs: {\n entry: _vm.entry\n }\n })]], 2);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/Tooltip.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
781
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"tooltip-container\"\n }, [_vm.annotationDisplay ? [_c(\"annotation-tool\", {\n attrs: {\n annotationEntry: _vm.annotationEntry\n }\n })] : [_c(\"provenance-popup\", {\n attrs: {\n entry: _vm.entry\n }\n })]], 2);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/@abi-software/flatmapvuer/src/components/Tooltip.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
782
782
|
|
|
783
783
|
/***/ }),
|
|
784
784
|
|
|
785
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
785
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/OpacityControls.vue?vue&type=template&id=ee8a4d3e&scoped=true&":
|
|
786
786
|
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
787
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
787
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/OpacityControls.vue?vue&type=template&id=ee8a4d3e&scoped=true& ***!
|
|
788
788
|
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
789
789
|
/*! exports provided: render, staticRenderFns */
|
|
790
790
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
791
791
|
|
|
792
792
|
"use strict";
|
|
793
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _vm.material ? _c(\"el-container\", {\n staticClass: \"opacity-container\"\n }, [_c(\"el-header\", {\n staticClass: \"header\",\n attrs: {\n height: \"37px\"\n }\n }, [_c(\"div\", [_vm._v(\"Opacity\")])]), _c(\"el-main\", {\n staticClass: \"main\"\n }, [_c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"span\", {\n staticClass: \"display\"\n }, [_vm._v(_vm._s(_vm.displayString))]), _c(\"el-slider\", {\n staticClass: \"my-slider\",\n attrs: {\n step: 0.01,\n min: 0,\n max: 1,\n \"format-tooltip\": _vm.formatTooltip,\n \"show-tooltip\": false\n },\n model: {\n value: _vm.material.opacity,\n callback: function callback($$v) {\n _vm.$set(_vm.material, \"opacity\", $$v);\n },\n expression: \"material.opacity\"\n }\n })], 1)])], 1) : _vm._e();\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/OpacityControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
793
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _vm.material ? _c(\"el-container\", {\n staticClass: \"opacity-container\"\n }, [_c(\"el-header\", {\n staticClass: \"header\",\n attrs: {\n height: \"37px\"\n }\n }, [_c(\"div\", [_vm._v(\"Opacity\")])]), _c(\"el-main\", {\n staticClass: \"main\"\n }, [_c(\"div\", {\n staticClass: \"block\"\n }, [_c(\"span\", {\n staticClass: \"display\"\n }, [_vm._v(_vm._s(_vm.displayString))]), _c(\"el-slider\", {\n staticClass: \"my-slider\",\n attrs: {\n step: 0.01,\n min: 0,\n max: 1,\n \"format-tooltip\": _vm.formatTooltip,\n \"show-tooltip\": false\n },\n model: {\n value: _vm.material.opacity,\n callback: function callback($$v) {\n _vm.$set(_vm.material, \"opacity\", $$v);\n },\n expression: \"material.opacity\"\n }\n })], 1)])], 1) : _vm._e();\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/OpacityControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
794
794
|
|
|
795
795
|
/***/ }),
|
|
796
796
|
|
|
797
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
797
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/PrimitiveControls.vue?vue&type=template&id=32b94a3d&scoped=true&":
|
|
798
798
|
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
799
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
799
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/PrimitiveControls.vue?vue&type=template&id=32b94a3d&scoped=true& ***!
|
|
800
800
|
\*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
801
801
|
/*! exports provided: render, staticRenderFns */
|
|
802
802
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
803
803
|
|
|
804
804
|
"use strict";
|
|
805
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.material || _vm.isTextureSlides,\n expression: \"material || isTextureSlides\"\n }],\n staticClass: \"primitive-controls\"\n }, [_c(\"el-drawer\", {\n class: {\n \"drawer-content\": true,\n opacity: _vm.material !== undefined,\n \"texture-slides\": _vm.isTextureSlides\n },\n attrs: {\n \"custom-class\": \"my-drawer\",\n visible: _vm.drawerOpen,\n \"append-to-body\": false,\n \"modal-append-to-body\": false,\n size: \"300\",\n \"with-header\": false,\n \"wrapper-closable\": false,\n modal: false\n },\n on: {\n \"update:visible\": function updateVisible($event) {\n _vm.drawerOpen = $event;\n }\n }\n }, [_vm.drawerOpen ? _c(\"div\", {\n staticClass: \"tab-button close\",\n on: {\n click: _vm.toggleDrawer\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-arrow-right\"\n })]) : _vm._e(), _c(\"opacity-controls\", {\n ref: \"opacityControls\",\n attrs: {\n material: _vm.material\n }\n }), _c(\"texture-slides-controls\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isTextureSlides,\n expression: \"isTextureSlides\"\n }],\n ref: \"tSlidesControls\",\n staticClass: \"controls\"\n })], 1), !_vm.drawerOpen ? _c(\"div\", {\n staticClass: \"tab-button open\",\n on: {\n click: _vm.toggleDrawer\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-arrow-left\"\n })]) : _vm._e()], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/PrimitiveControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
805
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.material || _vm.isTextureSlides,\n expression: \"material || isTextureSlides\"\n }],\n staticClass: \"primitive-controls\"\n }, [_c(\"el-drawer\", {\n class: {\n \"drawer-content\": true,\n opacity: _vm.material !== undefined,\n \"texture-slides\": _vm.isTextureSlides\n },\n attrs: {\n \"custom-class\": \"my-drawer\",\n visible: _vm.drawerOpen,\n \"append-to-body\": false,\n \"modal-append-to-body\": false,\n size: \"300\",\n \"with-header\": false,\n \"wrapper-closable\": false,\n modal: false\n },\n on: {\n \"update:visible\": function updateVisible($event) {\n _vm.drawerOpen = $event;\n }\n }\n }, [_vm.drawerOpen ? _c(\"div\", {\n staticClass: \"tab-button close\",\n on: {\n click: _vm.toggleDrawer\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-arrow-right\"\n })]) : _vm._e(), _c(\"opacity-controls\", {\n ref: \"opacityControls\",\n attrs: {\n material: _vm.material\n }\n }), _c(\"texture-slides-controls\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.isTextureSlides,\n expression: \"isTextureSlides\"\n }],\n ref: \"tSlidesControls\",\n staticClass: \"controls\"\n })], 1), !_vm.drawerOpen ? _c(\"div\", {\n staticClass: \"tab-button open\",\n on: {\n click: _vm.toggleDrawer\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-arrow-left\"\n })]) : _vm._e()], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/PrimitiveControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
806
806
|
|
|
807
807
|
/***/ }),
|
|
808
808
|
|
|
809
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
809
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ScaffoldTooltip.vue?vue&type=template&id=7c65faa6&scoped=true&":
|
|
810
810
|
/*!*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
811
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
811
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ScaffoldTooltip.vue?vue&type=template&id=7c65faa6&scoped=true& ***!
|
|
812
812
|
\*******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
813
813
|
/*! exports provided: render, staticRenderFns */
|
|
814
814
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
815
815
|
|
|
816
816
|
"use strict";
|
|
817
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"region-tooltip\",\n style: _vm.position\n }, [_c(\"el-popover\", {\n ref: \"tooltip\",\n attrs: {\n placement: \"top\",\n visibleArrow: false,\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"tooltip-popper non-selectable\"\n },\n model: {\n value: _vm.display,\n callback: function callback($$v) {\n _vm.display = $$v;\n },\n expression: \"display\"\n }\n }, [[_c(\"div\", {\n staticClass: \"tooltip-text\"\n }, [_vm._v(_vm._s(_vm.label))]), _vm.region ? _c(\"div\", {\n staticClass: \"tooltip-text\"\n }, [_vm._v(\"Region: \" + _vm._s(_vm.region))]) : _vm._e(), _c(\"Tooltip\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.annotationDisplay,\n expression: \"annotationDisplay\"\n }],\n ref: \"annotationTooltip\",\n staticClass: \"p-tooltip\",\n attrs: {\n annotationDisplay: true,\n annotationEntry: _vm.annotationEntry\n }\n })]], 2)], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldTooltip.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
817
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"region-tooltip\",\n style: _vm.position\n }, [_c(\"el-popover\", {\n ref: \"tooltip\",\n attrs: {\n placement: \"top\",\n visibleArrow: false,\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"tooltip-popper non-selectable\"\n },\n model: {\n value: _vm.display,\n callback: function callback($$v) {\n _vm.display = $$v;\n },\n expression: \"display\"\n }\n }, [[_c(\"div\", {\n staticClass: \"tooltip-text\"\n }, [_vm._v(_vm._s(_vm.label))]), _vm.region ? _c(\"div\", {\n staticClass: \"tooltip-text\"\n }, [_vm._v(\"Region: \" + _vm._s(_vm.region))]) : _vm._e(), _c(\"Tooltip\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.annotationDisplay,\n expression: \"annotationDisplay\"\n }],\n ref: \"annotationTooltip\",\n staticClass: \"p-tooltip\",\n attrs: {\n annotationDisplay: true,\n annotationEntry: _vm.annotationEntry\n }\n })]], 2)], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldTooltip.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
818
818
|
|
|
819
819
|
/***/ }),
|
|
820
820
|
|
|
821
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
821
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ScaffoldVuer.vue?vue&type=template&id=689ce3f2&scoped=true&":
|
|
822
822
|
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
823
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
823
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/ScaffoldVuer.vue?vue&type=template&id=689ce3f2&scoped=true& ***!
|
|
824
824
|
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
825
825
|
/*! exports provided: render, staticRenderFns */
|
|
826
826
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
827
827
|
|
|
828
828
|
"use strict";
|
|
829
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n directives: [{\n name: \"loading\",\n rawName: \"v-loading\",\n value: _vm.loading,\n expression: \"loading\"\n }],\n ref: \"scaffoldContainer\",\n staticClass: \"scaffold-container\",\n attrs: {\n \"element-loading-text\": \"Loading...\",\n \"element-loading-spinner\": \"el-icon-loading\",\n \"element-loading-background\": \"rgba(0, 0, 0, 0.3)\"\n }\n }, [_c(\"map-svg-sprite-color\"), _c(\"scaffold-tooltip\", {\n attrs: {\n label: _vm.tData.label,\n region: _vm.tData.region,\n visible: _vm.tData.visible,\n x: _vm.tData.x,\n y: _vm.tData.y,\n annotationDisplay: _vm.viewingMode === \"Annotation\" && _vm.tData.active === true\n }\n }), _c(\"div\", {\n ref: \"display\",\n staticStyle: {\n height: \"100%\",\n width: \"100%\"\n },\n attrs: {\n id: \"organsDisplayArea\",\n tabindex: \"-1\"\n },\n on: {\n keydown: function keydown($event) {\n if (!$event.type.indexOf(\"key\") && $event.keyCode !== 66) return null;\n return _vm.backgroundChangeCallback.apply(null, arguments);\n }\n }\n }), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.displayUI && !_vm.isTransitioning,\n expression: \"displayUI && !isTransitioning\"\n }]\n }, [_vm.displayWarning ? _c(\"el-popover\", {\n ref: \"warningPopover\",\n attrs: {\n content: _vm.warningMessage,\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper message-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[6].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[6], \"value\", $$v);\n },\n expression: \"hoverVisibilities[6].value\"\n }\n }) : _vm._e(), _vm.displayWarning ? _c(\"i\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:warningPopover\",\n arg: \"warningPopover\"\n }],\n staticClass: \"el-icon-warning message-icon warning-icon\",\n on: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(6);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(6);\n }\n }\n }, [_c(\"span\", {\n staticClass: \"message-text\"\n }, [_vm._v(\"Beta\")])]) : _vm._e(), _vm.displayLatestChanges ? _c(\"el-popover\", {\n ref: \"latestChangesPopover\",\n attrs: {\n content: _vm.latestChangesMessage,\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper message-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[7].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[7], \"value\", $$v);\n },\n expression: \"hoverVisibilities[7].value\"\n }\n }) : _vm._e(), _vm.displayLatestChanges && _vm.latestChangesMessage ? _c(\"i\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:latestChangesPopover\",\n arg: \"latestChangesPopover\"\n }],\n staticClass: \"el-icon-warning message-icon latest-changesicon\",\n on: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(7);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(7);\n }\n }\n }, [_c(\"span\", {\n staticClass: \"message-text\"\n }, [_vm._v(\"What's new?\")])]) : _vm._e(), _c(\"el-popover\", {\n ref: \"checkBoxPopover\",\n attrs: {\n content: \"Change region visibility\",\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[5].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[5], \"value\", $$v);\n },\n expression: \"hoverVisibilities[5].value\"\n }\n }), _c(\"tree-controls\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:checkBoxPopover\",\n arg: \"checkBoxPopover\"\n }],\n ref: \"treeControls\",\n attrs: {\n \"help-mode\": _vm.helpMode,\n isReady: _vm.isReady,\n \"show-colour-picker\": _vm.showColourPicker\n },\n on: {\n \"object-selected\": _vm.objectSelected,\n \"object-hovered\": _vm.objectHovered,\n \"drawer-toggled\": _vm.drawerToggled\n }\n }), _c(\"div\", {\n staticClass: \"primitive-controls-box\"\n }, [_c(\"primitive-controls\", {\n ref: \"primitiveControls\"\n })], 1), _vm.sceneData.timeVarying ? _c(\"el-popover\", {\n ref: \"sliderPopover\",\n attrs: {\n content: \"Move the slider to animate the region\",\n placement: \"top\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper top-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[4].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[4], \"value\", $$v);\n },\n expression: \"hoverVisibilities[4].value\"\n }\n }) : _vm._e(), _vm.sceneData.timeVarying ? _c(\"div\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:sliderPopover\",\n arg: \"sliderPopover\"\n }],\n staticClass: \"time-slider-container\",\n class: [_vm.minimisedSlider ? \"minimised\" : \"\", _vm.sliderPosition]\n }, [_c(\"el-tabs\", {\n attrs: {\n type: \"card\"\n }\n }, [_c(\"el-tab-pane\", {\n attrs: {\n label: \"Animate scaffold\"\n }\n }, [_c(\"el-row\", {\n staticClass: \"tab-content\"\n }, [_vm.isPlaying ? _c(\"map-svg-icon\", {\n staticClass: \"icon-button video-button\",\n attrs: {\n icon: \"pause\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.play(false);\n }\n }\n }) : _c(\"map-svg-icon\", {\n staticClass: \"video-button icon-button\",\n attrs: {\n icon: \"play\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.play(true);\n }\n }\n }), _c(\"el-slider\", {\n staticClass: \"slider\",\n attrs: {\n min: 0,\n max: _vm.timeMax,\n value: _vm.sceneData.currentTime / 100 * _vm.timeMax,\n step: 0.1,\n \"tooltip-class\": \"time-slider-tooltip\",\n \"format-tooltip\": _vm.formatTooltip,\n marks: _vm.timeStamps\n },\n on: {\n input: function input($event) {\n return _vm.timeChange($event);\n }\n }\n })], 1)], 1), _c(\"el-tab-pane\", {\n attrs: {\n label: \"Animation data\"\n }\n }, [_c(\"el-row\", {\n staticClass: \"tab-content\"\n }, [_c(\"div\", {\n staticClass: \"animation-data\"\n }, [_vm._v(\" Original duration: \"), _c(\"div\", {\n staticClass: \"purple\"\n }, [_vm._v(\" \" + _vm._s(_vm.orginalDuration) + \" \")])]), _c(\"div\", {\n staticClass: \"animation-data\"\n }, [_vm._v(\" Animation duration: \"), _c(\"div\", {\n staticClass: \"purple\"\n }, [_vm._v(\" \" + _vm._s(_vm.animateDuration) + \" \")])]), _c(\"div\", {\n staticClass: \"animation-data\"\n }, [_vm._v(\" Playback speed \"), _c(\"el-select\", {\n staticClass: \"select-box\",\n attrs: {\n \"popper-append-to-body\": true,\n value: _vm.currentSpeed,\n placeholder: \"Select\",\n \"popper-class\": \"scaffold_viewer_dropdown\"\n },\n on: {\n change: function change($event) {\n return _vm.speedChanged($event);\n }\n }\n }, _vm._l(_vm.playSpeed, function (item) {\n return _c(\"el-option\", {\n key: item.value,\n attrs: {\n label: item.label,\n value: item.value\n }\n });\n }), 1)], 1)])], 1)], 1)], 1) : _vm._e(), _c(\"div\", {\n staticClass: \"bottom-right-control\"\n }, [_c(\"el-popover\", {\n attrs: {\n content: \"Zoom in\",\n placement: \"left\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper left-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[0].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[0], \"value\", $$v);\n },\n expression: \"hoverVisibilities[0].value\"\n }\n }, [_c(\"map-svg-icon\", {\n staticClass: \"icon-button zoomIn\",\n attrs: {\n slot: \"reference\",\n icon: \"zoomIn\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.zoomIn();\n },\n mouseover: function mouseover($event) {\n return _vm.showHelpText(0);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(0);\n }\n },\n slot: \"reference\"\n })], 1), _c(\"el-popover\", {\n attrs: {\n content: \"Zoom out\",\n placement: \"top-end\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper popper-zoomout non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[1].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[1], \"value\", $$v);\n },\n expression: \"hoverVisibilities[1].value\"\n }\n }, [_c(\"map-svg-icon\", {\n staticClass: \"icon-button zoomOut\",\n attrs: {\n slot: \"reference\",\n icon: \"zoomOut\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.zoomOut();\n },\n mouseover: function mouseover($event) {\n return _vm.showHelpText(1);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(1);\n }\n },\n slot: \"reference\"\n })], 1), _c(\"el-popover\", {\n attrs: {\n placement: \"top\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[2].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[2], \"value\", $$v);\n },\n expression: \"hoverVisibilities[2].value\"\n }\n }, [_c(\"div\", [_vm._v(\" Fit to \"), _c(\"br\"), _vm._v(\" window \")]), _c(\"map-svg-icon\", {\n staticClass: \"icon-button fitWindow\",\n attrs: {\n slot: \"reference\",\n icon: \"fitWindow\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.fitWindow();\n },\n mouseover: function mouseover($event) {\n return _vm.showHelpText(2);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(2);\n }\n },\n slot: \"reference\"\n })], 1)], 1), _c(\"el-popover\", {\n ref: \"open-map-popover\",\n attrs: {\n placement: \"top-start\",\n width: \"128\",\n \"append-to-body\": false,\n trigger: \"click\",\n \"popper-class\": \"open-map-popper\"\n }\n }, _vm._l(_vm.openMapOptions, function (item) {\n return _c(\"el-row\", {\n key: item.key\n }, [_c(\"el-button\", {\n attrs: {\n type: \"primary\",\n plain: \"\"\n },\n on: {\n click: function click($event) {\n return _vm.$emit(\"open-map\", item.key);\n }\n }\n }, [_vm._v(\" \" + _vm._s(item.display) + \" \")])], 1);\n }), 1), _c(\"el-popover\", {\n ref: \"backgroundPopover\",\n attrs: {\n placement: \"top-start\",\n width: \"128\",\n \"append-to-body\": false,\n trigger: \"click\",\n \"popper-class\": \"background-popper non-selectable\"\n }\n }, [_c(\"el-row\", {\n staticClass: \"backgroundText\"\n }, [_vm._v(\"Viewing Mode\")]), _c(\"el-row\", {\n staticClass: \"backgroundControl\"\n }, [_c(\"el-select\", {\n staticClass: \"select-box viewing-mode\",\n attrs: {\n \"popper-append-to-body\": false,\n placeholder: \"Select\",\n \"popper-class\": \"scaffold_viewer_dropdownr\"\n },\n model: {\n value: _vm.viewingMode,\n callback: function callback($$v) {\n _vm.viewingMode = $$v;\n },\n expression: \"viewingMode\"\n }\n }, _vm._l(_vm.viewingModes, function (item) {\n return _c(\"el-option\", {\n key: item,\n attrs: {\n label: item,\n value: item\n }\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 12\n }\n }, [_vm._v(_vm._s(item))])], 1)], 1);\n }), 1)], 1), _c(\"el-row\", {\n staticClass: \"backgroundSpacer\"\n }), _c(\"el-row\", {\n staticClass: \"backgroundText\"\n }, [_vm._v(\" Change background \")]), _c(\"el-row\", {\n staticClass: \"backgroundChooser\"\n }, _vm._l(_vm.availableBackground, function (item) {\n return _c(\"div\", {\n key: item,\n class: [\"backgroundChoice\", item, item == _vm.currentBackground ? \"active\" : \"\"],\n on: {\n click: function click($event) {\n return _vm.backgroundChangeCallback(item);\n }\n }\n });\n }), 0)], 1), _c(\"div\", {\n staticClass: \"settings-group\",\n class: {\n open: _vm.drawerOpen,\n close: !_vm.drawerOpen\n }\n }, [_c(\"el-row\", [_c(\"el-popover\", {\n attrs: {\n content: \"Open new map\",\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[8].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[8], \"value\", $$v);\n },\n expression: \"hoverVisibilities[8].value\"\n }\n }, [_vm.enableOpenMapUI && _vm.openMapOptions.length > 0 ? _c(\"map-svg-icon\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:open-map-popover\",\n arg: \"open-map-popover\"\n }],\n staticClass: \"icon-button\",\n attrs: {\n slot: \"reference\",\n icon: \"openMap\"\n },\n nativeOn: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(8);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(8);\n }\n },\n slot: \"reference\"\n }) : _vm._e()], 1)], 1), _c(\"el-row\", [_c(\"el-popover\", {\n attrs: {\n content: \"Change background color\",\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[3].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[3], \"value\", $$v);\n },\n expression: \"hoverVisibilities[3].value\"\n }\n }, [_c(\"map-svg-icon\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:backgroundPopover\",\n arg: \"backgroundPopover\"\n }],\n staticClass: \"icon-button\",\n attrs: {\n slot: \"reference\",\n icon: \"changeBckgd\"\n },\n nativeOn: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(3);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(3);\n }\n },\n slot: \"reference\"\n })], 1)], 1)], 1)], 1)], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldVuer.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%22142c024b-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
829
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n directives: [{\n name: \"loading\",\n rawName: \"v-loading\",\n value: _vm.loading,\n expression: \"loading\"\n }],\n ref: \"scaffoldContainer\",\n staticClass: \"scaffold-container\",\n attrs: {\n \"element-loading-text\": \"Loading...\",\n \"element-loading-spinner\": \"el-icon-loading\",\n \"element-loading-background\": \"rgba(0, 0, 0, 0.3)\"\n }\n }, [_c(\"map-svg-sprite-color\"), _c(\"scaffold-tooltip\", {\n attrs: {\n label: _vm.tData.label,\n region: _vm.tData.region,\n visible: _vm.tData.visible,\n x: _vm.tData.x,\n y: _vm.tData.y,\n annotationDisplay: _vm.viewingMode === \"Annotation\" && _vm.tData.active === true\n }\n }), _c(\"div\", {\n ref: \"display\",\n staticStyle: {\n height: \"100%\",\n width: \"100%\"\n },\n attrs: {\n id: \"organsDisplayArea\",\n tabindex: \"-1\"\n },\n on: {\n keydown: function keydown($event) {\n if (!$event.type.indexOf(\"key\") && $event.keyCode !== 66) return null;\n return _vm.backgroundChangeCallback.apply(null, arguments);\n }\n }\n }), _c(\"div\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.displayUI && !_vm.isTransitioning,\n expression: \"displayUI && !isTransitioning\"\n }]\n }, [_vm.displayWarning ? _c(\"el-popover\", {\n ref: \"warningPopover\",\n attrs: {\n content: _vm.warningMessage,\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper message-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[6].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[6], \"value\", $$v);\n },\n expression: \"hoverVisibilities[6].value\"\n }\n }) : _vm._e(), _vm.displayWarning ? _c(\"i\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:warningPopover\",\n arg: \"warningPopover\"\n }],\n staticClass: \"el-icon-warning message-icon warning-icon\",\n on: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(6);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(6);\n }\n }\n }, [_c(\"span\", {\n staticClass: \"message-text\"\n }, [_vm._v(\"Beta\")])]) : _vm._e(), _vm.displayLatestChanges ? _c(\"el-popover\", {\n ref: \"latestChangesPopover\",\n attrs: {\n content: _vm.latestChangesMessage,\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper message-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[7].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[7], \"value\", $$v);\n },\n expression: \"hoverVisibilities[7].value\"\n }\n }) : _vm._e(), _vm.displayLatestChanges && _vm.latestChangesMessage ? _c(\"i\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:latestChangesPopover\",\n arg: \"latestChangesPopover\"\n }],\n staticClass: \"el-icon-warning message-icon latest-changesicon\",\n on: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(7);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(7);\n }\n }\n }, [_c(\"span\", {\n staticClass: \"message-text\"\n }, [_vm._v(\"What's new?\")])]) : _vm._e(), _c(\"el-popover\", {\n ref: \"checkBoxPopover\",\n attrs: {\n content: \"Change region visibility\",\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[5].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[5], \"value\", $$v);\n },\n expression: \"hoverVisibilities[5].value\"\n }\n }), _c(\"tree-controls\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:checkBoxPopover\",\n arg: \"checkBoxPopover\"\n }],\n ref: \"treeControls\",\n attrs: {\n \"help-mode\": _vm.helpMode,\n isReady: _vm.isReady,\n \"show-colour-picker\": _vm.showColourPicker\n },\n on: {\n \"object-selected\": _vm.objectSelected,\n \"object-hovered\": _vm.objectHovered,\n \"drawer-toggled\": _vm.drawerToggled\n }\n }), _c(\"div\", {\n staticClass: \"primitive-controls-box\"\n }, [_c(\"primitive-controls\", {\n ref: \"primitiveControls\"\n })], 1), _vm.sceneData.timeVarying ? _c(\"el-popover\", {\n ref: \"sliderPopover\",\n attrs: {\n content: \"Move the slider to animate the region\",\n placement: \"top\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper top-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[4].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[4], \"value\", $$v);\n },\n expression: \"hoverVisibilities[4].value\"\n }\n }) : _vm._e(), _vm.sceneData.timeVarying ? _c(\"div\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:sliderPopover\",\n arg: \"sliderPopover\"\n }],\n staticClass: \"time-slider-container\",\n class: [_vm.minimisedSlider ? \"minimised\" : \"\", _vm.sliderPosition]\n }, [_c(\"el-tabs\", {\n attrs: {\n type: \"card\"\n }\n }, [_c(\"el-tab-pane\", {\n attrs: {\n label: \"Animate scaffold\"\n }\n }, [_c(\"el-row\", {\n staticClass: \"tab-content\"\n }, [_vm.isPlaying ? _c(\"map-svg-icon\", {\n staticClass: \"icon-button video-button\",\n attrs: {\n icon: \"pause\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.play(false);\n }\n }\n }) : _c(\"map-svg-icon\", {\n staticClass: \"video-button icon-button\",\n attrs: {\n icon: \"play\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.play(true);\n }\n }\n }), _c(\"el-slider\", {\n staticClass: \"slider\",\n attrs: {\n min: 0,\n max: _vm.timeMax,\n value: _vm.sceneData.currentTime / 100 * _vm.timeMax,\n step: 0.1,\n \"tooltip-class\": \"time-slider-tooltip\",\n \"format-tooltip\": _vm.formatTooltip,\n marks: _vm.timeStamps\n },\n on: {\n input: function input($event) {\n return _vm.timeChange($event);\n }\n }\n })], 1)], 1), _c(\"el-tab-pane\", {\n attrs: {\n label: \"Animation data\"\n }\n }, [_c(\"el-row\", {\n staticClass: \"tab-content\"\n }, [_c(\"div\", {\n staticClass: \"animation-data\"\n }, [_vm._v(\" Original duration: \"), _c(\"div\", {\n staticClass: \"purple\"\n }, [_vm._v(\" \" + _vm._s(_vm.orginalDuration) + \" \")])]), _c(\"div\", {\n staticClass: \"animation-data\"\n }, [_vm._v(\" Animation duration: \"), _c(\"div\", {\n staticClass: \"purple\"\n }, [_vm._v(\" \" + _vm._s(_vm.animateDuration) + \" \")])]), _c(\"div\", {\n staticClass: \"animation-data\"\n }, [_vm._v(\" Playback speed \"), _c(\"el-select\", {\n staticClass: \"select-box\",\n attrs: {\n \"popper-append-to-body\": true,\n value: _vm.currentSpeed,\n placeholder: \"Select\",\n \"popper-class\": \"scaffold_viewer_dropdown\"\n },\n on: {\n change: function change($event) {\n return _vm.speedChanged($event);\n }\n }\n }, _vm._l(_vm.playSpeed, function (item) {\n return _c(\"el-option\", {\n key: item.value,\n attrs: {\n label: item.label,\n value: item.value\n }\n });\n }), 1)], 1)])], 1)], 1)], 1) : _vm._e(), _c(\"div\", {\n staticClass: \"bottom-right-control\"\n }, [_c(\"el-popover\", {\n attrs: {\n content: \"Zoom in\",\n placement: \"left\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper left-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[0].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[0], \"value\", $$v);\n },\n expression: \"hoverVisibilities[0].value\"\n }\n }, [_c(\"map-svg-icon\", {\n staticClass: \"icon-button zoomIn\",\n attrs: {\n slot: \"reference\",\n icon: \"zoomIn\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.zoomIn();\n },\n mouseover: function mouseover($event) {\n return _vm.showHelpText(0);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(0);\n }\n },\n slot: \"reference\"\n })], 1), _c(\"el-popover\", {\n attrs: {\n content: \"Zoom out\",\n placement: \"top-end\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper popper-zoomout non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[1].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[1], \"value\", $$v);\n },\n expression: \"hoverVisibilities[1].value\"\n }\n }, [_c(\"map-svg-icon\", {\n staticClass: \"icon-button zoomOut\",\n attrs: {\n slot: \"reference\",\n icon: \"zoomOut\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.zoomOut();\n },\n mouseover: function mouseover($event) {\n return _vm.showHelpText(1);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(1);\n }\n },\n slot: \"reference\"\n })], 1), _c(\"el-popover\", {\n attrs: {\n placement: \"top\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[2].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[2], \"value\", $$v);\n },\n expression: \"hoverVisibilities[2].value\"\n }\n }, [_c(\"div\", [_vm._v(\" Fit to \"), _c(\"br\"), _vm._v(\" window \")]), _c(\"map-svg-icon\", {\n staticClass: \"icon-button fitWindow\",\n attrs: {\n slot: \"reference\",\n icon: \"fitWindow\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.fitWindow();\n },\n mouseover: function mouseover($event) {\n return _vm.showHelpText(2);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(2);\n }\n },\n slot: \"reference\"\n })], 1)], 1), _c(\"el-popover\", {\n ref: \"open-map-popover\",\n attrs: {\n placement: \"top-start\",\n width: \"128\",\n \"append-to-body\": false,\n trigger: \"click\",\n \"popper-class\": \"open-map-popper\"\n }\n }, _vm._l(_vm.openMapOptions, function (item) {\n return _c(\"el-row\", {\n key: item.key\n }, [_c(\"el-button\", {\n attrs: {\n type: \"primary\",\n plain: \"\"\n },\n on: {\n click: function click($event) {\n return _vm.$emit(\"open-map\", item.key);\n }\n }\n }, [_vm._v(\" \" + _vm._s(item.display) + \" \")])], 1);\n }), 1), _c(\"el-popover\", {\n ref: \"backgroundPopover\",\n attrs: {\n placement: \"top-start\",\n width: \"128\",\n \"append-to-body\": false,\n trigger: \"click\",\n \"popper-class\": \"background-popper non-selectable\"\n }\n }, [_c(\"el-row\", {\n staticClass: \"backgroundText\"\n }, [_vm._v(\"Viewing Mode\")]), _c(\"el-row\", {\n staticClass: \"backgroundControl\"\n }, [_c(\"el-select\", {\n staticClass: \"select-box viewing-mode\",\n attrs: {\n \"popper-append-to-body\": false,\n placeholder: \"Select\",\n \"popper-class\": \"scaffold_viewer_dropdownr\"\n },\n model: {\n value: _vm.viewingMode,\n callback: function callback($$v) {\n _vm.viewingMode = $$v;\n },\n expression: \"viewingMode\"\n }\n }, _vm._l(_vm.viewingModes, function (item) {\n return _c(\"el-option\", {\n key: item,\n attrs: {\n label: item,\n value: item\n }\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 12\n }\n }, [_vm._v(_vm._s(item))])], 1)], 1);\n }), 1)], 1), _c(\"el-row\", {\n staticClass: \"backgroundSpacer\"\n }), _c(\"el-row\", {\n staticClass: \"backgroundText\"\n }, [_vm._v(\" Change background \")]), _c(\"el-row\", {\n staticClass: \"backgroundChooser\"\n }, _vm._l(_vm.availableBackground, function (item) {\n return _c(\"div\", {\n key: item,\n class: [\"backgroundChoice\", item, item == _vm.currentBackground ? \"active\" : \"\"],\n on: {\n click: function click($event) {\n return _vm.backgroundChangeCallback(item);\n }\n }\n });\n }), 0)], 1), _c(\"div\", {\n staticClass: \"settings-group\",\n class: {\n open: _vm.drawerOpen,\n close: !_vm.drawerOpen\n }\n }, [_c(\"el-row\", [_c(\"el-popover\", {\n attrs: {\n content: \"Open new map\",\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[8].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[8], \"value\", $$v);\n },\n expression: \"hoverVisibilities[8].value\"\n }\n }, [_vm.enableOpenMapUI && _vm.openMapOptions.length > 0 ? _c(\"map-svg-icon\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:open-map-popover\",\n arg: \"open-map-popover\"\n }],\n staticClass: \"icon-button\",\n attrs: {\n slot: \"reference\",\n icon: \"openMap\"\n },\n nativeOn: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(8);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(8);\n }\n },\n slot: \"reference\"\n }) : _vm._e()], 1)], 1), _c(\"el-row\", [_c(\"el-popover\", {\n attrs: {\n content: \"Change background color\",\n placement: \"right\",\n \"append-to-body\": false,\n trigger: \"manual\",\n \"popper-class\": \"scaffold-popper right-popper non-selectable\"\n },\n model: {\n value: _vm.hoverVisibilities[3].value,\n callback: function callback($$v) {\n _vm.$set(_vm.hoverVisibilities[3], \"value\", $$v);\n },\n expression: \"hoverVisibilities[3].value\"\n }\n }, [_c(\"map-svg-icon\", {\n directives: [{\n name: \"popover\",\n rawName: \"v-popover:backgroundPopover\",\n arg: \"backgroundPopover\"\n }],\n staticClass: \"icon-button\",\n attrs: {\n slot: \"reference\",\n icon: \"changeBckgd\"\n },\n nativeOn: {\n mouseover: function mouseover($event) {\n return _vm.showHelpText(3);\n },\n mouseout: function mouseout($event) {\n return _vm.hideHelpText(3);\n }\n },\n slot: \"reference\"\n })], 1)], 1)], 1)], 1)], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldVuer.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
830
830
|
|
|
831
831
|
/***/ }),
|
|
832
832
|
|
|
833
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
833
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/TextureSlidesControls.vue?vue&type=template&id=5fb74233&scoped=true&":
|
|
834
834
|
/*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
835
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
835
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/TextureSlidesControls.vue?vue&type=template&id=5fb74233&scoped=true& ***!
|
|
836
836
|
\*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
837
837
|
/*! exports provided: render, staticRenderFns */
|
|
838
838
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
839
839
|
|
|
840
840
|
"use strict";
|
|
841
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"el-container\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.settings.length > 0,\n expression: \"settings.length > 0\"\n }],\n staticClass: \"t-slides-container\"\n }, [_c(\"el-header\", {\n staticClass: \"header\",\n attrs: {\n height: \"30px\"\n }\n }, [_c(\"div\", [_vm._v(\"Texture Slides Settings\")])]), _c(\"el-main\", {\n staticClass: \"block\"\n }, _vm._l(_vm.settings, function (slide, index) {\n return _c(\"el-row\", {\n key: slide.id\n }, [_c(\"el-col\", {\n attrs: {\n offset: 0,\n span: 2\n }\n }, [_c(\"el-select\", {\n staticClass: \"input-box\",\n attrs: {\n \"popper-append-to-body\": false,\n value: slide.direction,\n placeholder: \"Select\",\n \"popper-class\": \"viewer_dropdown\"\n },\n on: {\n change: function change($event) {\n return _vm.modifyDirection($event, slide);\n }\n }\n }, _vm._l(_vm.directions, function (item) {\n return _c(\"el-option\", {\n key: item.value,\n attrs: {\n label: item.label,\n value: item.value\n }\n });\n }), 1)], 1), _c(\"el-col\", {\n attrs: {\n offset: 0,\n span: 14\n }\n }, [_c(\"el-slider\", {\n staticClass: \"my-slider\",\n attrs: {\n step: 0.01,\n min: 0,\n max: 1,\n \"show-tooltip\": false\n },\n on: {\n input: function input($event) {\n return _vm.modifySlide(slide);\n }\n },\n model: {\n value: slide.value,\n callback: function callback($$v) {\n _vm.$set(slide, \"value\", $$v);\n },\n expression: \"slide.value\"\n }\n })], 1), _c(\"el-col\", {\n attrs: {\n offset: 0,\n span: 3\n }\n }, [_c(\"el-input-number\", {\n staticClass: \"input-box number-input\",\n attrs: {\n step: 0.01,\n min: 0,\n max: 1,\n controls: false\n },\n model: {\n value: slide.value,\n callback: function callback($$v) {\n _vm.$set(slide, \"value\", $$v);\n },\n expression: \"slide.value\"\n }\n })], 1), _c(\"el-col\", {\n attrs: {\n offset: 2,\n span: 2\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-close close-icon\",\n on: {\n click: function click($event) {\n return _vm.removeSlide(index, slide);\n }\n }\n })])], 1);\n }), 1), _c(\"el-footer\", {\n staticClass: \"add-slides-text\",\n attrs: {\n height: \"30px\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.addNewSlide.apply(null, arguments);\n }\n }\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 2\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-plus\"\n })]), _c(\"el-col\", {\n attrs: {\n span: 10\n }\n }, [_vm._v(\" Add a new slide \")])], 1)], 1)], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/TextureSlidesControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
841
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"el-container\", {\n directives: [{\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.settings.length > 0,\n expression: \"settings.length > 0\"\n }],\n staticClass: \"t-slides-container\"\n }, [_c(\"el-header\", {\n staticClass: \"header\",\n attrs: {\n height: \"30px\"\n }\n }, [_c(\"div\", [_vm._v(\"Texture Slides Settings\")])]), _c(\"el-main\", {\n staticClass: \"block\"\n }, _vm._l(_vm.settings, function (slide, index) {\n return _c(\"el-row\", {\n key: slide.id\n }, [_c(\"el-col\", {\n attrs: {\n offset: 0,\n span: 2\n }\n }, [_c(\"el-select\", {\n staticClass: \"input-box\",\n attrs: {\n \"popper-append-to-body\": false,\n value: slide.direction,\n placeholder: \"Select\",\n \"popper-class\": \"viewer_dropdown\"\n },\n on: {\n change: function change($event) {\n return _vm.modifyDirection($event, slide);\n }\n }\n }, _vm._l(_vm.directions, function (item) {\n return _c(\"el-option\", {\n key: item.value,\n attrs: {\n label: item.label,\n value: item.value\n }\n });\n }), 1)], 1), _c(\"el-col\", {\n attrs: {\n offset: 0,\n span: 14\n }\n }, [_c(\"el-slider\", {\n staticClass: \"my-slider\",\n attrs: {\n step: 0.01,\n min: 0,\n max: 1,\n \"show-tooltip\": false\n },\n on: {\n input: function input($event) {\n return _vm.modifySlide(slide);\n }\n },\n model: {\n value: slide.value,\n callback: function callback($$v) {\n _vm.$set(slide, \"value\", $$v);\n },\n expression: \"slide.value\"\n }\n })], 1), _c(\"el-col\", {\n attrs: {\n offset: 0,\n span: 3\n }\n }, [_c(\"el-input-number\", {\n staticClass: \"input-box number-input\",\n attrs: {\n step: 0.01,\n min: 0,\n max: 1,\n controls: false\n },\n model: {\n value: slide.value,\n callback: function callback($$v) {\n _vm.$set(slide, \"value\", $$v);\n },\n expression: \"slide.value\"\n }\n })], 1), _c(\"el-col\", {\n attrs: {\n offset: 2,\n span: 2\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-close close-icon\",\n on: {\n click: function click($event) {\n return _vm.removeSlide(index, slide);\n }\n }\n })])], 1);\n }), 1), _c(\"el-footer\", {\n staticClass: \"add-slides-text\",\n attrs: {\n height: \"30px\"\n },\n nativeOn: {\n click: function click($event) {\n return _vm.addNewSlide.apply(null, arguments);\n }\n }\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 2\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-plus\"\n })]), _c(\"el-col\", {\n attrs: {\n span: 10\n }\n }, [_vm._v(\" Add a new slide \")])], 1)], 1)], 1);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/TextureSlidesControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
842
842
|
|
|
843
843
|
/***/ }),
|
|
844
844
|
|
|
845
|
-
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"
|
|
845
|
+
/***/ "./node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/TreeControls.vue?vue&type=template&id=71c9daa4&scoped=true&":
|
|
846
846
|
/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
|
847
|
-
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
847
|
+
!*** ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"72f1e3a1-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/TreeControls.vue?vue&type=template&id=71c9daa4&scoped=true& ***!
|
|
848
848
|
\****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
|
849
849
|
/*! exports provided: render, staticRenderFns */
|
|
850
850
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
851
851
|
|
|
852
852
|
"use strict";
|
|
853
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"tree-controls\",\n class: {\n open: _vm.drawerOpen,\n close: !_vm.drawerOpen\n }\n }, [_c(\"div\", {\n staticClass: \"traditional-container\"\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 12\n }\n }, [_c(\"div\", {\n staticClass: \"regions-display-text\"\n }, [_vm._v(\" Regions \")])])], 1), _c(\"div\", {\n staticClass: \"tree-container\"\n }, [_c(\"el-tree\", {\n directives: [{\n name: \"loading\",\n rawName: \"v-loading\",\n value: !_vm.isReady,\n expression: \"!isReady\"\n }],\n ref: \"regionTree\",\n attrs: {\n \"node-key\": \"id\",\n \"show-checkbox\": \"\",\n \"element-loading-spinner\": \"el-icon-loading\",\n \"element-loading-background\": \"rgba(0, 0, 0, 0.3)\",\n \"check-strictly\": false,\n data: _vm.treeData[0].children,\n \"expand-on-click-node\": false,\n \"render-after-expand\": false\n },\n on: {\n check: _vm.checkChanged\n },\n scopedSlots: _vm._u([{\n key: \"default\",\n fn: function fn(_ref) {\n var node = _ref.node,\n data = _ref.data;\n return _c(\"span\", {\n staticClass: \"region-tree-node\",\n class: {\n activeItem: _vm.active.includes(data.id),\n hoverItem: _vm.hover.includes(data.id)\n },\n on: {\n click: function click($event) {\n return _vm.changeActiveByNode(data, true);\n },\n mouseover: function mouseover($event) {\n return _vm.changeHoverByNode(data, true);\n }\n }\n }, [data.isPrimitives ? _c(\"el-color-picker\", {\n class: {\n \"show-picker\": _vm.showColourPicker\n },\n attrs: {\n value: _vm.getColour(data),\n size: \"small\",\n \"popper-class\": _vm.myPopperClass\n },\n on: {\n change: function change($event) {\n return _vm.setColour(data, $event);\n }\n }\n }) : _vm._e(), _c(\"span\", [_vm._v(_vm._s(node.label))]), data.isTextureSlides ? _c(\"span\", {\n staticClass: \"node-options\"\n }, [_vm._v(\" (Texture) \")]) : _vm._e()], 1);\n }\n }])\n })], 1)], 1), _c(\"div\", {\n staticClass: \"drawer-button\",\n class: {\n open: _vm.drawerOpen,\n close: !_vm.drawerOpen\n },\n on: {\n click: _vm.toggleDrawer\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-arrow-left\"\n })])]);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/TreeControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%
|
|
853
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return render; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return staticRenderFns; });\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n/* harmony import */ var core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_array_includes_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n/* harmony import */ var core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_string_includes_js__WEBPACK_IMPORTED_MODULE_1__);\n\n\nvar render = function render() {\n var _vm = this,\n _c = _vm._self._c;\n return _c(\"div\", {\n staticClass: \"tree-controls\",\n class: {\n open: _vm.drawerOpen,\n close: !_vm.drawerOpen\n }\n }, [_c(\"div\", {\n staticClass: \"traditional-container\"\n }, [_c(\"el-row\", [_c(\"el-col\", {\n attrs: {\n span: 12\n }\n }, [_c(\"div\", {\n staticClass: \"regions-display-text\"\n }, [_vm._v(\" Regions \")])])], 1), _c(\"div\", {\n staticClass: \"tree-container\"\n }, [_c(\"el-tree\", {\n directives: [{\n name: \"loading\",\n rawName: \"v-loading\",\n value: !_vm.isReady,\n expression: \"!isReady\"\n }],\n ref: \"regionTree\",\n attrs: {\n \"node-key\": \"id\",\n \"show-checkbox\": \"\",\n \"element-loading-spinner\": \"el-icon-loading\",\n \"element-loading-background\": \"rgba(0, 0, 0, 0.3)\",\n \"check-strictly\": false,\n data: _vm.treeData[0].children,\n \"expand-on-click-node\": false,\n \"render-after-expand\": false\n },\n on: {\n check: _vm.checkChanged\n },\n scopedSlots: _vm._u([{\n key: \"default\",\n fn: function fn(_ref) {\n var node = _ref.node,\n data = _ref.data;\n return _c(\"span\", {\n staticClass: \"region-tree-node\",\n class: {\n activeItem: _vm.active.includes(data.id),\n hoverItem: _vm.hover.includes(data.id)\n },\n on: {\n click: function click($event) {\n return _vm.changeActiveByNode(data, true);\n },\n mouseover: function mouseover($event) {\n return _vm.changeHoverByNode(data, true);\n }\n }\n }, [data.isPrimitives ? _c(\"el-color-picker\", {\n class: {\n \"show-picker\": _vm.showColourPicker\n },\n attrs: {\n value: _vm.getColour(data),\n size: \"small\",\n \"popper-class\": _vm.myPopperClass\n },\n on: {\n change: function change($event) {\n return _vm.setColour(data, $event);\n }\n }\n }) : _vm._e(), _c(\"span\", [_vm._v(_vm._s(node.label))]), data.isTextureSlides ? _c(\"span\", {\n staticClass: \"node-options\"\n }, [_vm._v(\" (Texture) \")]) : _vm._e()], 1);\n }\n }])\n })], 1)], 1), _c(\"div\", {\n staticClass: \"drawer-button\",\n class: {\n open: _vm.drawerOpen,\n close: !_vm.drawerOpen\n },\n on: {\n click: _vm.toggleDrawer\n }\n }, [_c(\"i\", {\n staticClass: \"el-icon-arrow-left\"\n })])]);\n};\nvar staticRenderFns = [];\nrender._withStripped = true;\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/TreeControls.vue?./node_modules/cache-loader/dist/cjs.js?%7B%22cacheDirectory%22:%22node_modules/.cache/vue-loader%22,%22cacheIdentifier%22:%2272f1e3a1-vue-loader-template%22%7D!./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options");
|
|
854
854
|
|
|
855
855
|
/***/ }),
|
|
856
856
|
|
|
@@ -6312,7 +6312,7 @@ eval("function webpackBootstrapFunc (modules) {\n/******/ // The module cache\n
|
|
|
6312
6312
|
/*! no static exports found */
|
|
6313
6313
|
/***/ (function(module, exports, __webpack_require__) {
|
|
6314
6314
|
|
|
6315
|
-
eval("(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(1);/**\n * Provides a global namespace for the Zinc javascript library and some default parameters for it.\n * \n * @namespace\n * @author Alan Wu\n */var Zinc=function(){this.Revision=\"1.0.12\",this.defaultMaterialColor=16777215,this.defaultOpacity=1,this.modelPrefix=void 0,this.Geometry=__webpack_require__(2).Geometry,this.Glyph=__webpack_require__(10).Glyph,this.Glyphset=__webpack_require__(13).Glyphset,this.Pointset=__webpack_require__(17).Pointset,this.Lines=__webpack_require__(20).Lines,this.TextureArray=__webpack_require__(23).TextureArray,this.TextureSlides=__webpack_require__(25).TextureSlides,this.Renderer=__webpack_require__(28).Renderer,this.Scene=__webpack_require__(30).Scene,this.GeometryCSG=__webpack_require__(42).GeometryCSG,this.GlyphsetCSG=__webpack_require__(48).GlyphsetCSG,this.Viewport=__webpack_require__(39).Viewport,this.CameraControls=__webpack_require__(39).CameraControls,this.SmoothCameraTransition=__webpack_require__(39).SmoothCameraTransition,this.RayCaster=__webpack_require__(39).RayCaster,this.CameraAutoTumble=__webpack_require__(39).CameraAutoTumble,this.StereoEffect=__webpack_require__(39).StereoEffect,this.loadExternalFile=__webpack_require__(6).loadExternalFile,this.loadExternalFiles=__webpack_require__(6).loadExternalFiles,this.THREE=__webpack_require__(3)};module.exports=new Zinc;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! url-polyfill */ \"./node_modules/url-polyfill/url-polyfill.js\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),Geometry=function(){// THREE.Geometry or THREE.BufferGeometry\n/**\n * Create the mesh for rendering\n * \n * @param {THREE.Geomtry} geometryIn - Geometry to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the geometry.\n * @param {Object} options - Provide various options\n * @param {THREE.Color} options.colour - colour to be set for the geometry\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the geometry is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n * @param {Number} options.opacity - Opacity to be set for the geometry\n */ /**\n * Calculate the UV for texture rendering.\n */ /**\n\t * Set wireframe display for this geometry.\n\t * \n\t * @param {Boolean} wireframe - Flag to turn on/off wireframe display.\n\t */__webpack_require__(4).ZincObject.call(this),this.videoHandler=void 0,this.isGeometry=!0,this.createMesh=(geometryIn,materialIn,options)=>{if(!(this.geometry&&this.morph&&null!=geometryIn)){// First copy the geometry\nvar geometry=this.toBufferGeometry(geometryIn,options),isTransparent=!1;1>options.opacity&&(isTransparent=!0);var material;if(void 0===geometry._video){var morphTargets=options.localTimeEnabled||options.localMorphColour;materialIn?(material=materialIn,material.morphTargets=morphTargets,material.morphNormals=options.localTimeEnabled):geometry instanceof THREE.BufferGeometry&&void 0===geometry.attributes.color?material=new THREE.MeshPhongMaterial({color:options.colour,morphTargets:morphTargets,morphNormals:options.localTimeEnabled,transparent:isTransparent,opacity:options.opacity,side:THREE.DoubleSide}):material=new THREE.MeshPhongMaterial({color:options.colour,morphTargets:morphTargets,morphNormals:options.localTimeEnabled,vertexColors:THREE.VertexColors,transparent:isTransparent,opacity:options.opacity,side:THREE.DoubleSide}),options.localMorphColour&&geometry.morphAttributes.color&&(material.onBeforeCompile=__webpack_require__(9).augmentMorphColor())}else{var videoTexture=geometry._video.createCanvasVideoTexture();material=new THREE.MeshBasicMaterial({morphTargets:options.localTimeEnabled,color:new THREE.Color(1,1,1),transparent:isTransparent,opacity:options.opacity,map:videoTexture,side:THREE.DoubleSide}),this.videoHandler=geometry._video}var mesh=new THREE.Mesh(geometry,material);this.setMesh(mesh,options.localTimeEnabled,options.localMorphColour)}},this.calculateUVs=()=>{this.geometry.computeBoundingBox();var max=this.geometry.boundingBox.max,min=this.geometry.boundingBox.min,offset=new THREE.Vector2(0-min.x,0-min.y),range=new THREE.Vector2(max.x-min.x,max.y-min.y);this.geometry.faceVertexUvs[0]=[];for(var i=0;i<this.geometry.faces.length;i++){var v1=this.geometry.vertices[this.geometry.faces[i].a],v2=this.geometry.vertices[this.geometry.faces[i].b],v3=this.geometry.vertices[this.geometry.faces[i].c];geometry.faceVertexUvs[0].push([new THREE.Vector2((v1.x+offset.x)/range.x,(v1.y+offset.y)/range.y),new THREE.Vector2((v2.x+offset.x)/range.x,(v2.y+offset.y)/range.y),new THREE.Vector2((v3.x+offset.x)/range.x,(v3.y+offset.y)/range.y)])}geometry.uvsNeedUpdate=!0},this.setWireframe=wireframe=>{this.morph.material.wireframe=wireframe}};/**\n * Provides an object which stores geometry and provides method which controls its animations.\n * This is created when a valid json file containging geometry is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Geometry}\n */Geometry.prototype=Object.create(__webpack_require__(4).ZincObject.prototype),exports.Geometry=Geometry;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),THREEGeometry=__webpack_require__(5).Geometry,uniqueiId=0,getUniqueId=function(){return\"pr\"+uniqueiId++},ZincObject=function(){// THREE.Mesh\n// THREE.Mesh - for utilities purpose such as rendering \n// transparent surfaces - one for front face and one for back face.\n/**\n\t * Groupname given to this geometry.\n\t */ /**\n\t * Total duration of the animation, this value interacts with the \n\t * {@link Renderer#playRate} to produce the actual duration of the\n\t * animation. Actual time in second = duration / playRate.\n\t */this.isZincObject=!0,this.geometry=void 0,this.morph=void 0,this.secondaryMesh=void 0,this.groupName=void 0,this.timeEnabled=!1,this.morphColour=!1,this.inbuildTime=0,this.mixer=void 0,this.animationGroup=void 0,this.duration=6e3,this.clipAction=void 0,this.userData={},this.videoHandler=void 0,this.marker=void 0,this.markerUpdateRequired=!0,this.closestVertexIndex=-1,this.boundingBoxUpdateRequired=!0,this.cachedBoundingBox=new THREE.Box3,this._vertex=new THREE.Vector3,this.anatomicalId=void 0,this.region=void 0,this.animationClip=void 0,this.markerMode=\"inherited\",this.uuid=getUniqueId()};ZincObject.prototype.setDuration=function(durationIn){this.duration=durationIn,this.clipAction&&this.clipAction.setDuration(this.duration)},ZincObject.prototype.getDuration=function(){return this.duration},ZincObject.prototype.setRegion=function(region){this.region=region},ZincObject.prototype.getRegion=function(){return this.region},ZincObject.prototype.toBufferGeometry=function(geometryIn,options){var geometry;return geometryIn instanceof THREEGeometry?(options.localTimeEnabled&&!geometryIn.morphNormalsReady&&(null==geometryIn.morphNormals||0==geometryIn.morphNormals.length)&&geometryIn.computeMorphNormals(),geometry=geometryIn.toIndexedBufferGeometry(),options.localMorphColour&&__webpack_require__(6).copyMorphColorsToIndexedBufferGeometry(geometryIn,geometry)):geometryIn instanceof THREE.BufferGeometry&&(geometry=geometryIn.clone()),geometry.colorsNeedUpdate=!0,geometry.computeBoundingBox(),geometry.computeBoundingSphere(),geometryIn._video&&(geometry._video=geometryIn._video),geometry},ZincObject.prototype.checkAndCreateTransparentMesh=function(){if(this.isGeometry&&this.morph.material&&this.morph.material.transparent){if(!this.secondaryMesh){var secondaryMaterial=this.morph.material.clone();secondaryMaterial.side=THREE.FrontSide,this.secondaryMesh=new THREE.Mesh(this.morph.geometry,secondaryMaterial),this.secondaryMesh.renderOrder=this.morph.renderOrder+1,this.secondaryMesh.userData=this,this.secondaryMesh.name=this.groupName}this.morph.material.side=THREE.BackSide,this.morph.material.needsUpdate=!0,this.morph.add(this.secondaryMesh),this.animationGroup.add(this.secondaryMesh)}},ZincObject.prototype.checkAndRemoveTransparentMesh=function(){this.isGeometry&&this.secondaryMesh&&(this.morph.remove(this.secondaryMesh),this.animationGroup.uncache(this.secondaryMesh),this.animationGroup.remove(this.secondaryMesh)),this.morph.material.side=THREE.DoubleSide},ZincObject.prototype.setMesh=function(mesh,localTimeEnabled,localMorphColour){if(this.animationGroup=new THREE.AnimationObjectGroup(mesh),this.mixer=new THREE.AnimationMixer(this.animationGroup),this.geometry=mesh.geometry,this.clipAction=void 0,this.geometry&&this.geometry.morphAttributes){var morphAttribute=this.geometry.morphAttributes.position;morphAttribute||(morphAttribute=this.geometry.morphAttributes.color?this.geometry.morphAttributes.color:this.geometry.morphAttributes.normal),morphAttribute&&(this.animationClip=THREE.AnimationClip.CreateClipsFromMorphTargetSequences(morphAttribute,10,!0),this.animationClip&&null!=this.animationClip[0]&&(this.clipAction=this.mixer.clipAction(this.animationClip[0]).setDuration(this.duration),this.clipAction.loop=THREE.loopOnce,this.clipAction.clampWhenFinished=!0,this.clipAction.play()))}this.timeEnabled=localTimeEnabled,this.morphColour=localMorphColour,this.morph=mesh,this.morph.userData=this,this.morph.matrixAutoUpdate=!1,this.checkAndCreateTransparentMesh(),this.timeEnabled?this.setFrustumCulled(!1):this.morphColour&&(this.geometry.setAttribute(\"morphTarget0\",this.geometry.getAttribute(\"position\")),this.geometry.setAttribute(\"morphTarget1\",this.geometry.getAttribute(\"position\"))),this.boundingBoxUpdateRequired=!0},ZincObject.prototype.setName=function(groupNameIn){this.groupName=groupNameIn,this.morph&&(this.morph.name=this.groupName),this.secondaryMesh&&(this.secondaryMesh.name=this.groupName)},ZincObject.prototype.getCurrentTime=function(){if(this.clipAction){var ratio=this.clipAction.time/this.clipAction._clip.duration;return this.duration*ratio}return this.inbuildTime};var updateMorphColorAttribute=function(targetGeometry,morph){if(morph&&targetGeometry&&targetGeometry.morphAttributes&&targetGeometry.morphAttributes.color){var morphColors=targetGeometry.morphAttributes.color,influences=morph.morphTargetInfluences,length=influences.length;targetGeometry.deleteAttribute(\"morphColor0\"),targetGeometry.deleteAttribute(\"morphColor1\");for(var bound=0,morphArray=[],i=0;1>bound||i<length;i++)0<influences[i]&&(bound++,morphArray.push([i,influences[i]]));2==morphArray.length?(targetGeometry.setAttribute(\"morphColor0\",morphColors[morphArray[0][0]]),targetGeometry.setAttribute(\"morphColor1\",morphColors[morphArray[1][0]])):1==morphArray.length&&(targetGeometry.setAttribute(\"morphColor0\",morphColors[morphArray[0][0]]),targetGeometry.setAttribute(\"morphColor1\",morphColors[morphArray[0][0]]))}};/**\n * Set the local time of this geometry.\n * \n * @param {Number} time - Can be any value between 0 to duration.\n */ /**\n * Check if the geometry is time varying.\n * \n * @return {Boolean}\n */ /**\n * Get the visibility of this Geometry.\n * \n */ /**\n * Set the visibility of this Geometry.\n * \n * @param {Boolean} visible - a boolean flag indicate the visibility to be set \n */ /**\n * Set the opacity of this Geometry. This function will also set the isTransparent\n * flag according to the provided alpha value.\n * \n * @param {Number} alpah - Alpha value to set for this geometry, \n * can be any value between from 0 to 1.0.\n */ /**\n * The rendering will be culled if it is outside of the frustrum\n * when this flag is set to true, it should be set to false if\n * morphing is enabled.\n * \n * @param {Boolean} flag - Set frustrum culling on/off based on this flag.\n */ /**\n * Set rather a zinc object should be displayed using per vertex colour or\n * not.\n * \n * @param {Boolean} vertexColors - Set display with vertex color on/off.\n */ /**\n * Get the colour of the mesh.\n * \n * @return {THREE.Color}\n */ /**\n * Set the colour of the mesh.\n * \n * @param {THREE.Color} colour - Colour to be set for this geometry.\n */ /**\n * Get the colour of the mesh in hex string form.\n * \n * @return {String}\n */ /**\n * Set the colour of the mesh using hex in string form.\n * \n * @param {String} hex - The colour value in hex form.\n */ /**\n * Set the material of the geometry.\n * \n * @param {THREE.Material} material - Material to be set for this geometry.\n */ /**\n * Get the index of the closest vertex to centroid.\n * \n * @return {Number} - integer index in the array\n */ /**\n * Get the closest vertex to centroid.\n * \n * @return {THREE.Vector3}\n */ /**\n * Get the bounding box of this geometry.\n * \n * @return {THREE.Box3}.\n */ /**\n * Clear this geometry and free the memory.\n */ /**\n * Check if marker is enabled based on the objects settings with \n * the provided scene options.\n * \n * @return {Boolean} \n */ /**\n * Update the marker's position and size based on current viewport. \n */ /**\n * Get the windows coordinates.\n * \n * @return {Object} - position and rather the closest vertex is on screen.\n */ /**\n * Set marker mode for this zinc object which determine rather the\n * markers should be displayed or not.\n *\n * @param {string} mode - There are three options:\n * \"on\" - marker is enabled regardless of settings of scene\n * \"off\" - marker is disabled regardless of settings of scene\n * \"inherited\" - Marker settings on scene will determine the visibility\n * of the marker.\n * \n * @return {Boolean} \n */ //Update the geometry and colours depending on the morph.\nZincObject.prototype.setMorphTime=function(time){var timeChanged=!1;if(this.clipAction){var ratio=time/this.duration,actualDuration=this.clipAction._clip.duration,newTime=ratio*actualDuration;newTime!=this.clipAction.time&&(this.clipAction.time=newTime,timeChanged=!0),timeChanged&&this.isTimeVarying()&&this.mixer.update(0)}else{var _newTime=time;_newTime=time>this.duration?this.duration:0>time?0:time,_newTime!=this.inbuildTime&&(this.inbuildTime=_newTime,timeChanged=!0)}timeChanged&&(this.boundingBoxUpdateRequired=!0,updateMorphColorAttribute(this.geometry,this.morph),this.timeEnabled&&(this.markerUpdateRequired=!0))},ZincObject.prototype.isTimeVarying=function(){return!!(this.timeEnabled||this.morphColour)},ZincObject.prototype.getVisibility=function(){return!!this.morph&&this.morph.visible},ZincObject.prototype.setVisibility=function(visible){this.morph.visible!==visible&&(this.morph.visible=visible,this.region&&(this.region.pickableUpdateRequired=!0))},ZincObject.prototype.setAlpha=function(alpha){var material=this.morph.material,isTransparent=!1;1>alpha&&(isTransparent=!0);var transparentChanged=material.transparent!=isTransparent;material.opacity=alpha,material.transparent=isTransparent,transparentChanged&&(isTransparent?this.checkAndCreateTransparentMesh():this.checkAndRemoveTransparentMesh()),this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.opacity=alpha)},ZincObject.prototype.setFrustumCulled=function(flag){this.morph&&(this.morph.frustumCulled=flag)},ZincObject.prototype.setVertexColors=function(vertexColors){this.morph.material.vertexColors=vertexColors,this.geometry.colorsNeedUpdate=!0,this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.vertexColors=vertexColors)},ZincObject.prototype.getColour=function(){return this.morph&&this.morph.material?this.morph.material.color:void 0},ZincObject.prototype.setColour=function(colour){this.morph.material.color=colour,this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.color=colour),this.geometry.colorsNeedUpdate=!0},ZincObject.prototype.getColourHex=function(){return!this.morphColour&&this.morph&&this.morph.material&&this.morph.material.color?this.morph.material.color.getHexString():void 0},ZincObject.prototype.setColourHex=function(hex){this.morph.material.color.setHex(hex),this.secondaryMesh&&this.secondaryMesh.material&&this.secondaryMesh.material.color.setHex(hex)},ZincObject.prototype.setMaterial=function(material){this.morph.material=material,this.geometry.colorsNeedUpdate=!0,this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.dispose(),this.secondaryMesh.material=material.clone(),this.secondaryMesh.material.side=THREE.FrontSide)},ZincObject.prototype.getClosestVertexIndex=function(){var closestIndex=-1;if(this.morph){var position=this.morph.geometry.attributes.position,boundingBox=new THREE.Box3().setFromBufferAttribute(position),center=new THREE.Vector3;if(boundingBox.getCenter(center),position&&boundingBox)for(var distance=-1,currentDistance=0,current=new THREE.Vector3,i=0;i<position.count;i++)current.fromArray(position.array,3*i),currentDistance=current.distanceTo(center),-1==distance?distance=currentDistance:distance>currentDistance&&(distance=currentDistance,closestIndex=i)}return closestIndex},ZincObject.prototype.getClosestVertex=function(applyMatrixWorld){var position=new THREE.Vector3;if(-1==this.closestVertexIndex&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex){var influences=this.morph.morphTargetInfluences,attributes=this.morph.geometry.morphAttributes;if(influences&&attributes&&attributes.position){for(var found=!1,i=0;i<influences.length;i++)0<influences[i]&&(found=!0,this._vertex.fromArray(attributes.position[i].array,3*this.closestVertexIndex),position.add(this._vertex.multiplyScalar(influences[i])));if(found)return applyMatrixWorld?position.applyMatrix4(this.morph.matrixWorld):position}else return position.fromArray(this.morph.geometry.attributes.position.array,3*this.closestVertexIndex),applyMatrixWorld?position.applyMatrix4(this.morph.matrixWorld):position}return this.getBoundingBox().getCenter(position),applyMatrixWorld?position.applyMatrix4(this.morph.matrixWorld):position},ZincObject.prototype.getBoundingBox=function(){if(this.morph&&this.morph.visible){if(this.boundingBoxUpdateRequired){var influences=this.morph.morphTargetInfluences,attributes=void 0;this.morph.geometry&&(attributes=this.morph.geometry.morphAttributes);var found=!1;if(influences&&attributes&&attributes.position){for(var min=new THREE.Vector3,max=new THREE.Vector3,box=new THREE.Box3,i=0;i<influences.length;i++)0<influences[i]&&(found=!0,box.setFromArray(attributes.position[i].array),min.add(box.min.multiplyScalar(influences[i])),max.add(box.max.multiplyScalar(influences[i])));found&&this.cachedBoundingBox.set(min,max)}found||this.cachedBoundingBox.setFromBufferAttribute(this.morph.geometry.attributes.position),this.morph.updateWorldMatrix(),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1}return this.cachedBoundingBox}},ZincObject.prototype.dispose=function(){this.morph&&this.morph.geometry&&this.morph.geometry.dispose(),this.morph&&this.morph.material&&this.morph.material.dispose(),this.secondaryMesh&&this.secondaryMesh.material&&this.secondaryMesh.material.dispose(),this.geometry&&this.geometry.dispose(),this.animationGroup=void 0,this.mixer=void 0,this.morph=void 0,this.clipAction=void 0,this.groupName=void 0},ZincObject.prototype.markerIsEnabled=function(options){return!!(\"on\"===this.markerMode||options&&options.displayMarkers&&\"inherited\"===this.markerMode)},ZincObject.prototype.updateMarker=function(playAnimation,options){if(!(!1==playAnimation&&this.markerIsEnabled(options)))this.marker&&this.marker.isEnabled()&&(this.marker.disable(),this.morph.remove(this.marker.morph)),this.markerUpdateRequired=!0;else if(this.groupName){if(this.marker||(this.marker=new(__webpack_require__(7).Marker)(this),this.markerUpdateRequired=!0),this.markerUpdateRequired){var position=this.getClosestVertex(!1);position&&(this.marker.setPosition(position.x,position.y,position.z),this.markerUpdateRequired=!1)}options&&options.camera&&options.markerDepths&&options.markerDepths.push(this.marker.updateNDC(options.camera.cameraObject)),this.marker.isEnabled()||(this.marker.enable(),this.morph.add(this.marker.morph))}},ZincObject.prototype.processMarkerVisual=function(min,max){this.marker&&this.marker.isEnabled()&&this.marker.updateVisual(min,max)},ZincObject.prototype.initiateMorphColor=function(){1==this.morphColour&&\"undefined\"!=typeof this.geometry&&(this.morph.material.vertexColors==THREE.VertexColors||!0==this.morph.material.vertexColors)&&updateMorphColorAttribute(this.geometry,this.morph)},ZincObject.prototype.setRenderOrder=function(renderOrder){this.morph&&renderOrder!==void 0&&(this.morph.renderOrder=renderOrder,this.secondaryMesh&&(this.secondaryMesh.renderOrder=this.morph.renderOrder+1))},ZincObject.prototype.getClosestVertexDOMElementCoords=function(scene){if(scene&&scene.camera){var inView=!0,position=this.getClosestVertex(!0);return position.project(scene.camera),position.z=Math.min(Math.max(position.z,0),1),(1<position.x||-1>position.x||1<position.y||-1>position.y)&&(inView=!1),scene.getZincCameraControls().getRelativeCoordsFromNDC(position.x,position.y,position),{position,inView}}},ZincObject.prototype.setMarkerMode=function(mode){mode!==this.markerMode&&(this.markerMode=\"on\"===mode||\"off\"===mode?mode:\"inherited\",this.region&&(this.region.pickableUpdateRequired=!0))},ZincObject.prototype.render=function(delta,playAnimation,options){if(!0==playAnimation){if(this.clipAction&&this.isTimeVarying())this.mixer.update(delta);else{var targetTime=this.inbuildTime+delta;targetTime>this.duration&&(targetTime-=this.duration),this.inbuildTime=targetTime}0!=delta&&(this.boundingBoxUpdateRequired=!0,1==this.morphColour&&\"undefined\"!=typeof this.geometry&&(this.morph.material.vertexColors==THREE.VertexColors||!0==this.morph.material.vertexColors)&&updateMorphColorAttribute(this.geometry,this.morph))}this.updateMarker(playAnimation,options)},exports.ZincObject=ZincObject;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Face3\", function() { return Face3; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Geometry\", function() { return Geometry; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar _m1=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],_obj=new three__WEBPACK_IMPORTED_MODULE_0__[\"Object3D\"],_offset=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];function Geometry(){// update flags\nthis.uuid=three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].generateUUID(),this.name=\"\",this.type=\"Geometry\",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.normals=[],this.uvs=[],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1,this.morphNormalsReady=!1}Geometry.prototype=Object.assign(Object.create(three__WEBPACK_IMPORTED_MODULE_0__[\"EventDispatcher\"].prototype),{constructor:Geometry,isGeometry:!0,applyMatrix4:function applyMatrix4(matrix){for(var vertex,normalMatrix=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix3\"]().getNormalMatrix(matrix),i=0,il=this.vertices.length;i<il;i++)vertex=this.vertices[i],vertex.applyMatrix4(matrix);for(var face,_i=0,_il=this.faces.length;_i<_il;_i++){face=this.faces[_i],face.normal.applyMatrix3(normalMatrix).normalize();for(var j=0,jl=face.vertexNormals.length;j<jl;j++)face.vertexNormals[j].applyMatrix3(normalMatrix).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function rotateX(angle){return _m1.makeRotationX(angle),this.applyMatrix4(_m1),this},rotateY:function rotateY(angle){return _m1.makeRotationY(angle),this.applyMatrix4(_m1),this},rotateZ:function rotateZ(angle){return _m1.makeRotationZ(angle),this.applyMatrix4(_m1),this},translate:function translate(x,y,z){return _m1.makeTranslation(x,y,z),this.applyMatrix4(_m1),this},scale:function scale(x,y,z){return _m1.makeScale(x,y,z),this.applyMatrix4(_m1),this},lookAt:function lookAt(vector){return _obj.lookAt(vector),_obj.updateMatrix(),this.applyMatrix4(_obj.matrix),this},fromBufferGeometry:function fromBufferGeometry(geometry){function addFace(a,b,c,materialIndex){var vertexColors=void 0===color?[]:[scope.colors[a].clone(),scope.colors[b].clone(),scope.colors[c].clone()],vertexNormals=void 0===normal?[]:[new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(normal,a),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(normal,b),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(normal,c)],face=new Face3(a,b,c,vertexNormals,vertexColors,materialIndex);scope.faces.push(face),void 0!==uv&&scope.faceVertexUvs[0].push([new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv,a),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv,b),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv,c)]),void 0!==uv2&&scope.faceVertexUvs[1].push([new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv2,a),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv2,b),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv2,c)])}var scope=this,index=null===geometry.index?void 0:geometry.index,attributes=geometry.attributes;if(void 0===attributes.position)return console.error(\"THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion.\"),this;var position=attributes.position,normal=attributes.normal,color=attributes.color,uv=attributes.uv,uv2=attributes.uv2;void 0!==uv2&&(this.faceVertexUvs[1]=[]);for(var i=0;i<position.count;i++)scope.vertices.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(position,i)),void 0!==color&&scope.colors.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"]().fromBufferAttribute(color,i));var groups=geometry.groups;if(0<groups.length)for(var _i2=0;_i2<groups.length;_i2++)for(var group=groups[_i2],start=group.start,count=group.count,j=start;j<start+count;j+=3)void 0===index?addFace(j,j+1,j+2,group.materialIndex):addFace(index.getX(j),index.getX(j+1),index.getX(j+2),group.materialIndex);else if(void 0!==index)for(var _i3=0;_i3<index.count;_i3+=3)addFace(index.getX(_i3),index.getX(_i3+1),index.getX(_i3+2));else for(var _i4=0;_i4<position.count;_i4+=3)addFace(_i4,_i4+1,_i4+2);return this.computeFaceNormals(),null!==geometry.boundingBox&&(this.boundingBox=geometry.boundingBox.clone()),null!==geometry.boundingSphere&&(this.boundingSphere=geometry.boundingSphere.clone()),this},center:function center(){return this.computeBoundingBox(),this.boundingBox.getCenter(_offset).negate(),this.translate(_offset.x,_offset.y,_offset.z),this},normalize:function normalize(){this.computeBoundingSphere();var center=this.boundingSphere.center,radius=this.boundingSphere.radius,s=0===radius?1:1/radius,matrix=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"];return matrix.set(s,0,0,-s*center.x,0,s,0,-s*center.y,0,0,s,-s*center.z,0,0,0,1),this.applyMatrix4(matrix),this},computeFaceNormals:function computeFaceNormals(){for(var cb=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],ab=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],f=0,fl=this.faces.length;f<fl;f++){var face=this.faces[f],vA=this.vertices[face.a],vB=this.vertices[face.b],vC=this.vertices[face.c];cb.subVectors(vC,vB),ab.subVectors(vA,vB),cb.cross(ab),cb.normalize(),face.normal.copy(cb)}},computeVertexNormals:function computeVertexNormals(){for(var areaWeighted=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],vertices=Array(this.vertices.length),v=0,vl=this.vertices.length;v<vl;v++)vertices[v]=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];if(areaWeighted)// vertex normals weighted by triangle areas\n// http://www.iquilezles.org/www/articles/normals/normals.htm\nfor(var cb=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],ab=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],f=0,fl=this.faces.length;f<fl;f++){var face=this.faces[f],vA=this.vertices[face.a],vB=this.vertices[face.b],vC=this.vertices[face.c];cb.subVectors(vC,vB),ab.subVectors(vA,vB),cb.cross(ab),vertices[face.a].add(cb),vertices[face.b].add(cb),vertices[face.c].add(cb)}else{this.computeFaceNormals();for(var _face,_f=0,_fl=this.faces.length;_f<_fl;_f++)_face=this.faces[_f],vertices[_face.a].add(_face.normal),vertices[_face.b].add(_face.normal),vertices[_face.c].add(_face.normal)}for(var _v=0,_vl=this.vertices.length;_v<_vl;_v++)vertices[_v].normalize();for(var _f2=0,_fl2=this.faces.length;_f2<_fl2;_f2++){var _face2=this.faces[_f2],vertexNormals=_face2.vertexNormals;3===vertexNormals.length?(vertexNormals[0].copy(vertices[_face2.a]),vertexNormals[1].copy(vertices[_face2.b]),vertexNormals[2].copy(vertices[_face2.c])):(vertexNormals[0]=vertices[_face2.a].clone(),vertexNormals[1]=vertices[_face2.b].clone(),vertexNormals[2]=vertices[_face2.c].clone())}return 0<this.faces.length&&(this.normalsNeedUpdate=!0),vertices},computeFlatVertexNormals:function computeFlatVertexNormals(){this.computeFaceNormals();for(var f=0,fl=this.faces.length;f<fl;f++){var face=this.faces[f],vertexNormals=face.vertexNormals;3===vertexNormals.length?(vertexNormals[0].copy(face.normal),vertexNormals[1].copy(face.normal),vertexNormals[2].copy(face.normal)):(vertexNormals[0]=face.normal.clone(),vertexNormals[1]=face.normal.clone(),vertexNormals[2]=face.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function computeMorphNormals(){// save original normals\n// - create temp variables on first access\n// otherwise just copy (for faster repeated calls)\nfor(var face,f=0,fl=this.faces.length;f<fl;f++){face=this.faces[f],face.__originalFaceNormal?face.__originalFaceNormal.copy(face.normal):face.__originalFaceNormal=face.normal.clone(),face.__originalVertexNormals||(face.__originalVertexNormals=[]);for(var i=0,il=face.vertexNormals.length;i<il;i++)face.__originalVertexNormals[i]?face.__originalVertexNormals[i].copy(face.vertexNormals[i]):face.__originalVertexNormals[i]=face.vertexNormals[i].clone()}// use temp geometry to compute face and vertex normals for each morph\nvar tmpGeo=new Geometry;tmpGeo.faces=this.faces;for(var _i5=0,_il2=this.morphTargets.length;_i5<_il2;_i5++){// create on first access\nif(!this.morphNormals[_i5]){this.morphNormals[_i5]={},this.morphNormals[_i5].faceNormals=[],this.morphNormals[_i5].vertexNormals=[];for(var dstNormalsFace=this.morphNormals[_i5].faceNormals,dstNormalsVertex=this.morphNormals[_i5].vertexNormals,_f3=0,_fl3=this.faces.length;_f3<_fl3;_f3++){var faceNormal=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_vertexNormals={a:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],b:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],c:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]};dstNormalsFace.push(faceNormal),dstNormalsVertex.push(_vertexNormals)}}var morphNormals=this.morphNormals[_i5];// set vertices to morph target\ntmpGeo.vertices=this.morphTargets[_i5].vertices,tmpGeo.computeFaceNormals();var vertexNormals=tmpGeo.computeVertexNormals();if(vertexNormals&&0<vertexNormals.length){this.morphTargets[_i5].normals=Array(this.vertices.length);for(var v=0;v<vertexNormals.length;v++)this.morphTargets[_i5].normals[v]=vertexNormals[v].clone()}// store morph normals\nfor(var _f4=0,_fl4=this.faces.length;_f4<_fl4;_f4++){var _face3=this.faces[_f4],_faceNormal=morphNormals.faceNormals[_f4],_vertexNormals2=morphNormals.vertexNormals[_f4];_faceNormal.copy(_face3.normal),_vertexNormals2.a.copy(_face3.vertexNormals[0]),_vertexNormals2.b.copy(_face3.vertexNormals[1]),_vertexNormals2.c.copy(_face3.vertexNormals[2])}}// restore original normals\nfor(var _face4,_f5=0,_fl5=this.faces.length;_f5<_fl5;_f5++)_face4=this.faces[_f5],_face4.normal=_face4.__originalFaceNormal,_face4.vertexNormals=_face4.__originalVertexNormals;this.morphNormalsReady=!0},computeBoundingBox:function computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new three__WEBPACK_IMPORTED_MODULE_0__[\"Box3\"]),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new three__WEBPACK_IMPORTED_MODULE_0__[\"Sphere\"]),this.boundingSphere.setFromPoints(this.vertices)},merge:function merge(geometry,matrix){var materialIndexOffset=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(!(geometry&&geometry.isGeometry))return void console.error(\"THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.\",geometry);var normalMatrix,vertexOffset=this.vertices.length,vertices1=this.vertices,vertices2=geometry.vertices,faces1=this.faces,faces2=geometry.faces,colors1=this.colors,colors2=geometry.colors;matrix!==void 0&&(normalMatrix=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix3\"]().getNormalMatrix(matrix));// vertices\nfor(var i=0,il=vertices2.length;i<il;i++){var vertex=vertices2[i],vertexCopy=vertex.clone();matrix!==void 0&&vertexCopy.applyMatrix4(matrix),vertices1.push(vertexCopy)}// colors\nfor(var _i6=0,_il3=colors2.length;_i6<_il3;_i6++)colors1.push(colors2[_i6].clone());// faces\nfor(var _i7=0,_il4=faces2.length;_i7<_il4;_i7++){var face=faces2[_i7],normal=void 0,color=void 0,faceVertexNormals=face.vertexNormals,faceVertexColors=face.vertexColors,faceCopy=new Face3(face.a+vertexOffset,face.b+vertexOffset,face.c+vertexOffset);faceCopy.normal.copy(face.normal),normalMatrix!==void 0&&faceCopy.normal.applyMatrix3(normalMatrix).normalize();for(var j=0,jl=faceVertexNormals.length;j<jl;j++)normal=faceVertexNormals[j].clone(),void 0!==normalMatrix&&normal.applyMatrix3(normalMatrix).normalize(),faceCopy.vertexNormals.push(normal);faceCopy.color.copy(face.color);for(var _j=0,_jl=faceVertexColors.length;_j<_jl;_j++)color=faceVertexColors[_j],faceCopy.vertexColors.push(color.clone());faceCopy.materialIndex=face.materialIndex+materialIndexOffset,faces1.push(faceCopy)}// uvs\nfor(var faceVertexUvs2,_i8=0,_il5=geometry.faceVertexUvs.length;_i8<_il5;_i8++){faceVertexUvs2=geometry.faceVertexUvs[_i8],this.faceVertexUvs[_i8]===void 0&&(this.faceVertexUvs[_i8]=[]);for(var _j2=0,_jl2=faceVertexUvs2.length;_j2<_jl2;_j2++){for(var uvs2=faceVertexUvs2[_j2],uvsCopy=[],k=0,kl=uvs2.length;k<kl;k++)uvsCopy.push(uvs2[k].clone());this.faceVertexUvs[_i8].push(uvsCopy)}}},mergeMesh:function mergeMesh(mesh){return mesh&&mesh.isMesh?void(mesh.matrixAutoUpdate&&mesh.updateMatrix(),this.merge(mesh.geometry,mesh.matrix)):void console.error(\"THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.\",mesh)},/*\n\t * Checks for duplicate vertices with hashmap.\n\t * Duplicated vertices are removed\n\t * and faces' vertices are updated.\n\t */mergeVertices:function mergeVertices(){for(var precisionPoints=0<arguments.length&&void 0!==arguments[0]?arguments[0]:4,verticesMap={},unique=[],changes=[],precision=Math.pow(10,precisionPoints),i=0,il=this.vertices.length;i<il;i++){var v=this.vertices[i],key=Math.round(v.x*precision)+\"_\"+Math.round(v.y*precision)+\"_\"+Math.round(v.z*precision);void 0===verticesMap[key]?(verticesMap[key]=i,unique.push(this.vertices[i]),changes[i]=unique.length-1):changes[i]=changes[verticesMap[key]]}// if faces are completely degenerate after merging vertices, we\n// have to remove them from the geometry.\nfor(var face,faceIndicesToRemove=[],_i9=0,_il6=this.faces.length;_i9<_il6;_i9++){face=this.faces[_i9],face.a=changes[face.a],face.b=changes[face.b],face.c=changes[face.c];// if any duplicate vertices are found in a Face3\n// we have to remove the face as nothing can be saved\nfor(var indices=[face.a,face.b,face.c],n=0;3>n;n++)if(indices[n]===indices[(n+1)%3]){faceIndicesToRemove.push(_i9);break}}for(var idx,_i10=faceIndicesToRemove.length-1;0<=_i10;_i10--){idx=faceIndicesToRemove[_i10],this.faces.splice(idx,1);for(var j=0,jl=this.faceVertexUvs.length;j<jl;j++)this.faceVertexUvs[j].splice(idx,1)}// Use unique set of vertices\nvar diff=this.vertices.length-unique.length;return this.vertices=unique,diff},setFromPoints:function setFromPoints(points){this.vertices=[];for(var point,i=0,l=points.length;i<l;i++)point=points[i],this.vertices.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"](point.x,point.y,point.z||0));return this},sortFacesByMaterialIndex:function sortFacesByMaterialIndex(){// sort faces\n// tag faces\nfor(var faces=this.faces,length=faces.length,i=0;i<length;i++)faces[i]._id=i;faces.sort(function(a,b){return a.materialIndex-b.materialIndex});// sort uvs\nvar newUvs1,newUvs2,uvs1=this.faceVertexUvs[0],uvs2=this.faceVertexUvs[1];uvs1&&uvs1.length===length&&(newUvs1=[]),uvs2&&uvs2.length===length&&(newUvs2=[]);for(var id,_i11=0;_i11<length;_i11++)id=faces[_i11]._id,newUvs1&&newUvs1.push(uvs1[id]),newUvs2&&newUvs2.push(uvs2[id]);newUvs1&&(this.faceVertexUvs[0]=newUvs1),newUvs2&&(this.faceVertexUvs[1]=newUvs2)},toJSON:function toJSON(){function setBit(value,position,enabled){return enabled?value|1<<position:value&~(1<<position)}function getNormalIndex(normal){var hash=normal.x.toString()+normal.y.toString()+normal.z.toString();return void 0===normalsHash[hash]?(normalsHash[hash]=normals.length/3,normals.push(normal.x,normal.y,normal.z),normalsHash[hash]):normalsHash[hash]}function getColorIndex(color){var hash=color.r.toString()+color.g.toString()+color.b.toString();return void 0===colorsHash[hash]?(colorsHash[hash]=colors.length,colors.push(color.getHex()),colorsHash[hash]):colorsHash[hash]}function getUvIndex(uv){var hash=uv.x.toString()+uv.y.toString();return void 0===uvsHash[hash]?(uvsHash[hash]=uvs.length/2,uvs.push(uv.x,uv.y),uvsHash[hash]):uvsHash[hash]}var data={metadata:{version:4.5,type:\"Geometry\",generator:\"Geometry.toJSON\"}};// standard Geometry serialization\nif(data.uuid=this.uuid,data.type=this.type,\"\"!==this.name&&(data.name=this.name),void 0!==this.parameters){var parameters=this.parameters;for(var key in parameters)void 0!==parameters[key]&&(data[key]=parameters[key]);return data}for(var vertex,vertices=[],i=0;i<this.vertices.length;i++)vertex=this.vertices[i],vertices.push(vertex.x,vertex.y,vertex.z);for(var faces=[],normals=[],normalsHash={},colors=[],colorsHash={},uvs=[],uvsHash={},_i12=0;_i12<this.faces.length;_i12++){var face=this.faces[_i12],hasFaceVertexUv=void 0!==this.faceVertexUvs[0][_i12],hasFaceNormal=0<face.normal.length(),hasFaceVertexNormal=0<face.vertexNormals.length,hasFaceColor=1!==face.color.r||1!==face.color.g||1!==face.color.b,hasFaceVertexColor=0<face.vertexColors.length,faceType=0;if(faceType=setBit(faceType,0,0),faceType=setBit(faceType,1,!0),faceType=setBit(faceType,2,!1),faceType=setBit(faceType,3,hasFaceVertexUv),faceType=setBit(faceType,4,hasFaceNormal),faceType=setBit(faceType,5,hasFaceVertexNormal),faceType=setBit(faceType,6,hasFaceColor),faceType=setBit(faceType,7,hasFaceVertexColor),faces.push(faceType),faces.push(face.a,face.b,face.c),faces.push(face.materialIndex),hasFaceVertexUv){var faceVertexUvs=this.faceVertexUvs[0][_i12];faces.push(getUvIndex(faceVertexUvs[0]),getUvIndex(faceVertexUvs[1]),getUvIndex(faceVertexUvs[2]))}if(hasFaceNormal&&faces.push(getNormalIndex(face.normal)),hasFaceVertexNormal){var vertexNormals=face.vertexNormals;faces.push(getNormalIndex(vertexNormals[0]),getNormalIndex(vertexNormals[1]),getNormalIndex(vertexNormals[2]))}if(hasFaceColor&&faces.push(getColorIndex(face.color)),hasFaceVertexColor){var vertexColors=face.vertexColors;faces.push(getColorIndex(vertexColors[0]),getColorIndex(vertexColors[1]),getColorIndex(vertexColors[2]))}}return data.data={},data.data.vertices=vertices,data.data.normals=normals,0<colors.length&&(data.data.colors=colors),0<uvs.length&&(data.data.uvs=[uvs]),data.data.faces=faces,data},clone:function clone(){/*\n\t\t // Handle primitives\n\n\t\t const parameters = this.parameters;\n\n\t\t if ( parameters !== undefined ) {\n\n\t\t const values = [];\n\n\t\t for ( const key in parameters ) {\n\n\t\t values.push( parameters[ key ] );\n\n\t\t }\n\n\t\t const geometry = Object.create( this.constructor.prototype );\n\t\t this.constructor.apply( geometry, values );\n\t\t return geometry;\n\n\t\t }\n\n\t\t return new this.constructor().copy( this );\n\t\t */return new Geometry().copy(this)},copy:function copy(source){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=source.name;for(var vertices=source.vertices,i=0,il=vertices.length;i<il;i++)this.vertices.push(vertices[i].clone());// colors\nfor(var colors=source.colors,_i13=0,_il7=colors.length;_i13<_il7;_i13++)this.colors.push(colors[_i13].clone());// faces\nfor(var faces=source.faces,_i14=0,_il8=faces.length;_i14<_il8;_i14++)this.faces.push(faces[_i14].clone());// face vertex uvs\nfor(var faceVertexUvs,_i15=0,_il9=source.faceVertexUvs.length;_i15<_il9;_i15++){faceVertexUvs=source.faceVertexUvs[_i15],void 0===this.faceVertexUvs[_i15]&&(this.faceVertexUvs[_i15]=[]);for(var j=0,jl=faceVertexUvs.length;j<jl;j++){for(var uv,uvs=faceVertexUvs[j],uvsCopy=[],k=0,kl=uvs.length;k<kl;k++)uv=uvs[k],uvsCopy.push(uv.clone());this.faceVertexUvs[_i15].push(uvsCopy)}}// morph targets\nfor(var morphTarget,morphTargets=source.morphTargets,_i16=0,_il10=morphTargets.length;_i16<_il10;_i16++){// vertices\nif(morphTarget={},morphTarget.name=morphTargets[_i16].name,void 0!==morphTargets[_i16].vertices){morphTarget.vertices=[];for(var _j3=0,_jl3=morphTargets[_i16].vertices.length;_j3<_jl3;_j3++)morphTarget.vertices.push(morphTargets[_i16].vertices[_j3].clone())}// normals\nif(void 0!==morphTargets[_i16].normals){morphTarget.normals=[];for(var _j4=0,_jl4=morphTargets[_i16].normals.length;_j4<_jl4;_j4++)morphTarget.normals.push(morphTargets[_i16].normals[_j4].clone())}this.morphTargets.push(morphTarget)}// morph normals\nfor(var morphNormal,morphNormals=source.morphNormals,_i17=0,_il11=morphNormals.length;_i17<_il11;_i17++){// vertex normals\nif(morphNormal={},void 0!==morphNormals[_i17].vertexNormals){morphNormal.vertexNormals=[];for(var _j5=0,_jl5=morphNormals[_i17].vertexNormals.length;_j5<_jl5;_j5++){var srcVertexNormal=morphNormals[_i17].vertexNormals[_j5],destVertexNormal={};destVertexNormal.a=srcVertexNormal.a.clone(),destVertexNormal.b=srcVertexNormal.b.clone(),destVertexNormal.c=srcVertexNormal.c.clone(),morphNormal.vertexNormals.push(destVertexNormal)}}// face normals\nif(void 0!==morphNormals[_i17].faceNormals){morphNormal.faceNormals=[];for(var _j6=0,_jl6=morphNormals[_i17].faceNormals.length;_j6<_jl6;_j6++)morphNormal.faceNormals.push(morphNormals[_i17].faceNormals[_j6].clone())}this.morphNormals.push(morphNormal)}// skin weights\nfor(var skinWeights=source.skinWeights,_i18=0,_il12=skinWeights.length;_i18<_il12;_i18++)this.skinWeights.push(skinWeights[_i18].clone());// skin indices\nfor(var skinIndices=source.skinIndices,_i19=0,_il13=skinIndices.length;_i19<_il13;_i19++)this.skinIndices.push(skinIndices[_i19].clone());// line distances\nfor(var lineDistances=source.lineDistances,_i20=0,_il14=lineDistances.length;_i20<_il14;_i20++)this.lineDistances.push(lineDistances[_i20]);// bounding box\nvar boundingBox=source.boundingBox;null!==boundingBox&&(this.boundingBox=boundingBox.clone());// bounding sphere\nvar boundingSphere=source.boundingSphere;return null!==boundingSphere&&(this.boundingSphere=boundingSphere.clone()),this.elementsNeedUpdate=source.elementsNeedUpdate,this.verticesNeedUpdate=source.verticesNeedUpdate,this.uvsNeedUpdate=source.uvsNeedUpdate,this.normalsNeedUpdate=source.normalsNeedUpdate,this.colorsNeedUpdate=source.colorsNeedUpdate,this.lineDistancesNeedUpdate=source.lineDistancesNeedUpdate,this.groupsNeedUpdate=source.groupsNeedUpdate,this},computeGroups(){var group,i,groups=[],materialIndex=void 0,faces=this.faces;for(i=0;i<faces.length;i++){var face=faces[i];// materials\nface.materialIndex!==materialIndex&&(materialIndex=face.materialIndex,void 0!==group&&(group.count=3*i-group.start,groups.push(group)),group={start:3*i,materialIndex:materialIndex})}return void 0!==group&&(group.count=3*i-group.start,groups.push(group)),groups},toBufferGeometry:function toBufferGeometry(){var geometry=new DirectGeometry().fromGeometry(this),buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],positions=new Float32Array(3*geometry.vertices.length);if(buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](positions,3).copyVector3sArray(geometry.vertices)),0<geometry.normals.length){var normals=new Float32Array(3*geometry.normals.length);buffergeometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](normals,3).copyVector3sArray(geometry.normals))}if(0<geometry.colors.length){var colors=new Float32Array(3*geometry.colors.length);buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colors,3).copyColorsArray(geometry.colors))}if(0<geometry.uvs.length){var uvs=new Float32Array(2*geometry.uvs.length);buffergeometry.setAttribute(\"uv\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs,2).copyVector2sArray(geometry.uvs))}if(0<geometry.uvs2.length){var uvs2=new Float32Array(2*geometry.uvs2.length);buffergeometry.setAttribute(\"uv2\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs2,2).copyVector2sArray(geometry.uvs2))}// groups\n// morphs\nfor(var name in buffergeometry.groups=geometry.groups,geometry.morphTargets){for(var array=[],morphTargets=geometry.morphTargets[name],i=0,l=morphTargets.length;i<l;i++){var morphTarget=morphTargets[i],attribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*morphTarget.data.length,3);attribute.name=morphTarget.name,array.push(attribute.copyVector3sArray(morphTarget.data))}buffergeometry.morphAttributes[name]=array}// skinning\nif(0<geometry.skinIndices.length){var skinIndices=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*geometry.skinIndices.length,4);buffergeometry.setAttribute(\"skinIndex\",skinIndices.copyVector4sArray(geometry.skinIndices))}if(0<geometry.skinWeights.length){var skinWeights=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*geometry.skinWeights.length,4);buffergeometry.setAttribute(\"skinWeight\",skinWeights.copyVector4sArray(geometry.skinWeights))}//\nreturn null!==geometry.boundingSphere&&(buffergeometry.boundingSphere=geometry.boundingSphere.clone()),null!==geometry.boundingBox&&(buffergeometry.boundingBox=geometry.boundingBox.clone()),buffergeometry},toIndexedBufferGeometry:function toIndexedBufferGeometry(){//const geometry = new DirectGeometry().fromGeometry( this );\nvar buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],positions=new Float32Array(3*this.vertices.length);if(buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](positions,3).copyVector3sArray(this.vertices)),0<this.normals.length){var normals=new Float32Array(this.normals.length),buffer=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](normals,3).copyArray(this.normals);buffergeometry.setAttribute(\"normal\",buffer)}if(0<this.uvs.length&&0<this.uvs[0].length){var uvs=new Float32Array(2*this.uvs[0].length);buffergeometry.setAttribute(\"uv\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs,2).copyArray(this.uvs[0]))}if(1<this.uvs.length&&0<this.uvs[1].length){var uvs2=new Float32Array(2*this.uvs[1].length);buffergeometry.setAttribute(\"uv2\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs2,2).copyArray(this.uvs[1]))}if(0<this.colors.length){for(var colorArray=[],i=0;i<this.colors.length;i++)colorArray.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"](this.colors[i]));var colors=new Float32Array(3*colorArray.length);buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colors,3).copyColorsArray(colorArray))}else{for(var colorsArray=new Float32Array(3*this.vertices.length),_i21=0;_i21<3*this.vertices.length;_i21++)colorsArray[_i21]=1;buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colorsArray,3))}if(0<this.faces.length){for(var _colors=[],indices=[],_i22=0;_i22<this.faces.length;_i22++){indices.push(this.faces[_i22].a,this.faces[_i22].b,this.faces[_i22].c);var vertexColors=this.faces[_i22].vertexColors;if(3===vertexColors.length)_colors.push(vertexColors[0],vertexColors[1],vertexColors[2]);else{var color=this.faces[_i22].color;_colors.push(color,color,color)}}// if ( colors.length > 0 ) {\n// const colorsArray = new Float32Array( colors.length * 3 );\n// buffergeometry.setAttribute( 'color', new BufferAttribute( colorsArray, 3 ).copyColorsArray( colors ) );\n// }\nbuffergeometry.setIndex(indices),buffergeometry.groups=this.computeGroups()}// morphs\nif(0<this.morphTargets.length){for(var array=[],normalsArray=[],_i23=0,l=this.morphTargets.length;_i23<l;_i23++){var morphTarget=this.morphTargets[_i23],attribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*morphTarget.vertices.length,3);if(attribute.name=morphTarget.name,array.push(attribute.copyVector3sArray(morphTarget.vertices)),morphTarget.normals){var _attribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*morphTarget.normals.length,3);_attribute.name=morphTarget.name,normalsArray.push(_attribute.copyVector3sArray(morphTarget.normals))}}buffergeometry.morphAttributes.position=array,buffergeometry.morphAttributes.normal=normalsArray}// skinning\nif(0<this.skinIndices.length){var skinIndices=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*this.skinIndices.length,4);buffergeometry.setAttribute(\"skinIndex\",skinIndices.copyVector4sArray(this.skinIndices))}if(0<this.skinWeights.length){var skinWeights=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*this.skinWeights.length,4);buffergeometry.setAttribute(\"skinWeight\",skinWeights.copyVector4sArray(this.skinWeights))}//\nreturn null!==this.boundingSphere&&(buffergeometry.boundingSphere=this.boundingSphere.clone()),null!==this.boundingBox&&(buffergeometry.boundingBox=this.boundingBox.clone()),buffergeometry},computeTangents:function computeTangents(){console.error(\"THREE.Geometry: .computeTangents() has been removed.\")},computeLineDistances:function computeLineDistances(){console.error(\"THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.\")},applyMatrix:function applyMatrix(matrix){return console.warn(\"THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().\"),this.applyMatrix4(matrix)},dispose:function dispose(){this.dispatchEvent({type:\"dispose\"})}}),Geometry.createBufferGeometryFromObject=function(object){var buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],geometry=object.geometry;if(object.isPoints||object.isLine){var positions=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*geometry.vertices.length,3),colors=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*geometry.colors.length,3);if(buffergeometry.setAttribute(\"position\",positions.copyVector3sArray(geometry.vertices)),buffergeometry.setAttribute(\"color\",colors.copyColorsArray(geometry.colors)),geometry.lineDistances&&geometry.lineDistances.length===geometry.vertices.length){var lineDistances=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.lineDistances.length,1);buffergeometry.setAttribute(\"lineDistance\",lineDistances.copyArray(geometry.lineDistances))}null!==geometry.boundingSphere&&(buffergeometry.boundingSphere=geometry.boundingSphere.clone()),null!==geometry.boundingBox&&(buffergeometry.boundingBox=geometry.boundingBox.clone())}else object.isMesh&&(buffergeometry=geometry.toBufferGeometry());return buffergeometry};class DirectGeometry{constructor(){// this.lineDistances = [];\n// update flags\nthis.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(geometry){var group,i,groups=[],materialIndex=void 0,faces=geometry.faces;for(i=0;i<faces.length;i++){var face=faces[i];// materials\nface.materialIndex!==materialIndex&&(materialIndex=face.materialIndex,group!==void 0&&(group.count=3*i-group.start,groups.push(group)),group={start:3*i,materialIndex:materialIndex})}group!==void 0&&(group.count=3*i-group.start,groups.push(group)),this.groups=groups}fromGeometry(geometry){var morphTargetsPosition,faces=geometry.faces,vertices=geometry.vertices,faceVertexUvs=geometry.faceVertexUvs,hasFaceVertexUv=faceVertexUvs[0]&&0<faceVertexUvs[0].length,hasFaceVertexUv2=faceVertexUvs[1]&&0<faceVertexUvs[1].length,morphTargets=geometry.morphTargets,morphTargetsLength=morphTargets.length;if(0<morphTargetsLength){morphTargetsPosition=[];for(var i=0;i<morphTargetsLength;i++)morphTargetsPosition[i]={name:morphTargets[i].name,data:[]};this.morphTargets.position=morphTargetsPosition}var morphTargetsNormal,morphNormals=geometry.morphNormals,morphNormalsLength=morphNormals.length;if(0<morphNormalsLength){morphTargetsNormal=[];for(var _i24=0;_i24<morphNormalsLength;_i24++)morphTargetsNormal[_i24]={name:morphNormals[_i24].name,data:[]};this.morphTargets.normal=morphTargetsNormal}// skins\nvar skinIndices=geometry.skinIndices,skinWeights=geometry.skinWeights,hasSkinIndices=skinIndices.length===vertices.length,hasSkinWeights=skinWeights.length===vertices.length;0<vertices.length&&0===faces.length&&console.error(\"THREE.DirectGeometry: Faceless geometries are not supported.\");for(var face,_i25=0;_i25<faces.length;_i25++){face=faces[_i25],this.vertices.push(vertices[face.a],vertices[face.b],vertices[face.c]);var vertexNormals=face.vertexNormals;if(3===vertexNormals.length)this.normals.push(vertexNormals[0],vertexNormals[1],vertexNormals[2]);else{var normal=face.normal;this.normals.push(normal,normal,normal)}var vertexColors=face.vertexColors;if(3===vertexColors.length)this.colors.push(vertexColors[0],vertexColors[1],vertexColors[2]);else{var color=face.color;this.colors.push(color,color,color)}if(!0===hasFaceVertexUv){var vertexUvs=faceVertexUvs[0][_i25];void 0===vertexUvs?(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv \",_i25),this.uvs.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"])):this.uvs.push(vertexUvs[0],vertexUvs[1],vertexUvs[2])}if(!0===hasFaceVertexUv2){var _vertexUvs=faceVertexUvs[1][_i25];void 0===_vertexUvs?(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 \",_i25),this.uvs2.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"])):this.uvs2.push(_vertexUvs[0],_vertexUvs[1],_vertexUvs[2])}// morphs\nfor(var morphTarget,j=0;j<morphTargetsLength;j++)morphTarget=morphTargets[j].vertices,morphTargetsPosition[j].data.push(morphTarget[face.a],morphTarget[face.b],morphTarget[face.c]);for(var morphNormal,_j7=0;_j7<morphNormalsLength;_j7++)morphNormal=morphNormals[_j7].vertexNormals[_i25],morphTargetsNormal[_j7].data.push(morphNormal.a,morphNormal.b,morphNormal.c);// skins\nhasSkinIndices&&this.skinIndices.push(skinIndices[face.a],skinIndices[face.b],skinIndices[face.c]),hasSkinWeights&&this.skinWeights.push(skinWeights[face.a],skinWeights[face.b],skinWeights[face.c])}return this.computeGroups(geometry),this.verticesNeedUpdate=geometry.verticesNeedUpdate,this.normalsNeedUpdate=geometry.normalsNeedUpdate,this.colorsNeedUpdate=geometry.colorsNeedUpdate,this.uvsNeedUpdate=geometry.uvsNeedUpdate,this.groupsNeedUpdate=geometry.groupsNeedUpdate,null!==geometry.boundingSphere&&(this.boundingSphere=geometry.boundingSphere.clone()),null!==geometry.boundingBox&&(this.boundingBox=geometry.boundingBox.clone()),this}}class Face3{constructor(a,b,c,normal,color){var materialIndex=5<arguments.length&&arguments[5]!==void 0?arguments[5]:0;this.a=a,this.b=b,this.c=c,this.normal=normal&&normal.isVector3?normal:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],this.vertexNormals=Array.isArray(normal)?normal:[],this.color=color&&color.isColor?color:new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"],this.vertexColors=Array.isArray(color)?color:[],this.materialIndex=materialIndex}clone(){return new this.constructor().copy(this)}copy(source){this.a=source.a,this.b=source.b,this.c=source.c,this.normal.copy(source.normal),this.color.copy(source.color),this.materialIndex=source.materialIndex;for(var i=0,il=source.vertexNormals.length;i<il;i++)this.vertexNormals[i]=source.vertexNormals[i].clone();for(var _i26=0,_il15=source.vertexColors.length;_i26<_il15;_i26++)this.vertexColors[_i26]=source.vertexColors[_i26].clone();return this}}\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _readOnlyError(name){throw new Error(\"\\\"\"+name+\"\\\" is read-only\")}var THREE=__webpack_require__(3);function resolveURL(url){var actualURL=url,prefix=__webpack_require__(0).modelPrefix;if(prefix){\"/\"!=prefix[prefix.length-1]&&(prefix=(_readOnlyError(\"prefix\"),prefix+\"/\"));var r=/^(?:[a-z]+:)?\\/\\//i;r.test(url)||(actualURL=prefix+url)}return actualURL}//Convenient function\nfunction loadExternalFile(url,data,callback,errorCallback){// Set up an asynchronous request\nvar request=new XMLHttpRequest;// Hook the event that gets called as the request progresses\nrequest.open(\"GET\",resolveURL(url),!0),request.onreadystatechange=()=>{4==request.readyState&&(200==request.status?callback(request.responseText,data):errorCallback(url))},request.send(null)}function loadExternalFiles(urls,callback,errorCallback){// Callback for a single file\nfunction partialCallback(text,urlIndex){result[urlIndex]=text,numComplete++,numComplete==numUrls&&callback(result)}for(var numUrls=urls.length,numComplete=0,result=[],i=0;i<numUrls;i++)loadExternalFile(urls[i],i,partialCallback,errorCallback)}//Get the colours at index\nexports.getColorsRGB=(colors,index)=>{var index_in_colors=Math.floor(index/3),remainder=index%3,hex_value=0;0==remainder?hex_value=colors[index_in_colors].r:1==remainder?hex_value=colors[index_in_colors].g:2==remainder&&(hex_value=colors[index_in_colors].b);var mycolor=new THREE.Color(hex_value);return[mycolor.r,mycolor.g,mycolor.b]},exports.copyMorphColorsToBufferGeometry=(geometry,bufferGeometry)=>{if(geometry&&geometry.morphColors&&0<geometry.morphColors.length){for(var array=[],morphColors=geometry.morphColors,getColorsRGB=__webpack_require__(6).getColorsRGB,i=0,l=morphColors.length;i<l;i++){for(var morphColor=morphColors[i],colorArray=[],j=0;j<geometry.faces.length;j++){var face=geometry.faces[j],color=getColorsRGB(morphColor.colors,face.a);colorArray.push(color[0],color[1],color[2]),color=getColorsRGB(morphColor.colors,face.b),colorArray.push(color[0],color[1],color[2]),color=getColorsRGB(morphColor.colors,face.c),colorArray.push(color[0],color[1],color[2])}var attribute=new THREE.Float32BufferAttribute(3*(3*geometry.faces.length),3);attribute.name=morphColor.name,array.push(attribute.copyArray(colorArray))}bufferGeometry.morphAttributes.color=array}},exports.copyMorphColorsToIndexedBufferGeometry=(geometry,bufferGeometry)=>{if(geometry&&geometry.morphColors&&0<geometry.morphColors.length){for(var array=[],morphColors=geometry.morphColors,getColorsRGB=__webpack_require__(6).getColorsRGB,i=0,l=morphColors.length;i<l;i++){for(var color,morphColor=morphColors[i],colorArray=[],j=0;j<3*morphColor.colors.length;j++)color=getColorsRGB(morphColor.colors,j),colorArray.push(color[0],color[1],color[2]);var attribute=new THREE.Float32BufferAttribute(colorArray,3);attribute.name=morphColor.name,array.push(attribute)}bufferGeometry.morphAttributes.color=array}},exports.mergeVertices=function(geometry){var tolerance=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e-4;tolerance=Math.max(tolerance,Number.EPSILON);// initialize the arrays\nfor(var name,hashToIndex={},indices=geometry.getIndex(),positions=geometry.getAttribute(\"position\"),vertexCount=indices?indices.count:positions.count,nextIndex=0,attributeNames=Object.keys(geometry.attributes),attrArrays={},morphAttrsArrays={},newIndices=[],getters=[\"getX\",\"getY\",\"getZ\",\"getW\"],i=0,l=attributeNames.length;i<l;i++){name=attributeNames[i],attrArrays[name]=[];var morphAttr=geometry.morphAttributes[name];morphAttr&&(morphAttrsArrays[name]=Array(morphAttr.length).fill().map(()=>[]))}// convert the error tolerance to an amount of decimal places to truncate to\nfor(var decimalShift=Math.log10(1/tolerance),shiftMultiplier=Math.pow(10,decimalShift),i=0;i<vertexCount;i++){for(var index=indices?indices.getX(i):i,hash=\"\",j=0,l=attributeNames.length;j<l;j++)for(var name=attributeNames[j],attribute=geometry.getAttribute(name),itemSize=attribute.itemSize,k=0;k<itemSize;k++)// double tilde truncates the decimal value\nhash+=\"\".concat(~~(attribute[getters[k]](index)*shiftMultiplier),\",\");// Add another reference to the vertex if it's already\n// used by another index\nif(hash in hashToIndex)newIndices.push(hashToIndex[hash]);else{// copy data to the new index in the attribute arrays\nfor(var j=0,l=attributeNames.length;j<l;j++)for(var getterFunc,name=attributeNames[j],attribute=geometry.getAttribute(name),morphAttr=geometry.morphAttributes[name],itemSize=attribute.itemSize,newarray=attrArrays[name],newMorphArrays=morphAttrsArrays[name],k=0;k<itemSize;k++)if(getterFunc=getters[k],newarray.push(attribute[getterFunc](index)),morphAttr)for(var m=0,ml=morphAttr.length;m<ml;m++)newMorphArrays[m].push(morphAttr[m][getterFunc](index));hashToIndex[hash]=nextIndex,newIndices.push(nextIndex),nextIndex++}}// Generate typed arrays from new attribute arrays and update\n// the attributeBuffers\nfor(var result=geometry.clone(),i=0,l=attributeNames.length;i<l;i++){var attribute,name=attributeNames[i],oldAttribute=geometry.getAttribute(name),buffer=new oldAttribute.array.constructor(attrArrays[name]);// Update the attribute arrays\nif(oldAttribute.isInterleavedBufferAttribute?attribute=new THREE.BufferAttribute(buffer,oldAttribute.itemSize,oldAttribute.itemSize):(attribute=geometry.getAttribute(name).clone(),attribute.setArray(buffer)),result.setAttribute(name,attribute),name in morphAttrsArrays)for(var morphAttribute,j=0;j<morphAttrsArrays[name].length;j++)morphAttribute=geometry.morphAttributes[name][j].clone(),morphAttribute.setArray(new morphAttribute.array.constructor(morphAttrsArrays[name][j])),result.morphAttributes[name][j]=morphAttribute}// Generate an index buffer typed array\nvar cons=Uint8Array;newIndices.length>=Math.pow(2,8)&&(cons=Uint16Array),newIndices.length>=Math.pow(2,16)&&(cons=Uint32Array);var newIndexBuffer=new cons(newIndices),newIndices=null;return null===indices?newIndices=new THREE.BufferAttribute(newIndexBuffer,1):(newIndices=geometry.getIndex().clone(),newIndices.setArray(newIndexBuffer)),result.setIndex(newIndices),result};function PhongToToon(materialIn){if(materialIn.isMeshPhongMaterial){var material=new THREE.MeshToonMaterial({color:materialIn.color.clone(),morphTargets:materialIn.morphTargets,morphNormals:materialIn.morphNormals,vertexColors:materialIn.vertexColors,transparent:materialIn.transparent,opacity:materialIn.opacity,side:materialIn.side});return materialIn.map&&(material.map=materialIn.map),material}return materialIn}exports.resolveURL=resolveURL,exports.loadExternalFile=loadExternalFile,exports.loadExternalFiles=loadExternalFiles,exports.PhongToToon=PhongToToon;\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),markerImage=new Image(128,128);markerImage.src=__webpack_require__(8);var texture=new THREE.Texture;texture.image=markerImage,texture.needsUpdate=!0;var size=[.015,.02,1],Marker=function(zincObject){__webpack_require__(4).ZincObject.call(this),this.texture=texture;var spriteMaterial=void 0,sprite=void 0;this.morph=new THREE.Group,this.parent=zincObject,this.isMarker=!0;var enabled=!1,vector=new THREE.Vector3,initialise=()=>{spriteMaterial=new THREE.SpriteMaterial({map:texture,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),sprite=new THREE.Sprite(spriteMaterial),sprite.center.set(.5,0),this.morph.add(sprite),this.morph.position.set(0,0,0),this.morph.renderOrder=1e4,sprite.scale.set(size[0],size[1],size[2]),sprite.userData=this};/**\n * Set the position of the marker.\n * \n * @param {Number} x - x coordinate to be set.\n * @param {Number} y - y coordinate to be set.\n * @param {Number} z - z coordinate to be set.\n */ /**\n * Set the size of the marker.\n * \n * @param {Number} size - size to be set.\n */ /**\n * Clean up this object,\n */ /**\n * Enable and visualise the marker.\n */ /**\n * Disable and hide the marker.\n */ //this should be handle by scene... check the sync at \nthis.updateVisual=(min,max)=>{var scale=1,opacity=1,porportion=0;min!==max&&(porportion=1-(vector.z-min)/(max-min),scale=.5+.5*porportion,opacity=.6+.4*porportion),sprite.material.opacity=opacity,this.setSpriteSize(scale)},this.updateNDC=camera=>(vector.copy(this.morph.position),vector.project(camera),vector.z=Math.min(Math.max(vector.z,0),1),vector.z),this.setPosition=(x,y,z)=>{this.morph.position.set(x,y,z)},this.setSpriteSize=size=>{sprite.scale.set(.015,.02,1),sprite.scale.multiplyScalar(size)},this.dispose=()=>{this.morph&&this.morph.clear(),spriteMaterial&&spriteMaterial.dispose(),sprite&&(sprite.clear(),sprite=void 0)},this.isEnabled=()=>enabled,this.enable=()=>{enabled=!0,this.morph.visible=!0},this.disable=()=>{enabled=!1,this.morph.visible=!1},initialise()};/**\n * A special graphics type with a tear drop shape.\n * It is currently used to mark the location of a\n * {@link zincObject}.\n * \n * @class\n * @author Alan Wu\n * @return {Marker}\n */Marker.prototype=Object.create(__webpack_require__(4).ZincObject.prototype),exports.Marker=Marker;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzY1IDU2MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzY1IDU2MCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBmaWxsPSIjMDA1OTc0IiBkPSJNMTgyLjksNTUxLjdjMCwwLjEsMC4yLDAuMywwLjIsMC4zUzM1OC4zLDI4MywzNTguMywxOTQuNmMwLTEzMC4xLTg4LjgtMTg2LjctMTc1LjQtMTg2LjkNCgkJQzk2LjMsNy45LDcuNSw2NC41LDcuNSwxOTQuNmMwLDg4LjQsMTc1LjMsMzU3LjQsMTc1LjMsMzU3LjRTMTgyLjksNTUxLjcsMTgyLjksNTUxLjd6IE0xMjIuMiwxODcuMmMwLTMzLjYsMjcuMi02MC44LDYwLjgtNjAuOA0KCQljMzMuNiwwLDYwLjgsMjcuMiw2MC44LDYwLjhTMjE2LjUsMjQ4LDE4Mi45LDI0OEMxNDkuNCwyNDgsMTIyLjIsMjIwLjgsMTIyLjIsMTg3LjJ6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==\"\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\n/**\n * Provide additional shaders to render time dependent color.\n */exports.augmentMorphColor=function(){return function(shader){shader.vertexShader=shader.vertexShader.replace(\"#include <color_pars_vertex>\",[\"varying vec3 vColor;\",\"attribute vec3 morphColor0;\",\"attribute vec3 morphColor1;\"].join(\"\\n\")),shader.vertexShader=shader.vertexShader.replace(\"#include <color_vertex>\",[\"vColor.xyz = color.xyz;\",\"#ifdef USE_MORPHTARGETS\",\"vColor = morphColor0 * morphTargetInfluences[ 0 ];\",\"vColor += morphColor1 * morphTargetInfluences[ 1 ];\",\"#endif\"].join(\"\\n\"))}};\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),Glyph=function(geometry,materialIn,idIn,glyphsetIn){__webpack_require__(4).ZincObject.call(this);var material;materialIn&&(material=materialIn.clone(),material.vertexColors=THREE.FaceColors);this.id=idIn;var label=void 0,labelString=void 0,group=new THREE.Group;/**\n * Create a glyph using mesh\n * @param {THREE.Mesh} meshIn - Mesh to create the glyph from\n *\n * @returns {Boolean} true if successful\n */ /**\n * Get the {Glyphset} containing this glyph.\n *\n * @returns {Boolean} true if successful\n */ /**\n * Set and update the text containing this glyph.\n * @param {String} text - Label to be set for this instance\n */ /**\n * Display label with the choosen colour. It will replace the current\n * label.\n * @param {THREE.Color} colour - Colour for the label.\n */ /**\n * Get the group containing the label and mesh.\n * @return {THREE.Group}\n */ /**\n * Get the label of this glyph\n * @return {Label}\n */ /**\n * Get the mesh of this glyph.\n * @return {THREE.Mesh}\n */ /**\n * Set the transformation of this glyph.\n * @param {Array} position - Three components vectors containing position of the\n * transformation.\n * @param {Array} axis1 - Three components vectors containing axis1 rotation of the\n * transformation.\n * @param {Array} axis2 - Three components vectors containing axis2 rotation of the\n * transformation.\n * @param {Array} position - Three components vectors containing axis3 rotation of the\n * transformation.\n */ /**\n * Set the color of the glyph and its label.\n * \n * @param {THREE.Color} color - Colour to be set.\n */ /**\n * Clear and free its memory.\n */this.isGlyph=!0,this.fromMesh=meshIn=>!!(meshIn&&meshIn.isMesh)&&(this.morph=meshIn.clone(),this.morph.userData=this,group.add(this.morph),!0),geometry&&material&&this.fromMesh(new THREE.Mesh(geometry,material)),this.getGlyphset=function(){return glyphsetIn},this.setLabel=text=>{text&&(\"string\"==typeof text||text instanceof String)&&(labelString=text,this.morph&&(this.morph.name=text)),label&&this.showLabel()},this.showLabel=colour=>{if(label&&(position=label.getPosition(),group.remove(label.getSprite()),label.dispose(),label=void 0),labelString&&(\"string\"==typeof labelString||labelString instanceof String)){var _position=[0,0,0];label=new(__webpack_require__(11).Label)(labelString,colour),label.setPosition(_position[0],_position[1],_position[2]),group.add(label.getSprite())}},this.getGroup=()=>group,this.getLabel=()=>labelString,this.getMesh=()=>this.morph,this.setTransformation=(position,axis1,axis2,axis3)=>{this.morph&&(this.morph.matrix.elements[0]=axis1[0],this.morph.matrix.elements[1]=axis1[1],this.morph.matrix.elements[2]=axis1[2],this.morph.matrix.elements[3]=0,this.morph.matrix.elements[4]=axis2[0],this.morph.matrix.elements[5]=axis2[1],this.morph.matrix.elements[6]=axis2[2],this.morph.matrix.elements[7]=0,this.morph.matrix.elements[8]=axis3[0],this.morph.matrix.elements[9]=axis3[1],this.morph.matrix.elements[10]=axis3[2],this.morph.matrix.elements[11]=0,this.morph.matrix.elements[12]=position[0],this.morph.matrix.elements[13]=position[1],this.morph.matrix.elements[14]=position[2],this.morph.matrix.elements[15]=1,this.morph.matrixAutoUpdate=!1),label&&label.setPosition(position[0],position[1],position[2])},this.setColour=color=>{label&&label.setColour(color),this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.color=colour),this.geometry.colorsNeedUpdate=!0},this.dispose=()=>{this.material&&this.material.dispose(),this.morph=void 0}};/**\n * Zinc representation of glyph graphic, it contains the colours, \n * geometry and transformation of the glyph.\n * \n * @param {THREE.Geometry} geometry - Geometry of the glyph .\n * @param {THREE.Material} materialIn - Material of the glyph.\n * @param {Number} idIn - Id of the glyph.\n * \n * @class\n * @author Alan Wu\n * @return {Glyph}\n */Glyph.prototype=Object.create(__webpack_require__(4).ZincObject.prototype),exports.Glyph=Glyph;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SpriteText=__webpack_require__(12).default;/**\n * Bitmap labels, this is used with {@link Glyph} to \n * provide labels.\n * \n * @param {String} textIn - Text to be displayed dwith the label.\n * @param {THREE.Color} colour - Colour to be set for the label.\n * \n * @class\n * @author Alan Wu\n * @return {Label}\n */exports.Label=function(textIn,colour){var text=textIn,sprite=void 0;/**\n * Get the current position in an array containing the x, y and z\n * coordinates.\n * \n * @return {Array}\n */ /**\n * Set the position of the label in 3D coordinates.\n * \n * @param {Number} x - x coordinate to be set.\n * @param {Number} y - y coordinate to be set.\n * @param {Number} z - z coordinate to be set.\n */ /**\n * Set the colour of the label\n * \n * @param {THREE.Color} colour - colour to be set\n */ /**\n * Scale the label.\n * \n * @param {Number} scaling - Scale to be set.\n */ /**\n * Free up the memory\n */ /**\n * Get the intrnal sprite.\n * \n * @return {THREE.Sprite}\n */ /**\n * Get the text.\n * \n * @return {String}\n */sprite=colour?new SpriteText(text,.015,colour.getStyle()):new SpriteText(text,.015),sprite.material.sizeAttenuation=!1,sprite.center.x=-.05,sprite.center.y=0,this.getPosition=()=>sprite?[sprite.position.x,sprite.position.y,sprite.position.z]:[0,0,0],this.setPosition=(x,y,z)=>{sprite&&sprite.position.set(x,y,z)},this.setColour=colour=>{sprite.color=colour.getStyle()},this.setScale=scaling=>{sprite&&0<scaling&&sprite.scale.set(scaling,scaling,1)},this.dispose=()=>{sprite.dispose()},this.getSprite=()=>sprite,this.getString=()=>text};\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! three-spritetext */ \"./node_modules/three-spritetext/dist/three-spritetext.mjs\");\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _readOnlyError(name){throw new Error(\"\\\"\"+name+\"\\\" is read-only\")}var THREE=__webpack_require__(3),JSONLoader=__webpack_require__(14).JSONLoader,Glyphset=function(){__webpack_require__(4).ZincObject.call(this);var glyphList=[],axis1s=void 0,axis2s=void 0,axis3s=void 0,positions=void 0,scales=void 0,colors=void 0,labels=void 0,numberOfTimeSteps=0,numberOfVertices=0,baseSize=[0,0,0],offset=[0,0,0],scaleFactors=[0,0,0],repeat_mode=\"NONE\";this.ready=!1;var morphColours=!1,morphVertices=!1;this.isGlyphset=!0;for(var _transformMatrix=new THREE.Matrix4,_bot_colour=new THREE.Color,_top_colour=new THREE.Color,_boundingBox1=new THREE.Box3,_boundingBox2=new THREE.Box3,_boundingBox3=new THREE.Box3,_points=[],_current_positions=[],_current_axis1s=[],_current_axis2s=[],_current_axis3s=[],_current_scales=[],_current_colors=[],_glyph_axis_array=[],i=0;8>i;i++)_points[i]=new THREE.Vector3;/**\n * Get the {@link Three.Group} containing all of the glyphs' meshes.\n * @returns {Three.Group}\n */this.getGroup=()=>this.morph,this.load=(glyphsetData,glyphURL,finishCallback,isInline,displayLabels)=>{axis1s=glyphsetData.axis1,axis2s=glyphsetData.axis2,axis3s=glyphsetData.axis3,positions=glyphsetData.positions,scales=glyphsetData.scale,colors=glyphsetData.colors,labels=glyphsetData.label,morphColours=glyphsetData.metadata.MorphColours,morphVertices=glyphsetData.metadata.MorphVertices,numberOfTimeSteps=glyphsetData.metadata.number_of_time_steps,repeat_mode=glyphsetData.metadata.repeat_mode,numberOfVertices=glyphsetData.metadata.number_of_vertices,\"AXES_2D\"==repeat_mode||\"MIRROR\"==repeat_mode?numberOfVertices*=2:\"AXES_3D\"==repeat_mode&&(numberOfVertices*=3),baseSize=glyphsetData.metadata.base_size,offset=glyphsetData.metadata.offset,scaleFactors=glyphsetData.metadata.scale_factors;var loader=new JSONLoader;if(this.geometry=new THREE.BufferGeometry,this.morph=new THREE.InstancedMesh(this.geometry,void 0,numberOfVertices),isInline){var object=loader.parse(glyphURL);meshloader(finishCallback,displayLabels)(object.geometry,object.materials),object.geometry.dispose()}else loader.crossOrigin=\"Anonymous\",loader.load(glyphURL,meshloader(finishCallback,displayLabels))};/**\n * Calculate the actual transformation value that can be applied \n * to the transformation matrix.\n * \n * @returns {Array}\n */var resolve_glyph_axes=(point,axis1,axis2,axis3,scale,return_arrays)=>{if(\"NONE\"==repeat_mode||\"MIRROR\"==repeat_mode){for(var sign,axis_scale=[0,0,0],final_axis1=[0,0,0],final_axis2=[0,0,0],final_axis3=[0,0,0],final_point=[0,0,0],mirrored_axis1=[0,0,0],mirrored_axis2=[0,0,0],mirrored_axis3=[0,0,0],mirrored_point=[0,0,0],j=0;3>j;j++)sign=0>scale[j]?-1:1,axis_scale[j]=sign*baseSize[j]+scale[j]*scaleFactors[j];for(var j=0;3>j;j++)final_axis1[j]=axis1[j]*axis_scale[0],final_axis2[j]=axis2[j]*axis_scale[1],final_axis3[j]=axis3[j]*axis_scale[2],final_point[j]=point[j]+offset[0]*final_axis1[j]+offset[1]*final_axis2[j]+offset[2]*final_axis3[j],\"MIRROR\"==repeat_mode&&(mirrored_axis1[j]=-final_axis1[j],mirrored_axis2[j]=-final_axis2[j],mirrored_axis3[j]=-final_axis3[j],mirrored_point[j]=final_point[j],0>scale[0]&&(final_point[j]-=final_axis1[j],mirrored_point[j]-=mirrored_axis1[j]));/* if required, reverse axis3 to maintain right-handed coordinate system */0>final_axis3[0]*(final_axis1[1]*final_axis2[2]-final_axis1[2]*final_axis2[1])+final_axis3[1]*(final_axis1[2]*final_axis2[0]-final_axis1[0]*final_axis2[2])+final_axis3[2]*(final_axis1[0]*final_axis2[1]-final_axis1[1]*final_axis2[0])&&(final_axis3[0]=-final_axis3[0],final_axis3[1]=-final_axis3[1],final_axis3[2]=-final_axis3[2]),return_arrays[0]=[final_point,final_axis1,final_axis2,final_axis3],\"MIRROR\"==repeat_mode&&(0>mirrored_axis3[0]*(mirrored_axis1[1]*mirrored_axis2[2]-mirrored_axis1[2]*mirrored_axis2[1])+mirrored_axis3[1]*(mirrored_axis1[2]*mirrored_axis2[0]-mirrored_axis1[0]*mirrored_axis2[2])+mirrored_axis3[2]*(mirrored_axis1[0]*mirrored_axis2[1]-mirrored_axis1[1]*mirrored_axis2[0])&&(mirrored_axis3[0]=-mirrored_axis3[0],mirrored_axis3[1]=-mirrored_axis3[1],mirrored_axis3[2]=-mirrored_axis3[2]),return_arrays[1]=[mirrored_point,mirrored_axis1,mirrored_axis2,mirrored_axis3])}else if(\"AXES_2D\"==repeat_mode||\"AXES_3D\"==repeat_mode){for(var sign,_axis_scale=[0,0,0],_final_point=[0,0,0],j=0;3>j;j++)sign=0>scale[j]?-1:1,_axis_scale[j]=sign*baseSize[0]+scale[j]*scaleFactors[0];for(var j=0;3>j;j++)_final_point[j]=point[j]+offset[0]*_axis_scale[0]*axis1[j]+offset[1]*_axis_scale[1]*axis2[j]+offset[2]*_axis_scale[2]*axis3[j];for(var number_of_glyphs=\"AXES_2D\"==glyph_repeat_mode?2:3,k=0;k<number_of_glyphs;k++){var use_axis1=void 0,use_axis2=void 0,use_scale=scale[k],_final_axis=[0,0,0],_final_axis2=[0,0,0],_final_axis3=[0,0,0];0==k?(use_axis1=axis1,use_axis2=axis2):1==k?(use_axis1=axis2,use_axis2=\"AXES_2D\"==glyph_repeat_mode?axis1:axis3):(use_axis1=axis3,use_axis2=axis1);var final_scale1=baseSize[0]+use_scale*scaleFactors[0];_final_axis[0]=use_axis1[0]*final_scale1,_final_axis[1]=use_axis1[1]*final_scale1,_final_axis[2]=use_axis1[2]*final_scale1,_final_axis3[0]=_final_axis[1]*use_axis2[2]-use_axis2[1]*_final_axis[2],_final_axis3[1]=_final_axis[2]*use_axis2[0]-use_axis2[2]*_final_axis[0],_final_axis3[2]=_final_axis[0]*use_axis2[1]-_final_axis[1]*use_axis2[0];var magnitude=Math.sqrt(_final_axis3[0]*_final_axis3[0]+_final_axis3[1]*_final_axis3[1]+_final_axis3[2]*_final_axis3[2]);if(0<magnitude){var _scaling=(baseSize[2]+use_scale*scaleFactors[2])/magnitude;\"AXES_2D\"==repeat_mode&&0<k&&(_scaling*=-1),_final_axis3[0]*=_scaling,_final_axis3[1]*=_scaling,_final_axis3[2]*=_scaling}if(_final_axis2[0]=_final_axis3[1]*_final_axis[2]-_final_axis[1]*_final_axis3[2],_final_axis2[1]=_final_axis3[2]*_final_axis[0]-_final_axis[2]*_final_axis3[0],_final_axis2[2]=_final_axis3[0]*_final_axis[1]-_final_axis3[1]*_final_axis[0],magnitude=Math.sqrt(_final_axis2[0]*_final_axis2[0]+_final_axis2[1]*_final_axis2[1]+_final_axis2[2]*_final_axis2[2]),0<magnitude){var scaling=(baseSize[1]+use_scale*scaleFactors[1])/magnitude;_final_axis2[0]*=scaling,_final_axis2[1]*=scaling,_final_axis2[2]*=scaling}return_arrays[k]=[_final_point,_final_axis,_final_axis2,_final_axis3]}}return return_arrays},updateGlyphsetTransformation=(current_positions,current_axis1s,current_axis2s,current_axis3s,current_scales)=>{var numberOfGlyphs=1;\"AXES_2D\"==repeat_mode||\"MIRROR\"==repeat_mode?numberOfGlyphs=2:\"AXES_3D\"==repeat_mode&&(numberOfGlyphs=3);var numberOfPositions=current_positions.length/3,current_glyph_index=0;_glyph_axis_array.length=numberOfGlyphs;for(var _i=0;_i<numberOfPositions;_i++){var current_index=3*_i,current_position=[current_positions[current_index],current_positions[current_index+1],current_positions[current_index+2]],current_axis1=[current_axis1s[current_index],current_axis1s[current_index+1],current_axis1s[current_index+2]],current_axis2=[current_axis2s[current_index],current_axis2s[current_index+1],current_axis2s[current_index+2]],current_axis3=[current_axis3s[current_index],current_axis3s[current_index+1],current_axis3s[current_index+2]],current_scale=[current_scales[current_index],current_scales[current_index+1],current_scales[current_index+2]],arrays=resolve_glyph_axes(current_position,current_axis1,current_axis2,current_axis3,current_scale,_glyph_axis_array);if(arrays.length==numberOfGlyphs)for(var j=0;j<numberOfGlyphs;j++){_transformMatrix.elements[0]=arrays[j][1][0],_transformMatrix.elements[1]=arrays[j][1][1],_transformMatrix.elements[2]=arrays[j][1][2],_transformMatrix.elements[3]=0,_transformMatrix.elements[4]=arrays[j][2][0],_transformMatrix.elements[5]=arrays[j][2][1],_transformMatrix.elements[6]=arrays[j][2][2],_transformMatrix.elements[7]=0,_transformMatrix.elements[8]=arrays[j][3][0],_transformMatrix.elements[9]=arrays[j][3][1],_transformMatrix.elements[10]=arrays[j][3][2],_transformMatrix.elements[11]=0,_transformMatrix.elements[12]=arrays[j][0][0],_transformMatrix.elements[13]=arrays[j][0][1],_transformMatrix.elements[14]=arrays[j][0][2],_transformMatrix.elements[15]=1,this.morph.setMatrixAt(current_glyph_index,_transformMatrix);var glyph=glyphList[current_glyph_index];glyph&&glyph.setTransformation(arrays[j][0],arrays[j][1],arrays[j][2],arrays[j][3]),current_glyph_index++}}this.morph.instanceMatrix.needsUpdate=!0},updateGlyphsetHexColors=current_colors=>{var numberOfGlyphs=1;\"AXES_2D\"==repeat_mode||\"MIRROR\"==repeat_mode?numberOfGlyphs=2:\"AXES_3D\"==repeat_mode&&(numberOfGlyphs=3);for(var hex_values,numberOfColours=current_colors.length,current_glyph_index=0,_i2=0;_i2<numberOfColours;_i2++){hex_values=current_colors[_i2];for(var j=0;j<numberOfGlyphs;j++){_bot_colour.setHex(hex_values),this.morph.setColorAt(current_glyph_index,_bot_colour);var glyph=glyphList[current_glyph_index];glyph&&glyph.setColour(_bot_colour),current_glyph_index++}}this.morph.instanceColor.needsUpdate=!0},updateMorphGlyphsets=()=>{var current_positions=_current_positions,current_axis1s=_current_axis1s,current_axis2s=_current_axis2s,current_axis3s=_current_axis3s,current_scales=_current_scales,current_colors=_current_colors,current_time=this.inbuildTime/this.duration*(numberOfTimeSteps-1),bottom_frame=Math.floor(current_time),proportion=1-(current_time-bottom_frame),top_frame=Math.ceil(current_time);if(morphVertices){var bottom_positions=positions[bottom_frame.toString()],top_positions=positions[top_frame.toString()],bottom_axis1=axis1s[bottom_frame.toString()],top_axis1=axis1s[top_frame.toString()],bottom_axis2=axis2s[bottom_frame.toString()],top_axis2=axis2s[top_frame.toString()],bottom_axis3=axis3s[bottom_frame.toString()],top_axis3=axis3s[top_frame.toString()],bottom_scale=scales[bottom_frame.toString()],top_scale=scales[top_frame.toString()];_current_positions.length=bottom_positions.length,_current_axis1s.length=bottom_positions.length,_current_axis2s.length=bottom_positions.length,_current_axis3s.length=bottom_positions.length,_current_scales.length=bottom_positions.length;for(var _i3=0;_i3<bottom_positions.length;_i3++)current_positions[_i3]=proportion*bottom_positions[_i3]+(1-proportion)*top_positions[_i3],current_axis1s[_i3]=proportion*bottom_axis1[_i3]+(1-proportion)*top_axis1[_i3],current_axis2s[_i3]=proportion*bottom_axis2[_i3]+(1-proportion)*top_axis2[_i3],current_axis3s[_i3]=proportion*bottom_axis3[_i3]+(1-proportion)*top_axis3[_i3],current_scales[_i3]=proportion*bottom_scale[_i3]+(1-proportion)*top_scale[_i3]}else current_positions=(_readOnlyError(\"current_positions\"),positions[0]),current_axis1s=(_readOnlyError(\"current_axis1s\"),axis1s[0]),current_axis2s=(_readOnlyError(\"current_axis2s\"),axis2s[0]),current_axis3s=(_readOnlyError(\"current_axis3s\"),axis3s[0]),current_scales=(_readOnlyError(\"current_scales\"),scales[0]);if(updateGlyphsetTransformation(current_positions,current_axis1s,current_axis2s,current_axis3s,current_scales),this.boundingBoxUpdateRequired=!0,null!=colors){if(morphColours){var bottom_colors=colors[bottom_frame.toString()],top_colors=colors[top_frame.toString()];current_colors.length=bottom_colors.length;for(var _i4=0;_i4<bottom_colors.length;_i4++)_bot_colour.setHex(bottom_colors[_i4]),_top_colour.setHex(top_colors[_i4]),_bot_colour.setRGB(_bot_colour.r*proportion+_top_colour.r*(1-proportion),_bot_colour.g*proportion+_top_colour.g*(1-proportion),_bot_colour.b*proportion+_top_colour.b*(1-proportion)),current_colors[_i4]=_bot_colour.getHex();/*\n for (var i = 0; i < bottom_colors.length; i++) {\n current_colors.push(proportion * bottom_colors[i] + (1.0 - proportion) * top_colors[i]);\n }\n */}else current_colors=(_readOnlyError(\"current_colors\"),colors[0]);updateGlyphsetHexColors(current_colors)}};/**\n * Update transformation for each of the glyph in this glyphset.\n */this.showLabel=()=>{for(var _i5=0;_i5<glyphList.length;_i5++)glyphList[_i5].showLabel(this.morph.material?this.morph.material.color:void 0)};/**\n * Create the glyphs in the glyphset.\n * \n * @param {Boolean} displayLabels -Flag to determine either the labels should be display or not.\n */var createGlyphs=displayLabels=>{if(labels!=null&&displayLabels)for(var glyph,_i6=0;_i6<numberOfVertices;_i6++)glyph=new(__webpack_require__(10).Glyph)(void 0,void 0,_i6,this),null!=labels&&null!=labels[_i6]&&glyph.setLabel(labels[_i6]),0<numberOfTimeSteps&&glyph.setFrustumCulled(!1),glyphList[_i6]=glyph,this.morph.add(glyph.getGroup());//Update the transformation of the glyphs.\nlabels!=null&&displayLabels&&this.showLabel(this.morph.material?this.morph.material.color:void 0),updateGlyphsetTransformation(positions[0],axis1s[0],axis2s[0],axis3s[0],scales[0]),colors!=null&&updateGlyphsetHexColors(colors[0]),this.ready=!0,this.boundingBoxUpdateRequired=!0};/**\n * Add a custom {@link Glyph} to this {@link Glyphset}.\n * \n * @param {Glyph} Glyph to be added.\n */this.addCustomGlyph=glyph=>{glyph.isGlyph&&glyphList.push(glyph),this.ready=!0,this.boundingBoxUpdateRequired=!0},this.addMeshAsGlyph=(mesh,id)=>{if(mesh.isMesh){var glyph=new(__webpack_require__(10).Glyph)(void 0,void 0,id,this);return glyph.fromMesh(mesh),glyphList.push(glyph),this.morph.add(glyph.getGroup()),this.ready=!0,this.boundingBoxUpdateRequired=!0,glyph}},this.forEachGlyph=callbackFunction=>{for(var _i7=0;_i7<glyphList.length;_i7++)callbackFunction(glyphList[_i7])};var meshloader=(finishCallback,displayLabels)=>(geometry,materials)=>{var tempGeometry=geometry.toBufferGeometry();this.geometry.copy(tempGeometry),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),tempGeometry.dispose(),materials&&materials[0]&&(this.morph.material=materials[0]),createGlyphs(displayLabels),this.morph.name=this.groupName,this.morph.userData=this,geometry.dispose(),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(this)};/**\n * Get the index of the closest vertex to centroid.\n */ /**\n * Get the closest vertex to centroid.\n */ /**\n * Get the bounding box for the whole set of glyphs.\n * \n * @return {Three.Box3};\n */ /**\n * Set the local time of this glyphset.\n * \n * @param {Number} time - Can be any value between 0 to duration.\n */ /**\n * Check if the glyphset is time varying.\n * \n * @return {Boolean}\n */ /**\n * Get the current inbuild time of the \n * \n * @return {Number}\n */ /**\n * Clear this glyphset and its list of glyphs which will release them from the memory.\n */ /**\n * Update the glyphsets if required the render.\n */this.getClosestVertexIndex=function(){var closestIndex=-1;if(this.morph&&this.ready){var center=new THREE.Vector3;this.getBoundingBox().getCenter(center);for(var current_index,current_positions=positions[0],numberOfPositions=current_positions.length/3,position=new THREE.Vector3,distance=-1,currentDistance=0,_i8=0;_i8<numberOfPositions;_i8++)current_index=3*_i8,position.set(current_positions[current_index],current_positions[current_index+1],current_positions[current_index+2]),currentDistance=center.distanceTo(position),-1==distance?(distance=currentDistance,closestIndex=_i8):distance>currentDistance&&(distance=currentDistance,closestIndex=_i8)}return closestIndex},this.getClosestVertex=function(){if(-1==this.closestVertexIndex&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex&&this.morph)/*\n if (glyphList && glyphList[this.closestVertexIndex]) {\n glyphList[this.closestVertexIndex].getBoundingBox().getCenter(position);\n }\n */{var position=new THREE.Vector3;return this.morph.getMatrixAt(this.closestVertexIndex,_transformMatrix),position.setFromMatrixPosition(_transformMatrix),position}},this.getBoundingBox=()=>{if(this.morph&&this.ready&&this.morph.visible){if(this.boundingBoxUpdateRequired){_boundingBox1.setFromBufferAttribute(this.morph.geometry.attributes.position);for(var _i9=0;_i9<numberOfVertices;_i9++)this.morph.getMatrixAt(_i9,_transformMatrix),_boundingBox2.copy(_boundingBox1).applyMatrix4(_transformMatrix),0==_i9?_boundingBox3.copy(_boundingBox2):_boundingBox3.union(_boundingBox2);if(_boundingBox3)this.cachedBoundingBox.copy(_boundingBox3),this.morph.updateWorldMatrix(),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1;else return}return this.cachedBoundingBox}},this.setMorphTime=time=>{this.inbuildTime=time>this.duration?this.duration:0>time?0:time,(morphColours||morphVertices)&&(updateMorphGlyphsets(),morphVertices&&(this.markerUpdateRequired=!0))},this.isTimeVarying=()=>!!(0<numberOfTimeSteps&&(morphColours||morphVertices)),this.getCurrentTime=()=>this.inbuildTime,this.dispose=()=>{for(var _i10=glyphList.length-1;0<=_i10;_i10--)glyphList[_i10].dispose();this.geometry&&this.geometry.dispose(),this.morph&&this.morph.material.dispose(),axis1s=void 0,axis2s=void 0,axis3s=void 0,positions=void 0,scales=void 0,colors=void 0,this.ready=!1,this.groupName=void 0},this.render=(delta,playAnimation,options)=>{if(!0==playAnimation){var targetTime=this.inbuildTime+delta;targetTime>this.duration&&(targetTime-=this.duration),this.inbuildTime=targetTime,(morphColours||morphVertices)&&updateMorphGlyphsets()}this.updateMarker(playAnimation,options)}};Glyphset.prototype=Object.create(__webpack_require__(4).ZincObject.prototype),exports.Glyphset=Glyphset;\n\n/***/ }),\n/* 14 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"JSONLoader\", function() { return JSONLoader; });\nvar THREE=__webpack_require__(3),Loader=__webpack_require__(15).Loader,LoaderUtils=THREE.LoaderUtils,AnimationClip=THREE.AnimationClip,Vector3=THREE.Vector3,Vector4=THREE.Vector4,Color=THREE.Color,Vector2=THREE.Vector2,Face3=__webpack_require__(5).Face3,Geometry=__webpack_require__(5).Geometry,FileLoader=THREE.FileLoader,DefaultLoadingManager=THREE.DefaultLoadingManager,VideoHandler=__webpack_require__(16).VideoHandler;/**\n * @author mrdoob / http://mrdoob.com/\n * @author alteredq / http://alteredqualia.com/\n */function JSONLoader(manager){\"boolean\"==typeof manager&&(console.warn(\"THREE.JSONLoader: showStatus parameter has been removed from constructor.\"),manager=void 0),this.manager=manager===void 0?DefaultLoadingManager:manager,this.withCredentials=!1,this.paramsString=\"\"}Object.assign(JSONLoader.prototype,{load:function load(url,onLoad,onProgress,onError){var scope=this,texturePath=this.texturePath&&\"string\"==typeof this.texturePath?this.texturePath:LoaderUtils.extractUrlBase(url),loader=new FileLoader(this.manager),params=url.split(\"?\");this.paramsString=2===url.length?paramsStrings[1]:\"\",loader.setWithCredentials(this.withCredentials),loader.load(url,function(text){var json=JSON.parse(text),metadata=json.metadata;if(metadata!==void 0){var type=metadata.type;if(type!==void 0&&\"object\"===type.toLowerCase())return void console.error(\"THREE.JSONLoader: \"+url+\" should be loaded with THREE.ObjectLoader instead.\")}if(scope&&scope.parse){var object=scope.parse(json,texturePath);onLoad(object.geometry,object.materials)}},onProgress,onError)},setTexturePath:function setTexturePath(value){this.texturePath=value},parse:function(){function parseModel(json,geometry){function isBitSet(value,position){return value&1<<position}var i,j,fi,offset,zLength,colorIndex,normalIndex,uvIndex,materialIndex,type,isQuad,hasMaterial,hasFaceVertexUv,hasFaceNormal,hasFaceVertexNormal,hasFaceColor,hasFaceVertexColor,vertex,face,faceA,faceB,hex,normal,uvLayer,uv,u,v,faces=json.faces,vertices=json.vertices,normals=json.normals,colors=json.colors,scale=json.scale,nUvLayers=0;if(void 0!==json.uvs){// disregard empty arrays\nfor(i=0;i<json.uvs.length;i++)json.uvs[i].length&&nUvLayers++;for(i=0;i<nUvLayers;i++)geometry.faceVertexUvs[i]=[]}for(offset=0,zLength=vertices.length;offset<zLength;)vertex=new Vector3,vertex.x=vertices[offset++]*scale,vertex.y=vertices[offset++]*scale,vertex.z=vertices[offset++]*scale,geometry.vertices.push(vertex);if(offset=0,zLength=faces.length,json.uvs)for(i=0;i<json.uvs.length;i++){geometry.uvs[i]=[];for(var k=0;k<json.uvs[i].length;k++)geometry.uvs[i][k]=json.uvs[i][k]}if(normals)for(i=0;i<normals.length;i++)geometry.normals[i]=normals[i];if(colors)for(i=0;i<colors.length;i++)geometry.colors[i]=colors[i];for(;offset<zLength;)// console.log(\"type\", type, \"bits\", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);\nif(type=faces[offset++],isQuad=isBitSet(type,0),hasMaterial=isBitSet(type,1),hasFaceVertexUv=isBitSet(type,3),hasFaceNormal=isBitSet(type,4),hasFaceVertexNormal=isBitSet(type,5),hasFaceColor=isBitSet(type,6),hasFaceVertexColor=isBitSet(type,7),isQuad){if(faceA=new Face3,faceA.a=faces[offset],faceA.b=faces[offset+1],faceA.c=faces[offset+3],faceB=new Face3,faceB.a=faces[offset+1],faceB.b=faces[offset+2],faceB.c=faces[offset+3],offset+=4,hasMaterial&&(materialIndex=faces[offset++],faceA.materialIndex=materialIndex,faceB.materialIndex=materialIndex),fi=geometry.faces.length,hasFaceVertexUv)for(i=0;i<nUvLayers;i++)for(uvLayer=json.uvs[i],geometry.faceVertexUvs[i][fi]=[],geometry.faceVertexUvs[i][fi+1]=[],j=0;4>j;j++)uvIndex=faces[offset++],u=uvLayer[2*uvIndex],v=uvLayer[2*uvIndex+1],uv=new Vector2(u,v),2!==j&&geometry.faceVertexUvs[i][fi].push(uv),0!==j&&geometry.faceVertexUvs[i][fi+1].push(uv);if(hasFaceNormal&&(normalIndex=3*faces[offset++],faceA.normal.set(normals[normalIndex++],normals[normalIndex++],normals[normalIndex]),faceB.normal.copy(faceA.normal)),hasFaceVertexNormal)for(i=0;4>i;i++)normalIndex=3*faces[offset++],normal=new Vector3(normals[normalIndex++],normals[normalIndex++],normals[normalIndex]),2!==i&&faceA.vertexNormals.push(normal),0!==i&&faceB.vertexNormals.push(normal);if(hasFaceColor&&(colorIndex=faces[offset++],hex=colors[colorIndex],faceA.color.setHex(hex),faceB.color.setHex(hex)),hasFaceVertexColor)for(i=0;4>i;i++)colorIndex=faces[offset++],hex=colors[colorIndex],2!==i&&faceA.vertexColors.push(new Color(hex)),0!==i&&faceB.vertexColors.push(new Color(hex));geometry.faces.push(faceA),geometry.faces.push(faceB)}else{if(face=new Face3,face.a=faces[offset++],face.b=faces[offset++],face.c=faces[offset++],hasMaterial&&(materialIndex=faces[offset++],face.materialIndex=materialIndex),fi=geometry.faces.length,hasFaceVertexUv)for(i=0;i<nUvLayers;i++)for(uvLayer=json.uvs[i],geometry.faceVertexUvs[i][fi]=[],j=0;3>j;j++)uvIndex=faces[offset++],u=uvLayer[2*uvIndex],v=uvLayer[2*uvIndex+1],uv=new Vector2(u,v),geometry.faceVertexUvs[i][fi].push(uv);if(hasFaceNormal&&(normalIndex=3*faces[offset++],face.normal.set(normals[normalIndex++],normals[normalIndex++],normals[normalIndex])),hasFaceVertexNormal)for(i=0;3>i;i++)normalIndex=3*faces[offset++],normal=new Vector3(normals[normalIndex++],normals[normalIndex++],normals[normalIndex]),face.vertexNormals.push(normal);if(hasFaceColor&&(colorIndex=faces[offset++],face.color.setHex(colors[colorIndex])),hasFaceVertexColor)for(i=0;3>i;i++)colorIndex=faces[offset++],face.vertexColors.push(new Color(colors[colorIndex]));geometry.faces.push(face)}}function parseSkin(json,geometry){var influencesPerVertex=json.influencesPerVertex===void 0?2:json.influencesPerVertex;if(json.skinWeights)for(var i=0,l=json.skinWeights.length;i<l;i+=influencesPerVertex){var x=json.skinWeights[i],y=1<influencesPerVertex?json.skinWeights[i+1]:0,z=2<influencesPerVertex?json.skinWeights[i+2]:0,w=3<influencesPerVertex?json.skinWeights[i+3]:0;geometry.skinWeights.push(new Vector4(x,y,z,w))}if(json.skinIndices)for(var i=0,l=json.skinIndices.length;i<l;i+=influencesPerVertex){var a=json.skinIndices[i],b=1<influencesPerVertex?json.skinIndices[i+1]:0,c=2<influencesPerVertex?json.skinIndices[i+2]:0,d=3<influencesPerVertex?json.skinIndices[i+3]:0;geometry.skinIndices.push(new Vector4(a,b,c,d))}geometry.bones=json.bones,geometry.bones&&0<geometry.bones.length&&(geometry.skinWeights.length!==geometry.skinIndices.length||geometry.skinIndices.length!==geometry.vertices.length)&&console.warn(\"When skinning, number of vertices (\"+geometry.vertices.length+\"), skinIndices (\"+geometry.skinIndices.length+\"), and skinWeights (\"+geometry.skinWeights.length+\") should match.\")}function parseMorphing(json,geometry){var scale=json.scale;if(json.morphTargets!==void 0)for(var i=0,l=json.morphTargets.length;i<l;i++){geometry.morphTargets[i]={},geometry.morphTargets[i].name=json.morphTargets[i].name,geometry.morphTargets[i].vertices=[];for(var vertex,dstVertices=geometry.morphTargets[i].vertices,srcVertices=json.morphTargets[i].vertices,v=0,vl=srcVertices.length;v<vl;v+=3)vertex=new Vector3,vertex.x=srcVertices[v]*scale,vertex.y=srcVertices[v+1]*scale,vertex.z=srcVertices[v+2]*scale,dstVertices.push(vertex)}if(void 0!==json.morphNormals)for(var i=0,l=json.morphNormals.length;i<l;i++)if(geometry.morphTargets[i]){geometry.morphTargets[i].normals=[];for(var normals,dstNormals=geometry.morphTargets[i].normals,srcNormals=json.morphNormals[i].normals,v=0,vl=srcNormals.length;v<vl;v+=3)normals=new Vector3,normals.x=srcNormals[v],normals.y=srcNormals[v+1],normals.z=srcNormals[v+2],dstNormals.push(normals);geometry.morphNormalsReady=!0}if(void 0!==json.morphColors){var i,l,c,cl,dstColors,srcColors,color;for(i=0,l=json.morphColors.length;i<l;i++)for(geometry.morphColors[i]={},geometry.morphColors[i].name=json.morphColors[i].name,geometry.morphColors[i].colors=[],dstColors=geometry.morphColors[i].colors,srcColors=json.morphColors[i].colors,(c=0,cl=srcColors.length);c<cl;c+=3)color=new THREE.Color(16755200),color.setRGB(srcColors[c],srcColors[c+1],srcColors[c+2]),dstColors.push(color)}}function parseAnimations(json,geometry){var outputAnimations=[],animations=[];// parse old style Bone/Hierarchy animations\njson.animation!==void 0&&animations.push(json.animation),json.animations!==void 0&&(json.animations.length?animations=animations.concat(json.animations):animations.push(json.animations));for(var clip,i=0;i<animations.length;i++)clip=AnimationClip.parseAnimation(animations[i],geometry.bones),clip&&outputAnimations.push(clip);// parse implicit morph animations\nif(geometry.morphTargets){// TODO: Figure out what an appropraite FPS is for morph target animations -- defaulting to 10, but really it is completely arbitrary.\nvar morphAnimationClips=AnimationClip.CreateClipsFromMorphTargetSequences(geometry.morphTargets,10);outputAnimations=outputAnimations.concat(morphAnimationClips)}0<outputAnimations.length&&(geometry.animations=outputAnimations)}return function(json,texturePath){void 0!==json.data&&(json=json.data),json.scale=void 0===json.scale?1:1/json.scale;var geometry=new Geometry;if(geometry.morphColors=[],parseModel(json,geometry),parseSkin(json,geometry),parseMorphing(json,geometry),parseAnimations(json,geometry),geometry.computeFaceNormals(),geometry.computeBoundingSphere(),void 0===json.materials||0===json.materials.length)return{geometry:geometry};var materials=Loader.prototype.initMaterials(json.materials,texturePath,\"Anonymous\");if(json.materials[0].video){var fullPath=texturePath+json.materials[0].video;this.paramsString&&(fullPath+=\"?\".concat(this.paramsString));var videoHandler=new VideoHandler(fullPath);geometry._video=videoHandler}return materials&&0<materials.length&&(materials[0].side=json.materials[0].singleSided?THREE.FrontSide:json.materials[0].flipSided?THREE.BackSide:THREE.DoubleSide,json.materials[0].specularCoef&&(materials[0].shininess=Math.floor(json.materials[0].specularCoef/3))),{geometry:geometry,materials:materials}}}()});\n\n/***/ }),\n/* 15 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Loader\", function() { return Loader; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar THREE=__webpack_require__(3);/**\n * @author alteredq / http://alteredqualia.com/\n */function Loader(){}Loader.Handlers={handlers:[],add:function add(regex,loader){this.handlers.push(regex,loader)},get:function get(file){for(var handlers=this.handlers,i=0,l=handlers.length;i<l;i+=2){var regex=handlers[i],loader=handlers[i+1];if(regex.test(file))return loader}return null}},Object.assign(Loader.prototype,{crossOrigin:\"anonymous\",onLoadStart:function onLoadStart(){},onLoadProgress:function onLoadProgress(){},onLoadComplete:function onLoadComplete(){},initMaterials:function initMaterials(materials,texturePath,crossOrigin){for(var array=[],i=0;i<materials.length;++i)array[i]=this.createMaterial(materials[i],texturePath,crossOrigin);return array},createMaterial:function(){var BlendingMode={NoBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"NoBlending\"],NormalBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"NormalBlending\"],AdditiveBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"AdditiveBlending\"],SubtractiveBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"SubtractiveBlending\"],MultiplyBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"MultiplyBlending\"],CustomBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"CustomBlending\"]},color=new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"],textureLoader=new three__WEBPACK_IMPORTED_MODULE_0__[\"TextureLoader\"],materialLoader=new three__WEBPACK_IMPORTED_MODULE_0__[\"MaterialLoader\"];return function(m,texturePath,crossOrigin){function loadTexture(path,repeat,offset,wrap,anisotropy){var texture,fullPath=texturePath+path,loader=Loader.Handlers.get(fullPath);null===loader?(textureLoader.setCrossOrigin(crossOrigin),texture=textureLoader.load(fullPath)):texture=loader.load(fullPath),void 0!==repeat&&(texture.repeat.fromArray(repeat),1!==repeat[0]&&(texture.wrapS=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]),1!==repeat[1]&&(texture.wrapT=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"])),void 0!==offset&&texture.offset.fromArray(offset),void 0!==wrap&&(\"repeat\"===wrap[0]&&(texture.wrapS=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]),\"mirror\"===wrap[0]&&(texture.wrapS=three__WEBPACK_IMPORTED_MODULE_0__[\"MirroredRepeatWrapping\"]),\"repeat\"===wrap[1]&&(texture.wrapT=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]),\"mirror\"===wrap[1]&&(texture.wrapT=three__WEBPACK_IMPORTED_MODULE_0__[\"MirroredRepeatWrapping\"])),void 0!==anisotropy&&(texture.anisotropy=anisotropy);var uuid=three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].generateUUID();return textures[uuid]=texture,uuid}//\n// convert from old material format\nvar textures={},json={uuid:three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].generateUUID(),type:\"MeshLambertMaterial\"};for(var name in m){var value=m[name];switch(name){case\"DbgColor\":case\"DbgIndex\":case\"opticalDensity\":case\"illumination\":break;case\"DbgName\":json.name=value;break;case\"blending\":json.blending=BlendingMode[value];break;case\"colorAmbient\":case\"mapAmbient\":console.warn(\"THREE.Loader.createMaterial:\",name,\"is no longer supported.\");break;case\"colorDiffuse\":json.color=color.fromArray(value).getHex();break;case\"colorSpecular\":json.specular=color.fromArray(value).getHex();break;case\"colorEmissive\":json.emissive=color.fromArray(value).getHex();break;case\"specularCoef\":json.shininess=value;break;case\"shading\":\"basic\"===value.toLowerCase()&&(json.type=\"MeshBasicMaterial\"),\"phong\"===value.toLowerCase()&&(json.type=\"MeshPhongMaterial\"),\"standard\"===value.toLowerCase()&&(json.type=\"MeshStandardMaterial\");break;case\"mapDiffuse\":json.map=loadTexture(value,m.mapDiffuseRepeat,m.mapDiffuseOffset,m.mapDiffuseWrap,m.mapDiffuseAnisotropy);break;case\"mapDiffuseRepeat\":case\"mapDiffuseOffset\":case\"mapDiffuseWrap\":case\"mapDiffuseAnisotropy\":break;case\"mapEmissive\":json.emissiveMap=loadTexture(value,m.mapEmissiveRepeat,m.mapEmissiveOffset,m.mapEmissiveWrap,m.mapEmissiveAnisotropy);break;case\"mapEmissiveRepeat\":case\"mapEmissiveOffset\":case\"mapEmissiveWrap\":case\"mapEmissiveAnisotropy\":break;case\"mapLight\":json.lightMap=loadTexture(value,m.mapLightRepeat,m.mapLightOffset,m.mapLightWrap,m.mapLightAnisotropy);break;case\"mapLightRepeat\":case\"mapLightOffset\":case\"mapLightWrap\":case\"mapLightAnisotropy\":break;case\"mapAO\":json.aoMap=loadTexture(value,m.mapAORepeat,m.mapAOOffset,m.mapAOWrap,m.mapAOAnisotropy);break;case\"mapAORepeat\":case\"mapAOOffset\":case\"mapAOWrap\":case\"mapAOAnisotropy\":break;case\"mapBump\":json.bumpMap=loadTexture(value,m.mapBumpRepeat,m.mapBumpOffset,m.mapBumpWrap,m.mapBumpAnisotropy);break;case\"mapBumpScale\":json.bumpScale=value;break;case\"mapBumpRepeat\":case\"mapBumpOffset\":case\"mapBumpWrap\":case\"mapBumpAnisotropy\":break;case\"mapNormal\":json.normalMap=loadTexture(value,m.mapNormalRepeat,m.mapNormalOffset,m.mapNormalWrap,m.mapNormalAnisotropy);break;case\"mapNormalFactor\":json.normalScale=value;break;case\"mapNormalRepeat\":case\"mapNormalOffset\":case\"mapNormalWrap\":case\"mapNormalAnisotropy\":break;case\"mapSpecular\":json.specularMap=loadTexture(value,m.mapSpecularRepeat,m.mapSpecularOffset,m.mapSpecularWrap,m.mapSpecularAnisotropy);break;case\"mapSpecularRepeat\":case\"mapSpecularOffset\":case\"mapSpecularWrap\":case\"mapSpecularAnisotropy\":break;case\"mapMetalness\":json.metalnessMap=loadTexture(value,m.mapMetalnessRepeat,m.mapMetalnessOffset,m.mapMetalnessWrap,m.mapMetalnessAnisotropy);break;case\"mapMetalnessRepeat\":case\"mapMetalnessOffset\":case\"mapMetalnessWrap\":case\"mapMetalnessAnisotropy\":break;case\"mapRoughness\":json.roughnessMap=loadTexture(value,m.mapRoughnessRepeat,m.mapRoughnessOffset,m.mapRoughnessWrap,m.mapRoughnessAnisotropy);break;case\"mapRoughnessRepeat\":case\"mapRoughnessOffset\":case\"mapRoughnessWrap\":case\"mapRoughnessAnisotropy\":break;case\"mapAlpha\":json.alphaMap=loadTexture(value,m.mapAlphaRepeat,m.mapAlphaOffset,m.mapAlphaWrap,m.mapAlphaAnisotropy);break;case\"mapAlphaRepeat\":case\"mapAlphaOffset\":case\"mapAlphaWrap\":case\"mapAlphaAnisotropy\":break;case\"flipSided\":json.side=three__WEBPACK_IMPORTED_MODULE_0__[\"BackSide\"];break;case\"doubleSided\":json.side=three__WEBPACK_IMPORTED_MODULE_0__[\"DoubleSide\"];break;case\"transparency\":console.warn(\"THREE.Loader.createMaterial: transparency has been renamed to opacity\"),json.opacity=value;break;case\"depthTest\":case\"depthWrite\":case\"colorWrite\":case\"opacity\":case\"reflectivity\":case\"transparent\":case\"visible\":case\"wireframe\":json[name]=value;break;case\"vertexColors\":!0===value&&(json.vertexColors=three__WEBPACK_IMPORTED_MODULE_0__[\"VertexColors\"]),\"face\"===value&&(json.vertexColors=three__WEBPACK_IMPORTED_MODULE_0__[\"FaceColors\"]);break;default:console.error(\"THREE.Loader.createMaterial: Unsupported\",name,value);}}return\"MeshBasicMaterial\"===json.type&&delete json.emissive,\"MeshPhongMaterial\"!==json.type&&delete json.specular,1>json.opacity&&(json.transparent=!0),materialLoader.setTextures(textures),materialLoader.parse(json)}}()});\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3);/**\n * Provide basic functionality to display video as texture.\n * VideoTexture is used for creating and updating a video projected onto a Three.js texture\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {VideoHandler}\n */exports.VideoHandler=function(srcIn){var _this=this;this.video=void 0,this.videoTexture=void 0;var lastPlayPos=0,currentPlayPos=0,bufferingDetected=!1;// videoPlaneLoaded connects the video to the video texture once it has loaded\n//this should be handle by scene... check the sync at \nthis.setMorphTime=function(time,duration){var actualTime=time/duration*_this.video.duration;_this.video.currentTime=actualTime},this.getVideoDuration=function(){return _this.video.duration},this.createCanvasVideoTexture=function(){return _this.videoTexture=new THREE.VideoTexture(_this.video),_this.videoTexture.minFilter=THREE.LinearFilter,_this.videoTexture.magFilter=THREE.LinearFilter,_this.videoTexture.format=THREE.RGBFormat,_this.video.currentTime=0,_this.videoTexture},this.getCurrentTime=function(duration){return _this.video?duration*(_this.video.currentTime/_this.video.duration):0},this.isReadyToPlay=function(){// video.readyState 3 means we have data to load for the current time and foreseeable future\nreturn!!(_this.video&&3<=_this.video.readyState)},function initialise(){document&&(_this.video=document.createElement(\"video\"),_this.video.crossOrigin=\"anonymous\",_this.video.src=srcIn,_this.video.load(),_this.video.loop=!0)}()};\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),Points=__webpack_require__(18).Points,Pointset=function(){__webpack_require__(4).ZincObject.call(this),this.isPointset=!0;/** Shape of the points is created using the function below */var getCircularTexture=()=>{var image=new Image;image.src=__webpack_require__(19);var texture=new THREE.Texture;return texture.image=image,texture.needsUpdate=!0,texture};/**\n * Create the pointsets using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of points to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */ /**\n * Set the size of the points.\n * \n * @param {Number} size - size to be set.\n */ /**\n * Turn size attenuation on/off based on the flag.\n * \n * @param {Boolean} flag - Determin either size attenuation\n * should be on or off.\n */this.createMesh=(geometryIn,materialIn,options)=>{if(geometryIn&&materialIn){var geometry=this.toBufferGeometry(geometryIn,options),texture=getCircularTexture();materialIn.map=texture;var point=new Points(geometry,materialIn);this.setMesh(point,options.localTimeEnabled,options.localMorphColour)}},this.setSize=size=>{this.morph&&this.morph.material&&(this.morph.material.size=size,this.morph.material.needsUpdate=!0)},this.setSizeAttenuation=flag=>{this.morph&&this.morph.material&&(this.morph.material.sizeAttenuation=flag,this.morph.material.needsUpdate=!0)}};Pointset.prototype=Object.create(__webpack_require__(4).ZincObject.prototype),exports.Pointset=Pointset;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Points\", function() { return Points; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar _inverseMatrix=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],_ray=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Ray\"],_sphere=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Sphere\"],_position=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_morphA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_tempA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];class Points extends three__WEBPACK_IMPORTED_MODULE_0__[\"Object3D\"]{constructor(){var geometry=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],material=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"];super(),this.type=\"Points\",this.geometry=geometry,this.material=material,this.updateMorphTargets()}copy(source){return super.copy(source),this.material=source.material,this.geometry=source.geometry,this}raycast(raycaster,intersects){var geometry=this.geometry,matrixWorld=this.matrixWorld,threshold=raycaster.params.Points.threshold,drawRange=geometry.drawRange;if(null===geometry.boundingSphere&&geometry.computeBoundingSphere(),_sphere.copy(geometry.boundingSphere),_sphere.applyMatrix4(matrixWorld),_sphere.radius+=threshold,!1!==raycaster.ray.intersectsSphere(_sphere)){_inverseMatrix.copy(matrixWorld).invert(),_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);var localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3),localThresholdSq=localThreshold*localThreshold;if(geometry.isBufferGeometry){var index=geometry.index,attributes=geometry.attributes,positionAttribute=attributes.position,morphPosition=geometry.morphAttributes.position;if(null!==index)for(var a,start=Math.max(0,drawRange.start),end=Math.min(index.count,drawRange.start+drawRange.count),i=start;i<end;i++)a=index.getX(i),calculatePosition(this,positionAttribute,morphPosition,a),testPoint(_position,a,localThresholdSq,matrixWorld,raycaster,intersects,this);else for(var _start=Math.max(0,drawRange.start),_end=Math.min(positionAttribute.count,drawRange.start+drawRange.count),_i=_start;_i<_end;_i++)calculatePosition(this,positionAttribute,morphPosition,_i),testPoint(_position,_i,localThresholdSq,matrixWorld,raycaster,intersects,this)}else console.error(\"THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\")}//\n}updateMorphTargets(){var geometry=this.geometry;if(geometry.isBufferGeometry){var morphAttributes=geometry.morphAttributes,keys=Object.keys(morphAttributes);if(0<keys.length){var morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var name,m=0,ml=morphAttribute.length;m<ml;m++)name=morphAttribute[m].name||m+\"\",this.morphTargetInfluences.push(0),this.morphTargetDictionary[name]=m}}}else{var morphTargets=geometry.morphTargets;morphTargets!==void 0&&0<morphTargets.length&&console.error(\"THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.\")}}}Points.prototype.isPoints=!0;function testPoint(point,index,localThresholdSq,matrixWorld,raycaster,intersects,object){var rayPointDistanceSq=_ray.distanceSqToPoint(point);if(rayPointDistanceSq<localThresholdSq){var intersectPoint=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];_ray.closestPointToPoint(point,intersectPoint),intersectPoint.applyMatrix4(matrixWorld);var distance=raycaster.ray.origin.distanceTo(intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index,face:null,object:object})}}function calculatePosition(object,position,morphPosition,a){_position.fromBufferAttribute(position,a);var morphInfluences=object.morphTargetInfluences;if(object.material.morphTargets&&morphPosition&&morphInfluences){_morphA.set(0,0,0);for(var i=0,il=morphPosition.length;i<il;i++){var influence=morphInfluences[i],morphAttribute=morphPosition[i];0===influence||(_tempA.fromBufferAttribute(morphAttribute,a),_morphA.addScaledVector(_tempA.sub(_position),influence))}_position.add(_morphA)}}\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==\"\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),Lines=function(){/**\n * Create the line segements using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of lines to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */ /**\n * Set the width for the lines.\n * \n * @param {Number} width - Width of the lines.\n */__webpack_require__(4).ZincObject.call(this),this.isLines=!0,this.createLineSegment=(geometryIn,materialIn,options)=>{if(geometryIn&&materialIn){var geometry=this.toBufferGeometry(geometryIn,options);options.localMorphColour&&geometry.morphAttributes.color&&(materialIn.onBeforeCompile=__webpack_require__(9).augmentMorphColor());var line=new(__webpack_require__(21).LineSegments)(geometry,materialIn);this.setMesh(line,options.localTimeEnabled,options.localMorphColour)}},this.setWidth=width=>{this.morph&&this.morph.material&&(this.morph.material.linewidth=width,this.morph.material.needsUpdate=!0)}};/**\n * Provides an object which stores lines.\n * This is created when a valid json file containing lines is read into a {@link Zinc.Scene}\n * object.\n * \n * @class\n * @author Alan Wu\n * @return {Lines}\n */Lines.prototype=Object.create(__webpack_require__(4).ZincObject.prototype),exports.Lines=Lines;\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LineSegments\", function() { return LineSegments; });\n/* harmony import */ var _Line_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);\nvar _start=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"],_end=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"];class LineSegments extends _Line_js__WEBPACK_IMPORTED_MODULE_0__[\"Line\"]{constructor(geometry,material){super(geometry,material),this.type=\"LineSegments\"}computeLineDistances(){var geometry=this.geometry;if(!geometry.isBufferGeometry)geometry.isGeometry&&console.error(\"THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\");else// we assume non-indexed geometry\nif(null===geometry.index){for(var positionAttribute=geometry.attributes.position,lineDistances=[],i=0,l=positionAttribute.count;i<l;i+=2)_start.fromBufferAttribute(positionAttribute,i),_end.fromBufferAttribute(positionAttribute,i+1),lineDistances[i]=0==i?0:lineDistances[i-1],lineDistances[i+1]=lineDistances[i]+_start.distanceTo(_end);geometry.setAttribute(\"lineDistance\",new three__WEBPACK_IMPORTED_MODULE_1__[\"Float32BufferAttribute\"](lineDistances,1))}else console.warn(\"THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}}LineSegments.prototype.isLineSegments=!0;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Line\", function() { return Line; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar _start=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_end=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_inverseMatrix=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],_ray=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Ray\"],_sphere=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Sphere\"],_morphA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_morphB=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_tempA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_tempB=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];class Line extends three__WEBPACK_IMPORTED_MODULE_0__[\"Object3D\"]{constructor(){var geometry=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],material=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"];super(),this.type=\"Line\",this.geometry=geometry,this.material=material,this.updateMorphTargets()}copy(source){return super.copy(source),this.material=source.material,this.geometry=source.geometry,this}computeLineDistances(){var geometry=this.geometry;if(!geometry.isBufferGeometry)geometry.isGeometry&&console.error(\"THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\");else// we assume non-indexed geometry\nif(null===geometry.index){for(var positionAttribute=geometry.attributes.position,lineDistances=[0],i=1,l=positionAttribute.count;i<l;i++)_start.fromBufferAttribute(positionAttribute,i-1),_end.fromBufferAttribute(positionAttribute,i),lineDistances[i]=lineDistances[i-1],lineDistances[i]+=_start.distanceTo(_end);geometry.setAttribute(\"lineDistance\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](lineDistances,1))}else console.warn(\"THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}raycast(raycaster,intersects){var geometry=this.geometry,matrixWorld=this.matrixWorld,threshold=raycaster.params.Line.threshold,drawRange=geometry.drawRange,morphPosition=geometry.morphAttributes.position;if(null===geometry.boundingSphere&&geometry.computeBoundingSphere(),_sphere.copy(geometry.boundingSphere),_sphere.applyMatrix4(matrixWorld),_sphere.radius+=threshold,!1!==raycaster.ray.intersectsSphere(_sphere)){_inverseMatrix.copy(matrixWorld).invert(),_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);var localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3),localThresholdSq=localThreshold*localThreshold,vStart=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],vEnd=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],interSegment=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],interRay=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],step=this.isLineSegments?2:1;if(geometry.isBufferGeometry){var index=geometry.index,attributes=geometry.attributes,positionAttribute=attributes.position;if(null!==index)for(var start=Math.max(0,drawRange.start),end=Math.min(index.count,drawRange.start+drawRange.count),i=start;i<end-1;i+=step){var a=index.getX(i),b=index.getX(i+1);calculatePosition(vStart,vEnd,this,positionAttribute,morphPosition,a,b);var distSq=_ray.distanceSqToSegment(vStart,vEnd,interRay,interSegment);if(!(distSq>localThresholdSq)){interRay.applyMatrix4(this.matrixWorld);//Move back to world space for distance calculation\nvar distance=raycaster.ray.origin.distanceTo(interRay);distance<raycaster.near||distance>raycaster.far||intersects.push({distance:distance,// What do we want? intersection point on the ray or on the segment??\n// point: raycaster.ray.at( distance ),\npoint:interSegment.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else for(var _start2=Math.max(0,drawRange.start),_end2=Math.min(positionAttribute.count,drawRange.start+drawRange.count),_i=_start2;_i<_end2-1;_i+=step){calculatePosition(vStart,vEnd,this,positionAttribute,morphPosition,_i,_i+1);var _distSq=_ray.distanceSqToSegment(vStart,vEnd,interRay,interSegment);if(!(_distSq>localThresholdSq)){interRay.applyMatrix4(this.matrixWorld);//Move back to world space for distance calculation\nvar _distance=raycaster.ray.origin.distanceTo(interRay);_distance<raycaster.near||_distance>raycaster.far||intersects.push({distance:_distance,// What do we want? intersection point on the ray or on the segment??\n// point: raycaster.ray.at( distance ),\npoint:interSegment.clone().applyMatrix4(this.matrixWorld),index:_i,face:null,faceIndex:null,object:this})}}}else geometry.isGeometry&&console.error(\"THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\")}//\n}updateMorphTargets(){var geometry=this.geometry;if(geometry.isBufferGeometry){var morphAttributes=geometry.morphAttributes,keys=Object.keys(morphAttributes);if(0<keys.length){var morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var name,m=0,ml=morphAttribute.length;m<ml;m++)name=morphAttribute[m].name||m+\"\",this.morphTargetInfluences.push(0),this.morphTargetDictionary[name]=m}}}else{var morphTargets=geometry.morphTargets;morphTargets!==void 0&&0<morphTargets.length&&console.error(\"THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.\")}}}function calculatePosition(vStart,vEnd,object,position,morphPosition,a,b){vStart.fromBufferAttribute(position,a),vEnd.fromBufferAttribute(position,b);var morphInfluences=object.morphTargetInfluences;if(object.material.morphTargets&&morphPosition&&morphInfluences){_morphA.set(0,0,0),_morphB.set(0,0,0);for(var i=0,il=morphPosition.length;i<il;i++){var influence=morphInfluences[i],morphAttribute=morphPosition[i];0===influence||(_tempA.fromBufferAttribute(morphAttribute,a),_tempB.fromBufferAttribute(morphAttribute,b),_morphA.addScaledVector(_tempA.sub(vStart),influence),_morphB.addScaledVector(_tempB.sub(vEnd),influence))}vStart.add(_morphA),vEnd.add(_morphB)}}Line.prototype.isLine=!0;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"next\",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"throw\",err)}var gen=fn.apply(self,args);_next(void 0)})}}var THREE=__webpack_require__(3),TextureArray=function(){/**\n * Read images from an array containg src locations.\n * \n * @async\n * @param {Array} srcArrays - List of source location of the images.\n */ /**\n * Get and create the material containing shaders and the textures.\n * The texture must be read and ready before calling this function.\n * \n *\n * @param {Object} options - Customise the material with the options object.\n * @param {String} options.fs - string of the fragment shader used for \n * visualisation.\n * @param {String} options.vs - string of the vertex shader used for \n * visualisation.\n * @param {Object} options.uniforms - Containing the data to be passed into the shaders.\n * @param {String} options.glslVersion - Version of glsl used for compile this shader.\n * \n */__webpack_require__(24).Texture.call(this),this.isTextureArray=!0,this.loadFromImages=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(srcArrays){var w=1,h=1,d=0;if(srcArrays&&srcArrays.length){this.isLoading=!0;var image=new Image;image.crossOrigin=\"Anonymous\";for(var data,canvas=document.createElement(\"canvas\"),length=0,dataStacks=Array(srcArrays.length),i=0;i<srcArrays.length;i++)data=yield this.imageToUint8Array(image,srcArrays[i],canvas),data&&data.array&&(w=data.width,h=data.height,dataStacks[d]=data.array,length+=dataStacks[d].length,d++);var fullArray=new Uint8Array(length);length=0,dataStacks.forEach(data=>{fullArray.set(data,length),length+=data.length}),this.impl=new THREE.DataTexture2DArray(fullArray,w,h,d),this.size={width:w,height:h,depth:d},this.isLoading=!1}});return function(){return _ref.apply(this,arguments)}}(),this.getMaterial=function(options){if(this.impl){var material;if(!options)material=new THREE.MeshBasicMaterial({color:new THREE.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:THREE.DoubleSide});else if(options.vs&&options.fs){var transparent=!0;options.transparent&&(transparent=options.transparent);var side=THREE.FrontSide;options.side&&(side=options.side),material=new THREE.ShaderMaterial({transparent,uniforms:options.uniforms,vertexShader:options.vs,fragmentShader:options.fs,side}),options.glslVersion&&(material.glslVersion=options.glslVersion)}if(material)return material.needsUpdate=!0,material}}};/**\n * Texture array object for holding array of images into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {TextureArray}\n */TextureArray.prototype=Object.create(__webpack_require__(24).Texture.prototype),exports.TextureArray=TextureArray;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"next\",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"throw\",err)}var gen=fn.apply(self,args);_next(void 0)})}}var THREE=__webpack_require__(3),Texture=function(){this.isTexture=!0,this.impl=void 0,this.isLoading=!1,this.size={width:1,height:1,depth:0}};/**\n * Base texture object for importing images and turning them into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {Texture}\n */ /**\n * Read an image from src.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * \n * @return {Promise} img on resolve.\n */ /**\n @typedef IMAGE_UINT8_RETURN\n @type {Set}\n @property {Uint8Array} array - Array containing the uint8 image value.\n @property {Number} width - Phyiscal image width.\n @property {Number} height - Phyiscal image height.\n */ /**\n * Read an image from src and turn it into Uint8Array.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * @param {Canvas} canvas - Canvas html element used for the conversion.\n * \n * @return {IMAGE_UNIT8_RETURN}\n */ /**\n * Return true if the texture is ready for consumption.\n * \n * @return {Boolean}\n */ /**\n * Return true if the texture is ready for consumption, otherwise false.\n * \n * @return {Boolean}\n */Texture.prototype.loadImage=function(img,src){return new Promise((resolve,reject)=>{img.onload=()=>resolve(img),img.onerror=reject,img.src=src})},Texture.prototype.imageToUint8Array=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(img,src,canvas){yield this.loadImage(img,src),canvas.width=img.width,canvas.height=img.height;var ctx=canvas.getContext(\"2d\");return ctx.drawImage(img,0,0),{array:new Uint8Array(ctx.getImageData(0,0,canvas.width,canvas.height).data.buffer),width:canvas.width,height:canvas.height}});return function(){return _ref.apply(this,arguments)}}(),Texture.prototype.loadFromImages=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(){});return function(){return _ref2.apply(this,arguments)}}(),Texture.prototype.isReady=function(){return!(!this.impl||this.isLoading)},Texture.prototype.getMaterial=function(){if(this.impl)return new THREE.MeshBasicMaterial({color:new THREE.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:THREE.DoubleSide})},exports.Texture=Texture;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),shader=__webpack_require__(26),TextureSlides=function(textureIn){__webpack_require__(27).TexturePrimitive.call(this,textureIn),this.isTextureSlides=!0;var textureSettings=[],idTextureMap={};this.morph=new THREE.Group,this.morph.userData=this;/**\n @typedef SLIDE_SETTINGS\n @type {Set}\n @property {String} direction - the value must be x, y or z, specify the\n direction the slide should be facing.\n @property {Number} value - Normalised value of the location on direction.\n @property {String} id - ID of the mesh, it is only available if the settings\n is returned from {@link TextureSlides.createSlide} or \n {@link TextureSlides.getTextureSettings}.\n */ /**\n * Create the slides required for visualisation based on the slide settings.\n * The slides themselves are {THREE.PlanGeometry} objects.\n * \n * @param {SLIDE_SETTINGS} slideSettings - An array to each slide settings.\n */ /**\n * Set the value of the uniforms for a specific mesh in this\n * texture slide object.\n *\n * @param {THREE.Mesh} mesh - Mesh to be modified\n * @param {SLIDE_SETTINGS} slideSettings - Slide settings.\n */ /**\n * Modify the mesh based on a setting\n *\n * @param {SLIDE_SETTINGS} settings - s.\n */ /**\n * Create a slide required for visualisation based on the slide settings.\n * The slide itself is an {THREE.PlanGeometry} object.\n *\n * @param {SLIDE_SETTINGS} settings -settings of the slide to be created.\n * @return {SLIDE_SETTINGS} - Returned settings, it includes the newly\n * created mesh's id.\n */ /**\n * Return a copy of texture settings used by this object.\n *\n * @return {SLIDE_SETTINGS} - Returned the list of settings..\n */ /**\n * Get the array of slides, return them in an array\n *\n * @return {Array} - Return an array of {@link THREE.Object)\n */ /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Slide} slide - Slide to be remvoed\n */ /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Number} id - id of slide to be remvoed\n */ /**\n * Clean up all internal objects.\n */ /**\n * Get the bounding box of this slides.\n * It uses the max and min of the slides position and the\n * transformation to calculate the position of the box.\n * \n * @return {THREE.Box3}.\n */this.createSlides=slideSettings=>{slideSettings.forEach(slide=>this.createSlide(slide))},setUniformSlideSettingsOfMesh=(mesh,settings)=>{var material=mesh.material,uniforms=material.uniforms;switch(settings.direction){case\"x\":uniforms.direction.value=1,uniforms.slide.value.set(settings.value,0,0);break;case\"y\":uniforms.direction.value=2,uniforms.slide.value.set(0,settings.value,0);break;case\"z\":uniforms.direction.value=3,uniforms.slide.value.set(0,0,settings.value);break;default:}material.needsUpdate=!0,this.boundingBoxUpdateRequired=!0},this.modifySlideSettings=settings=>{settings&&settings.id&&settings.id in idTextureMap&&idTextureMap[settings.id]&&setUniformSlideSettingsOfMesh(idTextureMap[settings.id],settings)},this.createSlide=settings=>{if(this.texture&&this.texture.isTextureArray&&this.texture.isReady()&&settings&&settings.direction&&void 0!==settings.value){var geometry=new THREE.PlaneGeometry(1,1);geometry.translate(.5,.5,0);var uniforms=shader.getUniforms();uniforms.diffuse.value=this.texture.impl,uniforms.depth.value=this.texture.size.depth;var options={fs:shader.fs,vs:shader.vs,uniforms:uniforms,glslVersion:shader.glslVersion,side:THREE.DoubleSide,transparent:!1},material=this.texture.getMaterial(options);material.needsUpdate=!0;var mesh=new THREE.Mesh(geometry,material),slideSettings={value:settings.value,direction:settings.direction,id:mesh.id};return textureSettings.push(slideSettings),setUniformSlideSettingsOfMesh(mesh,slideSettings),idTextureMap[mesh.id]=mesh,this.morph.add(mesh),slideSettings}},this.getTextureSettings=()=>[...textureSettings],this.getSlides=()=>this.morph?[...this.morph.children]:[],this.removeSlide=slide=>{slide&&this.removeSlideWithId(slide.id)},this.removeSlideWithId=id=>{if(this.morph&&id in idTextureMap&&idTextureMap[id]){if(this.morph.getObjectById(id)){var slide=idTextureMap[id];this.morph.remove(slide),slide.clear(),slide.geometry&&slide.geometry.dispose(),slide.material&&slide.material.dispose(),this.boundingBoxUpdateRequired=!0}var index=textureSettings.findIndex(item=>item.id===id);-1<index&&textureSettings.splice(index)}},this.dispose=()=>{this.morph.children.forEach(slide=>{slide.geometry&&slide.geometry.dispose(),slide.material&&slide.material.dispose()}),__webpack_require__(27).TexturePrimitive.prototype.dispose.call(this),this.boundingBoxUpdateRequired=!0},this.getBoundingBox=function(){return this.morph&&this.morph.children&&this.morph.visible&&this.boundingBoxUpdateRequired&&(this.cachedBoundingBox.makeEmpty(),this.morph.children.forEach(slide=>{var value=slide.material.uniforms.slide.value;this.cachedBoundingBox.expandByPoint(value)}),this.morph.updateWorldMatrix(),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1),this.cachedBoundingBox}};TextureSlides.prototype=Object.create(__webpack_require__(27).TexturePrimitive.prototype),exports.TextureSlides=TextureSlides;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),glslVersion=THREE.GLSL3,fs=\"\\nprecision highp float;\\nprecision highp int;\\nprecision highp sampler2DArray;\\n\\nuniform sampler2DArray diffuse;\\nin vec3 vUw;\\n\\nout vec4 outColor;\\n\\nvoid main() {\\n\\n vec4 color = texture( diffuse, vUw );\\n\\n // lighten a bit\\n outColor = vec4( color.rgb + .2, 1.0 );\\n\\n}\\n\",vs=\"\\nout vec3 vUw;\\nuniform float depth;\\nuniform vec3 slide;\\nuniform int direction;\\n\\nvoid main() {\\n\\n vec3 slidePos = position.xyz;\\n\\n if (direction == 1)\\n slidePos = vec3(slide.x, position.x, position.y);\\n if (direction == 2)\\n slidePos = vec3(position.x, slide.y, position.y);\\n if (direction == 3)\\n slidePos = vec3(position.x, position.y, slide.z);\\n\\n gl_Position = projectionMatrix * modelViewMatrix * vec4( slidePos, 1.0 );\\n\\n vUw.xyz = vec3(slidePos.x, slidePos.y, slidePos.z * depth);\\n\\n}\\n\",getUniforms=function(){return{diffuse:{value:void 0},depth:{value:1},slide:{value:new THREE.Vector3(0,0,1)},direction:{value:1}}};exports.fs=fs,exports.vs=vs,exports.glslVersion=glslVersion,exports.getUniforms=getUniforms;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),TexturePrimitive=function(textureIn){__webpack_require__(4).ZincObject.call(this),this.isTexturePrimitive=!0,this.texture=textureIn};/**\n * Provides a base class object which stores textures and rendering object.\n * \n * @class\n * @author Alan Wu\n * @return {TexturePrimitive}\n */TexturePrimitive.prototype=Object.create(__webpack_require__(4).ZincObject.prototype),exports.TexturePrimitive=TexturePrimitive;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ResizeSensor=__webpack_require__(29);/**\r\n * Create a Zinc 3D renderer in the container provided.\r\n * The primary function of a Zinc 3D renderer is to display the current\r\n * scene (@link Scene} set to the renderer and each scene may contain as \r\n * many geometries, glyphset and other primitives as the system can support.\r\n * Zinc.Renderer also allows additional scenes to be displayed.\r\n * \r\n * @param {Object} containerIn - Container to create the renderer on.\r\n * @class\r\n * @author Alan Wu\r\n * @return {Renderer}\r\n */exports.Renderer=function(containerIn){var container=containerIn,renderer=void 0,currentScene=void 0,clock=new THREE.Clock(!1);this.playAnimation=!0;/* default animation update rate, rate is 1000 and duration \r\n is default to 6000, 6s to finish a full animation */var playRate=1e3,preRenderCallbackFunctions=[],preRenderCallbackFunctions_id=0,postRenderCallbackFunctions=[],postRenderCallbackFunctions_id=0,animated_id=void 0,cameraOrtho=void 0,sceneOrtho=void 0,logoSprite=void 0,sceneMap=[],additionalActiveScenes=[],scenesGroup=new THREE.Group,canvas=void 0,sensor=void 0,isRendering=!1,_this=this,currentSize=[0,0],currentOffset=[0,0];this.getDrawingWidth=()=>{if(container)return container.clientWidth;return canvas?\"undefined\"==typeof canvas.clientWidth?Math.round(canvas.width):Math.round(canvas.clientWidth):0},this.getDrawingHeight=()=>{if(container)return container.clientHeight;return canvas?\"undefined\"==typeof canvas.clientHeight?Math.round(canvas.height):Math.round(canvas.clientHeight):0},this.onWindowResize=()=>{currentScene.onWindowResize();var width=this.getDrawingWidth(),height=this.getDrawingHeight();if(renderer!=null){var localRect;container?(localRect=container.getBoundingClientRect(),renderer.setSize(width,height)):canvas&&(\"undefined\"==typeof canvas.getBoundingClientRect?renderer.setSize(width,height,!1):(localRect=canvas.getBoundingClientRect(),canvas.width=width,canvas.height=height,renderer.setSize(width,height,!1))),localRect&&(currentOffset[0]=localRect.left,currentOffset[1]=localRect.top);var target=new THREE.Vector2;renderer.getSize(target),currentSize[0]=target.x,currentSize[1]=target.y}},this.initialiseVisualisation=parameters=>{if(parameters=parameters||{},void 0===parameters.antialias){var onMobile=!1;try{/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(onMobile=!0)}catch(err){onMobile=!1}parameters.antialias=!onMobile}parameters.canvas&&(container=void 0,canvas=parameters.canvas),renderer=new THREE.WebGLRenderer(parameters),void 0!==container&&container.appendChild(renderer.domElement),renderer.setClearColor(16777215,1),canvas&&canvas.style&&(canvas.style.height=\"100%\",canvas.style.width=\"100%\"),renderer.autoClear=!1;var scene=this.createScene(\"default\");this.setCurrentScene(scene)},this.getCurrentScene=()=>currentScene,this.setCurrentScene=sceneIn=>{if(sceneIn){this.removeActiveScene(sceneIn);var oldScene=currentScene;currentScene=sceneIn,oldScene&&oldScene.setInteractiveControlEnable(!1),currentScene.setInteractiveControlEnable(!0),currentScene.setAdditionalScenesGroup(scenesGroup),this.onWindowResize()}},this.getSceneByName=name=>sceneMap[name],this.createScene=name=>{if(null==sceneMap[name]){var new_scene;return new_scene=canvas?new(__webpack_require__(30).Scene)(canvas,renderer):new(__webpack_require__(30).Scene)(container,renderer),sceneMap[name]=new_scene,new_scene.sceneName=name,new_scene}};this.resetView=()=>{currentScene.resetView()},this.viewAll=()=>{if(currentScene){var boundingBox=currentScene.getBoundingBox();if(boundingBox){for(i=0;i<additionalActiveScenes.length;i++){var boundingBox2=additionalActiveScenes[i].getBoundingBox();boundingBox2&&boundingBox.union(boundingBox2)}currentScene.viewAllWithBoundingBox(boundingBox)}}},this.loadModelsURL=(urls,colours,opacities,timeEnabled,morphColour,finishCallback)=>{currentScene.loadModelsURL(urls,colours,opacities,timeEnabled,morphColour,finishCallback)};this.loadViewURL=url=>{currentScene.loadViewURL(url)},this.loadFromViewURL=(jsonFilePrefix,finishCallback)=>{currentScene.loadFromViewURL(jsonFilePrefix,finishCallback)},this.updateDirectionalLight=()=>{currentScene.updateDirectionalLight()};var runAnimation=()=>{isRendering?(animated_id=requestAnimationFrame(runAnimation),this.render()):(cancelAnimationFrame(animated_id),animated_id=void 0)};/**\r\n\t * Stop the animation and renderer to get into the render loop.\r\n\t */this.stopAnimate=()=>{isRendering&&(clock.stop(),isRendering=!1)},this.animate=()=>{isRendering||(clock.start(),isRendering=!0,runAnimation())};Date.now();/**\r\n\t * Add a callback function which will be called everytime before the renderer renders its scene.\r\n\t * @param {Function} callbackFunction - callbackFunction to be added.\r\n\t * \r\n\t * @return {Number}\r\n\t */this.addPreRenderCallbackFunction=callbackFunction=>(++preRenderCallbackFunctions_id,preRenderCallbackFunctions[preRenderCallbackFunctions_id]=callbackFunction,preRenderCallbackFunctions_id),this.removePreRenderCallbackFunction=id=>{id in preRenderCallbackFunctions&&delete preRenderCallbackFunctions[id]},this.addPostRenderCallbackFunction=callbackFunction=>(++postRenderCallbackFunctions_id,postRenderCallbackFunctions[postRenderCallbackFunctions_id]=callbackFunction,postRenderCallbackFunctions_id),this.removePostRenderCallbackFunction=id=>{id in postRenderCallbackFunctions&&delete postRenderCallbackFunctions[id]},this.getPlayRate=()=>playRate,this.setPlayRate=playRateIn=>{playRate=playRateIn},this.getCurrentTime=()=>currentScene.getCurrentTime(),this.setMorphsTime=time=>{currentScene.setMorphsTime(time)},this.getZincGeometryByID=id=>currentScene.getZincGeometryByID(id),this.addToScene=object=>{currentScene.addObject(object)},this.addToOrthoScene=object=>{if(null==sceneOrtho&&(sceneOrtho=new THREE.Scene),null==cameraOrtho){var width=this.getDrawingWidth(),height=this.getDrawingHeight();cameraOrtho=new THREE.OrthographicCamera(-width/2,width/2,height/2,-height/2,1,10),cameraOrtho.position.z=10}sceneOrtho.add(object)};var createHUDSprites=logoSprite=>texture=>{texture.needsUpdate=!0;var material=new THREE.SpriteMaterial({map:texture}),imagewidth=material.map.image.width,imageheight=material.map.image.height;logoSprite.material=material,logoSprite.scale.set(imagewidth,imageheight,1);var width=this.getDrawingWidth(),height=this.getDrawingHeight();logoSprite.position.set((width-imagewidth)/2,(-height+imageheight)/2,1),this.addToOrthoScene(logoSprite)};/**\r\n\t * Render the current and all additional scenes. It will first update all geometries and glyphsets\r\n\t * in scenes, clear depth buffer and render the ortho scene, call the preRenderCallbackFunctions stack\r\n\t * , render the scenes then postRenderCallback.\r\n\t */ /**\r\n\t * Get the internal {@link Three.Renderer}, to gain access to ThreeJS APIs.\r\n\t */ /**\r\n\t * Check if a scene is currently active.\r\n\t * @param {Zinc.Scene} sceneIn - Scene to check if it is currently\r\n\t * rendered.\r\n\t */ /**\r\n\t * Add additional active scene for rendering, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be added to the rendering.\r\n\t */ /**\r\n\t * Remove a currenrtly active scene from the renderer, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be removed from rendering.\r\n\t */ /**\r\n\t * Clear all additional scenes from rendering except for curentScene.\r\n\t */ /**\r\n\t * Dispose all memory allocated, this will effetively destroy all scenes.\r\n\t */ /**\r\n\t * Transition from the current viewport to the endingScene's viewport in the specified duration.\r\n\t * \r\n\t * @param {Zinc.Scene} endingScene - Viewport of this scene will be used as the destination.\r\n\t * @param {Number} duration - Amount of time to transition from current viewport to the \r\n\t * endingScene's viewport.\r\n\t */this.addLogo=()=>{logoSprite=new THREE.Sprite;THREE.ImageUtils.loadTexture(\"images/abi_big_logo_transparent_small.png\",void 0,createHUDSprites(logoSprite))},this.render=()=>{sensor||(container?0<container.clientWidth&&0<container.clientHeight&&(sensor=new ResizeSensor(container,this.onWindowResize)):canvas&&0<canvas.width&&0<canvas.height&&(sensor=new ResizeSensor(canvas,this.onWindowResize)));var delta=clock.getDelta();for(currentScene.renderGeometries(playRate,delta,this.playAnimation),i=0;i<additionalActiveScenes.length;i++){var sceneItem=additionalActiveScenes[i];sceneItem.renderGeometries(playRate,delta,this.playAnimation)}for(key in null!=cameraOrtho&&null!=sceneOrtho&&(renderer.clearDepth(),renderer.render(sceneOrtho,cameraOrtho)),preRenderCallbackFunctions)preRenderCallbackFunctions.hasOwnProperty(key)&&preRenderCallbackFunctions[key].call();for(key in currentScene.render(renderer),postRenderCallbackFunctions)postRenderCallbackFunctions.hasOwnProperty(key)&&postRenderCallbackFunctions[key].call()},this.getThreeJSRenderer=()=>renderer,this.isSceneActive=sceneIn=>{if(currentScene===sceneIn)return!0;for(i=0;i<additionalActiveScenes.length;i++){var sceneItem=additionalActiveScenes[i];if(sceneItem===sceneIn)return!0}return!1},this.addActiveScene=additionalScene=>{this.isSceneActive(additionalScene)||(additionalActiveScenes.push(additionalScene),scenesGroup.add(additionalScene.getThreeJSScene()))},this.removeActiveScene=additionalScene=>{for(i=0;i<additionalActiveScenes.length;i++){var sceneItem=additionalActiveScenes[i];if(sceneItem===additionalScene)return additionalActiveScenes.splice(i,1),void scenesGroup.remove(additionalScene.getThreeJSScene())}},this.clearAllActiveScene=()=>{for(var _i=0;_i<additionalActiveScenes.length;_i++)scenesGroup.remove(additionalActiveScenes[_i].getThreeJSScene());additionalActiveScenes.splice(0,additionalActiveScenes.length)},this.dispose=()=>{for(var _key in isRendering&&cancelAnimationFrame(animated_id),sceneMap)sceneMap.hasOwnProperty(_key)&&sceneMap[_key].clearAll();sceneMap=[],additionalActiveScenes=[],scenesGroup=new THREE.Group,this.stopAnimate(),preRenderCallbackFunctions=[],preRenderCallbackFunctions_id=0,cameraOrtho=void 0,sceneOrtho=void 0,logoSprite=void 0;var scene=this.createScene(\"default\");this.setCurrentScene(scene),sensor=void 0},this.transitionScene=(endingScene,duration)=>{if(currentScene){var currentCamera=currentScene.getZincCameraControls(),boundingBox=endingScene.getBoundingBox();if(boundingBox){var radius=boundingBox.min.distanceTo(boundingBox.max)/2,centreX=(boundingBox.min.x+boundingBox.max.x)/2,centreY=(boundingBox.min.y+boundingBox.max.y)/2,centreZ=(boundingBox.min.z+boundingBox.max.z)/2,endingViewport=currentCamera.getViewportFromCentreAndRadius(centreX,centreY,centreZ,radius,40,radius*4),startingViewport=currentCamera.getCurrentViewport();currentCamera.cameraTransition(startingViewport,endingViewport,duration),currentCamera.enableCameraTransition()}}},this.isWebGL2=()=>!!renderer&&renderer.capabilities.isWebGL2};\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! css-element-queries/src/ResizeSensor */ \"./node_modules/css-element-queries/src/ResizeSensor.js\");\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),SceneLoader=__webpack_require__(31).SceneLoader,SceneExporter=__webpack_require__(37).SceneExporter,Viewport=__webpack_require__(39).Viewport,uniqueiId=0,getUniqueId=function(){return\"sc\"+uniqueiId++},defaultMetadata=function(){return{Duration:\"6 secs\",OriginalDuration:\"-\",TimeStamps:{}}},defaultDuration=6e3;/**\n * A Scene contains {@link Region},and \n * {@link CameraControls} which controls the viewport and additional features.\n * It is the main object used for controlling what is and what is not displayed\n * on the renderer.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {Scene}\n */exports.Scene=function(containerIn,rendererIn){var container=containerIn,videoHandler=void 0,sceneLoader=new SceneLoader(this),minimap=void 0,scene=new THREE.Scene,rootRegion=new(__webpack_require__(40).Region);scene.add(rootRegion.getGroup()),this.directionalLight=void 0,this.ambient=void 0,this.camera=void 0;var duration=6e3,zincCameraControls=void 0;this.sceneName=void 0;var stereoEffectFlag=!1,stereoEffect=void 0;this.autoClearFlag=!0,this.displayMarkers=!1,this.displayMinimap=!1,this.minimapScissor={x_offset:16,y_offset:16,width:128,height:128,align:\"top-left\",updateRequired:!0};var scissor={x:0,y:0},metadata=defaultMetadata(),_markerTarget=new THREE.Vector2,pickableObjectsList=[];this.forcePickableObjectsUpdate=!1,this.uuid=getUniqueId();var getDrawingWidth=()=>container?\"undefined\"==typeof container.clientWidth?container.width:container.clientWidth:0,getDrawingHeight=()=>container?\"undefined\"==typeof container.clientHeight?container.height:container.clientHeight:0;this.getDownloadProgress=()=>sceneLoader.getDownloadProgress(),this.onWindowResize=()=>{this.camera.aspect=getDrawingWidth()/getDrawingHeight(),this.camera.updateProjectionMatrix(),this.minimapScissor.updateRequired=!0,zincCameraControls.onResize()},this.resetView=()=>{this.onWindowResize(),zincCameraControls.resetView()},this.changeZoomByScrollRateUnit=unit=>{zincCameraControls.changeZoomByScrollRateUnit(unit)};//Setup the camera for this scene, it also initialise the lighting\nvar setupCamera=()=>{this.camera=new THREE.PerspectiveCamera(40,getDrawingWidth()/getDrawingHeight(),0,10),this.ambient=new THREE.AmbientLight(16777215,.2),scene.add(this.ambient),this.directionalLight=new THREE.DirectionalLight(16777215,.8),scene.add(this.directionalLight),zincCameraControls=new(__webpack_require__(39).CameraControls)(this.camera,rendererIn.domElement,rendererIn,this),zincCameraControls.setDirectionalLight(this.directionalLight),zincCameraControls.resetView(),minimap=new(__webpack_require__(41).Minimap)(this)};setupCamera(),this.loadView=settings=>{var viewPort=new Viewport;return viewPort.setFromObject(settings),zincCameraControls.setCurrentCameraSettings(viewPort),!0},this.setupMultipleViews=(defaultView,entries)=>{for(var[name,settings]of Object.entries(entries)){var viewport=new Viewport;viewport.setFromObject(settings),zincCameraControls.addViewport(name,viewport)}zincCameraControls.setDefaultViewport(defaultView)},this.getBoundingBox=()=>rootRegion.getBoundingBox(!0),this.viewAllWithBoundingBox=boundingBox=>{if(boundingBox){// enlarge radius to keep image within edge of window\nvar radius=boundingBox.min.distanceTo(boundingBox.max)/2,centreX=(boundingBox.min.x+boundingBox.max.x)/2,centreY=(boundingBox.min.y+boundingBox.max.y)/2,centreZ=(boundingBox.min.z+boundingBox.max.z)/2,viewport=zincCameraControls.getViewportFromCentreAndRadius(centreX,centreY,centreZ,radius,40,radius*4);zincCameraControls.setCurrentCameraSettings(viewport)}},this.viewAll=()=>{var boundingBox=this.getBoundingBox();this.viewAllWithBoundingBox(boundingBox)},this.forEachGeometry=callbackFunction=>{rootRegion.forEachGeometry(callbackFunction,!0)},this.forEachGlyphset=callbackFunction=>{rootRegion.forEachGlyphset(callbackFunction,!0)},this.forEachPointset=callbackFunction=>{rootRegion.forEachPointset(callbackFunction,!0)},this.forEachLine=callbackFunction=>{rootRegion.forEachLine(callbackFunction,!0)},this.findGeometriesWithGroupName=GroupName=>rootRegion.findGeometriesWithGroupName(GroupName,!0),this.findPointsetsWithGroupName=GroupName=>rootRegion.findPointsetsWithGroupName(GroupName,!0),this.findGlyphsetsWithGroupName=GroupName=>rootRegion.findGlyphsetsWithGroupName(GroupName,!0),this.findLinesWithGroupName=GroupName=>rootRegion.findLinesWithGroupName(GroupName,!0),this.findObjectsWithGroupName=GroupName=>rootRegion.findObjectsWithGroupName(GroupName,!0),this.findObjectsWithAnatomicalId=anatomicalId=>rootRegion.findObjectsWithAnatomicalId(anatomicalId,!0),this.getBoundingBoxOfZincObjects=objectsArray=>{for(var box,boundingBox=void 0,i=0;i<objectsArray.length;i++)box=objectsArray[i].getBoundingBox(),box&&(boundingBox?boundingBox.union(box):boundingBox=box);return boundingBox},this.vectorToScreenXY=point=>{point.project(this.camera);var width=getDrawingWidth(),height=getDrawingHeight(),widthHalf=width/2,heightHalf=height/2;return point.x=point.x*widthHalf+widthHalf,point.y=-(point.y*heightHalf)+heightHalf,point},this.getObjectsScreenXY=zincObjects=>{if(zincObjects&&0<zincObjects.length){var boundingBox=this.getBoundingBoxOfZincObjects(zincObjects),center=new THREE.Vector3;return boundingBox.getCenter(center),this.vectorToScreenXY(center)}},this.getNamedObjectsScreenXY=name=>{var zincObjects=this.findObjectsWithGroupName(name);return this.getObjectsScreenXY(zincObjects)},this.addZincObject=zincObject=>{zincObject&&(rootRegion.addZincObject(zincObject),zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(this))},this.loadGlyphsetURL=(metaurl,glyphurl,groupName,finishCallback)=>{sceneLoader.loadGlyphsetURL(rootRegion,metaurl,glyphurl,groupName,finishCallback)},this.loadPointsetURL=(url,timeEnabled,morphColour,groupName,finishCallback)=>{sceneLoader.loadPointsetURL(rootRegion,url,timeEnabled,morphColour,groupName,finishCallback)},this.loadLinesURL=(url,timeEnabled,morphColour,groupName,finishCallback)=>{sceneLoader.loadLinesURL(rootRegion,url,timeEnabled,morphColour,groupName,finishCallback)},this.loadSTL=(url,groupName,finishCallback)=>{sceneLoader.loadSTL(rootRegion,url,groupName,finishCallback)},this.loadOBJ=(url,groupName,finishCallback)=>{sceneLoader.loadOBJ(rootRegion,url,groupName,finishCallback)},this.loadMetadataURL=(url,finishCallback,allCompletedCallback)=>{sceneLoader.loadMetadataURL(rootRegion,url,finishCallback,allCompletedCallback)},this.loadModelsURL=(urls,colours,opacities,timeEnabled,morphColour,finishCallback)=>{sceneLoader.loadModelsURL(rootRegion.urls,colours,opacities,timeEnabled,morphColour,finishCallback)},this.loadViewURL=url=>{sceneLoader.loadViewURL(url)},this.loadFromViewURL=(jsonFilePrefix,finishCallback)=>{sceneLoader.loadFromViewURL(jsonFilePrefix,finishCallback)},this.loadGLTF=(url,finishCallback,options)=>{sceneLoader.loadGLTF(rootRegion,url,finishCallback,options)},this.updateDirectionalLight=()=>{zincCameraControls.updateDirectionalLight()},this.addObject=object=>{scene.add(object)},this.removeObject=object=>{scene.remove(object)},this.getCurrentTime=()=>{if(videoHandler!=null)return videoHandler.getCurrentTime(duration);var time=rootRegion.getCurrentTime();return-1===time?0:time},this.setMorphsTime=time=>{videoHandler!=null&&videoHandler.setMorphTime(time,duration),rootRegion.setMorphTime(time,!0)},this.isTimeVarying=()=>!!(videoHandler&&videoHandler.video&&!videoHandler.video.error)||rootRegion.isTimeVarying(),this.renderGeometries=(playRate,delta,playAnimation)=>{// Let video dictates the progress if one is present\nvar options={camera:zincCameraControls,displayMarkers:this.displayMarkers,markerDepths:[]};if(!videoHandler)0==sceneLoader.toBeDownloaded?(zincCameraControls.update(delta),rootRegion.renderGeometries(playRate,delta,playAnimation,options,!0)):zincCameraControls.update(0);else if(videoHandler.isReadyToPlay()){playAnimation?videoHandler.video.play():videoHandler.video.pause();var currentTime=videoHandler.video.currentTime/videoHandler.getVideoDuration()*duration;0==sceneLoader.toBeDownloaded?(zincCameraControls.setTime(currentTime),zincCameraControls.update(0),rootRegion.setMorphTime(currentTime,!0),rootRegion.renderGeometries(0,0,playAnimation,void 0,!0)):zincCameraControls.update(0)}else myPlayRate=0},this.getThreeJSScene=()=>scene,this.setVideoHandler=videoHandlerIn=>{videoHandler||(videoHandler=videoHandlerIn)},this.setAdditionalScenesGroup=scenesGroup=>{scene.add(scenesGroup)};var getWindowsPosition=(align,x_offset,y_offset,width,height,renderer_width,renderer_height)=>{var x=0,y=0;return y=align.includes(\"top\")?renderer_height-height-y_offset:align.includes(\"bottom\")?y_offset:Math.floor((renderer_height-height)/2),x=align.includes(\"left\")?x_offset:align.includes(\"right\")?renderer_width-x_offset-width:Math.floor((renderer_width-width)/2),{x:x,y:y}},renderMinimap=renderer=>{!0===this.displayMinimap&&(renderer.setScissorTest(!0),renderer.getSize(_markerTarget),this.minimapScissor.updateRequired&&(scissor=getWindowsPosition(this.minimapScissor.align,this.minimapScissor.x_offset,this.minimapScissor.y_offset,this.minimapScissor.width,this.minimapScissor.height,_markerTarget.x,_markerTarget.y),this.minimapScissor.updateRequired=!1),renderer.setScissor(scissor.x,scissor.y,this.minimapScissor.width,this.minimapScissor.height),renderer.setViewport(scissor.x,scissor.y,this.minimapScissor.width,this.minimapScissor.height),minimap.updateCamera(),scene.add(minimap.mask),renderer.render(scene,minimap.camera),scene.remove(minimap.mask),renderer.setScissorTest(!1),renderer.setViewport(0,0,_markerTarget.x,_markerTarget.y))};this.render=renderer=>{this.autoClearFlag&&renderer.clear(),stereoEffectFlag&&stereoEffect?stereoEffect.render(scene,this.camera):(renderer.render(scene,this.camera),renderMinimap(renderer))},this.setInteractiveControlEnable=flag=>{!0==flag?zincCameraControls.enable():zincCameraControls.disable()},this.getZincCameraControls=()=>zincCameraControls,this.getThreeJSScene=()=>scene,this.setDuration=durationIn=>{rootRegion.setDuration(durationIn),duration=durationIn,zincCameraControls.setPathDuration(durationIn),sceneLoader.duration=durationIn},this.getDuration=()=>duration,this.setStereoEffectEnable=stereoFlag=>{!0!=stereoFlag||stereoEffect||(stereoEffect=new __webpack_require__(39).StereoEffect(rendererIn)),rendererIn.setSize(getDrawingWidth(),getDrawingHeight()),this.camera.updateProjectionMatrix(),stereoEffectFlag=stereoFlag},this.objectIsInScene=zincObject=>rootRegion.objectIsInRegion(zincObject,!0),this.alignBoundingBoxToCameraView=(boundingBox,transitionTime)=>{if(boundingBox){var center=new THREE.Vector3;boundingBox.getCenter(center);var viewport=this.getZincCameraControls().getCurrentViewport(),target=new THREE.Vector3(viewport.targetPosition[0],viewport.targetPosition[1],viewport.targetPosition[2]),eyePosition=new THREE.Vector3(viewport.eyePosition[0],viewport.eyePosition[1],viewport.eyePosition[2]),upVector=new THREE.Vector3(viewport.upVector[0],viewport.upVector[1],viewport.upVector[2]),newVec1=new THREE.Vector3,newVec2=new THREE.Vector3;newVec1.subVectors(target,eyePosition).normalize(),newVec2.subVectors(target,center).normalize();var newVec3=new THREE.Vector3;newVec3.crossVectors(newVec1,newVec2);var angle=newVec1.angleTo(newVec2);0<transitionTime?(this.getZincCameraControls().rotateCameraTransition(newVec3,angle,transitionTime),this.getZincCameraControls().enableCameraTransition()):this.getZincCameraControls().rotateAboutLookAtpoint(newVec3,angle)}},this.alignObjectToCameraView=(zincObject,transitionTime)=>{if(this.objectIsInScene(zincObject)){var boundingBox=zincObject.getBoundingBox();this.alignBoundingBoxToCameraView(boundingBox,transitionTime)}},this.setCameraTargetToObject=zincObject=>{if(this.objectIsInScene(zincObject)){var center=new THREE.Vector3,boundingBox=zincObject.getBoundingBox(),viewport=this.getZincCameraControls().getCurrentViewport();boundingBox.getCenter(center);var target=new THREE.Vector3(viewport.targetPosition[0],viewport.targetPosition[1],viewport.targetPosition[2]),eyePosition=new THREE.Vector3(viewport.eyePosition[0],viewport.eyePosition[1],viewport.eyePosition[2]),newVec1=new THREE.Vector3,newVec2=new THREE.Vector3;newVec1.subVectors(eyePosition,target),newVec2.addVectors(center,newVec1),viewport.eyePosition[0]=newVec2.x,viewport.eyePosition[1]=newVec2.y,viewport.eyePosition[2]=newVec2.z,viewport.targetPosition[0]=center.x,viewport.targetPosition[1]=center.y,viewport.targetPosition[2]=center.z,this.getZincCameraControls().setCurrentCameraSettings(viewport)}},this.isStereoEffectEnable=()=>stereoEffectFlag,this.removeZincObject=zincObject=>{rootRegion.removeZincObject(zincObject),zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(this)},this.updatePickableThreeJSObjects=()=>{pickableObjectsList.splice(0,pickableObjectsList.length),rootRegion.getPickableThreeJSObjects(pickableObjectsList,!0),this.forcePickableObjectsUpdate=!1},this.getPickableThreeJSObjects=()=>((this.forcePickableObjectsUpdate||rootRegion.checkPickableUpdateRequred(!0))&&this.updatePickableThreeJSObjects(),pickableObjectsList),this.getNormalisedMinimapCoordinates=(renderer,event)=>{if(this.displayMinimap){var target=new THREE.Vector2;renderer.getSize(target);var offsetY=target.y-event.clientY;if(scissor.x+this.minimapScissor.width>event.clientX&&event.clientX>scissor.x&&scissor.y+this.minimapScissor.height>offsetY&&offsetY>scissor.y){var x=2*((event.clientX-scissor.x)/this.minimapScissor.width)-1,y=2*((offsetY-scissor.y)/this.minimapScissor.height)-1;return{x:x,y:y}}}},this.getMinimapDiffFromNormalised=(x,y)=>minimap?minimap.getDiffFromNormalised(x,y):void 0,this.isWebGL2=()=>rendererIn.isWebGL2(),this.clearAll=()=>{rootRegion.clear(!0),sceneLoader.toBeDwonloaded=0,zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(this)},this.addMetadataTimeStamp=(key,time)=>{metadata.TimeStamps[key]=convertDurationObjectTomSec(time)},this.getMetadataTag=key=>metadata[key],this.getMetadata=()=>metadata,this.setMetadataTag=(key,value)=>{metadata[key]=value},this.removeMetadataTag=key=>{delete metadata[key]},this.resetMetadata=()=>{metadata=defaultMetadata()},this.resetDuration=()=>{this.setDuration(defaultDuration)};// Turn the object into a readable string {years: years,months: months, \n// weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \nvar convertDurationObjectToString=duration=>[...(duration.years?[\"\".concat(duration.years,\"years\")]:[]),...(duration.months?[\"\".concat(duration.months,\"months\")]:[]),...(duration.weeks?[\"\".concat(duration.weeks,\"weeks\")]:[]),...(duration.days?[\"\".concat(duration.days,\"days\")]:[]),...(duration.hours?[\"\".concat(duration.hours,\"hours\")]:[]),...(duration.mins?[\"\".concat(duration.mins,\"mins\")]:[]),...(duration.secs?[\"\".concat(duration.secs,\"secs\")]:[])].join(\" \"),convertDurationObjectTomSec=duration=>duration.years?31536e6*duration.years:0+duration.months?2592e6*duration.months:0+duration.weeks?6048e5*duration.weeks:0+duration.days?864e5*duration.days:0+duration.hours?36e5*duration.hours:0+duration.mins?6e4*duration.mins:0+duration.secs?1e3*duration.secs:0;// Turn the object into a number representing milliesecond {years: years,months: months, \n// weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \n// Set the readable duration and timer using an object\n// with the following format {years: years,months: months, weeks: weeks, days: days,\n// hours: hours, mins: mins, secs: secs } \n// Set the readable original duration using an object\n// with the following format {years: years,months: months, weeks: weeks, days: days,\n// hours: hours, mins: mins, secs: secs } \n/**\n * Export the scene in GLTF format, it can either return it in\n * string or binary form.\n * \n * @param {Boolean} binary - Indicate it should be exported as binary or\n * text.\n * \n * @return {Promise} The exported data if the promise resolve successfully\n */ /**\n * Get the root region of the scene.\n * \n * @return {Region} Return the root region of the scene\n */this.setDurationFromObject=duration=>{var string=convertDurationObjectToString(duration),millisec=convertDurationObjectTomSec(duration);this.setMetadataTag(\"Duration\",string),this.setDuration(millisec)},this.setOriginalDurationFromObject=duration=>{var string=convertDurationObjectToString(duration);this.setMetadataTag(\"OriginalDuration\",string)},this.exportGLTF=binary=>{var exporter=new SceneExporter(this);return exporter.exportGLTF(binary)},this.getRootRegion=()=>rootRegion};\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),resolveURL=__webpack_require__(6).resolveURL,STLLoader=__webpack_require__(32).STLLoader,OBJLoader=__webpack_require__(33).OBJLoader,PrimitivesLoader=__webpack_require__(34).PrimitivesLoader,createNewURL=(target,reference)=>{var newURL=new URL(target,reference).href;//Make sure the target url does not contain parameters\nif(target&&2>target.split(\"?\").length){var paramsStrings=reference.split(\"?\");//There are parameters, add them to the target\n2===paramsStrings.length&&(newURL=newURL+\"?\"+paramsStrings[1])}return newURL};/**\n * A helper class to help with reading / importing primitives and\n * settings into a {@link Scene}.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {SceneLoader}\n */exports.SceneLoader=function(sceneIn){var scene=sceneIn;this.toBeDownloaded=0,this.progressMap=[];var viewLoaded=!1,errorDownload=!1,primitivesLoader=new PrimitivesLoader;this.getDownloadProgress=()=>{var totalSize=0,totalLoaded=0,unknownFound=!1;for(var key in this.progressMap){var progress=this.progressMap[key];totalSize+=progress[1],totalLoaded+=progress[0],0==progress[1]&&(unknownFound=!0)}return unknownFound&&(totalSize=0),[totalSize,totalLoaded,errorDownload]},this.onProgress=id=>xhr=>{this.progressMap[id]=[xhr.loaded,xhr.total]},this.onError=finishCallback=>()=>{--this.toBeDownloaded,errorDownload=!0,finishCallback&&finishCallback()};var loadMultipleViews=(referenceURL,views)=>{var defaultView=views.Default;if(views.Inline)scene.setupMultipleViews(defaultView,views.Entries);else{var promises=[],_loop=function(key,value){referenceURL&&(newURL=createNewURL(value,referenceURL),promises.push(new Promise((resolve,reject)=>{// Add parameters if we are sent them\nfetch(newURL).then(response=>response.json()).then(data=>resolve({key:key,data:data})).catch(data=>reject(data))})))};for(var[key,value]of Object.entries(views.Entries))_loop(key,value);Promise.all(promises).then(values=>{var entries={};values.forEach(entry=>{entries[entry.key]=entry.data}),scene.setupMultipleViews(defaultView,entries);var zincCameraControls=scene.getZincCameraControls();zincCameraControls&&zincCameraControls.setCurrentViewport(defaultView),viewLoaded=!0})}};/**\n * Load the viewport from an external location provided by the url.\n * @param {String} URL - address to the file containing viewport information.\n */this.loadViewURL=(url,finishCallback)=>{this.toBeDownloaded+=1;var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState)if(200==xmlhttp.status){var viewData=JSON.parse(xmlhttp.responseText);scene.setupMultipleViews(\"default\",{default:viewData}),scene.resetView(),viewLoaded=!0,--this.toBeDownloaded,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback()}else this.onError()},requestURL=resolveURL(url),xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()},this.loadModelsURL=(region,urls,colours,opacities,timeEnabled,morphColour,finishCallback)=>{var number=urls.length;this.toBeDownloaded+=number;for(var _i=0;_i<number;_i++){var filename=urls[_i],colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity;colours!=null&&colours[_i]!=null&&(colour=!!colours[_i]),opacities!=null&&opacities[_i]!=null&&(opacity=opacities[_i]);var localTimeEnabled=0;timeEnabled!=null&&timeEnabled[_i]!=null&&(localTimeEnabled=!!timeEnabled[_i]);var localMorphColour=0;morphColour!=null&&morphColour[_i]!=null&&(localMorphColour=!!morphColour[_i]),primitivesLoader.load(resolveURL(filename),meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,void 0,void 0,void 0,finishCallback),this.onProgress(_i),this.onError(finishCallback))}},this.loadFromViewURL=(targetRegion,jsonFilePrefix,finishCallback)=>{var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){var viewData=JSON.parse(xmlhttp.responseText);scene.loadView(viewData);for(var filename,urls=[],_i2=0;_i2<viewData.numberOfResources;_i2++)filename=jsonFilePrefix+\"_\"+(_i2+1)+\".json\",urls.push(filename);this.loadModelsURL(targetRegion,urls,viewData.colour,viewData.opacity,viewData.timeEnabled,viewData.morphColour,finishCallback)}},requestURL=resolveURL(jsonFilePrefix+\"_view.json\"),xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()};//Internal loader for a regular zinc geometry.\nvar linesloader=(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)=>(geometry,materials)=>{var newLines=new(__webpack_require__(20).Lines),material=void 0;materials&&materials[0]&&(material=new THREE.LineBasicMaterial({color:materials[0].color.clone()}),1>materials[0].opacity&&(material.transparent=!0),material.opacity=materials[0].opacity,material.morphTargets=localTimeEnabled,material.vertexColors=materials[0].vertexColors);var options={};options.localTimeEnabled=localTimeEnabled,options.localMorphColour=localMorphColour,newLines&&(newLines.createLineSegment(geometry,material,options),newLines.setName(groupName),newLines.anatomicalId=anatomicalId,newLines.setRenderOrder=renderOrder,region.addZincObject(newLines),newLines.setDuration(scene.getDuration())),--this.toBeDownloaded,geometry.dispose(),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(newLines)};/**\n * Load lines into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */this.loadLinesURL=(region,url,timeEnabled,morphColour,groupName,finishCallback,options)=>{var localTimeEnabled=0;this.toBeDownloaded+=1;var isInline=!!(options&&options.isInline)&&options.isInline,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0;null!=timeEnabled&&(localTimeEnabled=!!timeEnabled);var localMorphColour=0;if(null!=morphColour&&(localMorphColour=!!morphColour),isInline){var object=primitivesLoader.parse(url);linesloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)(object.geometry,object.materials)}else primitivesLoader.load(url,linesloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback),this.onProgress(i),this.onError(finishCallback))};var loadGlyphset=(region,glyphsetData,glyphurl,groupName,finishCallback,options)=>{var isInline=options&&options.isInline?options.isInline:void 0,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,displayLabels=options&&options.displayLabels?options.displayLabels:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0,newGlyphset=new(__webpack_require__(13).Glyphset);newGlyphset.setDuration(scene.getDuration()),newGlyphset.groupName=groupName;var myCallback=()=>{--this.toBeDownloaded,finishCallback!=null&&\"function\"==typeof finishCallback&&finishCallback(newGlyphset)};++this.toBeDownloaded,isInline?newGlyphset.load(glyphsetData,glyphurl,myCallback,isInline,displayLabels):newGlyphset.load(glyphsetData,resolveURL(glyphurl),myCallback,isInline,displayLabels),newGlyphset.anatomicalId=anatomicalId,newGlyphset.setRenderOrder(renderOrder),region.addZincObject(newGlyphset)},onLoadGlyphsetReady=(region,xmlhttp,glyphurl,groupName,finishCallback,options)=>()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){var glyphsetData=JSON.parse(xmlhttp.responseText);loadGlyphset(region,glyphsetData,glyphurl,groupName,finishCallback,options)}},pointsetloader=(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)=>(geometry,materials)=>{var newPointset=new(__webpack_require__(17).Pointset),material=new THREE.PointsMaterial({alphaTest:.5,size:10,sizeAttenuation:!1});materials&&materials[0]&&(1>materials[0].opacity&&(material.transparent=!0),material.opacity=materials[0].opacity,material.color=materials[0].color,material.morphTargets=localTimeEnabled,material.vertexColors=materials[0].vertexColors);var options={};options.localTimeEnabled=localTimeEnabled,options.localMorphColour=localMorphColour,newPointset&&(newPointset.createMesh(geometry,material,options),newPointset.setName(groupName),region.addZincObject(newPointset),newPointset.setDuration(scene.getDuration()),newPointset.setRenderOrder(renderOrder)),geometry.dispose(),--this.toBeDownloaded,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(newPointset)};//Load a glyphset into this scene.\nthis.loadSTL=(region,url,groupName,finishCallback)=>{this.toBeDownloaded+=1;var colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity,loader=new STLLoader;loader.crossOrigin=\"Anonymous\",loader.load(resolveURL(url),meshloader(region,colour,opacity,!1,!1,groupName,void 0,void 0,finishCallback))},this.loadOBJ=(region,url,groupName,finishCallback)=>{this.toBeDownloaded+=1;var colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity,loader=new OBJLoader;loader.crossOrigin=\"Anonymous\",loader.load(resolveURL(url),meshloader(region,colour,opacity,!1,!1,groupName,void 0,void 0,finishCallback))};//Loader for the OBJ format, \nvar objloader=(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,finishCallback)=>object=>{this.toBeDownloaded--,object.traverse(child=>{if(child instanceof THREE.Mesh){var zincGeometry=addMeshToZincGeometry(child,localTimeEnabled,localMorphColour);region.addZincObject(zincGeometry),zincGeometry.morph&&(zincGeometry.morph.name=groupName),zincGeometry.groupName=groupName,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(zincGeometry)}})},loadSurfaceURL=(region,url,timeEnabled,morphColour,groupName,finishCallback,options)=>{this.toBeDownloaded+=1;var colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity,localTimeEnabled=0,isInline=!!(options&&options.isInline)&&options.isInline,fileFormat=options&&options.fileFormat?options.fileFormat:void 0,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0;timeEnabled!=null&&(localTimeEnabled=!!timeEnabled);var localMorphColour=0;morphColour!=null&&(localMorphColour=!!morphColour);var loader=primitivesLoader;if(fileFormat!==void 0)if(\"STL\"==fileFormat)loader=new STLLoader;else if(\"OBJ\"==fileFormat)return loader=new OBJLoader,loader.crossOrigin=\"Anonymous\",void loader.load(url,objloader(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,finishCallback),this.onProgress(i),this.onError);if(isInline){var object=primitivesLoader.parse(url);meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)(object.geometry,object.materials)}else loader.crossOrigin=\"Anonymous\",primitivesLoader.load(url,meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback),this.onProgress(i),this.onError(finishCallback))},metaFinishCallback=function(numberOfDownloaded,finishCallback,allCompletedCallback){var downloadedItem=0;return zincObject=>{if(++downloadedItem,zincObject&&null!=finishCallback&&\"function\"==typeof finishCallback){finishCallback(zincObject);var zincCameraControls=scene.getZincCameraControls();zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(scene)}downloadedItem==numberOfDownloaded&&(!1===viewLoaded&&scene.viewAll(),null!=allCompletedCallback&&\"function\"==typeof allCompletedCallback&&allCompletedCallback())}};/**\n * Load a geometry into this scene, this is a subsequent called from \n * {@link Zinc.Scene#loadMetadataURL}, although it can be used to read\n * in geometry into the scene externally.\n * \n * @param {String} url - regular json model file providing geometry.\n * @param {Boolean} timeEnabled - Indicate if geometry morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {STRING} fileFormat - name supported formats are STL, OBJ and JSON.\n * @param {Function} finishCallback - Callback function which will be called\n * once the geometry is succssfully loaded in.\n */this.loadPointsetURL=(region,url,timeEnabled,morphColour,groupName,finishCallback,options)=>{var localTimeEnabled=0;this.toBeDownloaded+=1,timeEnabled!=null&&(localTimeEnabled=!!timeEnabled);var localMorphColour=0;morphColour!=null&&(localMorphColour=!!morphColour);var isInline=!!(options&&options.isInline)&&options.isInline,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0;if(isInline){var object=primitivesLoader.parse(url);pointsetloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)(object.geometry,object.materials)}else primitivesLoader.load(url,pointsetloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback),this.onProgress(i),this.onError(finishCallback))},this.loadGlyphsetURL=(region,metaurl,glyphurl,groupName,finishCallback,options)=>{var isInline=!!(options&&options.isInline)&&options.isInline;if(isInline)loadGlyphset(region,metaurl,glyphurl,groupName,finishCallback,options);else{var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=onLoadGlyphsetReady(region,xmlhttp,glyphurl,groupName,finishCallback,options),xmlhttp.open(\"GET\",resolveURL(metaurl),!0),xmlhttp.send()}},addZincGeometry=(region,geometryIn,colour,opacity,localTimeEnabled,localMorphColour,finishCallback,materialIn,groupName)=>{var newGeometry=new(__webpack_require__(2).Geometry);return newGeometry.createMesh(geometryIn,materialIn,{colour:colour,opacity:opacity,localTimeEnabled:localTimeEnabled,localMorphColour:localMorphColour}),newGeometry.morph?(newGeometry.setName(groupName),region&®ion.addZincObject(newGeometry),newGeometry.setDuration(scene.getDuration()),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(newGeometry),newGeometry.videoHandler&&scene.setVideoHandler(newGeometry.videoHandler),newGeometry):void 0};//Internal loader for a regular zinc geometry.\nvar meshloader=(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)=>(geometry,materials)=>{var material;materials&&materials[0]&&(material=materials[0]);var zincGeometry=addZincGeometry(region,geometry,colour,opacity,localTimeEnabled,localMorphColour,void 0,material,groupName,renderOrder);zincGeometry.anatomicalId=anatomicalId,zincGeometry.setRenderOrder(renderOrder),--this.toBeDownloaded,geometry.dispose(),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(zincGeometry)},parseDuration=durationString=>{var regex=/P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?)?$/,[,years,months,weeks,days,hours,mins,secs]=durationString.match(regex);return{years:years,months:months,weeks:weeks,days:days,hours:hours,mins:mins,secs:secs}};//Turn ISO 8601 duration string into an array.\nthis.loadSettings=item=>{if(item){//duration uses the ISO 8601 standard - PnYnMnDTnHnMnS\nif(item.Duration){var duration=parseDuration(item.Duration);scene.setDurationFromObject(duration)}if(item.OriginalDuration){var _duration=parseDuration(item.OriginalDuration);scene.setOriginalDurationFromObject(_duration)}if(item.TimeStamps)for(var key in item.TimeStamps){var time=parseDuration(item.TimeStamps[key]);scene.addMetadataTimeStamp(key,time)}}};//Function to process each of the graphical metadata item except for view and\n//settings.\nvar readPrimitivesItem=(region,referenceURL,item,order,finishCallback)=>{if(item){var _newURL=void 0,isInline=!1;item.URL?(_newURL=item.URL,referenceURL&&(_newURL=createNewURL(item.URL,referenceURL))):item.Inline&&(_newURL=item.Inline.URL,isInline=!0);var groupName=item.GroupName;(groupName===void 0||\"\"===groupName)&&(groupName=\"_Unnamed\");var options={isInline:isInline,fileFormat:item.FileFormat,anatomicalId:item.AnatomicalId,compression:item.compression,renderOrder:order};switch(item.Type){case\"Surfaces\":loadSurfaceURL(region,_newURL,item.MorphVertices,item.MorphColours,groupName,finishCallback,options);break;case\"Glyph\":var newGeometryURL;isInline?newGeometryURL=item.Inline.GlyphGeometriesURL:(newGeometryURL=item.GlyphGeometriesURL,newGeometryURL=createNewURL(item.GlyphGeometriesURL,referenceURL)),item.DisplayLabels&&(options.displayLabels=!0),this.loadGlyphsetURL(region,_newURL,newGeometryURL,groupName,finishCallback,options);break;case\"Points\":this.loadPointsetURL(region,_newURL,item.MorphVertices,item.MorphColours,groupName,finishCallback,options);break;case\"Lines\":this.loadLinesURL(region,_newURL,item.MorphVertices,item.MorphColours,groupName,finishCallback,options);break;default:}}},readViewAndSettingsItem=(referenceURL,item,finishCallback)=>{if(item){var _newURL2=void 0,isInline=!1;switch(item.URL?(_newURL2=item.URL,referenceURL&&(_newURL2=createNewURL(item.URL,referenceURL))):item.Inline&&(_newURL2=item.Inline.URL,isInline=!0),item.Type){case\"View\":isInline?(scene.setupMultipleViews(\"default\",{default:_newURL2}),viewLoaded=!0,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback()):this.loadViewURL(_newURL2,finishCallback);break;case\"Settings\":this.loadSettings(item);break;default:}}};//Function to read the view item first\nthis.loadGLTF=(region,url,finishCallback,options)=>{var GLTFToZincJSLoader=new(__webpack_require__(35).GLTFToZincJSLoader);GLTFToZincJSLoader.load(scene,region,url,finishCallback,options)};var loadRegions=(currentRegion,referenceURL,regions,callback)=>{if(regions.Primitives&®ions.Primitives.forEach(primitive=>{var order=1;primitive.Order&&(order=primitive.Order),readPrimitivesItem(currentRegion,referenceURL,primitive,order,callback)}),regions.Transformation&¤tRegion.setTransformation(regions.Transformation),regions.Children)for(var[regionName,value]of Object.entries(regions.Children)){var childRegion=currentRegion.findOrCreateChildFromPath(regionName);childRegion&&loadRegions(childRegion,referenceURL,value,callback)}},getNumberOfDownloadsInArray=(array,includeViews)=>{if(Array.isArray(array)){for(var count=0,_i3=0;_i3<array.length;_i3++)array[_i3].Type&&(includeViews&&\"View\"===array[_i3].Type||\"Surfaces\"===array[_i3].Type||\"Glyph\"===array[_i3].Type||\"Points\"===array[_i3].Type||\"Lines\"===array[_i3].Type)&&count++;return count}return 0},getNumberOfObjectsInRegions=regionJson=>{var counts=regionJson.Primitives?getNumberOfDownloadsInArray(regionJson.Primitives,!1):0;return regionJson.Children&&Object.values(regionJson.Children).forEach(childRegion=>{counts+=getNumberOfObjectsInRegions(childRegion)}),counts},getNumberOfObjects=metadata=>{if(Array.isArray(metadata))return getNumberOfDownloadsInArray(metadata,!0);return\"object\"==typeof metadata&&null!==metadata&&\"2.0\"===metadata.Version?getNumberOfObjectsInRegions(metadata.Regions):void 0},readVersionOneRegionPath=(region,referenceURL,item,order,callback)=>{var targetRegion=region;//Render order is set to i * 2 to account for front and back rendering\nitem.RegionPath&&\"\"!==item.RegionPath&&(targetRegion=region.findOrCreateChildFromPath(item.RegionPath)),readPrimitivesItem(targetRegion,referenceURL,item,2*order,callback)},loadVersionOne=(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback)=>{// Prioritise the view file and settings before loading anything else\nfor(var numberOfObjects=getNumberOfObjects(metadata),callback=new metaFinishCallback(numberOfObjects,finishCallback,allCompletedCallback),_i4=0;_i4<metadata.length;_i4++)readViewAndSettingsItem(referenceURL,metadata[_i4],callback);for(var _i5=0;_i5<metadata.length;_i5++)readVersionOneRegionPath(targetRegion,referenceURL,metadata[_i5],_i5,callback)},loadVersionTwo=(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback)=>{var numberOfObjects=getNumberOfObjects(metadata),callback=new metaFinishCallback(numberOfObjects,finishCallback,allCompletedCallback);// view file does not receive callback\nmetadata.Settings&&this.loadSettings(metadata.Settings),metadata.Views&&loadMultipleViews(referenceURL,metadata.Views,referenceURL),metadata.Regions&&loadRegions(targetRegion,referenceURL,metadata.Regions,callback)};/**\n * Load a metadata file from the provided URL into this scene. Once\n * succssful scene proceeds to read each items into scene for visualisations.\n * \n * @param {String} url - Location of the metafile\n * @param {Function} finishCallback - Callback function which will be called\n * for each glyphset and geometry that has been written in.\n */this.loadMetadataURL=(targetRegion,url,finishCallback,allCompletedCallback)=>{var xmlhttp=new XMLHttpRequest,requestURL=resolveURL(url);xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){scene.resetMetadata(),scene.resetDuration(),viewLoaded=!1;var referenceURL=xmlhttp.responseURL;referenceURL===void 0&&(referenceURL=new URL(requestURL).href);var metadata=JSON.parse(xmlhttp.responseText);Array.isArray(metadata)?loadVersionOne(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback):\"object\"==typeof metadata&&null!==metadata&&\"2.0\"==metadata.Version&&loadVersionTwo(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback)}},xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()}};\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STLLoader\", function() { return STLLoader; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs.\n *\n * Supports both binary and ASCII encoded files, with automatic detection of type.\n *\n * The loader returns a non-indexed buffer geometry.\n *\n * Limitations:\n * Binary decoding supports \"Magics\" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL).\n * There is perhaps some question as to how valid it is to always assume little-endian-ness.\n * ASCII decoding assumes file is UTF-8.\n *\n * Usage:\n * const loader = new STLLoader();\n * loader.load( './models/stl/slotted_disk.stl', function ( geometry ) {\n * scene.add( new THREE.Mesh( geometry ) );\n * });\n *\n * For binary STLs geometry might contain colors for vertices. To use it:\n * // use the same code to load STL as above\n * if (geometry.hasColors) {\n * material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: true });\n * } else { .... }\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For ASCII STLs containing multiple solids, each solid is assigned to a different group.\n * Groups can be used to assign a different color by defining an array of materials with the same length of\n * geometry.groups and passing it to the Mesh constructor:\n *\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For example:\n *\n * const materials = [];\n * const nGeometryGroups = geometry.groups.length;\n *\n * const colorMap = ...; // Some logic to index colors.\n *\n * for (let i = 0; i < nGeometryGroups; i++) {\n *\n *\t\tconst material = new THREE.MeshPhongMaterial({\n *\t\t\tcolor: colorMap[i],\n *\t\t\twireframe: false\n *\t\t});\n *\n * }\n *\n * materials.push(material);\n * const mesh = new THREE.Mesh(geometry, materials);\n */class STLLoader extends three__WEBPACK_IMPORTED_MODULE_0__[\"Loader\"]{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){var scope=this,loader=new three__WEBPACK_IMPORTED_MODULE_0__[\"FileLoader\"](this.manager);loader.setPath(this.path),loader.setResponseType(\"arraybuffer\"),loader.setRequestHeader(this.requestHeader),loader.setWithCredentials(this.withCredentials),loader.load(url,function(text){try{onLoad(scope.parse(text))}catch(e){onError?onError(e):console.error(e),scope.manager.itemError(url)}},onProgress,onError)}parse(data){function matchDataViewAt(query,reader,offset){// Check if each byte in query matches the corresponding byte from the current offset\nfor(var i=0,il=query.length;i<il;i++)if(query[i]!==reader.getUint8(offset+i,!1))return!1;return!0}// start\nvar binData=function(buffer){if(\"string\"==typeof buffer){for(var array_buffer=new Uint8Array(buffer.length),i=0;i<buffer.length;i++)array_buffer[i]=255&buffer.charCodeAt(i);// implicitly assumes little-endian\nreturn array_buffer.buffer||array_buffer}return buffer}(data);return function(data){var reader=new DataView(data),n_faces=reader.getUint32(80,!0);if(80+32/8+n_faces*(3*(32/8)+3*(3*(32/8))+16/8)===reader.byteLength)return!0;// An ASCII STL data must begin with 'solid ' as the first six bytes.\n// However, ASCII STLs lacking the SPACE after the 'd' are known to be\n// plentiful. So, check the first 5 bytes for 'solid'.\n// Several encodings, such as UTF-8, precede the text with up to 5 bytes:\n// https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding\n// Search for \"solid\" to start anywhere after those prefixes.\n// US-ASCII ordinal values for 's', 'o', 'l', 'i', 'd'\nfor(var solid=[115,111,108,105,100],off=0;5>off;off++)// If \"solid\" text is matched to the current offset, declare it to be an ASCII STL.\nif(matchDataViewAt(solid,reader,off))return!1;// Couldn't find \"solid\" text at the beginning; it is binary STL.\nreturn!0}(binData)?function(data){// process STL header\n// check for default color in header (\"COLOR=rgba\" sequence).\nfor(var r,g,b,colors,defaultR,defaultG,defaultB,alpha,reader=new DataView(data),faces=reader.getUint32(80,!0),hasColors=!1,index=0;index<80-10;index++)1129270351==reader.getUint32(index,!1)/*COLO*/&&82==reader.getUint8(index+4)/*'R'*/&&61==reader.getUint8(index+5)/*'='*/&&(hasColors=!0,colors=new Float32Array(3*(3*faces)),defaultR=reader.getUint8(index+6)/255,defaultG=reader.getUint8(index+7)/255,defaultB=reader.getUint8(index+8)/255,alpha=reader.getUint8(index+9)/255);for(var geometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],vertices=new Float32Array(3*(3*faces)),normals=new Float32Array(3*(3*faces)),face=0;face<faces;face++){var start=84+face*(12*4+2),normalX=reader.getFloat32(start,!0),normalY=reader.getFloat32(start+4,!0),normalZ=reader.getFloat32(start+8,!0);if(hasColors){var packedColor=reader.getUint16(start+48,!0);0==(32768&packedColor)?(r=(31&packedColor)/31,g=(31&packedColor>>5)/31,b=(31&packedColor>>10)/31):(r=defaultR,g=defaultG,b=defaultB)}for(var i=1;3>=i;i++){var vertexstart=start+12*i,componentIdx=3*(3*face)+3*(i-1);vertices[componentIdx]=reader.getFloat32(vertexstart,!0),vertices[componentIdx+1]=reader.getFloat32(vertexstart+4,!0),vertices[componentIdx+2]=reader.getFloat32(vertexstart+8,!0),normals[componentIdx]=normalX,normals[componentIdx+1]=normalY,normals[componentIdx+2]=normalZ,hasColors&&(colors[componentIdx]=r,colors[componentIdx+1]=g,colors[componentIdx+2]=b)}}return geometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](vertices,3)),geometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](normals,3)),hasColors&&(geometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colors,3)),geometry.hasColors=!0,geometry.alpha=alpha),geometry}(binData):function(data){for(var result,geometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],patternSolid=/solid([\\s\\S]*?)endsolid/g,patternFace=/facet([\\s\\S]*?)endfacet/g,faceCounter=0,patternFloat=/[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)/.source,patternVertex=new RegExp(\"vertex\"+patternFloat+patternFloat+patternFloat,\"g\"),patternNormal=new RegExp(\"normal\"+patternFloat+patternFloat+patternFloat,\"g\"),vertices=[],normals=[],normal=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],groupCount=0,startVertex=0,endVertex=0;null!==(result=patternSolid.exec(data));){startVertex=endVertex;for(var solid=result[0];null!==(result=patternFace.exec(solid));){for(var vertexCountPerFace=0,normalCountPerFace=0,text=result[0];null!==(result=patternNormal.exec(text));)normal.x=parseFloat(result[1]),normal.y=parseFloat(result[2]),normal.z=parseFloat(result[3]),normalCountPerFace++;for(;null!==(result=patternVertex.exec(text));)vertices.push(parseFloat(result[1]),parseFloat(result[2]),parseFloat(result[3])),normals.push(normal.x,normal.y,normal.z),vertexCountPerFace++,endVertex++;// every face have to own ONE valid normal\n1!==normalCountPerFace&&console.error(\"THREE.STLLoader: Something isn't right with the normal of face number \"+faceCounter),3!=vertexCountPerFace&&console.error(\"THREE.STLLoader: Something isn't right with the vertices of face number \"+faceCounter),faceCounter++}var start=startVertex,count=endVertex-startVertex;geometry.addGroup(start,count,groupCount),groupCount++}return geometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](vertices,3)),geometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](normals,3)),geometry}(function(buffer){return\"string\"==typeof buffer?buffer:three__WEBPACK_IMPORTED_MODULE_0__[\"LoaderUtils\"].decodeText(new Uint8Array(buffer))}(data))}}\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"OBJLoader\", function() { return OBJLoader; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\n// o object_name | g group_name\nvar _object_pattern=/^[og]\\s*(.+)?/,_material_library_pattern=/^mtllib /,_material_use_pattern=/^usemtl /,_map_use_pattern=/^usemap /,_vA=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_vB=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_vC=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_ab=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_cb=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];// mtllib file_reference\nfunction ParserState(){var state={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function startObject(name,fromDeclaration){// If the current object (initial from reset) is not from a g/o declaration in the parsed\n// file. We need to use it for the first parsed g/o to keep things in sync.\nif(this.object&&!1===this.object.fromDeclaration)return this.object.name=name,void(this.object.fromDeclaration=!1!==fromDeclaration);var previousMaterial=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;// Inherit previous objects material.\n// Spec tells us that a declared material must be set to all objects until a new material is declared.\n// If a usemtl declaration is encountered while this new object is being parsed, it will\n// overwrite the inherited material. Exception being that there was already face declarations\n// to the inherited material, then it will be preserved for proper MultiMaterial continuation.\nif(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:name||\"\",fromDeclaration:!1!==fromDeclaration,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function startMaterial(name,libraries){var previous=this._finalize(!1);// New usemtl declaration overwrites an inherited material, except if faces were declared\n// after the material, then it must be preserved for proper MultiMaterial continuation.\nprevious&&(previous.inherited||0>=previous.groupCount)&&this.materials.splice(previous.index,1);var material={index:this.materials.length,name:name||\"\",mtllib:Array.isArray(libraries)&&0<libraries.length?libraries[libraries.length-1]:\"\",smooth:void 0===previous?this.smooth:previous.smooth,groupStart:void 0===previous?0:previous.groupEnd,groupEnd:-1,groupCount:-1,inherited:!1,clone:function clone(index){var cloned={index:\"number\"==typeof index?index:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return cloned.clone=this.clone.bind(cloned),cloned}};return this.materials.push(material),material},currentMaterial:function currentMaterial(){return 0<this.materials.length?this.materials[this.materials.length-1]:void 0},_finalize:function _finalize(end){var lastMultiMaterial=this.currentMaterial();// Ignore objects tail materials if no face declarations followed them before a new o/g started.\nif(lastMultiMaterial&&-1===lastMultiMaterial.groupEnd&&(lastMultiMaterial.groupEnd=this.geometry.vertices.length/3,lastMultiMaterial.groupCount=lastMultiMaterial.groupEnd-lastMultiMaterial.groupStart,lastMultiMaterial.inherited=!1),end&&1<this.materials.length)for(var mi=this.materials.length-1;0<=mi;mi--)0>=this.materials[mi].groupCount&&this.materials.splice(mi,1);// Guarantee at least one empty material, this makes the creation later more straight forward.\nreturn end&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),lastMultiMaterial}},previousMaterial&&previousMaterial.name&&\"function\"==typeof previousMaterial.clone){var declared=previousMaterial.clone(0);declared.inherited=!0,this.object.materials.push(declared)}this.objects.push(this.object)},finalize:function finalize(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function parseVertexIndex(value,len){var index=parseInt(value,10);return 3*(0<=index?index-1:index+len/3)},parseNormalIndex:function parseNormalIndex(value,len){var index=parseInt(value,10);return 3*(0<=index?index-1:index+len/3)},parseUVIndex:function parseUVIndex(value,len){var index=parseInt(value,10);return 2*(0<=index?index-1:index+len/2)},addVertex:function addVertex(a,b,c){var src=this.vertices,dst=this.object.geometry.vertices;dst.push(src[a+0],src[a+1],src[a+2]),dst.push(src[b+0],src[b+1],src[b+2]),dst.push(src[c+0],src[c+1],src[c+2])},addVertexPoint:function addVertexPoint(a){var src=this.vertices,dst=this.object.geometry.vertices;dst.push(src[a+0],src[a+1],src[a+2])},addVertexLine:function addVertexLine(a){var src=this.vertices,dst=this.object.geometry.vertices;dst.push(src[a+0],src[a+1],src[a+2])},addNormal:function addNormal(a,b,c){var src=this.normals,dst=this.object.geometry.normals;dst.push(src[a+0],src[a+1],src[a+2]),dst.push(src[b+0],src[b+1],src[b+2]),dst.push(src[c+0],src[c+1],src[c+2])},addFaceNormal:function addFaceNormal(a,b,c){var src=this.vertices,dst=this.object.geometry.normals;_vA.fromArray(src,a),_vB.fromArray(src,b),_vC.fromArray(src,c),_cb.subVectors(_vC,_vB),_ab.subVectors(_vA,_vB),_cb.cross(_ab),_cb.normalize(),dst.push(_cb.x,_cb.y,_cb.z),dst.push(_cb.x,_cb.y,_cb.z),dst.push(_cb.x,_cb.y,_cb.z)},addColor:function addColor(a,b,c){var src=this.colors,dst=this.object.geometry.colors;void 0!==src[a]&&dst.push(src[a+0],src[a+1],src[a+2]),void 0!==src[b]&&dst.push(src[b+0],src[b+1],src[b+2]),void 0!==src[c]&&dst.push(src[c+0],src[c+1],src[c+2])},addUV:function addUV(a,b,c){var src=this.uvs,dst=this.object.geometry.uvs;dst.push(src[a+0],src[a+1]),dst.push(src[b+0],src[b+1]),dst.push(src[c+0],src[c+1])},addDefaultUV:function addDefaultUV(){var dst=this.object.geometry.uvs;dst.push(0,0),dst.push(0,0),dst.push(0,0)},addUVLine:function addUVLine(a){var src=this.uvs,dst=this.object.geometry.uvs;dst.push(src[a+0],src[a+1])},addFace:function addFace(a,b,c,ua,ub,uc,na,nb,nc){var vLen=this.vertices.length,ia=this.parseVertexIndex(a,vLen),ib=this.parseVertexIndex(b,vLen),ic=this.parseVertexIndex(c,vLen);// normals\nif(this.addVertex(ia,ib,ic),this.addColor(ia,ib,ic),void 0!==na&&\"\"!==na){var nLen=this.normals.length;ia=this.parseNormalIndex(na,nLen),ib=this.parseNormalIndex(nb,nLen),ic=this.parseNormalIndex(nc,nLen),this.addNormal(ia,ib,ic)}else this.addFaceNormal(ia,ib,ic);// uvs\nif(void 0!==ua&&\"\"!==ua){var uvLen=this.uvs.length;ia=this.parseUVIndex(ua,uvLen),ib=this.parseUVIndex(ub,uvLen),ic=this.parseUVIndex(uc,uvLen),this.addUV(ia,ib,ic),this.object.geometry.hasUVIndices=!0}else// add placeholder values (for inconsistent face definitions)\nthis.addDefaultUV()},addPointGeometry:function addPointGeometry(vertices){this.object.geometry.type=\"Points\";for(var index,vLen=this.vertices.length,vi=0,l=vertices.length;vi<l;vi++)index=this.parseVertexIndex(vertices[vi],vLen),this.addVertexPoint(index),this.addColor(index)},addLineGeometry:function addLineGeometry(vertices,uvs){this.object.geometry.type=\"Line\";for(var vLen=this.vertices.length,uvLen=this.uvs.length,vi=0,l=vertices.length;vi<l;vi++)this.addVertexLine(this.parseVertexIndex(vertices[vi],vLen));for(var uvi=0,_l=uvs.length;uvi<_l;uvi++)this.addUVLine(this.parseUVIndex(uvs[uvi],uvLen))}};return state.startObject(\"\",!1),state}//\nclass OBJLoader extends three__WEBPACK_IMPORTED_MODULE_0__[\"Loader\"]{constructor(manager){super(manager),this.materials=null}load(url,onLoad,onProgress,onError){var scope=this,loader=new three__WEBPACK_IMPORTED_MODULE_0__[\"FileLoader\"](this.manager);loader.setPath(this.path),loader.setRequestHeader(this.requestHeader),loader.setWithCredentials(this.withCredentials),loader.load(url,function(text){try{onLoad(scope.parse(text))}catch(e){onError?onError(e):console.error(e),scope.manager.itemError(url)}},onProgress,onError)}setMaterials(materials){return this.materials=materials,this}parse(text){var state=new ParserState;-1!==text.indexOf(\"\\r\\n\")&&(text=text.replace(/\\r\\n/g,\"\\n\")),-1!==text.indexOf(\"\\\\\\n\")&&(text=text.replace(/\\\\\\n/g,\"\"));for(var lines=text.split(\"\\n\"),line=\"\",lineFirstChar=\"\",lineLength=0,result=[],trimLeft=\"function\"==typeof\"\".trimLeft,i=0,l=lines.length;i<l;i++)if(line=lines[i],line=trimLeft?line.trimLeft():line.trim(),lineLength=line.length,0!==lineLength&&(lineFirstChar=line.charAt(0),\"#\"!==lineFirstChar))// @todo invoke passed in handler if any\nif(\"v\"===lineFirstChar){var data=line.split(/\\s+/);switch(data[0]){case\"v\":state.vertices.push(parseFloat(data[1]),parseFloat(data[2]),parseFloat(data[3])),7<=data.length?state.colors.push(parseFloat(data[4]),parseFloat(data[5]),parseFloat(data[6])):state.colors.push(void 0,void 0,void 0);break;case\"vn\":state.normals.push(parseFloat(data[1]),parseFloat(data[2]),parseFloat(data[3]));break;case\"vt\":state.uvs.push(parseFloat(data[1]),parseFloat(data[2]));}}else if(\"f\"===lineFirstChar){// Parse the face vertex data into an easy to work with format\nfor(var vertex,lineData=line.substr(1).trim(),vertexData=lineData.split(/\\s+/),faceVertices=[],j=0,jl=vertexData.length;j<jl;j++)if(vertex=vertexData[j],0<vertex.length){var vertexParts=vertex.split(\"/\");faceVertices.push(vertexParts)}// Draw an edge between the first vertex and all subsequent vertices to form an n-gon\nfor(var v1=faceVertices[0],_j=1,_jl=faceVertices.length-1;_j<_jl;_j++){var v2=faceVertices[_j],v3=faceVertices[_j+1];state.addFace(v1[0],v2[0],v3[0],v1[1],v2[1],v3[1],v1[2],v2[2],v3[2])}}else if(\"l\"===lineFirstChar){var lineParts=line.substring(1).trim().split(\" \"),lineVertices=[],lineUVs=[];if(-1===line.indexOf(\"/\"))lineVertices=lineParts;else for(var parts,li=0,llen=lineParts.length;li<llen;li++)parts=lineParts[li].split(\"/\"),\"\"!==parts[0]&&lineVertices.push(parts[0]),\"\"!==parts[1]&&lineUVs.push(parts[1]);state.addLineGeometry(lineVertices,lineUVs)}else if(\"p\"===lineFirstChar){var _lineData=line.substr(1).trim(),pointData=_lineData.split(\" \");state.addPointGeometry(pointData)}else if(null!==(result=_object_pattern.exec(line))){// o object_name\n// or\n// g group_name\n// WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869\n// let name = result[ 0 ].substr( 1 ).trim();\nvar name=(\" \"+result[0].substr(1).trim()).substr(1);state.startObject(name)}else if(_material_use_pattern.test(line))// material\nstate.object.startMaterial(line.substring(7).trim(),state.materialLibraries);else if(_material_library_pattern.test(line))// mtl file\nstate.materialLibraries.push(line.substring(7).trim());else if(_map_use_pattern.test(line))// the line is parsed but ignored since the loader assumes textures are defined MTL files\n// (according to https://www.okino.com/conv/imp_wave.htm, 'usemap' is the old-style Wavefront texture reference method)\nconsole.warn(\"THREE.OBJLoader: Rendering identifier \\\"usemap\\\" not supported. Textures must be defined in MTL files.\");else if(\"s\"===lineFirstChar){// smooth shading\n// @todo Handle files that have varying smooth values for a set of faces inside one geometry,\n// but does not define a usemtl for each face set.\n// This should be detected and a dummy material created (later MultiMaterial and geometry groups).\n// This requires some care to not create extra material on each smooth value for \"normal\" obj files.\n// where explicit usemtl defines geometry groups.\n// Example asset: examples/models/obj/cerberus/Cerberus.obj\n/*\n\t\t\t\t\t * http://paulbourke.net/dataformats/obj/\n\t\t\t\t\t * or\n\t\t\t\t\t * http://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf\n\t\t\t\t\t *\n\t\t\t\t\t * From chapter \"Grouping\" Syntax explanation \"s group_number\":\n\t\t\t\t\t * \"group_number is the smoothing group number. To turn off smoothing groups, use a value of 0 or off.\n\t\t\t\t\t * Polygonal elements use group numbers to put elements in different smoothing groups. For free-form\n\t\t\t\t\t * surfaces, smoothing groups are either turned on or off; there is no difference between values greater\n\t\t\t\t\t * than 0.\"\n\t\t\t\t\t */if(result=line.split(\" \"),1<result.length){var value=result[1].trim().toLowerCase();state.object.smooth=\"0\"!==value&&\"off\"!==value}else// ZBrush can produce \"s\" lines #11707\nstate.object.smooth=!0;var material=state.object.currentMaterial();material&&(material.smooth=state.object.smooth)}else{// Handle null terminated files without exception\nif(\"\\0\"===line)continue;console.warn(\"THREE.OBJLoader: Unexpected line: \\\"\"+line+\"\\\"\")}state.finalize();var container=new three__WEBPACK_IMPORTED_MODULE_0__[\"Group\"];container.materialLibraries=[].concat(state.materialLibraries);var hasPrimitives=1!==state.objects.length||0!==state.objects[0].geometry.vertices.length;if(!0==hasPrimitives)for(var _i=0,_l2=state.objects.length;_i<_l2;_i++){var object=state.objects[_i],geometry=object.geometry,materials=object.materials,isLine=\"Line\"===geometry.type,isPoints=\"Points\"===geometry.type,hasVertexColors=!1;// Skip o/g line declarations that did not follow with any faces\nif(0!==geometry.vertices.length){var buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"];buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.vertices,3)),0<geometry.normals.length&&buffergeometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.normals,3)),0<geometry.colors.length&&(hasVertexColors=!0,buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.colors,3))),!0===geometry.hasUVIndices&&buffergeometry.setAttribute(\"uv\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.uvs,2));for(var createdMaterials=[],mi=0,miLen=materials.length;mi<miLen;mi++){var sourceMaterial=materials[mi],materialHash=sourceMaterial.name+\"_\"+sourceMaterial.smooth+\"_\"+hasVertexColors,_material=state.materials[materialHash];if(null!==this.materials)// mtl etc. loaders probably can't create line materials correctly, copy properties to a line material.\nif(_material=this.materials.create(sourceMaterial.name),isLine&&_material&&!(_material instanceof three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"])){var materialLine=new three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"];three__WEBPACK_IMPORTED_MODULE_0__[\"Material\"].prototype.copy.call(materialLine,_material),materialLine.color.copy(_material.color),_material=materialLine}else if(isPoints&&_material&&!(_material instanceof three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"])){var materialPoints=new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"]({size:10,sizeAttenuation:!1});three__WEBPACK_IMPORTED_MODULE_0__[\"Material\"].prototype.copy.call(materialPoints,_material),materialPoints.color.copy(_material.color),materialPoints.map=_material.map,_material=materialPoints}void 0===_material&&(_material=isLine?new three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"]:isPoints?new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"]({size:1,sizeAttenuation:!1}):new three__WEBPACK_IMPORTED_MODULE_0__[\"MeshPhongMaterial\"],_material.name=sourceMaterial.name,_material.flatShading=!sourceMaterial.smooth,_material.vertexColors=hasVertexColors,state.materials[materialHash]=_material),createdMaterials.push(_material)}// Create mesh\nvar mesh=void 0;if(1<createdMaterials.length){for(var _sourceMaterial,_mi=0,_miLen=materials.length;_mi<_miLen;_mi++)_sourceMaterial=materials[_mi],buffergeometry.addGroup(_sourceMaterial.groupStart,_sourceMaterial.groupCount,_mi);mesh=isLine?new three__WEBPACK_IMPORTED_MODULE_0__[\"LineSegments\"](buffergeometry,createdMaterials):isPoints?new three__WEBPACK_IMPORTED_MODULE_0__[\"Points\"](buffergeometry,createdMaterials):new three__WEBPACK_IMPORTED_MODULE_0__[\"Mesh\"](buffergeometry,createdMaterials)}else mesh=isLine?new three__WEBPACK_IMPORTED_MODULE_0__[\"LineSegments\"](buffergeometry,createdMaterials[0]):isPoints?new three__WEBPACK_IMPORTED_MODULE_0__[\"Points\"](buffergeometry,createdMaterials[0]):new three__WEBPACK_IMPORTED_MODULE_0__[\"Mesh\"](buffergeometry,createdMaterials[0]);mesh.name=object.name,container.add(mesh)}}else// if there is only the default parser state object with no geometry data, interpret data as point cloud\nif(0<state.vertices.length){var _material2=new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"]({size:1,sizeAttenuation:!1}),_buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"];_buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](state.vertices,3)),0<state.colors.length&&void 0!==state.colors[0]&&(_buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](state.colors,3)),_material2.vertexColors=!0);var points=new three__WEBPACK_IMPORTED_MODULE_0__[\"Points\"](_buffergeometry,_material2);container.add(points)}return container}}\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar JSONLoader=__webpack_require__(14).JSONLoader;exports.PrimitivesLoader=function(){var concurrentDownloads=0;this.crossOrigin=\"Anonymous\";var loader=new JSONLoader,waitingList=[];this.load=(url,onLoad,onProgress,onError)=>{if(20>concurrentDownloads){++concurrentDownloads,loader.crossOrigin=this.crossOrigin;var onLoadCallback=new onFinally(onLoad,this),onErrorCallback=new onFinally(onError,this);loader.load(url,onLoadCallback,onProgress,onErrorCallback)}else waitingList.push({url,onLoad,onProgress,onError})},this.loadFromWaitingList=()=>{var item=waitingList.shift();item&&this.load(item.url,item.onLoad,item.onProgress,item.onError)};var onFinally=function(callback,loader){return function(){--concurrentDownloads,callback(...arguments),loader.loadFromWaitingList()}};this.parse=data=>loader.parse(data)};\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),GLTFLoader=__webpack_require__(36).GLTFLoader,GLTFToZincJSLoader=function(){var _this=this;/**\n * Load GLTF into this scene object.\n * \n * @param {String} url - URL to the GLTF file\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */this.parseGLTFObjects=(object,region,depth,finishCallback)=>{var childRegion=region;if(0!==depth)if(\"Object3D\"!==object.type){var zincGeometry;if(\"Mesh\"===object.type?zincGeometry=new(__webpack_require__(2).Geometry):\"LineSegments\"===object.type?zincGeometry=new(__webpack_require__(20).Lines):\"Points\"===object.type&&(zincGeometry=new(__webpack_require__(17).Pointset)),zincGeometry){var localTimeEnabled=!1,localMorphColour=!1;object.geometry&&object.geometry.morphAttributes&&(localTimeEnabled=!!object.geometry.morphAttributes.position,localMorphColour=!!object.geometry.morphAttributes.color),zincGeometry.setMesh(object.clone(),localTimeEnabled,localMorphColour),region.addZincObject(zincGeometry),zincGeometry.groupName=zincGeometry.morph.name,zincGeometry.morph.matrixAutoUpdate=!0,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(zincGeometry)}}else if(\"\"!==object.name&&(region&&(childRegion=region.findOrCreateChildFromPath(object.name)),childRegion)){var group=childRegion.getGroup();group.position.copy(object.position),group.rotation.copy(object.rotation),group.quaternion.copy(object.quaternion),group.matrixAutoUpdate=!0}depth++,object.children.forEach(child=>{_this.parseGLTFObjects(child,childRegion,depth,finishCallback)})},this.setCamera=scene=>{scene.viewAll();var cameraControls=scene.getZincCameraControls(),viewport=cameraControls.getCurrentViewport();cameraControls.addViewport(\"default\",viewport),cameraControls.setDefaultViewport(\"default\")},this.load=(scene,region,url,finishCallback,allCompletedCallback)=>{var path=url.substring(0,url.lastIndexOf(\"/\")+1),filename=url.substring(url.lastIndexOf(\"/\")+1,url.length),loader=new GLTFLoader().setPath(path);loader.load(filename,function(gltf){console.log(gltf),_this.parseGLTFObjects(gltf.scene,region,0,finishCallback),_this.setCamera(scene),allCompletedCallback!=null&&\"function\"==typeof allCompletedCallback&&allCompletedCallback()})}};exports.GLTFToZincJSLoader=GLTFToZincJSLoader;\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! three/examples/jsm/loaders/GLTFLoader */ \"./node_modules/three/examples/jsm/loaders/GLTFLoader.js\");\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar GLTFExporter=__webpack_require__(38).GLTFExporter,SceneExporter=function(sceneIn){var scene=sceneIn;this.exportGLTF=binary=>{var rootRegion=scene.getRootRegion(),zincObjects=rootRegion.getAllObjects(!0),animations=[];zincObjects.forEach(zincObject=>{zincObject.animationClip&&animations.push({clip:zincObject.animationClip[0],mesh:zincObject.morph})});var exporter=new GLTFExporter,options={binary,animations};return new Promise(resolve=>{exporter.parse(scene.getThreeJSScene(),function(gltf){resolve(gltf)},options)})}};/**\n * Provides an object which uses for exporting the scene\n * \n * @class\n * @author Alan Wu\n * @return {SceneExporter}\n */exports.SceneExporter=SceneExporter;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GLTFExporter\", function() { return GLTFExporter; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nclass GLTFExporter{constructor(){this.pluginCallbacks=[],this.register(function(writer){return new GLTFLightExtension(writer)}),this.register(function(writer){return new GLTFMaterialsUnlitExtension(writer)}),this.register(function(writer){return new GLTFMaterialsPBRSpecularGlossiness(writer)})}register(callback){return-1===this.pluginCallbacks.indexOf(callback)&&this.pluginCallbacks.push(callback),this}unregister(callback){return-1!==this.pluginCallbacks.indexOf(callback)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(callback),1),this}/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */parse(input,onDone,options){for(var writer=new GLTFWriter,plugins=[],i=0,il=this.pluginCallbacks.length;i<il;i++)plugins.push(this.pluginCallbacks[i](writer));writer.setPlugins(plugins),writer.write(input,onDone,options)}}//------------------------------------------------------------------------------\n// Constants\n//------------------------------------------------------------------------------\nvar WEBGL_CONSTANTS={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,FLOAT:5126,UNSIGNED_INT:5125,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},THREE_TO_WEBGL={};THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"NearestFilter\"]]=WEBGL_CONSTANTS.NEAREST,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"NearestMipmapNearestFilter\"]]=WEBGL_CONSTANTS.NEAREST_MIPMAP_NEAREST,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"NearestMipmapLinearFilter\"]]=WEBGL_CONSTANTS.NEAREST_MIPMAP_LINEAR,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"LinearFilter\"]]=WEBGL_CONSTANTS.LINEAR,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"LinearMipmapNearestFilter\"]]=WEBGL_CONSTANTS.LINEAR_MIPMAP_NEAREST,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"LinearMipmapLinearFilter\"]]=WEBGL_CONSTANTS.LINEAR_MIPMAP_LINEAR,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"ClampToEdgeWrapping\"]]=WEBGL_CONSTANTS.CLAMP_TO_EDGE,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]]=WEBGL_CONSTANTS.REPEAT,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"MirroredRepeatWrapping\"]]=WEBGL_CONSTANTS.MIRRORED_REPEAT;var PATH_PROPERTIES={scale:\"scale\",position:\"translation\",quaternion:\"rotation\",morphTargetInfluences:\"weights\"},GLB_HEADER_BYTES=12,GLB_HEADER_MAGIC=1179937895,GLB_VERSION=2,GLB_CHUNK_PREFIX_BYTES=8,GLB_CHUNK_TYPE_JSON=1313821514,GLB_CHUNK_TYPE_BIN=5130562;// GLB constants\n// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\n//------------------------------------------------------------------------------\n// Utility functions\n//------------------------------------------------------------------------------\n/**\n * Compare two arrays\n * @param {Array} array1 Array 1 to compare\n * @param {Array} array2 Array 2 to compare\n * @return {Boolean} Returns true if both arrays are equal\n */function equalArray(array1,array2){return array1.length===array2.length&&array1.every(function(element,index){return element===array2[index]})}/**\n * Converts a string to an ArrayBuffer.\n * @param {string} text\n * @return {ArrayBuffer}\n */function stringToArrayBuffer(text){if(window.TextEncoder!==void 0)return new TextEncoder().encode(text).buffer;for(var value,array=new Uint8Array(new ArrayBuffer(text.length)),i=0,il=text.length;i<il;i++)// Replacing multi-byte character with space(0x20).\nvalue=text.charCodeAt(i),array[i]=255<value?32:value;return array.buffer}/**\n * Is identity matrix\n *\n * @param {Matrix4} matrix\n * @returns {Boolean} Returns true, if parameter is identity matrix\n */function isIdentityMatrix(matrix){return equalArray(matrix.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}/**\n * Get the min and max vectors from the given attribute\n * @param {BufferAttribute} attribute Attribute to find the min/max in range from start to start + count\n * @param {Integer} start\n * @param {Integer} count\n * @return {Object} Object containing the `min` and `max` values (As an array of attribute.itemSize components)\n */function getMinMax(attribute,start,count){for(var output={min:Array(attribute.itemSize).fill(Number.POSITIVE_INFINITY),max:Array(attribute.itemSize).fill(Number.NEGATIVE_INFINITY)},i=start;i<start+count;i++)for(var value,a=0;a<attribute.itemSize;a++)value=void 0,4<attribute.itemSize?value=attribute.array[i*attribute.itemSize+a]:0===a?value=attribute.getX(i):1===a?value=attribute.getY(i):2===a?value=attribute.getZ(i):3==a&&(value=attribute.getW(i)),output.min[a]=Math.min(output.min[a],value),output.max[a]=Math.max(output.max[a],value);return output}/**\n * Get the required size + padding for a buffer, rounded to the next 4-byte boundary.\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#data-alignment\n *\n * @param {Integer} bufferSize The size the original buffer.\n * @returns {Integer} new buffer size with required padding.\n *\n */function getPaddedBufferSize(bufferSize){return 4*Math.ceil(bufferSize/4)}/**\n * Returns a buffer aligned to 4-byte boundary.\n *\n * @param {ArrayBuffer} arrayBuffer Buffer to pad\n * @param {Integer} paddingByte (Optional)\n * @returns {ArrayBuffer} The same buffer if it's already aligned to 4-byte boundary or a new buffer\n */function getPaddedArrayBuffer(arrayBuffer){var paddingByte=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,paddedLength=getPaddedBufferSize(arrayBuffer.byteLength);if(paddedLength!==arrayBuffer.byteLength){var array=new Uint8Array(paddedLength);if(array.set(new Uint8Array(arrayBuffer)),0!==paddingByte)for(var i=arrayBuffer.byteLength;i<paddedLength;i++)array[i]=paddingByte;return array.buffer}return arrayBuffer}var cachedCanvas=null;/**\n * Writer\n */class GLTFWriter{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.uids=new Map,this.uid=0,this.json={asset:{version:\"2.0\",generator:\"THREE.GLTFExporter\"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(plugins){this.plugins=plugins}/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */write(input,onDone,options){this.options=Object.assign({},{// default options\nbinary:!1,trs:!1,onlyVisible:!0,truncateDrawRange:!0,embedImages:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},options),0<this.options.animations.length&&(this.options.trs=!0),this.processInput(input);var writer=this;Promise.all(this.pending).then(function(){var buffers=writer.buffers,json=writer.json,options=writer.options,extensionsUsed=writer.extensionsUsed,blob=new Blob(buffers,{type:\"application/octet-stream\"}),extensionsUsedList=Object.keys(extensionsUsed);if(0<extensionsUsedList.length&&(json.extensionsUsed=extensionsUsedList),json.buffers&&0<json.buffers.length&&(json.buffers[0].byteLength=blob.size),!0===options.binary){// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\nvar reader=new window.FileReader;reader.readAsArrayBuffer(blob),reader.onloadend=function(){// Binary chunk.\nvar binaryChunk=getPaddedArrayBuffer(reader.result),binaryChunkPrefix=new DataView(new ArrayBuffer(GLB_CHUNK_PREFIX_BYTES));binaryChunkPrefix.setUint32(0,binaryChunk.byteLength,!0),binaryChunkPrefix.setUint32(4,GLB_CHUNK_TYPE_BIN,!0);// JSON chunk.\nvar jsonChunk=getPaddedArrayBuffer(stringToArrayBuffer(JSON.stringify(json)),32),jsonChunkPrefix=new DataView(new ArrayBuffer(GLB_CHUNK_PREFIX_BYTES));jsonChunkPrefix.setUint32(0,jsonChunk.byteLength,!0),jsonChunkPrefix.setUint32(4,GLB_CHUNK_TYPE_JSON,!0);// GLB header.\nvar header=new ArrayBuffer(GLB_HEADER_BYTES),headerView=new DataView(header);headerView.setUint32(0,GLB_HEADER_MAGIC,!0),headerView.setUint32(4,GLB_VERSION,!0);var totalByteLength=GLB_HEADER_BYTES+jsonChunkPrefix.byteLength+jsonChunk.byteLength+binaryChunkPrefix.byteLength+binaryChunk.byteLength;headerView.setUint32(8,totalByteLength,!0);var glbBlob=new Blob([header,jsonChunkPrefix,jsonChunk,binaryChunkPrefix,binaryChunk],{type:\"application/octet-stream\"}),glbReader=new window.FileReader;glbReader.readAsArrayBuffer(glbBlob),glbReader.onloadend=function(){onDone(glbReader.result)}}}else if(json.buffers&&0<json.buffers.length){var _reader=new window.FileReader;_reader.readAsDataURL(blob),_reader.onloadend=function(){var base64data=_reader.result;json.buffers[0].uri=base64data,onDone(json)}}else onDone(json)})}/**\n\t * Serializes a userData.\n\t *\n\t * @param {THREE.Object3D|THREE.Material} object\n\t * @param {Object} objectDef\n\t */serializeUserData(object,objectDef){if(!(object.userData&&object.userData.isZincObject)&&0!==Object.keys(object.userData).length){var options=this.options,extensionsUsed=this.extensionsUsed;try{var json=JSON.parse(JSON.stringify(object.userData));if(options.includeCustomExtensions&&json.gltfExtensions){for(var extensionName in void 0===objectDef.extensions&&(objectDef.extensions={}),json.gltfExtensions)objectDef.extensions[extensionName]=json.gltfExtensions[extensionName],extensionsUsed[extensionName]=!0;delete json.gltfExtensions}0<Object.keys(json).length&&(objectDef.extras=json)}catch(error){console.warn(\"THREE.GLTFExporter: userData of '\"+object.name+\"' \"+\"won't be serialized because of JSON.stringify error - \"+error.message)}}}/**\n\t * Assign and return a temporal unique id for an object\n\t * especially which doesn't have .uuid\n\t * @param {Object} object\n\t * @return {Integer}\n\t */getUID(object){return this.uids.has(object)||this.uids.set(object,this.uid++),this.uids.get(object)}/**\n\t * Checks if normal attribute values are normalized.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {Boolean}\n\t */isNormalizedNormalAttribute(normal){var cache=this.cache;if(cache.attributesNormalized.has(normal))return!1;for(var v=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],i=0,il=normal.count;i<il;i++)// 0.0005 is from glTF-validator\nif(5e-4<Math.abs(v.fromBufferAttribute(normal,i).length()-1))return!1;return!0}/**\n\t * Creates normalized normal buffer attribute.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {BufferAttribute}\n\t *\n\t */createNormalizedNormalAttribute(normal){var cache=this.cache;if(cache.attributesNormalized.has(normal))return cache.attributesNormalized.get(normal);for(var attribute=normal.clone(),v=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],i=0,il=attribute.count;i<il;i++)v.fromBufferAttribute(attribute,i),0===v.x&&0===v.y&&0===v.z?v.setX(1):v.normalize(),attribute.setXYZ(i,v.x,v.y,v.z);return cache.attributesNormalized.set(normal,attribute),attribute}/**\n\t * Applies a texture transform, if present, to the map definition. Requires\n\t * the KHR_texture_transform extension.\n\t *\n\t * @param {Object} mapDef\n\t * @param {THREE.Texture} texture\n\t */applyTextureTransform(mapDef,texture){var didTransform=!1,transformDef={};(0!==texture.offset.x||0!==texture.offset.y)&&(transformDef.offset=texture.offset.toArray(),didTransform=!0),0!==texture.rotation&&(transformDef.rotation=texture.rotation,didTransform=!0),(1!==texture.repeat.x||1!==texture.repeat.y)&&(transformDef.scale=texture.repeat.toArray(),didTransform=!0),didTransform&&(mapDef.extensions=mapDef.extensions||{},mapDef.extensions.KHR_texture_transform=transformDef,this.extensionsUsed.KHR_texture_transform=!0)}/**\n\t * Process a buffer to append to the default one.\n\t * @param {ArrayBuffer} buffer\n\t * @return {Integer}\n\t */processBuffer(buffer){var json=this.json,buffers=this.buffers;return json.buffers||(json.buffers=[{byteLength:0}]),buffers.push(buffer),0}/**\n\t * Process and generate a BufferView\n\t * @param {BufferAttribute} attribute\n\t * @param {number} componentType\n\t * @param {number} start\n\t * @param {number} count\n\t * @param {number} target (Optional) Target usage of the BufferView\n\t * @return {Object}\n\t */processBufferView(attribute,componentType,start,count,target){var json=this.json;json.bufferViews||(json.bufferViews=[]);// Create a new dataview and dump the attribute's array into it\nvar componentSize=componentType===WEBGL_CONSTANTS.UNSIGNED_BYTE?1:componentType===WEBGL_CONSTANTS.UNSIGNED_SHORT?2:4;for(var byteLength=getPaddedBufferSize(count*attribute.itemSize*componentSize),dataView=new DataView(new ArrayBuffer(byteLength)),offset=0,i=start;i<start+count;i++)for(var value,a=0;a<attribute.itemSize;a++)value=void 0,4<attribute.itemSize?value=attribute.array[i*attribute.itemSize+a]:0===a?value=attribute.getX(i):1===a?value=attribute.getY(i):2===a?value=attribute.getZ(i):3==a&&(value=attribute.getW(i)),componentType===WEBGL_CONSTANTS.FLOAT?dataView.setFloat32(offset,value,!0):componentType===WEBGL_CONSTANTS.UNSIGNED_INT?dataView.setUint32(offset,value,!0):componentType===WEBGL_CONSTANTS.UNSIGNED_SHORT?dataView.setUint16(offset,value,!0):componentType===WEBGL_CONSTANTS.UNSIGNED_BYTE&&dataView.setUint8(offset,value),offset+=componentSize;var bufferViewDef={buffer:this.processBuffer(dataView.buffer),byteOffset:this.byteOffset,byteLength:byteLength};target!==void 0&&(bufferViewDef.target=target),target===WEBGL_CONSTANTS.ARRAY_BUFFER&&(bufferViewDef.byteStride=attribute.itemSize*componentSize),this.byteOffset+=byteLength,json.bufferViews.push(bufferViewDef);// @TODO Merge bufferViews where possible.\nvar output={id:json.bufferViews.length-1,byteLength:0};return output}/**\n\t * Process and generate a BufferView from an image Blob.\n\t * @param {Blob} blob\n\t * @return {Promise<Integer>}\n\t */processBufferViewImage(blob){var writer=this,json=writer.json;return json.bufferViews||(json.bufferViews=[]),new Promise(function(resolve){var reader=new window.FileReader;reader.readAsArrayBuffer(blob),reader.onloadend=function(){var buffer=getPaddedArrayBuffer(reader.result),bufferViewDef={buffer:writer.processBuffer(buffer),byteOffset:writer.byteOffset,byteLength:buffer.byteLength};writer.byteOffset+=buffer.byteLength,resolve(json.bufferViews.push(bufferViewDef)-1)}})}/**\n\t * Process attribute to generate an accessor\n\t * @param {BufferAttribute} attribute Attribute to process\n\t * @param {THREE.BufferGeometry} geometry (Optional) Geometry used for truncated draw range\n\t * @param {Integer} start (Optional)\n\t * @param {Integer} count (Optional)\n\t * @return {Integer|null} Index of the processed accessor on the \"accessors\" array\n\t */processAccessor(attribute,geometry,start,count){var componentType,options=this.options,json=this.json;// Detect the component type of the attribute array (float, uint or ushort)\nif(attribute.array.constructor===Float32Array)componentType=WEBGL_CONSTANTS.FLOAT;else if(attribute.array.constructor===Uint32Array)componentType=WEBGL_CONSTANTS.UNSIGNED_INT;else if(attribute.array.constructor===Uint16Array)componentType=WEBGL_CONSTANTS.UNSIGNED_SHORT;else if(attribute.array.constructor===Uint8Array)componentType=WEBGL_CONSTANTS.UNSIGNED_BYTE;else throw new Error(\"THREE.GLTFExporter: Unsupported bufferAttribute component type.\");// @TODO Indexed buffer geometry with drawRange not supported yet\nif(void 0===start&&(start=0),void 0===count&&(count=attribute.count),options.truncateDrawRange&&void 0!==geometry&&null===geometry.index){var end=start+count,end2=geometry.drawRange.count===1/0?attribute.count:geometry.drawRange.start+geometry.drawRange.count;start=Math.max(start,geometry.drawRange.start),count=Math.min(end,end2)-start,0>count&&(count=0)}// Skip creating an accessor if the attribute doesn't have data to export\nif(0===count)return null;var bufferViewTarget,minMax=getMinMax(attribute,start,count);void 0!==geometry&&(bufferViewTarget=attribute===geometry.index?WEBGL_CONSTANTS.ELEMENT_ARRAY_BUFFER:WEBGL_CONSTANTS.ARRAY_BUFFER);var bufferView=this.processBufferView(attribute,componentType,start,count,bufferViewTarget),accessorDef={bufferView:bufferView.id,byteOffset:bufferView.byteOffset,componentType:componentType,count:count,max:minMax.max,min:minMax.min,type:{1:\"SCALAR\",2:\"VEC2\",3:\"VEC3\",4:\"VEC4\",16:\"MAT4\"}[attribute.itemSize]};return!0===attribute.normalized&&(accessorDef.normalized=!0),json.accessors||(json.accessors=[]),json.accessors.push(accessorDef)-1}/**\n\t * Process image\n\t * @param {Image} image to process\n\t * @param {Integer} format of the image (e.g. RGBFormat, RGBAFormat etc)\n\t * @param {Boolean} flipY before writing out the image\n\t * @return {Integer} Index of the processed texture in the \"images\" array\n\t */processImage(image,format,flipY){var writer=this,cache=writer.cache,json=writer.json,options=writer.options,pending=writer.pending;cache.images.has(image)||cache.images.set(image,{});var cachedImages=cache.images.get(image),mimeType=format===three__WEBPACK_IMPORTED_MODULE_0__[\"RGBAFormat\"]?\"image/png\":\"image/jpeg\",key=mimeType+\":flipY/\"+flipY.toString();if(void 0!==cachedImages[key])return cachedImages[key];json.images||(json.images=[]);var imageDef={mimeType:mimeType};if(options.embedImages){var canvas=cachedCanvas=cachedCanvas||document.createElement(\"canvas\");canvas.width=Math.min(image.width,options.maxTextureSize),canvas.height=Math.min(image.height,options.maxTextureSize);var ctx=canvas.getContext(\"2d\");if(!0===flipY&&(ctx.translate(0,canvas.height),ctx.scale(1,-1)),\"undefined\"!=typeof HTMLImageElement&&image instanceof HTMLImageElement||\"undefined\"!=typeof HTMLCanvasElement&&image instanceof HTMLCanvasElement||\"undefined\"!=typeof OffscreenCanvas&&image instanceof OffscreenCanvas||\"undefined\"!=typeof ImageBitmap&&image instanceof ImageBitmap)ctx.drawImage(image,0,0,canvas.width,canvas.height);else{format!==three__WEBPACK_IMPORTED_MODULE_0__[\"RGBAFormat\"]&&format!==three__WEBPACK_IMPORTED_MODULE_0__[\"RGBFormat\"]&&console.error(\"GLTFExporter: Only RGB and RGBA formats are supported.\"),(image.width>options.maxTextureSize||image.height>options.maxTextureSize)&&console.warn(\"GLTFExporter: Image size is bigger than maxTextureSize\",image);var data=new Uint8ClampedArray(4*(image.height*image.width));if(format===three__WEBPACK_IMPORTED_MODULE_0__[\"RGBAFormat\"])for(var i=0;i<data.length;i+=4)data[i+0]=image.data[i+0],data[i+1]=image.data[i+1],data[i+2]=image.data[i+2],data[i+3]=image.data[i+3];else for(var _i=0,j=0;_i<data.length;_i+=4,j+=3)data[_i+0]=image.data[j+0],data[_i+1]=image.data[j+1],data[_i+2]=image.data[j+2],data[_i+3]=255;ctx.putImageData(new ImageData(data,image.width,image.height),0,0)}!0===options.binary?pending.push(new Promise(function(resolve){canvas.toBlob(function(blob){writer.processBufferViewImage(blob).then(function(bufferViewIndex){imageDef.bufferView=bufferViewIndex,resolve()})},mimeType)})):imageDef.uri=canvas.toDataURL(mimeType)}else imageDef.uri=image.src;var index=json.images.push(imageDef)-1;return cachedImages[key]=index,index}/**\n\t * Process sampler\n\t * @param {Texture} map Texture to process\n\t * @return {Integer} Index of the processed texture in the \"samplers\" array\n\t */processSampler(map){var json=this.json;json.samplers||(json.samplers=[]);var samplerDef={magFilter:THREE_TO_WEBGL[map.magFilter],minFilter:THREE_TO_WEBGL[map.minFilter],wrapS:THREE_TO_WEBGL[map.wrapS],wrapT:THREE_TO_WEBGL[map.wrapT]};return json.samplers.push(samplerDef)-1}/**\n\t * Process texture\n\t * @param {Texture} map Map to process\n\t * @return {Integer} Index of the processed texture in the \"textures\" array\n\t */processTexture(map){var cache=this.cache,json=this.json;if(cache.textures.has(map))return cache.textures.get(map);json.textures||(json.textures=[]);var textureDef={sampler:this.processSampler(map),source:this.processImage(map.image,map.format,map.flipY)};map.name&&(textureDef.name=map.name),this._invokeAll(function(ext){ext.writeTexture&&ext.writeTexture(map,textureDef)});var index=json.textures.push(textureDef)-1;return cache.textures.set(map,index),index}/**\n\t * Process material\n\t * @param {THREE.Material} material Material to process\n\t * @return {Integer|null} Index of the processed material in the \"materials\" array\n\t */processMaterial(material){var cache=this.cache,json=this.json;if(cache.materials.has(material))return cache.materials.get(material);if(material.isShaderMaterial)return console.warn(\"GLTFExporter: THREE.ShaderMaterial not supported.\"),null;json.materials||(json.materials=[]);// @QUESTION Should we avoid including any attribute that has the default value?\nvar materialDef={pbrMetallicRoughness:{}};!0!==material.isMeshStandardMaterial&&!0!==material.isMeshBasicMaterial&&console.warn(\"GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.\");// pbrMetallicRoughness.baseColorFactor\nvar color=material.color.toArray().concat([material.opacity]);// pbrMetallicRoughness.metallicRoughnessTexture\nif(equalArray(color,[1,1,1,1])||(materialDef.pbrMetallicRoughness.baseColorFactor=color),material.isMeshStandardMaterial?(materialDef.pbrMetallicRoughness.metallicFactor=material.metalness,materialDef.pbrMetallicRoughness.roughnessFactor=material.roughness):(materialDef.pbrMetallicRoughness.metallicFactor=.5,materialDef.pbrMetallicRoughness.roughnessFactor=.5),material.metalnessMap||material.roughnessMap)if(material.metalnessMap===material.roughnessMap){var metalRoughMapDef={index:this.processTexture(material.metalnessMap)};this.applyTextureTransform(metalRoughMapDef,material.metalnessMap),materialDef.pbrMetallicRoughness.metallicRoughnessTexture=metalRoughMapDef}else console.warn(\"THREE.GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.\");// pbrMetallicRoughness.baseColorTexture or pbrSpecularGlossiness diffuseTexture\nif(material.map){var baseColorMapDef={index:this.processTexture(material.map)};this.applyTextureTransform(baseColorMapDef,material.map),materialDef.pbrMetallicRoughness.baseColorTexture=baseColorMapDef}if(material.emissive){// note: emissive components are limited to stay within the 0 - 1 range to accommodate glTF spec. see #21849 and #22000.\nvar emissive=material.emissive.clone().multiplyScalar(material.emissiveIntensity),maxEmissiveComponent=Math.max(emissive.r,emissive.g,emissive.b);// emissiveTexture\nif(1<maxEmissiveComponent&&(emissive.multiplyScalar(1/maxEmissiveComponent),console.warn(\"THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited\")),0<maxEmissiveComponent&&(materialDef.emissiveFactor=emissive.toArray()),material.emissiveMap){var emissiveMapDef={index:this.processTexture(material.emissiveMap)};this.applyTextureTransform(emissiveMapDef,material.emissiveMap),materialDef.emissiveTexture=emissiveMapDef}}// normalTexture\nif(material.normalMap){var normalMapDef={index:this.processTexture(material.normalMap)};material.normalScale&&-1!==material.normalScale.x&&(material.normalScale.x!==material.normalScale.y&&console.warn(\"THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X.\"),normalMapDef.scale=material.normalScale.x),this.applyTextureTransform(normalMapDef,material.normalMap),materialDef.normalTexture=normalMapDef}// occlusionTexture\nif(material.aoMap){var occlusionMapDef={index:this.processTexture(material.aoMap),texCoord:1};1!==material.aoMapIntensity&&(occlusionMapDef.strength=material.aoMapIntensity),this.applyTextureTransform(occlusionMapDef,material.aoMap),materialDef.occlusionTexture=occlusionMapDef}// alphaMode\nmaterial.transparent?materialDef.alphaMode=\"BLEND\":0<material.alphaTest&&(materialDef.alphaMode=\"MASK\",materialDef.alphaCutoff=material.alphaTest),material.side===three__WEBPACK_IMPORTED_MODULE_0__[\"DoubleSide\"]&&(materialDef.doubleSided=!0),\"\"!==material.name&&(materialDef.name=material.name),this.serializeUserData(material,materialDef),this._invokeAll(function(ext){ext.writeMaterial&&ext.writeMaterial(material,materialDef)});var index=json.materials.push(materialDef)-1;return cache.materials.set(material,index),index}/**\n\t * Process mesh\n\t * @param {THREE.Mesh} mesh Mesh to process\n\t * @return {Integer|null} Index of the processed mesh in the \"meshes\" array\n\t */processMesh(mesh){var cache=this.cache,json=this.json,meshCacheKeyParts=[mesh.geometry.uuid];if(Array.isArray(mesh.material))for(var i=0,l=mesh.material.length;i<l;i++)meshCacheKeyParts.push(mesh.material[i].uuid);else meshCacheKeyParts.push(mesh.material.uuid);var meshCacheKey=meshCacheKeyParts.join(\":\");if(cache.meshes.has(meshCacheKey))return cache.meshes.get(meshCacheKey);var mode,geometry=mesh.geometry;if(mode=mesh.isLineSegments?WEBGL_CONSTANTS.LINES:mesh.isLineLoop?WEBGL_CONSTANTS.LINE_LOOP:mesh.isLine?WEBGL_CONSTANTS.LINE_STRIP:mesh.isPoints?WEBGL_CONSTANTS.POINTS:mesh.material.wireframe?WEBGL_CONSTANTS.LINES:WEBGL_CONSTANTS.TRIANGLES,!0!==geometry.isBufferGeometry)throw new Error(\"THREE.GLTFExporter: Geometry is not of type THREE.BufferGeometry.\");var meshDef={},attributes={},primitives=[],targets=[],nameConversion={uv:\"TEXCOORD_0\",uv2:\"TEXCOORD_1\",color:\"COLOR_0\",skinWeight:\"WEIGHTS_0\",skinIndex:\"JOINTS_0\"},originalNormal=geometry.getAttribute(\"normal\");void 0===originalNormal||this.isNormalizedNormalAttribute(originalNormal)||(console.warn(\"THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.\"),geometry.setAttribute(\"normal\",this.createNormalizedNormalAttribute(originalNormal)));// @QUESTION Detect if .vertexColors = true?\n// For every attribute create an accessor\nvar modifiedAttribute=null;for(var attributeName in geometry.attributes)// Ignore morph target attributes, which are exported later.\nif(\"morph\"!==attributeName.substr(0,5)){var attribute=geometry.attributes[attributeName];attributeName=nameConversion[attributeName]||attributeName.toUpperCase();// Prefix all geometry attributes except the ones specifically\n// listed in the spec; non-spec attributes are considered custom.\nvar validVertexAttributes=/^(POSITION|NORMAL|TANGENT|TEXCOORD_\\d+|COLOR_\\d+|JOINTS_\\d+|WEIGHTS_\\d+)$/;if(validVertexAttributes.test(attributeName)||(attributeName=\"_\"+attributeName),cache.attributes.has(this.getUID(attribute))){attributes[attributeName]=cache.attributes.get(this.getUID(attribute));continue}// JOINTS_0 must be UNSIGNED_BYTE or UNSIGNED_SHORT.\nmodifiedAttribute=null;var array=attribute.array;\"JOINTS_0\"!==attributeName||array instanceof Uint16Array||array instanceof Uint8Array||(console.warn(\"GLTFExporter: Attribute \\\"skinIndex\\\" converted to type UNSIGNED_SHORT.\"),modifiedAttribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](new Uint16Array(array),attribute.itemSize,attribute.normalized));var accessor=this.processAccessor(modifiedAttribute||attribute,geometry);null!==accessor&&(attributes[attributeName]=accessor,cache.attributes.set(this.getUID(attribute),accessor))}// Skip if no exportable attributes found\nif(void 0!==originalNormal&&geometry.setAttribute(\"normal\",originalNormal),0===Object.keys(attributes).length)return null;// Morph targets\nif(void 0!==mesh.morphTargetInfluences&&0<mesh.morphTargetInfluences.length){var weights=[],targetNames=[],reverseDictionary={};if(void 0!==mesh.morphTargetDictionary)for(var key in mesh.morphTargetDictionary)reverseDictionary[mesh.morphTargetDictionary[key]]=key;for(var _i2=0;_i2<mesh.morphTargetInfluences.length;++_i2){var target={},warned=!1;for(var _attributeName in geometry.morphAttributes){// glTF 2.0 morph supports only POSITION/NORMAL/TANGENT.\n// Three.js doesn't support TANGENT yet.\nif(\"position\"!=_attributeName&&\"normal\"!==_attributeName&&\"color\"!==_attributeName){warned||(console.warn(\"GLTFExporter: Only POSITION and NORMAL morph are supported.\"),warned=!0);continue}var _attribute=geometry.morphAttributes[_attributeName][_i2],gltfAttributeName=_attributeName.toUpperCase();nameConversion[_attributeName]&&(gltfAttributeName=nameConversion[_attributeName]);// Three.js morph attribute has absolute values while the one of glTF has relative values.\n//\n// glTF 2.0 Specification:\n// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#morph-targets\nvar baseAttribute=geometry.attributes[_attributeName];if(cache.attributes.has(this.getUID(_attribute))){target[gltfAttributeName]=cache.attributes.get(this.getUID(_attribute));continue}// Clones attribute not to override\nvar relativeAttribute=baseAttribute.clone();if(!geometry.morphTargetsRelative)if(baseAttribute)for(var j=0,jl=_attribute.count;j<jl;j++)baseAttribute.count>j&&relativeAttribute.setXYZ(j,_attribute.getX(j)-baseAttribute.getX(j),_attribute.getY(j)-baseAttribute.getY(j),_attribute.getZ(j)-baseAttribute.getZ(j));else for(var _j=0,_jl=_attribute.count;_j<_jl;_j++)relativeAttribute.setXYZ(_j,0,0,0);target[gltfAttributeName]=this.processAccessor(relativeAttribute,geometry),cache.attributes.set(this.getUID(baseAttribute),target[gltfAttributeName])}targets.push(target),weights.push(mesh.morphTargetInfluences[_i2]),void 0!==mesh.morphTargetDictionary&&targetNames.push(reverseDictionary[_i2])}meshDef.weights=weights,0<targetNames.length&&(meshDef.extras={},meshDef.extras.targetNames=targetNames)}var isMultiMaterial=Array.isArray(mesh.material);if(isMultiMaterial&&0===geometry.groups.length)return null;for(var primitive,materials=isMultiMaterial?mesh.material:[mesh.material],groups=isMultiMaterial?geometry.groups:[{materialIndex:0,start:void 0,count:void 0}],_i3=0,il=groups.length;_i3<il;_i3++){if(primitive={mode:mode,attributes:attributes},this.serializeUserData(geometry,primitive),0<targets.length&&(primitive.targets=targets),null!==geometry.index){var cacheKey=this.getUID(geometry.index);(void 0!==groups[_i3].start||void 0!==groups[_i3].count)&&(cacheKey+=\":\"+groups[_i3].start+\":\"+groups[_i3].count),cache.attributes.has(cacheKey)?primitive.indices=cache.attributes.get(cacheKey):(primitive.indices=this.processAccessor(geometry.index,geometry,groups[_i3].start,groups[_i3].count),cache.attributes.set(cacheKey,primitive.indices)),null===primitive.indices&&delete primitive.indices}var material=this.processMaterial(materials[groups[_i3].materialIndex]);null!==material&&(primitive.material=material),primitives.push(primitive)}meshDef.primitives=primitives,json.meshes||(json.meshes=[]),this._invokeAll(function(ext){ext.writeMesh&&ext.writeMesh(mesh,meshDef)});var index=json.meshes.push(meshDef)-1;return cache.meshes.set(meshCacheKey,index),index}/**\n\t * Process camera\n\t * @param {THREE.Camera} camera Camera to process\n\t * @return {Integer} Index of the processed mesh in the \"camera\" array\n\t */processCamera(camera){var json=this.json;json.cameras||(json.cameras=[]);var isOrtho=camera.isOrthographicCamera,cameraDef={type:isOrtho?\"orthographic\":\"perspective\"};return isOrtho?cameraDef.orthographic={xmag:2*camera.right,ymag:2*camera.top,zfar:0>=camera.far?.001:camera.far,znear:0>camera.near?0:camera.near}:cameraDef.perspective={aspectRatio:camera.aspect,yfov:three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].degToRad(camera.fov),zfar:0>=camera.far?.001:camera.far,znear:0>camera.near?0:camera.near},\"\"!==camera.name&&(cameraDef.name=camera.type),json.cameras.push(cameraDef)-1}/**\n\t * Creates glTF animation entry from AnimationClip object.\n\t *\n\t * Status:\n\t * - Only properties listed in PATH_PROPERTIES may be animated.\n\t *\n\t * @param {THREE.AnimationClip} clip\n\t * @param {THREE.Object3D} root\n\t * @return {number|null}\n\t */processAnimation(clip,root){var json=this.json,nodeMap=this.nodeMap;json.animations||(json.animations=[]),clip=GLTFExporter.Utils.mergeMorphTargetTracks(clip.clone(),root);for(var tracks=clip.tracks,channels=[],samplers=[],i=0;i<tracks.length;++i){var track=tracks[i],trackBinding=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].parseTrackName(track.name),trackNode=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].findNode(root,trackBinding.nodeName),trackProperty=PATH_PROPERTIES[trackBinding.propertyName];if(\"bones\"===trackBinding.objectName&&(!0===trackNode.isSkinnedMesh?trackNode=trackNode.skeleton.getBoneByName(trackBinding.objectIndex):trackNode=void 0),!trackNode||!trackProperty)return console.warn(\"THREE.GLTFExporter: Could not export animation track \\\"%s\\\".\",track.name),null;var outputItemSize=track.values.length/track.times.length;trackProperty===PATH_PROPERTIES.morphTargetInfluences&&(outputItemSize/=trackNode.morphTargetInfluences.length);var interpolation=void 0;// @TODO export CubicInterpolant(InterpolateSmooth) as CUBICSPLINE\n// Detecting glTF cubic spline interpolant by checking factory method's special property\n// GLTFCubicSplineInterpolant is a custom interpolant and track doesn't return\n// valid value from .getInterpolation().\n!0===track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(interpolation=\"CUBICSPLINE\",outputItemSize/=3):track.getInterpolation()===three__WEBPACK_IMPORTED_MODULE_0__[\"InterpolateDiscrete\"]?interpolation=\"STEP\":interpolation=\"LINEAR\",samplers.push({input:this.processAccessor(new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](track.times,1)),output:this.processAccessor(new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](track.values,outputItemSize)),interpolation:interpolation}),channels.push({sampler:samplers.length-1,target:{node:nodeMap.get(trackNode),path:trackProperty}})}return json.animations.push({name:clip.name||\"clip_\"+json.animations.length,samplers:samplers,channels:channels}),json.animations.length-1}/**\n\t * @param {THREE.Object3D} object\n\t * @return {number|null}\n\t */processSkin(object){var json=this.json,nodeMap=this.nodeMap,node=json.nodes[nodeMap.get(object)],skeleton=object.skeleton;if(skeleton===void 0)return null;var rootJoint=object.skeleton.bones[0];if(rootJoint===void 0)return null;for(var joints=[],inverseBindMatrices=new Float32Array(16*skeleton.bones.length),temporaryBoneInverse=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],i=0;i<skeleton.bones.length;++i)joints.push(nodeMap.get(skeleton.bones[i])),temporaryBoneInverse.copy(skeleton.boneInverses[i]),temporaryBoneInverse.multiply(object.bindMatrix).toArray(inverseBindMatrices,16*i);json.skins===void 0&&(json.skins=[]),json.skins.push({inverseBindMatrices:this.processAccessor(new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](inverseBindMatrices,16)),joints:joints,skeleton:nodeMap.get(rootJoint)});var skinIndex=node.skin=json.skins.length-1;return skinIndex}/**\n\t * Process Object3D node\n\t * @param {THREE.Object3D} node Object3D to processNode\n\t * @return {Integer} Index of the node in the nodes list\n\t */processNode(object){var json=this.json,options=this.options,nodeMap=this.nodeMap;json.nodes||(json.nodes=[]);var nodeDef={};if(options.trs){var rotation=object.quaternion.toArray(),position=object.position.toArray(),scale=object.scale.toArray();equalArray(rotation,[0,0,0,1])||(nodeDef.rotation=rotation),equalArray(position,[0,0,0])||(nodeDef.translation=position),equalArray(scale,[1,1,1])||(nodeDef.scale=scale)}else object.matrixAutoUpdate&&object.updateMatrix(),!1===isIdentityMatrix(object.matrix)&&(nodeDef.matrix=object.matrix.elements);// We don't export empty strings name because it represents no-name in Three.js.\nif(\"\"!==object.name&&(nodeDef.name=object.name+\"\"),this.serializeUserData(object,nodeDef),object.isMesh||object.isLine||object.isPoints){var meshIndex=this.processMesh(object);null!==meshIndex&&(nodeDef.mesh=meshIndex)}else object.isCamera&&(nodeDef.camera=this.processCamera(object));if(object.isSkinnedMesh&&this.skins.push(object),0<object.children.length){for(var child,children=[],i=0,l=object.children.length;i<l;i++)if(child=object.children[i],child.visible||!1===options.onlyVisible){var _nodeIndex=this.processNode(child);null!==_nodeIndex&&children.push(_nodeIndex)}0<children.length&&(nodeDef.children=children)}this._invokeAll(function(ext){ext.writeNode&&ext.writeNode(object,nodeDef)});var nodeIndex=json.nodes.push(nodeDef)-1;return nodeMap.set(object,nodeIndex),nodeIndex}/**\n\t * Process Scene\n\t * @param {Scene} node Scene to process\n\t */processScene(scene){var json=this.json,options=this.options;json.scenes||(json.scenes=[],json.scene=0);var sceneDef={};\"\"!==scene.name&&(sceneDef.name=scene.name),json.scenes.push(sceneDef);for(var child,nodes=[],i=0,l=scene.children.length;i<l;i++)if(child=scene.children[i],child.visible||!1===options.onlyVisible){var nodeIndex=this.processNode(child);null!==nodeIndex&&nodes.push(nodeIndex)}0<nodes.length&&(sceneDef.nodes=nodes),this.serializeUserData(scene,sceneDef)}/**\n\t * Creates a Scene to hold a list of objects and parse it\n\t * @param {Array} objects List of objects to process\n\t */processObjects(objects){var scene=new three__WEBPACK_IMPORTED_MODULE_0__[\"Scene\"];scene.name=\"AuxScene\";for(var i=0;i<objects.length;i++)// We push directly to children instead of calling `add` to prevent\n// modify the .parent and break its original scene and hierarchy\nscene.children.push(objects[i]);this.processScene(scene)}/**\n\t * @param {THREE.Object3D|Array<THREE.Object3D>} input\n\t */processInput(input){var options=this.options;input=input instanceof Array?input:[input],this._invokeAll(function(ext){ext.beforeParse&&ext.beforeParse(input)});for(var objectsWithoutScene=[],i=0;i<input.length;i++)input[i]instanceof three__WEBPACK_IMPORTED_MODULE_0__[\"Scene\"]?this.processScene(input[i]):objectsWithoutScene.push(input[i]);0<objectsWithoutScene.length&&this.processObjects(objectsWithoutScene);for(var _i4=0;_i4<this.skins.length;++_i4)this.processSkin(this.skins[_i4]);for(var _i5=0;_i5<options.animations.length;++_i5)this.processAnimation(options.animations[_i5].clip,options.animations[_i5].mesh);this._invokeAll(function(ext){ext.afterParse&&ext.afterParse(input)})}_invokeAll(func){for(var i=0,il=this.plugins.length;i<il;i++)func(this.plugins[i])}}/**\n * Punctual Lights Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n */class GLTFLightExtension{constructor(writer){this.writer=writer,this.name=\"KHR_lights_punctual\"}writeNode(light,nodeDef){if(light.isLight){if(!light.isDirectionalLight&&!light.isPointLight&&!light.isSpotLight)return void console.warn(\"THREE.GLTFExporter: Only directional, point, and spot lights are supported.\",light);var writer=this.writer,json=writer.json,extensionsUsed=writer.extensionsUsed,lightDef={};light.name&&(lightDef.name=light.name),lightDef.color=light.color.toArray(),lightDef.intensity=light.intensity,light.isDirectionalLight?lightDef.type=\"directional\":light.isPointLight?(lightDef.type=\"point\",0<light.distance&&(lightDef.range=light.distance)):light.isSpotLight&&(lightDef.type=\"spot\",0<light.distance&&(lightDef.range=light.distance),lightDef.spot={},lightDef.spot.innerConeAngle=-1*((light.penumbra-1)*light.angle),lightDef.spot.outerConeAngle=light.angle),void 0!==light.decay&&2!==light.decay&&console.warn(\"THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, \"+\"and expects light.decay=2.\"),light.target&&(light.target.parent!==light||0!==light.target.position.x||0!==light.target.position.y||-1!==light.target.position.z)&&console.warn(\"THREE.GLTFExporter: Light direction may be lost. For best results, \"+\"make light.target a child of the light with position 0,0,-1.\"),extensionsUsed[this.name]||(json.extensions=json.extensions||{},json.extensions[this.name]={lights:[]},extensionsUsed[this.name]=!0);var lights=json.extensions[this.name].lights;lights.push(lightDef),nodeDef.extensions=nodeDef.extensions||{},nodeDef.extensions[this.name]={light:lights.length-1}}}}/**\n * Unlit Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n */class GLTFMaterialsUnlitExtension{constructor(writer){this.writer=writer,this.name=\"KHR_materials_unlit\"}writeMaterial(material,materialDef){if(material.isMeshBasicMaterial){var writer=this.writer,extensionsUsed=writer.extensionsUsed;materialDef.extensions=materialDef.extensions||{},materialDef.extensions[this.name]={},extensionsUsed[this.name]=!0,materialDef.pbrMetallicRoughness.metallicFactor=0,materialDef.pbrMetallicRoughness.roughnessFactor=.9}}}/**\n * Specular-Glossiness Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness\n */class GLTFMaterialsPBRSpecularGlossiness{constructor(writer){this.writer=writer,this.name=\"KHR_materials_pbrSpecularGlossiness\"}writeMaterial(material,materialDef){if(material.isGLTFSpecularGlossinessMaterial){var writer=this.writer,extensionsUsed=writer.extensionsUsed,extensionDef={};materialDef.pbrMetallicRoughness.baseColorFactor&&(extensionDef.diffuseFactor=materialDef.pbrMetallicRoughness.baseColorFactor);var specularFactor=[1,1,1];if(material.specular.toArray(specularFactor,0),extensionDef.specularFactor=specularFactor,extensionDef.glossinessFactor=material.glossiness,materialDef.pbrMetallicRoughness.baseColorTexture&&(extensionDef.diffuseTexture=materialDef.pbrMetallicRoughness.baseColorTexture),material.specularMap){var specularMapDef={index:writer.processTexture(material.specularMap)};writer.applyTextureTransform(specularMapDef,material.specularMap),extensionDef.specularGlossinessTexture=specularMapDef}materialDef.extensions=materialDef.extensions||{},materialDef.extensions[this.name]=extensionDef,extensionsUsed[this.name]=!0}}}/**\n * Static utility functions\n */GLTFExporter.Utils={insertKeyframe:function insertKeyframe(track,time){var index,tolerance=.001,valueSize=track.getValueSize(),times=new track.TimeBufferType(track.times.length+1),values=new track.ValueBufferType(track.values.length+valueSize),interpolant=track.createInterpolant(new track.ValueBufferType(valueSize));// 1ms\nif(0===track.times.length){times[0]=time;for(var i=0;i<valueSize;i++)values[i]=0;index=0}else if(time<track.times[0]){if(Math.abs(track.times[0]-time)<tolerance)return 0;times[0]=time,times.set(track.times,1),values.set(interpolant.evaluate(time),0),values.set(track.values,valueSize),index=0}else if(time>track.times[track.times.length-1]){if(Math.abs(track.times[track.times.length-1]-time)<tolerance)return track.times.length-1;times[times.length-1]=time,times.set(track.times,0),values.set(track.values,0),values.set(interpolant.evaluate(time),track.values.length),index=times.length-1}else for(var _i6=0;_i6<track.times.length;_i6++){if(Math.abs(track.times[_i6]-time)<tolerance)return _i6;if(track.times[_i6]<time&&track.times[_i6+1]>time){times.set(track.times.slice(0,_i6+1),0),times[_i6+1]=time,times.set(track.times.slice(_i6+1),_i6+2),values.set(track.values.slice(0,(_i6+1)*valueSize),0),values.set(interpolant.evaluate(time),(_i6+1)*valueSize),values.set(track.values.slice((_i6+1)*valueSize),(_i6+2)*valueSize),index=_i6+1;break}}return track.times=times,track.values=values,index},mergeMorphTargetTracks:function mergeMorphTargetTracks(clip,root){for(var tracks=[],mergedTracks={},sourceTracks=clip.tracks,i=0;i<sourceTracks.length;++i){var sourceTrack=sourceTracks[i],sourceTrackBinding=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].parseTrackName(sourceTrack.name),sourceTrackNode=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].findNode(root,sourceTrackBinding.nodeName);if(\"morphTargetInfluences\"!==sourceTrackBinding.propertyName||void 0===sourceTrackBinding.propertyIndex){tracks.push(sourceTrack);continue}if(sourceTrack.createInterpolant!==sourceTrack.InterpolantFactoryMethodDiscrete&&sourceTrack.createInterpolant!==sourceTrack.InterpolantFactoryMethodLinear){if(sourceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)// This should never happen, because glTF morph target animations\n// affect all targets already.\nthrow new Error(\"THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.\");console.warn(\"THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.\"),sourceTrack=sourceTrack.clone(),sourceTrack.setInterpolation(three__WEBPACK_IMPORTED_MODULE_0__[\"InterpolateLinear\"])}var targetCount=sourceTrackNode.morphTargetInfluences.length,targetIndex=sourceTrackNode.morphTargetDictionary[sourceTrackBinding.propertyIndex];if(void 0===targetIndex)throw new Error(\"THREE.GLTFExporter: Morph target name not found: \"+sourceTrackBinding.propertyIndex);var mergedTrack=void 0;// If this is the first time we've seen this object, create a new\n// track to store merged keyframe data for each morph target.\nif(void 0===mergedTracks[sourceTrackNode.uuid]){mergedTrack=sourceTrack.clone();for(var values=new mergedTrack.ValueBufferType(targetCount*mergedTrack.times.length),j=0;j<mergedTrack.times.length;j++)values[j*targetCount+targetIndex]=mergedTrack.values[j];// We need to take into consideration the intended target node\n// of our original un-merged morphTarget animation.\nmergedTrack.name=(sourceTrackBinding.nodeName||\"\")+\".morphTargetInfluences\",mergedTrack.values=values,mergedTracks[sourceTrackNode.uuid]=mergedTrack,tracks.push(mergedTrack);continue}var sourceInterpolant=sourceTrack.createInterpolant(new sourceTrack.ValueBufferType(1));mergedTrack=mergedTracks[sourceTrackNode.uuid];// For every existing keyframe of the merged track, write a (possibly\n// interpolated) value from the source track.\nfor(var _j2=0;_j2<mergedTrack.times.length;_j2++)mergedTrack.values[_j2*targetCount+targetIndex]=sourceInterpolant.evaluate(mergedTrack.times[_j2]);// For every existing keyframe of the source track, write a (possibly\n// new) keyframe to the merged track. Values from the previous loop may\n// be written again, but keyframes are de-duplicated.\nfor(var keyframeIndex,_j3=0;_j3<sourceTrack.times.length;_j3++)keyframeIndex=this.insertKeyframe(mergedTrack,sourceTrack.times[_j3]),mergedTrack.values[keyframeIndex*targetCount+targetIndex]=sourceTrack.values[_j3]}return clip.tracks=tracks,clip}};\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),resolveURL=__webpack_require__(6).resolveURL,Viewport=function(){this.nearPlane=.168248,this.farPlane=6.82906,this.eyePosition=[.5,-2.86496,.5],this.targetPosition=[.5,.5,.5],this.upVector=[0,0,1];var _this=this;this.setFromObject=(_ref)=>{var{nearPlane,farPlane,eyePosition,targetPosition,upVector}=_ref;_this.nearPlane=nearPlane,_this.farPlane=farPlane,_this.eyePosition=eyePosition,_this.targetPosition=targetPosition,_this.upVector=upVector}},CameraControls=function(object,domElement,renderer,scene){var MODE={NONE:-1,DEFAULT:0,PATH:1,SMOOTH_CAMERA_TRANSITION:2,AUTO_TUMBLE:3,ROTATE_TRANSITION:4,MINIMAP:5,SYNC_CONTROL:6},STATE={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM:4,TOUCH_PAN:5,SCROLL:6},ROTATE_DIRECTION={NONE:-1,FREE:1,HORIZONTAL:2,VERTICAL:3},CLICK_ACTION={};/** \n * Actions states.\n * Available states are NONE, ROTATE, ZOOM, PAN, TOUCH_ROTATE, TOUCH_ZOOM, TOUCH_PAN and SCROLL.\n * @property {Object} \n */CLICK_ACTION.MAIN=STATE.ROTATE,CLICK_ACTION.AUXILIARY=STATE.ZOOM,CLICK_ACTION.SECONDARY=STATE.PAN,this.cameraObject=object,this.domElement=domElement===void 0?document:domElement,this.renderer=renderer,this.scene=scene,this.tumble_rate=1.5,this.pointer_x=0,this.pointer_y=0,this.pointer_x_start=0,this.pointer_y_start=0,this.previous_pointer_x=0,this.previous_pointer_y=0,this.near_plane_fly_debt=0,this.touchZoomDistanceStart=0,this.touchZoomDistanceEnd=0,this.directionalLight=0,this.scrollRate=50;var duration=6e3,inbuildTime=0,cameraPath=void 0,numberOfCameraPoint=void 0,updateLightWithPathFlag=!1,playRate=500,deviceOrientationControl=void 0,defaultViewport=\"default\",currentMode=MODE.DEFAULT,smoothCameraTransitionObject=void 0,rotateCameraTransitionObject=void 0,cameraAutoTumbleObject=void 0,mouseScroll=0,rotateMode=ROTATE_DIRECTION.FREE;this._state=STATE.NONE;var zincRayCaster;this.targetTouchId=-1;var rect=void 0,_a=new THREE.Vector3,_b=new THREE.Vector3,_c=new THREE.Vector3,_new_b=new THREE.Vector3,_new_c=new THREE.Vector3,_axis=new THREE.Vector3,_v=new THREE.Vector3,_rel_eye=new THREE.Vector3,sceneSphere=new THREE.Sphere,_tempEye=new THREE.Vector3,ndcControl=void 0,maxDist=0,viewports={default:new Viewport};viewports.default.nearPlane=.1,viewports.default.farPlane=2e3,viewports.default.eyePosition=[0,0,0],viewports.default.targetPosition=[0,0,-1],viewports.default.upVector=[0,1,0],this.cameraObject.target===void 0&&(this.cameraObject.target=new THREE.Vector3(...viewports.default.targetPosition)),this.calculateMaxAllowedDistance=scene=>{var box=scene.getBoundingBox();if(box){box.getBoundingSphere(sceneSphere),maxDist=6*sceneSphere.radius;var currentDist=0;this.cameraObject&&(currentDist=this.cameraObject.position.distanceTo(sceneSphere.center)),maxDist=currentDist>maxDist?currentDist:maxDist}else maxDist=0},this.addViewport=(viewportName,viewport)=>{viewportName&&viewport&&(viewports[viewportName]=viewport)},this.setDefaultViewport=defaultName=>!!(defaultName&&defaultName in viewports)&&(defaultViewport=defaultName,!0),this.getDefaultViewport=()=>defaultViewport,this.getViewportOfName=name=>viewports[name],this.setCurrentViewport=name=>!!(name in viewports)&&(this.setCurrentCameraSettings(viewports[name]),!0),this.setRotationMode=mode=>{switch(mode){case\"none\":rotateMode=ROTATE_DIRECTION.NONE;break;case\"horizontal\":rotateMode=ROTATE_DIRECTION.HORIZONTAL;break;case\"vertical\":rotateMode=ROTATE_DIRECTION.VERTICAL;break;case\"free\":default:rotateMode=ROTATE_DIRECTION.FREE;}},this.onResize=()=>{rect&&(rect=void 0),ndcControl&&ndcControl.setCurrentCameraSettings(this.cameraObject,viewports[defaultViewport])},this.getNDCFromDocumentCoords=(x,y,positionIn)=>{updateRect(!1);var position=positionIn?positionIn:new THREE.Vector2,out_x=2*((x-rect.left)/rect.width)-1,out_y=2*-((y-rect.top)/rect.height)+1;return position.set(out_x,out_y)},this.getRelativeCoordsFromNDC=(x,y,positionIn)=>{updateRect(!1);var position=positionIn?positionIn:new THREE.Vector2;return position.x=(x+1)*rect.width/2,position.y=(1-y)*rect.height/2,position},this.setMouseButtonAction=(buttonName,actionName)=>{CLICK_ACTION[buttonName]=STATE[actionName]};//Make sure the camera does not travel beyond limit\nvar checkTravelDistance=()=>{if(0<maxDist){var newDist=_tempEye.distanceTo(sceneSphere.center);return maxDist>newDist||this.cameraObject.position.distanceTo(sceneSphere.center)>newDist}return!0},translateViewport=translation=>{_tempEye.copy(this.cameraObject.position).add(translation),checkTravelDistance()&&(this.cameraObject.target.add(translation),this.cameraObject.position.add(translation),this.updateDirectionalLight())},onDocumentMouseDown=event=>{updateRect(!1);// Check if mouse event hapens inside the minimap\nvar minimapCoordinates;if(currentMode===MODE.DEFAULT&&(minimapCoordinates=this.scene.getNormalisedMinimapCoordinates(this.renderer,event)),!minimapCoordinates)0==event.button?event.ctrlKey?this._state=CLICK_ACTION.AUXILIARY:event.shiftKey?this._state=CLICK_ACTION.SECONDARY:this._state=CLICK_ACTION.MAIN:1==event.button?(event.preventDefault(),this._state=CLICK_ACTION.AUXILIARY):2==event.button&&(this._state=CLICK_ACTION.SECONDARY),this.pointer_x=event.clientX-rect.left,this.pointer_y=event.clientY-rect.top,this.pointer_x_start=this.pointer_x,this.pointer_y_start=this.pointer_y,this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y;else{currentMode=MODE.MINIMAP;var translation=this.scene.getMinimapDiffFromNormalised(minimapCoordinates.x,minimapCoordinates.y);translateViewport(translation)}},onDocumentMouseMove=event=>{if(updateRect(!1),this.pointer_x=event.clientX-rect.left,this.pointer_y=event.clientY-rect.top,currentMode===MODE.MINIMAP){var minimapCoordinates=this.scene.getNormalisedMinimapCoordinates(this.renderer,event);if(minimapCoordinates){var translation=this.scene.getMinimapDiffFromNormalised(minimapCoordinates.x,minimapCoordinates.y);translateViewport(translation)}}else this._state===STATE.NONE&&void 0!==zincRayCaster&&zincRayCaster.move(this,event.clientX,event.clientY,this.renderer)},onDocumentMouseUp=event=>{this._state=STATE.NONE,currentMode==MODE.MINIMAP&&(currentMode=MODE.DEFAULT),zincRayCaster!==void 0&&this.pointer_x_start==event.clientX-rect.left&&this.pointer_y_start==event.clientY-rect.top&&zincRayCaster.pick(this,event.clientX,event.clientY,this.renderer)},onDocumentMouseLeave=()=>{this._state=STATE.NONE},onDocumentTouchStart=event=>{updateRect(!1);var len=event.touches.length;if(1==len)this._state=STATE.TOUCH_ROTATE,this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top,this.pointer_x_start=this.pointer_x,this.pointer_y_start=this.pointer_y,this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y;else if(2==len){this._state=STATE.TOUCH_ZOOM;var dx=event.touches[0].clientX-event.touches[1].clientX,dy=event.touches[0].clientY-event.touches[1].clientY;this.touchZoomDistanceEnd=this.touchZoomDistanceStart=Math.sqrt(dx*dx+dy*dy)}else 3==len&&(this._state=STATE.TOUCH_PAN,this.targetTouchId=event.touches[0].identifier,this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top,this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y)},onDocumentTouchMove=event=>{event.preventDefault(),event.stopPropagation();var len=event.touches.length;if(1==len)this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top;else if(2==len){if(this._state===STATE.TOUCH_ZOOM){var dx=event.touches[0].clientX-event.touches[1].clientX,dy=event.touches[0].clientY-event.touches[1].clientY;this.touchZoomDistanceEnd=Math.sqrt(dx*dx+dy*dy)}}else if(3==len&&this._state===STATE.TOUCH_PAN)for(var i=0;3>i;i++)event.touches[i].identifier==this.targetTouchId&&(this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top)},onDocumentTouchEnd=event=>{var len=event.touches.length;this.touchZoomDistanceStart=this.touchZoomDistanceEnd=0,this.targetTouchId=-1,this._state=STATE.NONE,1==len&&zincRayCaster!==void 0&&this.pointer_x_start==event.touches[0].clientX-rect.left&&this.pointer_y_start==event.touches[0].clientY-rect.top&&zincRayCaster.pick(this.cameraObject,event.touches[0].clientX,event.touches[0].clientY,this.renderer)},onDocumentEnter=()=>{updateRect(!0)},updateRect=forced=>{//Use intersectionObserver to reset the rect for ray tracing.\nif(forced||rect===void 0){var observer=new IntersectionObserver(entries=>{for(var entry of entries)rect=entry.boundingClientRect;observer.disconnect()});observer.observe(this.domElement)}},onDocumentWheelEvent=event=>{updateRect(!1),this._state=STATE.SCROLL;var changes=0;0<event.deltaY?changes=this.scrollRate:0>event.deltaY&&(changes=-1*this.scrollRate),mouseScroll+=changes,event.preventDefault(),event.stopImmediatePropagation()},translate=()=>{if(\"undefined\"!=typeof this.cameraObject){var height=rect.height,distance=this.cameraObject.position.distanceTo(this.cameraObject.target),fact=0;this.cameraObject.far>this.cameraObject.near&&distance>=this.cameraObject.near&&distance<=this.cameraObject.far&&(fact=(distance-this.cameraObject.near)/(this.cameraObject.far-this.cameraObject.near)),_b.set(this.previous_pointer_x,height-this.previous_pointer_y,0),_c.set(this.previous_pointer_x,height-this.previous_pointer_y,1),_new_b.set(this.pointer_x,height-this.pointer_y,0),_new_c.set(this.pointer_x,height-this.pointer_y,1),_b.unproject(this.cameraObject),_c.unproject(this.cameraObject),_new_b.unproject(this.cameraObject),_new_c.unproject(this.cameraObject);_new_b.sub(_b).multiplyScalar(1-fact),_new_c.sub(_c).multiplyScalar(fact),_new_b.add(_new_c).multiplyScalar(-.002),translateViewport(_new_b)}this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y};this.getVectorsFromRotateAboutLookAtPoints=(axis,angle)=>{axis.normalize(),_v.copy(this.cameraObject.position).sub(this.cameraObject.target),_rel_eye.copy(_v),_v.normalize(),.8<Math.abs(_v.dot(axis))&&_v.copy(this.cameraObject.up),_b.crossVectors(axis,_v).normalize(),_c.crossVectors(axis,_b);var rel_eyea=axis.dot(_rel_eye),rel_eyeb=_b.dot(_rel_eye),rel_eyec=_c.dot(_rel_eye),upa=axis.dot(this.cameraObject.up),upb=_b.dot(this.cameraObject.up),upc=_c.dot(this.cameraObject.up),cos_angle=Math.cos(angle),sin_angle=Math.sin(angle);return _new_b.set(cos_angle*_b.x+sin_angle*_c.x,cos_angle*_b.y+sin_angle*_c.y,cos_angle*_b.z+sin_angle*_c.z),_new_c.set(cos_angle*_c.x-sin_angle*_b.x,cos_angle*_c.y-sin_angle*_b.y,cos_angle*_c.z-sin_angle*_b.z),_v.copy(this.cameraObject.target),_v.x=_v.x+axis.x*rel_eyea+_new_b.x*rel_eyeb+_new_c.x*rel_eyec,_v.y=_v.y+axis.y*rel_eyea+_new_b.y*rel_eyeb+_new_c.y*rel_eyec,_v.z=_v.z+axis.z*rel_eyea+_new_b.z*rel_eyeb+_new_c.z*rel_eyec,_a.set(axis.x*upa+_new_b.x*upb+_new_c.x*upc,axis.y*upa+_new_b.y*upb+_new_c.y*upc,axis.z*upa+_new_b.z*upb+_new_c.z*upc),{position:_v,up:_a}},this.rotateAboutLookAtpoint=(axis,angle)=>{var returned_values=this.getVectorsFromRotateAboutLookAtPoints(axis,angle);this.cameraObject.position.copy(returned_values.position),this.updateDirectionalLight(),this.cameraObject.up.copy(returned_values.up)};var tumble=()=>{if(\"undefined\"!=typeof this.cameraObject){var width=rect.width,height=rect.height;if(0<width&&0<height){var radius=.25*(width+height),delta_x=0,delta_y=0;(rotateMode===ROTATE_DIRECTION.FREE||rotateMode===ROTATE_DIRECTION.HORIZONTAL)&&(delta_x=this.pointer_x-this.previous_pointer_x),(rotateMode===ROTATE_DIRECTION.FREE||rotateMode===ROTATE_DIRECTION.VERTICAL)&&(delta_y=this.previous_pointer_y-this.pointer_y);var tangent_dist=Math.sqrt(delta_x*delta_x+delta_y*delta_y);if(0<tangent_dist){var dx=1*-delta_y/tangent_dist,dy=1*delta_x/tangent_dist;// Do not allow rotation on other direction around the origin if rotateMode is not free\nif(rotateMode===ROTATE_DIRECTION.FREE){var _d=dx*(this.pointer_x-.5*(width-1))+dy*(.5*(height-1)-this.pointer_y);_d>radius?_d=radius:_d<-radius&&(_d=-radius)}var phi=Math.acos(0/radius)-.5*Math.PI,angle=this.tumble_rate*tangent_dist/radius;_a.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize(),_b.copy(this.cameraObject.up).normalize(),_c.copy(_b).cross(_a).normalize().multiplyScalar(dx),_b.multiplyScalar(dy),_axis.addVectors(_c,_b).multiplyScalar(Math.cos(phi)),_a.multiplyScalar(Math.sin(phi)),_axis.add(_a),this.rotateAboutLookAtpoint(_axis,-angle)}}}this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y},calculateZoomDelta=()=>{var delta=0;return this._state===STATE.ZOOM?delta=this.previous_pointer_y-this.pointer_y:this._state===STATE.SCROLL?delta=mouseScroll:(delta=-1*(this.touchZoomDistanceEnd-this.touchZoomDistanceStart),this.touchZoomDistanceStart=this.touchZoomDistanceEnd),delta};this.changeZoomByScrollRateUnit=unit=>{var delta_y=unit*this.scrollRate;this.changeZoomByValue(delta_y)},this.changeZoomByValue=delta_y=>{if(\"undefined\"!=typeof this.cameraObject){var width=rect.width,height=rect.height,a=this.cameraObject.position.clone();a.sub(this.cameraObject.target);var dist=a.length(),dy=1.5*delta_y/height;if(.01<dist+dy*dist&&(a.normalize(),_tempEye.copy(this.cameraObject.position),_tempEye.x+=a.x*dy*dist,_tempEye.y+=a.y*dy*dist,_tempEye.z+=a.z*dy*dist,checkTravelDistance())){this.cameraObject.position.copy(_tempEye),this.updateDirectionalLight();var near_far_minimum_ratio=1e-5;if(near_far_minimum_ratio*this.cameraObject.far<this.cameraObject.near+dy*dist+this.near_plane_fly_debt)0!=this.near_plane_fly_debt&&(this.near_plane_fly_debt+=dy*dist,0<this.near_plane_fly_debt?(this.cameraObject.near+=this.near_plane_fly_debt,this.cameraObject.far+=this.near_plane_fly_debt,this.near_plane_fly_debt=0):(this.cameraObject.near+=dy*dist,this.cameraObject.far+=dy*dist));else{if(0==this.near_plane_fly_debt){var diff=this.cameraObject.near-near_far_minimum_ratio*this.cameraObject.far;this.cameraObject.near=near_far_minimum_ratio*this.cameraObject.far,this.cameraObject.far-=diff,this.near_plane_fly_debt-=near_far_minimum_ratio*this.cameraObject.far}this.near_plane_fly_debt+=dy*dist}}}};var flyZoom=()=>{var delta_y=calculateZoomDelta();this.changeZoomByValue(delta_y),this._state===STATE.ZOOM&&(this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y),this._state===STATE.SCROLL&&(mouseScroll=0,this._state=STATE.NONE)};this.setDirectionalLight=directionalLightIn=>{this.directionalLight=directionalLightIn},this.updateDirectionalLight=()=>{0!=this.directionalLight&&this.directionalLight.position.set(this.cameraObject.position.x,this.cameraObject.position.y,this.cameraObject.position.z)},this.enable=function(){enabled=!0,this.domElement&&this.domElement.addEventListener&&(this.domElement.addEventListener(\"mousedown\",onDocumentMouseDown,!1),this.domElement.addEventListener(\"mousemove\",onDocumentMouseMove,!1),this.domElement.addEventListener(\"mouseup\",onDocumentMouseUp,!1),this.domElement.addEventListener(\"mouseleave\",onDocumentMouseLeave,!1),this.domElement.addEventListener(\"touchstart\",onDocumentTouchStart,!1),this.domElement.addEventListener(\"touchmove\",onDocumentTouchMove,!1),this.domElement.addEventListener(\"touchend\",onDocumentTouchEnd,!1),this.domElement.addEventListener(\"wheel\",onDocumentWheelEvent,!1),this.domElement.addEventListener(\"contextmenu\",event=>{event.preventDefault()},!1),this.domElement.addEventListener(\"mouseenter\",onDocumentEnter,!1))},this.disable=function(){enabled=!1,this.domElement&&this.domElement.removeEventListener&&(this.domElement.removeEventListener(\"mousedown\",onDocumentMouseDown,!1),this.domElement.removeEventListener(\"mousemove\",onDocumentMouseMove,!1),this.domElement.removeEventListener(\"mouseup\",onDocumentMouseUp,!1),this.domElement.removeEventListener(\"mouseleave\",onDocumentMouseLeave,!1),this.domElement.removeEventListener(\"touchstart\",onDocumentTouchStart,!1),this.domElement.removeEventListener(\"touchmove\",onDocumentTouchMove,!1),this.domElement.removeEventListener(\"touchend\",onDocumentTouchEnd,!1),this.domElement.removeEventListener(\"wheel\",onDocumentWheelEvent,!1),this.domElement.removeEventListener(\"mouseenter\",onDocumentEnter,!1),this.domElement.removeEventListener(\"contextmenu\",event=>{event.preventDefault()},!1))},this.loadPath=pathData=>{cameraPath=pathData.CameraPath,numberOfCameraPoint=pathData.NumberOfPoints},this.loadPathURL=(path_url,finishCallback)=>{var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){var pathData=JSON.parse(xmlhttp.responseText);this.loadPath(pathData),finishCallback!=null&&\"function\"==typeof finishCallback&&finishCallback()}},requestURL=resolveURL(path_url),xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()},this.setPathDuration=durationIn=>{duration=durationIn,smoothCameraTransitionObject&&smoothCameraTransitionObject.setDuration(duration),rotateCameraTransitionObject&&rotateCameraTransitionObject.setDuration(duration)},this.getPlayRate=()=>playRate,this.setPlayRate=playRateIn=>{playRate=playRateIn};/**\n * Update the internal timer by the set amount, this can\n * be used to force a time update by setting delta to zero.\n * \n * @param {Number} delta - The amount of time to increment\n * the time by.\n */var updateTime=delta=>{var targetTime=inbuildTime+delta;targetTime>duration&&(targetTime-=duration),inbuildTime=targetTime};/**\n * Get the current inbuild time,\n * \n * @return {Number}\n */this.getTime=()=>inbuildTime,this.setTime=timeIn=>{inbuildTime=timeIn>duration?duration:0>timeIn?0:timeIn},this.getNumberOfTimeFrame=()=>numberOfCameraPoint,this.getCurrentTimeFrame=()=>{if(2<numberOfCameraPoint){var current_time=inbuildTime/duration*(numberOfCameraPoint-1),bottom_frame=Math.floor(current_time),top_frame=Math.ceil(current_time);return bottom_frame==top_frame?bottom_frame==numberOfCameraPoint-1?[bottom_frame-1,top_frame,0]:[bottom_frame,top_frame+1,1]:[bottom_frame,top_frame,1-(current_time-bottom_frame)]}return 1==numberOfCameraPoint?[0,0,0]:void 0},this.setCurrentTimeFrame=targetTimeFrame=>{2<numberOfCameraPoint&&(inbuildTime=duration*targetTimeFrame/(numberOfCameraPoint-1),0>inbuildTime&&(inbuildTime=0),inbuildTime>duration&&(inbuildTime=duration))};/**\n * Update the progress on the path by the specified amount - delta.\n * \n * @param {Number} delta - The amount of time to increment\n */var updatePath=delta=>{if(currentMode===MODE.PATH&&(updateTime(delta),cameraPath)){for(var time_frame=this.getCurrentTimeFrame(),bottom_frame=time_frame[0],top_frame=time_frame[1],proportion=time_frame[2],bot_pos=[cameraPath[3*bottom_frame],cameraPath[3*bottom_frame+1],cameraPath[3*bottom_frame+2]],top_pos=[cameraPath[3*top_frame],cameraPath[3*top_frame+1],cameraPath[3*top_frame+2]],current_positions=[],i=0;i<bot_pos.length;i++)current_positions.push(proportion*bot_pos[i]+(1-proportion)*top_pos[i]);this.cameraObject.position.set(current_positions[0],current_positions[1],current_positions[2]),this.cameraObject.target.set(top_pos[0],top_pos[1],top_pos[2]),deviceOrientationControl&&this.cameraObject.lookAt(this.cameraObject.target),updateLightWithPathFlag&&(this.directionalLight.position.set(current_positions[0],current_positions[1],current_positions[2]),this.directionalLight.target.position.set(top_pos[0],top_pos[1],top_pos[2]))}};/**\n * Force recalculation of the current path.\n */this.calculatePathNow=()=>{updatePath(0)};// handle synchronised control based on information in the idc\nvar handleSyncControl=()=>{this._state===STATE.ROTATE||this._state===STATE.TOUCH_ROTATE?tumble():this._state===STATE.PAN||this._state===STATE.TOUCH_PAN?(translate(),ndcControl.triggerCallback()):(this._state===STATE.ZOOM||this._state===STATE.TOUCH_ZOOM||this._state===STATE.SCROLL)&&(ndcControl.zoom(calculateZoomDelta()),this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y,this._state===STATE.SCROLL&&(this._state=STATE.NONE),mouseScroll=0,ndcControl.triggerCallback())};/**\n * Update all controls related changes - including calculation of the viewport.\n * \n * @param {Number} timeChanged - Time eclipse since last called.\n */ /**\n * Switch to path mode and begin traveling through the camera path.\n */ /**\n * Stop playing path and switch back to normal control.\n */ /**\n * Check rather the control is currently in path mode.\n * \n * @return {Boolean}\n */ /**\n * Enable directional light update as the camera\n * is traveling through path.\n * \n * @param {Boolean} flag\n */ /**\n * Enable rotation using the devices's accelerometer.\n */ /**\n * Disable rotation using the devices's accelerometer.\n */ /**\n * Check rather device orientation based on accelerometer is on.\n */ /**\n * Reset the viewport settings to the one provided by default viewport.\n */ /**\n * Set the current camera settings with the provided viewport.\n * \n * @param {Viewport} newViewport - viewport settings.\n */ /**\n * Get the viewport based on centre, radius, view_angle and clip distance.\n * \n * @param {Number} centreX - x coordinate of the centre.\n * @param {Number} centreY - y coordinate of the centre.\n * @param {Number} centreZ - z coordinate of the centre.\n * @param {Number} radius - radius if the viewport.\n * @param {Number} view_angle - view angle.\n * @param {Number} clip_distance - clip_distance between the near and far plane.\n * \n * @return {Viewport}\n */ /**\n * Get the current camera viewport.\n * \n * @return {Viewport}\n */ /**\n * Setup a smooth transition object which transition the camera from one \n * viewport to the other in the specified duration. This will not work if \n * {@link rotateCameraTransition} is active.\n * To use this object, the transition must be enabled using\n * {@link enableCameraTransition}.\n * \n * @param {Viewport} startingViewport - the starting viewport\n * @param {Viewport} endingViewport - the viewport ti end the transistion with.\n * @param {Number} durationIn - duration of the smooth transition.\n */ /**\n * Setup a rotate camera transition object which rotate the \n * camera by the specified the angle in the specified \n * duration. This will not work if {@link cameraTransition}\n * is active.\n * To use this object, the transition must be enabled using\n * {@link enableCameraTransition}.\n * \n * @param {THREE.Vector3} axis - the starting viewport\n * @param {Number} angle - the viewport ti end the transistion with.\n * @param {Number} duration - duration of the smooth transition.\n */ /**\n * Enable camera transition, {@link rotateCameraTransition} amd\n * {@link cameraTransition} must be called before camera transition can\n * be enabled.\n */ /**\n * Pause the camera transition.\n */ /**\n * Stop the camera transition and remove camera transition\n * and rotate camera transition.\n */ /**\n * Check if camera transition is active.\n */ /**\n * Setup auto tumble object of the camera which will rotate the camera\n * around the target as if the user is rotating the camera by mouse/touch\n * interaction.\n * The tumbling will only be enabled with {@link enabelAutoTumble}. \n * \n * @param {Array} tumbleDirectionIn - direction of the mouse/touch.\n * @param {Number} tumbleRateIn - Speed of the tumbling.\n * @param {Boolean} stopOnCameraInputIn - Disable the tumbling once the user\n * start interacting with the scene.\n */ /**\n * Enable autotumble.\n */ /**\n * Disable the autotumble.\n */ /**\n * Update the autotumble object.\n */ /**\n * Check rather autotumble is active.\n * \n * @return {Boolean}\n */ /**\n * Create an internal raycaster object and enable it for picking.\n * \n * @param {Scene} sceneIn - The scene to pick from, it can be different from the\n * camera's scene.\n * @param {requestCallback} callbackFunctionIn - The callback for pick event.\n * @param {requestCallback} hoverCallbackFunctionIn - The callback for hover\n * over event.\n */ /**\n * Disable raycaster and remove the internal ray caster object.\n */ /**\n * Check rather the camera is in syncControl mode.\n * \n * @return {Boolean}\n */ /**\n * Enable syncControl.\n */ /**\n * Disable syncControl.\n */this.update=timeChanged=>{var delta=timeChanged*playRate,controlEnabled=enabled;currentMode===MODE.PATH?updatePath(delta):currentMode===MODE.SMOOTH_CAMERA_TRANSITION&&smoothCameraTransitionObject?(smoothCameraTransitionObject.update(delta),smoothCameraTransitionObject.isTransitionCompleted()&&(smoothCameraTransitionObject==null,currentMode=MODE.DEFAULT),controlEnabled=!1):currentMode===MODE.ROTATE_CAMERA_TRANSITION&&rotateCameraTransitionObject?(rotateCameraTransitionObject.update(delta),rotateCameraTransitionObject.isTransitionCompleted()&&(rotateCameraTransitionObject==null,currentMode=MODE.DEFAULT),controlEnabled=!1):currentMode===MODE.AUTO_TUMBLE&&cameraAutoTumbleObject?cameraAutoTumbleObject.update(delta):currentMode===MODE.SYNC_CONTROL&&ndcControl&&(handleSyncControl(),controlEnabled=!1),controlEnabled&&(this._state===STATE.ROTATE||this._state===STATE.TOUCH_ROTATE?tumble():this._state===STATE.PAN||this._state===STATE.TOUCH_PAN?translate():(this._state===STATE.ZOOM||this._state===STATE.TOUCH_ZOOM||this._state===STATE.SCROLL)&&flyZoom(),this._state!==STATE.NONE&¤tMode===MODE.AUTO_TUMBLE&&cameraAutoTumbleObject&&cameraAutoTumbleObject.stopOnCameraInput,this._state===STATE.SCROLL&&(this._state=STATE.NONE)),deviceOrientationControl?deviceOrientationControl.update():this.cameraObject.lookAt(this.cameraObject.target)},this.playPath=()=>{currentMode=MODE.PATH},this.stopPath=()=>{currentMode=MODE.DEFAULT},this.isPlayingPath=()=>currentMode===MODE.PATH,this.enableDirectionalLightUpdateWithPath=flag=>{updateLightWithPathFlag=flag},this.enableDeviceOrientation=()=>{deviceOrientationControl||(deviceOrientationControl=new ModifiedDeviceOrientationControls(this.cameraObject))},this.disableDeviceOrientation=()=>{deviceOrientationControl&&(deviceOrientationControl.dispose(),deviceOrientationControl=void 0)},this.isDeviceOrientationEnabled=()=>!!deviceOrientationControl,this.resetView=()=>{var viewport=viewports[defaultViewport];this.cameraObject.near=viewport.nearPlane,this.cameraObject.far=viewport.farPlane,this.cameraObject.position.set(viewport.eyePosition[0],viewport.eyePosition[1],viewport.eyePosition[2]),this.cameraObject.target.set(viewport.targetPosition[0],viewport.targetPosition[1],viewport.targetPosition[2]),this.cameraObject.up.set(viewport.upVector[0],viewport.upVector[1],viewport.upVector[2]),this.cameraObject.updateProjectionMatrix(),this.updateDirectionalLight()},this.setCurrentCameraSettings=newViewport=>{newViewport.nearPlane&&(this.cameraObject.near=newViewport.nearPlane),newViewport.farPlane&&(this.cameraObject.far=newViewport.farPlane),newViewport.eyePosition&&this.cameraObject.position.set(newViewport.eyePosition[0],newViewport.eyePosition[1],newViewport.eyePosition[2]),newViewport.targetPosition&&this.cameraObject.target.set(newViewport.targetPosition[0],newViewport.targetPosition[1],newViewport.targetPosition[2]),newViewport.upVector&&this.cameraObject.up.set(newViewport.upVector[0],newViewport.upVector[1],newViewport.upVector[2]),this.cameraObject.updateProjectionMatrix(),this.updateDirectionalLight()},this.getViewportFromCentreAndRadius=(centreX,centreY,centreZ,radius,view_angle,clip_distance)=>{var eyex=this.cameraObject.position.x-this.cameraObject.target.x,eyey=this.cameraObject.position.y-this.cameraObject.target.y,eyez=this.cameraObject.position.z-this.cameraObject.target.z,fact=1/Math.sqrt(eyex*eyex+eyey*eyey+eyez*eyez);eyex*=fact,eyey*=fact,eyez*=fact;/* look at the centre of the sphere */var eye_distance=radius/Math.tan(view_angle*Math.PI/360),localEyePosition=[centreX+eyex*eye_distance,centreY+eyey*eye_distance,centreZ+eyez*eye_distance],localNearPlane=0,nearClippingFactor=.95;/* shift the eye position to achieve the desired view_angle */localNearPlane=clip_distance>nearClippingFactor*eye_distance?(1-nearClippingFactor)*eye_distance:eye_distance-clip_distance;var newViewport=new Viewport;return newViewport.nearPlane=localNearPlane,newViewport.farPlane=eye_distance+clip_distance,newViewport.eyePosition=localEyePosition,newViewport.targetPosition=[centreX,centreY,centreZ],newViewport.upVector=[this.cameraObject.up.x,this.cameraObject.up.y,this.cameraObject.up.z],newViewport},this.getCurrentViewport=()=>{var currentViewport=new Viewport;return currentViewport.nearPlane=this.cameraObject.near,currentViewport.farPlane=this.cameraObject.far,currentViewport.eyePosition[0]=this.cameraObject.position.x,currentViewport.eyePosition[1]=this.cameraObject.position.y,currentViewport.eyePosition[2]=this.cameraObject.position.z,currentViewport.targetPosition[0]=this.cameraObject.target.x,currentViewport.targetPosition[1]=this.cameraObject.target.y,currentViewport.targetPosition[2]=this.cameraObject.target.z,currentViewport.upVector[0]=this.cameraObject.up.x,currentViewport.upVector[1]=this.cameraObject.up.y,currentViewport.upVector[2]=this.cameraObject.up.z,currentViewport},this.getDefaultEyePosition=()=>eyePosition,this.getDefaultTargetPosition=()=>targetPosition,this.cameraTransition=(startingViewport,endingViewport,durationIn)=>{rotateCameraTransitionObject==null&&(smoothCameraTransitionObject=new SmoothCameraTransition(startingViewport,endingViewport,this,durationIn))},this.rotateCameraTransition=(axis,angle,duration)=>{smoothCameraTransitionObject==null&&(rotateCameraTransitionObject=new RotateCameraTransition(axis,angle,this,duration))},this.enableCameraTransition=()=>{smoothCameraTransitionObject&&(currentMode=MODE.SMOOTH_CAMERA_TRANSITION),rotateCameraTransitionObject&&(currentMode=MODE.ROTATE_CAMERA_TRANSITION)},this.pauseCameraTransition=()=>{currentMode=MODE.DEFAULT},this.stopCameraTransition=()=>{currentMode=MODE.DEFAULT,smoothCameraTransitionObject=void 0,rotateCameraTransitionObject=void 0},this.isTransitioningCamera=()=>currentMode===MODE.SMOOTH_CAMERA_TRANSITION||currentMode===MODE.ROTATE_CAMERA_TRANSITION,this.autoTumble=(tumbleDirectionIn,tumbleRateIn,stopOnCameraInputIn)=>{cameraAutoTumbleObject=new CameraAutoTumble(tumbleDirectionIn,tumbleRateIn,stopOnCameraInputIn,this)},this.enableAutoTumble=()=>{currentMode=MODE.AUTO_TUMBLE},this.stopAutoTumble=()=>{currentMode=MODE.DEFAULT,cameraAutoTumbleObject=void 0},this.updateAutoTumble=()=>{cameraAutoTumbleObject&&(cameraAutoTumbleObject.requireUpdate=!0)},this.isAutoTumble=()=>currentMode===MODE.AUTO_TUMBLE,this.enableRaycaster=(sceneIn,callbackFunctionIn,hoverCallbackFunctionIn)=>{zincRayCaster==null&&(zincRayCaster=new RayCaster(sceneIn,this.scene,callbackFunctionIn,hoverCallbackFunctionIn,this.renderer))},this.disableRaycaster=()=>{zincRayCaster.disable(),zincRayCaster=void 0},this.isSyncControl=()=>currentMpde===MODE.SYNC_CONTROL,this.enableSyncControl=()=>(currentMode=MODE.SYNC_CONTROL,ndcControl||(ndcControl=new NDCCameraControl),ndcControl.setCurrentCameraSettings(this.cameraObject,viewports[defaultViewport]),ndcControl),this.disableSyncControl=()=>{currentMode=MODE.DEFAULT,this.cameraObject.zoom=1,this.cameraObject.updateProjectionMatrix()},this.enable()},SmoothCameraTransition=function(startingViewport,endingViewport,targetCameraIn,durationIn){var startingEyePosition=startingViewport.eyePosition,startingTargetPosition=startingViewport.targetPosition,startingUp=startingViewport.upVector,endingEyePosition=endingViewport.eyePosition,endingTargetPosition=endingViewport.targetPosition,endingUp=endingViewport.upVector,targetCamera=targetCameraIn,duration=durationIn,inbuildTime=0,completed=!1;targetCamera.near=Math.min(startingViewport.nearPlane,endingViewport.nearPlane),targetCamera.far=Math.max(startingViewport.farPlane,endingViewport.farPlane),targetCamera.cameraObject.up.set(endingViewport.upVector[0],endingViewport.upVector[1],endingViewport.upVector[2]),this.setDuration=newDuration=>{duration=newDuration};var updateTime=delta=>{var targetTime=inbuildTime+delta;targetTime>duration&&(targetTime=duration),inbuildTime=targetTime},updateCameraSettings=()=>{var ratio=inbuildTime/duration,eyePosition=[startingEyePosition[0]*(1-ratio)+endingEyePosition[0]*ratio,startingEyePosition[1]*(1-ratio)+endingEyePosition[1]*ratio,startingEyePosition[2]*(1-ratio)+endingEyePosition[2]*ratio],targetPosition=[startingTargetPosition[0]*(1-ratio)+endingTargetPosition[0]*ratio,startingTargetPosition[1]*(1-ratio)+endingTargetPosition[1]*ratio,startingTargetPosition[2]*(1-ratio)+endingTargetPosition[2]*ratio],upVector=[startingUp[0]*(1-ratio)+endingUp[0]*ratio,startingUp[1]*(1-ratio)+endingUp[1]*ratio,startingUp[2]*(1-ratio)+endingUp[2]*ratio];targetCamera.cameraObject.position.set(eyePosition[0],eyePosition[1],eyePosition[2]),targetCamera.cameraObject.target.set(targetPosition[0],targetPosition[1],targetPosition[2])};this.update=delta=>{!1===this.enabled||(updateTime(delta),updateCameraSettings(),inbuildTime==duration&&(completed=!0))},this.isTransitionCompleted=()=>completed},RotateCameraTransition=function(axisIn,angleIn,targetCameraIn,durationIn){var duration=durationIn,inbuildTime=0,completed=!1;this.setDuration=newDuration=>{duration=newDuration};var updateCameraSettings=delta=>{var previousTime=inbuildTime,targetTime=inbuildTime+delta;targetTime>duration&&(targetTime=duration),inbuildTime=targetTime;var actualDelta=inbuildTime-previousTime,ratio=actualDelta/duration;targetCameraIn.rotateAboutLookAtpoint(axisIn,ratio*angleIn)};this.update=delta=>{!1===this.enabled||(updateCameraSettings(delta),inbuildTime==duration&&(completed=!0))},this.isTransitionCompleted=()=>completed},RayCaster=function(sceneIn,hostSceneIn,callbackFunctionIn,hoverCallbackFunctionIn,rendererIn){var scene=sceneIn,renderer=rendererIn,callbackFunction=callbackFunctionIn,hoverCallbackFunction=hoverCallbackFunctionIn,enabled=!0,raycaster=new THREE.Raycaster;raycaster.params.Line.threshold=.1,raycaster.params.Points.threshold=.1;var mouse=new THREE.Vector2,awaiting=!1,lastHoveredDate=new Date,lastHoveredEmpty=!1,timeDiff=0,pickedObjects=[],lastPosition={zincCamera:void 0,x:-1,y:-1};this.enable=()=>{enable=!0},this.disable=()=>{enable=!1};var getIntersectsObject=(zincCamera,x,y)=>{if(zincCamera.getNDCFromDocumentCoords(x,y,mouse),hostSceneIn!==scene){var threejsScene=scene.getThreeJSScene();renderer.render(threejsScene,zincCamera.cameraObject)}raycaster.setFromCamera(mouse,zincCamera.cameraObject);var objects=scene.getPickableThreeJSObjects();//Reset pickedObjects array \nreturn pickedObjects.length=0,raycaster.intersectObjects(objects,!0,pickedObjects)};this.pick=(zincCamera,x,y)=>{enabled&&renderer&&scene&&zincCamera&&callbackFunction&&(getIntersectsObject(zincCamera,x,y),callbackFunction(pickedObjects,x,y))};var hovered=(zincCamera,x,y)=>{if(enabled&&renderer&&scene&&zincCamera&&hoverCallbackFunction){if(getIntersectsObject(zincCamera,x,y),lastHoveredDate.setTime(Date.now()),0===pickedObjects.length){//skip hovered callback if the previous one is empty\nif(lastHoveredEmpty)return;lastHoveredEmpty=!0}else lastHoveredEmpty=!1;hoverCallbackFunction(pickedObjects,x,y)}};this.move=(zincCamera,x,y)=>{enabled&&renderer&&scene&&zincCamera&&hoverCallbackFunction&&(scene.displayMarkers?hovered(zincCamera,x,y):(lastPosition.zincCamera=zincCamera,lastPosition.x=x,lastPosition.y=y,!awaiting&&(timeDiff=lastHoveredDate?Date.now()-lastHoveredDate.getTime():250,250<=timeDiff?hovered(zincCamera,x,y):(awaiting=!0,setTimeout(awaitMove(lastPosition),timeDiff)))))};var awaitMove=lastPosition=>function(){awaiting=!1,hovered(lastPosition.zincCamera,lastPosition.x,lastPosition.y)}},CameraAutoTumble=function(tumbleDirectionIn,tumbleRateIn,stopOnCameraInputIn,targetCameraIn){var tumbleAxis=new THREE.Vector3,targetCamera=targetCameraIn;this.stopOnCameraInput=stopOnCameraInputIn,this.requireUpdate=!0;var b=new THREE.Vector3,c=new THREE.Vector3,computeTumbleAxisAngle=tumbleDirection=>{var tangent_dist=Math.sqrt(tumbleDirection[0]*tumbleDirection[0]+tumbleDirection[1]*tumbleDirection[1]),width=4*Math.abs(tumbleDirection[0]),height=4*Math.abs(tumbleDirection[1]),radius=.25*(width+height),dx=-tumbleDirection[1]/tangent_dist,dy=tumbleDirection[0]/tangent_dist,d=dx*tumbleDirection[0]+dy*-tumbleDirection[1];d>radius?d=radius:d<-radius&&(d=-radius);var phi=Math.acos(d/radius)-.5*Math.PI;/* get axis to rotate about */tumbleAxis.copy(targetCamera.cameraObject.position).sub(targetCamera.cameraObject.target).normalize(),b.copy(targetCamera.cameraObject.up).normalize(),c.crossVectors(b,tumbleAxis).normalize().multiplyScalar(dx),b.multiplyScalar(dy),b.add(c).multiplyScalar(Math.cos(phi)),tumbleAxis.multiplyScalar(Math.sin(phi)).add(b)};this.update=delta=>{!1===this.enabled||(this.requireUpdate&&(computeTumbleAxisAngle(tumbleDirectionIn),this.requireUpdate=!1),targetCamera.rotateAboutLookAtpoint(tumbleAxis,-tumbleRateIn*delta/1e3))}};StereoCameraZoomFixed=function StereoCameraZoomFixed(){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},Object.assign(StereoCameraZoomFixed.prototype,{update:(()=>{var focus,fov,aspect,near,far,zoom,eyeRight=new THREE.Matrix4,eyeLeft=new THREE.Matrix4;return function(camera){var needsUpdate=focus!==camera.focus||fov!==camera.fov||aspect!==camera.aspect*this.aspect||near!==camera.near||far!==camera.far||zoom!==camera.zoom;if(needsUpdate){focus=camera.focus,fov=camera.fov,aspect=camera.aspect*this.aspect,near=camera.near,far=camera.far,zoom=camera.zoom;// Off-axis stereoscopic effect based on\n// http://paulbourke.net/stereographics/stereorender/\nvar xmin,xmax,projectionMatrix=camera.projectionMatrix.clone(),eyeSep=.064/2,eyeSepOnProjection=eyeSep*near/focus,ymax=near*Math.tan(.5*(THREE.Math.DEG2RAD*fov))/camera.zoom;// translate xOffset\n// for left eye\n// for right eye\neyeLeft.elements[12]=-eyeSep,eyeRight.elements[12]=eyeSep,xmin=-ymax*aspect+eyeSepOnProjection,xmax=ymax*aspect+eyeSepOnProjection,projectionMatrix.elements[0]=2*near/(xmax-xmin),projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraL.projectionMatrix.copy(projectionMatrix),xmin=-ymax*aspect-eyeSepOnProjection,xmax=ymax*aspect-eyeSepOnProjection,projectionMatrix.elements[0]=2*near/(xmax-xmin),projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraR.projectionMatrix.copy(projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(eyeLeft),this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(eyeRight)}})()});/** the following StereoEffect is written by third party */ /**\n * @author alteredq / http://alteredqualia.com/\n * @authod mrdoob / http://mrdoob.com/\n * @authod arodic / http://aleksandarrodic.com/\n * @authod fonserbc / http://fonserbc.github.io/\n*/var StereoEffect=function(renderer){var _stereo=new StereoCameraZoomFixed;_stereo.aspect=.5,this.setSize=(width,height)=>{renderer.setSize(width,height)},this.render=(scene,camera)=>{scene.updateMatrixWorld(),null===camera.parent&&camera.updateMatrixWorld(),_stereo.update(camera);var size=renderer.getSize();renderer.setScissorTest(!0),renderer.clear(),renderer.setScissor(0,0,size.width/2,size.height),renderer.setViewport(0,0,size.width/2,size.height),renderer.render(scene,_stereo.cameraL),renderer.setScissor(size.width/2,0,size.width/2,size.height),renderer.setViewport(size.width/2,0,size.width/2,size.height),renderer.render(scene,_stereo.cameraR),renderer.setScissorTest(!1)}};/**\n * @author richt / http://richt.me\n * @author WestLangley / http://github.com/WestLangley\n *\n * W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)\n */ModifiedDeviceOrientationControls=function ModifiedDeviceOrientationControls(object){var scope=this;this.object=object,this.object.rotation.reorder(\"YXZ\"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0;var onDeviceOrientationChangeEvent=event=>{scope.deviceOrientation=event},onScreenOrientationChangeEvent=()=>{\"undefined\"!=typeof window&&(scope.screenOrientation=window.orientation||0)},setObjectQuaternion=(()=>{var zee=new THREE.Vector3(0,0,1),euler=new THREE.Euler,q0=new THREE.Quaternion,q1=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));// - PI/2 around the x-axis\nreturn(cameraObject,alpha,beta,gamma,orient)=>{var vector=new THREE.Vector3(0,0,1);vector.subVectors(cameraObject.target,cameraObject.position),euler.set(beta,alpha,-gamma,\"YXZ\");// 'ZXY' for the device, but 'YXZ' for us\nvar quaternion=new THREE.Quaternion;// orient the device\n// camera looks out the back of the device, not the top\n// adjust for screen orientation\nquaternion.setFromEuler(euler),quaternion.multiply(q1),quaternion.multiply(q0.setFromAxisAngle(zee,-orient)),vector.applyQuaternion(quaternion),vector.addVectors(cameraObject.position,vector),cameraObject.lookAt(vector)}})();this.connect=()=>{onScreenOrientationChangeEvent(),\"undefined\"!=typeof window&&(window.addEventListener(\"orientationchange\",onScreenOrientationChangeEvent,!1),window.addEventListener(\"deviceorientation\",onDeviceOrientationChangeEvent,!1)),scope.enabled=!0},this.disconnect=()=>{\"undefined\"!=typeof window&&(window.removeEventListener(\"orientationchange\",onScreenOrientationChangeEvent,!1),window.removeEventListener(\"deviceorientation\",onDeviceOrientationChangeEvent,!1)),scope.enabled=!1},this.update=()=>{if(!1!==scope.enabled){var alpha=scope.deviceOrientation.alpha?THREE.Math.degToRad(scope.deviceOrientation.alpha):0,beta=scope.deviceOrientation.beta?THREE.Math.degToRad(scope.deviceOrientation.beta):0,gamma=scope.deviceOrientation.gamma?THREE.Math.degToRad(scope.deviceOrientation.gamma):0,orient=scope.screenOrientation?THREE.Math.degToRad(scope.screenOrientation):0;// Z\nsetObjectQuaternion(scope.object,alpha,beta,gamma,orient)}},this.dispose=function(){this.disconnect()},this.connect()};var NDCCameraControl=function(){var camera=void 0,targetCamera=void 0,defaultViewport=void 0,position=new THREE.Vector3,target=new THREE.Vector3,v1=new THREE.Vector3,v2=new THREE.Vector3,eventCallback=void 0;//return top left and size\nthis.setCurrentCameraSettings=(cameraIn,defaultViewportIn)=>{camera=cameraIn.clone(),targetCamera=cameraIn,defaultViewport=defaultViewportIn,camera.near=defaultViewport.nearPlane,defaultViewport.farPlane&&(camera.far=defaultViewport.farPlane),defaultViewport.eyePosition&&camera.position.set(defaultViewport.eyePosition[0],defaultViewport.eyePosition[1],defaultViewport.eyePosition[2]),defaultViewport.upVector&&camera.up.set(defaultViewport.upVector[0],defaultViewport.upVector[1],defaultViewport.upVector[2]),defaultViewport.targetPosition&&(camera.target=new THREE.Vector3(defaultViewport.targetPosition[0],defaultViewport.targetPosition[1],defaultViewport.targetPosition[2]),camera.lookAt(camera.target)),camera.updateProjectionMatrix(),position.copy(camera.position).project(camera),target.copy(camera.target).project(camera)},this.getCurrentPosition=()=>(target.copy(targetCamera.target).project(camera),[target.x,target.y]),this.zoom=delta=>{var zoom=Math.max(targetCamera.zoom-.002*delta,1);targetCamera.zoom=zoom,targetCamera.updateProjectionMatrix()},this.zoomToBox=(box,zoom)=>{box.getCenter(v1),v1.project(camera),this.setCenterZoom([v1.x,v1.y],zoom)},this.getPanZoom=()=>({target:this.getCurrentPosition(),zoom:targetCamera.zoom}),this.setCenterZoom=(center,zoom)=>{v1.set(center[0],center[1],target.z).unproject(camera),v2.copy(v1).sub(targetCamera.target),targetCamera.target.copy(v1),targetCamera.lookAt(targetCamera.target),targetCamera.position.add(v2),targetCamera.zoom=zoom,targetCamera.updateProjectionMatrix()},this.setEventCallback=callback=>{(callback===void 0||\"function\"==typeof callback)&&(eventCallback=callback)},this.triggerCallback=()=>{eventCallback!==void 0&&\"function\"==typeof eventCallback&&eventCallback()}};exports.Viewport=Viewport,exports.CameraControls=CameraControls,exports.SmoothCameraTransition=SmoothCameraTransition,exports.RotateCameraTransition=RotateCameraTransition,exports.RayCaster=RayCaster,exports.CameraAutoTumble=CameraAutoTumble,exports.StereoEffect=StereoEffect,exports.NDCCameraControl=NDCCameraControl;\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar{Group,Matrix4}=__webpack_require__(3),uniqueiId=0,getUniqueId=function(){return\"re\"+uniqueiId++},Region=function(parentIn){var parent=parentIn,group=new Group;group.matrixAutoUpdate=!1,group.userData=this;var children=[],name=\"\",zincObjects=[],tMatrix=new Matrix4,duration=3e3;/**\n * Hide all primitives belong to this region.\n */ /**\n * Show all primitives belong to this region.\n */ /**\n * Set the visibility and propagate it down the hierarchies\n * depending on the flag.\n * \n * @param {Boolean} flag - A flag indicating either the visibilty to be on/off.\n */ /**\n * Get the visibility of the region and its children.\n * \n * @return {Boolean}\n */ /**\n * Get the {THREE.Group} containing all child regions and their\n * primitives.\n * \n * @return {THREE.Group}\n */ /**\n * Set the transformation with a {THREE.Matrix4} matrix, this will affect\n * all primitives in this and its child regions\n * \n * @param {THREE.Matrix4} transformation - The transformation matrix\n * used for the transformation.\n */ /**\n * Set the name of this region.\n * \n * @param {String} nameIn - Name to be set for this region. It must be defined\n * and non-empty.\n */ /**\n * Get the name of this region.\n * \n * @return {String}\n */ /**\n * Get the parent region.\n * \n * @return {Region}\n */ /**\n * Get the array of each hierarachy from the root region to this region.\n * \n * @return {Array}\n */ /**\n * Get the full paths from the root region to this region.\n * \n * @return {String}\n */ /**\n * Create a new child region with the provided name.\n * @param {String} nameIn - Name to be set for the new child region.\n * \n * @return {Region}\n */ /**\n * Get the child region with matching childName.\n * @param {String} childName - Name to be matched.\n * \n * @return {Region}\n */ /**\n * Find a child region using the path array.\n * @param {Array} pathArray - Array containing regions' name at each\n * hierarchy to match.\n * \n * @return {Region}\n */ /**\n * Find the region using the provided relative path.\n * \n * @param {String} path - Relative paths from this region\n * to the child region.\n * \n * @return {Region}\n */ /**\n * Create a new child using the path array. All required new regions\n * down the path will be created.\n * \n * @param {Array} pathArray - Array containing regions' name, new regions\n * will be created along the path if not found.\n * \n * @return {Region}\n */ /**\n * Create a new child using the path. All required new regions\n * down the path will be created.\n * \n * @param {String} path - Relative paths from the region\n * to the child region.\n * \n * @return {Region}\n */ /**\n * Return existing region if it exists, otherwise, create a new\n * region with the provided path.\n * \n * @param {String} path - Relative paths from the region\n * to the child region.\n * \n * @return {Region}\n */ /**\n * Add a zinc object into this region, the morph will be added\n * to the group.\n * \n * @param {ZincObject} zincObject - Zinc object to be added into\n * this region.\n */ /**\n * Remove a ZincObject from this region if it presents. This will eventually\n * destroy the object and free up the memory.\n * \n * @param {ZincObject} zincObject - object to be removed from this region.\n */ /**\n * Return true if pickable objects require an update.\n * \n * @param {Boolean} transverse - Check child regions as well\n * if this is set to true.\n * \n * @return {Boolean}\n */ /**\n * Get all pickable objects.\n */ /**\n * Set the default duration value for all zinc objects\n * that are to be loaded into this region.\n * \n * @param {Number} durationIn - duration of the scene.\n */ /**\n * Get the default duration value.\n * returns {Number}\n */ /**\n * Get the bounding box of all the object in this and child regions only.\n * Do not include the matrix transformation here, it is done at the primitives\n * level.\n * \n * @returns {THREE.Box3} \n */ /**\n * Clear and dispose all objects belong to this region.\n * \n * @param {Boolean} transverse - Clear and dispose child regions as well\n * if this is set to true.\n */ /**\n * Check if a zincObject is a member of this region.\n * \n * @param {ZincObject} zincObject - The ZincObject to be checked.\n * @param {Boolean} transverse - Also check the child regions.\n * \n * @return {Boolean}\n */ /**\n * A function which iterates through the list of geometries and call the callback\n * function with the geometries as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the geometry\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /**\n * A function which iterates through the list of glyphsets and call the callback\n * function with the glyphset as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the glyphset\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /**\n * A function which iterates through the list of pointsets and call the callback\n * function with the pointset as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the pointset\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /**\n * A function which iterates through the list of lines and call the callback\n * function with the lines as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the lines\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /** \n * Find and return all zinc objects in this and child regions with \n * the matching GroupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all geometries in this and child regions with \n * the matching GroupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all pointsets in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all glyphsets in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all lines in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Get all zinc objects in this region.\n * \n * @param {Boolean} transverse - Include zinc objects in child regions if this is\n * set to true.\n * @returns {Array}\n */ /** \n * Get all child regions.\n * \n * @param {Boolean} transverse - Include all regions which are descendants of \n * this reigon when this is set to true.\n * @returns {Array}\n */ /**\n * Get the current time of the region.\n * Return -1 if no graphics in the region.\n * \n * @return {Number}\n */ /**\n * Set the current time of all the objects of this region.\n * \n * @param {Number} time - Value to set the time to.\n * @param {Boolean} transverse - Set the time for chidl regions if\n * this is set to true.\n */ /**\n * Check if any object in this region is time varying.\n * \n * @return {Boolean}\n */ /**\n * Update geometries and glyphsets based on the calculated time.\n * @private\n */tMatrix.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this.pickableUpdateRequired=!0,this.isRegion=!0,this.uuid=getUniqueId(),this.hideAllPrimitives=()=>{children.forEach(child=>child.hideAllPrimitives()),zincObjects.forEach(zincObject=>zincObject.setVisibility(!1))},this.showAllPrimitives=()=>{children.forEach(child=>child.showAllPrimitives()),zincObjects.forEach(zincObject=>zincObject.setVisibility(!0))},this.setVisibility=flag=>{group.visible=flag},this.getVisibility=()=>group.visible,this.getGroup=()=>group,this.setTransformation=transformation=>{tMatrix.set(...transformation),group.matrix.copy(tMatrix),group.updateMatrixWorld()},this.setName=nameIn=>{nameIn&&\"\"!==nameIn&&(name=nameIn)},this.getName=()=>name,this.getParent=()=>parent,this.getFullSeparatedPath=()=>{var paths=[];if(\"\"!==name){paths.push(name);for(var parentName,p=parent;p!==void 0;)parentName=p.getName(),\"\"!==parentName&&paths.unshift(parentName),p=p.getParent()}return paths},this.getFullPath=()=>{var paths=this.getFullSeparatedPath();if(0<paths.length){var fullPath=paths.shift();return paths.forEach(path=>{fullPath=fullPath.concat(\"/\",path)}),fullPath}return\"\"},this.createChild=nameIn=>{var childRegion=new Region(this);return childRegion.setName(nameIn),children.push(childRegion),group.add(childRegion.getGroup()),childRegion},this.getChildWithName=childName=>{if(childName)for(var lowerChildName=childName.toLowerCase(),i=0;i<children.length;i++)if(children[i].getName().toLowerCase()===lowerChildName)return children[i]},this.findChildFromSeparatedPath=pathArray=>{if(pathArray&&0<pathArray.length&&\"\"===pathArray[0]&&pathArray.shift(),pathArray&&0<pathArray.length){var childRegion=this.getChildWithName(pathArray[0]);return childRegion?(pathArray.shift(),childRegion.findChildFromSeparatedPath(pathArray)):void 0}return this},this.findChildFromPath=path=>{var pathArray=path.split(\"/\");return this.findChildFromSeparatedPath(pathArray)},this.createChildFromSeparatedPath=pathArray=>{if(0<pathArray.length&&\"\"===pathArray[0]&&pathArray.shift(),0<pathArray.length){var childRegion=this.getChildWithName(pathArray[0]);return childRegion||(childRegion=this.createChild(pathArray[0])),pathArray.shift(),childRegion.createChildFromSeparatedPath(pathArray)}return this},this.createChildFromPath=path=>{var pathArray=path.split(\"/\");return this.createChildFromSeparatedPath(pathArray)},this.findOrCreateChildFromPath=path=>{var childRegion=this.findChildFromPath(path);return childRegion||(childRegion=this.createChildFromPath(path)),childRegion},this.addZincObject=zincObject=>{zincObject&&(zincObject.setRegion(this),group.add(zincObject.morph),zincObjects.push(zincObject),this.pickableUpdateRequired=!0)},this.removeZincObject=zincObject=>{for(var i=0;i<zincObjects.length;i++)if(zincObject===zincObjects[i])return group.remove(zincObject.morph),zincObjects.splice(i,1),void zincObject.dispose()},this.checkPickableUpdateRequred=transverse=>{if(this.pickableUpdateRequired)return!0;if(transverse)for(var flag=!1,i=0;i<children.length;i++)if(flag=children[i].checkPickableUpdateRequred(transverse),flag)return!0;return!1},this.getPickableThreeJSObjects=(objectsList,transverse)=>(zincObjects.forEach(zincObject=>{if(zincObject.morph&&zincObject.morph.visible){var marker=zincObject.marker;marker&&marker.isEnabled()&&objectsList.push(marker.morph),objectsList.push(zincObject.morph)}}),transverse&&children.forEach(childRegion=>{childRegion.getPickableThreeJSObjects(objectsList,transverse)}),this.pickableUpdateRequired=!1,objectsList),this.setDuration=durationIn=>{duration=durationIn,zincObjects.forEach(zincObject=>zincObject.setDuration(durationIn)),children.forEach(childRegion=>childRegion.setDuration(durationIn))},this.getDuration=()=>duration,this.getBoundingBox=transverse=>{var boundingBox1,boundingBox2;return zincObjects.forEach(zincObject=>{boundingBox2=zincObject.getBoundingBox(),boundingBox2&&(null==boundingBox1?boundingBox1=boundingBox2.clone():boundingBox1.union(boundingBox2))}),transverse&&children.forEach(childRegion=>{boundingBox2=childRegion.getBoundingBox(transverse),boundingBox2&&(null==boundingBox1?boundingBox1=boundingBox2.clone():boundingBox1.union(boundingBox2))}),boundingBox1},this.clear=transverse=>{transverse&&children.forEach(childRegion=>childRegion.clear(transverse)),zincObjects.forEach(zincObject=>{group.remove(zincObject.morph),zincObject.dispose()}),children=[],zincObjects=[]},this.objectIsInRegion=(zincObject,transverse)=>{for(var i=0;i<zincObjects.length;i++)if(zincObject===zincObjects[i])return!0;if(transverse)for(var _i=0;_i<children.length;_i++)if(children[_i].objectIsInRegion(zincObject,transverse))return!0;return!1},this.forEachGeometry=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isGeometry&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachGeometry(callbackFunction,transverse))},this.forEachGlyphset=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isGlyphset&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachGlyphset(callbackFunction,transverse))},this.forEachPointset=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isPointset&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachPointset(callbackFunction,transverse))},this.forEachLine=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isLines&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachLine(callbackFunction,transverse))},this.findObjectsWithAnatomicalId=(anatomicalId,transverse)=>(zincObjects.forEach(zincObject=>{zincObject.anatomicalId===anatomicalId&&objectsArray.push(zincObject)}),transverse&&children.forEach(childRegion=>{var childObjects=childRegion.findObjectsWithAnatomicalId(anatomicalId,transverse);objectsArray.push(...childObjects)}),objectsArray),this.findObjectsWithGroupName=(groupName,transverse)=>{var objectsArray=[];return zincObjects.forEach(zincObject=>{var lowerObjectName=zincObject.groupName?zincObject.groupName.toLowerCase():zincObject.groupName,lowerGroupName=groupName?groupName.toLowerCase():groupName;lowerObjectName===lowerGroupName&&objectsArray.push(zincObject)}),transverse&&children.forEach(childRegion=>{var childObjects=childRegion.findObjectsWithGroupName(groupName,transverse);objectsArray.push(...childObjects)}),objectsArray},this.findGeometriesWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),geometriesArray=primitivesArray.filter(primitive=>primitive.isGeometry);return geometriesArray},this.findPointsetsWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),pointsetsArray=primitivesArray.filter(primitive=>primitive.isPointset);return pointsetsArray},this.findGlyphsetsWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),glyphsetsArray=primitivesArray.filter(primitive=>primitive.isGlyphset);return glyphsetsArray},this.findLinesWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),linesArray=primitivesArray.filter(primitive=>primitive.isLines);return linesArray},this.getAllObjects=transverse=>{var objectsArray=[...zincObjects];return transverse&&children.forEach(childRegion=>{var childObjects=childRegion.getAllObjects(transverse);objectsArray.push(...childObjects)}),objectsArray},this.getChildRegions=transverse=>{var objectsArray=[...children];return transverse&&children.forEach(childRegion=>{var childObjects=childRegion.getChildRegions(transverse);objectsArray.push(...childObjects)}),objectsArray},this.getCurrentTime=()=>{if(zincObjects[0]!=null)return zincObjects[0].getCurrentTime();for(var time,i=0;i<children.length;i++)if(time=children[i].getCurrentTime(),-1!==time)return time;return-1},this.setMorphTime=(time,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.setMorphTime(time)}),transverse&&children.forEach(childRegion=>{childRegion.setMorphTime(time)})},this.isTimeVarying=()=>{for(var i=0;i<zincObjects.length;i++)if(zincObjects[i].isTimeVarying())return!0;for(var _i2=0;_i2<children.length;_i2++)if(children[_i2].isTimeVarying())return!0;return!1},this.renderGeometries=(playRate,delta,playAnimation,options,transverse)=>{// Let video dictates the progress if one is present\nvar allObjects=this.getAllObjects(transverse);//process markers visibility and size\nif(allObjects.forEach(zincObject=>{zincObject.render(playRate*delta,playAnimation,options)}),options&&options.displayMarkers&&!1===playAnimation&&0<options.markerDepths.length){var min=Math.min(...options.markerDepths),max=Math.max(...options.markerDepths);allObjects.forEach(zincObject=>{zincObject.processMarkerVisual(min,max,options)})}}};exports.Region=Region;\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3);/**\n * This provide a full scale minimap. It will always\n * display the whole map.\n * \n * @class\n * @author Alan Wu\n * @return {Minimap}\n */exports.Minimap=function(sceneIn){var targetScene=sceneIn;this.camera=new THREE.OrthographicCamera(-.5,.5,.5,-.5,.01,10),this.helper=void 0;var geometry=new THREE.BufferGeometry,vertices=new Float32Array([-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1]),positionAttributes=new THREE.BufferAttribute(vertices,3);geometry.setAttribute(\"position\",positionAttributes);var material=new THREE.MeshBasicMaterial({color:3355443,depthTest:!1,depthWrite:!1,opacity:.5,transparent:!0});this.mask=new THREE.Mesh(geometry,material);var _box=new THREE.Box3,_center=new THREE.Vector3;this.getDiffFromNormalised=(x,y)=>{_box.setFromBufferAttribute(positionAttributes).getCenter(_center);var coord=_center.clone().project(this.camera),new_coord=new THREE.Vector3(x,y,coord.z).unproject(this.camera);return new_coord.sub(_center)};var setCurrentCameraSettings=(diameter,newViewport)=>{targetScene.camera.near&&(this.camera.near=targetScene.camera.near),newViewport.farPlane&&(this.camera.far=newViewport.farPlane),newViewport.eyePosition&&this.camera.position.set(newViewport.eyePosition[0],newViewport.eyePosition[1],newViewport.eyePosition[2]),newViewport.upVector&&this.camera.up.set(newViewport.upVector[0],newViewport.upVector[1],newViewport.upVector[2]),newViewport.targetPosition&&this.camera.lookAt(new THREE.Vector3(newViewport.targetPosition[0],newViewport.targetPosition[1],newViewport.targetPosition[2])),this.camera.zoom=1/diameter,this.camera.updateProjectionMatrix()};this.getBoundary=()=>{var target=new THREE.Vector3().copy(targetScene.camera.target).project(targetScene.camera),v1=new THREE.Vector3(-1,-1,target.z).unproject(targetScene.camera),v2=new THREE.Vector3(1,-1,target.z).unproject(targetScene.camera),v3=new THREE.Vector3(1,1,target.z).unproject(targetScene.camera),v4=new THREE.Vector3(-1,1,target.z).unproject(targetScene.camera);positionAttributes.copyVector3sArray([v1,v2,v3,v3,v4,v1]),positionAttributes.needsUpdate=!0},this.updateCamera=()=>{this.getBoundary();var cameraControl=targetScene.getZincCameraControls(),boundingBox=targetScene.getBoundingBox();if(boundingBox){// enlarge radius to keep image within edge of window\nvar diameter=boundingBox.min.distanceTo(boundingBox.max),radius=diameter/2,centreX=(boundingBox.min.x+boundingBox.max.x)/2,centreY=(boundingBox.min.y+boundingBox.max.y)/2,centreZ=(boundingBox.min.z+boundingBox.max.z)/2,viewport=cameraControl.getViewportFromCentreAndRadius(centreX,centreY,centreZ,radius,40,radius*4);setCurrentCameraSettings(diameter,viewport)}}};\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ThreeBSP=__webpack_require__(43)(THREE),Geometry=__webpack_require__(2).Geometry,work=__webpack_require__(44),Promise=__webpack_require__(45).default,JSONLoader=THREE.BufferGeometryLoader,GeometryCSG=function(hostIn){//ZincGeoemtry of the main geometry\nvar host;hostIn&&hostIn.isGeometry&&(host=hostIn);var core=void 0,worker=void 0,onProgress=!1,myResolve=void 0,createGeometryFromJSON=json=>{var material=host.morph.material.clone();material.morphTargets=!1;var newGeometry=new Geometry,JSONParser=new JSONLoader,geometry=JSONParser.parse(json),mesh=new THREE.Mesh(geometry.geometry,material);return newGeometry.geometry=mesh.geometry,newGeometry.morph=mesh,newGeometry.morph.userData=newGeometry,newGeometry},workerEventHandler=ev=>{switch(ev.data.action){case\"message\":console.log(ev.data.message);break;case\"result\":var csg=new GeometryCSG(createGeometryFromJSON(ev.data.object));myResolve&&myResolve(csg),myResolve=void 0,onProgress=!1;break;default:throw\"Cannot handle specified action.\";}},initialise=hostIn=>{if(void 0!==work&&(worker=work(/*require.resolve*/(46))),!worker)core=new(__webpack_require__(47).GeometryCSGInternal)(hostIn);else if(hostIn&&hostIn.isGeometry){var mesh=hostIn.morph,json=mesh.geometry.clone().applyMatrix(mesh.matrix).toJSON();worker.addEventListener(\"message\",function(ev){workerEventHandler(ev)}),worker.postMessage({action:\"initialise\",object:json})}};this.getHostGeometry=()=>{var tempCSG=new ThreeBSP(host.morph);return new createZincGeometry(tempCSG)},this.getGeometry=()=>host;var createZincGeometry=csgMesh=>{var material=host.morph.material.clone();material.morphTargets=!1;var newMesh=csgMesh.toMesh(material),newGeometry=new Geometry;return newGeometry.geometry=newMesh.geometry,newGeometry.morph=newMesh,newGeometry.morph.userData=newGeometry,newGeometry};this.setCSG=CSG=>{core.setCSG(CSG)};var sendToWork=(guestGeometry,action,resolve,reject)=>{if(!onProgress){var mesh=guestGeometry.morph,json=mesh.geometry.clone().applyMatrix(mesh.matrix).toJSON();myResolve=resolve,onProgress=!0,worker.postMessage({action:action,object:json})}else reject(\"On progress\")};this.intersect=guestGeometry=>new Promise((resolve,reject)=>{if(worker)sendToWork(guestGeometry,\"intersect\",resolve,reject);else{var result=core.intersect(guestGeometry),newCSG=new GeometryCSG(createZincGeometry(result));newCSG.setCSG(result),resolve(newCSG)}}),this.subtract=guestGeometry=>new Promise((resolve,reject)=>{if(worker)sendToWork(guestGeometry,\"intersect\",resolve,reject);else{var result=core.subtract(guestGeometry),newCSG=new GeometryCSG(createZincGeometry(result));newCSG.setCSG(result),resolve(newCSG)}}),this.union=guestGeometry=>new Promise((resolve,reject)=>{if(worker)sendToWork(guestGeometry,\"intersect\",resolve,reject);else{var result=core.union(guestGeometry),newCSG=new GeometryCSG(createZincGeometry(result));newCSG.setCSG(result),resolve(newCSG)}}),this.terminateWorker=()=>{worker&&worker.terminate()},initialise(hostIn)};exports.GeometryCSG=GeometryCSG;\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar ThreeBSP,EPSILON=1e-5,COPLANAR=0,FRONT=1,BACK=2,SPANNING=3;module.exports=function(THREE){var ThreeBSP=function(geometry){// Convert THREE.Geometry to ThreeBSP\nvar i,_length_i,face,vertex,faceVertexUvs,uvs,polygon,polygons=[];if(geometry.isBufferGeometry&&(geometry=new THREE.Geometry().fromBufferGeometry(geometry)),geometry instanceof THREE.Geometry)this.matrix=new THREE.Matrix4;else if(geometry.isMesh)geometry.updateMatrix(),this.matrix=geometry.matrix.clone(),geometry=geometry.geometry,geometry.isBufferGeometry&&(geometry=new THREE.Geometry().fromBufferGeometry(geometry)),geometry.mergeVertices(),geometry.computeVertexNormals(!1);else{if(geometry instanceof ThreeBSP.Node)return this.tree=geometry,this.matrix=new THREE.Matrix4,this;throw\"ThreeBSP: Given geometry is unsupported\"}for(i=0,_length_i=geometry.faces.length;i<_length_i;i++){if(face=geometry.faces[i],faceVertexUvs=geometry.faceVertexUvs[0][i],polygon=new ThreeBSP.Polygon,face instanceof THREE.Face3)vertex=geometry.vertices[face.a],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[0].x,faceVertexUvs[0].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[0],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.b],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[1].x,faceVertexUvs[1].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[2],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.c],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[2].x,faceVertexUvs[2].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[2],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex);else if(typeof THREE.Face4)vertex=geometry.vertices[face.a],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[0].x,faceVertexUvs[0].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[0],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.b],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[1].x,faceVertexUvs[1].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[1],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.c],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[2].x,faceVertexUvs[2].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[2],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.d],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[3].x,faceVertexUvs[3].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[3],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex);else throw\"Invalid face type at index \"+i;polygon.calculateProperties(),polygons.push(polygon)}this.tree=new ThreeBSP.Node(polygons)};return ThreeBSP.prototype.subtract=function(other_tree){var a=this.tree.clone(),b=other_tree.tree.clone();return a.invert(),a.clipTo(b),b.clipTo(a),b.invert(),b.clipTo(a),b.invert(),a.build(b.allPolygons()),a.invert(),a=new ThreeBSP(a),a.matrix=this.matrix,a},ThreeBSP.prototype.union=function(other_tree){var a=this.tree.clone(),b=other_tree.tree.clone();return a.clipTo(b),b.clipTo(a),b.invert(),b.clipTo(a),b.invert(),a.build(b.allPolygons()),a=new ThreeBSP(a),a.matrix=this.matrix,a},ThreeBSP.prototype.intersect=function(other_tree){var a=this.tree.clone(),b=other_tree.tree.clone();return a.invert(),b.clipTo(a),b.invert(),a.clipTo(b),b.clipTo(a),a.build(b.allPolygons()),a.invert(),a=new ThreeBSP(a),a.matrix=this.matrix,a},ThreeBSP.prototype.toGeometry=function(){var i,j,polygon,polygon_vertice_count,vertex_idx_a,vertex_idx_b,vertex_idx_c,vertex,face,verticeUvs,matrix=new THREE.Matrix4().getInverse(this.matrix),geometry=new THREE.Geometry,polygons=this.tree.allPolygons(),polygon_count=polygons.length,vertice_dict={};for(i=0;i<polygon_count;i++)for(polygon=polygons[i],polygon_vertice_count=polygon.vertices.length,j=2;j<polygon_vertice_count;j++)verticeUvs=[],vertex=polygon.vertices[0],verticeUvs.push(new THREE.Vector2(vertex.uv.x,vertex.uv.y)),vertex=new THREE.Vector3(vertex.x,vertex.y,vertex.z),vertex.applyMatrix4(matrix),\"undefined\"==typeof vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]?(geometry.vertices.push(vertex),vertex_idx_a=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]=geometry.vertices.length-1):vertex_idx_a=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z],vertex=polygon.vertices[j-1],verticeUvs.push(new THREE.Vector2(vertex.uv.x,vertex.uv.y)),vertex=new THREE.Vector3(vertex.x,vertex.y,vertex.z),vertex.applyMatrix4(matrix),\"undefined\"==typeof vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]?(geometry.vertices.push(vertex),vertex_idx_b=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]=geometry.vertices.length-1):vertex_idx_b=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z],vertex=polygon.vertices[j],verticeUvs.push(new THREE.Vector2(vertex.uv.x,vertex.uv.y)),vertex=new THREE.Vector3(vertex.x,vertex.y,vertex.z),vertex.applyMatrix4(matrix),\"undefined\"==typeof vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]?(geometry.vertices.push(vertex),vertex_idx_c=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]=geometry.vertices.length-1):vertex_idx_c=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z],face=new THREE.Face3(vertex_idx_a,vertex_idx_b,vertex_idx_c,new THREE.Vector3(polygon.normal.x,polygon.normal.y,polygon.normal.z)),geometry.faces.push(face),geometry.faceVertexUvs[0].push(verticeUvs);return geometry},ThreeBSP.prototype.toBufferGeometry=function(){var geometry=this.toGeometry(),bufferGeometry=new THREE.BufferGeometry().fromGeometry(geometry);return bufferGeometry},ThreeBSP.prototype.toMesh=function(material){var geometry=this.toBufferGeometry(),mesh=new THREE.Mesh(geometry,material);return mesh.position.setFromMatrixPosition(this.matrix),mesh.rotation.setFromRotationMatrix(this.matrix),mesh},ThreeBSP.Polygon=function(vertices){vertices instanceof Array||(vertices=[]),this.vertices=vertices,0<vertices.length?this.calculateProperties():this.normal=this.w=void 0},ThreeBSP.Polygon.prototype.calculateProperties=function(){var a=this.vertices[0],b=this.vertices[1],c=this.vertices[2];return this.normal=b.clone().subtract(a).cross(c.clone().subtract(a)).normalize(),this.w=this.normal.clone().dot(a),this},ThreeBSP.Polygon.prototype.clone=function(){var i,vertice_count,polygon=new ThreeBSP.Polygon;for(i=0,vertice_count=this.vertices.length;i<vertice_count;i++)polygon.vertices.push(this.vertices[i].clone());return polygon.calculateProperties(),polygon},ThreeBSP.Polygon.prototype.flip=function(){var i,vertices=[];for(this.normal.multiplyScalar(-1),this.w*=-1,i=this.vertices.length-1;0<=i;i--)vertices.push(this.vertices[i]);return this.vertices=vertices,this},ThreeBSP.Polygon.prototype.classifyVertex=function(vertex){var side_value=this.normal.dot(vertex)-this.w;return side_value<-EPSILON?BACK:side_value>EPSILON?FRONT:COPLANAR},ThreeBSP.Polygon.prototype.classifySide=function(polygon){var i,vertex,classification,num_positive=0,num_negative=0,vertice_count=polygon.vertices.length;for(i=0;i<vertice_count;i++)vertex=polygon.vertices[i],classification=this.classifyVertex(vertex),classification===FRONT?num_positive++:classification===BACK&&num_negative++;return 0<num_positive&&0===num_negative?FRONT:0===num_positive&&0<num_negative?BACK:0===num_positive&&0===num_negative?COPLANAR:SPANNING},ThreeBSP.Polygon.prototype.splitPolygon=function(polygon,coplanar_front,coplanar_back,front,back){var classification=this.classifySide(polygon);if(classification===COPLANAR)(0<this.normal.dot(polygon.normal)?coplanar_front:coplanar_back).push(polygon);else if(classification===FRONT)front.push(polygon);else if(classification===BACK)back.push(polygon);else{var vertice_count,i,j,ti,tj,vi,vj,t,v,f=[],b=[];for(i=0,vertice_count=polygon.vertices.length;i<vertice_count;i++)j=(i+1)%vertice_count,vi=polygon.vertices[i],vj=polygon.vertices[j],ti=this.classifyVertex(vi),tj=this.classifyVertex(vj),ti!=BACK&&f.push(vi),ti!=FRONT&&b.push(vi),(ti|tj)===SPANNING&&(t=(this.w-this.normal.dot(vi))/this.normal.dot(vj.clone().subtract(vi)),v=vi.interpolate(vj,t),f.push(v),b.push(v));3<=f.length&&front.push(new ThreeBSP.Polygon(f).calculateProperties()),3<=b.length&&back.push(new ThreeBSP.Polygon(b).calculateProperties())}},ThreeBSP.Vertex=function(x,y,z,normal,uv){this.x=x,this.y=y,this.z=z,this.normal=normal||new THREE.Vector3,this.uv=uv||new THREE.Vector2},ThreeBSP.Vertex.prototype.clone=function(){return new ThreeBSP.Vertex(this.x,this.y,this.z,this.normal.clone(),this.uv.clone())},ThreeBSP.Vertex.prototype.add=function(vertex){return this.x+=vertex.x,this.y+=vertex.y,this.z+=vertex.z,this},ThreeBSP.Vertex.prototype.subtract=function(vertex){return this.x-=vertex.x,this.y-=vertex.y,this.z-=vertex.z,this},ThreeBSP.Vertex.prototype.multiplyScalar=function(scalar){return this.x*=scalar,this.y*=scalar,this.z*=scalar,this},ThreeBSP.Vertex.prototype.cross=function(vertex){var x=this.x,y=this.y,z=this.z;return this.x=y*vertex.z-z*vertex.y,this.y=z*vertex.x-x*vertex.z,this.z=x*vertex.y-y*vertex.x,this},ThreeBSP.Vertex.prototype.normalize=function(){var length=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);return this.x/=length,this.y/=length,this.z/=length,this},ThreeBSP.Vertex.prototype.dot=function(vertex){return this.x*vertex.x+this.y*vertex.y+this.z*vertex.z},ThreeBSP.Vertex.prototype.lerp=function(a,t){return this.add(a.clone().subtract(this).multiplyScalar(t)),this.normal.add(a.normal.clone().sub(this.normal).multiplyScalar(t)),this.uv.add(a.uv.clone().sub(this.uv).multiplyScalar(t)),this},ThreeBSP.Vertex.prototype.interpolate=function(other,t){return this.clone().lerp(other,t)},ThreeBSP.Vertex.prototype.applyMatrix4=function(m){// input: THREE.Matrix4 affine matrix\nvar x=this.x,y=this.y,z=this.z,e=m.elements;return this.x=e[0]*x+e[4]*y+e[8]*z+e[12],this.y=e[1]*x+e[5]*y+e[9]*z+e[13],this.z=e[2]*x+e[6]*y+e[10]*z+e[14],this},ThreeBSP.Node=function(polygons){var i,polygon_count,front=[],back=[];if(this.polygons=[],this.front=this.back=void 0,polygons instanceof Array&&0!==polygons.length){for(this.divider=polygons[0].clone(),i=0,polygon_count=polygons.length;i<polygon_count;i++)this.divider.splitPolygon(polygons[i],this.polygons,this.polygons,front,back);0<front.length&&(this.front=new ThreeBSP.Node(front)),0<back.length&&(this.back=new ThreeBSP.Node(back))}},ThreeBSP.Node.isConvex=function(polygons){var i,j;for(i=0;i<polygons.length;i++)for(j=0;j<polygons.length;j++)if(i!==j&&polygons[i].classifySide(polygons[j])!==BACK)return!1;return!0},ThreeBSP.Node.prototype.build=function(polygons){var i,polygon_count,front=[],back=[];for(this.divider||(this.divider=polygons[0].clone()),i=0,polygon_count=polygons.length;i<polygon_count;i++)this.divider.splitPolygon(polygons[i],this.polygons,this.polygons,front,back);0<front.length&&(!this.front&&(this.front=new ThreeBSP.Node),this.front.build(front)),0<back.length&&(!this.back&&(this.back=new ThreeBSP.Node),this.back.build(back))},ThreeBSP.Node.prototype.allPolygons=function(){var polygons=this.polygons.slice();return this.front&&(polygons=polygons.concat(this.front.allPolygons())),this.back&&(polygons=polygons.concat(this.back.allPolygons())),polygons},ThreeBSP.Node.prototype.clone=function(){var node=new ThreeBSP.Node;return node.divider=this.divider.clone(),node.polygons=this.polygons.map(function(polygon){return polygon.clone()}),node.front=this.front&&this.front.clone(),node.back=this.back&&this.back.clone(),node},ThreeBSP.Node.prototype.invert=function(){var i,polygon_count,temp;for(i=0,polygon_count=this.polygons.length;i<polygon_count;i++)this.polygons[i].flip();return this.divider.flip(),this.front&&this.front.invert(),this.back&&this.back.invert(),temp=this.front,this.front=this.back,this.back=temp,this},ThreeBSP.Node.prototype.clipPolygons=function(polygons){var i,polygon_count,front,back;if(!this.divider)return polygons.slice();for(front=[],back=[],(i=0,polygon_count=polygons.length);i<polygon_count;i++)this.divider.splitPolygon(polygons[i],front,back,front,back);return this.front&&(front=this.front.clipPolygons(front)),back=this.back?this.back.clipPolygons(back):[],front.concat(back)},ThreeBSP.Node.prototype.clipTo=function(node){this.polygons=node.clipPolygons(this.polygons),this.front&&this.front.clipTo(node),this.back&&this.back.clipTo(node)},ThreeBSP};\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! webworkify-webpack */ \"./node_modules/webworkify-webpack/index.js\");\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! promise-polyfill */ \"./node_modules/promise-polyfill/src/index.js\");\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Geometry=__webpack_require__(2).Geometry,THREE=__webpack_require__(3),JSONLoader=THREE.BufferGeometryLoader;module.exports=function(self){var core=void 0,geometryFromJSON=function(object){var JSONParser=new JSONLoader,geometry=JSONParser.parse(object),material=new THREE.MeshPhongMaterial,mesh=new THREE.Mesh(geometry.geometry,material),host=new Geometry;return host.morph=mesh,host},initialise=function(object){var host=geometryFromJSON(object);core=new(__webpack_require__(47).GeometryCSGInternal)(host),self.postMessage({action:\"message\",message:\"Initialised\"})},intersect=function(object){if(core){var guest=geometryFromJSON(object),result=core.intersect(guest),json=result.toBufferGeometry().toJSON();self.postMessage({action:\"result\",object:json})}},subtract=function(object){if(core){var guest=geometryFromJSON(object),result=core.subtract(guest),json=result.toBufferGeometry().toJSON();self.postMessage({action:\"result\",object:json})}},union=function(object){if(core){var guest=geometryFromJSON(object),result=core.union(guest),json=result.toBufferGeometry().toJSON();self.postMessage({action:\"result\",object:json})}};self.addEventListener(\"message\",function(ev){switch(ev.data.action){case\"initialise\":initialise(ev.data.object);break;case\"intersect\":intersect(ev.data.object);break;case\"subtract\":subtract(ev.data.object);break;case\"union\":union(ev.data.object);break;default:throw\"Cannot handle specified action.\";}})};\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ThreeBSP=__webpack_require__(43)(THREE),Geometry=__webpack_require__(2).Geometry,GeometryCSG=__webpack_require__(42).GeometryCSG,GeometryCSGInternal=function(hostIn){//ZincGeoemtry of the main geometry\nvar host;hostIn&&hostIn.isGeometry&&(host=hostIn);var hostCSG;this.setGeometry=hostIn=>{hostIn&&hostIn.isGeometry&&(host=hostIn),hostCSG=void 0},this.setCSG=csg=>{hostCSG=csg};var prepareCSG=guestGeometry=>{if(host&&host.morph&&guestGeometry&&guestGeometry.morph){hostCSG===void 0&&(hostCSG=new ThreeBSP(host.morph));var guestCSG=new ThreeBSP(guestGeometry.morph);return guestCSG}};this.intersect=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);return hostCSG&&guestCSG?hostCSG.intersect(guestCSG):void 0},this.subtract=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);return hostCSG&&guestCSG?hostCSG.subtract(guestCSG):void 0},this.union=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);return hostCSG&&guestCSG?hostCSG.union(guestCSG):void 0}};exports.GeometryCSGInternal=GeometryCSGInternal;\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ThreeBSP=__webpack_require__(43)(THREE),Glyphset=__webpack_require__(13).Glyphset,GlyphsetCSG=function(hostIn){var host;hostIn&&hostIn.isGlyphset&&(host=hostIn);var hostCSGs=[];this.setGlyphset=hostIn=>{hostIn&&hostIn.isGlyphset&&(host=hostIn),hostCSG=void 0},this.getGlyphset=()=>host;var prepareCSGForGlyphs=()=>glyph=>{var mesh=glyph.getMesh(),label=glyph.getLabel();if(mesh){var csg=new ThreeBSP(mesh.geometry.clone().applyMatrix(mesh.matrix)),store=[];store.csg=csg,store.label=label,mesh.material&&(store.material=mesh.material.clone()),hostCSGs.push(store)}},prepareCSG=guestGeometry=>{if(host&&guestGeometry&&guestGeometry.morph){0==hostCSGs.length&&host.forEachGlyph(prepareCSGForGlyphs());var guestCSG=new ThreeBSP(guestGeometry.morph);return guestCSG}};this.intersect=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);if(0<hostCSGs.length&&guestCSG){for(var glyphset=new(__webpack_require__(13).Glyphset),i=0;i<hostCSGs.length;i++){var _hostCSG=hostCSGs[i],intersect=_hostCSG.csg.intersect(guestCSG),mesh=intersect.toMesh();if(mesh&&mesh.geometry&&0<mesh.geometry.vertices.length){_hostCSG.material&&(mesh.material=_hostCSG.material,mesh.material.side=THREE.DoubleSide,mesh.material.clippingPlanes=null);var glyph=glyphset.addMeshAsGlyph(mesh,i+1);glyph.setLabel(_hostCSG.label)}}var newCSG=new GlyphsetCSG(glyphset);return newCSG}}};exports.GlyphsetCSG=GlyphsetCSG;\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=zinc.js.map\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/zincjs/build/zinc.js?");
|
|
6315
|
+
eval("(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n__webpack_require__(1);/**\n * Provides a global namespace for the Zinc javascript library and some default parameters for it.\n * \n * @namespace\n * @author Alan Wu\n */var Zinc=function(){this.Revision=\"1.0.12\",this.defaultMaterialColor=16777215,this.defaultOpacity=1,this.modelPrefix=void 0,this.Geometry=__webpack_require__(2).Geometry,this.Glyph=__webpack_require__(11).Glyph,this.Glyphset=__webpack_require__(14).Glyphset,this.Pointset=__webpack_require__(18).Pointset,this.Lines=__webpack_require__(21).Lines,this.TextureArray=__webpack_require__(24).TextureArray,this.TextureSlides=__webpack_require__(26).TextureSlides,this.Renderer=__webpack_require__(29).Renderer,this.Scene=__webpack_require__(31).Scene,this.GeometryCSG=__webpack_require__(43).GeometryCSG,this.GlyphsetCSG=__webpack_require__(49).GlyphsetCSG,this.Viewport=__webpack_require__(40).Viewport,this.CameraControls=__webpack_require__(40).CameraControls,this.SmoothCameraTransition=__webpack_require__(40).SmoothCameraTransition,this.RayCaster=__webpack_require__(40).RayCaster,this.CameraAutoTumble=__webpack_require__(40).CameraAutoTumble,this.StereoEffect=__webpack_require__(40).StereoEffect,this.loadExternalFile=__webpack_require__(4).loadExternalFile,this.loadExternalFiles=__webpack_require__(4).loadExternalFiles,this.THREE=__webpack_require__(3)};module.exports=new Zinc;\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! url-polyfill */ \"./node_modules/url-polyfill/url-polyfill.js\");\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),toBufferGeometry=__webpack_require__(4).toBufferGeometry,createMeshForGeometry=(geometryIn,materialIn,options)=>{// First copy the geometry\nvar geometry=toBufferGeometry(geometryIn,options),isTransparent=!1;1>options.opacity&&(isTransparent=!0);var material;if(geometry._video===void 0){var morphTargets=options.localTimeEnabled||options.localMorphColour;materialIn?(material=materialIn,material.morphTargets=morphTargets,material.morphNormals=options.localTimeEnabled):geometry instanceof THREE.BufferGeometry&&geometry.attributes.color===void 0?material=new THREE.MeshPhongMaterial({color:options.colour,morphTargets:morphTargets,morphNormals:options.localTimeEnabled,transparent:isTransparent,opacity:options.opacity,side:THREE.DoubleSide}):material=new THREE.MeshPhongMaterial({color:options.colour,morphTargets:morphTargets,morphNormals:options.localTimeEnabled,vertexColors:THREE.VertexColors,transparent:isTransparent,opacity:options.opacity,side:THREE.DoubleSide}),options.localMorphColour&&geometry.morphAttributes.color&&(material.onBeforeCompile=__webpack_require__(6).augmentMorphColor())}else{var videoTexture=geometry._video.createCanvasVideoTexture();material=new THREE.MeshBasicMaterial({morphTargets:options.localTimeEnabled,color:new THREE.Color(1,1,1),transparent:isTransparent,opacity:options.opacity,map:videoTexture,side:THREE.DoubleSide}),this.videoHandler=geometry._video}return new THREE.Mesh(geometry,material)},Geometry=function(){// THREE.Geometry or THREE.BufferGeometry\n/**\n * Create the mesh for rendering\n * \n * @param {THREE.Geomtry} geometryIn - Geometry to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the geometry.\n * @param {Object} options - Provide various options\n * @param {THREE.Color} options.colour - colour to be set for the geometry\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the geometry is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n * @param {Number} options.opacity - Opacity to be set for the geometry\n */ /**\n * Calculate the UV for texture rendering.\n */ /**\n * Handle transparent mesh, create a clone for backside rendering if it is\n * transparent.\n */ /**\n\t * Set wireframe display for this geometry.\n\t * \n\t * @param {Boolean} wireframe - Flag to turn on/off wireframe display.\n\t */__webpack_require__(7).ZincObject.call(this),this.videoHandler=void 0,this.isGeometry=!0,this.createMesh=(geometryIn,materialIn,options)=>{//Skip if there is a morph already\nif(!(this.morph&&this.morph.geometry&&null!=geometryIn)){var mesh=createMeshForGeometry(geometryIn,materialIn,options);this.setMesh(mesh,options.localTimeEnabled,options.localMorphColour)}},this.calculateUVs=()=>{this.geometry.computeBoundingBox();var max=this.geometry.boundingBox.max,min=this.geometry.boundingBox.min,offset=new THREE.Vector2(0-min.x,0-min.y),range=new THREE.Vector2(max.x-min.x,max.y-min.y);this.geometry.faceVertexUvs[0]=[];for(var i=0;i<this.geometry.faces.length;i++){var v1=this.geometry.vertices[this.geometry.faces[i].a],v2=this.geometry.vertices[this.geometry.faces[i].b],v3=this.geometry.vertices[this.geometry.faces[i].c];geometry.faceVertexUvs[0].push([new THREE.Vector2((v1.x+offset.x)/range.x,(v1.y+offset.y)/range.y),new THREE.Vector2((v2.x+offset.x)/range.x,(v2.y+offset.y)/range.y),new THREE.Vector2((v3.x+offset.x)/range.x,(v3.y+offset.y)/range.y)])}geometry.uvsNeedUpdate=!0},this.checkTransparentMesh=function(transparentChanged){this._lod.checkTransparentMesh(this.animationGroup,transparentChanged)},this.setWireframe=wireframe=>{this.morph.material.wireframe=wireframe}};Geometry.prototype=Object.create(__webpack_require__(7).ZincObject.prototype),exports.Geometry=Geometry;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! three */ \"./node_modules/three/build/three.module.js\");\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _readOnlyError(name){throw new Error(\"\\\"\"+name+\"\\\" is read-only\")}var THREE=__webpack_require__(3),THREEGeometry=__webpack_require__(5).Geometry;function resolveURL(url){var actualURL=url,prefix=__webpack_require__(0).modelPrefix;if(prefix){\"/\"!=prefix[prefix.length-1]&&(prefix=(_readOnlyError(\"prefix\"),prefix+\"/\"));var r=/^(?:[a-z]+:)?\\/\\//i;r.test(url)||(actualURL=prefix+url)}return actualURL}/*\n * Calculate the bounding box of a mesh, values will be\n * set for cachedBox, b1, v1 and v2 and they need to be\n * defined. \n */function getBoundingBox(mesh,cachedBox,b1,v1,v2){var influences=mesh.morphTargetInfluences,attributes=void 0;mesh.geometry&&(attributes=mesh.geometry.morphAttributes);var found=!1;if(influences&&attributes&&attributes.position){v1.set(0,0,0),v2.set(0,0,0);for(var i=0;i<influences.length;i++)0<influences[i]&&(found=!0,b1.setFromArray(attributes.position[i].array),v1.add(b1.min.multiplyScalar(influences[i])),v2.add(b1.max.multiplyScalar(influences[i])));found&&cachedBox.set(v1,v2)}found||cachedBox.setFromBufferAttribute(mesh.geometry.attributes.position),mesh.updateWorldMatrix(),cachedBox.applyMatrix4(mesh.matrixWorld)}//Convenient function\nfunction loadExternalFile(url,data,callback,errorCallback){// Set up an asynchronous request\nvar request=new XMLHttpRequest;// Hook the event that gets called as the request progresses\nrequest.open(\"GET\",resolveURL(url),!0),request.onreadystatechange=()=>{4==request.readyState&&(200==request.status?callback(request.responseText,data):errorCallback(url))},request.send(null)}function loadExternalFiles(urls,callback,errorCallback){// Callback for a single file\nfunction partialCallback(text,urlIndex){result[urlIndex]=text,numComplete++,numComplete==numUrls&&callback(result)}for(var numUrls=urls.length,numComplete=0,result=[],i=0;i<numUrls;i++)loadExternalFile(urls[i],i,partialCallback,errorCallback)}//Get the colours at index\nexports.getColorsRGB=(colors,index)=>{var index_in_colors=Math.floor(index/3),remainder=index%3,hex_value=0;0==remainder?hex_value=colors[index_in_colors].r:1==remainder?hex_value=colors[index_in_colors].g:2==remainder&&(hex_value=colors[index_in_colors].b);var mycolor=new THREE.Color(hex_value);return[mycolor.r,mycolor.g,mycolor.b]},exports.updateMorphColorAttribute=function(targetGeometry,morph){if(morph&&targetGeometry&&targetGeometry.morphAttributes&&targetGeometry.morphAttributes.color){var morphColors=targetGeometry.morphAttributes.color,influences=morph.morphTargetInfluences,length=influences.length;targetGeometry.deleteAttribute(\"morphColor0\"),targetGeometry.deleteAttribute(\"morphColor1\");for(var bound=0,morphArray=[],i=0;1>bound||i<length;i++)0<influences[i]&&(bound++,morphArray.push([i,influences[i]]));2==morphArray.length?(targetGeometry.setAttribute(\"morphColor0\",morphColors[morphArray[0][0]]),targetGeometry.setAttribute(\"morphColor1\",morphColors[morphArray[1][0]])):1==morphArray.length&&(targetGeometry.setAttribute(\"morphColor0\",morphColors[morphArray[0][0]]),targetGeometry.setAttribute(\"morphColor1\",morphColors[morphArray[0][0]]))}},exports.toBufferGeometry=(geometryIn,options)=>{var geometry;return geometryIn instanceof THREEGeometry?(options.localTimeEnabled&&!geometryIn.morphNormalsReady&&(null==geometryIn.morphNormals||0==geometryIn.morphNormals.length)&&geometryIn.computeMorphNormals(),geometry=geometryIn.toIndexedBufferGeometry(),options.localMorphColour&©MorphColorsToIndexedBufferGeometry(geometryIn,geometry)):geometryIn instanceof THREE.BufferGeometry&&(geometry=geometryIn.clone()),geometry.colorsNeedUpdate=!0,geometry.computeBoundingBox(),geometry.computeBoundingSphere(),geometryIn._video&&(geometry._video=geometryIn._video),geometry},exports.copyMorphColorsToBufferGeometry=(geometry,bufferGeometry)=>{if(geometry&&geometry.morphColors&&0<geometry.morphColors.length){for(var array=[],morphColors=geometry.morphColors,getColorsRGB=__webpack_require__(4).getColorsRGB,i=0,l=morphColors.length;i<l;i++){for(var morphColor=morphColors[i],colorArray=[],j=0;j<geometry.faces.length;j++){var face=geometry.faces[j],color=getColorsRGB(morphColor.colors,face.a);colorArray.push(color[0],color[1],color[2]),color=getColorsRGB(morphColor.colors,face.b),colorArray.push(color[0],color[1],color[2]),color=getColorsRGB(morphColor.colors,face.c),colorArray.push(color[0],color[1],color[2])}var attribute=new THREE.Float32BufferAttribute(3*(3*geometry.faces.length),3);attribute.name=morphColor.name,array.push(attribute.copyArray(colorArray))}bufferGeometry.morphAttributes.color=array}};var copyMorphColorsToIndexedBufferGeometry=(geometry,bufferGeometry)=>{if(geometry&&geometry.morphColors&&0<geometry.morphColors.length){for(var array=[],morphColors=geometry.morphColors,getColorsRGB=__webpack_require__(4).getColorsRGB,i=0,l=morphColors.length;i<l;i++){for(var color,morphColor=morphColors[i],colorArray=[],j=0;j<3*morphColor.colors.length;j++)color=getColorsRGB(morphColor.colors,j),colorArray.push(color[0],color[1],color[2]);var attribute=new THREE.Float32BufferAttribute(colorArray,3);attribute.name=morphColor.name,array.push(attribute)}bufferGeometry.morphAttributes.color=array}};exports.mergeVertices=function(geometry){var tolerance=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e-4;tolerance=Math.max(tolerance,Number.EPSILON);// initialize the arrays\nfor(var name,hashToIndex={},indices=geometry.getIndex(),positions=geometry.getAttribute(\"position\"),vertexCount=indices?indices.count:positions.count,nextIndex=0,attributeNames=Object.keys(geometry.attributes),attrArrays={},morphAttrsArrays={},newIndices=[],getters=[\"getX\",\"getY\",\"getZ\",\"getW\"],i=0,l=attributeNames.length;i<l;i++){name=attributeNames[i],attrArrays[name]=[];var morphAttr=geometry.morphAttributes[name];morphAttr&&(morphAttrsArrays[name]=Array(morphAttr.length).fill().map(()=>[]))}// convert the error tolerance to an amount of decimal places to truncate to\nfor(var decimalShift=Math.log10(1/tolerance),shiftMultiplier=Math.pow(10,decimalShift),i=0;i<vertexCount;i++){for(var index=indices?indices.getX(i):i,hash=\"\",j=0,l=attributeNames.length;j<l;j++)for(var name=attributeNames[j],attribute=geometry.getAttribute(name),itemSize=attribute.itemSize,k=0;k<itemSize;k++)// double tilde truncates the decimal value\nhash+=\"\".concat(~~(attribute[getters[k]](index)*shiftMultiplier),\",\");// Add another reference to the vertex if it's already\n// used by another index\nif(hash in hashToIndex)newIndices.push(hashToIndex[hash]);else{// copy data to the new index in the attribute arrays\nfor(var j=0,l=attributeNames.length;j<l;j++)for(var getterFunc,name=attributeNames[j],attribute=geometry.getAttribute(name),morphAttr=geometry.morphAttributes[name],itemSize=attribute.itemSize,newarray=attrArrays[name],newMorphArrays=morphAttrsArrays[name],k=0;k<itemSize;k++)if(getterFunc=getters[k],newarray.push(attribute[getterFunc](index)),morphAttr)for(var m=0,ml=morphAttr.length;m<ml;m++)newMorphArrays[m].push(morphAttr[m][getterFunc](index));hashToIndex[hash]=nextIndex,newIndices.push(nextIndex),nextIndex++}}// Generate typed arrays from new attribute arrays and update\n// the attributeBuffers\nfor(var result=geometry.clone(),i=0,l=attributeNames.length;i<l;i++){var attribute,name=attributeNames[i],oldAttribute=geometry.getAttribute(name),buffer=new oldAttribute.array.constructor(attrArrays[name]);// Update the attribute arrays\nif(oldAttribute.isInterleavedBufferAttribute?attribute=new THREE.BufferAttribute(buffer,oldAttribute.itemSize,oldAttribute.itemSize):(attribute=geometry.getAttribute(name).clone(),attribute.setArray(buffer)),result.setAttribute(name,attribute),name in morphAttrsArrays)for(var morphAttribute,j=0;j<morphAttrsArrays[name].length;j++)morphAttribute=geometry.morphAttributes[name][j].clone(),morphAttribute.setArray(new morphAttribute.array.constructor(morphAttrsArrays[name][j])),result.morphAttributes[name][j]=morphAttribute}// Generate an index buffer typed array\nvar cons=Uint8Array;newIndices.length>=Math.pow(2,8)&&(cons=Uint16Array),newIndices.length>=Math.pow(2,16)&&(cons=Uint32Array);var newIndexBuffer=new cons(newIndices),newIndices=null;return null===indices?newIndices=new THREE.BufferAttribute(newIndexBuffer,1):(newIndices=geometry.getIndex().clone(),newIndices.setArray(newIndexBuffer)),result.setIndex(newIndices),result};function PhongToToon(materialIn){if(materialIn.isMeshPhongMaterial){var material=new THREE.MeshToonMaterial({color:materialIn.color.clone(),morphTargets:materialIn.morphTargets,morphNormals:materialIn.morphNormals,vertexColors:materialIn.vertexColors,transparent:materialIn.transparent,opacity:materialIn.opacity,side:materialIn.side});return materialIn.map&&(material.map=materialIn.map),material}return materialIn}exports.getBoundingBox=getBoundingBox,exports.resolveURL=resolveURL,exports.loadExternalFile=loadExternalFile,exports.loadExternalFiles=loadExternalFiles,exports.PhongToToon=PhongToToon;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Face3\", function() { return Face3; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Geometry\", function() { return Geometry; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar _m1=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],_obj=new three__WEBPACK_IMPORTED_MODULE_0__[\"Object3D\"],_offset=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];function Geometry(){// update flags\nthis.uuid=three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].generateUUID(),this.name=\"\",this.type=\"Geometry\",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.normals=[],this.uvs=[],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1,this.morphNormalsReady=!1}Geometry.prototype=Object.assign(Object.create(three__WEBPACK_IMPORTED_MODULE_0__[\"EventDispatcher\"].prototype),{constructor:Geometry,isGeometry:!0,applyMatrix4:function applyMatrix4(matrix){for(var vertex,normalMatrix=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix3\"]().getNormalMatrix(matrix),i=0,il=this.vertices.length;i<il;i++)vertex=this.vertices[i],vertex.applyMatrix4(matrix);for(var face,_i=0,_il=this.faces.length;_i<_il;_i++){face=this.faces[_i],face.normal.applyMatrix3(normalMatrix).normalize();for(var j=0,jl=face.vertexNormals.length;j<jl;j++)face.vertexNormals[j].applyMatrix3(normalMatrix).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function rotateX(angle){return _m1.makeRotationX(angle),this.applyMatrix4(_m1),this},rotateY:function rotateY(angle){return _m1.makeRotationY(angle),this.applyMatrix4(_m1),this},rotateZ:function rotateZ(angle){return _m1.makeRotationZ(angle),this.applyMatrix4(_m1),this},translate:function translate(x,y,z){return _m1.makeTranslation(x,y,z),this.applyMatrix4(_m1),this},scale:function scale(x,y,z){return _m1.makeScale(x,y,z),this.applyMatrix4(_m1),this},lookAt:function lookAt(vector){return _obj.lookAt(vector),_obj.updateMatrix(),this.applyMatrix4(_obj.matrix),this},fromBufferGeometry:function fromBufferGeometry(geometry){function addFace(a,b,c,materialIndex){var vertexColors=void 0===color?[]:[scope.colors[a].clone(),scope.colors[b].clone(),scope.colors[c].clone()],vertexNormals=void 0===normal?[]:[new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(normal,a),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(normal,b),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(normal,c)],face=new Face3(a,b,c,vertexNormals,vertexColors,materialIndex);scope.faces.push(face),void 0!==uv&&scope.faceVertexUvs[0].push([new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv,a),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv,b),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv,c)]),void 0!==uv2&&scope.faceVertexUvs[1].push([new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv2,a),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv2,b),new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"]().fromBufferAttribute(uv2,c)])}var scope=this,index=null===geometry.index?void 0:geometry.index,attributes=geometry.attributes;if(void 0===attributes.position)return console.error(\"THREE.Geometry.fromBufferGeometry(): Position attribute required for conversion.\"),this;var position=attributes.position,normal=attributes.normal,color=attributes.color,uv=attributes.uv,uv2=attributes.uv2;void 0!==uv2&&(this.faceVertexUvs[1]=[]);for(var i=0;i<position.count;i++)scope.vertices.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]().fromBufferAttribute(position,i)),void 0!==color&&scope.colors.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"]().fromBufferAttribute(color,i));var groups=geometry.groups;if(0<groups.length)for(var _i2=0;_i2<groups.length;_i2++)for(var group=groups[_i2],start=group.start,count=group.count,j=start;j<start+count;j+=3)void 0===index?addFace(j,j+1,j+2,group.materialIndex):addFace(index.getX(j),index.getX(j+1),index.getX(j+2),group.materialIndex);else if(void 0!==index)for(var _i3=0;_i3<index.count;_i3+=3)addFace(index.getX(_i3),index.getX(_i3+1),index.getX(_i3+2));else for(var _i4=0;_i4<position.count;_i4+=3)addFace(_i4,_i4+1,_i4+2);return this.computeFaceNormals(),null!==geometry.boundingBox&&(this.boundingBox=geometry.boundingBox.clone()),null!==geometry.boundingSphere&&(this.boundingSphere=geometry.boundingSphere.clone()),this},center:function center(){return this.computeBoundingBox(),this.boundingBox.getCenter(_offset).negate(),this.translate(_offset.x,_offset.y,_offset.z),this},normalize:function normalize(){this.computeBoundingSphere();var center=this.boundingSphere.center,radius=this.boundingSphere.radius,s=0===radius?1:1/radius,matrix=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"];return matrix.set(s,0,0,-s*center.x,0,s,0,-s*center.y,0,0,s,-s*center.z,0,0,0,1),this.applyMatrix4(matrix),this},computeFaceNormals:function computeFaceNormals(){for(var cb=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],ab=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],f=0,fl=this.faces.length;f<fl;f++){var face=this.faces[f],vA=this.vertices[face.a],vB=this.vertices[face.b],vC=this.vertices[face.c];cb.subVectors(vC,vB),ab.subVectors(vA,vB),cb.cross(ab),cb.normalize(),face.normal.copy(cb)}},computeVertexNormals:function computeVertexNormals(){for(var areaWeighted=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],vertices=Array(this.vertices.length),v=0,vl=this.vertices.length;v<vl;v++)vertices[v]=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];if(areaWeighted)// vertex normals weighted by triangle areas\n// http://www.iquilezles.org/www/articles/normals/normals.htm\nfor(var cb=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],ab=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],f=0,fl=this.faces.length;f<fl;f++){var face=this.faces[f],vA=this.vertices[face.a],vB=this.vertices[face.b],vC=this.vertices[face.c];cb.subVectors(vC,vB),ab.subVectors(vA,vB),cb.cross(ab),vertices[face.a].add(cb),vertices[face.b].add(cb),vertices[face.c].add(cb)}else{this.computeFaceNormals();for(var _face,_f=0,_fl=this.faces.length;_f<_fl;_f++)_face=this.faces[_f],vertices[_face.a].add(_face.normal),vertices[_face.b].add(_face.normal),vertices[_face.c].add(_face.normal)}for(var _v=0,_vl=this.vertices.length;_v<_vl;_v++)vertices[_v].normalize();for(var _f2=0,_fl2=this.faces.length;_f2<_fl2;_f2++){var _face2=this.faces[_f2],vertexNormals=_face2.vertexNormals;3===vertexNormals.length?(vertexNormals[0].copy(vertices[_face2.a]),vertexNormals[1].copy(vertices[_face2.b]),vertexNormals[2].copy(vertices[_face2.c])):(vertexNormals[0]=vertices[_face2.a].clone(),vertexNormals[1]=vertices[_face2.b].clone(),vertexNormals[2]=vertices[_face2.c].clone())}return 0<this.faces.length&&(this.normalsNeedUpdate=!0),vertices},computeFlatVertexNormals:function computeFlatVertexNormals(){this.computeFaceNormals();for(var f=0,fl=this.faces.length;f<fl;f++){var face=this.faces[f],vertexNormals=face.vertexNormals;3===vertexNormals.length?(vertexNormals[0].copy(face.normal),vertexNormals[1].copy(face.normal),vertexNormals[2].copy(face.normal)):(vertexNormals[0]=face.normal.clone(),vertexNormals[1]=face.normal.clone(),vertexNormals[2]=face.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function computeMorphNormals(){// save original normals\n// - create temp variables on first access\n// otherwise just copy (for faster repeated calls)\nfor(var face,f=0,fl=this.faces.length;f<fl;f++){face=this.faces[f],face.__originalFaceNormal?face.__originalFaceNormal.copy(face.normal):face.__originalFaceNormal=face.normal.clone(),face.__originalVertexNormals||(face.__originalVertexNormals=[]);for(var i=0,il=face.vertexNormals.length;i<il;i++)face.__originalVertexNormals[i]?face.__originalVertexNormals[i].copy(face.vertexNormals[i]):face.__originalVertexNormals[i]=face.vertexNormals[i].clone()}// use temp geometry to compute face and vertex normals for each morph\nvar tmpGeo=new Geometry;tmpGeo.faces=this.faces;for(var _i5=0,_il2=this.morphTargets.length;_i5<_il2;_i5++){// create on first access\nif(!this.morphNormals[_i5]){this.morphNormals[_i5]={},this.morphNormals[_i5].faceNormals=[],this.morphNormals[_i5].vertexNormals=[];for(var dstNormalsFace=this.morphNormals[_i5].faceNormals,dstNormalsVertex=this.morphNormals[_i5].vertexNormals,_f3=0,_fl3=this.faces.length;_f3<_fl3;_f3++){var faceNormal=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_vertexNormals={a:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],b:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],c:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"]};dstNormalsFace.push(faceNormal),dstNormalsVertex.push(_vertexNormals)}}var morphNormals=this.morphNormals[_i5];// set vertices to morph target\ntmpGeo.vertices=this.morphTargets[_i5].vertices,tmpGeo.computeFaceNormals();var vertexNormals=tmpGeo.computeVertexNormals();if(vertexNormals&&0<vertexNormals.length){this.morphTargets[_i5].normals=Array(this.vertices.length);for(var v=0;v<vertexNormals.length;v++)this.morphTargets[_i5].normals[v]=vertexNormals[v].clone()}// store morph normals\nfor(var _f4=0,_fl4=this.faces.length;_f4<_fl4;_f4++){var _face3=this.faces[_f4],_faceNormal=morphNormals.faceNormals[_f4],_vertexNormals2=morphNormals.vertexNormals[_f4];_faceNormal.copy(_face3.normal),_vertexNormals2.a.copy(_face3.vertexNormals[0]),_vertexNormals2.b.copy(_face3.vertexNormals[1]),_vertexNormals2.c.copy(_face3.vertexNormals[2])}}// restore original normals\nfor(var _face4,_f5=0,_fl5=this.faces.length;_f5<_fl5;_f5++)_face4=this.faces[_f5],_face4.normal=_face4.__originalFaceNormal,_face4.vertexNormals=_face4.__originalVertexNormals;this.morphNormalsReady=!0},computeBoundingBox:function computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new three__WEBPACK_IMPORTED_MODULE_0__[\"Box3\"]),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new three__WEBPACK_IMPORTED_MODULE_0__[\"Sphere\"]),this.boundingSphere.setFromPoints(this.vertices)},merge:function merge(geometry,matrix){var materialIndexOffset=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0;if(!(geometry&&geometry.isGeometry))return void console.error(\"THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.\",geometry);var normalMatrix,vertexOffset=this.vertices.length,vertices1=this.vertices,vertices2=geometry.vertices,faces1=this.faces,faces2=geometry.faces,colors1=this.colors,colors2=geometry.colors;matrix!==void 0&&(normalMatrix=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix3\"]().getNormalMatrix(matrix));// vertices\nfor(var i=0,il=vertices2.length;i<il;i++){var vertex=vertices2[i],vertexCopy=vertex.clone();matrix!==void 0&&vertexCopy.applyMatrix4(matrix),vertices1.push(vertexCopy)}// colors\nfor(var _i6=0,_il3=colors2.length;_i6<_il3;_i6++)colors1.push(colors2[_i6].clone());// faces\nfor(var _i7=0,_il4=faces2.length;_i7<_il4;_i7++){var face=faces2[_i7],normal=void 0,color=void 0,faceVertexNormals=face.vertexNormals,faceVertexColors=face.vertexColors,faceCopy=new Face3(face.a+vertexOffset,face.b+vertexOffset,face.c+vertexOffset);faceCopy.normal.copy(face.normal),normalMatrix!==void 0&&faceCopy.normal.applyMatrix3(normalMatrix).normalize();for(var j=0,jl=faceVertexNormals.length;j<jl;j++)normal=faceVertexNormals[j].clone(),void 0!==normalMatrix&&normal.applyMatrix3(normalMatrix).normalize(),faceCopy.vertexNormals.push(normal);faceCopy.color.copy(face.color);for(var _j=0,_jl=faceVertexColors.length;_j<_jl;_j++)color=faceVertexColors[_j],faceCopy.vertexColors.push(color.clone());faceCopy.materialIndex=face.materialIndex+materialIndexOffset,faces1.push(faceCopy)}// uvs\nfor(var faceVertexUvs2,_i8=0,_il5=geometry.faceVertexUvs.length;_i8<_il5;_i8++){faceVertexUvs2=geometry.faceVertexUvs[_i8],this.faceVertexUvs[_i8]===void 0&&(this.faceVertexUvs[_i8]=[]);for(var _j2=0,_jl2=faceVertexUvs2.length;_j2<_jl2;_j2++){for(var uvs2=faceVertexUvs2[_j2],uvsCopy=[],k=0,kl=uvs2.length;k<kl;k++)uvsCopy.push(uvs2[k].clone());this.faceVertexUvs[_i8].push(uvsCopy)}}},mergeMesh:function mergeMesh(mesh){return mesh&&mesh.isMesh?void(mesh.matrixAutoUpdate&&mesh.updateMatrix(),this.merge(mesh.geometry,mesh.matrix)):void console.error(\"THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.\",mesh)},/*\n\t * Checks for duplicate vertices with hashmap.\n\t * Duplicated vertices are removed\n\t * and faces' vertices are updated.\n\t */mergeVertices:function mergeVertices(){for(var precisionPoints=0<arguments.length&&void 0!==arguments[0]?arguments[0]:4,verticesMap={},unique=[],changes=[],precision=Math.pow(10,precisionPoints),i=0,il=this.vertices.length;i<il;i++){var v=this.vertices[i],key=Math.round(v.x*precision)+\"_\"+Math.round(v.y*precision)+\"_\"+Math.round(v.z*precision);void 0===verticesMap[key]?(verticesMap[key]=i,unique.push(this.vertices[i]),changes[i]=unique.length-1):changes[i]=changes[verticesMap[key]]}// if faces are completely degenerate after merging vertices, we\n// have to remove them from the geometry.\nfor(var face,faceIndicesToRemove=[],_i9=0,_il6=this.faces.length;_i9<_il6;_i9++){face=this.faces[_i9],face.a=changes[face.a],face.b=changes[face.b],face.c=changes[face.c];// if any duplicate vertices are found in a Face3\n// we have to remove the face as nothing can be saved\nfor(var indices=[face.a,face.b,face.c],n=0;3>n;n++)if(indices[n]===indices[(n+1)%3]){faceIndicesToRemove.push(_i9);break}}for(var idx,_i10=faceIndicesToRemove.length-1;0<=_i10;_i10--){idx=faceIndicesToRemove[_i10],this.faces.splice(idx,1);for(var j=0,jl=this.faceVertexUvs.length;j<jl;j++)this.faceVertexUvs[j].splice(idx,1)}// Use unique set of vertices\nvar diff=this.vertices.length-unique.length;return this.vertices=unique,diff},setFromPoints:function setFromPoints(points){this.vertices=[];for(var point,i=0,l=points.length;i<l;i++)point=points[i],this.vertices.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"](point.x,point.y,point.z||0));return this},sortFacesByMaterialIndex:function sortFacesByMaterialIndex(){// sort faces\n// tag faces\nfor(var faces=this.faces,length=faces.length,i=0;i<length;i++)faces[i]._id=i;faces.sort(function(a,b){return a.materialIndex-b.materialIndex});// sort uvs\nvar newUvs1,newUvs2,uvs1=this.faceVertexUvs[0],uvs2=this.faceVertexUvs[1];uvs1&&uvs1.length===length&&(newUvs1=[]),uvs2&&uvs2.length===length&&(newUvs2=[]);for(var id,_i11=0;_i11<length;_i11++)id=faces[_i11]._id,newUvs1&&newUvs1.push(uvs1[id]),newUvs2&&newUvs2.push(uvs2[id]);newUvs1&&(this.faceVertexUvs[0]=newUvs1),newUvs2&&(this.faceVertexUvs[1]=newUvs2)},toJSON:function toJSON(){function setBit(value,position,enabled){return enabled?value|1<<position:value&~(1<<position)}function getNormalIndex(normal){var hash=normal.x.toString()+normal.y.toString()+normal.z.toString();return void 0===normalsHash[hash]?(normalsHash[hash]=normals.length/3,normals.push(normal.x,normal.y,normal.z),normalsHash[hash]):normalsHash[hash]}function getColorIndex(color){var hash=color.r.toString()+color.g.toString()+color.b.toString();return void 0===colorsHash[hash]?(colorsHash[hash]=colors.length,colors.push(color.getHex()),colorsHash[hash]):colorsHash[hash]}function getUvIndex(uv){var hash=uv.x.toString()+uv.y.toString();return void 0===uvsHash[hash]?(uvsHash[hash]=uvs.length/2,uvs.push(uv.x,uv.y),uvsHash[hash]):uvsHash[hash]}var data={metadata:{version:4.5,type:\"Geometry\",generator:\"Geometry.toJSON\"}};// standard Geometry serialization\nif(data.uuid=this.uuid,data.type=this.type,\"\"!==this.name&&(data.name=this.name),void 0!==this.parameters){var parameters=this.parameters;for(var key in parameters)void 0!==parameters[key]&&(data[key]=parameters[key]);return data}for(var vertex,vertices=[],i=0;i<this.vertices.length;i++)vertex=this.vertices[i],vertices.push(vertex.x,vertex.y,vertex.z);for(var faces=[],normals=[],normalsHash={},colors=[],colorsHash={},uvs=[],uvsHash={},_i12=0;_i12<this.faces.length;_i12++){var face=this.faces[_i12],hasFaceVertexUv=void 0!==this.faceVertexUvs[0][_i12],hasFaceNormal=0<face.normal.length(),hasFaceVertexNormal=0<face.vertexNormals.length,hasFaceColor=1!==face.color.r||1!==face.color.g||1!==face.color.b,hasFaceVertexColor=0<face.vertexColors.length,faceType=0;if(faceType=setBit(faceType,0,0),faceType=setBit(faceType,1,!0),faceType=setBit(faceType,2,!1),faceType=setBit(faceType,3,hasFaceVertexUv),faceType=setBit(faceType,4,hasFaceNormal),faceType=setBit(faceType,5,hasFaceVertexNormal),faceType=setBit(faceType,6,hasFaceColor),faceType=setBit(faceType,7,hasFaceVertexColor),faces.push(faceType),faces.push(face.a,face.b,face.c),faces.push(face.materialIndex),hasFaceVertexUv){var faceVertexUvs=this.faceVertexUvs[0][_i12];faces.push(getUvIndex(faceVertexUvs[0]),getUvIndex(faceVertexUvs[1]),getUvIndex(faceVertexUvs[2]))}if(hasFaceNormal&&faces.push(getNormalIndex(face.normal)),hasFaceVertexNormal){var vertexNormals=face.vertexNormals;faces.push(getNormalIndex(vertexNormals[0]),getNormalIndex(vertexNormals[1]),getNormalIndex(vertexNormals[2]))}if(hasFaceColor&&faces.push(getColorIndex(face.color)),hasFaceVertexColor){var vertexColors=face.vertexColors;faces.push(getColorIndex(vertexColors[0]),getColorIndex(vertexColors[1]),getColorIndex(vertexColors[2]))}}return data.data={},data.data.vertices=vertices,data.data.normals=normals,0<colors.length&&(data.data.colors=colors),0<uvs.length&&(data.data.uvs=[uvs]),data.data.faces=faces,data},clone:function clone(){/*\n\t\t // Handle primitives\n\n\t\t const parameters = this.parameters;\n\n\t\t if ( parameters !== undefined ) {\n\n\t\t const values = [];\n\n\t\t for ( const key in parameters ) {\n\n\t\t values.push( parameters[ key ] );\n\n\t\t }\n\n\t\t const geometry = Object.create( this.constructor.prototype );\n\t\t this.constructor.apply( geometry, values );\n\t\t return geometry;\n\n\t\t }\n\n\t\t return new this.constructor().copy( this );\n\t\t */return new Geometry().copy(this)},copy:function copy(source){this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=source.name;for(var vertices=source.vertices,i=0,il=vertices.length;i<il;i++)this.vertices.push(vertices[i].clone());// colors\nfor(var colors=source.colors,_i13=0,_il7=colors.length;_i13<_il7;_i13++)this.colors.push(colors[_i13].clone());// faces\nfor(var faces=source.faces,_i14=0,_il8=faces.length;_i14<_il8;_i14++)this.faces.push(faces[_i14].clone());// face vertex uvs\nfor(var faceVertexUvs,_i15=0,_il9=source.faceVertexUvs.length;_i15<_il9;_i15++){faceVertexUvs=source.faceVertexUvs[_i15],void 0===this.faceVertexUvs[_i15]&&(this.faceVertexUvs[_i15]=[]);for(var j=0,jl=faceVertexUvs.length;j<jl;j++){for(var uv,uvs=faceVertexUvs[j],uvsCopy=[],k=0,kl=uvs.length;k<kl;k++)uv=uvs[k],uvsCopy.push(uv.clone());this.faceVertexUvs[_i15].push(uvsCopy)}}// morph targets\nfor(var morphTarget,morphTargets=source.morphTargets,_i16=0,_il10=morphTargets.length;_i16<_il10;_i16++){// vertices\nif(morphTarget={},morphTarget.name=morphTargets[_i16].name,void 0!==morphTargets[_i16].vertices){morphTarget.vertices=[];for(var _j3=0,_jl3=morphTargets[_i16].vertices.length;_j3<_jl3;_j3++)morphTarget.vertices.push(morphTargets[_i16].vertices[_j3].clone())}// normals\nif(void 0!==morphTargets[_i16].normals){morphTarget.normals=[];for(var _j4=0,_jl4=morphTargets[_i16].normals.length;_j4<_jl4;_j4++)morphTarget.normals.push(morphTargets[_i16].normals[_j4].clone())}this.morphTargets.push(morphTarget)}// morph normals\nfor(var morphNormal,morphNormals=source.morphNormals,_i17=0,_il11=morphNormals.length;_i17<_il11;_i17++){// vertex normals\nif(morphNormal={},void 0!==morphNormals[_i17].vertexNormals){morphNormal.vertexNormals=[];for(var _j5=0,_jl5=morphNormals[_i17].vertexNormals.length;_j5<_jl5;_j5++){var srcVertexNormal=morphNormals[_i17].vertexNormals[_j5],destVertexNormal={};destVertexNormal.a=srcVertexNormal.a.clone(),destVertexNormal.b=srcVertexNormal.b.clone(),destVertexNormal.c=srcVertexNormal.c.clone(),morphNormal.vertexNormals.push(destVertexNormal)}}// face normals\nif(void 0!==morphNormals[_i17].faceNormals){morphNormal.faceNormals=[];for(var _j6=0,_jl6=morphNormals[_i17].faceNormals.length;_j6<_jl6;_j6++)morphNormal.faceNormals.push(morphNormals[_i17].faceNormals[_j6].clone())}this.morphNormals.push(morphNormal)}// skin weights\nfor(var skinWeights=source.skinWeights,_i18=0,_il12=skinWeights.length;_i18<_il12;_i18++)this.skinWeights.push(skinWeights[_i18].clone());// skin indices\nfor(var skinIndices=source.skinIndices,_i19=0,_il13=skinIndices.length;_i19<_il13;_i19++)this.skinIndices.push(skinIndices[_i19].clone());// line distances\nfor(var lineDistances=source.lineDistances,_i20=0,_il14=lineDistances.length;_i20<_il14;_i20++)this.lineDistances.push(lineDistances[_i20]);// bounding box\nvar boundingBox=source.boundingBox;null!==boundingBox&&(this.boundingBox=boundingBox.clone());// bounding sphere\nvar boundingSphere=source.boundingSphere;return null!==boundingSphere&&(this.boundingSphere=boundingSphere.clone()),this.elementsNeedUpdate=source.elementsNeedUpdate,this.verticesNeedUpdate=source.verticesNeedUpdate,this.uvsNeedUpdate=source.uvsNeedUpdate,this.normalsNeedUpdate=source.normalsNeedUpdate,this.colorsNeedUpdate=source.colorsNeedUpdate,this.lineDistancesNeedUpdate=source.lineDistancesNeedUpdate,this.groupsNeedUpdate=source.groupsNeedUpdate,this},computeGroups(){var group,i,groups=[],materialIndex=void 0,faces=this.faces;for(i=0;i<faces.length;i++){var face=faces[i];// materials\nface.materialIndex!==materialIndex&&(materialIndex=face.materialIndex,void 0!==group&&(group.count=3*i-group.start,groups.push(group)),group={start:3*i,materialIndex:materialIndex})}return void 0!==group&&(group.count=3*i-group.start,groups.push(group)),groups},toBufferGeometry:function toBufferGeometry(){var geometry=new DirectGeometry().fromGeometry(this),buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],positions=new Float32Array(3*geometry.vertices.length);if(buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](positions,3).copyVector3sArray(geometry.vertices)),0<geometry.normals.length){var normals=new Float32Array(3*geometry.normals.length);buffergeometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](normals,3).copyVector3sArray(geometry.normals))}if(0<geometry.colors.length){var colors=new Float32Array(3*geometry.colors.length);buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colors,3).copyColorsArray(geometry.colors))}if(0<geometry.uvs.length){var uvs=new Float32Array(2*geometry.uvs.length);buffergeometry.setAttribute(\"uv\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs,2).copyVector2sArray(geometry.uvs))}if(0<geometry.uvs2.length){var uvs2=new Float32Array(2*geometry.uvs2.length);buffergeometry.setAttribute(\"uv2\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs2,2).copyVector2sArray(geometry.uvs2))}// groups\n// morphs\nfor(var name in buffergeometry.groups=geometry.groups,geometry.morphTargets){for(var array=[],morphTargets=geometry.morphTargets[name],i=0,l=morphTargets.length;i<l;i++){var morphTarget=morphTargets[i],attribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*morphTarget.data.length,3);attribute.name=morphTarget.name,array.push(attribute.copyVector3sArray(morphTarget.data))}buffergeometry.morphAttributes[name]=array}// skinning\nif(0<geometry.skinIndices.length){var skinIndices=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*geometry.skinIndices.length,4);buffergeometry.setAttribute(\"skinIndex\",skinIndices.copyVector4sArray(geometry.skinIndices))}if(0<geometry.skinWeights.length){var skinWeights=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*geometry.skinWeights.length,4);buffergeometry.setAttribute(\"skinWeight\",skinWeights.copyVector4sArray(geometry.skinWeights))}//\nreturn null!==geometry.boundingSphere&&(buffergeometry.boundingSphere=geometry.boundingSphere.clone()),null!==geometry.boundingBox&&(buffergeometry.boundingBox=geometry.boundingBox.clone()),buffergeometry},toIndexedBufferGeometry:function toIndexedBufferGeometry(){//const geometry = new DirectGeometry().fromGeometry( this );\nvar buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],positions=new Float32Array(3*this.vertices.length);if(buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](positions,3).copyVector3sArray(this.vertices)),0<this.normals.length){var normals=new Float32Array(this.normals.length),buffer=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](normals,3).copyArray(this.normals);buffergeometry.setAttribute(\"normal\",buffer)}if(0<this.uvs.length&&0<this.uvs[0].length){var uvs=new Float32Array(2*this.uvs[0].length);buffergeometry.setAttribute(\"uv\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs,2).copyArray(this.uvs[0]))}if(1<this.uvs.length&&0<this.uvs[1].length){var uvs2=new Float32Array(2*this.uvs[1].length);buffergeometry.setAttribute(\"uv2\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](uvs2,2).copyArray(this.uvs[1]))}if(0<this.colors.length){for(var colorArray=[],i=0;i<this.colors.length;i++)colorArray.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"](this.colors[i]));var colors=new Float32Array(3*colorArray.length);buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colors,3).copyColorsArray(colorArray))}else{for(var colorsArray=new Float32Array(3*this.vertices.length),_i21=0;_i21<3*this.vertices.length;_i21++)colorsArray[_i21]=1;buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colorsArray,3))}if(0<this.faces.length){for(var _colors=[],indices=[],_i22=0;_i22<this.faces.length;_i22++){indices.push(this.faces[_i22].a,this.faces[_i22].b,this.faces[_i22].c);var vertexColors=this.faces[_i22].vertexColors;if(3===vertexColors.length)_colors.push(vertexColors[0],vertexColors[1],vertexColors[2]);else{var color=this.faces[_i22].color;_colors.push(color,color,color)}}// if ( colors.length > 0 ) {\n// const colorsArray = new Float32Array( colors.length * 3 );\n// buffergeometry.setAttribute( 'color', new BufferAttribute( colorsArray, 3 ).copyColorsArray( colors ) );\n// }\nbuffergeometry.setIndex(indices),buffergeometry.groups=this.computeGroups()}// morphs\nif(0<this.morphTargets.length){for(var array=[],normalsArray=[],_i23=0,l=this.morphTargets.length;_i23<l;_i23++){var morphTarget=this.morphTargets[_i23],attribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*morphTarget.vertices.length,3);if(attribute.name=morphTarget.name,array.push(attribute.copyVector3sArray(morphTarget.vertices)),morphTarget.normals){var _attribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*morphTarget.normals.length,3);_attribute.name=morphTarget.name,normalsArray.push(_attribute.copyVector3sArray(morphTarget.normals))}}buffergeometry.morphAttributes.position=array,buffergeometry.morphAttributes.normal=normalsArray}// skinning\nif(0<this.skinIndices.length){var skinIndices=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*this.skinIndices.length,4);buffergeometry.setAttribute(\"skinIndex\",skinIndices.copyVector4sArray(this.skinIndices))}if(0<this.skinWeights.length){var skinWeights=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](4*this.skinWeights.length,4);buffergeometry.setAttribute(\"skinWeight\",skinWeights.copyVector4sArray(this.skinWeights))}//\nreturn null!==this.boundingSphere&&(buffergeometry.boundingSphere=this.boundingSphere.clone()),null!==this.boundingBox&&(buffergeometry.boundingBox=this.boundingBox.clone()),buffergeometry},computeTangents:function computeTangents(){console.error(\"THREE.Geometry: .computeTangents() has been removed.\")},computeLineDistances:function computeLineDistances(){console.error(\"THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.\")},applyMatrix:function applyMatrix(matrix){return console.warn(\"THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4().\"),this.applyMatrix4(matrix)},dispose:function dispose(){this.dispatchEvent({type:\"dispose\"})}}),Geometry.createBufferGeometryFromObject=function(object){var buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],geometry=object.geometry;if(object.isPoints||object.isLine){var positions=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*geometry.vertices.length,3),colors=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](3*geometry.colors.length,3);if(buffergeometry.setAttribute(\"position\",positions.copyVector3sArray(geometry.vertices)),buffergeometry.setAttribute(\"color\",colors.copyColorsArray(geometry.colors)),geometry.lineDistances&&geometry.lineDistances.length===geometry.vertices.length){var lineDistances=new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.lineDistances.length,1);buffergeometry.setAttribute(\"lineDistance\",lineDistances.copyArray(geometry.lineDistances))}null!==geometry.boundingSphere&&(buffergeometry.boundingSphere=geometry.boundingSphere.clone()),null!==geometry.boundingBox&&(buffergeometry.boundingBox=geometry.boundingBox.clone())}else object.isMesh&&(buffergeometry=geometry.toBufferGeometry());return buffergeometry};class DirectGeometry{constructor(){// this.lineDistances = [];\n// update flags\nthis.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}computeGroups(geometry){var group,i,groups=[],materialIndex=void 0,faces=geometry.faces;for(i=0;i<faces.length;i++){var face=faces[i];// materials\nface.materialIndex!==materialIndex&&(materialIndex=face.materialIndex,group!==void 0&&(group.count=3*i-group.start,groups.push(group)),group={start:3*i,materialIndex:materialIndex})}group!==void 0&&(group.count=3*i-group.start,groups.push(group)),this.groups=groups}fromGeometry(geometry){var morphTargetsPosition,faces=geometry.faces,vertices=geometry.vertices,faceVertexUvs=geometry.faceVertexUvs,hasFaceVertexUv=faceVertexUvs[0]&&0<faceVertexUvs[0].length,hasFaceVertexUv2=faceVertexUvs[1]&&0<faceVertexUvs[1].length,morphTargets=geometry.morphTargets,morphTargetsLength=morphTargets.length;if(0<morphTargetsLength){morphTargetsPosition=[];for(var i=0;i<morphTargetsLength;i++)morphTargetsPosition[i]={name:morphTargets[i].name,data:[]};this.morphTargets.position=morphTargetsPosition}var morphTargetsNormal,morphNormals=geometry.morphNormals,morphNormalsLength=morphNormals.length;if(0<morphNormalsLength){morphTargetsNormal=[];for(var _i24=0;_i24<morphNormalsLength;_i24++)morphTargetsNormal[_i24]={name:morphNormals[_i24].name,data:[]};this.morphTargets.normal=morphTargetsNormal}// skins\nvar skinIndices=geometry.skinIndices,skinWeights=geometry.skinWeights,hasSkinIndices=skinIndices.length===vertices.length,hasSkinWeights=skinWeights.length===vertices.length;0<vertices.length&&0===faces.length&&console.error(\"THREE.DirectGeometry: Faceless geometries are not supported.\");for(var face,_i25=0;_i25<faces.length;_i25++){face=faces[_i25],this.vertices.push(vertices[face.a],vertices[face.b],vertices[face.c]);var vertexNormals=face.vertexNormals;if(3===vertexNormals.length)this.normals.push(vertexNormals[0],vertexNormals[1],vertexNormals[2]);else{var normal=face.normal;this.normals.push(normal,normal,normal)}var vertexColors=face.vertexColors;if(3===vertexColors.length)this.colors.push(vertexColors[0],vertexColors[1],vertexColors[2]);else{var color=face.color;this.colors.push(color,color,color)}if(!0===hasFaceVertexUv){var vertexUvs=faceVertexUvs[0][_i25];void 0===vertexUvs?(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv \",_i25),this.uvs.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"])):this.uvs.push(vertexUvs[0],vertexUvs[1],vertexUvs[2])}if(!0===hasFaceVertexUv2){var _vertexUvs=faceVertexUvs[1][_i25];void 0===_vertexUvs?(console.warn(\"THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 \",_i25),this.uvs2.push(new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"],new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector2\"])):this.uvs2.push(_vertexUvs[0],_vertexUvs[1],_vertexUvs[2])}// morphs\nfor(var morphTarget,j=0;j<morphTargetsLength;j++)morphTarget=morphTargets[j].vertices,morphTargetsPosition[j].data.push(morphTarget[face.a],morphTarget[face.b],morphTarget[face.c]);for(var morphNormal,_j7=0;_j7<morphNormalsLength;_j7++)morphNormal=morphNormals[_j7].vertexNormals[_i25],morphTargetsNormal[_j7].data.push(morphNormal.a,morphNormal.b,morphNormal.c);// skins\nhasSkinIndices&&this.skinIndices.push(skinIndices[face.a],skinIndices[face.b],skinIndices[face.c]),hasSkinWeights&&this.skinWeights.push(skinWeights[face.a],skinWeights[face.b],skinWeights[face.c])}return this.computeGroups(geometry),this.verticesNeedUpdate=geometry.verticesNeedUpdate,this.normalsNeedUpdate=geometry.normalsNeedUpdate,this.colorsNeedUpdate=geometry.colorsNeedUpdate,this.uvsNeedUpdate=geometry.uvsNeedUpdate,this.groupsNeedUpdate=geometry.groupsNeedUpdate,null!==geometry.boundingSphere&&(this.boundingSphere=geometry.boundingSphere.clone()),null!==geometry.boundingBox&&(this.boundingBox=geometry.boundingBox.clone()),this}}class Face3{constructor(a,b,c,normal,color){var materialIndex=5<arguments.length&&arguments[5]!==void 0?arguments[5]:0;this.a=a,this.b=b,this.c=c,this.normal=normal&&normal.isVector3?normal:new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],this.vertexNormals=Array.isArray(normal)?normal:[],this.color=color&&color.isColor?color:new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"],this.vertexColors=Array.isArray(color)?color:[],this.materialIndex=materialIndex}clone(){return new this.constructor().copy(this)}copy(source){this.a=source.a,this.b=source.b,this.c=source.c,this.normal.copy(source.normal),this.color.copy(source.color),this.materialIndex=source.materialIndex;for(var i=0,il=source.vertexNormals.length;i<il;i++)this.vertexNormals[i]=source.vertexNormals[i].clone();for(var _i26=0,_il15=source.vertexColors.length;_i26<_il15;_i26++)this.vertexColors[_i26]=source.vertexColors[_i26].clone();return this}}\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports) {\n\n/**\n * Provide additional shaders to render time dependent color.\n */exports.augmentMorphColor=function(){return function(shader){shader.vertexShader=shader.vertexShader.replace(\"#include <color_pars_vertex>\",[\"varying vec3 vColor;\",\"attribute vec3 morphColor0;\",\"attribute vec3 morphColor1;\"].join(\"\\n\")),shader.vertexShader=shader.vertexShader.replace(\"#include <color_vertex>\",[\"vColor.xyz = color.xyz;\",\"#ifdef USE_MORPHTARGETS\",\"vColor = morphColor0 * morphTargetInfluences[ 0 ];\",\"vColor += morphColor1 * morphTargetInfluences[ 1 ];\",\"#endif\"].join(\"\\n\"))}};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),uniqueiId=0,getUniqueId=function(){return\"pr\"+uniqueiId++},ZincObject=function(){// THREE.Mesh\n/**\n\t * Groupname given to this geometry.\n\t */ /**\n\t * Total duration of the animation, this value interacts with the \n\t * {@link Renderer#playRate} to produce the actual duration of the\n\t * animation. Actual time in second = duration / playRate.\n\t */this.isZincObject=!0,this.geometry=void 0,this.morph=void 0,this._lod=new(__webpack_require__(8).LOD),this.groupName=void 0,this.timeEnabled=!1,this.morphColour=!1,this.inbuildTime=0,this.mixer=void 0,this.animationGroup=void 0,this.duration=6e3,this.clipAction=void 0,this.userData={},this.videoHandler=void 0,this.marker=void 0,this.markerUpdateRequired=!0,this.closestVertexIndex=-1,this.boundingBoxUpdateRequired=!0,this.cachedBoundingBox=new THREE.Box3,this.anatomicalId=void 0,this.region=void 0,this.animationClip=void 0,this.markerMode=\"inherited\",this.uuid=getUniqueId(),this._v1=new THREE.Vector3,this._v2=new THREE.Vector3,this._b1=new THREE.Box3};/**\n * Set the duration of the animation of this object.\n * \n * @param {Number} durationIn - Duration of the animation.\n */ /**\n * Get the duration of the animation of this object.\n * \n * @return {Number}\n */ /**\n * Set the region this object belongs to.\n *\n * @param {Region} region\n */ /**\n * Get the region this object belongs to.\n * \n * @return {Region}\n */ /**\n * Get the threejs object3D. \n * \n * @return {Object}\n */ /**\n * Set the internal threejs object3D. \n */ /**\n * Handle transparent mesh, create a clone for backside rendering if it is\n * transparent.\n */ /**\n * Set the mesh function for zincObject.\n * \n * @param {THREE.Mesh} mesh - Mesh to be set for this zinc object.\n * @param {Boolean} localTimeEnabled - A flag to indicate either the mesh is\n * time dependent.\n * @param {Boolean} localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */ /**\n * Set the name for this ZincObject.\n * \n * @param {String} groupNameIn - Name to be set.\n */ /**\n * Get the local time of this geometry, it returns a value between \n * 0 and the duration.\n * \n * @return {Number}\n */ /**\n * Set the local time of this geometry.\n * \n * @param {Number} time - Can be any value between 0 to duration.\n */ /**\n * Check if the geometry is time varying.\n * \n * @return {Boolean}\n */ /**\n * Get the visibility of this Geometry.\n * \n */ /**\n * Set the visibility of this Geometry.\n * \n * @param {Boolean} visible - a boolean flag indicate the visibility to be set \n */ /**\n * Set the opacity of this Geometry. This function will also set the isTransparent\n * flag according to the provided alpha value.\n * \n * @param {Number} alpah - Alpha value to set for this geometry, \n * can be any value between from 0 to 1.0.\n */ /**\n * The rendering will be culled if it is outside of the frustrum\n * when this flag is set to true, it should be set to false if\n * morphing is enabled.\n * \n * @param {Boolean} flag - Set frustrum culling on/off based on this flag.\n */ /**\n * Set rather a zinc object should be displayed using per vertex colour or\n * not.\n * \n * @param {Boolean} vertexColors - Set display with vertex color on/off.\n */ /**\n * Get the colour of the mesh.\n * \n * @return {THREE.Color}\n */ /**\n * Set the colour of the mesh.\n * \n * @param {THREE.Color} colour - Colour to be set for this geometry.\n */ /**\n * Get the colour of the mesh in hex string form.\n * \n * @return {String}\n */ /**\n * Set the colour of the mesh using hex in string form.\n * \n * @param {String} hex - The colour value in hex form.\n */ /**\n * Set the material of the geometry.\n * \n * @param {THREE.Material} material - Material to be set for this geometry.\n */ /**\n * Get the index of the closest vertex to centroid.\n * \n * @return {Number} - integer index in the array\n */ /**\n * Get the closest vertex to centroid.\n * \n * @return {THREE.Vector3}\n */ /**\n * Get the bounding box of this geometry.\n * \n * @return {THREE.Box3}.\n */ /**\n * Clear this geometry and free the memory.\n */ /**\n * Check if marker is enabled based on the objects settings with \n * the provided scene options.\n * \n * @return {Boolean} \n */ /**\n * Update the marker's position and size based on current viewport. \n */ /**\n * Get the windows coordinates.\n * \n * @return {Object} - position and rather the closest vertex is on screen.\n */ /**\n * Set marker mode for this zinc object which determine rather the\n * markers should be displayed or not.\n *\n * @param {string} mode - There are three options:\n * \"on\" - marker is enabled regardless of settings of scene\n * \"off\" - marker is disabled regardless of settings of scene\n * \"inherited\" - Marker settings on scene will determine the visibility\n * of the marker.\n * \n * @return {Boolean} \n */ //Update the geometry and colours depending on the morph.\nZincObject.prototype.setDuration=function(durationIn){this.duration=durationIn,this.clipAction&&this.clipAction.setDuration(this.duration)},ZincObject.prototype.getDuration=function(){return this.duration},ZincObject.prototype.setRegion=function(region){this.region=region},ZincObject.prototype.getRegion=function(){return this.region},ZincObject.prototype.getMorph=function(){var morph=this._lod.getCurrentMorph();return morph?morph:this.morph},ZincObject.prototype.setMorph=function(mesh){//this is the base level object\nthis.morph=mesh,this._lod.addLevel(mesh,0),this._lod.setMaterial(mesh.material)},ZincObject.prototype.checkTransparentMesh=function(){},ZincObject.prototype.setMesh=function(mesh,localTimeEnabled,localMorphColour){this.animationGroup=new THREE.AnimationObjectGroup(mesh),this.mixer=new THREE.AnimationMixer(this.animationGroup);var geometry=mesh.geometry;if(this.geometry=mesh.geometry,this.clipAction=void 0,geometry&&geometry.morphAttributes){var morphAttribute=geometry.morphAttributes.position;morphAttribute||(morphAttribute=geometry.morphAttributes.color?geometry.morphAttributes.color:geometry.morphAttributes.normal),morphAttribute&&(this.animationClip=THREE.AnimationClip.CreateClipsFromMorphTargetSequences(morphAttribute,10,!0),this.animationClip&&null!=this.animationClip[0]&&(this.clipAction=this.mixer.clipAction(this.animationClip[0]).setDuration(this.duration),this.clipAction.loop=THREE.loopOnce,this.clipAction.clampWhenFinished=!0,this.clipAction.play()))}this.timeEnabled=localTimeEnabled,this.morphColour=localMorphColour,mesh.userData=this,mesh.matrixAutoUpdate=!1,this.setMorph(mesh),this.checkTransparentMesh(!0),this.timeEnabled?this.setFrustumCulled(!1):this.morphColour&&(geometry.setAttribute(\"morphTarget0\",geometry.getAttribute(\"position\")),geometry.setAttribute(\"morphTarget1\",geometry.getAttribute(\"position\"))),this.boundingBoxUpdateRequired=!0},ZincObject.prototype.setName=function(groupNameIn){this.groupName=groupNameIn,this._lod.setName(groupNameIn)},ZincObject.prototype.getCurrentTime=function(){if(this.clipAction){var ratio=this.clipAction.time/this.clipAction._clip.duration;return this.duration*ratio}return this.inbuildTime},ZincObject.prototype.setMorphTime=function(time){var timeChanged=!1;if(this.clipAction){var ratio=time/this.duration,actualDuration=this.clipAction._clip.duration,newTime=ratio*actualDuration;newTime!=this.clipAction.time&&(this.clipAction.time=newTime,timeChanged=!0),timeChanged&&this.isTimeVarying()&&this.mixer.update(0)}else{var _newTime=time;_newTime=time>this.duration?this.duration:0>time?0:time,_newTime!=this.inbuildTime&&(this.inbuildTime=_newTime,timeChanged=!0)}if(timeChanged){this.boundingBoxUpdateRequired=!0;this._lod.getCurrentMorph();this._lod.updateMorphColorAttribute(!0),this.timeEnabled&&(this.markerUpdateRequired=!0)}},ZincObject.prototype.isTimeVarying=function(){return!!(this.timeEnabled||this.morphColour)},ZincObject.prototype.getVisibility=function(){var morph=this.getMorph();return!!morph&&morph.visible},ZincObject.prototype.setVisibility=function(visible){var morph=this.getMorph();morph.visible!==visible&&(morph.visible=visible,this.region&&(this.region.pickableUpdateRequired=!0))},ZincObject.prototype.setAlpha=function(alpha){var material=this._lod._material,isTransparent=!1;1>alpha&&(isTransparent=!0);var transparentChanged=material.transparent!=isTransparent;material.opacity=alpha,material.transparent=isTransparent,this.checkTransparentMesh(transparentChanged)},ZincObject.prototype.setFrustumCulled=function(flag){//multilayers - set for all layers\nthis._lod.setFrustumCulled(flag)},ZincObject.prototype.setVertexColors=function(vertexColors){//multilayers - set for all\nthis._lod.setVertexColors(vertexColors)},ZincObject.prototype.getColour=function(){return this._lod._material?this._lod._material.color:void 0},ZincObject.prototype.setColour=function(colour){this._lod.setColour(colour)},ZincObject.prototype.getColourHex=function(){return!this.morphColour&&this._lod._material&&this._lod._material.color?this._lod._material.color.getHexString():void 0},ZincObject.prototype.setColourHex=function(hex){this._lod._material.color.setHex(hex),this._lod._secondaryMaterial&&this._lod._secondaryMaterial.color.setHex(hex)},ZincObject.prototype.setMaterial=function(material){this._lod.setMaterial(material)},ZincObject.prototype.getClosestVertexIndex=function(){var closestIndex=-1,morph=this.getMorph();if(morph){var position=morph.geometry.attributes.position;if(this._b1.setFromBufferAttribute(position),this._b1.getCenter(this._v1),position)for(var distance=-1,currentDistance=0,i=0;i<position.count;i++)this._v2.fromArray(position.array,3*i),currentDistance=this._v2.distanceTo(this._v1),-1==distance?distance=currentDistance:distance>currentDistance&&(distance=currentDistance,closestIndex=i)}return closestIndex},ZincObject.prototype.getClosestVertex=function(applyMatrixWorld){var position=new THREE.Vector3;if(-1==this.closestVertexIndex&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex){var influences=this.morph.morphTargetInfluences,attributes=this.morph.geometry.morphAttributes;if(influences&&attributes&&attributes.position){for(var found=!1,i=0;i<influences.length;i++)0<influences[i]&&(found=!0,this._v1.fromArray(attributes.position[i].array,3*this.closestVertexIndex),position.add(this._v1.multiplyScalar(influences[i])));if(found)return applyMatrixWorld?position.applyMatrix4(this.morph.matrixWorld):position}else return position.fromArray(this.morph.geometry.attributes.position.array,3*this.closestVertexIndex),applyMatrixWorld?position.applyMatrix4(this.morph.matrixWorld):position}return this.getBoundingBox().getCenter(position),applyMatrixWorld?position.applyMatrix4(this.morph.matrixWorld):position},ZincObject.prototype.getBoundingBox=function(){var morph=this._lod.getCurrentMorph();return morph&&morph.visible?(this.boundingBoxUpdateRequired&&(__webpack_require__(4).getBoundingBox(morph,this.cachedBoundingBox,this._b1,this._v1,this._v2),this.boundingBoxUpdateRequired=!1),this.cachedBoundingBox):void 0},ZincObject.prototype.dispose=function(){//multilayyers\nthis._lod.dispose(),this.animationGroup=void 0,this.mixer=void 0,this.morph=void 0,this.clipAction=void 0,this.groupName=void 0},ZincObject.prototype.markerIsEnabled=function(options){return!!(\"on\"===this.markerMode||options&&options.displayMarkers&&\"inherited\"===this.markerMode)},ZincObject.prototype.updateMarker=function(playAnimation,options){if(!(!1==playAnimation&&this.markerIsEnabled(options)))this.marker&&this.marker.isEnabled()&&(this.marker.disable(),this._lod.toggleMarker(this.marker.morph,!1)),this.markerUpdateRequired=!0;else if(this.groupName){if(this.marker||(this.marker=new(__webpack_require__(9).Marker)(this),this.markerUpdateRequired=!0),this.markerUpdateRequired){var position=this.getClosestVertex(!1);position&&(this.marker.setPosition(position.x,position.y,position.z),this.markerUpdateRequired=!1)}options&&options.camera&&options.markerDepths&&options.markerDepths.push(this.marker.updateNDC(options.camera.cameraObject)),this.marker.isEnabled()||(this.marker.enable(),this._lod.toggleMarker(this.marker.morph,!0))}},ZincObject.prototype.processMarkerVisual=function(min,max){this.marker&&this.marker.isEnabled()&&this.marker.updateVisual(min,max)},ZincObject.prototype.initiateMorphColor=function(){1==this.morphColour&&this._lod.updateMorphColorAttribute(!1)},ZincObject.prototype.setRenderOrder=function(renderOrder){//multiilayers\nthis._lod.setRenderOrder(renderOrder)},ZincObject.prototype.getClosestVertexDOMElementCoords=function(scene){if(scene&&scene.camera){var inView=!0,position=this.getClosestVertex(!0);return position.project(scene.camera),position.z=Math.min(Math.max(position.z,0),1),(1<position.x||-1>position.x||1<position.y||-1>position.y)&&(inView=!1),scene.getZincCameraControls().getRelativeCoordsFromNDC(position.x,position.y,position),{position,inView}}},ZincObject.prototype.setMarkerMode=function(mode){mode!==this.markerMode&&(this.markerMode=\"on\"===mode||\"off\"===mode?mode:\"inherited\",this.region&&(this.region.pickableUpdateRequired=!0))},ZincObject.prototype.render=function(delta,playAnimation,options){if(!0==playAnimation){if(this.clipAction&&this.isTimeVarying())this.mixer.update(delta);else{var targetTime=this.inbuildTime+delta;targetTime>this.duration&&(targetTime-=this.duration),this.inbuildTime=targetTime}//multilayers\n0!=delta&&(this.boundingBoxUpdateRequired=!0,1==this.morphColour&&this._lod.updateMorphColorAttribute(!0))}this.updateMarker(playAnimation,options)},exports.ZincObject=ZincObject;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),updateMorphColorAttribute=__webpack_require__(4).updateMorphColorAttribute,LOD=function(){/**\n * Check if there are multiple levels.\n */ /**\n * Check if material is transparent, create secondary mesh\n * for better rendering if required.\n */ /* Update layers based on the */this.levels=[],this._currentLevel=0,this._renderOrder=1,this._material=void 0,this._secondaryMaterial=void 0,this.addLevel=(object,distanceIn)=>{if(object){var l,distance=Math.abs(distanceIn);for(l=0;l<this.levels.length&&!(distance<this.levels[l].distance);l++);this.levels.splice(l,0,{distance:distance,morph:object}),object.renderOrder=this._renderOrder}},this.containsLevels=()=>!!(this.levels&&1<this.levels.length),this.checkTransparentMesh=(animationGroup,transparentChanged)=>{var level=this.levels[this._currentLevel];this._material&&(this._material.transparent?(!this._secondaryMaterial&&(this._secondaryMaterial=this._material.clone(),this._secondaryMaterial.side=THREE.FrontSide),this._secondaryMaterial.opacity=this._material.opacity,!level.secondaryMesh&&(level.secondaryMesh=new THREE.Mesh(level.morph.geometry,this._secondaryMaterial),level.secondaryMesh.renderOrder=level.morph.renderOrder+1,level.secondaryMesh.userData=level.morph.userData,level.secondaryMesh.name=level.morph.name),transparentChanged&&(this._material.side=THREE.BackSide,this._material.needsUpdate=!0,level.morph.add(level.secondaryMesh),animationGroup.add(level.secondaryMesh))):(level.secondaryMesh&&(level.morph.remove(level.secondaryMesh),animationGroup.uncache(level.secondaryMesh),animationGroup.remove(level.secondaryMesh)),this._material.side=THREE.DoubleSide))},this.dispose=()=>{this.levels.forEach(level=>{level.morph&&level.morph.geometry&&level.morph.geometry.dispose()}),this._material&&this._material.dispose(),this._secondaryMaterial&&this._secondaryMaterial.dispose()},this.getCurrentLevel=()=>this._currentLevel,this.getCurrentMorph=()=>{var level=this.levels[this._currentLevel];return level?level.morph:void 0},this.updateMorphColorAttribute=function(currentOnly){//Multilayers - set all\nif(this._material.vertexColors==THREE.VertexColors||!0==this._material.vertexColors)if(currentOnly){var morph=this.getCurrentMorph();updateMorphColorAttribute(morph.geometry,morph)}else this.levels.forEach(level=>{level.morph&&level.morph.geometry&&updateMorphColorAttribute(level.morph.geometry,level.morph)})},this.setColour=colour=>{this._material.color=colour,this._secondaryMaterial&&(this._secondaryMaterial.color=colour),updateGeometryColour()},this.setFrustumCulled=flag=>{this.levels.forEach(level=>{level.morph&&(level.morph.frustumCulled=flag),level.secondaryMesh&&(level.secondaryMesh.frustumCulled=flag)})},this.setMaterial=material=>{material&&(!this._material||this._material.id!==material.id)&&(this._material=material,this._secondaryMaterial&&(this._secondaryMaterial.dispose(),this._secondaryMaterial=material.clone(),this._secondaryMaterial.side=THREE.FrontSide),this.levels.forEach(level=>{level.morph&&(level.morph.material=this._material,level.morph.geometry&&(level.morph.geometry.colorsNeedUpdate=!0)),level.secondaryMesh&&(level.secondaryMesh.material=this._secondaryMaterial)}))},this.setName=name=>{this.levels.forEach(level=>{level.morph&&(level.morph.name=name),level.secondaryMesh&&(level.secondaryMesh.name=name)})},this.setRenderOrder=order=>{this._renderOrder=order,this.levels.forEach(level=>{level.morph&&(level.morph.renderOrder=order),level.secondaryMesh&&(level.secondaryMesh.renderOrder=order)})},this.setVertexColors=vertexColors=>{this._material.vertexColors=vertexColors,updateGeometryColour(),this._secondaryMaterial&&(this._secondaryMaterial.vertexColors=vertexColors)},this.update=camera=>{var levels=this.levels;if(1<levels.length){_v1.setFromMatrixPosition(camera.matrixWorld),_v2.setFromMatrixPosition(this.matrixWorld);var distance=_v1.distanceTo(_v2)/camera.zoom;levels[0].object.visible=!0;var i,l;for(i=1,l=levels.length;i<l&&distance>=levels[i].distance;i++)levels[i-1].object.visible=!1,levels[i].object.visible=!0;for(this._currentLevel=i-1;i<l;i++)levels[i].object.visible=!1}},this.toggleMarker=(marker,flag)=>{this.levels.forEach(level=>{level.morph&&(flag?level.morph.add(marker):level.morph.remove(marker))})},updateGeometryColour=()=>{this.levels.forEach(level=>{level.morph&&level.morph.geometry&&(level.morph.geometry.colorsNeedUpdate=!0)})}};exports.LOD=LOD;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),markerImage=new Image(128,128);markerImage.src=__webpack_require__(10);var texture=new THREE.Texture;texture.image=markerImage,texture.needsUpdate=!0;var size=[.015,.02,1],Marker=function(zincObject){__webpack_require__(7).ZincObject.call(this),this.texture=texture;var spriteMaterial=void 0,sprite=void 0;this.morph=new THREE.Group,this.parent=zincObject,this.isMarker=!0;var enabled=!1,vector=new THREE.Vector3,initialise=()=>{spriteMaterial=new THREE.SpriteMaterial({map:texture,alphaTest:.5,transparent:!0,depthTest:!1,depthWrite:!1,sizeAttenuation:!1}),sprite=new THREE.Sprite(spriteMaterial),sprite.center.set(.5,0),this.morph.add(sprite),this.morph.position.set(0,0,0),this.morph.renderOrder=1e4,sprite.scale.set(size[0],size[1],size[2]),sprite.userData=this};/**\n * Set the position of the marker.\n * \n * @param {Number} x - x coordinate to be set.\n * @param {Number} y - y coordinate to be set.\n * @param {Number} z - z coordinate to be set.\n */ /**\n * Set the size of the marker.\n * \n * @param {Number} size - size to be set.\n */ /**\n * Clean up this object,\n */ /**\n * Enable and visualise the marker.\n */ /**\n * Disable and hide the marker.\n */ //this should be handle by scene... check the sync at \nthis.updateVisual=(min,max)=>{var scale=1,opacity=1,porportion=0;min!==max&&(porportion=1-(vector.z-min)/(max-min),scale=.5+.5*porportion,opacity=.6+.4*porportion),sprite.material.opacity=opacity,this.setSpriteSize(scale)},this.updateNDC=camera=>(vector.copy(this.morph.position),vector.project(camera),vector.z=Math.min(Math.max(vector.z,0),1),vector.z),this.setPosition=(x,y,z)=>{this.morph.position.set(x,y,z)},this.setSpriteSize=size=>{sprite.scale.set(.015,.02,1),sprite.scale.multiplyScalar(size)},this.dispose=()=>{this.morph&&this.morph.clear(),spriteMaterial&&spriteMaterial.dispose(),sprite&&(sprite.clear(),sprite=void 0)},this.isEnabled=()=>enabled,this.enable=()=>{enabled=!0,this.morph.visible=!0},this.disable=()=>{enabled=!1,this.morph.visible=!1},initialise()};/**\n * A special graphics type with a tear drop shape.\n * It is currently used to mark the location of a\n * {@link zincObject}.\n * \n * @class\n * @author Alan Wu\n * @return {Marker}\n */Marker.prototype=Object.create(__webpack_require__(7).ZincObject.prototype),exports.Marker=Marker;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzY1IDU2MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzY1IDU2MCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8cGF0aCBmaWxsPSIjMDA1OTc0IiBkPSJNMTgyLjksNTUxLjdjMCwwLjEsMC4yLDAuMywwLjIsMC4zUzM1OC4zLDI4MywzNTguMywxOTQuNmMwLTEzMC4xLTg4LjgtMTg2LjctMTc1LjQtMTg2LjkNCgkJQzk2LjMsNy45LDcuNSw2NC41LDcuNSwxOTQuNmMwLDg4LjQsMTc1LjMsMzU3LjQsMTc1LjMsMzU3LjRTMTgyLjksNTUxLjcsMTgyLjksNTUxLjd6IE0xMjIuMiwxODcuMmMwLTMzLjYsMjcuMi02MC44LDYwLjgtNjAuOA0KCQljMzMuNiwwLDYwLjgsMjcuMiw2MC44LDYwLjhTMjE2LjUsMjQ4LDE4Mi45LDI0OEMxNDkuNCwyNDgsMTIyLjIsMjIwLjgsMTIyLjIsMTg3LjJ6Ii8+DQo8L2c+DQo8L3N2Zz4NCg==\"\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),Glyph=function(geometry,materialIn,idIn,glyphsetIn){__webpack_require__(7).ZincObject.call(this);var material;materialIn&&(material=materialIn.clone(),material.vertexColors=THREE.FaceColors);this.id=idIn;var label=void 0,labelString=void 0,group=new THREE.Group;/**\n * Create a glyph using mesh\n * @param {THREE.Mesh} meshIn - Mesh to create the glyph from\n *\n * @returns {Boolean} true if successful\n */ /**\n * Get the {Glyphset} containing this glyph.\n *\n * @returns {Boolean} true if successful\n */ /**\n * Set and update the text containing this glyph.\n * @param {String} text - Label to be set for this instance\n */ /**\n * Display label with the choosen colour. It will replace the current\n * label.\n * @param {THREE.Color} colour - Colour for the label.\n */ /**\n * Get the group containing the label and mesh.\n * @return {THREE.Group}\n */ /**\n * Get the label of this glyph\n * @return {Label}\n */ /**\n * Get the mesh of this glyph.\n * @return {THREE.Mesh}\n */ /**\n * Set the transformation of this glyph.\n * @param {Array} position - Three components vectors containing position of the\n * transformation.\n * @param {Array} axis1 - Three components vectors containing axis1 rotation of the\n * transformation.\n * @param {Array} axis2 - Three components vectors containing axis2 rotation of the\n * transformation.\n * @param {Array} position - Three components vectors containing axis3 rotation of the\n * transformation.\n */ /**\n * Set the color of the glyph and its label.\n * \n * @param {THREE.Color} color - Colour to be set.\n */ /**\n * Clear and free its memory.\n */this.isGlyph=!0,this.fromMesh=meshIn=>!!(meshIn&&meshIn.isMesh)&&(this.morph=meshIn.clone(),this.morph.userData=this,group.add(this.morph),!0),geometry&&material&&this.fromMesh(new THREE.Mesh(geometry,material)),this.getGlyphset=function(){return glyphsetIn},this.setLabel=text=>{text&&(\"string\"==typeof text||text instanceof String)&&(labelString=text,this.morph&&(this.morph.name=text)),label&&this.showLabel()},this.showLabel=colour=>{if(label&&(position=label.getPosition(),group.remove(label.getSprite()),label.dispose(),label=void 0),labelString&&(\"string\"==typeof labelString||labelString instanceof String)){var _position=[0,0,0];label=new(__webpack_require__(12).Label)(labelString,colour),label.setPosition(_position[0],_position[1],_position[2]),group.add(label.getSprite())}},this.getGroup=()=>group,this.getLabel=()=>labelString,this.getMesh=()=>this.morph,this.setTransformation=(position,axis1,axis2,axis3)=>{this.morph&&(this.morph.matrix.elements[0]=axis1[0],this.morph.matrix.elements[1]=axis1[1],this.morph.matrix.elements[2]=axis1[2],this.morph.matrix.elements[3]=0,this.morph.matrix.elements[4]=axis2[0],this.morph.matrix.elements[5]=axis2[1],this.morph.matrix.elements[6]=axis2[2],this.morph.matrix.elements[7]=0,this.morph.matrix.elements[8]=axis3[0],this.morph.matrix.elements[9]=axis3[1],this.morph.matrix.elements[10]=axis3[2],this.morph.matrix.elements[11]=0,this.morph.matrix.elements[12]=position[0],this.morph.matrix.elements[13]=position[1],this.morph.matrix.elements[14]=position[2],this.morph.matrix.elements[15]=1,this.morph.matrixAutoUpdate=!1),label&&label.setPosition(position[0],position[1],position[2])},this.setColour=color=>{label&&label.setColour(color),this.secondaryMesh&&this.secondaryMesh.material&&(this.secondaryMesh.material.color=colour),this.geometry.colorsNeedUpdate=!0},this.dispose=()=>{this.material&&this.material.dispose(),this.morph=void 0}};/**\n * Zinc representation of glyph graphic, it contains the colours, \n * geometry and transformation of the glyph.\n * \n * @param {THREE.Geometry} geometry - Geometry of the glyph .\n * @param {THREE.Material} materialIn - Material of the glyph.\n * @param {Number} idIn - Id of the glyph.\n * \n * @class\n * @author Alan Wu\n * @return {Glyph}\n */Glyph.prototype=Object.create(__webpack_require__(7).ZincObject.prototype),exports.Glyph=Glyph;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar SpriteText=__webpack_require__(13).default;/**\n * Bitmap labels, this is used with {@link Glyph} to \n * provide labels.\n * \n * @param {String} textIn - Text to be displayed dwith the label.\n * @param {THREE.Color} colour - Colour to be set for the label.\n * \n * @class\n * @author Alan Wu\n * @return {Label}\n */exports.Label=function(textIn,colour){var text=textIn,sprite=void 0;/**\n * Get the current position in an array containing the x, y and z\n * coordinates.\n * \n * @return {Array}\n */ /**\n * Set the position of the label in 3D coordinates.\n * \n * @param {Number} x - x coordinate to be set.\n * @param {Number} y - y coordinate to be set.\n * @param {Number} z - z coordinate to be set.\n */ /**\n * Set the colour of the label\n * \n * @param {THREE.Color} colour - colour to be set\n */ /**\n * Scale the label.\n * \n * @param {Number} scaling - Scale to be set.\n */ /**\n * Free up the memory\n */ /**\n * Get the intrnal sprite.\n * \n * @return {THREE.Sprite}\n */ /**\n * Get the text.\n * \n * @return {String}\n */sprite=colour?new SpriteText(text,.015,colour.getStyle()):new SpriteText(text,.015),sprite.material.sizeAttenuation=!1,sprite.center.x=-.05,sprite.center.y=0,this.getPosition=()=>sprite?[sprite.position.x,sprite.position.y,sprite.position.z]:[0,0,0],this.setPosition=(x,y,z)=>{sprite&&sprite.position.set(x,y,z)},this.setColour=colour=>{sprite.color=colour.getStyle()},this.setScale=scaling=>{sprite&&0<scaling&&sprite.scale.set(scaling,scaling,1)},this.dispose=()=>{sprite.dispose()},this.getSprite=()=>sprite,this.getString=()=>text};\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! three-spritetext */ \"./node_modules/three-spritetext/dist/three-spritetext.mjs\");\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction _readOnlyError(name){throw new Error(\"\\\"\"+name+\"\\\" is read-only\")}var THREE=__webpack_require__(3),JSONLoader=__webpack_require__(15).JSONLoader,Glyphset=function(){__webpack_require__(7).ZincObject.call(this);var glyphList=[],axis1s=void 0,axis2s=void 0,axis3s=void 0,positions=void 0,scales=void 0,colors=void 0,labels=void 0,numberOfTimeSteps=0,numberOfVertices=0,baseSize=[0,0,0],offset=[0,0,0],scaleFactors=[0,0,0],repeat_mode=\"NONE\";this.ready=!1;var morphColours=!1,morphVertices=!1;this.isGlyphset=!0;for(var _transformMatrix=new THREE.Matrix4,_bot_colour=new THREE.Color,_top_colour=new THREE.Color,_boundingBox1=new THREE.Box3,_boundingBox2=new THREE.Box3,_boundingBox3=new THREE.Box3,_points=[],_current_positions=[],_current_axis1s=[],_current_axis2s=[],_current_axis3s=[],_current_scales=[],_current_colors=[],_glyph_axis_array=[],i=0;8>i;i++)_points[i]=new THREE.Vector3;/**\n * Get the {@link Three.Group} containing all of the glyphs' meshes.\n * @returns {Three.Group}\n */this.getGroup=()=>this.morph,this.load=(glyphsetData,glyphURL,finishCallback,isInline,displayLabels)=>{axis1s=glyphsetData.axis1,axis2s=glyphsetData.axis2,axis3s=glyphsetData.axis3,positions=glyphsetData.positions,scales=glyphsetData.scale,colors=glyphsetData.colors,labels=glyphsetData.label,morphColours=glyphsetData.metadata.MorphColours,morphVertices=glyphsetData.metadata.MorphVertices,numberOfTimeSteps=glyphsetData.metadata.number_of_time_steps,repeat_mode=glyphsetData.metadata.repeat_mode,numberOfVertices=glyphsetData.metadata.number_of_vertices,\"AXES_2D\"==repeat_mode||\"MIRROR\"==repeat_mode?numberOfVertices*=2:\"AXES_3D\"==repeat_mode&&(numberOfVertices*=3),baseSize=glyphsetData.metadata.base_size,offset=glyphsetData.metadata.offset,scaleFactors=glyphsetData.metadata.scale_factors;var loader=new JSONLoader;this.geometry=new THREE.BufferGeometry;var instancedMesh=new THREE.InstancedMesh(this.geometry,void 0,numberOfVertices);if(this.setMorph(instancedMesh),isInline){var object=loader.parse(glyphURL);meshloader(finishCallback,displayLabels)(object.geometry,object.materials),object.geometry.dispose()}else loader.crossOrigin=\"Anonymous\",loader.load(glyphURL,meshloader(finishCallback,displayLabels))};/**\n * Calculate the actual transformation value that can be applied \n * to the transformation matrix.\n * \n * @returns {Array}\n */var resolve_glyph_axes=(point,axis1,axis2,axis3,scale,return_arrays)=>{if(\"NONE\"==repeat_mode||\"MIRROR\"==repeat_mode){for(var sign,axis_scale=[0,0,0],final_axis1=[0,0,0],final_axis2=[0,0,0],final_axis3=[0,0,0],final_point=[0,0,0],mirrored_axis1=[0,0,0],mirrored_axis2=[0,0,0],mirrored_axis3=[0,0,0],mirrored_point=[0,0,0],j=0;3>j;j++)sign=0>scale[j]?-1:1,axis_scale[j]=sign*baseSize[j]+scale[j]*scaleFactors[j];for(var j=0;3>j;j++)final_axis1[j]=axis1[j]*axis_scale[0],final_axis2[j]=axis2[j]*axis_scale[1],final_axis3[j]=axis3[j]*axis_scale[2],final_point[j]=point[j]+offset[0]*final_axis1[j]+offset[1]*final_axis2[j]+offset[2]*final_axis3[j],\"MIRROR\"==repeat_mode&&(mirrored_axis1[j]=-final_axis1[j],mirrored_axis2[j]=-final_axis2[j],mirrored_axis3[j]=-final_axis3[j],mirrored_point[j]=final_point[j],0>scale[0]&&(final_point[j]-=final_axis1[j],mirrored_point[j]-=mirrored_axis1[j]));/* if required, reverse axis3 to maintain right-handed coordinate system */0>final_axis3[0]*(final_axis1[1]*final_axis2[2]-final_axis1[2]*final_axis2[1])+final_axis3[1]*(final_axis1[2]*final_axis2[0]-final_axis1[0]*final_axis2[2])+final_axis3[2]*(final_axis1[0]*final_axis2[1]-final_axis1[1]*final_axis2[0])&&(final_axis3[0]=-final_axis3[0],final_axis3[1]=-final_axis3[1],final_axis3[2]=-final_axis3[2]),return_arrays[0]=[final_point,final_axis1,final_axis2,final_axis3],\"MIRROR\"==repeat_mode&&(0>mirrored_axis3[0]*(mirrored_axis1[1]*mirrored_axis2[2]-mirrored_axis1[2]*mirrored_axis2[1])+mirrored_axis3[1]*(mirrored_axis1[2]*mirrored_axis2[0]-mirrored_axis1[0]*mirrored_axis2[2])+mirrored_axis3[2]*(mirrored_axis1[0]*mirrored_axis2[1]-mirrored_axis1[1]*mirrored_axis2[0])&&(mirrored_axis3[0]=-mirrored_axis3[0],mirrored_axis3[1]=-mirrored_axis3[1],mirrored_axis3[2]=-mirrored_axis3[2]),return_arrays[1]=[mirrored_point,mirrored_axis1,mirrored_axis2,mirrored_axis3])}else if(\"AXES_2D\"==repeat_mode||\"AXES_3D\"==repeat_mode){for(var sign,_axis_scale=[0,0,0],_final_point=[0,0,0],j=0;3>j;j++)sign=0>scale[j]?-1:1,_axis_scale[j]=sign*baseSize[0]+scale[j]*scaleFactors[0];for(var j=0;3>j;j++)_final_point[j]=point[j]+offset[0]*_axis_scale[0]*axis1[j]+offset[1]*_axis_scale[1]*axis2[j]+offset[2]*_axis_scale[2]*axis3[j];for(var number_of_glyphs=\"AXES_2D\"==glyph_repeat_mode?2:3,k=0;k<number_of_glyphs;k++){var use_axis1=void 0,use_axis2=void 0,use_scale=scale[k],_final_axis=[0,0,0],_final_axis2=[0,0,0],_final_axis3=[0,0,0];0==k?(use_axis1=axis1,use_axis2=axis2):1==k?(use_axis1=axis2,use_axis2=\"AXES_2D\"==glyph_repeat_mode?axis1:axis3):(use_axis1=axis3,use_axis2=axis1);var final_scale1=baseSize[0]+use_scale*scaleFactors[0];_final_axis[0]=use_axis1[0]*final_scale1,_final_axis[1]=use_axis1[1]*final_scale1,_final_axis[2]=use_axis1[2]*final_scale1,_final_axis3[0]=_final_axis[1]*use_axis2[2]-use_axis2[1]*_final_axis[2],_final_axis3[1]=_final_axis[2]*use_axis2[0]-use_axis2[2]*_final_axis[0],_final_axis3[2]=_final_axis[0]*use_axis2[1]-_final_axis[1]*use_axis2[0];var magnitude=Math.sqrt(_final_axis3[0]*_final_axis3[0]+_final_axis3[1]*_final_axis3[1]+_final_axis3[2]*_final_axis3[2]);if(0<magnitude){var _scaling=(baseSize[2]+use_scale*scaleFactors[2])/magnitude;\"AXES_2D\"==repeat_mode&&0<k&&(_scaling*=-1),_final_axis3[0]*=_scaling,_final_axis3[1]*=_scaling,_final_axis3[2]*=_scaling}if(_final_axis2[0]=_final_axis3[1]*_final_axis[2]-_final_axis[1]*_final_axis3[2],_final_axis2[1]=_final_axis3[2]*_final_axis[0]-_final_axis[2]*_final_axis3[0],_final_axis2[2]=_final_axis3[0]*_final_axis[1]-_final_axis3[1]*_final_axis[0],magnitude=Math.sqrt(_final_axis2[0]*_final_axis2[0]+_final_axis2[1]*_final_axis2[1]+_final_axis2[2]*_final_axis2[2]),0<magnitude){var scaling=(baseSize[1]+use_scale*scaleFactors[1])/magnitude;_final_axis2[0]*=scaling,_final_axis2[1]*=scaling,_final_axis2[2]*=scaling}return_arrays[k]=[_final_point,_final_axis,_final_axis2,_final_axis3]}}return return_arrays},updateGlyphsetTransformation=(current_positions,current_axis1s,current_axis2s,current_axis3s,current_scales)=>{var numberOfGlyphs=1;\"AXES_2D\"==repeat_mode||\"MIRROR\"==repeat_mode?numberOfGlyphs=2:\"AXES_3D\"==repeat_mode&&(numberOfGlyphs=3);var numberOfPositions=current_positions.length/3,current_glyph_index=0;_glyph_axis_array.length=numberOfGlyphs;for(var _i=0;_i<numberOfPositions;_i++){var current_index=3*_i,current_position=[current_positions[current_index],current_positions[current_index+1],current_positions[current_index+2]],current_axis1=[current_axis1s[current_index],current_axis1s[current_index+1],current_axis1s[current_index+2]],current_axis2=[current_axis2s[current_index],current_axis2s[current_index+1],current_axis2s[current_index+2]],current_axis3=[current_axis3s[current_index],current_axis3s[current_index+1],current_axis3s[current_index+2]],current_scale=[current_scales[current_index],current_scales[current_index+1],current_scales[current_index+2]],arrays=resolve_glyph_axes(current_position,current_axis1,current_axis2,current_axis3,current_scale,_glyph_axis_array);if(arrays.length==numberOfGlyphs)for(var j=0;j<numberOfGlyphs;j++){_transformMatrix.elements[0]=arrays[j][1][0],_transformMatrix.elements[1]=arrays[j][1][1],_transformMatrix.elements[2]=arrays[j][1][2],_transformMatrix.elements[3]=0,_transformMatrix.elements[4]=arrays[j][2][0],_transformMatrix.elements[5]=arrays[j][2][1],_transformMatrix.elements[6]=arrays[j][2][2],_transformMatrix.elements[7]=0,_transformMatrix.elements[8]=arrays[j][3][0],_transformMatrix.elements[9]=arrays[j][3][1],_transformMatrix.elements[10]=arrays[j][3][2],_transformMatrix.elements[11]=0,_transformMatrix.elements[12]=arrays[j][0][0],_transformMatrix.elements[13]=arrays[j][0][1],_transformMatrix.elements[14]=arrays[j][0][2],_transformMatrix.elements[15]=1,this.morph.setMatrixAt(current_glyph_index,_transformMatrix);var glyph=glyphList[current_glyph_index];glyph&&glyph.setTransformation(arrays[j][0],arrays[j][1],arrays[j][2],arrays[j][3]),current_glyph_index++}}this.morph.instanceMatrix.needsUpdate=!0},updateGlyphsetHexColors=current_colors=>{var numberOfGlyphs=1;\"AXES_2D\"==repeat_mode||\"MIRROR\"==repeat_mode?numberOfGlyphs=2:\"AXES_3D\"==repeat_mode&&(numberOfGlyphs=3);for(var hex_values,numberOfColours=current_colors.length,current_glyph_index=0,_i2=0;_i2<numberOfColours;_i2++){hex_values=current_colors[_i2];for(var j=0;j<numberOfGlyphs;j++){_bot_colour.setHex(hex_values),this.morph.setColorAt(current_glyph_index,_bot_colour);var glyph=glyphList[current_glyph_index];glyph&&glyph.setColour(_bot_colour),current_glyph_index++}}this.morph.instanceColor.needsUpdate=!0},updateMorphGlyphsets=()=>{var current_positions=_current_positions,current_axis1s=_current_axis1s,current_axis2s=_current_axis2s,current_axis3s=_current_axis3s,current_scales=_current_scales,current_colors=_current_colors,current_time=this.inbuildTime/this.duration*(numberOfTimeSteps-1),bottom_frame=Math.floor(current_time),proportion=1-(current_time-bottom_frame),top_frame=Math.ceil(current_time);if(morphVertices){var bottom_positions=positions[bottom_frame.toString()],top_positions=positions[top_frame.toString()],bottom_axis1=axis1s[bottom_frame.toString()],top_axis1=axis1s[top_frame.toString()],bottom_axis2=axis2s[bottom_frame.toString()],top_axis2=axis2s[top_frame.toString()],bottom_axis3=axis3s[bottom_frame.toString()],top_axis3=axis3s[top_frame.toString()],bottom_scale=scales[bottom_frame.toString()],top_scale=scales[top_frame.toString()];_current_positions.length=bottom_positions.length,_current_axis1s.length=bottom_positions.length,_current_axis2s.length=bottom_positions.length,_current_axis3s.length=bottom_positions.length,_current_scales.length=bottom_positions.length;for(var _i3=0;_i3<bottom_positions.length;_i3++)current_positions[_i3]=proportion*bottom_positions[_i3]+(1-proportion)*top_positions[_i3],current_axis1s[_i3]=proportion*bottom_axis1[_i3]+(1-proportion)*top_axis1[_i3],current_axis2s[_i3]=proportion*bottom_axis2[_i3]+(1-proportion)*top_axis2[_i3],current_axis3s[_i3]=proportion*bottom_axis3[_i3]+(1-proportion)*top_axis3[_i3],current_scales[_i3]=proportion*bottom_scale[_i3]+(1-proportion)*top_scale[_i3]}else current_positions=(_readOnlyError(\"current_positions\"),positions[0]),current_axis1s=(_readOnlyError(\"current_axis1s\"),axis1s[0]),current_axis2s=(_readOnlyError(\"current_axis2s\"),axis2s[0]),current_axis3s=(_readOnlyError(\"current_axis3s\"),axis3s[0]),current_scales=(_readOnlyError(\"current_scales\"),scales[0]);if(updateGlyphsetTransformation(current_positions,current_axis1s,current_axis2s,current_axis3s,current_scales),this.boundingBoxUpdateRequired=!0,null!=colors){if(morphColours){var bottom_colors=colors[bottom_frame.toString()],top_colors=colors[top_frame.toString()];current_colors.length=bottom_colors.length;for(var _i4=0;_i4<bottom_colors.length;_i4++)_bot_colour.setHex(bottom_colors[_i4]),_top_colour.setHex(top_colors[_i4]),_bot_colour.setRGB(_bot_colour.r*proportion+_top_colour.r*(1-proportion),_bot_colour.g*proportion+_top_colour.g*(1-proportion),_bot_colour.b*proportion+_top_colour.b*(1-proportion)),current_colors[_i4]=_bot_colour.getHex();/*\n for (var i = 0; i < bottom_colors.length; i++) {\n current_colors.push(proportion * bottom_colors[i] + (1.0 - proportion) * top_colors[i]);\n }\n */}else current_colors=(_readOnlyError(\"current_colors\"),colors[0]);updateGlyphsetHexColors(current_colors)}};/**\n * Update transformation for each of the glyph in this glyphset.\n */this.showLabel=()=>{for(var _i5=0;_i5<glyphList.length;_i5++)glyphList[_i5].showLabel(this.morph.material?this.morph.material.color:void 0)};/**\n * Create the glyphs in the glyphset.\n * \n * @param {Boolean} displayLabels -Flag to determine either the labels should be display or not.\n */var createGlyphs=displayLabels=>{if(labels!=null&&displayLabels)for(var glyph,_i6=0;_i6<numberOfVertices;_i6++)glyph=new(__webpack_require__(11).Glyph)(void 0,void 0,_i6,this),null!=labels&&null!=labels[_i6]&&glyph.setLabel(labels[_i6]),0<numberOfTimeSteps&&glyph.setFrustumCulled(!1),glyphList[_i6]=glyph,this.morph.add(glyph.getGroup());//Update the transformation of the glyphs.\nlabels!=null&&displayLabels&&this.showLabel(this.morph.material?this.morph.material.color:void 0),updateGlyphsetTransformation(positions[0],axis1s[0],axis2s[0],axis3s[0],scales[0]),colors!=null&&updateGlyphsetHexColors(colors[0]),this.ready=!0,this.boundingBoxUpdateRequired=!0};/**\n * Add a custom {@link Glyph} to this {@link Glyphset}.\n * \n * @param {Glyph} Glyph to be added.\n */this.addCustomGlyph=glyph=>{glyph.isGlyph&&glyphList.push(glyph),this.ready=!0,this.boundingBoxUpdateRequired=!0},this.addMeshAsGlyph=(mesh,id)=>{if(mesh.isMesh){var glyph=new(__webpack_require__(11).Glyph)(void 0,void 0,id,this);return glyph.fromMesh(mesh),glyphList.push(glyph),this.morph.add(glyph.getGroup()),this.ready=!0,this.boundingBoxUpdateRequired=!0,glyph}},this.forEachGlyph=callbackFunction=>{for(var _i7=0;_i7<glyphList.length;_i7++)callbackFunction(glyphList[_i7])};var meshloader=(finishCallback,displayLabels)=>(geometry,materials)=>{var tempGeometry=geometry.toBufferGeometry();this.geometry.copy(tempGeometry),this.geometry.computeBoundingSphere(),this.geometry.computeBoundingBox(),tempGeometry.dispose(),materials&&materials[0]&&(this.morph.material=materials[0]),createGlyphs(displayLabels),this.morph.name=this.groupName,this.morph.userData=this,this.setMorph(this.morph),geometry.dispose(),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(this)};/**\n * Get the index of the closest vertex to centroid.\n */ /**\n * Get the closest vertex to centroid.\n */ /**\n * Get the bounding box for the whole set of glyphs.\n * \n * @return {Three.Box3};\n */ /**\n * Set the local time of this glyphset.\n * \n * @param {Number} time - Can be any value between 0 to duration.\n */ /**\n * Check if the glyphset is time varying.\n * \n * @return {Boolean}\n */ /**\n * Get the current inbuild time of the \n * \n * @return {Number}\n */ /**\n * Clear this glyphset and its list of glyphs which will release them from the memory.\n */ /**\n * Update the glyphsets if required the render.\n */this.getClosestVertexIndex=function(){var closestIndex=-1;if(this.morph&&this.ready){this.getBoundingBox().getCenter(this._v1);for(var current_index,current_positions=positions[0],numberOfPositions=current_positions.length/3,distance=-1,currentDistance=0,_i8=0;_i8<numberOfPositions;_i8++)current_index=3*_i8,this._v2.set(current_positions[current_index],current_positions[current_index+1],current_positions[current_index+2]),currentDistance=this._v1.distanceTo(this._v2),-1==distance?(distance=currentDistance,closestIndex=_i8):distance>currentDistance&&(distance=currentDistance,closestIndex=_i8)}return closestIndex},this.getClosestVertex=function(){if(-1==this.closestVertexIndex&&(this.closestVertexIndex=this.getClosestVertexIndex()),0<=this.closestVertexIndex&&this.morph)/*\n if (glyphList && glyphList[this.closestVertexIndex]) {\n glyphList[this.closestVertexIndex].getBoundingBox().getCenter(position);\n }\n */{var position=new THREE.Vector3;return this.morph.getMatrixAt(this.closestVertexIndex,_transformMatrix),position.setFromMatrixPosition(_transformMatrix),position}},this.getBoundingBox=()=>{if(this.morph&&this.ready&&this.morph.visible){if(this.boundingBoxUpdateRequired){_boundingBox1.setFromBufferAttribute(this.morph.geometry.attributes.position);for(var _i9=0;_i9<numberOfVertices;_i9++)this.morph.getMatrixAt(_i9,_transformMatrix),_boundingBox2.copy(_boundingBox1).applyMatrix4(_transformMatrix),0==_i9?_boundingBox3.copy(_boundingBox2):_boundingBox3.union(_boundingBox2);if(_boundingBox3)this.cachedBoundingBox.copy(_boundingBox3),this.morph.updateWorldMatrix(),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1;else return}return this.cachedBoundingBox}},this.setMorphTime=time=>{this.inbuildTime=time>this.duration?this.duration:0>time?0:time,(morphColours||morphVertices)&&(updateMorphGlyphsets(),morphVertices&&(this.markerUpdateRequired=!0))},this.isTimeVarying=()=>!!(0<numberOfTimeSteps&&(morphColours||morphVertices)),this.getCurrentTime=()=>this.inbuildTime,this.dispose=()=>{for(var _i10=glyphList.length-1;0<=_i10;_i10--)glyphList[_i10].dispose();this.geometry&&this.geometry.dispose(),this.morph&&this.morph.material.dispose(),axis1s=void 0,axis2s=void 0,axis3s=void 0,positions=void 0,scales=void 0,colors=void 0,this.ready=!1,this.groupName=void 0},this.render=(delta,playAnimation,options)=>{if(!0==playAnimation){var targetTime=this.inbuildTime+delta;targetTime>this.duration&&(targetTime-=this.duration),this.inbuildTime=targetTime,(morphColours||morphVertices)&&updateMorphGlyphsets()}this.updateMarker(playAnimation,options)}};Glyphset.prototype=Object.create(__webpack_require__(7).ZincObject.prototype),exports.Glyphset=Glyphset;\n\n/***/ }),\n/* 15 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"JSONLoader\", function() { return JSONLoader; });\nvar THREE=__webpack_require__(3),Loader=__webpack_require__(16).Loader,LoaderUtils=THREE.LoaderUtils,AnimationClip=THREE.AnimationClip,Vector3=THREE.Vector3,Vector4=THREE.Vector4,Color=THREE.Color,Vector2=THREE.Vector2,Face3=__webpack_require__(5).Face3,Geometry=__webpack_require__(5).Geometry,FileLoader=THREE.FileLoader,DefaultLoadingManager=THREE.DefaultLoadingManager,VideoHandler=__webpack_require__(17).VideoHandler;/**\n * @author mrdoob / http://mrdoob.com/\n * @author alteredq / http://alteredqualia.com/\n */function JSONLoader(manager){\"boolean\"==typeof manager&&(console.warn(\"THREE.JSONLoader: showStatus parameter has been removed from constructor.\"),manager=void 0),this.manager=manager===void 0?DefaultLoadingManager:manager,this.withCredentials=!1,this.paramsString=\"\"}Object.assign(JSONLoader.prototype,{load:function load(url,onLoad,onProgress,onError){var scope=this,texturePath=this.texturePath&&\"string\"==typeof this.texturePath?this.texturePath:LoaderUtils.extractUrlBase(url),loader=new FileLoader(this.manager),params=url.split(\"?\");this.paramsString=2===url.length?paramsStrings[1]:\"\",loader.setWithCredentials(this.withCredentials),loader.load(url,function(text){var json=JSON.parse(text),metadata=json.metadata;if(metadata!==void 0){var type=metadata.type;if(type!==void 0&&\"object\"===type.toLowerCase())return void console.error(\"THREE.JSONLoader: \"+url+\" should be loaded with THREE.ObjectLoader instead.\")}if(scope&&scope.parse){var object=scope.parse(json,texturePath);onLoad(object.geometry,object.materials)}},onProgress,onError)},setTexturePath:function setTexturePath(value){this.texturePath=value},parse:function(){function parseModel(json,geometry){function isBitSet(value,position){return value&1<<position}var i,j,fi,offset,zLength,colorIndex,normalIndex,uvIndex,materialIndex,type,isQuad,hasMaterial,hasFaceVertexUv,hasFaceNormal,hasFaceVertexNormal,hasFaceColor,hasFaceVertexColor,vertex,face,faceA,faceB,hex,normal,uvLayer,uv,u,v,faces=json.faces,vertices=json.vertices,normals=json.normals,colors=json.colors,scale=json.scale,nUvLayers=0;if(void 0!==json.uvs){// disregard empty arrays\nfor(i=0;i<json.uvs.length;i++)json.uvs[i].length&&nUvLayers++;for(i=0;i<nUvLayers;i++)geometry.faceVertexUvs[i]=[]}for(offset=0,zLength=vertices.length;offset<zLength;)vertex=new Vector3,vertex.x=vertices[offset++]*scale,vertex.y=vertices[offset++]*scale,vertex.z=vertices[offset++]*scale,geometry.vertices.push(vertex);if(offset=0,zLength=faces.length,json.uvs)for(i=0;i<json.uvs.length;i++){geometry.uvs[i]=[];for(var k=0;k<json.uvs[i].length;k++)geometry.uvs[i][k]=json.uvs[i][k]}if(normals)for(i=0;i<normals.length;i++)geometry.normals[i]=normals[i];if(colors)for(i=0;i<colors.length;i++)geometry.colors[i]=colors[i];for(;offset<zLength;)// console.log(\"type\", type, \"bits\", isQuad, hasMaterial, hasFaceVertexUv, hasFaceNormal, hasFaceVertexNormal, hasFaceColor, hasFaceVertexColor);\nif(type=faces[offset++],isQuad=isBitSet(type,0),hasMaterial=isBitSet(type,1),hasFaceVertexUv=isBitSet(type,3),hasFaceNormal=isBitSet(type,4),hasFaceVertexNormal=isBitSet(type,5),hasFaceColor=isBitSet(type,6),hasFaceVertexColor=isBitSet(type,7),isQuad){if(faceA=new Face3,faceA.a=faces[offset],faceA.b=faces[offset+1],faceA.c=faces[offset+3],faceB=new Face3,faceB.a=faces[offset+1],faceB.b=faces[offset+2],faceB.c=faces[offset+3],offset+=4,hasMaterial&&(materialIndex=faces[offset++],faceA.materialIndex=materialIndex,faceB.materialIndex=materialIndex),fi=geometry.faces.length,hasFaceVertexUv)for(i=0;i<nUvLayers;i++)for(uvLayer=json.uvs[i],geometry.faceVertexUvs[i][fi]=[],geometry.faceVertexUvs[i][fi+1]=[],j=0;4>j;j++)uvIndex=faces[offset++],u=uvLayer[2*uvIndex],v=uvLayer[2*uvIndex+1],uv=new Vector2(u,v),2!==j&&geometry.faceVertexUvs[i][fi].push(uv),0!==j&&geometry.faceVertexUvs[i][fi+1].push(uv);if(hasFaceNormal&&(normalIndex=3*faces[offset++],faceA.normal.set(normals[normalIndex++],normals[normalIndex++],normals[normalIndex]),faceB.normal.copy(faceA.normal)),hasFaceVertexNormal)for(i=0;4>i;i++)normalIndex=3*faces[offset++],normal=new Vector3(normals[normalIndex++],normals[normalIndex++],normals[normalIndex]),2!==i&&faceA.vertexNormals.push(normal),0!==i&&faceB.vertexNormals.push(normal);if(hasFaceColor&&(colorIndex=faces[offset++],hex=colors[colorIndex],faceA.color.setHex(hex),faceB.color.setHex(hex)),hasFaceVertexColor)for(i=0;4>i;i++)colorIndex=faces[offset++],hex=colors[colorIndex],2!==i&&faceA.vertexColors.push(new Color(hex)),0!==i&&faceB.vertexColors.push(new Color(hex));geometry.faces.push(faceA),geometry.faces.push(faceB)}else{if(face=new Face3,face.a=faces[offset++],face.b=faces[offset++],face.c=faces[offset++],hasMaterial&&(materialIndex=faces[offset++],face.materialIndex=materialIndex),fi=geometry.faces.length,hasFaceVertexUv)for(i=0;i<nUvLayers;i++)for(uvLayer=json.uvs[i],geometry.faceVertexUvs[i][fi]=[],j=0;3>j;j++)uvIndex=faces[offset++],u=uvLayer[2*uvIndex],v=uvLayer[2*uvIndex+1],uv=new Vector2(u,v),geometry.faceVertexUvs[i][fi].push(uv);if(hasFaceNormal&&(normalIndex=3*faces[offset++],face.normal.set(normals[normalIndex++],normals[normalIndex++],normals[normalIndex])),hasFaceVertexNormal)for(i=0;3>i;i++)normalIndex=3*faces[offset++],normal=new Vector3(normals[normalIndex++],normals[normalIndex++],normals[normalIndex]),face.vertexNormals.push(normal);if(hasFaceColor&&(colorIndex=faces[offset++],face.color.setHex(colors[colorIndex])),hasFaceVertexColor)for(i=0;3>i;i++)colorIndex=faces[offset++],face.vertexColors.push(new Color(colors[colorIndex]));geometry.faces.push(face)}}function parseSkin(json,geometry){var influencesPerVertex=json.influencesPerVertex===void 0?2:json.influencesPerVertex;if(json.skinWeights)for(var i=0,l=json.skinWeights.length;i<l;i+=influencesPerVertex){var x=json.skinWeights[i],y=1<influencesPerVertex?json.skinWeights[i+1]:0,z=2<influencesPerVertex?json.skinWeights[i+2]:0,w=3<influencesPerVertex?json.skinWeights[i+3]:0;geometry.skinWeights.push(new Vector4(x,y,z,w))}if(json.skinIndices)for(var i=0,l=json.skinIndices.length;i<l;i+=influencesPerVertex){var a=json.skinIndices[i],b=1<influencesPerVertex?json.skinIndices[i+1]:0,c=2<influencesPerVertex?json.skinIndices[i+2]:0,d=3<influencesPerVertex?json.skinIndices[i+3]:0;geometry.skinIndices.push(new Vector4(a,b,c,d))}geometry.bones=json.bones,geometry.bones&&0<geometry.bones.length&&(geometry.skinWeights.length!==geometry.skinIndices.length||geometry.skinIndices.length!==geometry.vertices.length)&&console.warn(\"When skinning, number of vertices (\"+geometry.vertices.length+\"), skinIndices (\"+geometry.skinIndices.length+\"), and skinWeights (\"+geometry.skinWeights.length+\") should match.\")}function parseMorphing(json,geometry){var scale=json.scale;if(json.morphTargets!==void 0)for(var i=0,l=json.morphTargets.length;i<l;i++){geometry.morphTargets[i]={},geometry.morphTargets[i].name=json.morphTargets[i].name,geometry.morphTargets[i].vertices=[];for(var vertex,dstVertices=geometry.morphTargets[i].vertices,srcVertices=json.morphTargets[i].vertices,v=0,vl=srcVertices.length;v<vl;v+=3)vertex=new Vector3,vertex.x=srcVertices[v]*scale,vertex.y=srcVertices[v+1]*scale,vertex.z=srcVertices[v+2]*scale,dstVertices.push(vertex)}if(void 0!==json.morphNormals)for(var i=0,l=json.morphNormals.length;i<l;i++)if(geometry.morphTargets[i]){geometry.morphTargets[i].normals=[];for(var normals,dstNormals=geometry.morphTargets[i].normals,srcNormals=json.morphNormals[i].normals,v=0,vl=srcNormals.length;v<vl;v+=3)normals=new Vector3,normals.x=srcNormals[v],normals.y=srcNormals[v+1],normals.z=srcNormals[v+2],dstNormals.push(normals);geometry.morphNormalsReady=!0}if(void 0!==json.morphColors){var i,l,c,cl,dstColors,srcColors,color;for(i=0,l=json.morphColors.length;i<l;i++)for(geometry.morphColors[i]={},geometry.morphColors[i].name=json.morphColors[i].name,geometry.morphColors[i].colors=[],dstColors=geometry.morphColors[i].colors,srcColors=json.morphColors[i].colors,(c=0,cl=srcColors.length);c<cl;c+=3)color=new THREE.Color(16755200),color.setRGB(srcColors[c],srcColors[c+1],srcColors[c+2]),dstColors.push(color)}}function parseAnimations(json,geometry){var outputAnimations=[],animations=[];// parse old style Bone/Hierarchy animations\njson.animation!==void 0&&animations.push(json.animation),json.animations!==void 0&&(json.animations.length?animations=animations.concat(json.animations):animations.push(json.animations));for(var clip,i=0;i<animations.length;i++)clip=AnimationClip.parseAnimation(animations[i],geometry.bones),clip&&outputAnimations.push(clip);// parse implicit morph animations\nif(geometry.morphTargets){// TODO: Figure out what an appropraite FPS is for morph target animations -- defaulting to 10, but really it is completely arbitrary.\nvar morphAnimationClips=AnimationClip.CreateClipsFromMorphTargetSequences(geometry.morphTargets,10);outputAnimations=outputAnimations.concat(morphAnimationClips)}0<outputAnimations.length&&(geometry.animations=outputAnimations)}return function(json,texturePath){void 0!==json.data&&(json=json.data),json.scale=void 0===json.scale?1:1/json.scale;var geometry=new Geometry;if(geometry.morphColors=[],parseModel(json,geometry),parseSkin(json,geometry),parseMorphing(json,geometry),parseAnimations(json,geometry),geometry.computeFaceNormals(),geometry.computeBoundingSphere(),void 0===json.materials||0===json.materials.length)return{geometry:geometry};var materials=Loader.prototype.initMaterials(json.materials,texturePath,\"Anonymous\");if(json.materials[0].video){var fullPath=texturePath+json.materials[0].video;this.paramsString&&(fullPath+=\"?\".concat(this.paramsString));var videoHandler=new VideoHandler(fullPath);geometry._video=videoHandler}return materials&&0<materials.length&&(materials[0].side=json.materials[0].singleSided?THREE.FrontSide:json.materials[0].flipSided?THREE.BackSide:THREE.DoubleSide,json.materials[0].specularCoef&&(materials[0].shininess=Math.floor(json.materials[0].specularCoef/3))),{geometry:geometry,materials:materials}}}()});\n\n/***/ }),\n/* 16 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Loader\", function() { return Loader; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar THREE=__webpack_require__(3);/**\n * @author alteredq / http://alteredqualia.com/\n */function Loader(){}Loader.Handlers={handlers:[],add:function add(regex,loader){this.handlers.push(regex,loader)},get:function get(file){for(var handlers=this.handlers,i=0,l=handlers.length;i<l;i+=2){var regex=handlers[i],loader=handlers[i+1];if(regex.test(file))return loader}return null}},Object.assign(Loader.prototype,{crossOrigin:\"anonymous\",onLoadStart:function onLoadStart(){},onLoadProgress:function onLoadProgress(){},onLoadComplete:function onLoadComplete(){},initMaterials:function initMaterials(materials,texturePath,crossOrigin){for(var array=[],i=0;i<materials.length;++i)array[i]=this.createMaterial(materials[i],texturePath,crossOrigin);return array},createMaterial:function(){var BlendingMode={NoBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"NoBlending\"],NormalBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"NormalBlending\"],AdditiveBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"AdditiveBlending\"],SubtractiveBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"SubtractiveBlending\"],MultiplyBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"MultiplyBlending\"],CustomBlending:three__WEBPACK_IMPORTED_MODULE_0__[\"CustomBlending\"]},color=new three__WEBPACK_IMPORTED_MODULE_0__[\"Color\"],textureLoader=new three__WEBPACK_IMPORTED_MODULE_0__[\"TextureLoader\"],materialLoader=new three__WEBPACK_IMPORTED_MODULE_0__[\"MaterialLoader\"];return function(m,texturePath,crossOrigin){function loadTexture(path,repeat,offset,wrap,anisotropy){var texture,fullPath=texturePath+path,loader=Loader.Handlers.get(fullPath);null===loader?(textureLoader.setCrossOrigin(crossOrigin),texture=textureLoader.load(fullPath)):texture=loader.load(fullPath),void 0!==repeat&&(texture.repeat.fromArray(repeat),1!==repeat[0]&&(texture.wrapS=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]),1!==repeat[1]&&(texture.wrapT=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"])),void 0!==offset&&texture.offset.fromArray(offset),void 0!==wrap&&(\"repeat\"===wrap[0]&&(texture.wrapS=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]),\"mirror\"===wrap[0]&&(texture.wrapS=three__WEBPACK_IMPORTED_MODULE_0__[\"MirroredRepeatWrapping\"]),\"repeat\"===wrap[1]&&(texture.wrapT=three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]),\"mirror\"===wrap[1]&&(texture.wrapT=three__WEBPACK_IMPORTED_MODULE_0__[\"MirroredRepeatWrapping\"])),void 0!==anisotropy&&(texture.anisotropy=anisotropy);var uuid=three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].generateUUID();return textures[uuid]=texture,uuid}//\n// convert from old material format\nvar textures={},json={uuid:three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].generateUUID(),type:\"MeshLambertMaterial\"};for(var name in m){var value=m[name];switch(name){case\"DbgColor\":case\"DbgIndex\":case\"opticalDensity\":case\"illumination\":break;case\"DbgName\":json.name=value;break;case\"blending\":json.blending=BlendingMode[value];break;case\"colorAmbient\":case\"mapAmbient\":console.warn(\"THREE.Loader.createMaterial:\",name,\"is no longer supported.\");break;case\"colorDiffuse\":json.color=color.fromArray(value).getHex();break;case\"colorSpecular\":json.specular=color.fromArray(value).getHex();break;case\"colorEmissive\":json.emissive=color.fromArray(value).getHex();break;case\"specularCoef\":json.shininess=value;break;case\"shading\":\"basic\"===value.toLowerCase()&&(json.type=\"MeshBasicMaterial\"),\"phong\"===value.toLowerCase()&&(json.type=\"MeshPhongMaterial\"),\"standard\"===value.toLowerCase()&&(json.type=\"MeshStandardMaterial\");break;case\"mapDiffuse\":json.map=loadTexture(value,m.mapDiffuseRepeat,m.mapDiffuseOffset,m.mapDiffuseWrap,m.mapDiffuseAnisotropy);break;case\"mapDiffuseRepeat\":case\"mapDiffuseOffset\":case\"mapDiffuseWrap\":case\"mapDiffuseAnisotropy\":break;case\"mapEmissive\":json.emissiveMap=loadTexture(value,m.mapEmissiveRepeat,m.mapEmissiveOffset,m.mapEmissiveWrap,m.mapEmissiveAnisotropy);break;case\"mapEmissiveRepeat\":case\"mapEmissiveOffset\":case\"mapEmissiveWrap\":case\"mapEmissiveAnisotropy\":break;case\"mapLight\":json.lightMap=loadTexture(value,m.mapLightRepeat,m.mapLightOffset,m.mapLightWrap,m.mapLightAnisotropy);break;case\"mapLightRepeat\":case\"mapLightOffset\":case\"mapLightWrap\":case\"mapLightAnisotropy\":break;case\"mapAO\":json.aoMap=loadTexture(value,m.mapAORepeat,m.mapAOOffset,m.mapAOWrap,m.mapAOAnisotropy);break;case\"mapAORepeat\":case\"mapAOOffset\":case\"mapAOWrap\":case\"mapAOAnisotropy\":break;case\"mapBump\":json.bumpMap=loadTexture(value,m.mapBumpRepeat,m.mapBumpOffset,m.mapBumpWrap,m.mapBumpAnisotropy);break;case\"mapBumpScale\":json.bumpScale=value;break;case\"mapBumpRepeat\":case\"mapBumpOffset\":case\"mapBumpWrap\":case\"mapBumpAnisotropy\":break;case\"mapNormal\":json.normalMap=loadTexture(value,m.mapNormalRepeat,m.mapNormalOffset,m.mapNormalWrap,m.mapNormalAnisotropy);break;case\"mapNormalFactor\":json.normalScale=value;break;case\"mapNormalRepeat\":case\"mapNormalOffset\":case\"mapNormalWrap\":case\"mapNormalAnisotropy\":break;case\"mapSpecular\":json.specularMap=loadTexture(value,m.mapSpecularRepeat,m.mapSpecularOffset,m.mapSpecularWrap,m.mapSpecularAnisotropy);break;case\"mapSpecularRepeat\":case\"mapSpecularOffset\":case\"mapSpecularWrap\":case\"mapSpecularAnisotropy\":break;case\"mapMetalness\":json.metalnessMap=loadTexture(value,m.mapMetalnessRepeat,m.mapMetalnessOffset,m.mapMetalnessWrap,m.mapMetalnessAnisotropy);break;case\"mapMetalnessRepeat\":case\"mapMetalnessOffset\":case\"mapMetalnessWrap\":case\"mapMetalnessAnisotropy\":break;case\"mapRoughness\":json.roughnessMap=loadTexture(value,m.mapRoughnessRepeat,m.mapRoughnessOffset,m.mapRoughnessWrap,m.mapRoughnessAnisotropy);break;case\"mapRoughnessRepeat\":case\"mapRoughnessOffset\":case\"mapRoughnessWrap\":case\"mapRoughnessAnisotropy\":break;case\"mapAlpha\":json.alphaMap=loadTexture(value,m.mapAlphaRepeat,m.mapAlphaOffset,m.mapAlphaWrap,m.mapAlphaAnisotropy);break;case\"mapAlphaRepeat\":case\"mapAlphaOffset\":case\"mapAlphaWrap\":case\"mapAlphaAnisotropy\":break;case\"flipSided\":json.side=three__WEBPACK_IMPORTED_MODULE_0__[\"BackSide\"];break;case\"doubleSided\":json.side=three__WEBPACK_IMPORTED_MODULE_0__[\"DoubleSide\"];break;case\"transparency\":console.warn(\"THREE.Loader.createMaterial: transparency has been renamed to opacity\"),json.opacity=value;break;case\"depthTest\":case\"depthWrite\":case\"colorWrite\":case\"opacity\":case\"reflectivity\":case\"transparent\":case\"visible\":case\"wireframe\":json[name]=value;break;case\"vertexColors\":!0===value&&(json.vertexColors=three__WEBPACK_IMPORTED_MODULE_0__[\"VertexColors\"]),\"face\"===value&&(json.vertexColors=three__WEBPACK_IMPORTED_MODULE_0__[\"FaceColors\"]);break;default:console.error(\"THREE.Loader.createMaterial: Unsupported\",name,value);}}return\"MeshBasicMaterial\"===json.type&&delete json.emissive,\"MeshPhongMaterial\"!==json.type&&delete json.specular,1>json.opacity&&(json.transparent=!0),materialLoader.setTextures(textures),materialLoader.parse(json)}}()});\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3);/**\n * Provide basic functionality to display video as texture.\n * VideoTexture is used for creating and updating a video projected onto a Three.js texture\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {VideoHandler}\n */exports.VideoHandler=function(srcIn){var _this=this;this.video=void 0,this.videoTexture=void 0;var lastPlayPos=0,currentPlayPos=0,bufferingDetected=!1;// videoPlaneLoaded connects the video to the video texture once it has loaded\n//this should be handle by scene... check the sync at \nthis.setMorphTime=function(time,duration){var actualTime=time/duration*_this.video.duration;_this.video.currentTime=actualTime},this.getVideoDuration=function(){return _this.video.duration},this.createCanvasVideoTexture=function(){return _this.videoTexture=new THREE.VideoTexture(_this.video),_this.videoTexture.minFilter=THREE.LinearFilter,_this.videoTexture.magFilter=THREE.LinearFilter,_this.videoTexture.format=THREE.RGBFormat,_this.video.currentTime=0,_this.videoTexture},this.getCurrentTime=function(duration){return _this.video?duration*(_this.video.currentTime/_this.video.duration):0},this.isReadyToPlay=function(){// video.readyState 3 means we have data to load for the current time and foreseeable future\nreturn!!(_this.video&&3<=_this.video.readyState)},function initialise(){document&&(_this.video=document.createElement(\"video\"),_this.video.crossOrigin=\"anonymous\",_this.video.src=srcIn,_this.video.load(),_this.video.loop=!0)}()};\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),Points=__webpack_require__(19).Points,toBufferGeometry=__webpack_require__(4).toBufferGeometry,Pointset=function(){__webpack_require__(7).ZincObject.call(this),this.isPointset=!0;/** Shape of the points is created using the function below */var getCircularTexture=()=>{var image=new Image;image.src=__webpack_require__(20);var texture=new THREE.Texture;return texture.image=image,texture.needsUpdate=!0,texture};/**\n * Create the pointsets using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of points to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */ /**\n * Set the size of the points.\n * \n * @param {Number} size - size to be set.\n */ /**\n * Turn size attenuation on/off based on the flag.\n * \n * @param {Boolean} flag - Determin either size attenuation\n * should be on or off.\n */this.createMesh=(geometryIn,materialIn,options)=>{if(geometryIn&&materialIn){var geometry=toBufferGeometry(geometryIn,options),texture=getCircularTexture();materialIn.map=texture;var point=new Points(geometry,materialIn);this.setMesh(point,options.localTimeEnabled,options.localMorphColour)}},this.setSize=size=>{this.morph&&this.morph.material&&(this.morph.material.size=size,this.morph.material.needsUpdate=!0)},this.setSizeAttenuation=flag=>{this.morph&&this.morph.material&&(this.morph.material.sizeAttenuation=flag,this.morph.material.needsUpdate=!0)}};Pointset.prototype=Object.create(__webpack_require__(7).ZincObject.prototype),exports.Pointset=Pointset;\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Points\", function() { return Points; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar _inverseMatrix=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],_ray=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Ray\"],_sphere=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Sphere\"],_position=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_morphA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_tempA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];class Points extends three__WEBPACK_IMPORTED_MODULE_0__[\"Object3D\"]{constructor(){var geometry=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],material=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"];super(),this.type=\"Points\",this.geometry=geometry,this.material=material,this.updateMorphTargets()}copy(source){return super.copy(source),this.material=source.material,this.geometry=source.geometry,this}raycast(raycaster,intersects){var geometry=this.geometry,matrixWorld=this.matrixWorld,threshold=raycaster.params.Points.threshold,drawRange=geometry.drawRange;if(null===geometry.boundingSphere&&geometry.computeBoundingSphere(),_sphere.copy(geometry.boundingSphere),_sphere.applyMatrix4(matrixWorld),_sphere.radius+=threshold,!1!==raycaster.ray.intersectsSphere(_sphere)){_inverseMatrix.copy(matrixWorld).invert(),_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);var localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3),localThresholdSq=localThreshold*localThreshold;if(geometry.isBufferGeometry){var index=geometry.index,attributes=geometry.attributes,positionAttribute=attributes.position,morphPosition=geometry.morphAttributes.position;if(null!==index)for(var a,start=Math.max(0,drawRange.start),end=Math.min(index.count,drawRange.start+drawRange.count),i=start;i<end;i++)a=index.getX(i),calculatePosition(this,positionAttribute,morphPosition,a),testPoint(_position,a,localThresholdSq,matrixWorld,raycaster,intersects,this);else for(var _start=Math.max(0,drawRange.start),_end=Math.min(positionAttribute.count,drawRange.start+drawRange.count),_i=_start;_i<_end;_i++)calculatePosition(this,positionAttribute,morphPosition,_i),testPoint(_position,_i,localThresholdSq,matrixWorld,raycaster,intersects,this)}else console.error(\"THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\")}//\n}updateMorphTargets(){var geometry=this.geometry;if(geometry.isBufferGeometry){var morphAttributes=geometry.morphAttributes,keys=Object.keys(morphAttributes);if(0<keys.length){var morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var name,m=0,ml=morphAttribute.length;m<ml;m++)name=morphAttribute[m].name||m+\"\",this.morphTargetInfluences.push(0),this.morphTargetDictionary[name]=m}}}else{var morphTargets=geometry.morphTargets;morphTargets!==void 0&&0<morphTargets.length&&console.error(\"THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.\")}}}Points.prototype.isPoints=!0;function testPoint(point,index,localThresholdSq,matrixWorld,raycaster,intersects,object){var rayPointDistanceSq=_ray.distanceSqToPoint(point);if(rayPointDistanceSq<localThresholdSq){var intersectPoint=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];_ray.closestPointToPoint(point,intersectPoint),intersectPoint.applyMatrix4(matrixWorld);var distance=raycaster.ray.origin.distanceTo(intersectPoint);if(distance<raycaster.near||distance>raycaster.far)return;intersects.push({distance:distance,distanceToRay:Math.sqrt(rayPointDistanceSq),point:intersectPoint,index:index,face:null,object:object})}}function calculatePosition(object,position,morphPosition,a){_position.fromBufferAttribute(position,a);var morphInfluences=object.morphTargetInfluences;if(object.material.morphTargets&&morphPosition&&morphInfluences){_morphA.set(0,0,0);for(var i=0,il=morphPosition.length;i<il;i++){var influence=morphInfluences[i],morphAttribute=morphPosition[i];0===influence||(_tempA.fromBufferAttribute(morphAttribute,a),_morphA.addScaledVector(_tempA.sub(_position),influence))}_position.add(_morphA)}}\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports) {\n\nmodule.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sHDgwCEMBJZu0AAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAABM5JREFUWMO1V0tPG2cUPZ4Hxh6DazIOrjFNqJs0FIMqWFgWQkatsmvVbtggKlSVRVf5AWz4AWz4AUSKEChll19QJYSXkECuhFxsHjEhxCYm+DWGMZ5HF72DJq4bAzFXurI0M/I5997v3u9cC65vTJVn2lX/xHINQOYSBLTLEuIuCWw4Z3IGAEvf6ASmVHjNzHCXBG4A0AjACsAOwEbO0nsFQBnAGYASAIl+ZRMR7SolMEdsByD09fV5R0ZGgg8ePPjW5/N1iqLYpuu6RZblciKR2I9Go69evnwZnZ+fjwI4IS8AKBIRzeQfJWCANwKwh0KhtrGxsYehUOin1tbW+zzP23ietzY2NnIAoGmaLsuyUiqVyvl8XtrY2NiamZn589mzZxsAUgCOAeQAnFI2tI+VxIjaAeDzoaGh7xYWFuZOTk6OZVk+12uYqqq6JEnn0Wg0OT4+/geAXwGEAdwDIFJQXC1wO4DWR48e/RCPxxclSSroVzRFUbSDg4P848ePFwH8DuAhkWih83TRQWxFOXgAwvDwcOfo6OhvXV1d39tsNtuVBwTDWBwOh1UUxVsMw1hXVlbSdCgNV43uYSvrHg6H24aHh38eHBz85TrgF9FYLHA4HLzH43FvbW2d7u/vG+dANp8FpqIlbd3d3V8Fg8EfBUFw4BONZVmL3+9vHhkZCQL4AoAHgJPK8G+yzC0XDofdoVAo5PP5vkadTBAEtr+/39ff3x8gAp/RPOEqx2qjx+NpvXv3bk9DQ0NDvQgwDIOWlhZrMBj8kgi0UJdxRgYMArzL5XJ7vd57qLPZ7Xamp6fnNgBXtQxcjFuHw+Hyer3t9SYgCAITCAScAJoBNNEY/08GOFVVrfVMv7kMNDntFD1vjIAPrlRN0xjckOm6biFQ3jwNPwDMZrOnqVTqfb3Bi8Wivru7W/VCYkwPlKOjo0IikXh7EwQikYgE4Nw0CfXKDCipVCoTj8df3QABbW1tLUc6oUgkFPMkVACUNjc337148eKvw8PDbJ2jP1taWkoCyNDVXDSECmNSK4qiKNLq6urW8+fPI/UicHx8rD59+jSVy+WOAKSJhKENwFItLtoxk8mwsixzHR0dHe3t7c5PAU+n09rs7OzJkydPYqVSaQfANoDXALIk31S2smU1TWMPDg7K5XKZ7+3t9TudTut1U7+wsFCcmJiIpdPpbQBxADsAknQWymYCOukBHYCuKApisdhpMpnURFEU79y503TVyKenpzOTk5M7e3t7MQKPV0Zv1gNm+awB0MvlshqLxfLb29uyJElWURSbXC4XXyvqxcXFs6mpqeTc3Nzu3t7e3wQcA7BPZ8Cov1pNlJplmQtAG8MwHV6v95tAINA5MDBwPxAIuLu6upr8fr/VAN3c3JQjkcjZ+vp6fnl5+d2bN29SuVzuNYAEpf01CdRChUL+X1VskHACuA3Ay3Fcu9vt7nA6nZ7m5uYWQRCaNE3jVVW15PP580KhIGUymWw2m00DOAJwSP4WwPtq4LX2Ao6USxNlQyS/RcQcdLGwlNIz6vEMAaZpNzCk2Pll94LK/cDYimxERiBwG10sxjgvEZBE0UpE6vxj+0Ct5bTaXthgEhRmja8QWNkkPGsuIpfdjpkK+cZUWTC0KredVmtD/gdlSl6EG4AMvQAAAABJRU5ErkJggg==\"\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),toBufferGeometry=__webpack_require__(4).toBufferGeometry,Lines=function(){/**\n * Create the line segements using geometry and material.\n * \n * @param {THREE.Geomtry} geometryIn - Geometry of lines to be rendered.\n * @param {THREE.Material} materialIn - Material to be set for the lines.\n * @param {Object} options - Provide various options\n * @param {Boolean} options.localTimeEnabled - A flag to indicate either the lines is\n * time dependent.\n * @param {Boolean} options.localMorphColour - A flag to indicate either the colour is\n * time dependent.\n */ /**\n * Set the width for the lines.\n * \n * @param {Number} width - Width of the lines.\n */__webpack_require__(7).ZincObject.call(this),this.isLines=!0,this.createLineSegment=(geometryIn,materialIn,options)=>{if(geometryIn&&materialIn){var geometry=toBufferGeometry(geometryIn,options);options.localMorphColour&&geometry.morphAttributes.color&&(materialIn.onBeforeCompile=__webpack_require__(6).augmentMorphColor());var line=new(__webpack_require__(22).LineSegments)(geometry,materialIn);this.setMesh(line,options.localTimeEnabled,options.localMorphColour)}},this.setWidth=width=>{this.morph&&this.morph.material&&(this.morph.material.linewidth=width,this.morph.material.needsUpdate=!0)}};Lines.prototype=Object.create(__webpack_require__(7).ZincObject.prototype),exports.Lines=Lines;\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"LineSegments\", function() { return LineSegments; });\n/* harmony import */ var _Line_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(23);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_1__);\nvar _start=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"],_end=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_1__[\"Vector3\"];class LineSegments extends _Line_js__WEBPACK_IMPORTED_MODULE_0__[\"Line\"]{constructor(geometry,material){super(geometry,material),this.type=\"LineSegments\"}computeLineDistances(){var geometry=this.geometry;if(!geometry.isBufferGeometry)geometry.isGeometry&&console.error(\"THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\");else// we assume non-indexed geometry\nif(null===geometry.index){for(var positionAttribute=geometry.attributes.position,lineDistances=[],i=0,l=positionAttribute.count;i<l;i+=2)_start.fromBufferAttribute(positionAttribute,i),_end.fromBufferAttribute(positionAttribute,i+1),lineDistances[i]=0==i?0:lineDistances[i-1],lineDistances[i+1]=lineDistances[i]+_start.distanceTo(_end);geometry.setAttribute(\"lineDistance\",new three__WEBPACK_IMPORTED_MODULE_1__[\"Float32BufferAttribute\"](lineDistances,1))}else console.warn(\"THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}}LineSegments.prototype.isLineSegments=!0;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Line\", function() { return Line; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nvar _start=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_end=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_inverseMatrix=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],_ray=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Ray\"],_sphere=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Sphere\"],_morphA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_morphB=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_tempA=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_tempB=/*@__PURE__*/new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];class Line extends three__WEBPACK_IMPORTED_MODULE_0__[\"Object3D\"]{constructor(){var geometry=0<arguments.length&&arguments[0]!==void 0?arguments[0]:new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],material=1<arguments.length&&arguments[1]!==void 0?arguments[1]:new three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"];super(),this.type=\"Line\",this.geometry=geometry,this.material=material,this.updateMorphTargets()}copy(source){return super.copy(source),this.material=source.material,this.geometry=source.geometry,this}computeLineDistances(){var geometry=this.geometry;if(!geometry.isBufferGeometry)geometry.isGeometry&&console.error(\"THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\");else// we assume non-indexed geometry\nif(null===geometry.index){for(var positionAttribute=geometry.attributes.position,lineDistances=[0],i=1,l=positionAttribute.count;i<l;i++)_start.fromBufferAttribute(positionAttribute,i-1),_end.fromBufferAttribute(positionAttribute,i),lineDistances[i]=lineDistances[i-1],lineDistances[i]+=_start.distanceTo(_end);geometry.setAttribute(\"lineDistance\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](lineDistances,1))}else console.warn(\"THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.\");return this}raycast(raycaster,intersects){var geometry=this.geometry,matrixWorld=this.matrixWorld,threshold=raycaster.params.Line.threshold,drawRange=geometry.drawRange,morphPosition=geometry.morphAttributes.position;if(null===geometry.boundingSphere&&geometry.computeBoundingSphere(),_sphere.copy(geometry.boundingSphere),_sphere.applyMatrix4(matrixWorld),_sphere.radius+=threshold,!1!==raycaster.ray.intersectsSphere(_sphere)){_inverseMatrix.copy(matrixWorld).invert(),_ray.copy(raycaster.ray).applyMatrix4(_inverseMatrix);var localThreshold=threshold/((this.scale.x+this.scale.y+this.scale.z)/3),localThresholdSq=localThreshold*localThreshold,vStart=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],vEnd=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],interSegment=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],interRay=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],step=this.isLineSegments?2:1;if(geometry.isBufferGeometry){var index=geometry.index,attributes=geometry.attributes,positionAttribute=attributes.position;if(null!==index)for(var start=Math.max(0,drawRange.start),end=Math.min(index.count,drawRange.start+drawRange.count),i=start;i<end-1;i+=step){var a=index.getX(i),b=index.getX(i+1);calculatePosition(vStart,vEnd,this,positionAttribute,morphPosition,a,b);var distSq=_ray.distanceSqToSegment(vStart,vEnd,interRay,interSegment);if(!(distSq>localThresholdSq)){interRay.applyMatrix4(this.matrixWorld);//Move back to world space for distance calculation\nvar distance=raycaster.ray.origin.distanceTo(interRay);distance<raycaster.near||distance>raycaster.far||intersects.push({distance:distance,// What do we want? intersection point on the ray or on the segment??\n// point: raycaster.ray.at( distance ),\npoint:interSegment.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else for(var _start2=Math.max(0,drawRange.start),_end2=Math.min(positionAttribute.count,drawRange.start+drawRange.count),_i=_start2;_i<_end2-1;_i+=step){calculatePosition(vStart,vEnd,this,positionAttribute,morphPosition,_i,_i+1);var _distSq=_ray.distanceSqToSegment(vStart,vEnd,interRay,interSegment);if(!(_distSq>localThresholdSq)){interRay.applyMatrix4(this.matrixWorld);//Move back to world space for distance calculation\nvar _distance=raycaster.ray.origin.distanceTo(interRay);_distance<raycaster.near||_distance>raycaster.far||intersects.push({distance:_distance,// What do we want? intersection point on the ray or on the segment??\n// point: raycaster.ray.at( distance ),\npoint:interSegment.clone().applyMatrix4(this.matrixWorld),index:_i,face:null,faceIndex:null,object:this})}}}else geometry.isGeometry&&console.error(\"THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.\")}//\n}updateMorphTargets(){var geometry=this.geometry;if(geometry.isBufferGeometry){var morphAttributes=geometry.morphAttributes,keys=Object.keys(morphAttributes);if(0<keys.length){var morphAttribute=morphAttributes[keys[0]];if(morphAttribute!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(var name,m=0,ml=morphAttribute.length;m<ml;m++)name=morphAttribute[m].name||m+\"\",this.morphTargetInfluences.push(0),this.morphTargetDictionary[name]=m}}}else{var morphTargets=geometry.morphTargets;morphTargets!==void 0&&0<morphTargets.length&&console.error(\"THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.\")}}}function calculatePosition(vStart,vEnd,object,position,morphPosition,a,b){vStart.fromBufferAttribute(position,a),vEnd.fromBufferAttribute(position,b);var morphInfluences=object.morphTargetInfluences;if(object.material.morphTargets&&morphPosition&&morphInfluences){_morphA.set(0,0,0),_morphB.set(0,0,0);for(var i=0,il=morphPosition.length;i<il;i++){var influence=morphInfluences[i],morphAttribute=morphPosition[i];0===influence||(_tempA.fromBufferAttribute(morphAttribute,a),_tempB.fromBufferAttribute(morphAttribute,b),_morphA.addScaledVector(_tempA.sub(vStart),influence),_morphB.addScaledVector(_tempB.sub(vEnd),influence))}vStart.add(_morphA),vEnd.add(_morphB)}}Line.prototype.isLine=!0;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"next\",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"throw\",err)}var gen=fn.apply(self,args);_next(void 0)})}}var THREE=__webpack_require__(3),TextureArray=function(){/**\n * Read images from an array containg src locations.\n * \n * @async\n * @param {Array} srcArrays - List of source location of the images.\n */ /**\n * Get and create the material containing shaders and the textures.\n * The texture must be read and ready before calling this function.\n * \n *\n * @param {Object} options - Customise the material with the options object.\n * @param {String} options.fs - string of the fragment shader used for \n * visualisation.\n * @param {String} options.vs - string of the vertex shader used for \n * visualisation.\n * @param {Object} options.uniforms - Containing the data to be passed into the shaders.\n * @param {String} options.glslVersion - Version of glsl used for compile this shader.\n * \n */__webpack_require__(25).Texture.call(this),this.isTextureArray=!0,this.loadFromImages=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(srcArrays){var w=1,h=1,d=0;if(srcArrays&&srcArrays.length){this.isLoading=!0;var image=new Image;image.crossOrigin=\"Anonymous\";for(var data,canvas=document.createElement(\"canvas\"),length=0,dataStacks=Array(srcArrays.length),i=0;i<srcArrays.length;i++)data=yield this.imageToUint8Array(image,srcArrays[i],canvas),data&&data.array&&(w=data.width,h=data.height,dataStacks[d]=data.array,length+=dataStacks[d].length,d++);var fullArray=new Uint8Array(length);length=0,dataStacks.forEach(data=>{fullArray.set(data,length),length+=data.length}),this.impl=new THREE.DataTexture2DArray(fullArray,w,h,d),this.size={width:w,height:h,depth:d},this.isLoading=!1}});return function(){return _ref.apply(this,arguments)}}(),this.getMaterial=function(options){if(this.impl){var material;if(!options)material=new THREE.MeshBasicMaterial({color:new THREE.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:THREE.DoubleSide});else if(options.vs&&options.fs){var transparent=!0;options.transparent&&(transparent=options.transparent);var side=THREE.FrontSide;options.side&&(side=options.side),material=new THREE.ShaderMaterial({transparent,uniforms:options.uniforms,vertexShader:options.vs,fragmentShader:options.fs,side}),options.glslVersion&&(material.glslVersion=options.glslVersion)}if(material)return material.needsUpdate=!0,material}}};/**\n * Texture array object for holding array of images into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {TextureArray}\n */TextureArray.prototype=Object.create(__webpack_require__(25).Texture.prototype),exports.TextureArray=TextureArray;\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\nfunction asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"next\",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,\"throw\",err)}var gen=fn.apply(self,args);_next(void 0)})}}var THREE=__webpack_require__(3),Texture=function(){this.isTexture=!0,this.impl=void 0,this.isLoading=!1,this.size={width:1,height:1,depth:0}};/**\n * Base texture object for importing images and turning them into\n * texures unit that can be used by other texture primitives.\n * \n * @class\n * @author Alan Wu\n * @return {Texture}\n */ /**\n * Read an image from src.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * \n * @return {Promise} img on resolve.\n */ /**\n @typedef IMAGE_UINT8_RETURN\n @type {Set}\n @property {Uint8Array} array - Array containing the uint8 image value.\n @property {Number} width - Phyiscal image width.\n @property {Number} height - Phyiscal image height.\n */ /**\n * Read an image from src and turn it into Uint8Array.\n * \n * @async\n * @param {Image} img - An image object.\n * @param {String} src - Source location of the image.\n * @param {Canvas} canvas - Canvas html element used for the conversion.\n * \n * @return {IMAGE_UNIT8_RETURN}\n */ /**\n * Return true if the texture is ready for consumption.\n * \n * @return {Boolean}\n */ /**\n * Return true if the texture is ready for consumption, otherwise false.\n * \n * @return {Boolean}\n */Texture.prototype.loadImage=function(img,src){return new Promise((resolve,reject)=>{img.onload=()=>resolve(img),img.onerror=reject,img.src=src})},Texture.prototype.imageToUint8Array=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(img,src,canvas){yield this.loadImage(img,src),canvas.width=img.width,canvas.height=img.height;var ctx=canvas.getContext(\"2d\");return ctx.drawImage(img,0,0),{array:new Uint8Array(ctx.getImageData(0,0,canvas.width,canvas.height).data.buffer),width:canvas.width,height:canvas.height}});return function(){return _ref.apply(this,arguments)}}(),Texture.prototype.loadFromImages=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(){});return function(){return _ref2.apply(this,arguments)}}(),Texture.prototype.isReady=function(){return!(!this.impl||this.isLoading)},Texture.prototype.getMaterial=function(){if(this.impl)return new THREE.MeshBasicMaterial({color:new THREE.Color(1,1,1),transparent:!1,opacity:1,map:this.impl,side:THREE.DoubleSide})},exports.Texture=Texture;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),shader=__webpack_require__(27),TextureSlides=function(textureIn){__webpack_require__(28).TexturePrimitive.call(this,textureIn),this.isTextureSlides=!0;var textureSettings=[],idTextureMap={};this.setMorph(new THREE.Group),this.morph.userData=this;/**\n @typedef SLIDE_SETTINGS\n @type {Set}\n @property {String} direction - the value must be x, y or z, specify the\n direction the slide should be facing.\n @property {Number} value - Normalised value of the location on direction.\n @property {String} id - ID of the mesh, it is only available if the settings\n is returned from {@link TextureSlides.createSlide} or \n {@link TextureSlides.getTextureSettings}.\n */ /**\n * Create the slides required for visualisation based on the slide settings.\n * The slides themselves are {THREE.PlanGeometry} objects.\n * \n * @param {SLIDE_SETTINGS} slideSettings - An array to each slide settings.\n */ /**\n * Set the value of the uniforms for a specific mesh in this\n * texture slide object.\n *\n * @param {THREE.Mesh} mesh - Mesh to be modified\n * @param {SLIDE_SETTINGS} slideSettings - Slide settings.\n */ /**\n * Modify the mesh based on a setting\n *\n * @param {SLIDE_SETTINGS} settings - s.\n */ /**\n * Create a slide required for visualisation based on the slide settings.\n * The slide itself is an {THREE.PlanGeometry} object.\n *\n * @param {SLIDE_SETTINGS} settings -settings of the slide to be created.\n * @return {SLIDE_SETTINGS} - Returned settings, it includes the newly\n * created mesh's id.\n */ /**\n * Return a copy of texture settings used by this object.\n *\n * @return {SLIDE_SETTINGS} - Returned the list of settings..\n */ /**\n * Get the array of slides, return them in an array\n *\n * @return {Array} - Return an array of {@link THREE.Object)\n */ /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Slide} slide - Slide to be remvoed\n */ /**\n * Remove a slide, this will dispose the slide and its material.\n *\n * @param {Number} id - id of slide to be remvoed\n */ /**\n * Clean up all internal objects.\n */ /**\n * Get the bounding box of this slides.\n * It uses the max and min of the slides position and the\n * transformation to calculate the position of the box.\n * \n * @return {THREE.Box3}.\n */this.createSlides=slideSettings=>{slideSettings.forEach(slide=>this.createSlide(slide))},setUniformSlideSettingsOfMesh=(mesh,settings)=>{var material=mesh.material,uniforms=material.uniforms;switch(settings.direction){case\"x\":uniforms.direction.value=1,uniforms.slide.value.set(settings.value,0,0);break;case\"y\":uniforms.direction.value=2,uniforms.slide.value.set(0,settings.value,0);break;case\"z\":uniforms.direction.value=3,uniforms.slide.value.set(0,0,settings.value);break;default:}material.needsUpdate=!0,this.boundingBoxUpdateRequired=!0},this.modifySlideSettings=settings=>{settings&&settings.id&&settings.id in idTextureMap&&idTextureMap[settings.id]&&setUniformSlideSettingsOfMesh(idTextureMap[settings.id],settings)},this.createSlide=settings=>{if(this.texture&&this.texture.isTextureArray&&this.texture.isReady()&&settings&&settings.direction&&void 0!==settings.value){var geometry=new THREE.PlaneGeometry(1,1);geometry.translate(.5,.5,0);var uniforms=shader.getUniforms();uniforms.diffuse.value=this.texture.impl,uniforms.depth.value=this.texture.size.depth;var options={fs:shader.fs,vs:shader.vs,uniforms:uniforms,glslVersion:shader.glslVersion,side:THREE.DoubleSide,transparent:!1},material=this.texture.getMaterial(options);material.needsUpdate=!0;var mesh=new THREE.Mesh(geometry,material),slideSettings={value:settings.value,direction:settings.direction,id:mesh.id};return textureSettings.push(slideSettings),setUniformSlideSettingsOfMesh(mesh,slideSettings),idTextureMap[mesh.id]=mesh,this.morph.add(mesh),slideSettings}},this.getTextureSettings=()=>[...textureSettings],this.getSlides=()=>this.morph?[...this.morph.children]:[],this.removeSlide=slide=>{slide&&this.removeSlideWithId(slide.id)},this.removeSlideWithId=id=>{if(this.morph&&id in idTextureMap&&idTextureMap[id]){if(this.morph.getObjectById(id)){var slide=idTextureMap[id];this.morph.remove(slide),slide.clear(),slide.geometry&&slide.geometry.dispose(),slide.material&&slide.material.dispose(),this.boundingBoxUpdateRequired=!0}var index=textureSettings.findIndex(item=>item.id===id);-1<index&&textureSettings.splice(index)}},this.dispose=()=>{this.morph.children.forEach(slide=>{slide.geometry&&slide.geometry.dispose(),slide.material&&slide.material.dispose()}),__webpack_require__(28).TexturePrimitive.prototype.dispose.call(this),this.boundingBoxUpdateRequired=!0},this.getBoundingBox=function(){return this.morph&&this.morph.children&&this.morph.visible&&this.boundingBoxUpdateRequired&&(this.cachedBoundingBox.makeEmpty(),this.morph.children.forEach(slide=>{var value=slide.material.uniforms.slide.value;this.cachedBoundingBox.expandByPoint(value)}),this.morph.updateWorldMatrix(),this.cachedBoundingBox.applyMatrix4(this.morph.matrixWorld),this.boundingBoxUpdateRequired=!1),this.cachedBoundingBox}};TextureSlides.prototype=Object.create(__webpack_require__(28).TexturePrimitive.prototype),exports.TextureSlides=TextureSlides;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),glslVersion=THREE.GLSL3,fs=\"\\nprecision highp float;\\nprecision highp int;\\nprecision highp sampler2DArray;\\n\\nuniform sampler2DArray diffuse;\\nin vec3 vUw;\\n\\nout vec4 outColor;\\n\\nvoid main() {\\n\\n vec4 color = texture( diffuse, vUw );\\n\\n // lighten a bit\\n outColor = vec4( color.rgb + .2, 1.0 );\\n\\n}\\n\",vs=\"\\nout vec3 vUw;\\nuniform float depth;\\nuniform vec3 slide;\\nuniform int direction;\\n\\nvoid main() {\\n\\n vec3 slidePos = position.xyz;\\n\\n if (direction == 1)\\n slidePos = vec3(slide.x, position.x, position.y);\\n if (direction == 2)\\n slidePos = vec3(position.x, slide.y, position.y);\\n if (direction == 3)\\n slidePos = vec3(position.x, position.y, slide.z);\\n\\n gl_Position = projectionMatrix * modelViewMatrix * vec4( slidePos, 1.0 );\\n\\n vUw.xyz = vec3(slidePos.x, slidePos.y, slidePos.z * depth);\\n\\n}\\n\",getUniforms=function(){return{diffuse:{value:void 0},depth:{value:1},slide:{value:new THREE.Vector3(0,0,1)},direction:{value:1}}};exports.fs=fs,exports.vs=vs,exports.glslVersion=glslVersion,exports.getUniforms=getUniforms;\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),TexturePrimitive=function(textureIn){__webpack_require__(7).ZincObject.call(this),this.isTexturePrimitive=!0,this.texture=textureIn};/**\n * Provides a base class object which stores textures and rendering object.\n * \n * @class\n * @author Alan Wu\n * @return {TexturePrimitive}\n */TexturePrimitive.prototype=Object.create(__webpack_require__(7).ZincObject.prototype),exports.TexturePrimitive=TexturePrimitive;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ResizeSensor=__webpack_require__(30);/**\r\n * Create a Zinc 3D renderer in the container provided.\r\n * The primary function of a Zinc 3D renderer is to display the current\r\n * scene (@link Scene} set to the renderer and each scene may contain as \r\n * many geometries, glyphset and other primitives as the system can support.\r\n * Zinc.Renderer also allows additional scenes to be displayed.\r\n * \r\n * @param {Object} containerIn - Container to create the renderer on.\r\n * @class\r\n * @author Alan Wu\r\n * @return {Renderer}\r\n */exports.Renderer=function(containerIn){var container=containerIn,renderer=void 0,currentScene=void 0,clock=new THREE.Clock(!1);this.playAnimation=!0;/* default animation update rate, rate is 1000 and duration \r\n is default to 6000, 6s to finish a full animation */var playRate=1e3,preRenderCallbackFunctions=[],preRenderCallbackFunctions_id=0,postRenderCallbackFunctions=[],postRenderCallbackFunctions_id=0,animated_id=void 0,cameraOrtho=void 0,sceneOrtho=void 0,logoSprite=void 0,sceneMap=[],additionalActiveScenes=[],scenesGroup=new THREE.Group,canvas=void 0,sensor=void 0,isRendering=!1,_this=this,currentSize=[0,0],currentOffset=[0,0];this.getDrawingWidth=()=>{if(container)return container.clientWidth;return canvas?\"undefined\"==typeof canvas.clientWidth?Math.round(canvas.width):Math.round(canvas.clientWidth):0},this.getDrawingHeight=()=>{if(container)return container.clientHeight;return canvas?\"undefined\"==typeof canvas.clientHeight?Math.round(canvas.height):Math.round(canvas.clientHeight):0},this.onWindowResize=()=>{currentScene.onWindowResize();var width=this.getDrawingWidth(),height=this.getDrawingHeight();if(renderer!=null){var localRect;container?(localRect=container.getBoundingClientRect(),renderer.setSize(width,height)):canvas&&(\"undefined\"==typeof canvas.getBoundingClientRect?renderer.setSize(width,height,!1):(localRect=canvas.getBoundingClientRect(),canvas.width=width,canvas.height=height,renderer.setSize(width,height,!1))),localRect&&(currentOffset[0]=localRect.left,currentOffset[1]=localRect.top);var target=new THREE.Vector2;renderer.getSize(target),currentSize[0]=target.x,currentSize[1]=target.y}},this.initialiseVisualisation=parameters=>{if(parameters=parameters||{},void 0===parameters.antialias){var onMobile=!1;try{/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)&&(onMobile=!0)}catch(err){onMobile=!1}parameters.antialias=!onMobile}parameters.canvas&&(container=void 0,canvas=parameters.canvas),renderer=new THREE.WebGLRenderer(parameters),void 0!==container&&container.appendChild(renderer.domElement),renderer.setClearColor(16777215,1),canvas&&canvas.style&&(canvas.style.height=\"100%\",canvas.style.width=\"100%\"),renderer.autoClear=!1;var scene=this.createScene(\"default\");this.setCurrentScene(scene)},this.getCurrentScene=()=>currentScene,this.setCurrentScene=sceneIn=>{if(sceneIn){this.removeActiveScene(sceneIn);var oldScene=currentScene;currentScene=sceneIn,oldScene&&oldScene.setInteractiveControlEnable(!1),currentScene.setInteractiveControlEnable(!0),currentScene.setAdditionalScenesGroup(scenesGroup),this.onWindowResize()}},this.getSceneByName=name=>sceneMap[name],this.createScene=name=>{if(null==sceneMap[name]){var new_scene;return new_scene=canvas?new(__webpack_require__(31).Scene)(canvas,renderer):new(__webpack_require__(31).Scene)(container,renderer),sceneMap[name]=new_scene,new_scene.sceneName=name,new_scene}};this.resetView=()=>{currentScene.resetView()},this.viewAll=()=>{if(currentScene){var boundingBox=currentScene.getBoundingBox();if(boundingBox){for(i=0;i<additionalActiveScenes.length;i++){var boundingBox2=additionalActiveScenes[i].getBoundingBox();boundingBox2&&boundingBox.union(boundingBox2)}currentScene.viewAllWithBoundingBox(boundingBox)}}},this.loadModelsURL=(urls,colours,opacities,timeEnabled,morphColour,finishCallback)=>{currentScene.loadModelsURL(urls,colours,opacities,timeEnabled,morphColour,finishCallback)};this.loadViewURL=url=>{currentScene.loadViewURL(url)},this.loadFromViewURL=(jsonFilePrefix,finishCallback)=>{currentScene.loadFromViewURL(jsonFilePrefix,finishCallback)},this.updateDirectionalLight=()=>{currentScene.updateDirectionalLight()};var runAnimation=()=>{isRendering?(animated_id=requestAnimationFrame(runAnimation),this.render()):(cancelAnimationFrame(animated_id),animated_id=void 0)};/**\r\n\t * Stop the animation and renderer to get into the render loop.\r\n\t */this.stopAnimate=()=>{isRendering&&(clock.stop(),isRendering=!1)},this.animate=()=>{isRendering||(clock.start(),isRendering=!0,runAnimation())};Date.now();/**\r\n\t * Add a callback function which will be called everytime before the renderer renders its scene.\r\n\t * @param {Function} callbackFunction - callbackFunction to be added.\r\n\t * \r\n\t * @return {Number}\r\n\t */this.addPreRenderCallbackFunction=callbackFunction=>(++preRenderCallbackFunctions_id,preRenderCallbackFunctions[preRenderCallbackFunctions_id]=callbackFunction,preRenderCallbackFunctions_id),this.removePreRenderCallbackFunction=id=>{id in preRenderCallbackFunctions&&delete preRenderCallbackFunctions[id]},this.addPostRenderCallbackFunction=callbackFunction=>(++postRenderCallbackFunctions_id,postRenderCallbackFunctions[postRenderCallbackFunctions_id]=callbackFunction,postRenderCallbackFunctions_id),this.removePostRenderCallbackFunction=id=>{id in postRenderCallbackFunctions&&delete postRenderCallbackFunctions[id]},this.getPlayRate=()=>playRate,this.setPlayRate=playRateIn=>{playRate=playRateIn},this.getCurrentTime=()=>currentScene.getCurrentTime(),this.setMorphsTime=time=>{currentScene.setMorphsTime(time)},this.getZincGeometryByID=id=>currentScene.getZincGeometryByID(id),this.addToScene=object=>{currentScene.addObject(object)},this.addToOrthoScene=object=>{if(null==sceneOrtho&&(sceneOrtho=new THREE.Scene),null==cameraOrtho){var width=this.getDrawingWidth(),height=this.getDrawingHeight();cameraOrtho=new THREE.OrthographicCamera(-width/2,width/2,height/2,-height/2,1,10),cameraOrtho.position.z=10}sceneOrtho.add(object)};var createHUDSprites=logoSprite=>texture=>{texture.needsUpdate=!0;var material=new THREE.SpriteMaterial({map:texture}),imagewidth=material.map.image.width,imageheight=material.map.image.height;logoSprite.material=material,logoSprite.scale.set(imagewidth,imageheight,1);var width=this.getDrawingWidth(),height=this.getDrawingHeight();logoSprite.position.set((width-imagewidth)/2,(-height+imageheight)/2,1),this.addToOrthoScene(logoSprite)};/**\r\n\t * Render the current and all additional scenes. It will first update all geometries and glyphsets\r\n\t * in scenes, clear depth buffer and render the ortho scene, call the preRenderCallbackFunctions stack\r\n\t * , render the scenes then postRenderCallback.\r\n\t */ /**\r\n\t * Get the internal {@link Three.Renderer}, to gain access to ThreeJS APIs.\r\n\t */ /**\r\n\t * Check if a scene is currently active.\r\n\t * @param {Zinc.Scene} sceneIn - Scene to check if it is currently\r\n\t * rendered.\r\n\t */ /**\r\n\t * Add additional active scene for rendering, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be added to the rendering.\r\n\t */ /**\r\n\t * Remove a currenrtly active scene from the renderer, this scene will also be rendered but \r\n\t * viewport of the currentScene will be used. \r\n\t * @param {Zinc.Scene} additionalScene - Scene to be removed from rendering.\r\n\t */ /**\r\n\t * Clear all additional scenes from rendering except for curentScene.\r\n\t */ /**\r\n\t * Dispose all memory allocated, this will effetively destroy all scenes.\r\n\t */ /**\r\n\t * Transition from the current viewport to the endingScene's viewport in the specified duration.\r\n\t * \r\n\t * @param {Zinc.Scene} endingScene - Viewport of this scene will be used as the destination.\r\n\t * @param {Number} duration - Amount of time to transition from current viewport to the \r\n\t * endingScene's viewport.\r\n\t */this.addLogo=()=>{logoSprite=new THREE.Sprite;THREE.ImageUtils.loadTexture(\"images/abi_big_logo_transparent_small.png\",void 0,createHUDSprites(logoSprite))},this.render=()=>{sensor||(container?0<container.clientWidth&&0<container.clientHeight&&(sensor=new ResizeSensor(container,this.onWindowResize)):canvas&&0<canvas.width&&0<canvas.height&&(sensor=new ResizeSensor(canvas,this.onWindowResize)));var delta=clock.getDelta();for(currentScene.renderGeometries(playRate,delta,this.playAnimation),i=0;i<additionalActiveScenes.length;i++){var sceneItem=additionalActiveScenes[i];sceneItem.renderGeometries(playRate,delta,this.playAnimation)}for(key in null!=cameraOrtho&&null!=sceneOrtho&&(renderer.clearDepth(),renderer.render(sceneOrtho,cameraOrtho)),preRenderCallbackFunctions)preRenderCallbackFunctions.hasOwnProperty(key)&&preRenderCallbackFunctions[key].call();for(key in currentScene.render(renderer),postRenderCallbackFunctions)postRenderCallbackFunctions.hasOwnProperty(key)&&postRenderCallbackFunctions[key].call()},this.getThreeJSRenderer=()=>renderer,this.isSceneActive=sceneIn=>{if(currentScene===sceneIn)return!0;for(i=0;i<additionalActiveScenes.length;i++){var sceneItem=additionalActiveScenes[i];if(sceneItem===sceneIn)return!0}return!1},this.addActiveScene=additionalScene=>{this.isSceneActive(additionalScene)||(additionalActiveScenes.push(additionalScene),scenesGroup.add(additionalScene.getThreeJSScene()))},this.removeActiveScene=additionalScene=>{for(i=0;i<additionalActiveScenes.length;i++){var sceneItem=additionalActiveScenes[i];if(sceneItem===additionalScene)return additionalActiveScenes.splice(i,1),void scenesGroup.remove(additionalScene.getThreeJSScene())}},this.clearAllActiveScene=()=>{for(var _i=0;_i<additionalActiveScenes.length;_i++)scenesGroup.remove(additionalActiveScenes[_i].getThreeJSScene());additionalActiveScenes.splice(0,additionalActiveScenes.length)},this.dispose=()=>{for(var _key in isRendering&&cancelAnimationFrame(animated_id),sceneMap)sceneMap.hasOwnProperty(_key)&&sceneMap[_key].clearAll();sceneMap=[],additionalActiveScenes=[],scenesGroup=new THREE.Group,this.stopAnimate(),preRenderCallbackFunctions=[],preRenderCallbackFunctions_id=0,cameraOrtho=void 0,sceneOrtho=void 0,logoSprite=void 0;var scene=this.createScene(\"default\");this.setCurrentScene(scene),sensor=void 0},this.transitionScene=(endingScene,duration)=>{if(currentScene){var currentCamera=currentScene.getZincCameraControls(),boundingBox=endingScene.getBoundingBox();if(boundingBox){var radius=boundingBox.min.distanceTo(boundingBox.max)/2,centreX=(boundingBox.min.x+boundingBox.max.x)/2,centreY=(boundingBox.min.y+boundingBox.max.y)/2,centreZ=(boundingBox.min.z+boundingBox.max.z)/2,endingViewport=currentCamera.getViewportFromCentreAndRadius(centreX,centreY,centreZ,radius,40,radius*4),startingViewport=currentCamera.getCurrentViewport();currentCamera.cameraTransition(startingViewport,endingViewport,duration),currentCamera.enableCameraTransition()}}},this.isWebGL2=()=>!!renderer&&renderer.capabilities.isWebGL2};\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! css-element-queries/src/ResizeSensor */ \"./node_modules/css-element-queries/src/ResizeSensor.js\");\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),SceneLoader=__webpack_require__(32).SceneLoader,SceneExporter=__webpack_require__(38).SceneExporter,Viewport=__webpack_require__(40).Viewport,uniqueiId=0,getUniqueId=function(){return\"sc\"+uniqueiId++},defaultMetadata=function(){return{Duration:\"6 secs\",OriginalDuration:\"-\",TimeStamps:{}}},defaultDuration=6e3;/**\n * A Scene contains {@link Region},and \n * {@link CameraControls} which controls the viewport and additional features.\n * It is the main object used for controlling what is and what is not displayed\n * on the renderer.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {Scene}\n */exports.Scene=function(containerIn,rendererIn){var container=containerIn,videoHandler=void 0,sceneLoader=new SceneLoader(this),minimap=void 0,scene=new THREE.Scene,rootRegion=new(__webpack_require__(41).Region);scene.add(rootRegion.getGroup()),this.directionalLight=void 0,this.ambient=void 0,this.camera=void 0;var duration=6e3,zincCameraControls=void 0;this.sceneName=void 0;var stereoEffectFlag=!1,stereoEffect=void 0;this.autoClearFlag=!0,this.displayMarkers=!1,this.displayMinimap=!1,this.minimapScissor={x_offset:16,y_offset:16,width:128,height:128,align:\"top-left\",updateRequired:!0};var scissor={x:0,y:0},metadata=defaultMetadata(),_markerTarget=new THREE.Vector2,pickableObjectsList=[];this.forcePickableObjectsUpdate=!1,this.uuid=getUniqueId();var getDrawingWidth=()=>container?\"undefined\"==typeof container.clientWidth?container.width:container.clientWidth:0,getDrawingHeight=()=>container?\"undefined\"==typeof container.clientHeight?container.height:container.clientHeight:0;this.getDownloadProgress=()=>sceneLoader.getDownloadProgress(),this.onWindowResize=()=>{this.camera.aspect=getDrawingWidth()/getDrawingHeight(),this.camera.updateProjectionMatrix(),this.minimapScissor.updateRequired=!0,zincCameraControls.onResize()},this.resetView=()=>{this.onWindowResize(),zincCameraControls.resetView()},this.changeZoomByScrollRateUnit=unit=>{zincCameraControls.changeZoomByScrollRateUnit(unit)};//Setup the camera for this scene, it also initialise the lighting\nvar setupCamera=()=>{this.camera=new THREE.PerspectiveCamera(40,getDrawingWidth()/getDrawingHeight(),0,10),this.ambient=new THREE.AmbientLight(16777215,.2),scene.add(this.ambient),this.directionalLight=new THREE.DirectionalLight(16777215,.8),scene.add(this.directionalLight),zincCameraControls=new(__webpack_require__(40).CameraControls)(this.camera,rendererIn.domElement,rendererIn,this),zincCameraControls.setDirectionalLight(this.directionalLight),zincCameraControls.resetView(),minimap=new(__webpack_require__(42).Minimap)(this)};setupCamera(),this.loadView=settings=>{var viewPort=new Viewport;return viewPort.setFromObject(settings),zincCameraControls.setCurrentCameraSettings(viewPort),!0},this.setupMultipleViews=(defaultView,entries)=>{for(var[name,settings]of Object.entries(entries)){var viewport=new Viewport;viewport.setFromObject(settings),zincCameraControls.addViewport(name,viewport)}zincCameraControls.setDefaultViewport(defaultView)},this.getBoundingBox=()=>rootRegion.getBoundingBox(!0),this.viewAllWithBoundingBox=boundingBox=>{if(boundingBox){// enlarge radius to keep image within edge of window\nvar radius=boundingBox.min.distanceTo(boundingBox.max)/2,centreX=(boundingBox.min.x+boundingBox.max.x)/2,centreY=(boundingBox.min.y+boundingBox.max.y)/2,centreZ=(boundingBox.min.z+boundingBox.max.z)/2,viewport=zincCameraControls.getViewportFromCentreAndRadius(centreX,centreY,centreZ,radius,40,radius*4);zincCameraControls.setCurrentCameraSettings(viewport)}},this.viewAll=()=>{var boundingBox=this.getBoundingBox();this.viewAllWithBoundingBox(boundingBox)},this.forEachGeometry=callbackFunction=>{rootRegion.forEachGeometry(callbackFunction,!0)},this.forEachGlyphset=callbackFunction=>{rootRegion.forEachGlyphset(callbackFunction,!0)},this.forEachPointset=callbackFunction=>{rootRegion.forEachPointset(callbackFunction,!0)},this.forEachLine=callbackFunction=>{rootRegion.forEachLine(callbackFunction,!0)},this.findGeometriesWithGroupName=GroupName=>rootRegion.findGeometriesWithGroupName(GroupName,!0),this.findPointsetsWithGroupName=GroupName=>rootRegion.findPointsetsWithGroupName(GroupName,!0),this.findGlyphsetsWithGroupName=GroupName=>rootRegion.findGlyphsetsWithGroupName(GroupName,!0),this.findLinesWithGroupName=GroupName=>rootRegion.findLinesWithGroupName(GroupName,!0),this.findObjectsWithGroupName=GroupName=>rootRegion.findObjectsWithGroupName(GroupName,!0),this.findObjectsWithAnatomicalId=anatomicalId=>rootRegion.findObjectsWithAnatomicalId(anatomicalId,!0),this.getBoundingBoxOfZincObjects=objectsArray=>{for(var box,boundingBox=void 0,i=0;i<objectsArray.length;i++)box=objectsArray[i].getBoundingBox(),box&&(boundingBox?boundingBox.union(box):boundingBox=box);return boundingBox},this.vectorToScreenXY=point=>{point.project(this.camera);var width=getDrawingWidth(),height=getDrawingHeight(),widthHalf=width/2,heightHalf=height/2;return point.x=point.x*widthHalf+widthHalf,point.y=-(point.y*heightHalf)+heightHalf,point},this.getObjectsScreenXY=zincObjects=>{if(zincObjects&&0<zincObjects.length){var boundingBox=this.getBoundingBoxOfZincObjects(zincObjects),center=new THREE.Vector3;return boundingBox.getCenter(center),this.vectorToScreenXY(center)}},this.getNamedObjectsScreenXY=name=>{var zincObjects=this.findObjectsWithGroupName(name);return this.getObjectsScreenXY(zincObjects)},this.addZincObject=zincObject=>{zincObject&&(rootRegion.addZincObject(zincObject),zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(this))},this.loadGlyphsetURL=(metaurl,glyphurl,groupName,finishCallback)=>{sceneLoader.loadGlyphsetURL(rootRegion,metaurl,glyphurl,groupName,finishCallback)},this.loadPointsetURL=(url,timeEnabled,morphColour,groupName,finishCallback)=>{sceneLoader.loadPointsetURL(rootRegion,url,timeEnabled,morphColour,groupName,finishCallback)},this.loadLinesURL=(url,timeEnabled,morphColour,groupName,finishCallback)=>{sceneLoader.loadLinesURL(rootRegion,url,timeEnabled,morphColour,groupName,finishCallback)},this.loadSTL=(url,groupName,finishCallback)=>{sceneLoader.loadSTL(rootRegion,url,groupName,finishCallback)},this.loadOBJ=(url,groupName,finishCallback)=>{sceneLoader.loadOBJ(rootRegion,url,groupName,finishCallback)},this.loadMetadataURL=(url,finishCallback,allCompletedCallback)=>{sceneLoader.loadMetadataURL(rootRegion,url,finishCallback,allCompletedCallback)},this.loadModelsURL=(urls,colours,opacities,timeEnabled,morphColour,finishCallback)=>{sceneLoader.loadModelsURL(rootRegion.urls,colours,opacities,timeEnabled,morphColour,finishCallback)},this.loadViewURL=url=>{sceneLoader.loadViewURL(url)},this.loadFromViewURL=(jsonFilePrefix,finishCallback)=>{sceneLoader.loadFromViewURL(jsonFilePrefix,finishCallback)},this.loadGLTF=(url,finishCallback,options)=>{sceneLoader.loadGLTF(rootRegion,url,finishCallback,options)},this.updateDirectionalLight=()=>{zincCameraControls.updateDirectionalLight()},this.addObject=object=>{scene.add(object)},this.removeObject=object=>{scene.remove(object)},this.getCurrentTime=()=>{if(videoHandler!=null)return videoHandler.getCurrentTime(duration);var time=rootRegion.getCurrentTime();return-1===time?0:time},this.setMorphsTime=time=>{videoHandler!=null&&videoHandler.setMorphTime(time,duration),rootRegion.setMorphTime(time,!0)},this.isTimeVarying=()=>!!(videoHandler&&videoHandler.video&&!videoHandler.video.error)||rootRegion.isTimeVarying(),this.renderGeometries=(playRate,delta,playAnimation)=>{// Let video dictates the progress if one is present\nvar options={camera:zincCameraControls,displayMarkers:this.displayMarkers,markerDepths:[]};if(!videoHandler)0==sceneLoader.toBeDownloaded?(zincCameraControls.update(delta),rootRegion.renderGeometries(playRate,delta,playAnimation,options,!0)):zincCameraControls.update(0);else if(videoHandler.isReadyToPlay()){playAnimation?videoHandler.video.play():videoHandler.video.pause();var currentTime=videoHandler.video.currentTime/videoHandler.getVideoDuration()*duration;0==sceneLoader.toBeDownloaded?(zincCameraControls.setTime(currentTime),zincCameraControls.update(0),rootRegion.setMorphTime(currentTime,!0),rootRegion.renderGeometries(0,0,playAnimation,void 0,!0)):zincCameraControls.update(0)}else myPlayRate=0},this.getThreeJSScene=()=>scene,this.setVideoHandler=videoHandlerIn=>{videoHandler||(videoHandler=videoHandlerIn)},this.setAdditionalScenesGroup=scenesGroup=>{scene.add(scenesGroup)};var getWindowsPosition=(align,x_offset,y_offset,width,height,renderer_width,renderer_height)=>{var x=0,y=0;return y=align.includes(\"top\")?renderer_height-height-y_offset:align.includes(\"bottom\")?y_offset:Math.floor((renderer_height-height)/2),x=align.includes(\"left\")?x_offset:align.includes(\"right\")?renderer_width-x_offset-width:Math.floor((renderer_width-width)/2),{x:x,y:y}},renderMinimap=renderer=>{!0===this.displayMinimap&&(renderer.setScissorTest(!0),renderer.getSize(_markerTarget),this.minimapScissor.updateRequired&&(scissor=getWindowsPosition(this.minimapScissor.align,this.minimapScissor.x_offset,this.minimapScissor.y_offset,this.minimapScissor.width,this.minimapScissor.height,_markerTarget.x,_markerTarget.y),this.minimapScissor.updateRequired=!1),renderer.setScissor(scissor.x,scissor.y,this.minimapScissor.width,this.minimapScissor.height),renderer.setViewport(scissor.x,scissor.y,this.minimapScissor.width,this.minimapScissor.height),minimap.updateCamera(),scene.add(minimap.mask),renderer.render(scene,minimap.camera),scene.remove(minimap.mask),renderer.setScissorTest(!1),renderer.setViewport(0,0,_markerTarget.x,_markerTarget.y))};this.render=renderer=>{this.autoClearFlag&&renderer.clear(),stereoEffectFlag&&stereoEffect?stereoEffect.render(scene,this.camera):(renderer.render(scene,this.camera),renderMinimap(renderer))},this.setInteractiveControlEnable=flag=>{!0==flag?zincCameraControls.enable():zincCameraControls.disable()},this.getZincCameraControls=()=>zincCameraControls,this.getThreeJSScene=()=>scene,this.setDuration=durationIn=>{rootRegion.setDuration(durationIn),duration=durationIn,zincCameraControls.setPathDuration(durationIn),sceneLoader.duration=durationIn},this.getDuration=()=>duration,this.setStereoEffectEnable=stereoFlag=>{!0!=stereoFlag||stereoEffect||(stereoEffect=new __webpack_require__(40).StereoEffect(rendererIn)),rendererIn.setSize(getDrawingWidth(),getDrawingHeight()),this.camera.updateProjectionMatrix(),stereoEffectFlag=stereoFlag},this.objectIsInScene=zincObject=>rootRegion.objectIsInRegion(zincObject,!0),this.alignBoundingBoxToCameraView=(boundingBox,transitionTime)=>{if(boundingBox){var center=new THREE.Vector3;boundingBox.getCenter(center);var viewport=this.getZincCameraControls().getCurrentViewport(),target=new THREE.Vector3(viewport.targetPosition[0],viewport.targetPosition[1],viewport.targetPosition[2]),eyePosition=new THREE.Vector3(viewport.eyePosition[0],viewport.eyePosition[1],viewport.eyePosition[2]),upVector=new THREE.Vector3(viewport.upVector[0],viewport.upVector[1],viewport.upVector[2]),newVec1=new THREE.Vector3,newVec2=new THREE.Vector3;newVec1.subVectors(target,eyePosition).normalize(),newVec2.subVectors(target,center).normalize();var newVec3=new THREE.Vector3;newVec3.crossVectors(newVec1,newVec2);var angle=newVec1.angleTo(newVec2);0<transitionTime?(this.getZincCameraControls().rotateCameraTransition(newVec3,angle,transitionTime),this.getZincCameraControls().enableCameraTransition()):this.getZincCameraControls().rotateAboutLookAtpoint(newVec3,angle)}},this.alignObjectToCameraView=(zincObject,transitionTime)=>{if(this.objectIsInScene(zincObject)){var boundingBox=zincObject.getBoundingBox();this.alignBoundingBoxToCameraView(boundingBox,transitionTime)}},this.setCameraTargetToObject=zincObject=>{if(this.objectIsInScene(zincObject)){var center=new THREE.Vector3,boundingBox=zincObject.getBoundingBox(),viewport=this.getZincCameraControls().getCurrentViewport();boundingBox.getCenter(center);var target=new THREE.Vector3(viewport.targetPosition[0],viewport.targetPosition[1],viewport.targetPosition[2]),eyePosition=new THREE.Vector3(viewport.eyePosition[0],viewport.eyePosition[1],viewport.eyePosition[2]),newVec1=new THREE.Vector3,newVec2=new THREE.Vector3;newVec1.subVectors(eyePosition,target),newVec2.addVectors(center,newVec1),viewport.eyePosition[0]=newVec2.x,viewport.eyePosition[1]=newVec2.y,viewport.eyePosition[2]=newVec2.z,viewport.targetPosition[0]=center.x,viewport.targetPosition[1]=center.y,viewport.targetPosition[2]=center.z,this.getZincCameraControls().setCurrentCameraSettings(viewport)}},this.isStereoEffectEnable=()=>stereoEffectFlag,this.removeZincObject=zincObject=>{rootRegion.removeZincObject(zincObject),zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(this)},this.updatePickableThreeJSObjects=()=>{pickableObjectsList.splice(0,pickableObjectsList.length),rootRegion.getPickableThreeJSObjects(pickableObjectsList,!0),this.forcePickableObjectsUpdate=!1},this.getPickableThreeJSObjects=()=>((this.forcePickableObjectsUpdate||rootRegion.checkPickableUpdateRequred(!0))&&this.updatePickableThreeJSObjects(),pickableObjectsList),this.getNormalisedMinimapCoordinates=(renderer,event)=>{if(this.displayMinimap){var target=new THREE.Vector2;renderer.getSize(target);var offsetY=target.y-event.clientY;if(scissor.x+this.minimapScissor.width>event.clientX&&event.clientX>scissor.x&&scissor.y+this.minimapScissor.height>offsetY&&offsetY>scissor.y){var x=2*((event.clientX-scissor.x)/this.minimapScissor.width)-1,y=2*((offsetY-scissor.y)/this.minimapScissor.height)-1;return{x:x,y:y}}}},this.getMinimapDiffFromNormalised=(x,y)=>minimap?minimap.getDiffFromNormalised(x,y):void 0,this.isWebGL2=()=>rendererIn.isWebGL2(),this.clearAll=()=>{rootRegion.clear(!0),sceneLoader.toBeDwonloaded=0,zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(this)},this.addMetadataTimeStamp=(key,time)=>{metadata.TimeStamps[key]=convertDurationObjectTomSec(time)},this.getMetadataTag=key=>metadata[key],this.getMetadata=()=>metadata,this.setMetadataTag=(key,value)=>{metadata[key]=value},this.removeMetadataTag=key=>{delete metadata[key]},this.resetMetadata=()=>{metadata=defaultMetadata()},this.resetDuration=()=>{this.setDuration(defaultDuration)};// Turn the object into a readable string {years: years,months: months, \n// weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \nvar convertDurationObjectToString=duration=>[...(duration.years?[\"\".concat(duration.years,\"years\")]:[]),...(duration.months?[\"\".concat(duration.months,\"months\")]:[]),...(duration.weeks?[\"\".concat(duration.weeks,\"weeks\")]:[]),...(duration.days?[\"\".concat(duration.days,\"days\")]:[]),...(duration.hours?[\"\".concat(duration.hours,\"hours\")]:[]),...(duration.mins?[\"\".concat(duration.mins,\"mins\")]:[]),...(duration.secs?[\"\".concat(duration.secs,\"secs\")]:[])].join(\" \"),convertDurationObjectTomSec=duration=>duration.years?31536e6*duration.years:0+duration.months?2592e6*duration.months:0+duration.weeks?6048e5*duration.weeks:0+duration.days?864e5*duration.days:0+duration.hours?36e5*duration.hours:0+duration.mins?6e4*duration.mins:0+duration.secs?1e3*duration.secs:0;// Turn the object into a number representing milliesecond {years: years,months: months, \n// weeks: weeks, days: days, hours: hours, mins: mins, secs: secs } \n// Set the readable duration and timer using an object\n// with the following format {years: years,months: months, weeks: weeks, days: days,\n// hours: hours, mins: mins, secs: secs } \n// Set the readable original duration using an object\n// with the following format {years: years,months: months, weeks: weeks, days: days,\n// hours: hours, mins: mins, secs: secs } \n/**\n * Export the scene in GLTF format, it can either return it in\n * string or binary form.\n * \n * @param {Boolean} binary - Indicate it should be exported as binary or\n * text.\n * \n * @return {Promise} The exported data if the promise resolve successfully\n */ /**\n * Get the root region of the scene.\n * \n * @return {Region} Return the root region of the scene\n */this.setDurationFromObject=duration=>{var string=convertDurationObjectToString(duration),millisec=convertDurationObjectTomSec(duration);this.setMetadataTag(\"Duration\",string),this.setDuration(millisec)},this.setOriginalDurationFromObject=duration=>{var string=convertDurationObjectToString(duration);this.setMetadataTag(\"OriginalDuration\",string)},this.exportGLTF=binary=>{var exporter=new SceneExporter(this);return exporter.exportGLTF(binary)},this.getRootRegion=()=>rootRegion};\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),resolveURL=__webpack_require__(4).resolveURL,STLLoader=__webpack_require__(33).STLLoader,OBJLoader=__webpack_require__(34).OBJLoader,PrimitivesLoader=__webpack_require__(35).PrimitivesLoader,createNewURL=(target,reference)=>{var newURL=new URL(target,reference).href;//Make sure the target url does not contain parameters\nif(target&&2>target.split(\"?\").length){var paramsStrings=reference.split(\"?\");//There are parameters, add them to the target\n2===paramsStrings.length&&(newURL=newURL+\"?\"+paramsStrings[1])}return newURL};/**\n * A helper class to help with reading / importing primitives and\n * settings into a {@link Scene}.\n * \n * @class\n * @param {Object} containerIn - Container to create the renderer on.\n * @author Alan Wu\n * @return {SceneLoader}\n */exports.SceneLoader=function(sceneIn){var scene=sceneIn;this.toBeDownloaded=0,this.progressMap=[];var viewLoaded=!1,errorDownload=!1,primitivesLoader=new PrimitivesLoader;this.getDownloadProgress=()=>{var totalSize=0,totalLoaded=0,unknownFound=!1;for(var key in this.progressMap){var progress=this.progressMap[key];totalSize+=progress[1],totalLoaded+=progress[0],0==progress[1]&&(unknownFound=!0)}return unknownFound&&(totalSize=0),[totalSize,totalLoaded,errorDownload]},this.onProgress=id=>xhr=>{this.progressMap[id]=[xhr.loaded,xhr.total]},this.onError=finishCallback=>()=>{--this.toBeDownloaded,errorDownload=!0,finishCallback&&finishCallback()};var loadMultipleViews=(referenceURL,views)=>{var defaultView=views.Default;if(views.Inline)scene.setupMultipleViews(defaultView,views.Entries);else{var promises=[],_loop=function(key,value){referenceURL&&(newURL=createNewURL(value,referenceURL),promises.push(new Promise((resolve,reject)=>{// Add parameters if we are sent them\nfetch(newURL).then(response=>response.json()).then(data=>resolve({key:key,data:data})).catch(data=>reject(data))})))};for(var[key,value]of Object.entries(views.Entries))_loop(key,value);Promise.all(promises).then(values=>{var entries={};values.forEach(entry=>{entries[entry.key]=entry.data}),scene.setupMultipleViews(defaultView,entries);var zincCameraControls=scene.getZincCameraControls();zincCameraControls&&zincCameraControls.setCurrentViewport(defaultView),viewLoaded=!0})}};/**\n * Load the viewport from an external location provided by the url.\n * @param {String} URL - address to the file containing viewport information.\n */this.loadViewURL=(url,finishCallback)=>{this.toBeDownloaded+=1;var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState)if(200==xmlhttp.status){var viewData=JSON.parse(xmlhttp.responseText);scene.setupMultipleViews(\"default\",{default:viewData}),scene.resetView(),viewLoaded=!0,--this.toBeDownloaded,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback()}else this.onError()},requestURL=resolveURL(url),xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()},this.loadModelsURL=(region,urls,colours,opacities,timeEnabled,morphColour,finishCallback)=>{var number=urls.length;this.toBeDownloaded+=number;for(var _i=0;_i<number;_i++){var filename=urls[_i],colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity;colours!=null&&colours[_i]!=null&&(colour=!!colours[_i]),opacities!=null&&opacities[_i]!=null&&(opacity=opacities[_i]);var localTimeEnabled=0;timeEnabled!=null&&timeEnabled[_i]!=null&&(localTimeEnabled=!!timeEnabled[_i]);var localMorphColour=0;morphColour!=null&&morphColour[_i]!=null&&(localMorphColour=!!morphColour[_i]),primitivesLoader.load(resolveURL(filename),meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,void 0,void 0,void 0,finishCallback),this.onProgress(_i),this.onError(finishCallback))}},this.loadFromViewURL=(targetRegion,jsonFilePrefix,finishCallback)=>{var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){var viewData=JSON.parse(xmlhttp.responseText);scene.loadView(viewData);for(var filename,urls=[],_i2=0;_i2<viewData.numberOfResources;_i2++)filename=jsonFilePrefix+\"_\"+(_i2+1)+\".json\",urls.push(filename);this.loadModelsURL(targetRegion,urls,viewData.colour,viewData.opacity,viewData.timeEnabled,viewData.morphColour,finishCallback)}},requestURL=resolveURL(jsonFilePrefix+\"_view.json\"),xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()};//Internal loader for a regular zinc geometry.\nvar linesloader=(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)=>(geometry,materials)=>{var newLines=new(__webpack_require__(21).Lines),material=void 0;materials&&materials[0]&&(material=new THREE.LineBasicMaterial({color:materials[0].color.clone()}),1>materials[0].opacity&&(material.transparent=!0),material.opacity=materials[0].opacity,material.morphTargets=localTimeEnabled,material.vertexColors=materials[0].vertexColors);var options={};options.localTimeEnabled=localTimeEnabled,options.localMorphColour=localMorphColour,newLines&&(newLines.createLineSegment(geometry,material,options),newLines.setName(groupName),newLines.anatomicalId=anatomicalId,newLines.setRenderOrder=renderOrder,region.addZincObject(newLines),newLines.setDuration(scene.getDuration())),--this.toBeDownloaded,geometry.dispose(),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(newLines)};/**\n * Load lines into this scene object.\n * \n * @param {String} metaurl - Provide informations such as transformations, colours \n * and others for each of the glyph in the glyphsset.\n * @param {Boolean} timeEnabled - Indicate if morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the pointset's groupname to.\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */this.loadLinesURL=(region,url,timeEnabled,morphColour,groupName,finishCallback,options)=>{var localTimeEnabled=0;this.toBeDownloaded+=1;var isInline=!!(options&&options.isInline)&&options.isInline,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0;null!=timeEnabled&&(localTimeEnabled=!!timeEnabled);var localMorphColour=0;if(null!=morphColour&&(localMorphColour=!!morphColour),isInline){var object=primitivesLoader.parse(url);linesloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)(object.geometry,object.materials)}else primitivesLoader.load(url,linesloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback),this.onProgress(i),this.onError(finishCallback))};var loadGlyphset=(region,glyphsetData,glyphurl,groupName,finishCallback,options)=>{var isInline=options&&options.isInline?options.isInline:void 0,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,displayLabels=options&&options.displayLabels?options.displayLabels:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0,newGlyphset=new(__webpack_require__(14).Glyphset);newGlyphset.setDuration(scene.getDuration()),newGlyphset.groupName=groupName;var myCallback=()=>{--this.toBeDownloaded,finishCallback!=null&&\"function\"==typeof finishCallback&&finishCallback(newGlyphset)};++this.toBeDownloaded,isInline?newGlyphset.load(glyphsetData,glyphurl,myCallback,isInline,displayLabels):newGlyphset.load(glyphsetData,resolveURL(glyphurl),myCallback,isInline,displayLabels),newGlyphset.anatomicalId=anatomicalId,newGlyphset.setRenderOrder(renderOrder),region.addZincObject(newGlyphset)},onLoadGlyphsetReady=(region,xmlhttp,glyphurl,groupName,finishCallback,options)=>()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){var glyphsetData=JSON.parse(xmlhttp.responseText);loadGlyphset(region,glyphsetData,glyphurl,groupName,finishCallback,options)}},pointsetloader=(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)=>(geometry,materials)=>{var newPointset=new(__webpack_require__(18).Pointset),material=new THREE.PointsMaterial({alphaTest:.5,size:10,sizeAttenuation:!1});materials&&materials[0]&&(1>materials[0].opacity&&(material.transparent=!0),material.opacity=materials[0].opacity,material.color=materials[0].color,material.morphTargets=localTimeEnabled,material.vertexColors=materials[0].vertexColors);var options={};options.localTimeEnabled=localTimeEnabled,options.localMorphColour=localMorphColour,newPointset&&(newPointset.createMesh(geometry,material,options),newPointset.setName(groupName),region.addZincObject(newPointset),newPointset.setDuration(scene.getDuration()),newPointset.setRenderOrder(renderOrder)),geometry.dispose(),--this.toBeDownloaded,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(newPointset)};//Load a glyphset into this scene.\nthis.loadSTL=(region,url,groupName,finishCallback)=>{this.toBeDownloaded+=1;var colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity,loader=new STLLoader;loader.crossOrigin=\"Anonymous\",loader.load(resolveURL(url),meshloader(region,colour,opacity,!1,!1,groupName,void 0,void 0,finishCallback))},this.loadOBJ=(region,url,groupName,finishCallback)=>{this.toBeDownloaded+=1;var colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity,loader=new OBJLoader;loader.crossOrigin=\"Anonymous\",loader.load(resolveURL(url),meshloader(region,colour,opacity,!1,!1,groupName,void 0,void 0,finishCallback))};/**\n * Load a geometry into this scene, this is a subsequent called from \n * {@link Zinc.Scene#loadMetadataURL}, although it can be used to read\n * in geometry into the scene externally.\n * \n * @param {String} url - regular json model file providing geometry.\n * @param {Boolean} timeEnabled - Indicate if geometry morphing is enabled.\n * @param {Boolean} morphColour - Indicate if color morphing is enabled.\n * @param {STRING} groupName - name to assign the geometry's groupname to.\n * @param {STRING} fileFormat - name supported formats are STL, OBJ and JSON.\n * @param {Function} finishCallback - Callback function which will be called\n * once the geometry is succssfully loaded in.\n */var loadSurfaceURL=(region,url,timeEnabled,morphColour,groupName,finishCallback,options)=>{this.toBeDownloaded+=1;var colour=__webpack_require__(0).defaultMaterialColor,opacity=__webpack_require__(0).defaultOpacity,localTimeEnabled=0,isInline=!!(options&&options.isInline)&&options.isInline,fileFormat=options&&options.fileFormat?options.fileFormat:void 0,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0;timeEnabled!=null&&(localTimeEnabled=!!timeEnabled);var localMorphColour=0;morphColour!=null&&(localMorphColour=!!morphColour);var loader=primitivesLoader;if(fileFormat!==void 0)if(\"STL\"==fileFormat)loader=new STLLoader;else if(\"OBJ\"==fileFormat)return loader=new OBJLoader,loader.crossOrigin=\"Anonymous\",void loader.load(url,meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback),this.onProgress(i),this.onError);if(isInline){var object=primitivesLoader.parse(url);meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)(object.geometry,object.materials)}else loader.crossOrigin=\"Anonymous\",primitivesLoader.load(url,meshloader(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback),this.onProgress(i),this.onError(finishCallback))},metaFinishCallback=function(numberOfDownloaded,finishCallback,allCompletedCallback){var downloadedItem=0;return zincObject=>{if(++downloadedItem,zincObject&&null!=finishCallback&&\"function\"==typeof finishCallback){finishCallback(zincObject);var zincCameraControls=scene.getZincCameraControls();zincCameraControls&&zincCameraControls.calculateMaxAllowedDistance(scene)}downloadedItem==numberOfDownloaded&&(!1===viewLoaded&&scene.viewAll(),null!=allCompletedCallback&&\"function\"==typeof allCompletedCallback&&allCompletedCallback())}};//Object to keep track of number of items downloaded and when all items are downloaded\n//allCompletedCallback is called\nthis.loadPointsetURL=(region,url,timeEnabled,morphColour,groupName,finishCallback,options)=>{var localTimeEnabled=0;this.toBeDownloaded+=1,timeEnabled!=null&&(localTimeEnabled=!!timeEnabled);var localMorphColour=0;morphColour!=null&&(localMorphColour=!!morphColour);var isInline=!!(options&&options.isInline)&&options.isInline,anatomicalId=options&&options.anatomicalId?options.anatomicalId:void 0,renderOrder=options&&options.renderOrder?options.renderOrder:void 0;if(isInline){var object=primitivesLoader.parse(url);pointsetloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)(object.geometry,object.materials)}else primitivesLoader.load(url,pointsetloader(region,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback),this.onProgress(i),this.onError(finishCallback))},this.loadGlyphsetURL=(region,metaurl,glyphurl,groupName,finishCallback,options)=>{var isInline=!!(options&&options.isInline)&&options.isInline;if(isInline)loadGlyphset(region,metaurl,glyphurl,groupName,finishCallback,options);else{var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=onLoadGlyphsetReady(region,xmlhttp,glyphurl,groupName,finishCallback,options),xmlhttp.open(\"GET\",resolveURL(metaurl),!0),xmlhttp.send()}},createZincGeometry=(region,geometryIn,colour,opacity,localTimeEnabled,localMorphColour,finishCallback,materialIn,groupName)=>{var newGeometry=new(__webpack_require__(2).Geometry);return newGeometry.createMesh(geometryIn,materialIn,{colour:colour,opacity:opacity,localTimeEnabled:localTimeEnabled,localMorphColour:localMorphColour}),newGeometry.getMorph()?(newGeometry.setName(groupName),region&®ion.addZincObject(newGeometry),newGeometry.setDuration(scene.getDuration()),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(newGeometry),newGeometry.videoHandler&&scene.setVideoHandler(newGeometry.videoHandler),newGeometry):void 0};//Internal loader for a regular zinc geometry.\nvar meshloader=(region,colour,opacity,localTimeEnabled,localMorphColour,groupName,anatomicalId,renderOrder,finishCallback)=>(geometry,materials)=>{var material;materials&&materials[0]&&(material=materials[0]);var zincGeometry=createZincGeometry(region,geometry,colour,opacity,localTimeEnabled,localMorphColour,void 0,material,groupName,renderOrder);zincGeometry.anatomicalId=anatomicalId,zincGeometry.setRenderOrder(renderOrder),--this.toBeDownloaded,geometry.dispose(),null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(zincGeometry)},parseDuration=durationString=>{var regex=/P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)W)?(?:(\\d+)D)?(?:T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+)S)?)?$/,[,years,months,weeks,days,hours,mins,secs]=durationString.match(regex);return{years:years,months:months,weeks:weeks,days:days,hours:hours,mins:mins,secs:secs}};//Turn ISO 8601 duration string into an array.\nthis.loadSettings=item=>{if(item){//duration uses the ISO 8601 standard - PnYnMnDTnHnMnS\nif(item.Duration){var duration=parseDuration(item.Duration);scene.setDurationFromObject(duration)}if(item.OriginalDuration){var _duration=parseDuration(item.OriginalDuration);scene.setOriginalDurationFromObject(_duration)}if(item.TimeStamps)for(var key in item.TimeStamps){var time=parseDuration(item.TimeStamps[key]);scene.addMetadataTimeStamp(key,time)}}};//Function to process each of the graphical metadata item except for view and\n//settings.\nvar readPrimitivesItem=(region,referenceURL,item,order,finishCallback)=>{if(item){var _newURL=void 0,isInline=!1;item.URL?(_newURL=item.URL,referenceURL&&(_newURL=createNewURL(item.URL,referenceURL))):item.Inline&&(_newURL=item.Inline.URL,isInline=!0);var groupName=item.GroupName;(groupName===void 0||\"\"===groupName)&&(groupName=\"_Unnamed\");var options={isInline:isInline,fileFormat:item.FileFormat,anatomicalId:item.AnatomicalId,compression:item.compression,renderOrder:order};switch(item.Type){case\"Surfaces\":loadSurfaceURL(region,_newURL,item.MorphVertices,item.MorphColours,groupName,finishCallback,options);break;case\"Glyph\":var newGeometryURL;isInline?newGeometryURL=item.Inline.GlyphGeometriesURL:(newGeometryURL=item.GlyphGeometriesURL,newGeometryURL=createNewURL(item.GlyphGeometriesURL,referenceURL)),item.DisplayLabels&&(options.displayLabels=!0),this.loadGlyphsetURL(region,_newURL,newGeometryURL,groupName,finishCallback,options);break;case\"Points\":this.loadPointsetURL(region,_newURL,item.MorphVertices,item.MorphColours,groupName,finishCallback,options);break;case\"Lines\":this.loadLinesURL(region,_newURL,item.MorphVertices,item.MorphColours,groupName,finishCallback,options);break;default:}}},readViewAndSettingsItem=(referenceURL,item,finishCallback)=>{if(item){var _newURL2=void 0,isInline=!1;switch(item.URL?(_newURL2=item.URL,referenceURL&&(_newURL2=createNewURL(item.URL,referenceURL))):item.Inline&&(_newURL2=item.Inline.URL,isInline=!0),item.Type){case\"View\":isInline?(scene.setupMultipleViews(\"default\",{default:_newURL2}),viewLoaded=!0,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback()):this.loadViewURL(_newURL2,finishCallback);break;case\"Settings\":this.loadSettings(item);break;default:}}};//Function to read the view item first\nthis.loadGLTF=(region,url,finishCallback,options)=>{var GLTFToZincJSLoader=new(__webpack_require__(36).GLTFToZincJSLoader);GLTFToZincJSLoader.load(scene,region,url,finishCallback,options)};var loadRegions=(currentRegion,referenceURL,regions,callback)=>{if(regions.Primitives&®ions.Primitives.forEach(primitive=>{var order=1;primitive.Order&&(order=primitive.Order),readPrimitivesItem(currentRegion,referenceURL,primitive,order,callback)}),regions.Transformation&¤tRegion.setTransformation(regions.Transformation),regions.Children)for(var[regionName,value]of Object.entries(regions.Children)){var childRegion=currentRegion.findOrCreateChildFromPath(regionName);childRegion&&loadRegions(childRegion,referenceURL,value,callback)}},getNumberOfDownloadsInArray=(array,includeViews)=>{if(Array.isArray(array)){for(var count=0,_i3=0;_i3<array.length;_i3++)array[_i3].Type&&(includeViews&&\"View\"===array[_i3].Type||\"Surfaces\"===array[_i3].Type||\"Glyph\"===array[_i3].Type||\"Points\"===array[_i3].Type||\"Lines\"===array[_i3].Type)&&count++;return count}return 0},getNumberOfObjectsInRegions=regionJson=>{var counts=regionJson.Primitives?getNumberOfDownloadsInArray(regionJson.Primitives,!1):0;return regionJson.Children&&Object.values(regionJson.Children).forEach(childRegion=>{counts+=getNumberOfObjectsInRegions(childRegion)}),counts},getNumberOfObjects=metadata=>{if(Array.isArray(metadata))return getNumberOfDownloadsInArray(metadata,!0);return\"object\"==typeof metadata&&null!==metadata&&\"2.0\"===metadata.Version?getNumberOfObjectsInRegions(metadata.Regions):void 0},readVersionOneRegionPath=(region,referenceURL,item,order,callback)=>{var targetRegion=region;//Render order is set to i * 2 to account for front and back rendering\nitem.RegionPath&&\"\"!==item.RegionPath&&(targetRegion=region.findOrCreateChildFromPath(item.RegionPath)),readPrimitivesItem(targetRegion,referenceURL,item,2*order,callback)},loadVersionOne=(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback)=>{// Prioritise the view file and settings before loading anything else\nfor(var numberOfObjects=getNumberOfObjects(metadata),callback=new metaFinishCallback(numberOfObjects,finishCallback,allCompletedCallback),_i4=0;_i4<metadata.length;_i4++)readViewAndSettingsItem(referenceURL,metadata[_i4],callback);for(var _i5=0;_i5<metadata.length;_i5++)readVersionOneRegionPath(targetRegion,referenceURL,metadata[_i5],_i5,callback)},loadVersionTwo=(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback)=>{var numberOfObjects=getNumberOfObjects(metadata),callback=new metaFinishCallback(numberOfObjects,finishCallback,allCompletedCallback);// view file does not receive callback\nmetadata.Settings&&this.loadSettings(metadata.Settings),metadata.Views&&loadMultipleViews(referenceURL,metadata.Views,referenceURL),metadata.Regions&&loadRegions(targetRegion,referenceURL,metadata.Regions,callback)};/**\n * Load a metadata file from the provided URL into this scene. Once\n * succssful scene proceeds to read each items into scene for visualisations.\n * \n * @param {String} url - Location of the metafile\n * @param {Function} finishCallback - Callback function which will be called\n * for each glyphset and geometry that has been written in.\n */this.loadMetadataURL=(targetRegion,url,finishCallback,allCompletedCallback)=>{var xmlhttp=new XMLHttpRequest,requestURL=resolveURL(url);xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){scene.resetMetadata(),scene.resetDuration(),viewLoaded=!1;var referenceURL=xmlhttp.responseURL;referenceURL===void 0&&(referenceURL=new URL(requestURL).href);var metadata=JSON.parse(xmlhttp.responseText);Array.isArray(metadata)?loadVersionOne(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback):\"object\"==typeof metadata&&null!==metadata&&\"2.0\"==metadata.Version&&loadVersionTwo(targetRegion,metadata,referenceURL,finishCallback,allCompletedCallback)}},xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()}};\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"STLLoader\", function() { return STLLoader; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Description: A THREE loader for STL ASCII files, as created by Solidworks and other CAD programs.\n *\n * Supports both binary and ASCII encoded files, with automatic detection of type.\n *\n * The loader returns a non-indexed buffer geometry.\n *\n * Limitations:\n * Binary decoding supports \"Magics\" color format (http://en.wikipedia.org/wiki/STL_(file_format)#Color_in_binary_STL).\n * There is perhaps some question as to how valid it is to always assume little-endian-ness.\n * ASCII decoding assumes file is UTF-8.\n *\n * Usage:\n * const loader = new STLLoader();\n * loader.load( './models/stl/slotted_disk.stl', function ( geometry ) {\n * scene.add( new THREE.Mesh( geometry ) );\n * });\n *\n * For binary STLs geometry might contain colors for vertices. To use it:\n * // use the same code to load STL as above\n * if (geometry.hasColors) {\n * material = new THREE.MeshPhongMaterial({ opacity: geometry.alpha, vertexColors: true });\n * } else { .... }\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For ASCII STLs containing multiple solids, each solid is assigned to a different group.\n * Groups can be used to assign a different color by defining an array of materials with the same length of\n * geometry.groups and passing it to the Mesh constructor:\n *\n * const mesh = new THREE.Mesh( geometry, material );\n *\n * For example:\n *\n * const materials = [];\n * const nGeometryGroups = geometry.groups.length;\n *\n * const colorMap = ...; // Some logic to index colors.\n *\n * for (let i = 0; i < nGeometryGroups; i++) {\n *\n *\t\tconst material = new THREE.MeshPhongMaterial({\n *\t\t\tcolor: colorMap[i],\n *\t\t\twireframe: false\n *\t\t});\n *\n * }\n *\n * materials.push(material);\n * const mesh = new THREE.Mesh(geometry, materials);\n */class STLLoader extends three__WEBPACK_IMPORTED_MODULE_0__[\"Loader\"]{constructor(manager){super(manager)}load(url,onLoad,onProgress,onError){var scope=this,loader=new three__WEBPACK_IMPORTED_MODULE_0__[\"FileLoader\"](this.manager);loader.setPath(this.path),loader.setResponseType(\"arraybuffer\"),loader.setRequestHeader(this.requestHeader),loader.setWithCredentials(this.withCredentials),loader.load(url,function(text){try{onLoad(scope.parse(text))}catch(e){onError?onError(e):console.error(e),scope.manager.itemError(url)}},onProgress,onError)}parse(data){function matchDataViewAt(query,reader,offset){// Check if each byte in query matches the corresponding byte from the current offset\nfor(var i=0,il=query.length;i<il;i++)if(query[i]!==reader.getUint8(offset+i,!1))return!1;return!0}// start\nvar binData=function(buffer){if(\"string\"==typeof buffer){for(var array_buffer=new Uint8Array(buffer.length),i=0;i<buffer.length;i++)array_buffer[i]=255&buffer.charCodeAt(i);// implicitly assumes little-endian\nreturn array_buffer.buffer||array_buffer}return buffer}(data);return function(data){var reader=new DataView(data),n_faces=reader.getUint32(80,!0);if(80+32/8+n_faces*(3*(32/8)+3*(3*(32/8))+16/8)===reader.byteLength)return!0;// An ASCII STL data must begin with 'solid ' as the first six bytes.\n// However, ASCII STLs lacking the SPACE after the 'd' are known to be\n// plentiful. So, check the first 5 bytes for 'solid'.\n// Several encodings, such as UTF-8, precede the text with up to 5 bytes:\n// https://en.wikipedia.org/wiki/Byte_order_mark#Byte_order_marks_by_encoding\n// Search for \"solid\" to start anywhere after those prefixes.\n// US-ASCII ordinal values for 's', 'o', 'l', 'i', 'd'\nfor(var solid=[115,111,108,105,100],off=0;5>off;off++)// If \"solid\" text is matched to the current offset, declare it to be an ASCII STL.\nif(matchDataViewAt(solid,reader,off))return!1;// Couldn't find \"solid\" text at the beginning; it is binary STL.\nreturn!0}(binData)?function(data){// process STL header\n// check for default color in header (\"COLOR=rgba\" sequence).\nfor(var r,g,b,colors,defaultR,defaultG,defaultB,alpha,reader=new DataView(data),faces=reader.getUint32(80,!0),hasColors=!1,index=0;index<80-10;index++)1129270351==reader.getUint32(index,!1)/*COLO*/&&82==reader.getUint8(index+4)/*'R'*/&&61==reader.getUint8(index+5)/*'='*/&&(hasColors=!0,colors=new Float32Array(3*(3*faces)),defaultR=reader.getUint8(index+6)/255,defaultG=reader.getUint8(index+7)/255,defaultB=reader.getUint8(index+8)/255,alpha=reader.getUint8(index+9)/255);for(var geometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],vertices=new Float32Array(3*(3*faces)),normals=new Float32Array(3*(3*faces)),face=0;face<faces;face++){var start=84+face*(12*4+2),normalX=reader.getFloat32(start,!0),normalY=reader.getFloat32(start+4,!0),normalZ=reader.getFloat32(start+8,!0);if(hasColors){var packedColor=reader.getUint16(start+48,!0);0==(32768&packedColor)?(r=(31&packedColor)/31,g=(31&packedColor>>5)/31,b=(31&packedColor>>10)/31):(r=defaultR,g=defaultG,b=defaultB)}for(var i=1;3>=i;i++){var vertexstart=start+12*i,componentIdx=3*(3*face)+3*(i-1);vertices[componentIdx]=reader.getFloat32(vertexstart,!0),vertices[componentIdx+1]=reader.getFloat32(vertexstart+4,!0),vertices[componentIdx+2]=reader.getFloat32(vertexstart+8,!0),normals[componentIdx]=normalX,normals[componentIdx+1]=normalY,normals[componentIdx+2]=normalZ,hasColors&&(colors[componentIdx]=r,colors[componentIdx+1]=g,colors[componentIdx+2]=b)}}return geometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](vertices,3)),geometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](normals,3)),hasColors&&(geometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](colors,3)),geometry.hasColors=!0,geometry.alpha=alpha),geometry}(binData):function(data){for(var result,geometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"],patternSolid=/solid([\\s\\S]*?)endsolid/g,patternFace=/facet([\\s\\S]*?)endfacet/g,faceCounter=0,patternFloat=/[\\s]+([+-]?(?:\\d*)(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)/.source,patternVertex=new RegExp(\"vertex\"+patternFloat+patternFloat+patternFloat,\"g\"),patternNormal=new RegExp(\"normal\"+patternFloat+patternFloat+patternFloat,\"g\"),vertices=[],normals=[],normal=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],groupCount=0,startVertex=0,endVertex=0;null!==(result=patternSolid.exec(data));){startVertex=endVertex;for(var solid=result[0];null!==(result=patternFace.exec(solid));){for(var vertexCountPerFace=0,normalCountPerFace=0,text=result[0];null!==(result=patternNormal.exec(text));)normal.x=parseFloat(result[1]),normal.y=parseFloat(result[2]),normal.z=parseFloat(result[3]),normalCountPerFace++;for(;null!==(result=patternVertex.exec(text));)vertices.push(parseFloat(result[1]),parseFloat(result[2]),parseFloat(result[3])),normals.push(normal.x,normal.y,normal.z),vertexCountPerFace++,endVertex++;// every face have to own ONE valid normal\n1!==normalCountPerFace&&console.error(\"THREE.STLLoader: Something isn't right with the normal of face number \"+faceCounter),3!=vertexCountPerFace&&console.error(\"THREE.STLLoader: Something isn't right with the vertices of face number \"+faceCounter),faceCounter++}var start=startVertex,count=endVertex-startVertex;geometry.addGroup(start,count,groupCount),groupCount++}return geometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](vertices,3)),geometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](normals,3)),geometry}(function(buffer){return\"string\"==typeof buffer?buffer:three__WEBPACK_IMPORTED_MODULE_0__[\"LoaderUtils\"].decodeText(new Uint8Array(buffer))}(data))}}\n\n/***/ }),\n/* 34 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"OBJLoader\", function() { return OBJLoader; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\n// o object_name | g group_name\nvar _object_pattern=/^[og]\\s*(.+)?/,_material_library_pattern=/^mtllib /,_material_use_pattern=/^usemtl /,_map_use_pattern=/^usemap /,_vA=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_vB=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_vC=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_ab=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],_cb=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"];// mtllib file_reference\nfunction ParserState(){var state={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function startObject(name,fromDeclaration){// If the current object (initial from reset) is not from a g/o declaration in the parsed\n// file. We need to use it for the first parsed g/o to keep things in sync.\nif(this.object&&!1===this.object.fromDeclaration)return this.object.name=name,void(this.object.fromDeclaration=!1!==fromDeclaration);var previousMaterial=this.object&&\"function\"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;// Inherit previous objects material.\n// Spec tells us that a declared material must be set to all objects until a new material is declared.\n// If a usemtl declaration is encountered while this new object is being parsed, it will\n// overwrite the inherited material. Exception being that there was already face declarations\n// to the inherited material, then it will be preserved for proper MultiMaterial continuation.\nif(this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:name||\"\",fromDeclaration:!1!==fromDeclaration,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function startMaterial(name,libraries){var previous=this._finalize(!1);// New usemtl declaration overwrites an inherited material, except if faces were declared\n// after the material, then it must be preserved for proper MultiMaterial continuation.\nprevious&&(previous.inherited||0>=previous.groupCount)&&this.materials.splice(previous.index,1);var material={index:this.materials.length,name:name||\"\",mtllib:Array.isArray(libraries)&&0<libraries.length?libraries[libraries.length-1]:\"\",smooth:void 0===previous?this.smooth:previous.smooth,groupStart:void 0===previous?0:previous.groupEnd,groupEnd:-1,groupCount:-1,inherited:!1,clone:function clone(index){var cloned={index:\"number\"==typeof index?index:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return cloned.clone=this.clone.bind(cloned),cloned}};return this.materials.push(material),material},currentMaterial:function currentMaterial(){return 0<this.materials.length?this.materials[this.materials.length-1]:void 0},_finalize:function _finalize(end){var lastMultiMaterial=this.currentMaterial();// Ignore objects tail materials if no face declarations followed them before a new o/g started.\nif(lastMultiMaterial&&-1===lastMultiMaterial.groupEnd&&(lastMultiMaterial.groupEnd=this.geometry.vertices.length/3,lastMultiMaterial.groupCount=lastMultiMaterial.groupEnd-lastMultiMaterial.groupStart,lastMultiMaterial.inherited=!1),end&&1<this.materials.length)for(var mi=this.materials.length-1;0<=mi;mi--)0>=this.materials[mi].groupCount&&this.materials.splice(mi,1);// Guarantee at least one empty material, this makes the creation later more straight forward.\nreturn end&&0===this.materials.length&&this.materials.push({name:\"\",smooth:this.smooth}),lastMultiMaterial}},previousMaterial&&previousMaterial.name&&\"function\"==typeof previousMaterial.clone){var declared=previousMaterial.clone(0);declared.inherited=!0,this.object.materials.push(declared)}this.objects.push(this.object)},finalize:function finalize(){this.object&&\"function\"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function parseVertexIndex(value,len){var index=parseInt(value,10);return 3*(0<=index?index-1:index+len/3)},parseNormalIndex:function parseNormalIndex(value,len){var index=parseInt(value,10);return 3*(0<=index?index-1:index+len/3)},parseUVIndex:function parseUVIndex(value,len){var index=parseInt(value,10);return 2*(0<=index?index-1:index+len/2)},addVertex:function addVertex(a,b,c){var src=this.vertices,dst=this.object.geometry.vertices;dst.push(src[a+0],src[a+1],src[a+2]),dst.push(src[b+0],src[b+1],src[b+2]),dst.push(src[c+0],src[c+1],src[c+2])},addVertexPoint:function addVertexPoint(a){var src=this.vertices,dst=this.object.geometry.vertices;dst.push(src[a+0],src[a+1],src[a+2])},addVertexLine:function addVertexLine(a){var src=this.vertices,dst=this.object.geometry.vertices;dst.push(src[a+0],src[a+1],src[a+2])},addNormal:function addNormal(a,b,c){var src=this.normals,dst=this.object.geometry.normals;dst.push(src[a+0],src[a+1],src[a+2]),dst.push(src[b+0],src[b+1],src[b+2]),dst.push(src[c+0],src[c+1],src[c+2])},addFaceNormal:function addFaceNormal(a,b,c){var src=this.vertices,dst=this.object.geometry.normals;_vA.fromArray(src,a),_vB.fromArray(src,b),_vC.fromArray(src,c),_cb.subVectors(_vC,_vB),_ab.subVectors(_vA,_vB),_cb.cross(_ab),_cb.normalize(),dst.push(_cb.x,_cb.y,_cb.z),dst.push(_cb.x,_cb.y,_cb.z),dst.push(_cb.x,_cb.y,_cb.z)},addColor:function addColor(a,b,c){var src=this.colors,dst=this.object.geometry.colors;void 0!==src[a]&&dst.push(src[a+0],src[a+1],src[a+2]),void 0!==src[b]&&dst.push(src[b+0],src[b+1],src[b+2]),void 0!==src[c]&&dst.push(src[c+0],src[c+1],src[c+2])},addUV:function addUV(a,b,c){var src=this.uvs,dst=this.object.geometry.uvs;dst.push(src[a+0],src[a+1]),dst.push(src[b+0],src[b+1]),dst.push(src[c+0],src[c+1])},addDefaultUV:function addDefaultUV(){var dst=this.object.geometry.uvs;dst.push(0,0),dst.push(0,0),dst.push(0,0)},addUVLine:function addUVLine(a){var src=this.uvs,dst=this.object.geometry.uvs;dst.push(src[a+0],src[a+1])},addFace:function addFace(a,b,c,ua,ub,uc,na,nb,nc){var vLen=this.vertices.length,ia=this.parseVertexIndex(a,vLen),ib=this.parseVertexIndex(b,vLen),ic=this.parseVertexIndex(c,vLen);// normals\nif(this.addVertex(ia,ib,ic),this.addColor(ia,ib,ic),void 0!==na&&\"\"!==na){var nLen=this.normals.length;ia=this.parseNormalIndex(na,nLen),ib=this.parseNormalIndex(nb,nLen),ic=this.parseNormalIndex(nc,nLen),this.addNormal(ia,ib,ic)}else this.addFaceNormal(ia,ib,ic);// uvs\nif(void 0!==ua&&\"\"!==ua){var uvLen=this.uvs.length;ia=this.parseUVIndex(ua,uvLen),ib=this.parseUVIndex(ub,uvLen),ic=this.parseUVIndex(uc,uvLen),this.addUV(ia,ib,ic),this.object.geometry.hasUVIndices=!0}else// add placeholder values (for inconsistent face definitions)\nthis.addDefaultUV()},addPointGeometry:function addPointGeometry(vertices){this.object.geometry.type=\"Points\";for(var index,vLen=this.vertices.length,vi=0,l=vertices.length;vi<l;vi++)index=this.parseVertexIndex(vertices[vi],vLen),this.addVertexPoint(index),this.addColor(index)},addLineGeometry:function addLineGeometry(vertices,uvs){this.object.geometry.type=\"Line\";for(var vLen=this.vertices.length,uvLen=this.uvs.length,vi=0,l=vertices.length;vi<l;vi++)this.addVertexLine(this.parseVertexIndex(vertices[vi],vLen));for(var uvi=0,_l=uvs.length;uvi<_l;uvi++)this.addUVLine(this.parseUVIndex(uvs[uvi],uvLen))}};return state.startObject(\"\",!1),state}//\nclass OBJLoader extends three__WEBPACK_IMPORTED_MODULE_0__[\"Loader\"]{constructor(manager){super(manager),this.materials=null}load(url,onLoad,onProgress,onError){var scope=this,loader=new three__WEBPACK_IMPORTED_MODULE_0__[\"FileLoader\"](this.manager);loader.setPath(this.path),loader.setRequestHeader(this.requestHeader),loader.setWithCredentials(this.withCredentials),loader.load(url,function(text){try{onLoad(scope.parse(text))}catch(e){onError?onError(e):console.error(e),scope.manager.itemError(url)}},onProgress,onError)}setMaterials(materials){return this.materials=materials,this}parse(text){var state=new ParserState;-1!==text.indexOf(\"\\r\\n\")&&(text=text.replace(/\\r\\n/g,\"\\n\")),-1!==text.indexOf(\"\\\\\\n\")&&(text=text.replace(/\\\\\\n/g,\"\"));for(var lines=text.split(\"\\n\"),line=\"\",lineFirstChar=\"\",lineLength=0,result=[],trimLeft=\"function\"==typeof\"\".trimLeft,i=0,l=lines.length;i<l;i++)if(line=lines[i],line=trimLeft?line.trimLeft():line.trim(),lineLength=line.length,0!==lineLength&&(lineFirstChar=line.charAt(0),\"#\"!==lineFirstChar))// @todo invoke passed in handler if any\nif(\"v\"===lineFirstChar){var data=line.split(/\\s+/);switch(data[0]){case\"v\":state.vertices.push(parseFloat(data[1]),parseFloat(data[2]),parseFloat(data[3])),7<=data.length?state.colors.push(parseFloat(data[4]),parseFloat(data[5]),parseFloat(data[6])):state.colors.push(void 0,void 0,void 0);break;case\"vn\":state.normals.push(parseFloat(data[1]),parseFloat(data[2]),parseFloat(data[3]));break;case\"vt\":state.uvs.push(parseFloat(data[1]),parseFloat(data[2]));}}else if(\"f\"===lineFirstChar){// Parse the face vertex data into an easy to work with format\nfor(var vertex,lineData=line.substr(1).trim(),vertexData=lineData.split(/\\s+/),faceVertices=[],j=0,jl=vertexData.length;j<jl;j++)if(vertex=vertexData[j],0<vertex.length){var vertexParts=vertex.split(\"/\");faceVertices.push(vertexParts)}// Draw an edge between the first vertex and all subsequent vertices to form an n-gon\nfor(var v1=faceVertices[0],_j=1,_jl=faceVertices.length-1;_j<_jl;_j++){var v2=faceVertices[_j],v3=faceVertices[_j+1];state.addFace(v1[0],v2[0],v3[0],v1[1],v2[1],v3[1],v1[2],v2[2],v3[2])}}else if(\"l\"===lineFirstChar){var lineParts=line.substring(1).trim().split(\" \"),lineVertices=[],lineUVs=[];if(-1===line.indexOf(\"/\"))lineVertices=lineParts;else for(var parts,li=0,llen=lineParts.length;li<llen;li++)parts=lineParts[li].split(\"/\"),\"\"!==parts[0]&&lineVertices.push(parts[0]),\"\"!==parts[1]&&lineUVs.push(parts[1]);state.addLineGeometry(lineVertices,lineUVs)}else if(\"p\"===lineFirstChar){var _lineData=line.substr(1).trim(),pointData=_lineData.split(\" \");state.addPointGeometry(pointData)}else if(null!==(result=_object_pattern.exec(line))){// o object_name\n// or\n// g group_name\n// WORKAROUND: https://bugs.chromium.org/p/v8/issues/detail?id=2869\n// let name = result[ 0 ].substr( 1 ).trim();\nvar name=(\" \"+result[0].substr(1).trim()).substr(1);state.startObject(name)}else if(_material_use_pattern.test(line))// material\nstate.object.startMaterial(line.substring(7).trim(),state.materialLibraries);else if(_material_library_pattern.test(line))// mtl file\nstate.materialLibraries.push(line.substring(7).trim());else if(_map_use_pattern.test(line))// the line is parsed but ignored since the loader assumes textures are defined MTL files\n// (according to https://www.okino.com/conv/imp_wave.htm, 'usemap' is the old-style Wavefront texture reference method)\nconsole.warn(\"THREE.OBJLoader: Rendering identifier \\\"usemap\\\" not supported. Textures must be defined in MTL files.\");else if(\"s\"===lineFirstChar){// smooth shading\n// @todo Handle files that have varying smooth values for a set of faces inside one geometry,\n// but does not define a usemtl for each face set.\n// This should be detected and a dummy material created (later MultiMaterial and geometry groups).\n// This requires some care to not create extra material on each smooth value for \"normal\" obj files.\n// where explicit usemtl defines geometry groups.\n// Example asset: examples/models/obj/cerberus/Cerberus.obj\n/*\n\t\t\t\t\t * http://paulbourke.net/dataformats/obj/\n\t\t\t\t\t * or\n\t\t\t\t\t * http://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf\n\t\t\t\t\t *\n\t\t\t\t\t * From chapter \"Grouping\" Syntax explanation \"s group_number\":\n\t\t\t\t\t * \"group_number is the smoothing group number. To turn off smoothing groups, use a value of 0 or off.\n\t\t\t\t\t * Polygonal elements use group numbers to put elements in different smoothing groups. For free-form\n\t\t\t\t\t * surfaces, smoothing groups are either turned on or off; there is no difference between values greater\n\t\t\t\t\t * than 0.\"\n\t\t\t\t\t */if(result=line.split(\" \"),1<result.length){var value=result[1].trim().toLowerCase();state.object.smooth=\"0\"!==value&&\"off\"!==value}else// ZBrush can produce \"s\" lines #11707\nstate.object.smooth=!0;var material=state.object.currentMaterial();material&&(material.smooth=state.object.smooth)}else{// Handle null terminated files without exception\nif(\"\\0\"===line)continue;console.warn(\"THREE.OBJLoader: Unexpected line: \\\"\"+line+\"\\\"\")}state.finalize();var container=new three__WEBPACK_IMPORTED_MODULE_0__[\"Group\"];container.materialLibraries=[].concat(state.materialLibraries);var hasPrimitives=1!==state.objects.length||0!==state.objects[0].geometry.vertices.length;if(!0==hasPrimitives)for(var _i=0,_l2=state.objects.length;_i<_l2;_i++){var object=state.objects[_i],geometry=object.geometry,materials=object.materials,isLine=\"Line\"===geometry.type,isPoints=\"Points\"===geometry.type,hasVertexColors=!1;// Skip o/g line declarations that did not follow with any faces\nif(0!==geometry.vertices.length){var buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"];buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.vertices,3)),0<geometry.normals.length&&buffergeometry.setAttribute(\"normal\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.normals,3)),0<geometry.colors.length&&(hasVertexColors=!0,buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.colors,3))),!0===geometry.hasUVIndices&&buffergeometry.setAttribute(\"uv\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](geometry.uvs,2));for(var createdMaterials=[],mi=0,miLen=materials.length;mi<miLen;mi++){var sourceMaterial=materials[mi],materialHash=sourceMaterial.name+\"_\"+sourceMaterial.smooth+\"_\"+hasVertexColors,_material=state.materials[materialHash];if(null!==this.materials)// mtl etc. loaders probably can't create line materials correctly, copy properties to a line material.\nif(_material=this.materials.create(sourceMaterial.name),isLine&&_material&&!(_material instanceof three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"])){var materialLine=new three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"];three__WEBPACK_IMPORTED_MODULE_0__[\"Material\"].prototype.copy.call(materialLine,_material),materialLine.color.copy(_material.color),_material=materialLine}else if(isPoints&&_material&&!(_material instanceof three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"])){var materialPoints=new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"]({size:10,sizeAttenuation:!1});three__WEBPACK_IMPORTED_MODULE_0__[\"Material\"].prototype.copy.call(materialPoints,_material),materialPoints.color.copy(_material.color),materialPoints.map=_material.map,_material=materialPoints}void 0===_material&&(_material=isLine?new three__WEBPACK_IMPORTED_MODULE_0__[\"LineBasicMaterial\"]:isPoints?new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"]({size:1,sizeAttenuation:!1}):new three__WEBPACK_IMPORTED_MODULE_0__[\"MeshPhongMaterial\"],_material.name=sourceMaterial.name,_material.flatShading=!sourceMaterial.smooth,_material.vertexColors=hasVertexColors,state.materials[materialHash]=_material),createdMaterials.push(_material)}// Create mesh\nvar mesh=void 0;if(1<createdMaterials.length){for(var _sourceMaterial,_mi=0,_miLen=materials.length;_mi<_miLen;_mi++)_sourceMaterial=materials[_mi],buffergeometry.addGroup(_sourceMaterial.groupStart,_sourceMaterial.groupCount,_mi);mesh=isLine?new three__WEBPACK_IMPORTED_MODULE_0__[\"LineSegments\"](buffergeometry,createdMaterials):isPoints?new three__WEBPACK_IMPORTED_MODULE_0__[\"Points\"](buffergeometry,createdMaterials):new three__WEBPACK_IMPORTED_MODULE_0__[\"Mesh\"](buffergeometry,createdMaterials)}else mesh=isLine?new three__WEBPACK_IMPORTED_MODULE_0__[\"LineSegments\"](buffergeometry,createdMaterials[0]):isPoints?new three__WEBPACK_IMPORTED_MODULE_0__[\"Points\"](buffergeometry,createdMaterials[0]):new three__WEBPACK_IMPORTED_MODULE_0__[\"Mesh\"](buffergeometry,createdMaterials[0]);mesh.name=object.name,container.add(mesh)}}else// if there is only the default parser state object with no geometry data, interpret data as point cloud\nif(0<state.vertices.length){var _material2=new three__WEBPACK_IMPORTED_MODULE_0__[\"PointsMaterial\"]({size:1,sizeAttenuation:!1}),_buffergeometry=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferGeometry\"];_buffergeometry.setAttribute(\"position\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](state.vertices,3)),0<state.colors.length&&void 0!==state.colors[0]&&(_buffergeometry.setAttribute(\"color\",new three__WEBPACK_IMPORTED_MODULE_0__[\"Float32BufferAttribute\"](state.colors,3)),_material2.vertexColors=!0);var points=new three__WEBPACK_IMPORTED_MODULE_0__[\"Points\"](_buffergeometry,_material2);container.add(points)}return container}}\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar JSONLoader=__webpack_require__(15).JSONLoader;exports.PrimitivesLoader=function(){var concurrentDownloads=0;this.crossOrigin=\"Anonymous\";var loader=new JSONLoader,waitingList=[];this.load=(url,onLoad,onProgress,onError)=>{if(20>concurrentDownloads){++concurrentDownloads,loader.crossOrigin=this.crossOrigin;var onLoadCallback=new onFinally(onLoad,this),onErrorCallback=new onFinally(onError,this);loader.load(url,onLoadCallback,onProgress,onErrorCallback)}else waitingList.push({url,onLoad,onProgress,onError})},this.loadFromWaitingList=()=>{var item=waitingList.shift();item&&this.load(item.url,item.onLoad,item.onProgress,item.onError)};var onFinally=function(callback,loader){return function(){--concurrentDownloads,callback(...arguments),loader.loadFromWaitingList()}};this.parse=data=>loader.parse(data)};\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),GLTFLoader=__webpack_require__(37).GLTFLoader,GLTFToZincJSLoader=function(){var _this=this;/**\n * Load GLTF into this scene object.\n * \n * @param {String} url - URL to the GLTF file\n * @param {Function} finishCallback - Callback function which will be called\n * once the glyphset is succssfully load in.\n */this.parseGLTFObjects=(object,region,depth,finishCallback)=>{var childRegion=region;if(0!==depth)if(\"Object3D\"!==object.type){var zincGeometry;if(\"Mesh\"===object.type?zincGeometry=new(__webpack_require__(2).Geometry):\"LineSegments\"===object.type?zincGeometry=new(__webpack_require__(21).Lines):\"Points\"===object.type&&(zincGeometry=new(__webpack_require__(18).Pointset)),zincGeometry){var localTimeEnabled=!1,localMorphColour=!1;object.geometry&&object.geometry.morphAttributes&&(localTimeEnabled=!!object.geometry.morphAttributes.position,localMorphColour=!!object.geometry.morphAttributes.color),zincGeometry.setMesh(object.clone(),localTimeEnabled,localMorphColour),region.addZincObject(zincGeometry);var morph=zincGeometry.getMorph();zincGeometry.groupName=morph.name,morph.matrixAutoUpdate=!0,null!=finishCallback&&\"function\"==typeof finishCallback&&finishCallback(zincGeometry)}}else if(\"\"!==object.name&&(region&&(childRegion=region.findOrCreateChildFromPath(object.name)),childRegion)){var group=childRegion.getGroup();group.position.copy(object.position),group.rotation.copy(object.rotation),group.quaternion.copy(object.quaternion),group.matrixAutoUpdate=!0}depth++,object.children.forEach(child=>{_this.parseGLTFObjects(child,childRegion,depth,finishCallback)})},this.setCamera=scene=>{scene.viewAll();var cameraControls=scene.getZincCameraControls(),viewport=cameraControls.getCurrentViewport();cameraControls.addViewport(\"default\",viewport),cameraControls.setDefaultViewport(\"default\")},this.load=(scene,region,url,finishCallback,allCompletedCallback)=>{var path=url.substring(0,url.lastIndexOf(\"/\")+1),filename=url.substring(url.lastIndexOf(\"/\")+1,url.length),loader=new GLTFLoader().setPath(path);loader.load(filename,function(gltf){console.log(gltf),_this.parseGLTFObjects(gltf.scene,region,0,finishCallback),_this.setCamera(scene),allCompletedCallback!=null&&\"function\"==typeof allCompletedCallback&&allCompletedCallback()})}};exports.GLTFToZincJSLoader=GLTFToZincJSLoader;\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! three/examples/jsm/loaders/GLTFLoader */ \"./node_modules/three/examples/jsm/loaders/GLTFLoader.js\");\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar GLTFExporter=__webpack_require__(39).GLTFExporter,SceneExporter=function(sceneIn){var scene=sceneIn;this.exportGLTF=binary=>{var rootRegion=scene.getRootRegion(),zincObjects=rootRegion.getAllObjects(!0),animations=[];zincObjects.forEach(zincObject=>{zincObject.animationClip&&animations.push({clip:zincObject.animationClip[0],mesh:zincObject.getMorph()})});var exporter=new GLTFExporter,options={binary,animations};return new Promise(resolve=>{exporter.parse(scene.getThreeJSScene(),function(gltf){resolve(gltf)},options)})}};/**\n * Provides an object which uses for exporting the scene\n * \n * @class\n * @author Alan Wu\n * @return {SceneExporter}\n */exports.SceneExporter=SceneExporter;\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"GLTFExporter\", function() { return GLTFExporter; });\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3);\n/* harmony import */ var three__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(three__WEBPACK_IMPORTED_MODULE_0__);\nclass GLTFExporter{constructor(){this.pluginCallbacks=[],this.register(function(writer){return new GLTFLightExtension(writer)}),this.register(function(writer){return new GLTFMaterialsUnlitExtension(writer)}),this.register(function(writer){return new GLTFMaterialsPBRSpecularGlossiness(writer)})}register(callback){return-1===this.pluginCallbacks.indexOf(callback)&&this.pluginCallbacks.push(callback),this}unregister(callback){return-1!==this.pluginCallbacks.indexOf(callback)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(callback),1),this}/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */parse(input,onDone,options){for(var writer=new GLTFWriter,plugins=[],i=0,il=this.pluginCallbacks.length;i<il;i++)plugins.push(this.pluginCallbacks[i](writer));writer.setPlugins(plugins),writer.write(input,onDone,options)}}//------------------------------------------------------------------------------\n// Constants\n//------------------------------------------------------------------------------\nvar WEBGL_CONSTANTS={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,FLOAT:5126,UNSIGNED_INT:5125,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497},THREE_TO_WEBGL={};THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"NearestFilter\"]]=WEBGL_CONSTANTS.NEAREST,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"NearestMipmapNearestFilter\"]]=WEBGL_CONSTANTS.NEAREST_MIPMAP_NEAREST,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"NearestMipmapLinearFilter\"]]=WEBGL_CONSTANTS.NEAREST_MIPMAP_LINEAR,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"LinearFilter\"]]=WEBGL_CONSTANTS.LINEAR,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"LinearMipmapNearestFilter\"]]=WEBGL_CONSTANTS.LINEAR_MIPMAP_NEAREST,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"LinearMipmapLinearFilter\"]]=WEBGL_CONSTANTS.LINEAR_MIPMAP_LINEAR,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"ClampToEdgeWrapping\"]]=WEBGL_CONSTANTS.CLAMP_TO_EDGE,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"RepeatWrapping\"]]=WEBGL_CONSTANTS.REPEAT,THREE_TO_WEBGL[three__WEBPACK_IMPORTED_MODULE_0__[\"MirroredRepeatWrapping\"]]=WEBGL_CONSTANTS.MIRRORED_REPEAT;var PATH_PROPERTIES={scale:\"scale\",position:\"translation\",quaternion:\"rotation\",morphTargetInfluences:\"weights\"},GLB_HEADER_BYTES=12,GLB_HEADER_MAGIC=1179937895,GLB_VERSION=2,GLB_CHUNK_PREFIX_BYTES=8,GLB_CHUNK_TYPE_JSON=1313821514,GLB_CHUNK_TYPE_BIN=5130562;// GLB constants\n// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\n//------------------------------------------------------------------------------\n// Utility functions\n//------------------------------------------------------------------------------\n/**\n * Compare two arrays\n * @param {Array} array1 Array 1 to compare\n * @param {Array} array2 Array 2 to compare\n * @return {Boolean} Returns true if both arrays are equal\n */function equalArray(array1,array2){return array1.length===array2.length&&array1.every(function(element,index){return element===array2[index]})}/**\n * Converts a string to an ArrayBuffer.\n * @param {string} text\n * @return {ArrayBuffer}\n */function stringToArrayBuffer(text){if(window.TextEncoder!==void 0)return new TextEncoder().encode(text).buffer;for(var value,array=new Uint8Array(new ArrayBuffer(text.length)),i=0,il=text.length;i<il;i++)// Replacing multi-byte character with space(0x20).\nvalue=text.charCodeAt(i),array[i]=255<value?32:value;return array.buffer}/**\n * Is identity matrix\n *\n * @param {Matrix4} matrix\n * @returns {Boolean} Returns true, if parameter is identity matrix\n */function isIdentityMatrix(matrix){return equalArray(matrix.elements,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}/**\n * Get the min and max vectors from the given attribute\n * @param {BufferAttribute} attribute Attribute to find the min/max in range from start to start + count\n * @param {Integer} start\n * @param {Integer} count\n * @return {Object} Object containing the `min` and `max` values (As an array of attribute.itemSize components)\n */function getMinMax(attribute,start,count){for(var output={min:Array(attribute.itemSize).fill(Number.POSITIVE_INFINITY),max:Array(attribute.itemSize).fill(Number.NEGATIVE_INFINITY)},i=start;i<start+count;i++)for(var value,a=0;a<attribute.itemSize;a++)value=void 0,4<attribute.itemSize?value=attribute.array[i*attribute.itemSize+a]:0===a?value=attribute.getX(i):1===a?value=attribute.getY(i):2===a?value=attribute.getZ(i):3==a&&(value=attribute.getW(i)),output.min[a]=Math.min(output.min[a],value),output.max[a]=Math.max(output.max[a],value);return output}/**\n * Get the required size + padding for a buffer, rounded to the next 4-byte boundary.\n * https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#data-alignment\n *\n * @param {Integer} bufferSize The size the original buffer.\n * @returns {Integer} new buffer size with required padding.\n *\n */function getPaddedBufferSize(bufferSize){return 4*Math.ceil(bufferSize/4)}/**\n * Returns a buffer aligned to 4-byte boundary.\n *\n * @param {ArrayBuffer} arrayBuffer Buffer to pad\n * @param {Integer} paddingByte (Optional)\n * @returns {ArrayBuffer} The same buffer if it's already aligned to 4-byte boundary or a new buffer\n */function getPaddedArrayBuffer(arrayBuffer){var paddingByte=1<arguments.length&&arguments[1]!==void 0?arguments[1]:0,paddedLength=getPaddedBufferSize(arrayBuffer.byteLength);if(paddedLength!==arrayBuffer.byteLength){var array=new Uint8Array(paddedLength);if(array.set(new Uint8Array(arrayBuffer)),0!==paddingByte)for(var i=arrayBuffer.byteLength;i<paddedLength;i++)array[i]=paddingByte;return array.buffer}return arrayBuffer}var cachedCanvas=null;/**\n * Writer\n */class GLTFWriter{constructor(){this.plugins=[],this.options={},this.pending=[],this.buffers=[],this.byteOffset=0,this.buffers=[],this.nodeMap=new Map,this.skins=[],this.extensionsUsed={},this.uids=new Map,this.uid=0,this.json={asset:{version:\"2.0\",generator:\"THREE.GLTFExporter\"}},this.cache={meshes:new Map,attributes:new Map,attributesNormalized:new Map,materials:new Map,textures:new Map,images:new Map}}setPlugins(plugins){this.plugins=plugins}/**\n\t * Parse scenes and generate GLTF output\n\t * @param {Scene or [THREE.Scenes]} input Scene or Array of THREE.Scenes\n\t * @param {Function} onDone Callback on completed\n\t * @param {Object} options options\n\t */write(input,onDone,options){this.options=Object.assign({},{// default options\nbinary:!1,trs:!1,onlyVisible:!0,truncateDrawRange:!0,embedImages:!0,maxTextureSize:1/0,animations:[],includeCustomExtensions:!1},options),0<this.options.animations.length&&(this.options.trs=!0),this.processInput(input);var writer=this;Promise.all(this.pending).then(function(){var buffers=writer.buffers,json=writer.json,options=writer.options,extensionsUsed=writer.extensionsUsed,blob=new Blob(buffers,{type:\"application/octet-stream\"}),extensionsUsedList=Object.keys(extensionsUsed);if(0<extensionsUsedList.length&&(json.extensionsUsed=extensionsUsedList),json.buffers&&0<json.buffers.length&&(json.buffers[0].byteLength=blob.size),!0===options.binary){// https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#glb-file-format-specification\nvar reader=new window.FileReader;reader.readAsArrayBuffer(blob),reader.onloadend=function(){// Binary chunk.\nvar binaryChunk=getPaddedArrayBuffer(reader.result),binaryChunkPrefix=new DataView(new ArrayBuffer(GLB_CHUNK_PREFIX_BYTES));binaryChunkPrefix.setUint32(0,binaryChunk.byteLength,!0),binaryChunkPrefix.setUint32(4,GLB_CHUNK_TYPE_BIN,!0);// JSON chunk.\nvar jsonChunk=getPaddedArrayBuffer(stringToArrayBuffer(JSON.stringify(json)),32),jsonChunkPrefix=new DataView(new ArrayBuffer(GLB_CHUNK_PREFIX_BYTES));jsonChunkPrefix.setUint32(0,jsonChunk.byteLength,!0),jsonChunkPrefix.setUint32(4,GLB_CHUNK_TYPE_JSON,!0);// GLB header.\nvar header=new ArrayBuffer(GLB_HEADER_BYTES),headerView=new DataView(header);headerView.setUint32(0,GLB_HEADER_MAGIC,!0),headerView.setUint32(4,GLB_VERSION,!0);var totalByteLength=GLB_HEADER_BYTES+jsonChunkPrefix.byteLength+jsonChunk.byteLength+binaryChunkPrefix.byteLength+binaryChunk.byteLength;headerView.setUint32(8,totalByteLength,!0);var glbBlob=new Blob([header,jsonChunkPrefix,jsonChunk,binaryChunkPrefix,binaryChunk],{type:\"application/octet-stream\"}),glbReader=new window.FileReader;glbReader.readAsArrayBuffer(glbBlob),glbReader.onloadend=function(){onDone(glbReader.result)}}}else if(json.buffers&&0<json.buffers.length){var _reader=new window.FileReader;_reader.readAsDataURL(blob),_reader.onloadend=function(){var base64data=_reader.result;json.buffers[0].uri=base64data,onDone(json)}}else onDone(json)})}/**\n\t * Serializes a userData.\n\t *\n\t * @param {THREE.Object3D|THREE.Material} object\n\t * @param {Object} objectDef\n\t */serializeUserData(object,objectDef){if(!(object.userData&&object.userData.isZincObject)&&0!==Object.keys(object.userData).length){var options=this.options,extensionsUsed=this.extensionsUsed;try{var json=JSON.parse(JSON.stringify(object.userData));if(options.includeCustomExtensions&&json.gltfExtensions){for(var extensionName in void 0===objectDef.extensions&&(objectDef.extensions={}),json.gltfExtensions)objectDef.extensions[extensionName]=json.gltfExtensions[extensionName],extensionsUsed[extensionName]=!0;delete json.gltfExtensions}0<Object.keys(json).length&&(objectDef.extras=json)}catch(error){console.warn(\"THREE.GLTFExporter: userData of '\"+object.name+\"' \"+\"won't be serialized because of JSON.stringify error - \"+error.message)}}}/**\n\t * Assign and return a temporal unique id for an object\n\t * especially which doesn't have .uuid\n\t * @param {Object} object\n\t * @return {Integer}\n\t */getUID(object){return this.uids.has(object)||this.uids.set(object,this.uid++),this.uids.get(object)}/**\n\t * Checks if normal attribute values are normalized.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {Boolean}\n\t */isNormalizedNormalAttribute(normal){var cache=this.cache;if(cache.attributesNormalized.has(normal))return!1;for(var v=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],i=0,il=normal.count;i<il;i++)// 0.0005 is from glTF-validator\nif(5e-4<Math.abs(v.fromBufferAttribute(normal,i).length()-1))return!1;return!0}/**\n\t * Creates normalized normal buffer attribute.\n\t *\n\t * @param {BufferAttribute} normal\n\t * @returns {BufferAttribute}\n\t *\n\t */createNormalizedNormalAttribute(normal){var cache=this.cache;if(cache.attributesNormalized.has(normal))return cache.attributesNormalized.get(normal);for(var attribute=normal.clone(),v=new three__WEBPACK_IMPORTED_MODULE_0__[\"Vector3\"],i=0,il=attribute.count;i<il;i++)v.fromBufferAttribute(attribute,i),0===v.x&&0===v.y&&0===v.z?v.setX(1):v.normalize(),attribute.setXYZ(i,v.x,v.y,v.z);return cache.attributesNormalized.set(normal,attribute),attribute}/**\n\t * Applies a texture transform, if present, to the map definition. Requires\n\t * the KHR_texture_transform extension.\n\t *\n\t * @param {Object} mapDef\n\t * @param {THREE.Texture} texture\n\t */applyTextureTransform(mapDef,texture){var didTransform=!1,transformDef={};(0!==texture.offset.x||0!==texture.offset.y)&&(transformDef.offset=texture.offset.toArray(),didTransform=!0),0!==texture.rotation&&(transformDef.rotation=texture.rotation,didTransform=!0),(1!==texture.repeat.x||1!==texture.repeat.y)&&(transformDef.scale=texture.repeat.toArray(),didTransform=!0),didTransform&&(mapDef.extensions=mapDef.extensions||{},mapDef.extensions.KHR_texture_transform=transformDef,this.extensionsUsed.KHR_texture_transform=!0)}/**\n\t * Process a buffer to append to the default one.\n\t * @param {ArrayBuffer} buffer\n\t * @return {Integer}\n\t */processBuffer(buffer){var json=this.json,buffers=this.buffers;return json.buffers||(json.buffers=[{byteLength:0}]),buffers.push(buffer),0}/**\n\t * Process and generate a BufferView\n\t * @param {BufferAttribute} attribute\n\t * @param {number} componentType\n\t * @param {number} start\n\t * @param {number} count\n\t * @param {number} target (Optional) Target usage of the BufferView\n\t * @return {Object}\n\t */processBufferView(attribute,componentType,start,count,target){var json=this.json;json.bufferViews||(json.bufferViews=[]);// Create a new dataview and dump the attribute's array into it\nvar componentSize=componentType===WEBGL_CONSTANTS.UNSIGNED_BYTE?1:componentType===WEBGL_CONSTANTS.UNSIGNED_SHORT?2:4;for(var byteLength=getPaddedBufferSize(count*attribute.itemSize*componentSize),dataView=new DataView(new ArrayBuffer(byteLength)),offset=0,i=start;i<start+count;i++)for(var value,a=0;a<attribute.itemSize;a++)value=void 0,4<attribute.itemSize?value=attribute.array[i*attribute.itemSize+a]:0===a?value=attribute.getX(i):1===a?value=attribute.getY(i):2===a?value=attribute.getZ(i):3==a&&(value=attribute.getW(i)),componentType===WEBGL_CONSTANTS.FLOAT?dataView.setFloat32(offset,value,!0):componentType===WEBGL_CONSTANTS.UNSIGNED_INT?dataView.setUint32(offset,value,!0):componentType===WEBGL_CONSTANTS.UNSIGNED_SHORT?dataView.setUint16(offset,value,!0):componentType===WEBGL_CONSTANTS.UNSIGNED_BYTE&&dataView.setUint8(offset,value),offset+=componentSize;var bufferViewDef={buffer:this.processBuffer(dataView.buffer),byteOffset:this.byteOffset,byteLength:byteLength};target!==void 0&&(bufferViewDef.target=target),target===WEBGL_CONSTANTS.ARRAY_BUFFER&&(bufferViewDef.byteStride=attribute.itemSize*componentSize),this.byteOffset+=byteLength,json.bufferViews.push(bufferViewDef);// @TODO Merge bufferViews where possible.\nvar output={id:json.bufferViews.length-1,byteLength:0};return output}/**\n\t * Process and generate a BufferView from an image Blob.\n\t * @param {Blob} blob\n\t * @return {Promise<Integer>}\n\t */processBufferViewImage(blob){var writer=this,json=writer.json;return json.bufferViews||(json.bufferViews=[]),new Promise(function(resolve){var reader=new window.FileReader;reader.readAsArrayBuffer(blob),reader.onloadend=function(){var buffer=getPaddedArrayBuffer(reader.result),bufferViewDef={buffer:writer.processBuffer(buffer),byteOffset:writer.byteOffset,byteLength:buffer.byteLength};writer.byteOffset+=buffer.byteLength,resolve(json.bufferViews.push(bufferViewDef)-1)}})}/**\n\t * Process attribute to generate an accessor\n\t * @param {BufferAttribute} attribute Attribute to process\n\t * @param {THREE.BufferGeometry} geometry (Optional) Geometry used for truncated draw range\n\t * @param {Integer} start (Optional)\n\t * @param {Integer} count (Optional)\n\t * @return {Integer|null} Index of the processed accessor on the \"accessors\" array\n\t */processAccessor(attribute,geometry,start,count){var componentType,options=this.options,json=this.json;// Detect the component type of the attribute array (float, uint or ushort)\nif(attribute.array.constructor===Float32Array)componentType=WEBGL_CONSTANTS.FLOAT;else if(attribute.array.constructor===Uint32Array)componentType=WEBGL_CONSTANTS.UNSIGNED_INT;else if(attribute.array.constructor===Uint16Array)componentType=WEBGL_CONSTANTS.UNSIGNED_SHORT;else if(attribute.array.constructor===Uint8Array)componentType=WEBGL_CONSTANTS.UNSIGNED_BYTE;else throw new Error(\"THREE.GLTFExporter: Unsupported bufferAttribute component type.\");// @TODO Indexed buffer geometry with drawRange not supported yet\nif(void 0===start&&(start=0),void 0===count&&(count=attribute.count),options.truncateDrawRange&&void 0!==geometry&&null===geometry.index){var end=start+count,end2=geometry.drawRange.count===1/0?attribute.count:geometry.drawRange.start+geometry.drawRange.count;start=Math.max(start,geometry.drawRange.start),count=Math.min(end,end2)-start,0>count&&(count=0)}// Skip creating an accessor if the attribute doesn't have data to export\nif(0===count)return null;var bufferViewTarget,minMax=getMinMax(attribute,start,count);void 0!==geometry&&(bufferViewTarget=attribute===geometry.index?WEBGL_CONSTANTS.ELEMENT_ARRAY_BUFFER:WEBGL_CONSTANTS.ARRAY_BUFFER);var bufferView=this.processBufferView(attribute,componentType,start,count,bufferViewTarget),accessorDef={bufferView:bufferView.id,byteOffset:bufferView.byteOffset,componentType:componentType,count:count,max:minMax.max,min:minMax.min,type:{1:\"SCALAR\",2:\"VEC2\",3:\"VEC3\",4:\"VEC4\",16:\"MAT4\"}[attribute.itemSize]};return!0===attribute.normalized&&(accessorDef.normalized=!0),json.accessors||(json.accessors=[]),json.accessors.push(accessorDef)-1}/**\n\t * Process image\n\t * @param {Image} image to process\n\t * @param {Integer} format of the image (e.g. RGBFormat, RGBAFormat etc)\n\t * @param {Boolean} flipY before writing out the image\n\t * @return {Integer} Index of the processed texture in the \"images\" array\n\t */processImage(image,format,flipY){var writer=this,cache=writer.cache,json=writer.json,options=writer.options,pending=writer.pending;cache.images.has(image)||cache.images.set(image,{});var cachedImages=cache.images.get(image),mimeType=format===three__WEBPACK_IMPORTED_MODULE_0__[\"RGBAFormat\"]?\"image/png\":\"image/jpeg\",key=mimeType+\":flipY/\"+flipY.toString();if(void 0!==cachedImages[key])return cachedImages[key];json.images||(json.images=[]);var imageDef={mimeType:mimeType};if(options.embedImages){var canvas=cachedCanvas=cachedCanvas||document.createElement(\"canvas\");canvas.width=Math.min(image.width,options.maxTextureSize),canvas.height=Math.min(image.height,options.maxTextureSize);var ctx=canvas.getContext(\"2d\");if(!0===flipY&&(ctx.translate(0,canvas.height),ctx.scale(1,-1)),\"undefined\"!=typeof HTMLImageElement&&image instanceof HTMLImageElement||\"undefined\"!=typeof HTMLCanvasElement&&image instanceof HTMLCanvasElement||\"undefined\"!=typeof OffscreenCanvas&&image instanceof OffscreenCanvas||\"undefined\"!=typeof ImageBitmap&&image instanceof ImageBitmap)ctx.drawImage(image,0,0,canvas.width,canvas.height);else{format!==three__WEBPACK_IMPORTED_MODULE_0__[\"RGBAFormat\"]&&format!==three__WEBPACK_IMPORTED_MODULE_0__[\"RGBFormat\"]&&console.error(\"GLTFExporter: Only RGB and RGBA formats are supported.\"),(image.width>options.maxTextureSize||image.height>options.maxTextureSize)&&console.warn(\"GLTFExporter: Image size is bigger than maxTextureSize\",image);var data=new Uint8ClampedArray(4*(image.height*image.width));if(format===three__WEBPACK_IMPORTED_MODULE_0__[\"RGBAFormat\"])for(var i=0;i<data.length;i+=4)data[i+0]=image.data[i+0],data[i+1]=image.data[i+1],data[i+2]=image.data[i+2],data[i+3]=image.data[i+3];else for(var _i=0,j=0;_i<data.length;_i+=4,j+=3)data[_i+0]=image.data[j+0],data[_i+1]=image.data[j+1],data[_i+2]=image.data[j+2],data[_i+3]=255;ctx.putImageData(new ImageData(data,image.width,image.height),0,0)}!0===options.binary?pending.push(new Promise(function(resolve){canvas.toBlob(function(blob){writer.processBufferViewImage(blob).then(function(bufferViewIndex){imageDef.bufferView=bufferViewIndex,resolve()})},mimeType)})):imageDef.uri=canvas.toDataURL(mimeType)}else imageDef.uri=image.src;var index=json.images.push(imageDef)-1;return cachedImages[key]=index,index}/**\n\t * Process sampler\n\t * @param {Texture} map Texture to process\n\t * @return {Integer} Index of the processed texture in the \"samplers\" array\n\t */processSampler(map){var json=this.json;json.samplers||(json.samplers=[]);var samplerDef={magFilter:THREE_TO_WEBGL[map.magFilter],minFilter:THREE_TO_WEBGL[map.minFilter],wrapS:THREE_TO_WEBGL[map.wrapS],wrapT:THREE_TO_WEBGL[map.wrapT]};return json.samplers.push(samplerDef)-1}/**\n\t * Process texture\n\t * @param {Texture} map Map to process\n\t * @return {Integer} Index of the processed texture in the \"textures\" array\n\t */processTexture(map){var cache=this.cache,json=this.json;if(cache.textures.has(map))return cache.textures.get(map);json.textures||(json.textures=[]);var textureDef={sampler:this.processSampler(map),source:this.processImage(map.image,map.format,map.flipY)};map.name&&(textureDef.name=map.name),this._invokeAll(function(ext){ext.writeTexture&&ext.writeTexture(map,textureDef)});var index=json.textures.push(textureDef)-1;return cache.textures.set(map,index),index}/**\n\t * Process material\n\t * @param {THREE.Material} material Material to process\n\t * @return {Integer|null} Index of the processed material in the \"materials\" array\n\t */processMaterial(material){var cache=this.cache,json=this.json;if(cache.materials.has(material))return cache.materials.get(material);if(material.isShaderMaterial)return console.warn(\"GLTFExporter: THREE.ShaderMaterial not supported.\"),null;json.materials||(json.materials=[]);// @QUESTION Should we avoid including any attribute that has the default value?\nvar materialDef={pbrMetallicRoughness:{}};!0!==material.isMeshStandardMaterial&&!0!==material.isMeshBasicMaterial&&console.warn(\"GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results.\");// pbrMetallicRoughness.baseColorFactor\nvar color=material.color.toArray().concat([material.opacity]);// pbrMetallicRoughness.metallicRoughnessTexture\nif(equalArray(color,[1,1,1,1])||(materialDef.pbrMetallicRoughness.baseColorFactor=color),material.isMeshStandardMaterial?(materialDef.pbrMetallicRoughness.metallicFactor=material.metalness,materialDef.pbrMetallicRoughness.roughnessFactor=material.roughness):(materialDef.pbrMetallicRoughness.metallicFactor=.5,materialDef.pbrMetallicRoughness.roughnessFactor=.5),material.metalnessMap||material.roughnessMap)if(material.metalnessMap===material.roughnessMap){var metalRoughMapDef={index:this.processTexture(material.metalnessMap)};this.applyTextureTransform(metalRoughMapDef,material.metalnessMap),materialDef.pbrMetallicRoughness.metallicRoughnessTexture=metalRoughMapDef}else console.warn(\"THREE.GLTFExporter: Ignoring metalnessMap and roughnessMap because they are not the same Texture.\");// pbrMetallicRoughness.baseColorTexture or pbrSpecularGlossiness diffuseTexture\nif(material.map){var baseColorMapDef={index:this.processTexture(material.map)};this.applyTextureTransform(baseColorMapDef,material.map),materialDef.pbrMetallicRoughness.baseColorTexture=baseColorMapDef}if(material.emissive){// note: emissive components are limited to stay within the 0 - 1 range to accommodate glTF spec. see #21849 and #22000.\nvar emissive=material.emissive.clone().multiplyScalar(material.emissiveIntensity),maxEmissiveComponent=Math.max(emissive.r,emissive.g,emissive.b);// emissiveTexture\nif(1<maxEmissiveComponent&&(emissive.multiplyScalar(1/maxEmissiveComponent),console.warn(\"THREE.GLTFExporter: Some emissive components exceed 1; emissive has been limited\")),0<maxEmissiveComponent&&(materialDef.emissiveFactor=emissive.toArray()),material.emissiveMap){var emissiveMapDef={index:this.processTexture(material.emissiveMap)};this.applyTextureTransform(emissiveMapDef,material.emissiveMap),materialDef.emissiveTexture=emissiveMapDef}}// normalTexture\nif(material.normalMap){var normalMapDef={index:this.processTexture(material.normalMap)};material.normalScale&&-1!==material.normalScale.x&&(material.normalScale.x!==material.normalScale.y&&console.warn(\"THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X.\"),normalMapDef.scale=material.normalScale.x),this.applyTextureTransform(normalMapDef,material.normalMap),materialDef.normalTexture=normalMapDef}// occlusionTexture\nif(material.aoMap){var occlusionMapDef={index:this.processTexture(material.aoMap),texCoord:1};1!==material.aoMapIntensity&&(occlusionMapDef.strength=material.aoMapIntensity),this.applyTextureTransform(occlusionMapDef,material.aoMap),materialDef.occlusionTexture=occlusionMapDef}// alphaMode\nmaterial.transparent?materialDef.alphaMode=\"BLEND\":0<material.alphaTest&&(materialDef.alphaMode=\"MASK\",materialDef.alphaCutoff=material.alphaTest),material.side===three__WEBPACK_IMPORTED_MODULE_0__[\"DoubleSide\"]&&(materialDef.doubleSided=!0),\"\"!==material.name&&(materialDef.name=material.name),this.serializeUserData(material,materialDef),this._invokeAll(function(ext){ext.writeMaterial&&ext.writeMaterial(material,materialDef)});var index=json.materials.push(materialDef)-1;return cache.materials.set(material,index),index}/**\n\t * Process mesh\n\t * @param {THREE.Mesh} mesh Mesh to process\n\t * @return {Integer|null} Index of the processed mesh in the \"meshes\" array\n\t */processMesh(mesh){var cache=this.cache,json=this.json,meshCacheKeyParts=[mesh.geometry.uuid];if(Array.isArray(mesh.material))for(var i=0,l=mesh.material.length;i<l;i++)meshCacheKeyParts.push(mesh.material[i].uuid);else meshCacheKeyParts.push(mesh.material.uuid);var meshCacheKey=meshCacheKeyParts.join(\":\");if(cache.meshes.has(meshCacheKey))return cache.meshes.get(meshCacheKey);var mode,geometry=mesh.geometry;if(mode=mesh.isLineSegments?WEBGL_CONSTANTS.LINES:mesh.isLineLoop?WEBGL_CONSTANTS.LINE_LOOP:mesh.isLine?WEBGL_CONSTANTS.LINE_STRIP:mesh.isPoints?WEBGL_CONSTANTS.POINTS:mesh.material.wireframe?WEBGL_CONSTANTS.LINES:WEBGL_CONSTANTS.TRIANGLES,!0!==geometry.isBufferGeometry)throw new Error(\"THREE.GLTFExporter: Geometry is not of type THREE.BufferGeometry.\");var meshDef={},attributes={},primitives=[],targets=[],nameConversion={uv:\"TEXCOORD_0\",uv2:\"TEXCOORD_1\",color:\"COLOR_0\",skinWeight:\"WEIGHTS_0\",skinIndex:\"JOINTS_0\"},originalNormal=geometry.getAttribute(\"normal\");void 0===originalNormal||this.isNormalizedNormalAttribute(originalNormal)||(console.warn(\"THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one.\"),geometry.setAttribute(\"normal\",this.createNormalizedNormalAttribute(originalNormal)));// @QUESTION Detect if .vertexColors = true?\n// For every attribute create an accessor\nvar modifiedAttribute=null;for(var attributeName in geometry.attributes)// Ignore morph target attributes, which are exported later.\nif(\"morph\"!==attributeName.substr(0,5)){var attribute=geometry.attributes[attributeName];attributeName=nameConversion[attributeName]||attributeName.toUpperCase();// Prefix all geometry attributes except the ones specifically\n// listed in the spec; non-spec attributes are considered custom.\nvar validVertexAttributes=/^(POSITION|NORMAL|TANGENT|TEXCOORD_\\d+|COLOR_\\d+|JOINTS_\\d+|WEIGHTS_\\d+)$/;if(validVertexAttributes.test(attributeName)||(attributeName=\"_\"+attributeName),cache.attributes.has(this.getUID(attribute))){attributes[attributeName]=cache.attributes.get(this.getUID(attribute));continue}// JOINTS_0 must be UNSIGNED_BYTE or UNSIGNED_SHORT.\nmodifiedAttribute=null;var array=attribute.array;\"JOINTS_0\"!==attributeName||array instanceof Uint16Array||array instanceof Uint8Array||(console.warn(\"GLTFExporter: Attribute \\\"skinIndex\\\" converted to type UNSIGNED_SHORT.\"),modifiedAttribute=new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](new Uint16Array(array),attribute.itemSize,attribute.normalized));var accessor=this.processAccessor(modifiedAttribute||attribute,geometry);null!==accessor&&(attributes[attributeName]=accessor,cache.attributes.set(this.getUID(attribute),accessor))}// Skip if no exportable attributes found\nif(void 0!==originalNormal&&geometry.setAttribute(\"normal\",originalNormal),0===Object.keys(attributes).length)return null;// Morph targets\nif(void 0!==mesh.morphTargetInfluences&&0<mesh.morphTargetInfluences.length){var weights=[],targetNames=[],reverseDictionary={};if(void 0!==mesh.morphTargetDictionary)for(var key in mesh.morphTargetDictionary)reverseDictionary[mesh.morphTargetDictionary[key]]=key;for(var _i2=0;_i2<mesh.morphTargetInfluences.length;++_i2){var target={},warned=!1;for(var _attributeName in geometry.morphAttributes){// glTF 2.0 morph supports only POSITION/NORMAL/TANGENT.\n// Three.js doesn't support TANGENT yet.\nif(\"position\"!=_attributeName&&\"normal\"!==_attributeName&&\"color\"!==_attributeName){warned||(console.warn(\"GLTFExporter: Only POSITION and NORMAL morph are supported.\"),warned=!0);continue}var _attribute=geometry.morphAttributes[_attributeName][_i2],gltfAttributeName=_attributeName.toUpperCase();nameConversion[_attributeName]&&(gltfAttributeName=nameConversion[_attributeName]);// Three.js morph attribute has absolute values while the one of glTF has relative values.\n//\n// glTF 2.0 Specification:\n// https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#morph-targets\nvar baseAttribute=geometry.attributes[_attributeName];if(cache.attributes.has(this.getUID(_attribute))){target[gltfAttributeName]=cache.attributes.get(this.getUID(_attribute));continue}// Clones attribute not to override\nvar relativeAttribute=baseAttribute.clone();if(!geometry.morphTargetsRelative)if(baseAttribute)for(var j=0,jl=_attribute.count;j<jl;j++)baseAttribute.count>j&&relativeAttribute.setXYZ(j,_attribute.getX(j)-baseAttribute.getX(j),_attribute.getY(j)-baseAttribute.getY(j),_attribute.getZ(j)-baseAttribute.getZ(j));else for(var _j=0,_jl=_attribute.count;_j<_jl;_j++)relativeAttribute.setXYZ(_j,0,0,0);target[gltfAttributeName]=this.processAccessor(relativeAttribute,geometry),cache.attributes.set(this.getUID(baseAttribute),target[gltfAttributeName])}targets.push(target),weights.push(mesh.morphTargetInfluences[_i2]),void 0!==mesh.morphTargetDictionary&&targetNames.push(reverseDictionary[_i2])}meshDef.weights=weights,0<targetNames.length&&(meshDef.extras={},meshDef.extras.targetNames=targetNames)}var isMultiMaterial=Array.isArray(mesh.material);if(isMultiMaterial&&0===geometry.groups.length)return null;for(var primitive,materials=isMultiMaterial?mesh.material:[mesh.material],groups=isMultiMaterial?geometry.groups:[{materialIndex:0,start:void 0,count:void 0}],_i3=0,il=groups.length;_i3<il;_i3++){if(primitive={mode:mode,attributes:attributes},this.serializeUserData(geometry,primitive),0<targets.length&&(primitive.targets=targets),null!==geometry.index){var cacheKey=this.getUID(geometry.index);(void 0!==groups[_i3].start||void 0!==groups[_i3].count)&&(cacheKey+=\":\"+groups[_i3].start+\":\"+groups[_i3].count),cache.attributes.has(cacheKey)?primitive.indices=cache.attributes.get(cacheKey):(primitive.indices=this.processAccessor(geometry.index,geometry,groups[_i3].start,groups[_i3].count),cache.attributes.set(cacheKey,primitive.indices)),null===primitive.indices&&delete primitive.indices}var material=this.processMaterial(materials[groups[_i3].materialIndex]);null!==material&&(primitive.material=material),primitives.push(primitive)}meshDef.primitives=primitives,json.meshes||(json.meshes=[]),this._invokeAll(function(ext){ext.writeMesh&&ext.writeMesh(mesh,meshDef)});var index=json.meshes.push(meshDef)-1;return cache.meshes.set(meshCacheKey,index),index}/**\n\t * Process camera\n\t * @param {THREE.Camera} camera Camera to process\n\t * @return {Integer} Index of the processed mesh in the \"camera\" array\n\t */processCamera(camera){var json=this.json;json.cameras||(json.cameras=[]);var isOrtho=camera.isOrthographicCamera,cameraDef={type:isOrtho?\"orthographic\":\"perspective\"};return isOrtho?cameraDef.orthographic={xmag:2*camera.right,ymag:2*camera.top,zfar:0>=camera.far?.001:camera.far,znear:0>camera.near?0:camera.near}:cameraDef.perspective={aspectRatio:camera.aspect,yfov:three__WEBPACK_IMPORTED_MODULE_0__[\"MathUtils\"].degToRad(camera.fov),zfar:0>=camera.far?.001:camera.far,znear:0>camera.near?0:camera.near},\"\"!==camera.name&&(cameraDef.name=camera.type),json.cameras.push(cameraDef)-1}/**\n\t * Creates glTF animation entry from AnimationClip object.\n\t *\n\t * Status:\n\t * - Only properties listed in PATH_PROPERTIES may be animated.\n\t *\n\t * @param {THREE.AnimationClip} clip\n\t * @param {THREE.Object3D} root\n\t * @return {number|null}\n\t */processAnimation(clip,root){var json=this.json,nodeMap=this.nodeMap;json.animations||(json.animations=[]),clip=GLTFExporter.Utils.mergeMorphTargetTracks(clip.clone(),root);for(var tracks=clip.tracks,channels=[],samplers=[],i=0;i<tracks.length;++i){var track=tracks[i],trackBinding=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].parseTrackName(track.name),trackNode=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].findNode(root,trackBinding.nodeName),trackProperty=PATH_PROPERTIES[trackBinding.propertyName];if(\"bones\"===trackBinding.objectName&&(!0===trackNode.isSkinnedMesh?trackNode=trackNode.skeleton.getBoneByName(trackBinding.objectIndex):trackNode=void 0),!trackNode||!trackProperty)return console.warn(\"THREE.GLTFExporter: Could not export animation track \\\"%s\\\".\",track.name),null;var outputItemSize=track.values.length/track.times.length;trackProperty===PATH_PROPERTIES.morphTargetInfluences&&(outputItemSize/=trackNode.morphTargetInfluences.length);var interpolation=void 0;// @TODO export CubicInterpolant(InterpolateSmooth) as CUBICSPLINE\n// Detecting glTF cubic spline interpolant by checking factory method's special property\n// GLTFCubicSplineInterpolant is a custom interpolant and track doesn't return\n// valid value from .getInterpolation().\n!0===track.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline?(interpolation=\"CUBICSPLINE\",outputItemSize/=3):track.getInterpolation()===three__WEBPACK_IMPORTED_MODULE_0__[\"InterpolateDiscrete\"]?interpolation=\"STEP\":interpolation=\"LINEAR\",samplers.push({input:this.processAccessor(new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](track.times,1)),output:this.processAccessor(new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](track.values,outputItemSize)),interpolation:interpolation}),channels.push({sampler:samplers.length-1,target:{node:nodeMap.get(trackNode),path:trackProperty}})}return json.animations.push({name:clip.name||\"clip_\"+json.animations.length,samplers:samplers,channels:channels}),json.animations.length-1}/**\n\t * @param {THREE.Object3D} object\n\t * @return {number|null}\n\t */processSkin(object){var json=this.json,nodeMap=this.nodeMap,node=json.nodes[nodeMap.get(object)],skeleton=object.skeleton;if(skeleton===void 0)return null;var rootJoint=object.skeleton.bones[0];if(rootJoint===void 0)return null;for(var joints=[],inverseBindMatrices=new Float32Array(16*skeleton.bones.length),temporaryBoneInverse=new three__WEBPACK_IMPORTED_MODULE_0__[\"Matrix4\"],i=0;i<skeleton.bones.length;++i)joints.push(nodeMap.get(skeleton.bones[i])),temporaryBoneInverse.copy(skeleton.boneInverses[i]),temporaryBoneInverse.multiply(object.bindMatrix).toArray(inverseBindMatrices,16*i);json.skins===void 0&&(json.skins=[]),json.skins.push({inverseBindMatrices:this.processAccessor(new three__WEBPACK_IMPORTED_MODULE_0__[\"BufferAttribute\"](inverseBindMatrices,16)),joints:joints,skeleton:nodeMap.get(rootJoint)});var skinIndex=node.skin=json.skins.length-1;return skinIndex}/**\n\t * Process Object3D node\n\t * @param {THREE.Object3D} node Object3D to processNode\n\t * @return {Integer} Index of the node in the nodes list\n\t */processNode(object){var json=this.json,options=this.options,nodeMap=this.nodeMap;json.nodes||(json.nodes=[]);var nodeDef={};if(options.trs){var rotation=object.quaternion.toArray(),position=object.position.toArray(),scale=object.scale.toArray();equalArray(rotation,[0,0,0,1])||(nodeDef.rotation=rotation),equalArray(position,[0,0,0])||(nodeDef.translation=position),equalArray(scale,[1,1,1])||(nodeDef.scale=scale)}else object.matrixAutoUpdate&&object.updateMatrix(),!1===isIdentityMatrix(object.matrix)&&(nodeDef.matrix=object.matrix.elements);// We don't export empty strings name because it represents no-name in Three.js.\nif(\"\"!==object.name&&(nodeDef.name=object.name+\"\"),this.serializeUserData(object,nodeDef),object.isMesh||object.isLine||object.isPoints){var meshIndex=this.processMesh(object);null!==meshIndex&&(nodeDef.mesh=meshIndex)}else object.isCamera&&(nodeDef.camera=this.processCamera(object));if(object.isSkinnedMesh&&this.skins.push(object),0<object.children.length){for(var child,children=[],i=0,l=object.children.length;i<l;i++)if(child=object.children[i],child.visible||!1===options.onlyVisible){var _nodeIndex=this.processNode(child);null!==_nodeIndex&&children.push(_nodeIndex)}0<children.length&&(nodeDef.children=children)}this._invokeAll(function(ext){ext.writeNode&&ext.writeNode(object,nodeDef)});var nodeIndex=json.nodes.push(nodeDef)-1;return nodeMap.set(object,nodeIndex),nodeIndex}/**\n\t * Process Scene\n\t * @param {Scene} node Scene to process\n\t */processScene(scene){var json=this.json,options=this.options;json.scenes||(json.scenes=[],json.scene=0);var sceneDef={};\"\"!==scene.name&&(sceneDef.name=scene.name),json.scenes.push(sceneDef);for(var child,nodes=[],i=0,l=scene.children.length;i<l;i++)if(child=scene.children[i],child.visible||!1===options.onlyVisible){var nodeIndex=this.processNode(child);null!==nodeIndex&&nodes.push(nodeIndex)}0<nodes.length&&(sceneDef.nodes=nodes),this.serializeUserData(scene,sceneDef)}/**\n\t * Creates a Scene to hold a list of objects and parse it\n\t * @param {Array} objects List of objects to process\n\t */processObjects(objects){var scene=new three__WEBPACK_IMPORTED_MODULE_0__[\"Scene\"];scene.name=\"AuxScene\";for(var i=0;i<objects.length;i++)// We push directly to children instead of calling `add` to prevent\n// modify the .parent and break its original scene and hierarchy\nscene.children.push(objects[i]);this.processScene(scene)}/**\n\t * @param {THREE.Object3D|Array<THREE.Object3D>} input\n\t */processInput(input){var options=this.options;input=input instanceof Array?input:[input],this._invokeAll(function(ext){ext.beforeParse&&ext.beforeParse(input)});for(var objectsWithoutScene=[],i=0;i<input.length;i++)input[i]instanceof three__WEBPACK_IMPORTED_MODULE_0__[\"Scene\"]?this.processScene(input[i]):objectsWithoutScene.push(input[i]);0<objectsWithoutScene.length&&this.processObjects(objectsWithoutScene);for(var _i4=0;_i4<this.skins.length;++_i4)this.processSkin(this.skins[_i4]);for(var _i5=0;_i5<options.animations.length;++_i5)this.processAnimation(options.animations[_i5].clip,options.animations[_i5].mesh);this._invokeAll(function(ext){ext.afterParse&&ext.afterParse(input)})}_invokeAll(func){for(var i=0,il=this.plugins.length;i<il;i++)func(this.plugins[i])}}/**\n * Punctual Lights Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_lights_punctual\n */class GLTFLightExtension{constructor(writer){this.writer=writer,this.name=\"KHR_lights_punctual\"}writeNode(light,nodeDef){if(light.isLight){if(!light.isDirectionalLight&&!light.isPointLight&&!light.isSpotLight)return void console.warn(\"THREE.GLTFExporter: Only directional, point, and spot lights are supported.\",light);var writer=this.writer,json=writer.json,extensionsUsed=writer.extensionsUsed,lightDef={};light.name&&(lightDef.name=light.name),lightDef.color=light.color.toArray(),lightDef.intensity=light.intensity,light.isDirectionalLight?lightDef.type=\"directional\":light.isPointLight?(lightDef.type=\"point\",0<light.distance&&(lightDef.range=light.distance)):light.isSpotLight&&(lightDef.type=\"spot\",0<light.distance&&(lightDef.range=light.distance),lightDef.spot={},lightDef.spot.innerConeAngle=-1*((light.penumbra-1)*light.angle),lightDef.spot.outerConeAngle=light.angle),void 0!==light.decay&&2!==light.decay&&console.warn(\"THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, \"+\"and expects light.decay=2.\"),light.target&&(light.target.parent!==light||0!==light.target.position.x||0!==light.target.position.y||-1!==light.target.position.z)&&console.warn(\"THREE.GLTFExporter: Light direction may be lost. For best results, \"+\"make light.target a child of the light with position 0,0,-1.\"),extensionsUsed[this.name]||(json.extensions=json.extensions||{},json.extensions[this.name]={lights:[]},extensionsUsed[this.name]=!0);var lights=json.extensions[this.name].lights;lights.push(lightDef),nodeDef.extensions=nodeDef.extensions||{},nodeDef.extensions[this.name]={light:lights.length-1}}}}/**\n * Unlit Materials Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit\n */class GLTFMaterialsUnlitExtension{constructor(writer){this.writer=writer,this.name=\"KHR_materials_unlit\"}writeMaterial(material,materialDef){if(material.isMeshBasicMaterial){var writer=this.writer,extensionsUsed=writer.extensionsUsed;materialDef.extensions=materialDef.extensions||{},materialDef.extensions[this.name]={},extensionsUsed[this.name]=!0,materialDef.pbrMetallicRoughness.metallicFactor=0,materialDef.pbrMetallicRoughness.roughnessFactor=.9}}}/**\n * Specular-Glossiness Extension\n *\n * Specification: https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness\n */class GLTFMaterialsPBRSpecularGlossiness{constructor(writer){this.writer=writer,this.name=\"KHR_materials_pbrSpecularGlossiness\"}writeMaterial(material,materialDef){if(material.isGLTFSpecularGlossinessMaterial){var writer=this.writer,extensionsUsed=writer.extensionsUsed,extensionDef={};materialDef.pbrMetallicRoughness.baseColorFactor&&(extensionDef.diffuseFactor=materialDef.pbrMetallicRoughness.baseColorFactor);var specularFactor=[1,1,1];if(material.specular.toArray(specularFactor,0),extensionDef.specularFactor=specularFactor,extensionDef.glossinessFactor=material.glossiness,materialDef.pbrMetallicRoughness.baseColorTexture&&(extensionDef.diffuseTexture=materialDef.pbrMetallicRoughness.baseColorTexture),material.specularMap){var specularMapDef={index:writer.processTexture(material.specularMap)};writer.applyTextureTransform(specularMapDef,material.specularMap),extensionDef.specularGlossinessTexture=specularMapDef}materialDef.extensions=materialDef.extensions||{},materialDef.extensions[this.name]=extensionDef,extensionsUsed[this.name]=!0}}}/**\n * Static utility functions\n */GLTFExporter.Utils={insertKeyframe:function insertKeyframe(track,time){var index,tolerance=.001,valueSize=track.getValueSize(),times=new track.TimeBufferType(track.times.length+1),values=new track.ValueBufferType(track.values.length+valueSize),interpolant=track.createInterpolant(new track.ValueBufferType(valueSize));// 1ms\nif(0===track.times.length){times[0]=time;for(var i=0;i<valueSize;i++)values[i]=0;index=0}else if(time<track.times[0]){if(Math.abs(track.times[0]-time)<tolerance)return 0;times[0]=time,times.set(track.times,1),values.set(interpolant.evaluate(time),0),values.set(track.values,valueSize),index=0}else if(time>track.times[track.times.length-1]){if(Math.abs(track.times[track.times.length-1]-time)<tolerance)return track.times.length-1;times[times.length-1]=time,times.set(track.times,0),values.set(track.values,0),values.set(interpolant.evaluate(time),track.values.length),index=times.length-1}else for(var _i6=0;_i6<track.times.length;_i6++){if(Math.abs(track.times[_i6]-time)<tolerance)return _i6;if(track.times[_i6]<time&&track.times[_i6+1]>time){times.set(track.times.slice(0,_i6+1),0),times[_i6+1]=time,times.set(track.times.slice(_i6+1),_i6+2),values.set(track.values.slice(0,(_i6+1)*valueSize),0),values.set(interpolant.evaluate(time),(_i6+1)*valueSize),values.set(track.values.slice((_i6+1)*valueSize),(_i6+2)*valueSize),index=_i6+1;break}}return track.times=times,track.values=values,index},mergeMorphTargetTracks:function mergeMorphTargetTracks(clip,root){for(var tracks=[],mergedTracks={},sourceTracks=clip.tracks,i=0;i<sourceTracks.length;++i){var sourceTrack=sourceTracks[i],sourceTrackBinding=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].parseTrackName(sourceTrack.name),sourceTrackNode=three__WEBPACK_IMPORTED_MODULE_0__[\"PropertyBinding\"].findNode(root,sourceTrackBinding.nodeName);if(\"morphTargetInfluences\"!==sourceTrackBinding.propertyName||void 0===sourceTrackBinding.propertyIndex){tracks.push(sourceTrack);continue}if(sourceTrack.createInterpolant!==sourceTrack.InterpolantFactoryMethodDiscrete&&sourceTrack.createInterpolant!==sourceTrack.InterpolantFactoryMethodLinear){if(sourceTrack.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline)// This should never happen, because glTF morph target animations\n// affect all targets already.\nthrow new Error(\"THREE.GLTFExporter: Cannot merge tracks with glTF CUBICSPLINE interpolation.\");console.warn(\"THREE.GLTFExporter: Morph target interpolation mode not yet supported. Using LINEAR instead.\"),sourceTrack=sourceTrack.clone(),sourceTrack.setInterpolation(three__WEBPACK_IMPORTED_MODULE_0__[\"InterpolateLinear\"])}var targetCount=sourceTrackNode.morphTargetInfluences.length,targetIndex=sourceTrackNode.morphTargetDictionary[sourceTrackBinding.propertyIndex];if(void 0===targetIndex)throw new Error(\"THREE.GLTFExporter: Morph target name not found: \"+sourceTrackBinding.propertyIndex);var mergedTrack=void 0;// If this is the first time we've seen this object, create a new\n// track to store merged keyframe data for each morph target.\nif(void 0===mergedTracks[sourceTrackNode.uuid]){mergedTrack=sourceTrack.clone();for(var values=new mergedTrack.ValueBufferType(targetCount*mergedTrack.times.length),j=0;j<mergedTrack.times.length;j++)values[j*targetCount+targetIndex]=mergedTrack.values[j];// We need to take into consideration the intended target node\n// of our original un-merged morphTarget animation.\nmergedTrack.name=(sourceTrackBinding.nodeName||\"\")+\".morphTargetInfluences\",mergedTrack.values=values,mergedTracks[sourceTrackNode.uuid]=mergedTrack,tracks.push(mergedTrack);continue}var sourceInterpolant=sourceTrack.createInterpolant(new sourceTrack.ValueBufferType(1));mergedTrack=mergedTracks[sourceTrackNode.uuid];// For every existing keyframe of the merged track, write a (possibly\n// interpolated) value from the source track.\nfor(var _j2=0;_j2<mergedTrack.times.length;_j2++)mergedTrack.values[_j2*targetCount+targetIndex]=sourceInterpolant.evaluate(mergedTrack.times[_j2]);// For every existing keyframe of the source track, write a (possibly\n// new) keyframe to the merged track. Values from the previous loop may\n// be written again, but keyframes are de-duplicated.\nfor(var keyframeIndex,_j3=0;_j3<sourceTrack.times.length;_j3++)keyframeIndex=this.insertKeyframe(mergedTrack,sourceTrack.times[_j3]),mergedTrack.values[keyframeIndex*targetCount+targetIndex]=sourceTrack.values[_j3]}return clip.tracks=tracks,clip}};\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),resolveURL=__webpack_require__(4).resolveURL,Viewport=function(){this.nearPlane=.168248,this.farPlane=6.82906,this.eyePosition=[.5,-2.86496,.5],this.targetPosition=[.5,.5,.5],this.upVector=[0,0,1];var _this=this;this.setFromObject=(_ref)=>{var{nearPlane,farPlane,eyePosition,targetPosition,upVector}=_ref;_this.nearPlane=nearPlane,_this.farPlane=farPlane,_this.eyePosition=eyePosition,_this.targetPosition=targetPosition,_this.upVector=upVector}},CameraControls=function(object,domElement,renderer,scene){var MODE={NONE:-1,DEFAULT:0,PATH:1,SMOOTH_CAMERA_TRANSITION:2,AUTO_TUMBLE:3,ROTATE_TRANSITION:4,MINIMAP:5,SYNC_CONTROL:6},STATE={NONE:-1,ROTATE:0,ZOOM:1,PAN:2,TOUCH_ROTATE:3,TOUCH_ZOOM:4,TOUCH_PAN:5,SCROLL:6},ROTATE_DIRECTION={NONE:-1,FREE:1,HORIZONTAL:2,VERTICAL:3},CLICK_ACTION={};/** \n * Actions states.\n * Available states are NONE, ROTATE, ZOOM, PAN, TOUCH_ROTATE, TOUCH_ZOOM, TOUCH_PAN and SCROLL.\n * @property {Object} \n */CLICK_ACTION.MAIN=STATE.ROTATE,CLICK_ACTION.AUXILIARY=STATE.ZOOM,CLICK_ACTION.SECONDARY=STATE.PAN,this.cameraObject=object,this.domElement=domElement===void 0?document:domElement,this.renderer=renderer,this.scene=scene,this.tumble_rate=1.5,this.pointer_x=0,this.pointer_y=0,this.pointer_x_start=0,this.pointer_y_start=0,this.previous_pointer_x=0,this.previous_pointer_y=0,this.near_plane_fly_debt=0,this.touchZoomDistanceStart=0,this.touchZoomDistanceEnd=0,this.directionalLight=0,this.scrollRate=50;var duration=6e3,inbuildTime=0,cameraPath=void 0,numberOfCameraPoint=void 0,updateLightWithPathFlag=!1,playRate=500,deviceOrientationControl=void 0,defaultViewport=\"default\",currentMode=MODE.DEFAULT,smoothCameraTransitionObject=void 0,rotateCameraTransitionObject=void 0,cameraAutoTumbleObject=void 0,mouseScroll=0,rotateMode=ROTATE_DIRECTION.FREE;this._state=STATE.NONE;var zincRayCaster;this.targetTouchId=-1;var rect=void 0,_a=new THREE.Vector3,_b=new THREE.Vector3,_c=new THREE.Vector3,_new_b=new THREE.Vector3,_new_c=new THREE.Vector3,_axis=new THREE.Vector3,_v=new THREE.Vector3,_rel_eye=new THREE.Vector3,sceneSphere=new THREE.Sphere,_tempEye=new THREE.Vector3,ndcControl=void 0,maxDist=0,viewports={default:new Viewport};viewports.default.nearPlane=.1,viewports.default.farPlane=2e3,viewports.default.eyePosition=[0,0,0],viewports.default.targetPosition=[0,0,-1],viewports.default.upVector=[0,1,0],this.cameraObject.target===void 0&&(this.cameraObject.target=new THREE.Vector3(...viewports.default.targetPosition)),this.calculateMaxAllowedDistance=scene=>{var box=scene.getBoundingBox();if(box){box.getBoundingSphere(sceneSphere),maxDist=6*sceneSphere.radius;var currentDist=0;this.cameraObject&&(currentDist=this.cameraObject.position.distanceTo(sceneSphere.center)),maxDist=currentDist>maxDist?currentDist:maxDist}else maxDist=0},this.addViewport=(viewportName,viewport)=>{viewportName&&viewport&&(viewports[viewportName]=viewport)},this.setDefaultViewport=defaultName=>!!(defaultName&&defaultName in viewports)&&(defaultViewport=defaultName,!0),this.getDefaultViewport=()=>defaultViewport,this.getViewportOfName=name=>viewports[name],this.setCurrentViewport=name=>!!(name in viewports)&&(this.setCurrentCameraSettings(viewports[name]),!0),this.setRotationMode=mode=>{switch(mode){case\"none\":rotateMode=ROTATE_DIRECTION.NONE;break;case\"horizontal\":rotateMode=ROTATE_DIRECTION.HORIZONTAL;break;case\"vertical\":rotateMode=ROTATE_DIRECTION.VERTICAL;break;case\"free\":default:rotateMode=ROTATE_DIRECTION.FREE;}},this.onResize=()=>{rect&&(rect=void 0),ndcControl&&ndcControl.setCurrentCameraSettings(this.cameraObject,viewports[defaultViewport])},this.getNDCFromDocumentCoords=(x,y,positionIn)=>{updateRect(!1);var position=positionIn?positionIn:new THREE.Vector2,out_x=2*((x-rect.left)/rect.width)-1,out_y=2*-((y-rect.top)/rect.height)+1;return position.set(out_x,out_y)},this.getRelativeCoordsFromNDC=(x,y,positionIn)=>{updateRect(!1);var position=positionIn?positionIn:new THREE.Vector2;return position.x=(x+1)*rect.width/2,position.y=(1-y)*rect.height/2,position},this.setMouseButtonAction=(buttonName,actionName)=>{CLICK_ACTION[buttonName]=STATE[actionName]};//Make sure the camera does not travel beyond limit\nvar checkTravelDistance=()=>{if(0<maxDist){var newDist=_tempEye.distanceTo(sceneSphere.center);return maxDist>newDist||this.cameraObject.position.distanceTo(sceneSphere.center)>newDist}return!0},translateViewport=translation=>{_tempEye.copy(this.cameraObject.position).add(translation),checkTravelDistance()&&(this.cameraObject.target.add(translation),this.cameraObject.position.add(translation),this.updateDirectionalLight())},onDocumentMouseDown=event=>{updateRect(!1);// Check if mouse event hapens inside the minimap\nvar minimapCoordinates;if(currentMode===MODE.DEFAULT&&(minimapCoordinates=this.scene.getNormalisedMinimapCoordinates(this.renderer,event)),!minimapCoordinates)0==event.button?event.ctrlKey?this._state=CLICK_ACTION.AUXILIARY:event.shiftKey?this._state=CLICK_ACTION.SECONDARY:this._state=CLICK_ACTION.MAIN:1==event.button?(event.preventDefault(),this._state=CLICK_ACTION.AUXILIARY):2==event.button&&(this._state=CLICK_ACTION.SECONDARY),this.pointer_x=event.clientX-rect.left,this.pointer_y=event.clientY-rect.top,this.pointer_x_start=this.pointer_x,this.pointer_y_start=this.pointer_y,this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y;else{currentMode=MODE.MINIMAP;var translation=this.scene.getMinimapDiffFromNormalised(minimapCoordinates.x,minimapCoordinates.y);translateViewport(translation)}},onDocumentMouseMove=event=>{if(updateRect(!1),this.pointer_x=event.clientX-rect.left,this.pointer_y=event.clientY-rect.top,currentMode===MODE.MINIMAP){var minimapCoordinates=this.scene.getNormalisedMinimapCoordinates(this.renderer,event);if(minimapCoordinates){var translation=this.scene.getMinimapDiffFromNormalised(minimapCoordinates.x,minimapCoordinates.y);translateViewport(translation)}}else this._state===STATE.NONE&&void 0!==zincRayCaster&&zincRayCaster.move(this,event.clientX,event.clientY,this.renderer)},onDocumentMouseUp=event=>{this._state=STATE.NONE,currentMode==MODE.MINIMAP&&(currentMode=MODE.DEFAULT),zincRayCaster!==void 0&&this.pointer_x_start==event.clientX-rect.left&&this.pointer_y_start==event.clientY-rect.top&&zincRayCaster.pick(this,event.clientX,event.clientY,this.renderer)},onDocumentMouseLeave=()=>{this._state=STATE.NONE},onDocumentTouchStart=event=>{updateRect(!1);var len=event.touches.length;if(1==len)this._state=STATE.TOUCH_ROTATE,this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top,this.pointer_x_start=this.pointer_x,this.pointer_y_start=this.pointer_y,this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y;else if(2==len){this._state=STATE.TOUCH_ZOOM;var dx=event.touches[0].clientX-event.touches[1].clientX,dy=event.touches[0].clientY-event.touches[1].clientY;this.touchZoomDistanceEnd=this.touchZoomDistanceStart=Math.sqrt(dx*dx+dy*dy)}else 3==len&&(this._state=STATE.TOUCH_PAN,this.targetTouchId=event.touches[0].identifier,this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top,this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y)},onDocumentTouchMove=event=>{event.preventDefault(),event.stopPropagation();var len=event.touches.length;if(1==len)this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top;else if(2==len){if(this._state===STATE.TOUCH_ZOOM){var dx=event.touches[0].clientX-event.touches[1].clientX,dy=event.touches[0].clientY-event.touches[1].clientY;this.touchZoomDistanceEnd=Math.sqrt(dx*dx+dy*dy)}}else if(3==len&&this._state===STATE.TOUCH_PAN)for(var i=0;3>i;i++)event.touches[i].identifier==this.targetTouchId&&(this.pointer_x=event.touches[0].clientX-rect.left,this.pointer_y=event.touches[0].clientY-rect.top)},onDocumentTouchEnd=event=>{var len=event.touches.length;this.touchZoomDistanceStart=this.touchZoomDistanceEnd=0,this.targetTouchId=-1,this._state=STATE.NONE,1==len&&zincRayCaster!==void 0&&this.pointer_x_start==event.touches[0].clientX-rect.left&&this.pointer_y_start==event.touches[0].clientY-rect.top&&zincRayCaster.pick(this.cameraObject,event.touches[0].clientX,event.touches[0].clientY,this.renderer)},onDocumentEnter=()=>{updateRect(!0)},updateRect=forced=>{//Use intersectionObserver to reset the rect for ray tracing.\nif(forced||rect===void 0){var observer=new IntersectionObserver(entries=>{for(var entry of entries)rect=entry.boundingClientRect;observer.disconnect()});observer.observe(this.domElement)}},onDocumentWheelEvent=event=>{updateRect(!1),this._state=STATE.SCROLL;var changes=0;0<event.deltaY?changes=this.scrollRate:0>event.deltaY&&(changes=-1*this.scrollRate),mouseScroll+=changes,event.preventDefault(),event.stopImmediatePropagation()},translate=()=>{if(\"undefined\"!=typeof this.cameraObject){var height=rect.height,distance=this.cameraObject.position.distanceTo(this.cameraObject.target),fact=0;this.cameraObject.far>this.cameraObject.near&&distance>=this.cameraObject.near&&distance<=this.cameraObject.far&&(fact=(distance-this.cameraObject.near)/(this.cameraObject.far-this.cameraObject.near)),_b.set(this.previous_pointer_x,height-this.previous_pointer_y,0),_c.set(this.previous_pointer_x,height-this.previous_pointer_y,1),_new_b.set(this.pointer_x,height-this.pointer_y,0),_new_c.set(this.pointer_x,height-this.pointer_y,1),_b.unproject(this.cameraObject),_c.unproject(this.cameraObject),_new_b.unproject(this.cameraObject),_new_c.unproject(this.cameraObject);_new_b.sub(_b).multiplyScalar(1-fact),_new_c.sub(_c).multiplyScalar(fact),_new_b.add(_new_c).multiplyScalar(-.002),translateViewport(_new_b)}this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y};this.getVectorsFromRotateAboutLookAtPoints=(axis,angle)=>{axis.normalize(),_v.copy(this.cameraObject.position).sub(this.cameraObject.target),_rel_eye.copy(_v),_v.normalize(),.8<Math.abs(_v.dot(axis))&&_v.copy(this.cameraObject.up),_b.crossVectors(axis,_v).normalize(),_c.crossVectors(axis,_b);var rel_eyea=axis.dot(_rel_eye),rel_eyeb=_b.dot(_rel_eye),rel_eyec=_c.dot(_rel_eye),upa=axis.dot(this.cameraObject.up),upb=_b.dot(this.cameraObject.up),upc=_c.dot(this.cameraObject.up),cos_angle=Math.cos(angle),sin_angle=Math.sin(angle);return _new_b.set(cos_angle*_b.x+sin_angle*_c.x,cos_angle*_b.y+sin_angle*_c.y,cos_angle*_b.z+sin_angle*_c.z),_new_c.set(cos_angle*_c.x-sin_angle*_b.x,cos_angle*_c.y-sin_angle*_b.y,cos_angle*_c.z-sin_angle*_b.z),_v.copy(this.cameraObject.target),_v.x=_v.x+axis.x*rel_eyea+_new_b.x*rel_eyeb+_new_c.x*rel_eyec,_v.y=_v.y+axis.y*rel_eyea+_new_b.y*rel_eyeb+_new_c.y*rel_eyec,_v.z=_v.z+axis.z*rel_eyea+_new_b.z*rel_eyeb+_new_c.z*rel_eyec,_a.set(axis.x*upa+_new_b.x*upb+_new_c.x*upc,axis.y*upa+_new_b.y*upb+_new_c.y*upc,axis.z*upa+_new_b.z*upb+_new_c.z*upc),{position:_v,up:_a}},this.rotateAboutLookAtpoint=(axis,angle)=>{var returned_values=this.getVectorsFromRotateAboutLookAtPoints(axis,angle);this.cameraObject.position.copy(returned_values.position),this.updateDirectionalLight(),this.cameraObject.up.copy(returned_values.up)};var tumble=()=>{if(\"undefined\"!=typeof this.cameraObject){var width=rect.width,height=rect.height;if(0<width&&0<height){var radius=.25*(width+height),delta_x=0,delta_y=0;(rotateMode===ROTATE_DIRECTION.FREE||rotateMode===ROTATE_DIRECTION.HORIZONTAL)&&(delta_x=this.pointer_x-this.previous_pointer_x),(rotateMode===ROTATE_DIRECTION.FREE||rotateMode===ROTATE_DIRECTION.VERTICAL)&&(delta_y=this.previous_pointer_y-this.pointer_y);var tangent_dist=Math.sqrt(delta_x*delta_x+delta_y*delta_y);if(0<tangent_dist){var dx=1*-delta_y/tangent_dist,dy=1*delta_x/tangent_dist;// Do not allow rotation on other direction around the origin if rotateMode is not free\nif(rotateMode===ROTATE_DIRECTION.FREE){var _d=dx*(this.pointer_x-.5*(width-1))+dy*(.5*(height-1)-this.pointer_y);_d>radius?_d=radius:_d<-radius&&(_d=-radius)}var phi=Math.acos(0/radius)-.5*Math.PI,angle=this.tumble_rate*tangent_dist/radius;_a.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize(),_b.copy(this.cameraObject.up).normalize(),_c.copy(_b).cross(_a).normalize().multiplyScalar(dx),_b.multiplyScalar(dy),_axis.addVectors(_c,_b).multiplyScalar(Math.cos(phi)),_a.multiplyScalar(Math.sin(phi)),_axis.add(_a),this.rotateAboutLookAtpoint(_axis,-angle)}}}this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y},calculateZoomDelta=()=>{var delta=0;return this._state===STATE.ZOOM?delta=this.previous_pointer_y-this.pointer_y:this._state===STATE.SCROLL?delta=mouseScroll:(delta=-1*(this.touchZoomDistanceEnd-this.touchZoomDistanceStart),this.touchZoomDistanceStart=this.touchZoomDistanceEnd),delta};this.changeZoomByScrollRateUnit=unit=>{var delta_y=unit*this.scrollRate;this.changeZoomByValue(delta_y)},this.changeZoomByValue=delta_y=>{if(\"undefined\"!=typeof this.cameraObject){var width=rect.width,height=rect.height,a=this.cameraObject.position.clone();a.sub(this.cameraObject.target);var dist=a.length(),dy=1.5*delta_y/height;if(.01<dist+dy*dist&&(a.normalize(),_tempEye.copy(this.cameraObject.position),_tempEye.x+=a.x*dy*dist,_tempEye.y+=a.y*dy*dist,_tempEye.z+=a.z*dy*dist,checkTravelDistance())){this.cameraObject.position.copy(_tempEye),this.updateDirectionalLight();var near_far_minimum_ratio=1e-5;if(near_far_minimum_ratio*this.cameraObject.far<this.cameraObject.near+dy*dist+this.near_plane_fly_debt)0!=this.near_plane_fly_debt&&(this.near_plane_fly_debt+=dy*dist,0<this.near_plane_fly_debt?(this.cameraObject.near+=this.near_plane_fly_debt,this.cameraObject.far+=this.near_plane_fly_debt,this.near_plane_fly_debt=0):(this.cameraObject.near+=dy*dist,this.cameraObject.far+=dy*dist));else{if(0==this.near_plane_fly_debt){var diff=this.cameraObject.near-near_far_minimum_ratio*this.cameraObject.far;this.cameraObject.near=near_far_minimum_ratio*this.cameraObject.far,this.cameraObject.far-=diff,this.near_plane_fly_debt-=near_far_minimum_ratio*this.cameraObject.far}this.near_plane_fly_debt+=dy*dist}}}};var flyZoom=()=>{var delta_y=calculateZoomDelta();this.changeZoomByValue(delta_y),this._state===STATE.ZOOM&&(this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y),this._state===STATE.SCROLL&&(mouseScroll=0,this._state=STATE.NONE)};this.setDirectionalLight=directionalLightIn=>{this.directionalLight=directionalLightIn},this.updateDirectionalLight=()=>{0!=this.directionalLight&&this.directionalLight.position.set(this.cameraObject.position.x,this.cameraObject.position.y,this.cameraObject.position.z)},this.enable=function(){enabled=!0,this.domElement&&this.domElement.addEventListener&&(this.domElement.addEventListener(\"mousedown\",onDocumentMouseDown,!1),this.domElement.addEventListener(\"mousemove\",onDocumentMouseMove,!1),this.domElement.addEventListener(\"mouseup\",onDocumentMouseUp,!1),this.domElement.addEventListener(\"mouseleave\",onDocumentMouseLeave,!1),this.domElement.addEventListener(\"touchstart\",onDocumentTouchStart,!1),this.domElement.addEventListener(\"touchmove\",onDocumentTouchMove,!1),this.domElement.addEventListener(\"touchend\",onDocumentTouchEnd,!1),this.domElement.addEventListener(\"wheel\",onDocumentWheelEvent,!1),this.domElement.addEventListener(\"contextmenu\",event=>{event.preventDefault()},!1),this.domElement.addEventListener(\"mouseenter\",onDocumentEnter,!1))},this.disable=function(){enabled=!1,this.domElement&&this.domElement.removeEventListener&&(this.domElement.removeEventListener(\"mousedown\",onDocumentMouseDown,!1),this.domElement.removeEventListener(\"mousemove\",onDocumentMouseMove,!1),this.domElement.removeEventListener(\"mouseup\",onDocumentMouseUp,!1),this.domElement.removeEventListener(\"mouseleave\",onDocumentMouseLeave,!1),this.domElement.removeEventListener(\"touchstart\",onDocumentTouchStart,!1),this.domElement.removeEventListener(\"touchmove\",onDocumentTouchMove,!1),this.domElement.removeEventListener(\"touchend\",onDocumentTouchEnd,!1),this.domElement.removeEventListener(\"wheel\",onDocumentWheelEvent,!1),this.domElement.removeEventListener(\"mouseenter\",onDocumentEnter,!1),this.domElement.removeEventListener(\"contextmenu\",event=>{event.preventDefault()},!1))},this.loadPath=pathData=>{cameraPath=pathData.CameraPath,numberOfCameraPoint=pathData.NumberOfPoints},this.loadPathURL=(path_url,finishCallback)=>{var xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=()=>{if(4==xmlhttp.readyState&&200==xmlhttp.status){var pathData=JSON.parse(xmlhttp.responseText);this.loadPath(pathData),finishCallback!=null&&\"function\"==typeof finishCallback&&finishCallback()}},requestURL=resolveURL(path_url),xmlhttp.open(\"GET\",requestURL,!0),xmlhttp.send()},this.setPathDuration=durationIn=>{duration=durationIn,smoothCameraTransitionObject&&smoothCameraTransitionObject.setDuration(duration),rotateCameraTransitionObject&&rotateCameraTransitionObject.setDuration(duration)},this.getPlayRate=()=>playRate,this.setPlayRate=playRateIn=>{playRate=playRateIn};/**\n * Update the internal timer by the set amount, this can\n * be used to force a time update by setting delta to zero.\n * \n * @param {Number} delta - The amount of time to increment\n * the time by.\n */var updateTime=delta=>{var targetTime=inbuildTime+delta;targetTime>duration&&(targetTime-=duration),inbuildTime=targetTime};/**\n * Get the current inbuild time,\n * \n * @return {Number}\n */this.getTime=()=>inbuildTime,this.setTime=timeIn=>{inbuildTime=timeIn>duration?duration:0>timeIn?0:timeIn},this.getNumberOfTimeFrame=()=>numberOfCameraPoint,this.getCurrentTimeFrame=()=>{if(2<numberOfCameraPoint){var current_time=inbuildTime/duration*(numberOfCameraPoint-1),bottom_frame=Math.floor(current_time),top_frame=Math.ceil(current_time);return bottom_frame==top_frame?bottom_frame==numberOfCameraPoint-1?[bottom_frame-1,top_frame,0]:[bottom_frame,top_frame+1,1]:[bottom_frame,top_frame,1-(current_time-bottom_frame)]}return 1==numberOfCameraPoint?[0,0,0]:void 0},this.setCurrentTimeFrame=targetTimeFrame=>{2<numberOfCameraPoint&&(inbuildTime=duration*targetTimeFrame/(numberOfCameraPoint-1),0>inbuildTime&&(inbuildTime=0),inbuildTime>duration&&(inbuildTime=duration))};/**\n * Update the progress on the path by the specified amount - delta.\n * \n * @param {Number} delta - The amount of time to increment\n */var updatePath=delta=>{if(currentMode===MODE.PATH&&(updateTime(delta),cameraPath)){for(var time_frame=this.getCurrentTimeFrame(),bottom_frame=time_frame[0],top_frame=time_frame[1],proportion=time_frame[2],bot_pos=[cameraPath[3*bottom_frame],cameraPath[3*bottom_frame+1],cameraPath[3*bottom_frame+2]],top_pos=[cameraPath[3*top_frame],cameraPath[3*top_frame+1],cameraPath[3*top_frame+2]],current_positions=[],i=0;i<bot_pos.length;i++)current_positions.push(proportion*bot_pos[i]+(1-proportion)*top_pos[i]);this.cameraObject.position.set(current_positions[0],current_positions[1],current_positions[2]),this.cameraObject.target.set(top_pos[0],top_pos[1],top_pos[2]),deviceOrientationControl&&this.cameraObject.lookAt(this.cameraObject.target),updateLightWithPathFlag&&(this.directionalLight.position.set(current_positions[0],current_positions[1],current_positions[2]),this.directionalLight.target.position.set(top_pos[0],top_pos[1],top_pos[2]))}};/**\n * Force recalculation of the current path.\n */this.calculatePathNow=()=>{updatePath(0)};// handle synchronised control based on information in the idc\nvar handleSyncControl=()=>{this._state===STATE.ROTATE||this._state===STATE.TOUCH_ROTATE?tumble():this._state===STATE.PAN||this._state===STATE.TOUCH_PAN?(translate(),ndcControl.triggerCallback()):(this._state===STATE.ZOOM||this._state===STATE.TOUCH_ZOOM||this._state===STATE.SCROLL)&&(ndcControl.zoom(calculateZoomDelta()),this.previous_pointer_x=this.pointer_x,this.previous_pointer_y=this.pointer_y,this._state===STATE.SCROLL&&(this._state=STATE.NONE),mouseScroll=0,ndcControl.triggerCallback())};/**\n * Update all controls related changes - including calculation of the viewport.\n * \n * @param {Number} timeChanged - Time eclipse since last called.\n */ /**\n * Switch to path mode and begin traveling through the camera path.\n */ /**\n * Stop playing path and switch back to normal control.\n */ /**\n * Check rather the control is currently in path mode.\n * \n * @return {Boolean}\n */ /**\n * Enable directional light update as the camera\n * is traveling through path.\n * \n * @param {Boolean} flag\n */ /**\n * Enable rotation using the devices's accelerometer.\n */ /**\n * Disable rotation using the devices's accelerometer.\n */ /**\n * Check rather device orientation based on accelerometer is on.\n */ /**\n * Reset the viewport settings to the one provided by default viewport.\n */ /**\n * Set the current camera settings with the provided viewport.\n * \n * @param {Viewport} newViewport - viewport settings.\n */ /**\n * Get the viewport based on centre, radius, view_angle and clip distance.\n * \n * @param {Number} centreX - x coordinate of the centre.\n * @param {Number} centreY - y coordinate of the centre.\n * @param {Number} centreZ - z coordinate of the centre.\n * @param {Number} radius - radius if the viewport.\n * @param {Number} view_angle - view angle.\n * @param {Number} clip_distance - clip_distance between the near and far plane.\n * \n * @return {Viewport}\n */ /**\n * Get the current camera viewport.\n * \n * @return {Viewport}\n */ /**\n * Setup a smooth transition object which transition the camera from one \n * viewport to the other in the specified duration. This will not work if \n * {@link rotateCameraTransition} is active.\n * To use this object, the transition must be enabled using\n * {@link enableCameraTransition}.\n * \n * @param {Viewport} startingViewport - the starting viewport\n * @param {Viewport} endingViewport - the viewport ti end the transistion with.\n * @param {Number} durationIn - duration of the smooth transition.\n */ /**\n * Setup a rotate camera transition object which rotate the \n * camera by the specified the angle in the specified \n * duration. This will not work if {@link cameraTransition}\n * is active.\n * To use this object, the transition must be enabled using\n * {@link enableCameraTransition}.\n * \n * @param {THREE.Vector3} axis - the starting viewport\n * @param {Number} angle - the viewport ti end the transistion with.\n * @param {Number} duration - duration of the smooth transition.\n */ /**\n * Enable camera transition, {@link rotateCameraTransition} amd\n * {@link cameraTransition} must be called before camera transition can\n * be enabled.\n */ /**\n * Pause the camera transition.\n */ /**\n * Stop the camera transition and remove camera transition\n * and rotate camera transition.\n */ /**\n * Check if camera transition is active.\n */ /**\n * Setup auto tumble object of the camera which will rotate the camera\n * around the target as if the user is rotating the camera by mouse/touch\n * interaction.\n * The tumbling will only be enabled with {@link enabelAutoTumble}. \n * \n * @param {Array} tumbleDirectionIn - direction of the mouse/touch.\n * @param {Number} tumbleRateIn - Speed of the tumbling.\n * @param {Boolean} stopOnCameraInputIn - Disable the tumbling once the user\n * start interacting with the scene.\n */ /**\n * Enable autotumble.\n */ /**\n * Disable the autotumble.\n */ /**\n * Update the autotumble object.\n */ /**\n * Check rather autotumble is active.\n * \n * @return {Boolean}\n */ /**\n * Create an internal raycaster object and enable it for picking.\n * \n * @param {Scene} sceneIn - The scene to pick from, it can be different from the\n * camera's scene.\n * @param {requestCallback} callbackFunctionIn - The callback for pick event.\n * @param {requestCallback} hoverCallbackFunctionIn - The callback for hover\n * over event.\n */ /**\n * Disable raycaster and remove the internal ray caster object.\n */ /**\n * Check rather the camera is in syncControl mode.\n * \n * @return {Boolean}\n */ /**\n * Enable syncControl.\n */ /**\n * Disable syncControl.\n */this.update=timeChanged=>{var delta=timeChanged*playRate,controlEnabled=enabled;currentMode===MODE.PATH?updatePath(delta):currentMode===MODE.SMOOTH_CAMERA_TRANSITION&&smoothCameraTransitionObject?(smoothCameraTransitionObject.update(delta),smoothCameraTransitionObject.isTransitionCompleted()&&(smoothCameraTransitionObject==null,currentMode=MODE.DEFAULT),controlEnabled=!1):currentMode===MODE.ROTATE_CAMERA_TRANSITION&&rotateCameraTransitionObject?(rotateCameraTransitionObject.update(delta),rotateCameraTransitionObject.isTransitionCompleted()&&(rotateCameraTransitionObject==null,currentMode=MODE.DEFAULT),controlEnabled=!1):currentMode===MODE.AUTO_TUMBLE&&cameraAutoTumbleObject?cameraAutoTumbleObject.update(delta):currentMode===MODE.SYNC_CONTROL&&ndcControl&&(handleSyncControl(),controlEnabled=!1),controlEnabled&&(this._state===STATE.ROTATE||this._state===STATE.TOUCH_ROTATE?tumble():this._state===STATE.PAN||this._state===STATE.TOUCH_PAN?translate():(this._state===STATE.ZOOM||this._state===STATE.TOUCH_ZOOM||this._state===STATE.SCROLL)&&flyZoom(),this._state!==STATE.NONE&¤tMode===MODE.AUTO_TUMBLE&&cameraAutoTumbleObject&&cameraAutoTumbleObject.stopOnCameraInput,this._state===STATE.SCROLL&&(this._state=STATE.NONE)),deviceOrientationControl?deviceOrientationControl.update():this.cameraObject.lookAt(this.cameraObject.target)},this.playPath=()=>{currentMode=MODE.PATH},this.stopPath=()=>{currentMode=MODE.DEFAULT},this.isPlayingPath=()=>currentMode===MODE.PATH,this.enableDirectionalLightUpdateWithPath=flag=>{updateLightWithPathFlag=flag},this.enableDeviceOrientation=()=>{deviceOrientationControl||(deviceOrientationControl=new ModifiedDeviceOrientationControls(this.cameraObject))},this.disableDeviceOrientation=()=>{deviceOrientationControl&&(deviceOrientationControl.dispose(),deviceOrientationControl=void 0)},this.isDeviceOrientationEnabled=()=>!!deviceOrientationControl,this.resetView=()=>{var viewport=viewports[defaultViewport];this.cameraObject.near=viewport.nearPlane,this.cameraObject.far=viewport.farPlane,this.cameraObject.position.set(viewport.eyePosition[0],viewport.eyePosition[1],viewport.eyePosition[2]),this.cameraObject.target.set(viewport.targetPosition[0],viewport.targetPosition[1],viewport.targetPosition[2]),this.cameraObject.up.set(viewport.upVector[0],viewport.upVector[1],viewport.upVector[2]),this.cameraObject.updateProjectionMatrix(),this.updateDirectionalLight()},this.setCurrentCameraSettings=newViewport=>{newViewport.nearPlane&&(this.cameraObject.near=newViewport.nearPlane),newViewport.farPlane&&(this.cameraObject.far=newViewport.farPlane),newViewport.eyePosition&&this.cameraObject.position.set(newViewport.eyePosition[0],newViewport.eyePosition[1],newViewport.eyePosition[2]),newViewport.targetPosition&&this.cameraObject.target.set(newViewport.targetPosition[0],newViewport.targetPosition[1],newViewport.targetPosition[2]),newViewport.upVector&&this.cameraObject.up.set(newViewport.upVector[0],newViewport.upVector[1],newViewport.upVector[2]),this.cameraObject.updateProjectionMatrix(),this.updateDirectionalLight()},this.getViewportFromCentreAndRadius=(centreX,centreY,centreZ,radius,view_angle,clip_distance)=>{var eyex=this.cameraObject.position.x-this.cameraObject.target.x,eyey=this.cameraObject.position.y-this.cameraObject.target.y,eyez=this.cameraObject.position.z-this.cameraObject.target.z,fact=1/Math.sqrt(eyex*eyex+eyey*eyey+eyez*eyez);eyex*=fact,eyey*=fact,eyez*=fact;/* look at the centre of the sphere */var eye_distance=radius/Math.tan(view_angle*Math.PI/360),localEyePosition=[centreX+eyex*eye_distance,centreY+eyey*eye_distance,centreZ+eyez*eye_distance],localNearPlane=0,nearClippingFactor=.95;/* shift the eye position to achieve the desired view_angle */localNearPlane=clip_distance>nearClippingFactor*eye_distance?(1-nearClippingFactor)*eye_distance:eye_distance-clip_distance;var newViewport=new Viewport;return newViewport.nearPlane=localNearPlane,newViewport.farPlane=eye_distance+clip_distance,newViewport.eyePosition=localEyePosition,newViewport.targetPosition=[centreX,centreY,centreZ],newViewport.upVector=[this.cameraObject.up.x,this.cameraObject.up.y,this.cameraObject.up.z],newViewport},this.getCurrentViewport=()=>{var currentViewport=new Viewport;return currentViewport.nearPlane=this.cameraObject.near,currentViewport.farPlane=this.cameraObject.far,currentViewport.eyePosition[0]=this.cameraObject.position.x,currentViewport.eyePosition[1]=this.cameraObject.position.y,currentViewport.eyePosition[2]=this.cameraObject.position.z,currentViewport.targetPosition[0]=this.cameraObject.target.x,currentViewport.targetPosition[1]=this.cameraObject.target.y,currentViewport.targetPosition[2]=this.cameraObject.target.z,currentViewport.upVector[0]=this.cameraObject.up.x,currentViewport.upVector[1]=this.cameraObject.up.y,currentViewport.upVector[2]=this.cameraObject.up.z,currentViewport},this.getDefaultEyePosition=()=>eyePosition,this.getDefaultTargetPosition=()=>targetPosition,this.cameraTransition=(startingViewport,endingViewport,durationIn)=>{rotateCameraTransitionObject==null&&(smoothCameraTransitionObject=new SmoothCameraTransition(startingViewport,endingViewport,this,durationIn))},this.rotateCameraTransition=(axis,angle,duration)=>{smoothCameraTransitionObject==null&&(rotateCameraTransitionObject=new RotateCameraTransition(axis,angle,this,duration))},this.enableCameraTransition=()=>{smoothCameraTransitionObject&&(currentMode=MODE.SMOOTH_CAMERA_TRANSITION),rotateCameraTransitionObject&&(currentMode=MODE.ROTATE_CAMERA_TRANSITION)},this.pauseCameraTransition=()=>{currentMode=MODE.DEFAULT},this.stopCameraTransition=()=>{currentMode=MODE.DEFAULT,smoothCameraTransitionObject=void 0,rotateCameraTransitionObject=void 0},this.isTransitioningCamera=()=>currentMode===MODE.SMOOTH_CAMERA_TRANSITION||currentMode===MODE.ROTATE_CAMERA_TRANSITION,this.autoTumble=(tumbleDirectionIn,tumbleRateIn,stopOnCameraInputIn)=>{cameraAutoTumbleObject=new CameraAutoTumble(tumbleDirectionIn,tumbleRateIn,stopOnCameraInputIn,this)},this.enableAutoTumble=()=>{currentMode=MODE.AUTO_TUMBLE},this.stopAutoTumble=()=>{currentMode=MODE.DEFAULT,cameraAutoTumbleObject=void 0},this.updateAutoTumble=()=>{cameraAutoTumbleObject&&(cameraAutoTumbleObject.requireUpdate=!0)},this.isAutoTumble=()=>currentMode===MODE.AUTO_TUMBLE,this.enableRaycaster=(sceneIn,callbackFunctionIn,hoverCallbackFunctionIn)=>{zincRayCaster==null&&(zincRayCaster=new RayCaster(sceneIn,this.scene,callbackFunctionIn,hoverCallbackFunctionIn,this.renderer))},this.disableRaycaster=()=>{zincRayCaster.disable(),zincRayCaster=void 0},this.isSyncControl=()=>currentMpde===MODE.SYNC_CONTROL,this.enableSyncControl=()=>(currentMode=MODE.SYNC_CONTROL,ndcControl||(ndcControl=new NDCCameraControl),ndcControl.setCurrentCameraSettings(this.cameraObject,viewports[defaultViewport]),ndcControl),this.disableSyncControl=()=>{currentMode=MODE.DEFAULT,this.cameraObject.zoom=1,this.cameraObject.updateProjectionMatrix()},this.enable()},SmoothCameraTransition=function(startingViewport,endingViewport,targetCameraIn,durationIn){var startingEyePosition=startingViewport.eyePosition,startingTargetPosition=startingViewport.targetPosition,startingUp=startingViewport.upVector,endingEyePosition=endingViewport.eyePosition,endingTargetPosition=endingViewport.targetPosition,endingUp=endingViewport.upVector,targetCamera=targetCameraIn,duration=durationIn,inbuildTime=0,completed=!1;targetCamera.near=Math.min(startingViewport.nearPlane,endingViewport.nearPlane),targetCamera.far=Math.max(startingViewport.farPlane,endingViewport.farPlane),targetCamera.cameraObject.up.set(endingViewport.upVector[0],endingViewport.upVector[1],endingViewport.upVector[2]),this.setDuration=newDuration=>{duration=newDuration};var updateTime=delta=>{var targetTime=inbuildTime+delta;targetTime>duration&&(targetTime=duration),inbuildTime=targetTime},updateCameraSettings=()=>{var ratio=inbuildTime/duration,eyePosition=[startingEyePosition[0]*(1-ratio)+endingEyePosition[0]*ratio,startingEyePosition[1]*(1-ratio)+endingEyePosition[1]*ratio,startingEyePosition[2]*(1-ratio)+endingEyePosition[2]*ratio],targetPosition=[startingTargetPosition[0]*(1-ratio)+endingTargetPosition[0]*ratio,startingTargetPosition[1]*(1-ratio)+endingTargetPosition[1]*ratio,startingTargetPosition[2]*(1-ratio)+endingTargetPosition[2]*ratio],upVector=[startingUp[0]*(1-ratio)+endingUp[0]*ratio,startingUp[1]*(1-ratio)+endingUp[1]*ratio,startingUp[2]*(1-ratio)+endingUp[2]*ratio];targetCamera.cameraObject.position.set(eyePosition[0],eyePosition[1],eyePosition[2]),targetCamera.cameraObject.target.set(targetPosition[0],targetPosition[1],targetPosition[2])};this.update=delta=>{!1===this.enabled||(updateTime(delta),updateCameraSettings(),inbuildTime==duration&&(completed=!0))},this.isTransitionCompleted=()=>completed},RotateCameraTransition=function(axisIn,angleIn,targetCameraIn,durationIn){var duration=durationIn,inbuildTime=0,completed=!1;this.setDuration=newDuration=>{duration=newDuration};var updateCameraSettings=delta=>{var previousTime=inbuildTime,targetTime=inbuildTime+delta;targetTime>duration&&(targetTime=duration),inbuildTime=targetTime;var actualDelta=inbuildTime-previousTime,ratio=actualDelta/duration;targetCameraIn.rotateAboutLookAtpoint(axisIn,ratio*angleIn)};this.update=delta=>{!1===this.enabled||(updateCameraSettings(delta),inbuildTime==duration&&(completed=!0))},this.isTransitionCompleted=()=>completed},RayCaster=function(sceneIn,hostSceneIn,callbackFunctionIn,hoverCallbackFunctionIn,rendererIn){var scene=sceneIn,renderer=rendererIn,callbackFunction=callbackFunctionIn,hoverCallbackFunction=hoverCallbackFunctionIn,enabled=!0,raycaster=new THREE.Raycaster;raycaster.params.Line.threshold=.1,raycaster.params.Points.threshold=.1;var mouse=new THREE.Vector2,awaiting=!1,lastHoveredDate=new Date,lastHoveredEmpty=!1,timeDiff=0,pickedObjects=[],lastPosition={zincCamera:void 0,x:-1,y:-1};this.enable=()=>{enable=!0},this.disable=()=>{enable=!1};var getIntersectsObject=(zincCamera,x,y)=>{if(zincCamera.getNDCFromDocumentCoords(x,y,mouse),hostSceneIn!==scene){var threejsScene=scene.getThreeJSScene();renderer.render(threejsScene,zincCamera.cameraObject)}raycaster.setFromCamera(mouse,zincCamera.cameraObject);var objects=scene.getPickableThreeJSObjects();//Reset pickedObjects array \nreturn pickedObjects.length=0,raycaster.intersectObjects(objects,!0,pickedObjects)};this.pick=(zincCamera,x,y)=>{enabled&&renderer&&scene&&zincCamera&&callbackFunction&&(getIntersectsObject(zincCamera,x,y),callbackFunction(pickedObjects,x,y))};var hovered=(zincCamera,x,y)=>{if(enabled&&renderer&&scene&&zincCamera&&hoverCallbackFunction){if(getIntersectsObject(zincCamera,x,y),lastHoveredDate.setTime(Date.now()),0===pickedObjects.length){//skip hovered callback if the previous one is empty\nif(lastHoveredEmpty)return;lastHoveredEmpty=!0}else lastHoveredEmpty=!1;hoverCallbackFunction(pickedObjects,x,y)}};this.move=(zincCamera,x,y)=>{enabled&&renderer&&scene&&zincCamera&&hoverCallbackFunction&&(scene.displayMarkers?hovered(zincCamera,x,y):(lastPosition.zincCamera=zincCamera,lastPosition.x=x,lastPosition.y=y,!awaiting&&(timeDiff=lastHoveredDate?Date.now()-lastHoveredDate.getTime():250,250<=timeDiff?hovered(zincCamera,x,y):(awaiting=!0,setTimeout(awaitMove(lastPosition),timeDiff)))))};var awaitMove=lastPosition=>function(){awaiting=!1,hovered(lastPosition.zincCamera,lastPosition.x,lastPosition.y)}},CameraAutoTumble=function(tumbleDirectionIn,tumbleRateIn,stopOnCameraInputIn,targetCameraIn){var tumbleAxis=new THREE.Vector3,targetCamera=targetCameraIn;this.stopOnCameraInput=stopOnCameraInputIn,this.requireUpdate=!0;var b=new THREE.Vector3,c=new THREE.Vector3,computeTumbleAxisAngle=tumbleDirection=>{var tangent_dist=Math.sqrt(tumbleDirection[0]*tumbleDirection[0]+tumbleDirection[1]*tumbleDirection[1]),width=4*Math.abs(tumbleDirection[0]),height=4*Math.abs(tumbleDirection[1]),radius=.25*(width+height),dx=-tumbleDirection[1]/tangent_dist,dy=tumbleDirection[0]/tangent_dist,d=dx*tumbleDirection[0]+dy*-tumbleDirection[1];d>radius?d=radius:d<-radius&&(d=-radius);var phi=Math.acos(d/radius)-.5*Math.PI;/* get axis to rotate about */tumbleAxis.copy(targetCamera.cameraObject.position).sub(targetCamera.cameraObject.target).normalize(),b.copy(targetCamera.cameraObject.up).normalize(),c.crossVectors(b,tumbleAxis).normalize().multiplyScalar(dx),b.multiplyScalar(dy),b.add(c).multiplyScalar(Math.cos(phi)),tumbleAxis.multiplyScalar(Math.sin(phi)).add(b)};this.update=delta=>{!1===this.enabled||(this.requireUpdate&&(computeTumbleAxisAngle(tumbleDirectionIn),this.requireUpdate=!1),targetCamera.rotateAboutLookAtpoint(tumbleAxis,-tumbleRateIn*delta/1e3))}};StereoCameraZoomFixed=function StereoCameraZoomFixed(){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},Object.assign(StereoCameraZoomFixed.prototype,{update:(()=>{var focus,fov,aspect,near,far,zoom,eyeRight=new THREE.Matrix4,eyeLeft=new THREE.Matrix4;return function(camera){var needsUpdate=focus!==camera.focus||fov!==camera.fov||aspect!==camera.aspect*this.aspect||near!==camera.near||far!==camera.far||zoom!==camera.zoom;if(needsUpdate){focus=camera.focus,fov=camera.fov,aspect=camera.aspect*this.aspect,near=camera.near,far=camera.far,zoom=camera.zoom;// Off-axis stereoscopic effect based on\n// http://paulbourke.net/stereographics/stereorender/\nvar xmin,xmax,projectionMatrix=camera.projectionMatrix.clone(),eyeSep=.064/2,eyeSepOnProjection=eyeSep*near/focus,ymax=near*Math.tan(.5*(THREE.Math.DEG2RAD*fov))/camera.zoom;// translate xOffset\n// for left eye\n// for right eye\neyeLeft.elements[12]=-eyeSep,eyeRight.elements[12]=eyeSep,xmin=-ymax*aspect+eyeSepOnProjection,xmax=ymax*aspect+eyeSepOnProjection,projectionMatrix.elements[0]=2*near/(xmax-xmin),projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraL.projectionMatrix.copy(projectionMatrix),xmin=-ymax*aspect-eyeSepOnProjection,xmax=ymax*aspect-eyeSepOnProjection,projectionMatrix.elements[0]=2*near/(xmax-xmin),projectionMatrix.elements[8]=(xmax+xmin)/(xmax-xmin),this.cameraR.projectionMatrix.copy(projectionMatrix)}this.cameraL.matrixWorld.copy(camera.matrixWorld).multiply(eyeLeft),this.cameraR.matrixWorld.copy(camera.matrixWorld).multiply(eyeRight)}})()});/** the following StereoEffect is written by third party */ /**\n * @author alteredq / http://alteredqualia.com/\n * @authod mrdoob / http://mrdoob.com/\n * @authod arodic / http://aleksandarrodic.com/\n * @authod fonserbc / http://fonserbc.github.io/\n*/var StereoEffect=function(renderer){var _stereo=new StereoCameraZoomFixed;_stereo.aspect=.5,this.setSize=(width,height)=>{renderer.setSize(width,height)},this.render=(scene,camera)=>{scene.updateMatrixWorld(),null===camera.parent&&camera.updateMatrixWorld(),_stereo.update(camera);var size=renderer.getSize();renderer.setScissorTest(!0),renderer.clear(),renderer.setScissor(0,0,size.width/2,size.height),renderer.setViewport(0,0,size.width/2,size.height),renderer.render(scene,_stereo.cameraL),renderer.setScissor(size.width/2,0,size.width/2,size.height),renderer.setViewport(size.width/2,0,size.width/2,size.height),renderer.render(scene,_stereo.cameraR),renderer.setScissorTest(!1)}};/**\n * @author richt / http://richt.me\n * @author WestLangley / http://github.com/WestLangley\n *\n * W3C Device Orientation control (http://w3c.github.io/deviceorientation/spec-source-orientation.html)\n */ModifiedDeviceOrientationControls=function ModifiedDeviceOrientationControls(object){var scope=this;this.object=object,this.object.rotation.reorder(\"YXZ\"),this.enabled=!0,this.deviceOrientation={},this.screenOrientation=0;var onDeviceOrientationChangeEvent=event=>{scope.deviceOrientation=event},onScreenOrientationChangeEvent=()=>{\"undefined\"!=typeof window&&(scope.screenOrientation=window.orientation||0)},setObjectQuaternion=(()=>{var zee=new THREE.Vector3(0,0,1),euler=new THREE.Euler,q0=new THREE.Quaternion,q1=new THREE.Quaternion(-Math.sqrt(.5),0,0,Math.sqrt(.5));// - PI/2 around the x-axis\nreturn(cameraObject,alpha,beta,gamma,orient)=>{var vector=new THREE.Vector3(0,0,1);vector.subVectors(cameraObject.target,cameraObject.position),euler.set(beta,alpha,-gamma,\"YXZ\");// 'ZXY' for the device, but 'YXZ' for us\nvar quaternion=new THREE.Quaternion;// orient the device\n// camera looks out the back of the device, not the top\n// adjust for screen orientation\nquaternion.setFromEuler(euler),quaternion.multiply(q1),quaternion.multiply(q0.setFromAxisAngle(zee,-orient)),vector.applyQuaternion(quaternion),vector.addVectors(cameraObject.position,vector),cameraObject.lookAt(vector)}})();this.connect=()=>{onScreenOrientationChangeEvent(),\"undefined\"!=typeof window&&(window.addEventListener(\"orientationchange\",onScreenOrientationChangeEvent,!1),window.addEventListener(\"deviceorientation\",onDeviceOrientationChangeEvent,!1)),scope.enabled=!0},this.disconnect=()=>{\"undefined\"!=typeof window&&(window.removeEventListener(\"orientationchange\",onScreenOrientationChangeEvent,!1),window.removeEventListener(\"deviceorientation\",onDeviceOrientationChangeEvent,!1)),scope.enabled=!1},this.update=()=>{if(!1!==scope.enabled){var alpha=scope.deviceOrientation.alpha?THREE.Math.degToRad(scope.deviceOrientation.alpha):0,beta=scope.deviceOrientation.beta?THREE.Math.degToRad(scope.deviceOrientation.beta):0,gamma=scope.deviceOrientation.gamma?THREE.Math.degToRad(scope.deviceOrientation.gamma):0,orient=scope.screenOrientation?THREE.Math.degToRad(scope.screenOrientation):0;// Z\nsetObjectQuaternion(scope.object,alpha,beta,gamma,orient)}},this.dispose=function(){this.disconnect()},this.connect()};var NDCCameraControl=function(){var camera=void 0,targetCamera=void 0,defaultViewport=void 0,position=new THREE.Vector3,target=new THREE.Vector3,v1=new THREE.Vector3,v2=new THREE.Vector3,eventCallback=void 0;//return top left and size\nthis.setCurrentCameraSettings=(cameraIn,defaultViewportIn)=>{camera=cameraIn.clone(),targetCamera=cameraIn,defaultViewport=defaultViewportIn,camera.near=defaultViewport.nearPlane,defaultViewport.farPlane&&(camera.far=defaultViewport.farPlane),defaultViewport.eyePosition&&camera.position.set(defaultViewport.eyePosition[0],defaultViewport.eyePosition[1],defaultViewport.eyePosition[2]),defaultViewport.upVector&&camera.up.set(defaultViewport.upVector[0],defaultViewport.upVector[1],defaultViewport.upVector[2]),defaultViewport.targetPosition&&(camera.target=new THREE.Vector3(defaultViewport.targetPosition[0],defaultViewport.targetPosition[1],defaultViewport.targetPosition[2]),camera.lookAt(camera.target)),camera.updateProjectionMatrix(),position.copy(camera.position).project(camera),target.copy(camera.target).project(camera)},this.getCurrentPosition=()=>(target.copy(targetCamera.target).project(camera),[target.x,target.y]),this.zoom=delta=>{var zoom=Math.max(targetCamera.zoom-.002*delta,1);targetCamera.zoom=zoom,targetCamera.updateProjectionMatrix()},this.zoomToBox=(box,zoom)=>{box.getCenter(v1),v1.project(camera),this.setCenterZoom([v1.x,v1.y],zoom)},this.getPanZoom=()=>({target:this.getCurrentPosition(),zoom:targetCamera.zoom}),this.setCenterZoom=(center,zoom)=>{v1.set(center[0],center[1],target.z).unproject(camera),v2.copy(v1).sub(targetCamera.target),targetCamera.target.copy(v1),targetCamera.lookAt(targetCamera.target),targetCamera.position.add(v2),targetCamera.zoom=zoom,targetCamera.updateProjectionMatrix()},this.setEventCallback=callback=>{(callback===void 0||\"function\"==typeof callback)&&(eventCallback=callback)},this.triggerCallback=()=>{eventCallback!==void 0&&\"function\"==typeof eventCallback&&eventCallback()}};exports.Viewport=Viewport,exports.CameraControls=CameraControls,exports.SmoothCameraTransition=SmoothCameraTransition,exports.RotateCameraTransition=RotateCameraTransition,exports.RayCaster=RayCaster,exports.CameraAutoTumble=CameraAutoTumble,exports.StereoEffect=StereoEffect,exports.NDCCameraControl=NDCCameraControl;\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar{Group,Matrix4}=__webpack_require__(3),uniqueiId=0,getUniqueId=function(){return\"re\"+uniqueiId++},Region=function(parentIn){var parent=parentIn,group=new Group;group.matrixAutoUpdate=!1,group.userData=this;var children=[],name=\"\",zincObjects=[],tMatrix=new Matrix4,duration=3e3;/**\n * Hide all primitives belong to this region.\n */ /**\n * Show all primitives belong to this region.\n */ /**\n * Set the visibility and propagate it down the hierarchies\n * depending on the flag.\n * \n * @param {Boolean} flag - A flag indicating either the visibilty to be on/off.\n */ /**\n * Get the visibility of the region and its children.\n * \n * @return {Boolean}\n */ /**\n * Get the {THREE.Group} containing all child regions and their\n * primitives.\n * \n * @return {THREE.Group}\n */ /**\n * Set the transformation with a {THREE.Matrix4} matrix, this will affect\n * all primitives in this and its child regions\n * \n * @param {THREE.Matrix4} transformation - The transformation matrix\n * used for the transformation.\n */ /**\n * Set the name of this region.\n * \n * @param {String} nameIn - Name to be set for this region. It must be defined\n * and non-empty.\n */ /**\n * Get the name of this region.\n * \n * @return {String}\n */ /**\n * Get the parent region.\n * \n * @return {Region}\n */ /**\n * Get the array of each hierarachy from the root region to this region.\n * \n * @return {Array}\n */ /**\n * Get the full paths from the root region to this region.\n * \n * @return {String}\n */ /**\n * Create a new child region with the provided name.\n * @param {String} nameIn - Name to be set for the new child region.\n * \n * @return {Region}\n */ /**\n * Get the child region with matching childName.\n * @param {String} childName - Name to be matched.\n * \n * @return {Region}\n */ /**\n * Find a child region using the path array.\n * @param {Array} pathArray - Array containing regions' name at each\n * hierarchy to match.\n * \n * @return {Region}\n */ /**\n * Find the region using the provided relative path.\n * \n * @param {String} path - Relative paths from this region\n * to the child region.\n * \n * @return {Region}\n */ /**\n * Create a new child using the path array. All required new regions\n * down the path will be created.\n * \n * @param {Array} pathArray - Array containing regions' name, new regions\n * will be created along the path if not found.\n * \n * @return {Region}\n */ /**\n * Create a new child using the path. All required new regions\n * down the path will be created.\n * \n * @param {String} path - Relative paths from the region\n * to the child region.\n * \n * @return {Region}\n */ /**\n * Return existing region if it exists, otherwise, create a new\n * region with the provided path.\n * \n * @param {String} path - Relative paths from the region\n * to the child region.\n * \n * @return {Region}\n */ /**\n * Add a zinc object into this region, the morph will be added\n * to the group.\n * \n * @param {ZincObject} zincObject - Zinc object to be added into\n * this region.\n */ /**\n * Remove a ZincObject from this region if it presents. This will eventually\n * destroy the object and free up the memory.\n * \n * @param {ZincObject} zincObject - object to be removed from this region.\n */ /**\n * Return true if pickable objects require an update.\n * \n * @param {Boolean} transverse - Check child regions as well\n * if this is set to true.\n * \n * @return {Boolean}\n */ /**\n * Get all pickable objects.\n */ /**\n * Set the default duration value for all zinc objects\n * that are to be loaded into this region.\n * \n * @param {Number} durationIn - duration of the scene.\n */ /**\n * Get the default duration value.\n * returns {Number}\n */ /**\n * Get the bounding box of all the object in this and child regions only.\n * Do not include the matrix transformation here, it is done at the primitives\n * level.\n * \n * @returns {THREE.Box3} \n */ /**\n * Clear and dispose all objects belong to this region.\n * \n * @param {Boolean} transverse - Clear and dispose child regions as well\n * if this is set to true.\n */ /**\n * Check if a zincObject is a member of this region.\n * \n * @param {ZincObject} zincObject - The ZincObject to be checked.\n * @param {Boolean} transverse - Also check the child regions.\n * \n * @return {Boolean}\n */ /**\n * A function which iterates through the list of geometries and call the callback\n * function with the geometries as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the geometry\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /**\n * A function which iterates through the list of glyphsets and call the callback\n * function with the glyphset as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the glyphset\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /**\n * A function which iterates through the list of pointsets and call the callback\n * function with the pointset as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the pointset\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /**\n * A function which iterates through the list of lines and call the callback\n * function with the lines as the argument.\n * \n * @param {Function} callbackFunction - Callback function with the lines\n * as an argument.\n * @param {Boolean} transverse - Also perform the same callback function for\n * all child regions if this is set to be true.\n */ /** \n * Find and return all zinc objects in this and child regions with \n * the matching GroupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all geometries in this and child regions with \n * the matching GroupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all pointsets in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all glyphsets in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Find and return all lines in this and child regions with\n * the matching groupName.\n * \n * @param {String} groupName - Groupname to match with.\n * @param {Boolean} transverse - Also look for the object with groupName\n * in child regions if set to true.\n * @returns {Array}\n */ /** \n * Get all zinc objects in this region.\n * \n * @param {Boolean} transverse - Include zinc objects in child regions if this is\n * set to true.\n * @returns {Array}\n */ /** \n * Get all child regions.\n * \n * @param {Boolean} transverse - Include all regions which are descendants of \n * this reigon when this is set to true.\n * @returns {Array}\n */ /**\n * Get the current time of the region.\n * Return -1 if no graphics in the region.\n * \n * @return {Number}\n */ /**\n * Set the current time of all the objects of this region.\n * \n * @param {Number} time - Value to set the time to.\n * @param {Boolean} transverse - Set the time for chidl regions if\n * this is set to true.\n */ /**\n * Check if any object in this region is time varying.\n * \n * @return {Boolean}\n */ /**\n * Update geometries and glyphsets based on the calculated time.\n * @private\n */tMatrix.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this.pickableUpdateRequired=!0,this.isRegion=!0,this.uuid=getUniqueId(),this.hideAllPrimitives=()=>{children.forEach(child=>child.hideAllPrimitives()),zincObjects.forEach(zincObject=>zincObject.setVisibility(!1))},this.showAllPrimitives=()=>{children.forEach(child=>child.showAllPrimitives()),zincObjects.forEach(zincObject=>zincObject.setVisibility(!0))},this.setVisibility=flag=>{group.visible=flag},this.getVisibility=()=>group.visible,this.getGroup=()=>group,this.setTransformation=transformation=>{tMatrix.set(...transformation),group.matrix.copy(tMatrix),group.updateMatrixWorld()},this.setName=nameIn=>{nameIn&&\"\"!==nameIn&&(name=nameIn)},this.getName=()=>name,this.getParent=()=>parent,this.getFullSeparatedPath=()=>{var paths=[];if(\"\"!==name){paths.push(name);for(var parentName,p=parent;p!==void 0;)parentName=p.getName(),\"\"!==parentName&&paths.unshift(parentName),p=p.getParent()}return paths},this.getFullPath=()=>{var paths=this.getFullSeparatedPath();if(0<paths.length){var fullPath=paths.shift();return paths.forEach(path=>{fullPath=fullPath.concat(\"/\",path)}),fullPath}return\"\"},this.createChild=nameIn=>{var childRegion=new Region(this);return childRegion.setName(nameIn),children.push(childRegion),group.add(childRegion.getGroup()),childRegion},this.getChildWithName=childName=>{if(childName)for(var lowerChildName=childName.toLowerCase(),i=0;i<children.length;i++)if(children[i].getName().toLowerCase()===lowerChildName)return children[i]},this.findChildFromSeparatedPath=pathArray=>{if(pathArray&&0<pathArray.length&&\"\"===pathArray[0]&&pathArray.shift(),pathArray&&0<pathArray.length){var childRegion=this.getChildWithName(pathArray[0]);return childRegion?(pathArray.shift(),childRegion.findChildFromSeparatedPath(pathArray)):void 0}return this},this.findChildFromPath=path=>{var pathArray=path.split(\"/\");return this.findChildFromSeparatedPath(pathArray)},this.createChildFromSeparatedPath=pathArray=>{if(0<pathArray.length&&\"\"===pathArray[0]&&pathArray.shift(),0<pathArray.length){var childRegion=this.getChildWithName(pathArray[0]);return childRegion||(childRegion=this.createChild(pathArray[0])),pathArray.shift(),childRegion.createChildFromSeparatedPath(pathArray)}return this},this.createChildFromPath=path=>{var pathArray=path.split(\"/\");return this.createChildFromSeparatedPath(pathArray)},this.findOrCreateChildFromPath=path=>{var childRegion=this.findChildFromPath(path);return childRegion||(childRegion=this.createChildFromPath(path)),childRegion},this.addZincObject=zincObject=>{zincObject&&(zincObject.setRegion(this),group.add(zincObject.morph),zincObjects.push(zincObject),this.pickableUpdateRequired=!0)},this.removeZincObject=zincObject=>{for(var i=0;i<zincObjects.length;i++)if(zincObject===zincObjects[i])return group.remove(zincObject.morph),zincObjects.splice(i,1),void zincObject.dispose()},this.checkPickableUpdateRequred=transverse=>{if(this.pickableUpdateRequired)return!0;if(transverse)for(var flag=!1,i=0;i<children.length;i++)if(flag=children[i].checkPickableUpdateRequred(transverse),flag)return!0;return!1},this.getPickableThreeJSObjects=(objectsList,transverse)=>(zincObjects.forEach(zincObject=>{if(zincObject.morph&&zincObject.morph.visible){var marker=zincObject.marker;marker&&marker.isEnabled()&&objectsList.push(marker.morph),objectsList.push(zincObject.morph)}}),transverse&&children.forEach(childRegion=>{childRegion.getPickableThreeJSObjects(objectsList,transverse)}),this.pickableUpdateRequired=!1,objectsList),this.setDuration=durationIn=>{duration=durationIn,zincObjects.forEach(zincObject=>zincObject.setDuration(durationIn)),children.forEach(childRegion=>childRegion.setDuration(durationIn))},this.getDuration=()=>duration,this.getBoundingBox=transverse=>{var boundingBox1,boundingBox2;return zincObjects.forEach(zincObject=>{boundingBox2=zincObject.getBoundingBox(),boundingBox2&&(null==boundingBox1?boundingBox1=boundingBox2.clone():boundingBox1.union(boundingBox2))}),transverse&&children.forEach(childRegion=>{boundingBox2=childRegion.getBoundingBox(transverse),boundingBox2&&(null==boundingBox1?boundingBox1=boundingBox2.clone():boundingBox1.union(boundingBox2))}),boundingBox1},this.clear=transverse=>{transverse&&children.forEach(childRegion=>childRegion.clear(transverse)),zincObjects.forEach(zincObject=>{group.remove(zincObject.morph),zincObject.dispose()}),children=[],zincObjects=[]},this.objectIsInRegion=(zincObject,transverse)=>{for(var i=0;i<zincObjects.length;i++)if(zincObject===zincObjects[i])return!0;if(transverse)for(var _i=0;_i<children.length;_i++)if(children[_i].objectIsInRegion(zincObject,transverse))return!0;return!1},this.forEachGeometry=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isGeometry&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachGeometry(callbackFunction,transverse))},this.forEachGlyphset=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isGlyphset&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachGlyphset(callbackFunction,transverse))},this.forEachPointset=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isPointset&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachPointset(callbackFunction,transverse))},this.forEachLine=(callbackFunction,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.isLines&&callbackFunction(zincObject)}),transverse&&children.forEach(childRegion=>childRegion.forEachLine(callbackFunction,transverse))},this.findObjectsWithAnatomicalId=(anatomicalId,transverse)=>(zincObjects.forEach(zincObject=>{zincObject.anatomicalId===anatomicalId&&objectsArray.push(zincObject)}),transverse&&children.forEach(childRegion=>{var childObjects=childRegion.findObjectsWithAnatomicalId(anatomicalId,transverse);objectsArray.push(...childObjects)}),objectsArray),this.findObjectsWithGroupName=(groupName,transverse)=>{var objectsArray=[];return zincObjects.forEach(zincObject=>{var lowerObjectName=zincObject.groupName?zincObject.groupName.toLowerCase():zincObject.groupName,lowerGroupName=groupName?groupName.toLowerCase():groupName;lowerObjectName===lowerGroupName&&objectsArray.push(zincObject)}),transverse&&children.forEach(childRegion=>{var childObjects=childRegion.findObjectsWithGroupName(groupName,transverse);objectsArray.push(...childObjects)}),objectsArray},this.findGeometriesWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),geometriesArray=primitivesArray.filter(primitive=>primitive.isGeometry);return geometriesArray},this.findPointsetsWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),pointsetsArray=primitivesArray.filter(primitive=>primitive.isPointset);return pointsetsArray},this.findGlyphsetsWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),glyphsetsArray=primitivesArray.filter(primitive=>primitive.isGlyphset);return glyphsetsArray},this.findLinesWithGroupName=(groupName,transverse)=>{var primitivesArray=this.findObjectsWithGroupName(groupName,transverse),linesArray=primitivesArray.filter(primitive=>primitive.isLines);return linesArray},this.getAllObjects=transverse=>{var objectsArray=[...zincObjects];return transverse&&children.forEach(childRegion=>{var childObjects=childRegion.getAllObjects(transverse);objectsArray.push(...childObjects)}),objectsArray},this.getChildRegions=transverse=>{var objectsArray=[...children];return transverse&&children.forEach(childRegion=>{var childObjects=childRegion.getChildRegions(transverse);objectsArray.push(...childObjects)}),objectsArray},this.getCurrentTime=()=>{if(zincObjects[0]!=null)return zincObjects[0].getCurrentTime();for(var time,i=0;i<children.length;i++)if(time=children[i].getCurrentTime(),-1!==time)return time;return-1},this.setMorphTime=(time,transverse)=>{zincObjects.forEach(zincObject=>{zincObject.setMorphTime(time)}),transverse&&children.forEach(childRegion=>{childRegion.setMorphTime(time)})},this.isTimeVarying=()=>{for(var i=0;i<zincObjects.length;i++)if(zincObjects[i].isTimeVarying())return!0;for(var _i2=0;_i2<children.length;_i2++)if(children[_i2].isTimeVarying())return!0;return!1},this.renderGeometries=(playRate,delta,playAnimation,options,transverse)=>{// Let video dictates the progress if one is present\nvar allObjects=this.getAllObjects(transverse);//process markers visibility and size\nif(allObjects.forEach(zincObject=>{zincObject.render(playRate*delta,playAnimation,options)}),options&&options.displayMarkers&&!1===playAnimation&&0<options.markerDepths.length){var min=Math.min(...options.markerDepths),max=Math.max(...options.markerDepths);allObjects.forEach(zincObject=>{zincObject.processMarkerVisual(min,max,options)})}}};exports.Region=Region;\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3);/**\n * This provide a full scale minimap. It will always\n * display the whole map.\n * \n * @class\n * @author Alan Wu\n * @return {Minimap}\n */exports.Minimap=function(sceneIn){var targetScene=sceneIn;this.camera=new THREE.OrthographicCamera(-.5,.5,.5,-.5,.01,10),this.helper=void 0;var geometry=new THREE.BufferGeometry,vertices=new Float32Array([-1,-1,1,1,-1,1,1,1,1,1,1,1,-1,1,1,-1,-1,1]),positionAttributes=new THREE.BufferAttribute(vertices,3);geometry.setAttribute(\"position\",positionAttributes);var material=new THREE.MeshBasicMaterial({color:3355443,depthTest:!1,depthWrite:!1,opacity:.5,transparent:!0});this.mask=new THREE.Mesh(geometry,material);var _box=new THREE.Box3,_center=new THREE.Vector3;this.getDiffFromNormalised=(x,y)=>{_box.setFromBufferAttribute(positionAttributes).getCenter(_center);var coord=_center.clone().project(this.camera),new_coord=new THREE.Vector3(x,y,coord.z).unproject(this.camera);return new_coord.sub(_center)};var setCurrentCameraSettings=(diameter,newViewport)=>{targetScene.camera.near&&(this.camera.near=targetScene.camera.near),newViewport.farPlane&&(this.camera.far=newViewport.farPlane),newViewport.eyePosition&&this.camera.position.set(newViewport.eyePosition[0],newViewport.eyePosition[1],newViewport.eyePosition[2]),newViewport.upVector&&this.camera.up.set(newViewport.upVector[0],newViewport.upVector[1],newViewport.upVector[2]),newViewport.targetPosition&&this.camera.lookAt(new THREE.Vector3(newViewport.targetPosition[0],newViewport.targetPosition[1],newViewport.targetPosition[2])),this.camera.zoom=1/diameter,this.camera.updateProjectionMatrix()};this.getBoundary=()=>{var target=new THREE.Vector3().copy(targetScene.camera.target).project(targetScene.camera),v1=new THREE.Vector3(-1,-1,target.z).unproject(targetScene.camera),v2=new THREE.Vector3(1,-1,target.z).unproject(targetScene.camera),v3=new THREE.Vector3(1,1,target.z).unproject(targetScene.camera),v4=new THREE.Vector3(-1,1,target.z).unproject(targetScene.camera);positionAttributes.copyVector3sArray([v1,v2,v3,v3,v4,v1]),positionAttributes.needsUpdate=!0},this.updateCamera=()=>{this.getBoundary();var cameraControl=targetScene.getZincCameraControls(),boundingBox=targetScene.getBoundingBox();if(boundingBox){// enlarge radius to keep image within edge of window\nvar diameter=boundingBox.min.distanceTo(boundingBox.max),radius=diameter/2,centreX=(boundingBox.min.x+boundingBox.max.x)/2,centreY=(boundingBox.min.y+boundingBox.max.y)/2,centreZ=(boundingBox.min.z+boundingBox.max.z)/2,viewport=cameraControl.getViewportFromCentreAndRadius(centreX,centreY,centreZ,radius,40,radius*4);setCurrentCameraSettings(diameter,viewport)}}};\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ThreeBSP=__webpack_require__(44)(THREE),Geometry=__webpack_require__(2).Geometry,work=__webpack_require__(45),Promise=__webpack_require__(46).default,JSONLoader=THREE.BufferGeometryLoader,GeometryCSG=function(hostIn){//ZincGeoemtry of the main geometry\nvar host;hostIn&&hostIn.isGeometry&&(host=hostIn);var core=void 0,worker=void 0,onProgress=!1,myResolve=void 0,createGeometryFromJSON=json=>{var material=host.getMorph().material.clone();material.morphTargets=!1;var newGeometry=new Geometry,JSONParser=new JSONLoader,geometry=JSONParser.parse(json),mesh=new THREE.Mesh(geometry.geometry,material);return newGeometry.geometry=mesh.geometry,mesh.userData=newGeometry,newGeometry.setMorph(mesh),newGeometry},workerEventHandler=ev=>{switch(ev.data.action){case\"message\":console.log(ev.data.message);break;case\"result\":var csg=new GeometryCSG(createGeometryFromJSON(ev.data.object));myResolve&&myResolve(csg),myResolve=void 0,onProgress=!1;break;default:throw\"Cannot handle specified action.\";}},initialise=hostIn=>{if(void 0!==work&&(worker=work(/*require.resolve*/(47))),!worker)core=new(__webpack_require__(48).GeometryCSGInternal)(hostIn);else if(hostIn&&hostIn.isGeometry){var mesh=hostIn.getMorph(),json=mesh.geometry.clone().applyMatrix(mesh.matrix).toJSON();worker.addEventListener(\"message\",function(ev){workerEventHandler(ev)}),worker.postMessage({action:\"initialise\",object:json})}};this.getHostGeometry=()=>{var tempCSG=new ThreeBSP(host.getMorph());return new createZincGeometry(tempCSG)},this.getGeometry=()=>host;var createZincGeometry=csgMesh=>{var material=host.getMorph().material.clone();material.morphTargets=!1;var newMesh=csgMesh.toMesh(material),newGeometry=new Geometry;return newGeometry.geometry=newMesh.geometry,newMesh.userData=newGeometry,newGeometry.setMorph(newMesh),newGeometry};this.setCSG=CSG=>{core.setCSG(CSG)};var sendToWork=(guestGeometry,action,resolve,reject)=>{if(!onProgress){var mesh=guestGeometry.getMorph(),json=mesh.geometry.clone().applyMatrix(mesh.matrix).toJSON();myResolve=resolve,onProgress=!0,worker.postMessage({action:action,object:json})}else reject(\"On progress\")};this.intersect=guestGeometry=>new Promise((resolve,reject)=>{if(worker)sendToWork(guestGeometry,\"intersect\",resolve,reject);else{var result=core.intersect(guestGeometry),newCSG=new GeometryCSG(createZincGeometry(result));newCSG.setCSG(result),resolve(newCSG)}}),this.subtract=guestGeometry=>new Promise((resolve,reject)=>{if(worker)sendToWork(guestGeometry,\"intersect\",resolve,reject);else{var result=core.subtract(guestGeometry),newCSG=new GeometryCSG(createZincGeometry(result));newCSG.setCSG(result),resolve(newCSG)}}),this.union=guestGeometry=>new Promise((resolve,reject)=>{if(worker)sendToWork(guestGeometry,\"intersect\",resolve,reject);else{var result=core.union(guestGeometry),newCSG=new GeometryCSG(createZincGeometry(result));newCSG.setCSG(result),resolve(newCSG)}}),this.terminateWorker=()=>{worker&&worker.terminate()},initialise(hostIn)};exports.GeometryCSG=GeometryCSG;\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar ThreeBSP,EPSILON=1e-5,COPLANAR=0,FRONT=1,BACK=2,SPANNING=3;module.exports=function(THREE){var ThreeBSP=function(geometry){// Convert THREE.Geometry to ThreeBSP\nvar i,_length_i,face,vertex,faceVertexUvs,uvs,polygon,polygons=[];if(geometry.isBufferGeometry&&(geometry=new THREE.Geometry().fromBufferGeometry(geometry)),geometry instanceof THREE.Geometry)this.matrix=new THREE.Matrix4;else if(geometry.isMesh)geometry.updateMatrix(),this.matrix=geometry.matrix.clone(),geometry=geometry.geometry,geometry.isBufferGeometry&&(geometry=new THREE.Geometry().fromBufferGeometry(geometry)),geometry.mergeVertices(),geometry.computeVertexNormals(!1);else{if(geometry instanceof ThreeBSP.Node)return this.tree=geometry,this.matrix=new THREE.Matrix4,this;throw\"ThreeBSP: Given geometry is unsupported\"}for(i=0,_length_i=geometry.faces.length;i<_length_i;i++){if(face=geometry.faces[i],faceVertexUvs=geometry.faceVertexUvs[0][i],polygon=new ThreeBSP.Polygon,face instanceof THREE.Face3)vertex=geometry.vertices[face.a],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[0].x,faceVertexUvs[0].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[0],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.b],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[1].x,faceVertexUvs[1].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[2],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.c],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[2].x,faceVertexUvs[2].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[2],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex);else if(typeof THREE.Face4)vertex=geometry.vertices[face.a],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[0].x,faceVertexUvs[0].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[0],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.b],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[1].x,faceVertexUvs[1].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[1],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.c],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[2].x,faceVertexUvs[2].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[2],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex),vertex=geometry.vertices[face.d],uvs=faceVertexUvs?new THREE.Vector2(faceVertexUvs[3].x,faceVertexUvs[3].y):null,vertex=new ThreeBSP.Vertex(vertex.x,vertex.y,vertex.z,face.vertexNormals[3],uvs),vertex.applyMatrix4(this.matrix),polygon.vertices.push(vertex);else throw\"Invalid face type at index \"+i;polygon.calculateProperties(),polygons.push(polygon)}this.tree=new ThreeBSP.Node(polygons)};return ThreeBSP.prototype.subtract=function(other_tree){var a=this.tree.clone(),b=other_tree.tree.clone();return a.invert(),a.clipTo(b),b.clipTo(a),b.invert(),b.clipTo(a),b.invert(),a.build(b.allPolygons()),a.invert(),a=new ThreeBSP(a),a.matrix=this.matrix,a},ThreeBSP.prototype.union=function(other_tree){var a=this.tree.clone(),b=other_tree.tree.clone();return a.clipTo(b),b.clipTo(a),b.invert(),b.clipTo(a),b.invert(),a.build(b.allPolygons()),a=new ThreeBSP(a),a.matrix=this.matrix,a},ThreeBSP.prototype.intersect=function(other_tree){var a=this.tree.clone(),b=other_tree.tree.clone();return a.invert(),b.clipTo(a),b.invert(),a.clipTo(b),b.clipTo(a),a.build(b.allPolygons()),a.invert(),a=new ThreeBSP(a),a.matrix=this.matrix,a},ThreeBSP.prototype.toGeometry=function(){var i,j,polygon,polygon_vertice_count,vertex_idx_a,vertex_idx_b,vertex_idx_c,vertex,face,verticeUvs,matrix=new THREE.Matrix4().getInverse(this.matrix),geometry=new THREE.Geometry,polygons=this.tree.allPolygons(),polygon_count=polygons.length,vertice_dict={};for(i=0;i<polygon_count;i++)for(polygon=polygons[i],polygon_vertice_count=polygon.vertices.length,j=2;j<polygon_vertice_count;j++)verticeUvs=[],vertex=polygon.vertices[0],verticeUvs.push(new THREE.Vector2(vertex.uv.x,vertex.uv.y)),vertex=new THREE.Vector3(vertex.x,vertex.y,vertex.z),vertex.applyMatrix4(matrix),\"undefined\"==typeof vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]?(geometry.vertices.push(vertex),vertex_idx_a=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]=geometry.vertices.length-1):vertex_idx_a=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z],vertex=polygon.vertices[j-1],verticeUvs.push(new THREE.Vector2(vertex.uv.x,vertex.uv.y)),vertex=new THREE.Vector3(vertex.x,vertex.y,vertex.z),vertex.applyMatrix4(matrix),\"undefined\"==typeof vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]?(geometry.vertices.push(vertex),vertex_idx_b=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]=geometry.vertices.length-1):vertex_idx_b=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z],vertex=polygon.vertices[j],verticeUvs.push(new THREE.Vector2(vertex.uv.x,vertex.uv.y)),vertex=new THREE.Vector3(vertex.x,vertex.y,vertex.z),vertex.applyMatrix4(matrix),\"undefined\"==typeof vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]?(geometry.vertices.push(vertex),vertex_idx_c=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z]=geometry.vertices.length-1):vertex_idx_c=vertice_dict[vertex.x+\",\"+vertex.y+\",\"+vertex.z],face=new THREE.Face3(vertex_idx_a,vertex_idx_b,vertex_idx_c,new THREE.Vector3(polygon.normal.x,polygon.normal.y,polygon.normal.z)),geometry.faces.push(face),geometry.faceVertexUvs[0].push(verticeUvs);return geometry},ThreeBSP.prototype.toBufferGeometry=function(){var geometry=this.toGeometry(),bufferGeometry=new THREE.BufferGeometry().fromGeometry(geometry);return bufferGeometry},ThreeBSP.prototype.toMesh=function(material){var geometry=this.toBufferGeometry(),mesh=new THREE.Mesh(geometry,material);return mesh.position.setFromMatrixPosition(this.matrix),mesh.rotation.setFromRotationMatrix(this.matrix),mesh},ThreeBSP.Polygon=function(vertices){vertices instanceof Array||(vertices=[]),this.vertices=vertices,0<vertices.length?this.calculateProperties():this.normal=this.w=void 0},ThreeBSP.Polygon.prototype.calculateProperties=function(){var a=this.vertices[0],b=this.vertices[1],c=this.vertices[2];return this.normal=b.clone().subtract(a).cross(c.clone().subtract(a)).normalize(),this.w=this.normal.clone().dot(a),this},ThreeBSP.Polygon.prototype.clone=function(){var i,vertice_count,polygon=new ThreeBSP.Polygon;for(i=0,vertice_count=this.vertices.length;i<vertice_count;i++)polygon.vertices.push(this.vertices[i].clone());return polygon.calculateProperties(),polygon},ThreeBSP.Polygon.prototype.flip=function(){var i,vertices=[];for(this.normal.multiplyScalar(-1),this.w*=-1,i=this.vertices.length-1;0<=i;i--)vertices.push(this.vertices[i]);return this.vertices=vertices,this},ThreeBSP.Polygon.prototype.classifyVertex=function(vertex){var side_value=this.normal.dot(vertex)-this.w;return side_value<-EPSILON?BACK:side_value>EPSILON?FRONT:COPLANAR},ThreeBSP.Polygon.prototype.classifySide=function(polygon){var i,vertex,classification,num_positive=0,num_negative=0,vertice_count=polygon.vertices.length;for(i=0;i<vertice_count;i++)vertex=polygon.vertices[i],classification=this.classifyVertex(vertex),classification===FRONT?num_positive++:classification===BACK&&num_negative++;return 0<num_positive&&0===num_negative?FRONT:0===num_positive&&0<num_negative?BACK:0===num_positive&&0===num_negative?COPLANAR:SPANNING},ThreeBSP.Polygon.prototype.splitPolygon=function(polygon,coplanar_front,coplanar_back,front,back){var classification=this.classifySide(polygon);if(classification===COPLANAR)(0<this.normal.dot(polygon.normal)?coplanar_front:coplanar_back).push(polygon);else if(classification===FRONT)front.push(polygon);else if(classification===BACK)back.push(polygon);else{var vertice_count,i,j,ti,tj,vi,vj,t,v,f=[],b=[];for(i=0,vertice_count=polygon.vertices.length;i<vertice_count;i++)j=(i+1)%vertice_count,vi=polygon.vertices[i],vj=polygon.vertices[j],ti=this.classifyVertex(vi),tj=this.classifyVertex(vj),ti!=BACK&&f.push(vi),ti!=FRONT&&b.push(vi),(ti|tj)===SPANNING&&(t=(this.w-this.normal.dot(vi))/this.normal.dot(vj.clone().subtract(vi)),v=vi.interpolate(vj,t),f.push(v),b.push(v));3<=f.length&&front.push(new ThreeBSP.Polygon(f).calculateProperties()),3<=b.length&&back.push(new ThreeBSP.Polygon(b).calculateProperties())}},ThreeBSP.Vertex=function(x,y,z,normal,uv){this.x=x,this.y=y,this.z=z,this.normal=normal||new THREE.Vector3,this.uv=uv||new THREE.Vector2},ThreeBSP.Vertex.prototype.clone=function(){return new ThreeBSP.Vertex(this.x,this.y,this.z,this.normal.clone(),this.uv.clone())},ThreeBSP.Vertex.prototype.add=function(vertex){return this.x+=vertex.x,this.y+=vertex.y,this.z+=vertex.z,this},ThreeBSP.Vertex.prototype.subtract=function(vertex){return this.x-=vertex.x,this.y-=vertex.y,this.z-=vertex.z,this},ThreeBSP.Vertex.prototype.multiplyScalar=function(scalar){return this.x*=scalar,this.y*=scalar,this.z*=scalar,this},ThreeBSP.Vertex.prototype.cross=function(vertex){var x=this.x,y=this.y,z=this.z;return this.x=y*vertex.z-z*vertex.y,this.y=z*vertex.x-x*vertex.z,this.z=x*vertex.y-y*vertex.x,this},ThreeBSP.Vertex.prototype.normalize=function(){var length=Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);return this.x/=length,this.y/=length,this.z/=length,this},ThreeBSP.Vertex.prototype.dot=function(vertex){return this.x*vertex.x+this.y*vertex.y+this.z*vertex.z},ThreeBSP.Vertex.prototype.lerp=function(a,t){return this.add(a.clone().subtract(this).multiplyScalar(t)),this.normal.add(a.normal.clone().sub(this.normal).multiplyScalar(t)),this.uv.add(a.uv.clone().sub(this.uv).multiplyScalar(t)),this},ThreeBSP.Vertex.prototype.interpolate=function(other,t){return this.clone().lerp(other,t)},ThreeBSP.Vertex.prototype.applyMatrix4=function(m){// input: THREE.Matrix4 affine matrix\nvar x=this.x,y=this.y,z=this.z,e=m.elements;return this.x=e[0]*x+e[4]*y+e[8]*z+e[12],this.y=e[1]*x+e[5]*y+e[9]*z+e[13],this.z=e[2]*x+e[6]*y+e[10]*z+e[14],this},ThreeBSP.Node=function(polygons){var i,polygon_count,front=[],back=[];if(this.polygons=[],this.front=this.back=void 0,polygons instanceof Array&&0!==polygons.length){for(this.divider=polygons[0].clone(),i=0,polygon_count=polygons.length;i<polygon_count;i++)this.divider.splitPolygon(polygons[i],this.polygons,this.polygons,front,back);0<front.length&&(this.front=new ThreeBSP.Node(front)),0<back.length&&(this.back=new ThreeBSP.Node(back))}},ThreeBSP.Node.isConvex=function(polygons){var i,j;for(i=0;i<polygons.length;i++)for(j=0;j<polygons.length;j++)if(i!==j&&polygons[i].classifySide(polygons[j])!==BACK)return!1;return!0},ThreeBSP.Node.prototype.build=function(polygons){var i,polygon_count,front=[],back=[];for(this.divider||(this.divider=polygons[0].clone()),i=0,polygon_count=polygons.length;i<polygon_count;i++)this.divider.splitPolygon(polygons[i],this.polygons,this.polygons,front,back);0<front.length&&(!this.front&&(this.front=new ThreeBSP.Node),this.front.build(front)),0<back.length&&(!this.back&&(this.back=new ThreeBSP.Node),this.back.build(back))},ThreeBSP.Node.prototype.allPolygons=function(){var polygons=this.polygons.slice();return this.front&&(polygons=polygons.concat(this.front.allPolygons())),this.back&&(polygons=polygons.concat(this.back.allPolygons())),polygons},ThreeBSP.Node.prototype.clone=function(){var node=new ThreeBSP.Node;return node.divider=this.divider.clone(),node.polygons=this.polygons.map(function(polygon){return polygon.clone()}),node.front=this.front&&this.front.clone(),node.back=this.back&&this.back.clone(),node},ThreeBSP.Node.prototype.invert=function(){var i,polygon_count,temp;for(i=0,polygon_count=this.polygons.length;i<polygon_count;i++)this.polygons[i].flip();return this.divider.flip(),this.front&&this.front.invert(),this.back&&this.back.invert(),temp=this.front,this.front=this.back,this.back=temp,this},ThreeBSP.Node.prototype.clipPolygons=function(polygons){var i,polygon_count,front,back;if(!this.divider)return polygons.slice();for(front=[],back=[],(i=0,polygon_count=polygons.length);i<polygon_count;i++)this.divider.splitPolygon(polygons[i],front,back,front,back);return this.front&&(front=this.front.clipPolygons(front)),back=this.back?this.back.clipPolygons(back):[],front.concat(back)},ThreeBSP.Node.prototype.clipTo=function(node){this.polygons=node.clipPolygons(this.polygons),this.front&&this.front.clipTo(node),this.back&&this.back.clipTo(node)},ThreeBSP};\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! webworkify-webpack */ \"./node_modules/webworkify-webpack/index.js\");\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports) {\n\nmodule.exports = __webpack_require__(/*! promise-polyfill */ \"./node_modules/promise-polyfill/src/index.js\");\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Geometry=__webpack_require__(2).Geometry,THREE=__webpack_require__(3),JSONLoader=THREE.BufferGeometryLoader;module.exports=function(self){var core=void 0,geometryFromJSON=function(object){var JSONParser=new JSONLoader,geometry=JSONParser.parse(object),material=new THREE.MeshPhongMaterial,mesh=new THREE.Mesh(geometry.geometry,material),host=new Geometry;return host.setMorph(mesh),host},initialise=function(object){var host=geometryFromJSON(object);core=new(__webpack_require__(48).GeometryCSGInternal)(host),self.postMessage({action:\"message\",message:\"Initialised\"})},intersect=function(object){if(core){var guest=geometryFromJSON(object),result=core.intersect(guest),json=result.toBufferGeometry().toJSON();self.postMessage({action:\"result\",object:json})}},subtract=function(object){if(core){var guest=geometryFromJSON(object),result=core.subtract(guest),json=result.toBufferGeometry().toJSON();self.postMessage({action:\"result\",object:json})}},union=function(object){if(core){var guest=geometryFromJSON(object),result=core.union(guest),json=result.toBufferGeometry().toJSON();self.postMessage({action:\"result\",object:json})}};self.addEventListener(\"message\",function(ev){switch(ev.data.action){case\"initialise\":initialise(ev.data.object);break;case\"intersect\":intersect(ev.data.object);break;case\"subtract\":subtract(ev.data.object);break;case\"union\":union(ev.data.object);break;default:throw\"Cannot handle specified action.\";}})};\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ThreeBSP=__webpack_require__(44)(THREE),Geometry=__webpack_require__(2).Geometry,GeometryCSG=__webpack_require__(43).GeometryCSG,GeometryCSGInternal=function(hostIn){//ZincGeoemtry of the main geometry\nvar host;hostIn&&hostIn.isGeometry&&(host=hostIn);var hostCSG;this.setGeometry=hostIn=>{hostIn&&hostIn.isGeometry&&(host=hostIn),hostCSG=void 0},this.setCSG=csg=>{hostCSG=csg};var prepareCSG=guestGeometry=>{if(host&&host.morph&&guestGeometry&&guestGeometry.morph){hostCSG===void 0&&(hostCSG=new ThreeBSP(host.morph));var guestCSG=new ThreeBSP(guestGeometry.morph);return guestCSG}};this.intersect=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);return hostCSG&&guestCSG?hostCSG.intersect(guestCSG):void 0},this.subtract=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);return hostCSG&&guestCSG?hostCSG.subtract(guestCSG):void 0},this.union=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);return hostCSG&&guestCSG?hostCSG.union(guestCSG):void 0}};exports.GeometryCSGInternal=GeometryCSGInternal;\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar THREE=__webpack_require__(3),ThreeBSP=__webpack_require__(44)(THREE),Glyphset=__webpack_require__(14).Glyphset,GlyphsetCSG=function(hostIn){var host;hostIn&&hostIn.isGlyphset&&(host=hostIn);var hostCSGs=[];this.setGlyphset=hostIn=>{hostIn&&hostIn.isGlyphset&&(host=hostIn),hostCSG=void 0},this.getGlyphset=()=>host;var prepareCSGForGlyphs=()=>glyph=>{var mesh=glyph.getMesh(),label=glyph.getLabel();if(mesh){var csg=new ThreeBSP(mesh.geometry.clone().applyMatrix(mesh.matrix)),store=[];store.csg=csg,store.label=label,mesh.material&&(store.material=mesh.material.clone()),hostCSGs.push(store)}},prepareCSG=guestGeometry=>{if(host&&guestGeometry&&guestGeometry.getMorph()){0==hostCSGs.length&&host.forEachGlyph(prepareCSGForGlyphs());var guestCSG=new ThreeBSP(guestGeometry.getMorph());return guestCSG}};this.intersect=guestGeometry=>{var guestCSG=prepareCSG(guestGeometry);if(0<hostCSGs.length&&guestCSG){for(var glyphset=new(__webpack_require__(14).Glyphset),i=0;i<hostCSGs.length;i++){var _hostCSG=hostCSGs[i],intersect=_hostCSG.csg.intersect(guestCSG),mesh=intersect.toMesh();if(mesh&&mesh.geometry&&0<mesh.geometry.vertices.length){_hostCSG.material&&(mesh.material=_hostCSG.material,mesh.material.side=THREE.DoubleSide,mesh.material.clippingPlanes=null);var glyph=glyphset.addMeshAsGlyph(mesh,i+1);glyph.setLabel(_hostCSG.label)}}var newCSG=new GlyphsetCSG(glyphset);return newCSG}}};exports.GlyphsetCSG=GlyphsetCSG;\n\n/***/ })\n/******/ ]);\n});\n//# sourceMappingURL=zinc.js.map\n\n//# sourceURL=webpack://scaffoldvuer-wc/./node_modules/zincjs/build/zinc.js?");
|
|
6316
6316
|
|
|
6317
6317
|
/***/ }),
|
|
6318
6318
|
|
|
@@ -6372,7 +6372,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
6372
6372
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6373
6373
|
|
|
6374
6374
|
"use strict";
|
|
6375
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
6375
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_OpacityControls_vue_vue_type_template_id_ee8a4d3e_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib??vue-loader-options!./OpacityControls.vue?vue&type=template&id=ee8a4d3e&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/OpacityControls.vue?vue&type=template&id=ee8a4d3e&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_OpacityControls_vue_vue_type_template_id_ee8a4d3e_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_OpacityControls_vue_vue_type_template_id_ee8a4d3e_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/OpacityControls.vue?");
|
|
6376
6376
|
|
|
6377
6377
|
/***/ }),
|
|
6378
6378
|
|
|
@@ -6420,7 +6420,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
6420
6420
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6421
6421
|
|
|
6422
6422
|
"use strict";
|
|
6423
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
6423
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PrimitiveControls_vue_vue_type_template_id_32b94a3d_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib??vue-loader-options!./PrimitiveControls.vue?vue&type=template&id=32b94a3d&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/PrimitiveControls.vue?vue&type=template&id=32b94a3d&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PrimitiveControls_vue_vue_type_template_id_32b94a3d_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PrimitiveControls_vue_vue_type_template_id_32b94a3d_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/PrimitiveControls.vue?");
|
|
6424
6424
|
|
|
6425
6425
|
/***/ }),
|
|
6426
6426
|
|
|
@@ -6468,7 +6468,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
6468
6468
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6469
6469
|
|
|
6470
6470
|
"use strict";
|
|
6471
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
6471
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldTooltip_vue_vue_type_template_id_7c65faa6_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib??vue-loader-options!./ScaffoldTooltip.vue?vue&type=template&id=7c65faa6&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ScaffoldTooltip.vue?vue&type=template&id=7c65faa6&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldTooltip_vue_vue_type_template_id_7c65faa6_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldTooltip_vue_vue_type_template_id_7c65faa6_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldTooltip.vue?");
|
|
6472
6472
|
|
|
6473
6473
|
/***/ }),
|
|
6474
6474
|
|
|
@@ -6528,7 +6528,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
6528
6528
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6529
6529
|
|
|
6530
6530
|
"use strict";
|
|
6531
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
6531
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_template_id_689ce3f2_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib??vue-loader-options!./ScaffoldVuer.vue?vue&type=template&id=689ce3f2&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/ScaffoldVuer.vue?vue&type=template&id=689ce3f2&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_template_id_689ce3f2_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ScaffoldVuer_vue_vue_type_template_id_689ce3f2_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/ScaffoldVuer.vue?");
|
|
6532
6532
|
|
|
6533
6533
|
/***/ }),
|
|
6534
6534
|
|
|
@@ -6576,7 +6576,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
6576
6576
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6577
6577
|
|
|
6578
6578
|
"use strict";
|
|
6579
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
6579
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TextureSlidesControls_vue_vue_type_template_id_5fb74233_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib??vue-loader-options!./TextureSlidesControls.vue?vue&type=template&id=5fb74233&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/TextureSlidesControls.vue?vue&type=template&id=5fb74233&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TextureSlidesControls_vue_vue_type_template_id_5fb74233_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TextureSlidesControls_vue_vue_type_template_id_5fb74233_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/TextureSlidesControls.vue?");
|
|
6580
6580
|
|
|
6581
6581
|
/***/ }),
|
|
6582
6582
|
|
|
@@ -6636,7 +6636,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
6636
6636
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
6637
6637
|
|
|
6638
6638
|
"use strict";
|
|
6639
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var
|
|
6639
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TreeControls_vue_vue_type_template_id_71c9daa4_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../node_modules/cache-loader/dist/cjs.js?{\"cacheDirectory\":\"node_modules/.cache/vue-loader\",\"cacheIdentifier\":\"72f1e3a1-vue-loader-template\"}!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/babel-loader/lib!../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib??vue-loader-options!./TreeControls.vue?vue&type=template&id=71c9daa4&scoped=true& */ \"./node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"72f1e3a1-vue-loader-template\\\"}!./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js?!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/components/TreeControls.vue?vue&type=template&id=71c9daa4&scoped=true&\");\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"render\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TreeControls_vue_vue_type_template_id_71c9daa4_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"render\"]; });\n\n/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, \"staticRenderFns\", function() { return _node_modules_cache_loader_dist_cjs_js_cacheDirectory_node_modules_cache_vue_loader_cacheIdentifier_72f1e3a1_vue_loader_template_node_modules_cache_loader_dist_cjs_js_ref_13_0_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ref_6_node_modules_cache_loader_dist_cjs_js_ref_1_0_node_modules_vue_loader_lib_index_js_vue_loader_options_TreeControls_vue_vue_type_template_id_71c9daa4_scoped_true___WEBPACK_IMPORTED_MODULE_0__[\"staticRenderFns\"]; });\n\n\n\n//# sourceURL=webpack://scaffoldvuer-wc/./src/components/TreeControls.vue?");
|
|
6640
6640
|
|
|
6641
6641
|
/***/ }),
|
|
6642
6642
|
|