((typeof self !== 'undefined' ? self : this)["webpackJsonpequipment_disassemble_training"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpequipment_disassemble_training"] || []).push([[5],{

/***/ "0cb2":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var uncurryThis = __webpack_require__("e330");
var toObject = __webpack_require__("7b0b");

var floor = Math.floor;
var charAt = uncurryThis(''.charAt);
var replace = uncurryThis(''.replace);
var stringSlice = uncurryThis(''.slice);
// eslint-disable-next-line redos/no-vulnerable -- safe
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;

// `GetSubstitution` abstract operation
// https://tc39.es/ecma262/#sec-getsubstitution
module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  var tailPos = position + matched.length;
  var m = captures.length;
  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  if (namedCaptures !== undefined) {
    namedCaptures = toObject(namedCaptures);
    symbols = SUBSTITUTION_SYMBOLS;
  }
  return replace(replacement, symbols, function (match, ch) {
    var capture;
    switch (charAt(ch, 0)) {
      case '$': return '$';
      case '&': return matched;
      case '`': return stringSlice(str, 0, position);
      case "'": return stringSlice(str, tailPos);
      case '<':
        capture = namedCaptures[stringSlice(ch, 1, -1)];
        break;
      default: // \d\d?
        var n = +ch;
        if (n === 0) return match;
        if (n > m) {
          var f = floor(n / 10);
          if (f === 0) return match;
          if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
          return match;
        }
        capture = captures[n - 1];
    }
    return capture === undefined ? '' : capture;
  });
};


/***/ }),

/***/ "0f8d":
/***/ (function(module, exports, __webpack_require__) {

exports = module.exports = __webpack_require__("2350")(false);
// imports


// module
exports.push([module.i, "[data-v-0e873ea0] .el-loading-mask{background-color:transparent!important}", ""]);

// exports


/***/ }),

/***/ "14c3":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var call = __webpack_require__("c65b");
var anObject = __webpack_require__("825a");
var isCallable = __webpack_require__("1626");
var classof = __webpack_require__("c6b6");
var regexpExec = __webpack_require__("9263");

var $TypeError = TypeError;

// `RegExpExec` abstract operation
// https://tc39.es/ecma262/#sec-regexpexec
module.exports = function (R, S) {
  var exec = R.exec;
  if (isCallable(exec)) {
    var result = call(exec, R, S);
    if (result !== null) anObject(result);
    return result;
  }
  if (classof(R) === 'RegExp') return call(regexpExec, R, S);
  throw new $TypeError('RegExp#exec called on incompatible receiver');
};


/***/ }),

/***/ "44e4":
/***/ (function(module, exports, __webpack_require__) {

// style-loader: Adds some css to the DOM by adding a <style> tag

// load the styles
var content = __webpack_require__("0f8d");
if(content.__esModule) content = content.default;
if(typeof content === 'string') content = [[module.i, content, '']];
if(content.locals) module.exports = content.locals;
// add the styles to the DOM
var add = __webpack_require__("499e").default
var update = add("1c3db77d", content, true, {"sourceMap":false,"shadowMode":false});

/***/ }),

/***/ "49bf":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModelViewVulkan_vue_vue_type_style_index_0_id_0e873ea0_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("44e4");
/* harmony import */ var _node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModelViewVulkan_vue_vue_type_style_index_0_id_0e873ea0_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_windicss_webpack_plugin_dist_loaders_windicss_style_pitcher_cjs_node_modules_vue_style_loader_index_js_ref_8_oneOf_1_0_node_modules_css_loader_index_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_windicss_webpack_plugin_dist_loaders_windicss_template_cjs_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_ModelViewVulkan_vue_vue_type_style_index_0_id_0e873ea0_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
/* unused harmony reexport * */


/***/ }),

/***/ "5319":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var apply = __webpack_require__("2ba4");
var call = __webpack_require__("c65b");
var uncurryThis = __webpack_require__("e330");
var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
var fails = __webpack_require__("d039");
var anObject = __webpack_require__("825a");
var isCallable = __webpack_require__("1626");
var isObject = __webpack_require__("861d");
var toIntegerOrInfinity = __webpack_require__("5926");
var toLength = __webpack_require__("50c4");
var toString = __webpack_require__("577e");
var requireObjectCoercible = __webpack_require__("1d80");
var advanceStringIndex = __webpack_require__("8aa5");
var getMethod = __webpack_require__("dc4a");
var getSubstitution = __webpack_require__("0cb2");
var getRegExpFlags = __webpack_require__("90d8");
var regExpExec = __webpack_require__("14c3");
var wellKnownSymbol = __webpack_require__("b622");

var REPLACE = wellKnownSymbol('replace');
var max = Math.max;
var min = Math.min;
var concat = uncurryThis([].concat);
var push = uncurryThis([].push);
var stringIndexOf = uncurryThis(''.indexOf);
var stringSlice = uncurryThis(''.slice);

var maybeToString = function (it) {
  return it === undefined ? it : String(it);
};

// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
  // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  return 'a'.replace(/./, '$0') === '$0';
})();

// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  if (/./[REPLACE]) {
    return /./[REPLACE]('a', '$0') === '';
  }
  return false;
})();

var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  var re = /./;
  re.exec = function () {
    var result = [];
    result.groups = { a: '7' };
    return result;
  };
  // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  return ''.replace(re, '$<a>') !== '7';
});

// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';

  return [
    // `String.prototype.replace` method
    // https://tc39.es/ecma262/#sec-string.prototype.replace
    function replace(searchValue, replaceValue) {
      var O = requireObjectCoercible(this);
      var replacer = isObject(searchValue) ? getMethod(searchValue, REPLACE) : undefined;
      return replacer
        ? call(replacer, searchValue, O, replaceValue)
        : call(nativeReplace, toString(O), searchValue, replaceValue);
    },
    // `RegExp.prototype[@@replace]` method
    // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
    function (string, replaceValue) {
      var rx = anObject(this);
      var S = toString(string);

      if (
        typeof replaceValue == 'string' &&
        stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
        stringIndexOf(replaceValue, '$<') === -1
      ) {
        var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
        if (res.done) return res.value;
      }

      var functionalReplace = isCallable(replaceValue);
      if (!functionalReplace) replaceValue = toString(replaceValue);

      var flags = toString(getRegExpFlags(rx));
      var global = stringIndexOf(flags, 'g') !== -1;
      var fullUnicode;
      if (global) {
        fullUnicode = stringIndexOf(flags, 'u') !== -1;
        rx.lastIndex = 0;
      }

      var results = [];
      var result;
      while (true) {
        result = regExpExec(rx, S);
        if (result === null) break;

        push(results, result);
        if (!global) break;

        var matchStr = toString(result[0]);
        if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
      }

      var accumulatedResult = '';
      var nextSourcePosition = 0;
      for (var i = 0; i < results.length; i++) {
        result = results[i];

        var matched = toString(result[0]);
        var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
        var captures = [];
        var replacement;
        // NOTE: This is equivalent to
        //   captures = result.slice(1).map(maybeToString)
        // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
        // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
        // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
        for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
        var namedCaptures = result.groups;
        if (functionalReplace) {
          var replacerArgs = concat([matched], captures, position, S);
          if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
          replacement = toString(apply(replaceValue, undefined, replacerArgs));
        } else {
          replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
        }
        if (position >= nextSourcePosition) {
          accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
          nextSourcePosition = position + matched.length;
        }
      }

      return accumulatedResult + stringSlice(S, nextSourcePosition);
    }
  ];
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);


/***/ }),

/***/ "7b1a":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"1263dc52-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/components/model-vulkan/ModelViewVulkan.vue?vue&type=template&id=0e873ea0&scoped=true
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{directives:[{name:"loading",rawName:"v-loading",value:(_vm.loadingEngine),expression:"loadingEngine"}],staticClass:"w-full h-full relative"},[(_vm.modelSetting.cloudRenderLoadMode === 'img')?_c('img',{staticClass:"engineVideo w-full",attrs:{"id":"playerEngineId"}}):_c('video',{staticClass:"h-full w-full object-fill",attrs:{"id":"playerEngineId","autoplay":"","playsinline":"","muted":""},domProps:{"muted":true}}),(_vm.showLoadProgress)?_c('player-progress',{attrs:{"loadType":_vm.loadType,"percentage":_vm.loadPercentage}}):_vm._e()],1)}
var staticRenderFns = []


// CONCATENATED MODULE: ./src/components/model-vulkan/ModelViewVulkan.vue?vue&type=template&id=0e873ea0&scoped=true

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/regenerator.js + 1 modules
var regenerator = __webpack_require__("c14f");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("1da1");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("99af");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("e260");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("d81d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
var es_iterator_constructor = __webpack_require__("e9f5");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.map.js
var es_iterator_map = __webpack_require__("ab43");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("b64b");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("d3b7");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
var es_promise = __webpack_require__("e6cf");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("ac1f");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
var es_regexp_to_string = __webpack_require__("25f0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("3ca3");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
var es_string_replace = __webpack_require__("5319");

// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.json.parse.js
var esnext_json_parse = __webpack_require__("5087");

// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("ddb0");

// EXTERNAL MODULE: external "_"
var external_ = __webpack_require__("60bb");

// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("53ca");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("4de4");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("caad");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
var es_array_push = __webpack_require__("14d9");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("b0c0");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
var es_iterator_filter = __webpack_require__("910d");

// EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.stringify.js
var es_json_stringify = __webpack_require__("e9c4");

// CONCATENATED MODULE: ./src/assets/js/engineerSceneData.js

















/* eslint-disable no-lone-blocks */
/* eslint-disable no-plusplus */
/* eslint-disable no-await-in-loop */

// import { _ } from 'core-js'

// eslint-disable-next-line camelcase, max-len
var s_actionFilePath = 'data:/../apps/NRE/models/skeletonModel/actions';
// eslint-disable-next-line camelcase
var s_actionData = [{
  name: 'idle',
  file: 'Idle.fbx' // 待机
}, {
  name: 'walk',
  file: 'Walking.fbx' // 行走
}, {
  name: 'run',
  file: 'Running.fbx' // 跑
}];
// 节点的类型集合
var EnumObjectTypes = ['modelFile' // 模型类型
];
var actionList = [];
// 生成guid
var generateGUID = function generateGUID() {
  var d = new Date().getTime();
  if (window.performance && typeof window.performance.now === 'function') {
    d += performance.now();
  }
  var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
    var r = (d + Math.random() * 16) % 16 | 0;
    d = Math.floor(d / 16);
    return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
  });
  return guid;
};
var engineerSceneData_isJSONObj = function isJSONObj(str) {
  if (typeof str === 'string') {
    try {
      var obj = JSON.parse(str);
      if (Object(esm_typeof["a" /* default */])(obj) === 'object' && obj && Object.keys(obj).length) {
        // typeof null 也为 object
        return true;
      }
      return false;
    } catch (e) {
      return false;
    }
  }
  return false;
};

// 加载模型
var loadModel = /*#__PURE__*/function () {
  var _ref = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee(file, name, parentNode, player) {
    var node;
    return Object(regenerator["a" /* default */])().w(function (_context) {
      while (1) switch (_context.n) {
        case 0:
          _context.n = 1;
          return player.Native.Node.loadFile([file]);
        case 1:
          node = _context.v;
          _context.n = 2;
          return player.Native.Node.setProperty(node, {
            parent: parentNode,
            name: name
          });
        case 2:
          _context.n = 3;
          return player.Native.Node.addToFactory(node);
        case 3:
          return _context.a(2, node);
      }
    }, _callee);
  }));
  return function loadModel(_x, _x2, _x3, _x4) {
    return _ref.apply(this, arguments);
  };
}();
// 加载人物模型
var loadAnimationClipTemplates = /*#__PURE__*/function () {
  var _ref2 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2(actionFilePath, actionData, player) {
    var i, file, isExist, action;
    return Object(regenerator["a" /* default */])().w(function (_context2) {
      while (1) switch (_context2.n) {
        case 0:
          if (!(actionList && actionList.length > 0)) {
            _context2.n = 1;
            break;
          }
          return _context2.a(2, actionList);
        case 1:
          i = 0;
        case 2:
          if (!(i < actionData.length)) {
            _context2.n = 6;
            break;
          }
          file = "".concat(actionFilePath, "/").concat(actionData[i].file);
          _context2.n = 3;
          return player.Native.File.exists(file);
        case 3:
          isExist = _context2.v;
          if (!isExist) {
            _context2.n = 5;
            break;
          }
          _context2.n = 4;
          return player.Native.SkeletonNode.loadSkeletonNodeAnimationData(file);
        case 4:
          action = _context2.v;
          player.Native.AnimationClip.setName(action, actionData[i].name);
          actionList.push(action);
          _context2.n = 5;
          break;
        case 5:
          i += 1;
          _context2.n = 2;
          break;
        case 6:
          return _context2.a(2, actionList);
      }
    }, _callee2);
  }));
  return function loadAnimationClipTemplates(_x5, _x6, _x7) {
    return _ref2.apply(this, arguments);
  };
}();
// 加载人物模型
var loadPersonAnimation = /*#__PURE__*/function () {
  var _ref3 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee3(file, name, parentNode, player) {
    var personNode, manBones, manMixer, srcClips, newClips, defaultClipAction;
    return Object(regenerator["a" /* default */])().w(function (_context3) {
      while (1) switch (_context3.n) {
        case 0:
          _context3.n = 1;
          return player.Native.SkeletonNode.loadSkeletonNode(file);
        case 1:
          personNode = _context3.v;
          _context3.n = 2;
          return player.Native.NodeProxy.setNodeInfo(personNode, {
            name: name
          });
        case 2:
          _context3.n = 3;
          return player.Native.NodeProxy.setNodeParent(personNode, parentNode);
        case 3:
          _context3.n = 4;
          return player.Native.SkeletonNode.bones(personNode);
        case 4:
          manBones = _context3.v;
          _context3.n = 5;
          return player.Native.SkeletonNode.mixer(personNode);
        case 5:
          manMixer = _context3.v;
          _context3.n = 6;
          return loadAnimationClipTemplates(s_actionFilePath, s_actionData, player);
        case 6:
          srcClips = _context3.v;
          _context3.n = 7;
          return player.Native.AnimationClip.cloneClipsAddAttachTrackDataNames(srcClips, manBones);
        case 7:
          newClips = _context3.v;
          _context3.n = 8;
          return player.Native.AnimationClip.addClips(manMixer, newClips);
        case 8:
          _context3.n = 9;
          return player.Native.AnimationAction.clipAction(manMixer, 'idle');
        case 9:
          defaultClipAction = _context3.v;
          _context3.n = 10;
          return player.Native.AnimationAction.fadeIn(defaultClipAction, 1.0);
        case 10:
          return _context3.a(2, personNode);
      }
    }, _callee3);
  }));
  return function loadPersonAnimation(_x8, _x9, _x0, _x1) {
    return _ref3.apply(this, arguments);
  };
}();
var _loadSceneFromJson = /*#__PURE__*/function () {
  var _ref4 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee4(obj, parentNode, player) {
    var node, i, _t;
    return Object(regenerator["a" /* default */])().w(function (_context4) {
      while (1) switch (_context4.n) {
        case 0:
          console.log('loadSceneFromJson', obj, parentNode);
          node = null; // 根据节点类型，序列化某些特有类型的节点数据
          _t = obj.code.type;
          _context4.n = _t === 'modelFile' ? 1 : 3;
          break;
        case 1:
          _context4.n = 2;
          return loadModel(obj.code.filePath, obj.code.id, parentNode, player);
        case 2:
          node = _context4.v;
          return _context4.a(3, 5);
        case 3:
          _context4.n = 4;
          return player.Native.Node.create();
        case 4:
          node = _context4.v;
          return _context4.a(3, 5);
        case 5:
          if (!(node === null || node === 0)) {
            _context4.n = 6;
            break;
          }
          return _context4.a(2);
        case 6:
          _context4.n = 7;
          return player.Native.Node.setProperty(node, {
            name: obj.name,
            code: JSON.stringify(obj.code),
            parent: parentNode,
            localTrans: obj.localPosition,
            localRot: obj.localRotation,
            localScale: obj.localScaling
          });
        case 7:
          if (!(obj.children && obj.children.length)) {
            _context4.n = 10;
            break;
          }
          i = 0;
        case 8:
          if (!(i < obj.children.length)) {
            _context4.n = 10;
            break;
          }
          _context4.n = 9;
          return _loadSceneFromJson(obj.children[i], node, player);
        case 9:
          ++i;
          _context4.n = 8;
          break;
        case 10:
          return _context4.a(2);
      }
    }, _callee4);
  }));
  return function loadSceneFromJson(_x10, _x11, _x12) {
    return _ref4.apply(this, arguments);
  };
}();
// 保存场景到json对象
var _saveSceneToJson = /*#__PURE__*/function () {
  var _ref5 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee5(node, player) {
    var obj, nodeInfo, modelChildren, modelChild, i, childObj, childrenInfos, filterChilds, _i, _childObj;
    return Object(regenerator["a" /* default */])().w(function (_context5) {
      while (1) switch (_context5.n) {
        case 0:
          if (node) {
            _context5.n = 1;
            break;
          }
          return _context5.a(2, null);
        case 1:
          obj = {}; // 序列化节点的基本信息
          _context5.n = 2;
          return player.Native.NodeProxy.getNodeInfo(node);
        case 2:
          nodeInfo = _context5.v;
          obj.name = nodeInfo.name;
          obj.code = nodeInfo.code ? JSON.parse(nodeInfo.code) : '';
          obj.guid = nodeInfo.id;
          // 序列化节点的变换信息
          _context5.n = 3;
          return player.Native.NodeProxy.localTranslation(node);
        case 3:
          obj.localPosition = _context5.v;
          _context5.n = 4;
          return player.Native.NodeProxy.localRotation(node);
        case 4:
          obj.localRotation = _context5.v;
          _context5.n = 5;
          return player.Native.NodeProxy.localScaling(node);
        case 5:
          obj.localScaling = _context5.v;
          if (!obj.code.type) {
            _context5.n = 11;
            break;
          }
          _context5.n = 6;
          return player.Native.NodeProxy.getNodeChildren(node);
        case 6:
          modelChildren = _context5.v;
          modelChild = _.filter(modelChildren, function (item) {
            return item.code && engineerSceneData_isJSONObj(item.code) && JSON.parse(item.code).type;
          });
          if (_.isEmpty(modelChild)) {
            _context5.n = 10;
            break;
          }
          obj.children = [];
          i = 0;
        case 7:
          if (!(i < modelChild.length)) {
            _context5.n = 10;
            break;
          }
          _context5.n = 8;
          return _saveSceneToJson(modelChild[i].nodePtr, player);
        case 8:
          childObj = _context5.v;
          if (childObj) {
            obj.children.push(childObj);
          }
        case 9:
          i += 1;
          _context5.n = 7;
          break;
        case 10:
          return _context5.a(2, obj);
        case 11:
          // 层级节点，需要继续递归
          obj.children = [];
          _context5.n = 12;
          return player.Native.NodeProxy.getNodeChildren(node);
        case 12:
          childrenInfos = _context5.v;
          filterChilds = _.filter(childrenInfos, function (el) {
            return el.code;
          });
          _i = 0;
        case 13:
          if (!(_i < filterChilds.length)) {
            _context5.n = 16;
            break;
          }
          _context5.n = 14;
          return _saveSceneToJson(filterChilds[_i].nodePtr, player);
        case 14:
          _childObj = _context5.v;
          if (_childObj != null) obj.children.push(_childObj);
        case 15:
          ++_i;
          _context5.n = 13;
          break;
        case 16:
          return _context5.a(2, obj);
      }
    }, _callee5);
  }));
  return function saveSceneToJson(_x13, _x14) {
    return _ref5.apply(this, arguments);
  };
}();
// 通过指定节点去查下面的子节点 nodeType 指定节点的类型，obj 需要筛选的对象数据源，arr 接收筛选后的数据集合
var _getNodesByNodeType = /*#__PURE__*/function () {
  var _ref6 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee6(obj) {
    var _obj$code;
    var arr,
      currentNodeType,
      nowObj,
      i,
      _args6 = arguments;
    return Object(regenerator["a" /* default */])().w(function (_context6) {
      while (1) switch (_context6.n) {
        case 0:
          arr = _args6.length > 1 && _args6[1] !== undefined ? _args6[1] : [];
          // let currentNodeType = obj.code && obj.code.type
          currentNodeType = obj === null || obj === void 0 ? void 0 : (_obj$code = obj.code) === null || _obj$code === void 0 ? void 0 : _obj$code.type;
          if (EnumObjectTypes.includes(currentNodeType)) {
            nowObj = _.cloneDeep(obj);
            delete nowObj.children;
            arr.push(nowObj);
          }
          // 递归子，继续创建
          if (!(obj.children && obj.children.length)) {
            _context6.n = 3;
            break;
          }
          i = 0;
        case 1:
          if (!(i < obj.children.length)) {
            _context6.n = 3;
            break;
          }
          _context6.n = 2;
          return _getNodesByNodeType(obj.children[i], arr);
        case 2:
          ++i;
          _context6.n = 1;
          break;
        case 3:
          return _context6.a(2, arr);
      }
    }, _callee6);
  }));
  return function getNodesByNodeType(_x15) {
    return _ref6.apply(this, arguments);
  };
}();

// CONCATENATED MODULE: ./src/assets/js/modelDownload.js



/**
 * 下载文件
 * @param {*} player player实例
 * @param {*} fileInfo 文件信息：{id:文件id,url:文件下载路径,fileType:文件类型}
 * @param {*} apiConfig 下载请求信息：{path:请求后端接口地址,method:请求方式,headers:接口请求头}
 * @returns 下载结果
 *          - type: 0为文件存在不需要下载，1为文件不存在需要下载
 *          - success: 下载成功或失败
 */
var downloadFile = /*#__PURE__*/function () {
  var _ref = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2(player, fileInfo, apiConfig) {
    var progressMsg,
      downloadEndMsg,
      isExists,
      tempsUrl,
      processFun,
      _downloadEndFun,
      res,
      _args2 = arguments;
    return Object(regenerator["a" /* default */])().w(function (_context2) {
      while (1) switch (_context2.n) {
        case 0:
          progressMsg = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : function () {};
          downloadEndMsg = _args2.length > 4 && _args2[4] !== undefined ? _args2[4] : function () {};
          _context2.n = 1;
          return player.Native.File.exists(fileInfo.url);
        case 1:
          isExists = _context2.v;
          if (!isExists) {
            _context2.n = 2;
            break;
          }
          return _context2.a(2, {
            type: 0,
            success: true
          });
        case 2:
          // 模型中转文件
          tempsUrl = "data://../temps/models/".concat(fileInfo.id, "/").concat(fileInfo.id, ".").concat(fileInfo.fileType); // 处理下载进度方法
          processFun = function processFun(file, bytesReceived, bytesTotal) {
            progressMsg(file, bytesReceived, bytesTotal);
          }; // 处理下载结束方法
          _downloadEndFun = /*#__PURE__*/function () {
            var _ref2 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee(file, err) {
              return Object(regenerator["a" /* default */])().w(function (_context) {
                while (1) switch (_context.n) {
                  case 0:
                    _context.n = 1;
                    return player.Native.File.move(tempsUrl, fileInfo.url);
                  case 1:
                    if (!(fileInfo.fileType === 'zip')) {
                      _context.n = 2;
                      break;
                    }
                    _context.n = 2;
                    return player.Native.File.unZip(fileInfo.url, '');
                  case 2:
                    // } else {
                    //   app.$message.warning('当前请求的md5和服务器下载的md5不一致！')
                    // }
                    downloadEndMsg(file, err);
                    player.Native.File.EventDownloadProcessChanged.disconnect(processFun);
                    player.Native.File.EventDownloadFinish.disconnect(_downloadEndFun);
                  case 3:
                    return _context.a(2);
                }
              }, _callee);
            }));
            return function downloadEndFun(_x4, _x5) {
              return _ref2.apply(this, arguments);
            };
          }(); // 监听下载进度
          player.Native.File.EventDownloadProcessChanged.connect(processFun);
          // 监听下载结束
          player.Native.File.EventDownloadFinish.connect(_downloadEndFun);
          _context2.n = 3;
          return player.Native.File.downloadFile(tempsUrl, apiConfig.method, apiConfig.path, apiConfig.headers);
        case 3:
          res = _context2.v;
          return _context2.a(2, {
            type: 1,
            success: res
          });
      }
    }, _callee2);
  }));
  return function downloadFile(_x, _x2, _x3) {
    return _ref.apply(this, arguments);
  };
}();
/* harmony default export */ var modelDownload = (downloadFile);
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/@vue/cli-plugin-babel/node_modules/babel-loader/lib??ref--12-1!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/windicss-webpack-plugin/dist/loaders/windicss-template.cjs!./src/components/model-vulkan/ModelViewVulkan.vue?vue&type=script&lang=js
















//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//




var PlayerProgress = function PlayerProgress() {
  return __webpack_require__.e(/* import() */ 17).then(__webpack_require__.bind(null, "82f2"));
};
/* harmony default export */ var ModelViewVulkanvue_type_script_lang_js = ({
  name: 'ModelViewVulkan',
  components: {
    PlayerProgress: PlayerProgress
  },
  props: {
    cloudRender: {
      type: Object,
      default: function _default() {}
    },
    sceneOptions: {
      type: Object,
      defalut: function defalut() {
        return {
          isEnableGis: false,
          latitude: 0,
          longitude: 0,
          name: '',
          id: '',
          folderId: '',
          jsonData: ''
        };
      }
    }
  },
  data: function data() {
    return {
      player: null,
      // player实例
      loadingEngine: false,
      // 引擎加载状态
      showLoadProgress: false,
      // 进度条显隐
      loadType: '',
      // 进度条类型
      loadPercentage: 0,
      // 进度条值
      sceneFileList: [],
      fileCount: 0,
      sceneData: {},
      sceneRootNode: 0,
      initStatus: false,
      modelEngineId: '',
      preloadEngine: null,
      // 单位矩阵
      mat: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
    };
  },
  computed: {
    // 模型相关设置
    modelSetting: function modelSetting() {
      return Object(external_["get"])(Wiz, 'globalSettings.globalConfig.modelSetting') || Object(external_["get"])(Wiz, 'globalSettings.dynamicModules.modules["electronic-fence"].config') || {};
    },
    // 云渲染协议
    cloudProtocol: function cloudProtocol() {
      return this.modelSetting.cloudProtocol || 'ws';
    },
    // 云渲染服务路径
    cloudServerPath: function cloudServerPath() {
      return this.modelSetting.cloudServerPathVulkan || 'renderapi.wiz.top:7082';
    }
  },
  watch: {
    sceneOptions: {
      handler: function handler(data) {
        var _this = this;
        return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee() {
          return Object(regenerator["a" /* default */])().w(function (_context) {
            while (1) switch (_context.n) {
              case 0:
                if (!_this.initStatus) {
                  _context.n = 4;
                  break;
                }
                _context.n = 1;
                return _this.switchScene();
              case 1:
                if (!(data.isEnableGis && data.longitude && data.latitude)) {
                  _context.n = 3;
                  break;
                }
                _context.n = 2;
                return _this.cloudRender.GIS.loadGis(_this.modelSetting.globalMapPath);
              case 2:
                _this.moveToLLH(data.longitude, data.latitude);
                _context.n = 4;
                break;
              case 3:
                _context.n = 4;
                return _this.cloudRender.GIS.unLoadGis();
              case 4:
                return _context.a(2);
            }
          }, _callee);
        }))();
      },
      deep: true
    },
    fileCount: function fileCount(num) {
      var _this2 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee2() {
        var _JSON$parse, eye, target, up;
        return Object(regenerator["a" /* default */])().w(function (_context2) {
          while (1) switch (_context2.n) {
            case 0:
              if (!(num === 0)) {
                _context2.n = 1;
                break;
              }
              return _context2.a(2);
            case 1:
              if (!(num >= _this2.sceneFileList.length)) {
                _context2.n = 8;
                break;
              }
              console.log('场景文件加载完成', _this2.sceneData, _this2.sceneRootNode, _this2.player);
              _context2.n = 2;
              return _loadSceneFromJson(_this2.sceneData, _this2.sceneRootNode, _this2.player);
            case 2:
              if (!(_this2.sceneData.cameraParams && engineerSceneData_isJSONObj(_this2.sceneData.cameraParams))) {
                _context2.n = 4;
                break;
              }
              _JSON$parse = JSON.parse(_this2.sceneData.cameraParams), eye = _JSON$parse.eye, target = _JSON$parse.target, up = _JSON$parse.up;
              _context2.n = 3;
              return _this2.player.Native.Camera.moveTo(eye, target, up, 2);
            case 3:
              _context2.n = 7;
              break;
            case 4:
              if (!_this2.sceneOptions.isEnableGis) {
                _context2.n = 6;
                break;
              }
              _context2.n = 5;
              return _this2.moveToLLH(_this2.sceneOptions.longitude, _this2.sceneOptions.latitude);
            case 5:
              _context2.n = 7;
              break;
            case 6:
              _context2.n = 7;
              return _this2.locationScene();
            case 7:
              _this2.$emit('loadSceneEnd');
              _this2.fileCount = 0;
              _context2.n = 9;
              break;
            case 8:
              _this2.checkTextureFile(_this2.sceneFileList[num]);
            case 9:
              return _context2.a(2);
          }
        }, _callee2);
      }))();
    }
  },
  mounted: function mounted() {
    var _this3 = this;
    this.loadingEngine = true;
    this.runPlayer();
    window.addEventListener('beforeunload', /*#__PURE__*/function () {
      var _ref = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee3(e) {
        return Object(regenerator["a" /* default */])().w(function (_context3) {
          while (1) switch (_context3.n) {
            case 0:
              if (_this3.player) {
                _this3.cloudRender.Engine.destroyEngine();
              }
            case 1:
              return _context3.a(2);
          }
        }, _callee3);
      }));
      return function (_x) {
        return _ref.apply(this, arguments);
      };
    }());
  },
  beforeDestroy: function beforeDestroy() {
    if (this.player) {
      this.player.exit();
    }
  },
  methods: {
    // 加载player引擎
    runPlayer: function runPlayer(engineId) {
      var _this4 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee5() {
        var _yield$_this4$cloudRe, data;
        return Object(regenerator["a" /* default */])().w(function (_context5) {
          while (1) switch (_context5.n) {
            case 0:
              _this4.preloadEngine = engineId || null;
              _this4.modelEngineId = _this4.generateGUID();
              _context5.n = 1;
              return _this4.cloudRender.Engine.loadEngine({
                signalServer: "".concat(_this4.cloudProtocol, "://").concat(_this4.cloudServerPath),
                options: {
                  openDebug: true,
                  videoDom: document.getElementById('playerEngineId'),
                  // 绑定视频标签
                  userTimeout: 1000 * 60 * 60,
                  // 用户操作超时设置，毫秒
                  exitTimeout: 1000 * 60 * 1,
                  // 用户超时后多久断开会话
                  maxTimeout: 1000,
                  // 会话超时时间，允许掉线后引擎保存多久，在该时间内可重新连接到会话，否则会创建新的会话
                  engineId: engineId || _this4.modelEngineId
                }
              });
            case 1:
              _yield$_this4$cloudRe = _context5.v;
              data = _yield$_this4$cloudRe.data;
              if (data) {
                _this4.player = data.getDataInfo();
                _this4.cloudRender.Dispatch.on('Engine', /*#__PURE__*/function () {
                  var _ref2 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee4(e) {
                    return Object(regenerator["a" /* default */])().w(function (_context4) {
                      while (1) switch (_context4.n) {
                        case 0:
                          if (e.type === 'UserTimeOut') {
                            // 用户操作超时
                            console.error('用户操作超时');
                          }
                          if (e.type === 'TimeOutExit') {
                            // 断开会话
                            console.error('超时断开');
                          }
                        case 1:
                          return _context4.a(2);
                      }
                    }, _callee4);
                  }));
                  return function (_x2) {
                    return _ref2.apply(this, arguments);
                  };
                }());
                // 实例化完成将实例化后的player传出去
                _this4.$emit('sendPlayer', _this4.player);
                window.player = _this4.player;
                _this4.loadingEngine = false;
                _this4.initPlayer(engineId);
              }
            case 2:
              return _context5.a(2);
          }
        }, _callee5);
      }))();
    },
    generateGUID: function generateGUID() {
      var d = new Date().getTime();
      if (window.performance && typeof window.performance.now === 'function') {
        d += performance.now();
      }
      var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
        var r = (d + Math.random() * 16) % 16 | 0;
        d = Math.floor(d / 16);
        return (c === 'x' ? r : r & 0x3 | 0x8).toString(16);
      });
      return guid;
    },
    // 移动相机到经纬度
    moveToLLH: function moveToLLH(long, lat) {
      var _this5 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee6() {
        var elevation;
        return Object(regenerator["a" /* default */])().w(function (_context6) {
          while (1) switch (_context6.n) {
            case 0:
              if (!(long && lat)) {
                _context6.n = 2;
                break;
              }
              _context6.n = 1;
              return _this5.player.Native.GisPlatform.queryDEM([[long, lat]]);
            case 1:
              elevation = _context6.v[0];
              _this5.player.Native.Camera.addMoveToLLH([long, lat, 20000], 0);
              _this5.player.Native.Camera.addMoveToLLH([long, lat, elevation + 800], 8);
            case 2:
              return _context6.a(2);
          }
        }, _callee6);
      }))();
    },
    // 初始化player
    initPlayer: function initPlayer(engineId) {
      var _this6 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee7() {
        var settingsFileUrl, settingsData, defaultSettings;
        return Object(regenerator["a" /* default */])().w(function (_context7) {
          while (1) switch (_context7.n) {
            case 0:
              // 设置点选时其他节点半透明
              _this6.player.Native.Setting.set('color.pickup.bkAlpha', 'float', '0.5');
              _this6.player.Native.Tools.EventBrowseLClick.connect(function (e) {
                _this6.$emit('modelClick', e);
              });
              _this6.loadingEngine = false;
              settingsFileUrl = "data://../apps/".concat(_this6.modelSetting.folderName, "/settings.json");
              _context7.n = 1;
              return _this6.player.Native.File.loadText(settingsFileUrl);
            case 1:
              settingsData = _context7.v;
              if (!settingsData) {
                _context7.n = 2;
                break;
              }
              defaultSettings = JSON.parse(settingsData); // forEach(defaultSettings.Show, (item) => {
              //   this.player.Native.Settings.set(item.name, item.type, item.value)
              // })
              _context7.n = 2;
              return _this6.cloudRender.Setting.set(defaultSettings.Show);
            case 2:
              _context7.n = 3;
              return _this6.loadScene();
            case 3:
              if (!_this6.sceneOptions.isEnableGis) {
                _context7.n = 5;
                break;
              }
              _context7.n = 4;
              return _this6.cloudRender.GIS.loadGis(_this6.modelSetting.globalMapPath);
            case 4:
              _this6.moveToLLH(_this6.sceneOptions.longitude, _this6.sceneOptions.latitude);
            case 5:
              _this6.initStatus = true;
            case 6:
              return _context7.a(2);
          }
        }, _callee7);
      }))();
    },
    // 检查文件是否存在
    checkTextureFile: function checkTextureFile(data) {
      var _this7 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee8() {
        var _Wiz$GetApiClientInst, url, fileInfo, apiConfig, res;
        return Object(regenerator["a" /* default */])().w(function (_context8) {
          while (1) switch (_context8.n) {
            case 0:
              if (!(data && data.code && data.code.modelFileId)) {
                _context8.n = 3;
                break;
              }
              if (!(data.code.materialFileId && data.code.materialFileId !== 'undefined')) {
                _context8.n = 2;
                break;
              }
              url = "data://../apps/".concat(data.code.filePath.split('/')[4], "/models/").concat(data.code.modelFileId, "/").concat(data.code.modelFileId, ".zip");
              fileInfo = {
                id: data.code.materialFileId,
                url: url,
                fileType: 'zip'
              };
              apiConfig = {
                path: "".concat((_Wiz$GetApiClientInst = Wiz.GetApiClientInstance('file-management')) === null || _Wiz$GetApiClientInst === void 0 ? void 0 : _Wiz$GetApiClientInst.basePath, "/api/file-management/files/").concat(data.code.materialFileId, "/download"),
                method: 'GET',
                headers: {
                  Authorization: "Bearer ".concat(Wiz.AuthHooks.GetToken())
                }
              };
              _context8.n = 1;
              return modelDownload(_this7.player, fileInfo, apiConfig, _this7.progressMsg, _this7.downloadMaterialMsg(data));
            case 1:
              res = _context8.v;
              if (res.type === 0 && res.success) {
                _this7.checkModelFile(data);
              } else {
                _this7.showLoadProgress = true;
                _this7.loadType = '下载中...';
              }
              _context8.n = 3;
              break;
            case 2:
              _this7.checkModelFile(data);
            case 3:
              return _context8.a(2);
          }
        }, _callee8);
      }))();
    },
    // 检查模型是否存在
    checkModelFile: function checkModelFile(data) {
      var _this8 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee9() {
        var _Wiz$GetApiClientInst2;
        var fileType, url, fileInfo, apiConfig, res;
        return Object(regenerator["a" /* default */])().w(function (_context9) {
          while (1) switch (_context9.n) {
            case 0:
              fileType = Object(external_["last"])(data.code.filePath.split('.')) || 'pr';
              url = data.code.filePath;
              fileInfo = {
                id: data.code.modelFileId,
                url: url,
                fileType: fileType
              };
              apiConfig = {
                path: "".concat((_Wiz$GetApiClientInst2 = Wiz.GetApiClientInstance('file-management')) === null || _Wiz$GetApiClientInst2 === void 0 ? void 0 : _Wiz$GetApiClientInst2.basePath, "/api/file-management/files/").concat(data.code.modelFileId, "/download"),
                method: 'GET',
                headers: {
                  Authorization: "Bearer ".concat(Wiz.AuthHooks.GetToken())
                }
              };
              _context9.n = 1;
              return modelDownload(_this8.player, fileInfo, apiConfig, _this8.progressMsg, _this8.downloadMsg);
            case 1:
              res = _context9.v;
              if (res.type === 0 && res.success) {
                // 有模型就加载模型
                _this8.fileCount += 1;
              } else {
                _this8.showLoadProgress = true;
                _this8.loadType = '下载中...';
              }
            case 2:
              return _context9.a(2);
          }
        }, _callee9);
      }))();
    },
    // 监听下载模型是否成功
    downloadMsg: function downloadMsg(file, err) {
      this.loadPercentage = 0;
      this.showLoadProgress = false;
      if (err) {
        this.$message.warning("\u4E0B\u8F7D\u6587\u4EF6\u5931\u8D25\uFF0C".concat(file, ", ").concat(err));
      }
      this.fileCount += 1;
    },
    // 监听下载模型是否成功
    downloadMaterialMsg: function downloadMaterialMsg(data) {
      var that = this;
      var fun = /*#__PURE__*/function () {
        var _ref3 = Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee0(file, err) {
          return Object(regenerator["a" /* default */])().w(function (_context0) {
            while (1) switch (_context0.n) {
              case 0:
                that.showLoadProgress = false;
                that.loadPercentage = 0;
                if (err) {
                  that.$message.warning("\u4E0B\u8F7D\u8D34\u56FE\u6587\u4EF6\u5931\u8D25\uFF0C".concat(file, ", ").concat(err));
                }
                setTimeout(function () {
                  that.checkModelFile(data);
                }, 1500);
              case 1:
                return _context0.a(2);
            }
          }, _callee0);
        }));
        return function fun(_x3, _x4) {
          return _ref3.apply(this, arguments);
        };
      }();
      return fun;
    },
    // 监听下载进度
    progressMsg: function progressMsg(file, bytesReceived, bytesTotal) {
      if (bytesTotal) {
        this.loadPercentage = bytesReceived / bytesTotal * 100;
      }
    },
    // 加载场景
    loadScene: function loadScene() {
      var _this9 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee1() {
        var _JSON$parse2, eye, target, up;
        return Object(regenerator["a" /* default */])().w(function (_context1) {
          while (1) switch (_context1.n) {
            case 0:
              _context1.n = 1;
              return _this9.player.Native.Node.getRoot();
            case 1:
              _this9.sceneRootNode = _context1.v;
              if (!(_this9.sceneOptions.jsonData && engineerSceneData_isJSONObj(_this9.sceneOptions.jsonData))) {
                _context1.n = 8;
                break;
              }
              _this9.sceneData = JSON.parse(_this9.sceneOptions.jsonData);
              _context1.n = 2;
              return _getNodesByNodeType(_this9.sceneData, []);
            case 2:
              _this9.sceneFileList = _context1.v;
              if (Object(external_["isEmpty"])(_this9.sceneFileList)) {
                _context1.n = 3;
                break;
              }
              _this9.checkTextureFile(_this9.sceneFileList[0]);
              _context1.n = 7;
              break;
            case 3:
              _context1.n = 4;
              return _loadSceneFromJson(_this9.sceneData, _this9.sceneRootNode, _this9.player, _this9.sceneOptions, []);
            case 4:
              if (!(_this9.sceneData.cameraParams && engineerSceneData_isJSONObj(_this9.sceneData.cameraParams))) {
                _context1.n = 6;
                break;
              }
              _JSON$parse2 = JSON.parse(_this9.sceneData.cameraParams), eye = _JSON$parse2.eye, target = _JSON$parse2.target, up = _JSON$parse2.up;
              _context1.n = 5;
              return _this9.player.Native.Camera.moveTo(eye, target, up, 2);
            case 5:
              _context1.n = 7;
              break;
            case 6:
              if (!_this9.sceneOptions.isEnableGis) {
                _context1.n = 7;
                break;
              }
              _context1.n = 7;
              return _this9.moveToLLH(_this9.sceneOptions.longitude, _this9.sceneOptions.latitude);
            case 7:
              _context1.n = 9;
              break;
            case 8:
              console.log('场景数据为空');
              // const node = await this.player.Native.Node.loadFile('data://../data/models/sampler(1).pprj')
              // const root = await this.player.Native.Node.getRoot()
              // await this.player.Native.Node.setProperty(node, {
              //   parent: root,
              //   name: 'cs',
              // })
              // await this.player.Native.Node.addToFactory(node)
              // await this.player.Native.Camera.moveToNode(node, 2)
              _this9.$emit('loadSceneEnd');
              // const nodePtr = await this.player.Native.NodeProxy.createNode(
              //   this.sceneRootNode,
              //   this.sceneOptions.name
              // )
              // await this.player.Native.NodeProxy.setNodeInfo(nodePtr, {
              //   code: JSON.stringify({
              //     type: 'Root',
              //     fileType: '',
              //     filePath: '',
              //     scene: this.sceneOptions.id,
              //   }),
              // })
            case 9:
              return _context1.a(2);
          }
        }, _callee1);
      }))();
    },
    // 切换场景
    switchScene: function switchScene() {
      var _this0 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee10() {
        var rootNode, childrenNode;
        return Object(regenerator["a" /* default */])().w(function (_context10) {
          while (1) switch (_context10.n) {
            case 0:
              _context10.n = 1;
              return _this0.player.Native.Node.getRoot();
            case 1:
              rootNode = _context10.v;
              _context10.n = 2;
              return _this0.player.Native.Node.getProperty(rootNode, ['children']);
            case 2:
              childrenNode = _context10.v;
              console.log('childrenNode', childrenNode);
              _context10.n = 3;
              return _this0.player.Native.Node.destroy(childrenNode.children.map(function (item) {
                return item.node;
              }));
            case 3:
              _context10.n = 4;
              return _this0.loadScene();
            case 4:
              return _context10.a(2);
          }
        }, _callee10);
      }))();
    },
    // 移动视角
    locationScene: function locationScene() {
      var _this1 = this;
      return Object(asyncToGenerator["a" /* default */])(/*#__PURE__*/Object(regenerator["a" /* default */])().m(function _callee11() {
        var nodeAabb;
        return Object(regenerator["a" /* default */])().w(function (_context11) {
          while (1) switch (_context11.n) {
            case 0:
              _context11.n = 1;
              return _this1.player.Native.Node.getProperty(_this1.sceneRootNode, ['aabb']);
            case 1:
              nodeAabb = _context11.v;
              _context11.n = 2;
              return _this1.player.Native.Camera.moveToAabb(nodeAabb.aabb, 1);
            case 2:
              return _context11.a(2);
          }
        }, _callee11);
      }))();
    }
  }
});
// CONCATENATED MODULE: ./src/components/model-vulkan/ModelViewVulkan.vue?vue&type=script&lang=js
 /* harmony default export */ var model_vulkan_ModelViewVulkanvue_type_script_lang_js = (ModelViewVulkanvue_type_script_lang_js); 
// EXTERNAL MODULE: ./src/components/model-vulkan/ModelViewVulkan.vue?vue&type=style&index=0&id=0e873ea0&prod&lang=scss&scoped=true
var ModelViewVulkanvue_type_style_index_0_id_0e873ea0_prod_lang_scss_scoped_true = __webpack_require__("49bf");

// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__("2877");

// CONCATENATED MODULE: ./src/components/model-vulkan/ModelViewVulkan.vue






/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  model_vulkan_ModelViewVulkanvue_type_script_lang_js,
  render,
  staticRenderFns,
  false,
  null,
  "0e873ea0",
  null
  
)

/* harmony default export */ var ModelViewVulkan = __webpack_exports__["default"] = (component.exports);

/***/ }),

/***/ "8aa5":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

var charAt = __webpack_require__("6547").charAt;

// `AdvanceStringIndex` abstract operation
// https://tc39.es/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
  return index + (unicode ? charAt(S, index).length : 1);
};


/***/ }),

/***/ "d784":
/***/ (function(module, exports, __webpack_require__) {

"use strict";

// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__("ac1f");
var call = __webpack_require__("c65b");
var defineBuiltIn = __webpack_require__("cb2d");
var regexpExec = __webpack_require__("9263");
var fails = __webpack_require__("d039");
var wellKnownSymbol = __webpack_require__("b622");
var createNonEnumerableProperty = __webpack_require__("9112");

var SPECIES = wellKnownSymbol('species');
var RegExpPrototype = RegExp.prototype;

module.exports = function (KEY, exec, FORCED, SHAM) {
  var SYMBOL = wellKnownSymbol(KEY);

  var DELEGATES_TO_SYMBOL = !fails(function () {
    // String methods call symbol-named RegExp methods
    var O = {};
    // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
    O[SYMBOL] = function () { return 7; };
    return ''[KEY](O) !== 7;
  });

  var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
    // Symbol-named RegExp methods call .exec
    var execCalled = false;
    var re = /a/;

    if (KEY === 'split') {
      // We can't use real regex here since it causes deoptimization
      // and serious performance degradation in V8
      // https://github.com/zloirock/core-js/issues/306
      // RegExp[@@split] doesn't call the regex's exec method, but first creates
      // a new one. We need to return the patched regex when creating the new one.
      var constructor = {};
      // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
      constructor[SPECIES] = function () { return re; };
      re = { constructor: constructor, flags: '' };
      // eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
      re[SYMBOL] = /./[SYMBOL];
    }

    re.exec = function () {
      execCalled = true;
      return null;
    };

    re[SYMBOL]('');
    return !execCalled;
  });

  if (
    !DELEGATES_TO_SYMBOL ||
    !DELEGATES_TO_EXEC ||
    FORCED
  ) {
    var nativeRegExpMethod = /./[SYMBOL];
    var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
      var $exec = regexp.exec;
      if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
        if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
          // The native String method already delegates to @@method (this
          // polyfilled function), leasing to infinite recursion.
          // We avoid it by directly calling the native @@method method.
          return { done: true, value: call(nativeRegExpMethod, regexp, str, arg2) };
        }
        return { done: true, value: call(nativeMethod, str, regexp, arg2) };
      }
      return { done: false };
    });

    defineBuiltIn(String.prototype, KEY, methods[0]);
    defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
  }

  if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
};


/***/ })

}]);
//# sourceMappingURL=equipment-disassemble-training.umd.5.js.map