fl-web-component 2.1.13 → 2.1.14
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.
|
@@ -66015,7 +66015,7 @@ module.exports = document && document.documentElement;
|
|
|
66015
66015
|
/***/ "9224":
|
|
66016
66016
|
/***/ (function(module) {
|
|
66017
66017
|
|
|
66018
|
-
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.
|
|
66018
|
+
module.exports = JSON.parse("{\"name\":\"fl-web-component\",\"version\":\"2.1.14\",\"scripts\":{\"postinstall\":\"patch-package\",\"tip1\":\"仅调试本组件不涉及业务组件,请执行dev\",\"dev\":\"vue-cli-service serve\",\"lint\":\"eslint \\\"{src,packages}/**/*.{vue,js}\\\" --fix\",\"prettier\":\"prettier --write \\\"packages/**/*.{js,css,less,scss,vue,html}\\\"\",\"=\":\"=============================================================\",\"tip2\":\"同时调试本组件与业务组件,请执行watch,生产模式监听请执行watch:prod\",\"watch\":\"vue-cli-service build --watch --mode development --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"watch:prod\":\"vue-cli-service build --watch --mode production --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build\":\"npm run lint && vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"build:test\":\"vue-cli-service build --target lib --name fl-web-component --formats commonjs ./src/main.js\",\"publish:base\":\"npm run build && npm publish --registry https://registry.npmjs.org/\",\"publish:beta:base\":\"npm run build && npm publish --tag beta --registry https://registry.npmjs.org/\",\"==\":\"=============================================================\",\"tip3\":\"发版注意: 【测试版执行publish:beta】【修改bug执行publish:fix】【新增功能执行publish:feat】【新特性执行publish:perf】\",\"publish:beta\":\"npm version prerelease --preid=beta && npm run publish:beta:base\",\"publish:fix\":\"npm version patch && npm run publish:base\",\"publish:feat\":\"npm version minor && npm run publish:base\",\"publish:perf\":\"npm version major && npm run publish:base\"},\"files\":[\"dist\",\"packages\",\"src\"],\"main\":\"dist/fl-web-component.common.js\",\"dependencies\":{\"camera-controls\":\"2.9.0\",\"core-js\":\"^3.42.0\",\"dxf-parser\":\"^1.1.2\",\"element-ui\":\"2.15.14\",\"fflate\":\"^0.8.2\",\"html2canvas\":\"^1.4.1\",\"jspdf\":\"^3.0.1\",\"konva\":\"^9.3.12\",\"lodash\":\"^4.17.21\",\"meshline\":\"^3.3.1\",\"regenerator-runtime\":\"^0.14.1\",\"svg-pan-zoom\":\"^3.6.2\",\"three\":\"^0.176.0\",\"three.path\":\"^1.0.1\",\"vue\":\"^2.6.11\"},\"devDependencies\":{\"@babel/core\":\"^7.12.16\",\"@babel/plugin-proposal-nullish-coalescing-operator\":\"^7.18.6\",\"@babel/plugin-proposal-optional-chaining\":\"^7.21.0\",\"@babel/preset-env\":\"^7.0.0\",\"@babel/runtime-corejs3\":\"^7.27.1\",\"@vue/cli-plugin-babel\":\"~4.4.0\",\"@vue/cli-plugin-eslint\":\"~4.4.0\",\"@vue/cli-service\":\"~4.4.0\",\"babel-eslint\":\"^10.1.0\",\"babel-loader\":\"^8.0.0\",\"copy-webpack-plugin\":\"^4.0.1\",\"eslint\":\"^6.7.2\",\"eslint-config-prettier\":\"^6.15.0\",\"eslint-plugin-prettier\":\"^3.4.1\",\"eslint-plugin-vue\":\"^6.2.2\",\"patch-package\":\"^6.4.7\",\"prettier\":\"^2.8.8\",\"sass\":\"1.32.13\",\"sass-loader\":\"10.1.1\",\"vue-template-compiler\":\"^2.6.11\",\"worker-loader\":\"^3.0.8\"},\"browserslist\":[\"> 1%\",\"last 2 versions\"]}");
|
|
66019
66019
|
|
|
66020
66020
|
/***/ }),
|
|
66021
66021
|
|
|
@@ -88142,7 +88142,7 @@ if (typeof window !== 'undefined') {
|
|
|
88142
88142
|
// Indicate to webpack that this file can be concatenated
|
|
88143
88143
|
/* harmony default export */ var setPublicPath = (null);
|
|
88144
88144
|
|
|
88145
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
88145
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"770dc4fa-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/index.vue?vue&type=template&id=23daca8a&scoped=true
|
|
88146
88146
|
var com_graphicsvue_type_template_id_23daca8a_scoped_true_render = function render() {
|
|
88147
88147
|
var _vm = this,
|
|
88148
88148
|
_c = _vm._self._c;
|
|
@@ -127043,43 +127043,136 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127043
127043
|
}, {
|
|
127044
127044
|
key: "getBox",
|
|
127045
127045
|
value: function () {
|
|
127046
|
-
var _getBox = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function
|
|
127047
|
-
var
|
|
127048
|
-
|
|
127049
|
-
|
|
127046
|
+
var _getBox = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function _callee24(_ref6) {
|
|
127047
|
+
var _this8 = this;
|
|
127048
|
+
var id, _ref6$projectId, projectId, isDebug, cached, getLegacyBox, batchResult, status, batchCount, boxList, index, batch, _t21;
|
|
127049
|
+
return StreamLoader_regenerator().w(function (_context24) {
|
|
127050
|
+
while (1) switch (_context24.p = _context24.n) {
|
|
127050
127051
|
case 0:
|
|
127051
127052
|
id = _ref6.id, _ref6$projectId = _ref6.projectId, projectId = _ref6$projectId === void 0 ? this.projectId || 0 : _ref6$projectId, isDebug = _ref6.isDebug;
|
|
127052
|
-
|
|
127053
|
+
_context24.n = 1;
|
|
127053
127054
|
return this._getFromDB(id, projectId);
|
|
127054
127055
|
case 1:
|
|
127055
|
-
cached =
|
|
127056
|
+
cached = _context24.v;
|
|
127056
127057
|
if (!(cached && !isDebug)) {
|
|
127057
|
-
|
|
127058
|
+
_context24.n = 2;
|
|
127058
127059
|
break;
|
|
127059
127060
|
}
|
|
127060
|
-
return
|
|
127061
|
+
return _context24.a(2, cached);
|
|
127061
127062
|
case 2:
|
|
127062
|
-
|
|
127063
|
-
|
|
127063
|
+
getLegacyBox = /*#__PURE__*/function () {
|
|
127064
|
+
var _ref7 = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function _callee23() {
|
|
127065
|
+
var res;
|
|
127066
|
+
return StreamLoader_regenerator().w(function (_context23) {
|
|
127067
|
+
while (1) switch (_context23.n) {
|
|
127068
|
+
case 0:
|
|
127069
|
+
if (!(!_this8.modelApi || typeof _this8.modelApi.getBox !== 'function')) {
|
|
127070
|
+
_context23.n = 1;
|
|
127071
|
+
break;
|
|
127072
|
+
}
|
|
127073
|
+
throw new Error('modelApi.getBox is not available');
|
|
127074
|
+
case 1:
|
|
127075
|
+
_context23.n = 2;
|
|
127076
|
+
return _this8.modelApi.getBox({
|
|
127077
|
+
id: id,
|
|
127078
|
+
projectId: projectId
|
|
127079
|
+
});
|
|
127080
|
+
case 2:
|
|
127081
|
+
res = _context23.v;
|
|
127082
|
+
if (res) {
|
|
127083
|
+
_context23.n = 3;
|
|
127084
|
+
break;
|
|
127085
|
+
}
|
|
127086
|
+
return _context23.a(2, null);
|
|
127087
|
+
case 3:
|
|
127088
|
+
_this8._applyPrefixId(res, 'id', id);
|
|
127089
|
+
_this8._saveToDB(id, res, projectId);
|
|
127090
|
+
return _context23.a(2, res);
|
|
127091
|
+
}
|
|
127092
|
+
}, _callee23);
|
|
127093
|
+
}));
|
|
127094
|
+
return function getLegacyBox() {
|
|
127095
|
+
return _ref7.apply(this, arguments);
|
|
127096
|
+
};
|
|
127097
|
+
}(); // 2. 未配置批次数接口时,兼容旧版一次性请求。
|
|
127098
|
+
if (!(!this.modelApi || typeof this.modelApi.getMeshBatchCount !== 'function')) {
|
|
127099
|
+
_context24.n = 3;
|
|
127100
|
+
break;
|
|
127101
|
+
}
|
|
127102
|
+
return _context24.a(2, getLegacyBox());
|
|
127103
|
+
case 3:
|
|
127104
|
+
_context24.p = 3;
|
|
127105
|
+
_context24.n = 4;
|
|
127106
|
+
return this.modelApi.getMeshBatchCount({
|
|
127064
127107
|
id: id,
|
|
127065
127108
|
projectId: projectId
|
|
127066
127109
|
});
|
|
127067
|
-
case 3:
|
|
127068
|
-
res = _context23.v;
|
|
127069
|
-
if (!res) {
|
|
127070
|
-
_context23.n = 4;
|
|
127071
|
-
break;
|
|
127072
|
-
}
|
|
127073
|
-
// 3. 存入 IndexedDB (存储原始数据)
|
|
127074
|
-
this._applyPrefixId(res, 'id', id);
|
|
127075
|
-
this._saveToDB(id, res, projectId);
|
|
127076
|
-
return _context23.a(2, res);
|
|
127077
127110
|
case 4:
|
|
127078
|
-
|
|
127111
|
+
batchResult = _context24.v;
|
|
127112
|
+
_context24.n = 7;
|
|
127113
|
+
break;
|
|
127079
127114
|
case 5:
|
|
127080
|
-
|
|
127115
|
+
_context24.p = 5;
|
|
127116
|
+
_t21 = _context24.v;
|
|
127117
|
+
status = _t21 && _t21.response ? _t21.response.status : _t21 && _t21.status;
|
|
127118
|
+
if (!(status === 404)) {
|
|
127119
|
+
_context24.n = 6;
|
|
127120
|
+
break;
|
|
127121
|
+
}
|
|
127122
|
+
return _context24.a(2, getLegacyBox());
|
|
127123
|
+
case 6:
|
|
127124
|
+
throw _t21;
|
|
127125
|
+
case 7:
|
|
127126
|
+
batchCount = Number(batchResult && StreamLoader_typeof(batchResult) === 'object' ? batchResult.index : batchResult);
|
|
127127
|
+
if (!(!Number.isInteger(batchCount) || batchCount < 0)) {
|
|
127128
|
+
_context24.n = 8;
|
|
127129
|
+
break;
|
|
127130
|
+
}
|
|
127131
|
+
throw new Error('Invalid getBox batch count');
|
|
127132
|
+
case 8:
|
|
127133
|
+
if (!(batchCount === 0)) {
|
|
127134
|
+
_context24.n = 9;
|
|
127135
|
+
break;
|
|
127136
|
+
}
|
|
127137
|
+
return _context24.a(2, []);
|
|
127138
|
+
case 9:
|
|
127139
|
+
boxList = [];
|
|
127140
|
+
index = 0;
|
|
127141
|
+
case 10:
|
|
127142
|
+
if (!(index < batchCount)) {
|
|
127143
|
+
_context24.n = 14;
|
|
127144
|
+
break;
|
|
127145
|
+
}
|
|
127146
|
+
_context24.n = 11;
|
|
127147
|
+
return this.modelApi.getBox({
|
|
127148
|
+
id: id,
|
|
127149
|
+
projectId: projectId,
|
|
127150
|
+
index: index
|
|
127151
|
+
});
|
|
127152
|
+
case 11:
|
|
127153
|
+
batch = _context24.v;
|
|
127154
|
+
if (batch) {
|
|
127155
|
+
_context24.n = 12;
|
|
127156
|
+
break;
|
|
127157
|
+
}
|
|
127158
|
+
throw new Error("Failed to get box batch: ".concat(index));
|
|
127159
|
+
case 12:
|
|
127160
|
+
if (Array.isArray(batch)) {
|
|
127161
|
+
boxList.push.apply(boxList, StreamLoader_toConsumableArray(batch));
|
|
127162
|
+
} else {
|
|
127163
|
+
boxList.push(batch);
|
|
127164
|
+
}
|
|
127165
|
+
case 13:
|
|
127166
|
+
index++;
|
|
127167
|
+
_context24.n = 10;
|
|
127168
|
+
break;
|
|
127169
|
+
case 14:
|
|
127170
|
+
// 4. 全部批次成功后统一处理并写入完整缓存。
|
|
127171
|
+
this._applyPrefixId(boxList, 'id', id);
|
|
127172
|
+
this._saveToDB(id, boxList, projectId);
|
|
127173
|
+
return _context24.a(2, boxList);
|
|
127081
127174
|
}
|
|
127082
|
-
},
|
|
127175
|
+
}, _callee24, this, [[3, 5]]);
|
|
127083
127176
|
}));
|
|
127084
127177
|
function getBox(_x30) {
|
|
127085
127178
|
return _getBox.apply(this, arguments);
|
|
@@ -127089,11 +127182,11 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127089
127182
|
}, {
|
|
127090
127183
|
key: "handleCameraControlForStream",
|
|
127091
127184
|
value: function () {
|
|
127092
|
-
var _handleCameraControlForStream = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function
|
|
127093
|
-
var
|
|
127094
|
-
var chainRequest, loadedModels, documentIdToIds, activeItems, primaryItem, requestId, range, streamResult,
|
|
127095
|
-
return StreamLoader_regenerator().w(function (
|
|
127096
|
-
while (1) switch (
|
|
127185
|
+
var _handleCameraControlForStream = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function _callee25(args) {
|
|
127186
|
+
var _this9 = this;
|
|
127187
|
+
var chainRequest, loadedModels, documentIdToIds, activeItems, primaryItem, requestId, range, streamResult, _t22;
|
|
127188
|
+
return StreamLoader_regenerator().w(function (_context25) {
|
|
127189
|
+
while (1) switch (_context25.p = _context25.n) {
|
|
127097
127190
|
case 0:
|
|
127098
127191
|
// 性能优化注释:禁用 range 被注释字段的解构声明与初始化
|
|
127099
127192
|
chainRequest = args.chainRequest, loadedModels = args.loadedModels; // 构建 documentIdToIds 映射 多个documentid->modelid
|
|
@@ -127104,7 +127197,7 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127104
127197
|
// 从注册表中收集数据
|
|
127105
127198
|
// 性能优化:直接使用 documentIdToIds 的 keys,避免重复解析 loadedModels
|
|
127106
127199
|
Object.keys(documentIdToIds).forEach(function (docId) {
|
|
127107
|
-
var record =
|
|
127200
|
+
var record = _this9.modelRegistry.get(docId);
|
|
127108
127201
|
if (record) {
|
|
127109
127202
|
activeItems.push(record.item);
|
|
127110
127203
|
// if (record.materialData) {
|
|
@@ -127117,10 +127210,10 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127117
127210
|
}
|
|
127118
127211
|
});
|
|
127119
127212
|
if (!(activeItems.length === 0)) {
|
|
127120
|
-
|
|
127213
|
+
_context25.n = 1;
|
|
127121
127214
|
break;
|
|
127122
127215
|
}
|
|
127123
|
-
return
|
|
127216
|
+
return _context25.a(2);
|
|
127124
127217
|
case 1:
|
|
127125
127218
|
primaryItem = activeItems[0]; // 使用第一个item作为主上下文
|
|
127126
127219
|
requestId = Date.now() + '_' + Math.random().toString(36).substr(2, 9);
|
|
@@ -127169,20 +127262,20 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127169
127262
|
// range.minZ = Math.max(range.minZ, boxToUse.min_z);
|
|
127170
127263
|
// range.maxZ = Math.min(range.maxZ, boxToUse.max_z);
|
|
127171
127264
|
// }
|
|
127172
|
-
|
|
127173
|
-
|
|
127265
|
+
_context25.p = 2;
|
|
127266
|
+
_context25.n = 3;
|
|
127174
127267
|
return this.fetchJsonStream(primaryItem, range, this.currentAbortController.signal, requestId);
|
|
127175
127268
|
case 3:
|
|
127176
|
-
streamResult =
|
|
127269
|
+
streamResult = _context25.v;
|
|
127177
127270
|
if (!(this.currentRequestId === requestId)) {
|
|
127178
|
-
|
|
127271
|
+
_context25.n = 5;
|
|
127179
127272
|
break;
|
|
127180
127273
|
}
|
|
127181
127274
|
if (!(typeof this.onRangeStreamComplete === 'function')) {
|
|
127182
|
-
|
|
127275
|
+
_context25.n = 4;
|
|
127183
127276
|
break;
|
|
127184
127277
|
}
|
|
127185
|
-
|
|
127278
|
+
_context25.n = 4;
|
|
127186
127279
|
return this.onRangeStreamComplete(StreamLoader_objectSpread({
|
|
127187
127280
|
source: 'inRangeDis2',
|
|
127188
127281
|
requestId: requestId,
|
|
@@ -127192,28 +127285,28 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127192
127285
|
case 4:
|
|
127193
127286
|
this.currentAbortController = null;
|
|
127194
127287
|
this.currentRequestId = null;
|
|
127195
|
-
|
|
127288
|
+
_context25.n = 5;
|
|
127196
127289
|
break;
|
|
127197
127290
|
case 5:
|
|
127198
|
-
|
|
127291
|
+
_context25.n = 8;
|
|
127199
127292
|
break;
|
|
127200
127293
|
case 6:
|
|
127201
|
-
|
|
127202
|
-
|
|
127203
|
-
if (!(
|
|
127204
|
-
|
|
127294
|
+
_context25.p = 6;
|
|
127295
|
+
_t22 = _context25.v;
|
|
127296
|
+
if (!(_t22.name === 'AbortError')) {
|
|
127297
|
+
_context25.n = 7;
|
|
127205
127298
|
break;
|
|
127206
127299
|
}
|
|
127207
|
-
return
|
|
127300
|
+
return _context25.a(2);
|
|
127208
127301
|
case 7:
|
|
127209
127302
|
if (this.currentRequestId === requestId) {
|
|
127210
127303
|
this.currentAbortController = null;
|
|
127211
127304
|
this.currentRequestId = null;
|
|
127212
127305
|
}
|
|
127213
127306
|
case 8:
|
|
127214
|
-
return
|
|
127307
|
+
return _context25.a(2);
|
|
127215
127308
|
}
|
|
127216
|
-
},
|
|
127309
|
+
}, _callee25, this, [[2, 6]]);
|
|
127217
127310
|
}));
|
|
127218
127311
|
function handleCameraControlForStream(_x31) {
|
|
127219
127312
|
return _handleCameraControlForStream.apply(this, arguments);
|
|
@@ -127277,61 +127370,61 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127277
127370
|
}, {
|
|
127278
127371
|
key: "processModelItem",
|
|
127279
127372
|
value: function () {
|
|
127280
|
-
var _processModelItem = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function
|
|
127373
|
+
var _processModelItem = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function _callee26(item) {
|
|
127281
127374
|
var options,
|
|
127282
127375
|
materialData,
|
|
127283
127376
|
mergeMaterialData,
|
|
127284
127377
|
sceneBox,
|
|
127285
127378
|
boxIndex,
|
|
127286
127379
|
modelResourceMapObj,
|
|
127287
|
-
|
|
127288
|
-
|
|
127289
|
-
return StreamLoader_regenerator().w(function (
|
|
127290
|
-
while (1) switch (
|
|
127380
|
+
_args26 = arguments,
|
|
127381
|
+
_t23;
|
|
127382
|
+
return StreamLoader_regenerator().w(function (_context26) {
|
|
127383
|
+
while (1) switch (_context26.p = _context26.n) {
|
|
127291
127384
|
case 0:
|
|
127292
|
-
options =
|
|
127293
|
-
|
|
127385
|
+
options = _args26.length > 1 && _args26[1] !== undefined ? _args26[1] : {};
|
|
127386
|
+
_context26.p = 1;
|
|
127294
127387
|
if (typeof item.id !== 'string') {
|
|
127295
127388
|
item.id = '' + item.id;
|
|
127296
127389
|
}
|
|
127297
127390
|
|
|
127298
127391
|
// 获取材质数据
|
|
127299
|
-
|
|
127392
|
+
_context26.n = 2;
|
|
127300
127393
|
return this.getPrimitivesByMaterial({
|
|
127301
127394
|
id: item.id,
|
|
127302
127395
|
projectId: this.projectId
|
|
127303
127396
|
});
|
|
127304
127397
|
case 2:
|
|
127305
|
-
materialData =
|
|
127306
|
-
|
|
127398
|
+
materialData = _context26.v;
|
|
127399
|
+
_context26.n = 3;
|
|
127307
127400
|
return this.getPrimitivesByMergeMaterial({
|
|
127308
127401
|
id: item.id,
|
|
127309
127402
|
projectId: this.projectId
|
|
127310
127403
|
});
|
|
127311
127404
|
case 3:
|
|
127312
|
-
mergeMaterialData =
|
|
127405
|
+
mergeMaterialData = _context26.v;
|
|
127313
127406
|
this._applyPrefixId(mergeMaterialData, 'id');
|
|
127314
127407
|
this._applyPrefixId(materialData, 'id');
|
|
127315
127408
|
|
|
127316
127409
|
// 获取场景包围盒
|
|
127317
|
-
|
|
127410
|
+
_context26.n = 4;
|
|
127318
127411
|
return this.getSceneBox({
|
|
127319
127412
|
id: item.id,
|
|
127320
127413
|
projectId: this.projectId
|
|
127321
127414
|
});
|
|
127322
127415
|
case 4:
|
|
127323
|
-
sceneBox =
|
|
127416
|
+
sceneBox = _context26.v;
|
|
127324
127417
|
this.sceneBox = sceneBox;
|
|
127325
127418
|
|
|
127326
127419
|
// 获取BoxIndex
|
|
127327
|
-
|
|
127420
|
+
_context26.n = 5;
|
|
127328
127421
|
return this.getBox({
|
|
127329
127422
|
id: item.id,
|
|
127330
127423
|
projectId: this.projectId,
|
|
127331
127424
|
isDebug: this.debug
|
|
127332
127425
|
});
|
|
127333
127426
|
case 5:
|
|
127334
|
-
boxIndex =
|
|
127427
|
+
boxIndex = _context26.v;
|
|
127335
127428
|
this.boxIndex = boxIndex;
|
|
127336
127429
|
|
|
127337
127430
|
// 将 mergeMaterialData 覆盖到 materialData(按 id 覆盖 color/transp)
|
|
@@ -127343,18 +127436,18 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127343
127436
|
}; // 设置当前模型到注册表
|
|
127344
127437
|
this.updateModelRegistry(item, materialData, mergeMaterialData, sceneBox, boxIndex);
|
|
127345
127438
|
console.log('modelRegistry', this.modelRegistry);
|
|
127346
|
-
return
|
|
127439
|
+
return _context26.a(2, {
|
|
127347
127440
|
modelResourceMap: modelResourceMapObj,
|
|
127348
127441
|
sceneBox: sceneBox,
|
|
127349
127442
|
boxIndex: boxIndex,
|
|
127350
127443
|
item: item
|
|
127351
127444
|
});
|
|
127352
127445
|
case 6:
|
|
127353
|
-
|
|
127354
|
-
|
|
127355
|
-
return
|
|
127446
|
+
_context26.p = 6;
|
|
127447
|
+
_t23 = _context26.v;
|
|
127448
|
+
return _context26.a(2, null);
|
|
127356
127449
|
}
|
|
127357
|
-
},
|
|
127450
|
+
}, _callee26, this, [[1, 6]]);
|
|
127358
127451
|
}));
|
|
127359
127452
|
function processModelItem(_x32) {
|
|
127360
127453
|
return _processModelItem.apply(this, arguments);
|
|
@@ -127393,27 +127486,27 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127393
127486
|
}, {
|
|
127394
127487
|
key: "_getFromDB",
|
|
127395
127488
|
value: function () {
|
|
127396
|
-
var _getFromDB2 = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function
|
|
127489
|
+
var _getFromDB2 = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function _callee27(id) {
|
|
127397
127490
|
var projectId,
|
|
127398
127491
|
db,
|
|
127399
|
-
|
|
127400
|
-
|
|
127401
|
-
return StreamLoader_regenerator().w(function (
|
|
127402
|
-
while (1) switch (
|
|
127492
|
+
_args27 = arguments,
|
|
127493
|
+
_t24;
|
|
127494
|
+
return StreamLoader_regenerator().w(function (_context27) {
|
|
127495
|
+
while (1) switch (_context27.p = _context27.n) {
|
|
127403
127496
|
case 0:
|
|
127404
|
-
projectId =
|
|
127405
|
-
|
|
127406
|
-
|
|
127497
|
+
projectId = _args27.length > 1 && _args27[1] !== undefined ? _args27[1] : this.projectId || 0;
|
|
127498
|
+
_context27.p = 1;
|
|
127499
|
+
_context27.n = 2;
|
|
127407
127500
|
return this._initDB();
|
|
127408
127501
|
case 2:
|
|
127409
|
-
db =
|
|
127502
|
+
db = _context27.v;
|
|
127410
127503
|
if (db) {
|
|
127411
|
-
|
|
127504
|
+
_context27.n = 3;
|
|
127412
127505
|
break;
|
|
127413
127506
|
}
|
|
127414
|
-
return
|
|
127507
|
+
return _context27.a(2, null);
|
|
127415
127508
|
case 3:
|
|
127416
|
-
return
|
|
127509
|
+
return _context27.a(2, new Promise(function (resolve) {
|
|
127417
127510
|
var transaction = db.transaction(['boxCache'], 'readonly');
|
|
127418
127511
|
var store = transaction.objectStore('boxCache');
|
|
127419
127512
|
var request = store.get("".concat(projectId, ":").concat(id));
|
|
@@ -127425,12 +127518,12 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127425
127518
|
};
|
|
127426
127519
|
}));
|
|
127427
127520
|
case 4:
|
|
127428
|
-
|
|
127429
|
-
|
|
127430
|
-
console.warn('Error reading from IndexedDB:',
|
|
127431
|
-
return
|
|
127521
|
+
_context27.p = 4;
|
|
127522
|
+
_t24 = _context27.v;
|
|
127523
|
+
console.warn('Error reading from IndexedDB:', _t24);
|
|
127524
|
+
return _context27.a(2, null);
|
|
127432
127525
|
}
|
|
127433
|
-
},
|
|
127526
|
+
}, _callee27, this, [[1, 4]]);
|
|
127434
127527
|
}));
|
|
127435
127528
|
function _getFromDB(_x33) {
|
|
127436
127529
|
return _getFromDB2.apply(this, arguments);
|
|
@@ -127440,41 +127533,41 @@ var StreamLoader_StreamLoader = /*#__PURE__*/function () {
|
|
|
127440
127533
|
}, {
|
|
127441
127534
|
key: "_saveToDB",
|
|
127442
127535
|
value: function () {
|
|
127443
|
-
var _saveToDB2 = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function
|
|
127536
|
+
var _saveToDB2 = StreamLoader_asyncToGenerator(/*#__PURE__*/StreamLoader_regenerator().m(function _callee28(id, data) {
|
|
127444
127537
|
var projectId,
|
|
127445
127538
|
db,
|
|
127446
127539
|
transaction,
|
|
127447
127540
|
store,
|
|
127448
|
-
|
|
127449
|
-
|
|
127450
|
-
return StreamLoader_regenerator().w(function (
|
|
127451
|
-
while (1) switch (
|
|
127541
|
+
_args28 = arguments,
|
|
127542
|
+
_t25;
|
|
127543
|
+
return StreamLoader_regenerator().w(function (_context28) {
|
|
127544
|
+
while (1) switch (_context28.p = _context28.n) {
|
|
127452
127545
|
case 0:
|
|
127453
|
-
projectId =
|
|
127454
|
-
|
|
127455
|
-
|
|
127546
|
+
projectId = _args28.length > 2 && _args28[2] !== undefined ? _args28[2] : this.projectId || 0;
|
|
127547
|
+
_context28.p = 1;
|
|
127548
|
+
_context28.n = 2;
|
|
127456
127549
|
return this._initDB();
|
|
127457
127550
|
case 2:
|
|
127458
|
-
db =
|
|
127551
|
+
db = _context28.v;
|
|
127459
127552
|
if (db) {
|
|
127460
|
-
|
|
127553
|
+
_context28.n = 3;
|
|
127461
127554
|
break;
|
|
127462
127555
|
}
|
|
127463
|
-
return
|
|
127556
|
+
return _context28.a(2);
|
|
127464
127557
|
case 3:
|
|
127465
127558
|
transaction = db.transaction(['boxCache'], 'readwrite');
|
|
127466
127559
|
store = transaction.objectStore('boxCache');
|
|
127467
127560
|
store.put(data, "".concat(projectId, ":").concat(id));
|
|
127468
|
-
|
|
127561
|
+
_context28.n = 5;
|
|
127469
127562
|
break;
|
|
127470
127563
|
case 4:
|
|
127471
|
-
|
|
127472
|
-
|
|
127473
|
-
console.warn('Error saving to IndexedDB:',
|
|
127564
|
+
_context28.p = 4;
|
|
127565
|
+
_t25 = _context28.v;
|
|
127566
|
+
console.warn('Error saving to IndexedDB:', _t25);
|
|
127474
127567
|
case 5:
|
|
127475
|
-
return
|
|
127568
|
+
return _context28.a(2);
|
|
127476
127569
|
}
|
|
127477
|
-
},
|
|
127570
|
+
}, _callee28, this, [[1, 4]]);
|
|
127478
127571
|
}));
|
|
127479
127572
|
function _saveToDB(_x34, _x35) {
|
|
127480
127573
|
return _saveToDB2.apply(this, arguments);
|
|
@@ -139837,7 +139930,7 @@ var component = normalizeComponent(
|
|
|
139837
139930
|
)
|
|
139838
139931
|
|
|
139839
139932
|
/* harmony default export */ var com_graphics = (component.exports);
|
|
139840
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
139933
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"770dc4fa-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-flcanvas/index.vue?vue&type=template&id=aa5e04ac&scoped=true
|
|
139841
139934
|
var com_flcanvasvue_type_template_id_aa5e04ac_scoped_true_render = function render() {
|
|
139842
139935
|
var _vm = this,
|
|
139843
139936
|
_c = _vm._self._c;
|
|
@@ -146454,7 +146547,7 @@ var com_flcanvas_component = normalizeComponent(
|
|
|
146454
146547
|
)
|
|
146455
146548
|
|
|
146456
146549
|
/* harmony default export */ var com_flcanvas = (com_flcanvas_component.exports);
|
|
146457
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
146550
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"770dc4fa-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/per-control.vue?vue&type=template&id=3fceaac3&scoped=true
|
|
146458
146551
|
var per_controlvue_type_template_id_3fceaac3_scoped_true_render = function render() {
|
|
146459
146552
|
var _vm = this,
|
|
146460
146553
|
_c = _vm._self._c;
|
|
@@ -146568,7 +146661,7 @@ var per_control_component = normalizeComponent(
|
|
|
146568
146661
|
)
|
|
146569
146662
|
|
|
146570
146663
|
/* harmony default export */ var per_control = (per_control_component.exports);
|
|
146571
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
146664
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"770dc4fa-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/pid.vue?vue&type=template&id=2572c0e2&scoped=true
|
|
146572
146665
|
var pidvue_type_template_id_2572c0e2_scoped_true_render = function render() {
|
|
146573
146666
|
var _vm = this,
|
|
146574
146667
|
_c = _vm._self._c;
|
|
@@ -146615,7 +146708,7 @@ var browserify_default = /*#__PURE__*/__webpack_require__.n(browserify);
|
|
|
146615
146708
|
var html2canvas = __webpack_require__("c0e9");
|
|
146616
146709
|
var html2canvas_default = /*#__PURE__*/__webpack_require__.n(html2canvas);
|
|
146617
146710
|
|
|
146618
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
146711
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"770dc4fa-vue-loader-template"}!./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/com-graphics/component/ann-tool.vue?vue&type=template&id=4b17bce0&scoped=true
|
|
146619
146712
|
var ann_toolvue_type_template_id_4b17bce0_scoped_true_render = function render() {
|
|
146620
146713
|
var _vm = this,
|
|
146621
146714
|
_c = _vm._self._c;
|