@itwin/rpcinterface-full-stack-tests 4.0.0-dev.4 → 4.0.0-dev.40
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/lib/dist/{_07c5.bundled-tests.js → _d48c.bundled-tests.js} +3 -3
- package/lib/dist/_d48c.bundled-tests.js.map +1 -0
- package/lib/dist/bundled-tests.js +42744 -47186
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/object-storage.bundled-tests.js.map +1 -1
- package/lib/dist/{vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_4_0_node_modules_itwin_obj-3576c6.bundled-tests.js → vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_5_0_node_modules_itwin_obj-e3e81d.bundled-tests.js} +212 -163
- package/lib/dist/{vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_4_0_node_modules_itwin_obj-3576c6.bundled-tests.js.map → vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_5_0_node_modules_itwin_obj-e3e81d.bundled-tests.js.map} +1 -1
- package/lib/dist/{vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_13_node_modules_loaders_gl_draco_d-e0d984.bundled-tests.js → vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41.bundled-tests.js} +206 -458
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41.bundled-tests.js.map +1 -0
- package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +1 -1
- package/lib/frontend/Elements.test.js +2 -21
- package/lib/frontend/Elements.test.js.map +1 -1
- package/lib/frontend/IModelConnection.test.js +4 -4
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/lib/frontend/setup/IModelSession.js +4 -23
- package/lib/frontend/setup/IModelSession.js.map +1 -1
- package/lib/frontend/setup/TestContext.js +1 -2
- package/lib/frontend/setup/TestContext.js.map +1 -1
- package/lib/frontend/workflows/BasicScenarios.test.js +2 -21
- package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
- package/package.json +15 -15
- package/lib/dist/_07c5.bundled-tests.js.map +0 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_13_node_modules_loaders_gl_draco_d-e0d984.bundled-tests.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_itwin_rpcinterface_full_stack_tests"] = self["webpackChunk_itwin_rpcinterface_full_stack_tests"] || []).push([["vendors-
|
|
2
|
+
(self["webpackChunk_itwin_rpcinterface_full_stack_tests"] = self["webpackChunk_itwin_rpcinterface_full_stack_tests"] || []).push([["vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41"],{
|
|
3
3
|
|
|
4
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
5
|
-
|
|
6
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
7
|
-
|
|
4
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js":
|
|
5
|
+
/*!****************************************************************************************************************************!*\
|
|
6
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js ***!
|
|
7
|
+
\****************************************************************************************************************************/
|
|
8
8
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
9
9
|
|
|
10
10
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -12,7 +12,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12
12
|
/* harmony export */ "DracoLoader": () => (/* binding */ DracoLoader),
|
|
13
13
|
/* harmony export */ "_TypecheckDracoLoader": () => (/* binding */ _TypecheckDracoLoader)
|
|
14
14
|
/* harmony export */ });
|
|
15
|
-
/* harmony import */ var
|
|
15
|
+
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
16
|
+
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
17
|
+
|
|
16
18
|
|
|
17
19
|
const DEFAULT_DRACO_OPTIONS = {
|
|
18
20
|
draco: {
|
|
@@ -22,12 +24,13 @@ const DEFAULT_DRACO_OPTIONS = {
|
|
|
22
24
|
attributeNameEntry: undefined
|
|
23
25
|
}
|
|
24
26
|
};
|
|
27
|
+
|
|
25
28
|
const DracoLoader = {
|
|
26
29
|
name: 'Draco',
|
|
27
|
-
id: 'draco',
|
|
30
|
+
id: _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.isBrowser ? 'draco' : 'draco-nodejs',
|
|
28
31
|
module: 'draco',
|
|
29
32
|
shapes: ['mesh'],
|
|
30
|
-
version:
|
|
33
|
+
version: _lib_utils_version__WEBPACK_IMPORTED_MODULE_1__.VERSION,
|
|
31
34
|
worker: true,
|
|
32
35
|
extensions: ['drc'],
|
|
33
36
|
mimeTypes: ['application/octet-stream'],
|
|
@@ -40,19 +43,19 @@ const _TypecheckDracoLoader = DracoLoader;
|
|
|
40
43
|
|
|
41
44
|
/***/ }),
|
|
42
45
|
|
|
43
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
44
|
-
|
|
45
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
46
|
-
|
|
46
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js":
|
|
47
|
+
/*!****************************************************************************************************************************!*\
|
|
48
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js ***!
|
|
49
|
+
\****************************************************************************************************************************/
|
|
47
50
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
48
51
|
|
|
49
52
|
__webpack_require__.r(__webpack_exports__);
|
|
50
53
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
51
54
|
/* harmony export */ "DracoWriter": () => (/* binding */ DracoWriter)
|
|
52
55
|
/* harmony export */ });
|
|
53
|
-
/* harmony import */ var _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/draco-builder */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
54
|
-
/* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
55
|
-
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
56
|
+
/* harmony import */ var _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/draco-builder */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js");
|
|
57
|
+
/* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
|
|
58
|
+
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
56
59
|
|
|
57
60
|
|
|
58
61
|
|
|
@@ -60,6 +63,7 @@ const DEFAULT_DRACO_OPTIONS = {
|
|
|
60
63
|
pointcloud: false,
|
|
61
64
|
attributeNameEntry: 'name'
|
|
62
65
|
};
|
|
66
|
+
|
|
63
67
|
const DracoWriter = {
|
|
64
68
|
name: 'DRACO',
|
|
65
69
|
id: 'draco',
|
|
@@ -71,13 +75,12 @@ const DracoWriter = {
|
|
|
71
75
|
draco: DEFAULT_DRACO_OPTIONS
|
|
72
76
|
}
|
|
73
77
|
};
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
async function encode(data) {
|
|
79
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
76
80
|
const {
|
|
77
81
|
draco
|
|
78
82
|
} = await (0,_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_1__.loadDracoEncoderModule)(options);
|
|
79
83
|
const dracoBuilder = new _lib_draco_builder__WEBPACK_IMPORTED_MODULE_2__["default"](draco);
|
|
80
|
-
|
|
81
84
|
try {
|
|
82
85
|
return dracoBuilder.encodeSync(data, options.draco);
|
|
83
86
|
} finally {
|
|
@@ -88,10 +91,10 @@ async function encode(data, options = {}) {
|
|
|
88
91
|
|
|
89
92
|
/***/ }),
|
|
90
93
|
|
|
91
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
92
|
-
|
|
93
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
94
|
-
|
|
94
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/index.js":
|
|
95
|
+
/*!*********************************************************************************************************************!*\
|
|
96
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/index.js ***!
|
|
97
|
+
\*********************************************************************************************************************/
|
|
95
98
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
96
99
|
|
|
97
100
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -102,12 +105,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102
105
|
/* harmony export */ "DracoWriterWorker": () => (/* binding */ DracoWriterWorker),
|
|
103
106
|
/* harmony export */ "_TypecheckDracoLoader": () => (/* binding */ _TypecheckDracoLoader)
|
|
104
107
|
/* harmony export */ });
|
|
105
|
-
/* harmony import */ var _draco_loader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./draco-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
106
|
-
/* harmony import */ var _lib_draco_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/draco-parser */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
107
|
-
/* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
108
|
-
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
109
|
-
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
110
|
-
/* harmony import */ var _draco_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./draco-writer */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
108
|
+
/* harmony import */ var _draco_loader__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./draco-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/draco-loader.js");
|
|
109
|
+
/* harmony import */ var _lib_draco_parser__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lib/draco-parser */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js");
|
|
110
|
+
/* harmony import */ var _lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./lib/draco-module-loader */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js");
|
|
111
|
+
/* harmony import */ var _lib_utils_version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lib/utils/version */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js");
|
|
112
|
+
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
113
|
+
/* harmony import */ var _draco_writer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./draco-writer */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/draco-writer.js");
|
|
114
|
+
|
|
115
|
+
|
|
111
116
|
|
|
112
117
|
|
|
113
118
|
|
|
@@ -126,16 +131,17 @@ const DracoWriterWorker = {
|
|
|
126
131
|
}
|
|
127
132
|
};
|
|
128
133
|
|
|
129
|
-
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
const DracoLoader = {
|
|
137
|
+
..._draco_loader__WEBPACK_IMPORTED_MODULE_3__.DracoLoader,
|
|
130
138
|
parse
|
|
131
139
|
};
|
|
132
|
-
|
|
133
140
|
async function parse(arrayBuffer, options) {
|
|
134
141
|
const {
|
|
135
142
|
draco
|
|
136
143
|
} = await (0,_lib_draco_module_loader__WEBPACK_IMPORTED_MODULE_4__.loadDracoDecoderModule)(options);
|
|
137
144
|
const dracoParser = new _lib_draco_parser__WEBPACK_IMPORTED_MODULE_5__["default"](draco);
|
|
138
|
-
|
|
139
145
|
try {
|
|
140
146
|
return dracoParser.parseSync(arrayBuffer, options === null || options === void 0 ? void 0 : options.draco);
|
|
141
147
|
} finally {
|
|
@@ -148,17 +154,18 @@ const _TypecheckDracoLoader = DracoLoader;
|
|
|
148
154
|
|
|
149
155
|
/***/ }),
|
|
150
156
|
|
|
151
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
152
|
-
|
|
153
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
154
|
-
|
|
157
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js":
|
|
158
|
+
/*!*********************************************************************************************************************************!*\
|
|
159
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-builder.js ***!
|
|
160
|
+
\*********************************************************************************************************************************/
|
|
155
161
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
156
162
|
|
|
157
163
|
__webpack_require__.r(__webpack_exports__);
|
|
158
164
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
159
165
|
/* harmony export */ "default": () => (/* binding */ DracoBuilder)
|
|
160
166
|
/* harmony export */ });
|
|
161
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
167
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.21.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
168
|
+
|
|
162
169
|
|
|
163
170
|
const GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
|
|
164
171
|
POSITION: 'POSITION',
|
|
@@ -166,27 +173,19 @@ const GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP = {
|
|
|
166
173
|
COLOR_0: 'COLOR',
|
|
167
174
|
TEXCOORD_0: 'TEX_COORD'
|
|
168
175
|
};
|
|
169
|
-
|
|
170
176
|
const noop = () => {};
|
|
171
|
-
|
|
172
177
|
class DracoBuilder {
|
|
173
178
|
constructor(draco) {
|
|
174
179
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
|
|
175
|
-
|
|
176
180
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoEncoder", void 0);
|
|
177
|
-
|
|
178
181
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMeshBuilder", void 0);
|
|
179
|
-
|
|
180
182
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "dracoMetadataBuilder", void 0);
|
|
181
|
-
|
|
182
183
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "log", void 0);
|
|
183
|
-
|
|
184
184
|
this.draco = draco;
|
|
185
185
|
this.dracoEncoder = new this.draco.Encoder();
|
|
186
186
|
this.dracoMeshBuilder = new this.draco.MeshBuilder();
|
|
187
187
|
this.dracoMetadataBuilder = new this.draco.MetadataBuilder();
|
|
188
188
|
}
|
|
189
|
-
|
|
190
189
|
destroy() {
|
|
191
190
|
this.destroyEncodedObject(this.dracoMeshBuilder);
|
|
192
191
|
this.destroyEncodedObject(this.dracoEncoder);
|
|
@@ -202,46 +201,37 @@ class DracoBuilder {
|
|
|
202
201
|
}
|
|
203
202
|
}
|
|
204
203
|
|
|
205
|
-
encodeSync(mesh
|
|
204
|
+
encodeSync(mesh) {
|
|
205
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
206
206
|
this.log = noop;
|
|
207
|
-
|
|
208
207
|
this._setOptions(options);
|
|
209
|
-
|
|
210
208
|
return options.pointcloud ? this._encodePointCloud(mesh, options) : this._encodeMesh(mesh, options);
|
|
211
209
|
}
|
|
212
210
|
|
|
213
211
|
_getAttributesFromMesh(mesh) {
|
|
214
|
-
const attributes = {
|
|
212
|
+
const attributes = {
|
|
213
|
+
...mesh,
|
|
215
214
|
...mesh.attributes
|
|
216
215
|
};
|
|
217
|
-
|
|
218
216
|
if (mesh.indices) {
|
|
219
217
|
attributes.indices = mesh.indices;
|
|
220
218
|
}
|
|
221
|
-
|
|
222
219
|
return attributes;
|
|
223
220
|
}
|
|
224
|
-
|
|
225
221
|
_encodePointCloud(pointcloud, options) {
|
|
226
222
|
const dracoPointCloud = new this.draco.PointCloud();
|
|
227
|
-
|
|
228
223
|
if (options.metadata) {
|
|
229
224
|
this._addGeometryMetadata(dracoPointCloud, options.metadata);
|
|
230
225
|
}
|
|
231
|
-
|
|
232
226
|
const attributes = this._getAttributesFromMesh(pointcloud);
|
|
233
227
|
|
|
234
228
|
this._createDracoPointCloud(dracoPointCloud, attributes, options);
|
|
235
|
-
|
|
236
229
|
const dracoData = new this.draco.DracoInt8Array();
|
|
237
|
-
|
|
238
230
|
try {
|
|
239
231
|
const encodedLen = this.dracoEncoder.EncodePointCloudToDracoBuffer(dracoPointCloud, false, dracoData);
|
|
240
|
-
|
|
241
232
|
if (!(encodedLen > 0)) {
|
|
242
233
|
throw new Error('Draco encoding failed.');
|
|
243
234
|
}
|
|
244
|
-
|
|
245
235
|
this.log("DRACO encoded ".concat(dracoPointCloud.num_points(), " points\n with ").concat(dracoPointCloud.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
|
|
246
236
|
return dracoInt8ArrayToArrayBuffer(dracoData);
|
|
247
237
|
} finally {
|
|
@@ -249,27 +239,20 @@ class DracoBuilder {
|
|
|
249
239
|
this.destroyEncodedObject(dracoPointCloud);
|
|
250
240
|
}
|
|
251
241
|
}
|
|
252
|
-
|
|
253
242
|
_encodeMesh(mesh, options) {
|
|
254
243
|
const dracoMesh = new this.draco.Mesh();
|
|
255
|
-
|
|
256
244
|
if (options.metadata) {
|
|
257
245
|
this._addGeometryMetadata(dracoMesh, options.metadata);
|
|
258
246
|
}
|
|
259
|
-
|
|
260
247
|
const attributes = this._getAttributesFromMesh(mesh);
|
|
261
248
|
|
|
262
249
|
this._createDracoMesh(dracoMesh, attributes, options);
|
|
263
|
-
|
|
264
250
|
const dracoData = new this.draco.DracoInt8Array();
|
|
265
|
-
|
|
266
251
|
try {
|
|
267
252
|
const encodedLen = this.dracoEncoder.EncodeMeshToDracoBuffer(dracoMesh, dracoData);
|
|
268
|
-
|
|
269
253
|
if (encodedLen <= 0) {
|
|
270
254
|
throw new Error('Draco encoding failed.');
|
|
271
255
|
}
|
|
272
|
-
|
|
273
256
|
this.log("DRACO encoded ".concat(dracoMesh.num_points(), " points\n with ").concat(dracoMesh.num_attributes(), " attributes into ").concat(encodedLen, " bytes"));
|
|
274
257
|
return dracoInt8ArrayToArrayBuffer(dracoData);
|
|
275
258
|
} finally {
|
|
@@ -282,12 +265,10 @@ class DracoBuilder {
|
|
|
282
265
|
if ('speed' in options) {
|
|
283
266
|
this.dracoEncoder.SetSpeedOptions(...options.speed);
|
|
284
267
|
}
|
|
285
|
-
|
|
286
268
|
if ('method' in options) {
|
|
287
269
|
const dracoMethod = this.draco[options.method || 'MESH_SEQUENTIAL_ENCODING'];
|
|
288
270
|
this.dracoEncoder.SetEncodingMethod(dracoMethod);
|
|
289
271
|
}
|
|
290
|
-
|
|
291
272
|
if ('quantization' in options) {
|
|
292
273
|
for (const attribute in options.quantization) {
|
|
293
274
|
const bits = options.quantization[attribute];
|
|
@@ -299,22 +280,16 @@ class DracoBuilder {
|
|
|
299
280
|
|
|
300
281
|
_createDracoMesh(dracoMesh, attributes, options) {
|
|
301
282
|
const optionalMetadata = options.attributesMetadata || {};
|
|
302
|
-
|
|
303
283
|
try {
|
|
304
284
|
const positions = this._getPositionAttribute(attributes);
|
|
305
|
-
|
|
306
285
|
if (!positions) {
|
|
307
286
|
throw new Error('positions');
|
|
308
287
|
}
|
|
309
|
-
|
|
310
288
|
const vertexCount = positions.length / 3;
|
|
311
|
-
|
|
312
289
|
for (let attributeName in attributes) {
|
|
313
290
|
const attribute = attributes[attributeName];
|
|
314
291
|
attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
|
|
315
|
-
|
|
316
292
|
const uniqueId = this._addAttributeToMesh(dracoMesh, attributeName, attribute, vertexCount);
|
|
317
|
-
|
|
318
293
|
if (uniqueId !== -1) {
|
|
319
294
|
this._addAttributeMetadata(dracoMesh, uniqueId, {
|
|
320
295
|
name: attributeName,
|
|
@@ -326,28 +301,21 @@ class DracoBuilder {
|
|
|
326
301
|
this.destroyEncodedObject(dracoMesh);
|
|
327
302
|
throw error;
|
|
328
303
|
}
|
|
329
|
-
|
|
330
304
|
return dracoMesh;
|
|
331
305
|
}
|
|
332
306
|
|
|
333
307
|
_createDracoPointCloud(dracoPointCloud, attributes, options) {
|
|
334
308
|
const optionalMetadata = options.attributesMetadata || {};
|
|
335
|
-
|
|
336
309
|
try {
|
|
337
310
|
const positions = this._getPositionAttribute(attributes);
|
|
338
|
-
|
|
339
311
|
if (!positions) {
|
|
340
312
|
throw new Error('positions');
|
|
341
313
|
}
|
|
342
|
-
|
|
343
314
|
const vertexCount = positions.length / 3;
|
|
344
|
-
|
|
345
315
|
for (let attributeName in attributes) {
|
|
346
316
|
const attribute = attributes[attributeName];
|
|
347
317
|
attributeName = GLTF_TO_DRACO_ATTRIBUTE_NAME_MAP[attributeName] || attributeName;
|
|
348
|
-
|
|
349
318
|
const uniqueId = this._addAttributeToMesh(dracoPointCloud, attributeName, attribute, vertexCount);
|
|
350
|
-
|
|
351
319
|
if (uniqueId !== -1) {
|
|
352
320
|
this._addAttributeMetadata(dracoPointCloud, uniqueId, {
|
|
353
321
|
name: attributeName,
|
|
@@ -359,7 +327,6 @@ class DracoBuilder {
|
|
|
359
327
|
this.destroyEncodedObject(dracoPointCloud);
|
|
360
328
|
throw error;
|
|
361
329
|
}
|
|
362
|
-
|
|
363
330
|
return dracoPointCloud;
|
|
364
331
|
}
|
|
365
332
|
|
|
@@ -367,44 +334,34 @@ class DracoBuilder {
|
|
|
367
334
|
if (!ArrayBuffer.isView(attribute)) {
|
|
368
335
|
return -1;
|
|
369
336
|
}
|
|
370
|
-
|
|
371
337
|
const type = this._getDracoAttributeType(attributeName);
|
|
372
|
-
|
|
373
338
|
const size = attribute.length / vertexCount;
|
|
374
|
-
|
|
375
339
|
if (type === 'indices') {
|
|
376
340
|
const numFaces = attribute.length / 3;
|
|
377
341
|
this.log("Adding attribute ".concat(attributeName, ", size ").concat(numFaces));
|
|
342
|
+
|
|
378
343
|
this.dracoMeshBuilder.AddFacesToMesh(mesh, numFaces, attribute);
|
|
379
344
|
return -1;
|
|
380
345
|
}
|
|
381
|
-
|
|
382
346
|
this.log("Adding attribute ".concat(attributeName, ", size ").concat(size));
|
|
383
347
|
const builder = this.dracoMeshBuilder;
|
|
384
348
|
const {
|
|
385
349
|
buffer
|
|
386
350
|
} = attribute;
|
|
387
|
-
|
|
388
351
|
switch (attribute.constructor) {
|
|
389
352
|
case Int8Array:
|
|
390
353
|
return builder.AddInt8Attribute(mesh, type, vertexCount, size, new Int8Array(buffer));
|
|
391
|
-
|
|
392
354
|
case Int16Array:
|
|
393
355
|
return builder.AddInt16Attribute(mesh, type, vertexCount, size, new Int16Array(buffer));
|
|
394
|
-
|
|
395
356
|
case Int32Array:
|
|
396
357
|
return builder.AddInt32Attribute(mesh, type, vertexCount, size, new Int32Array(buffer));
|
|
397
|
-
|
|
398
358
|
case Uint8Array:
|
|
399
359
|
case Uint8ClampedArray:
|
|
400
360
|
return builder.AddUInt8Attribute(mesh, type, vertexCount, size, new Uint8Array(buffer));
|
|
401
|
-
|
|
402
361
|
case Uint16Array:
|
|
403
362
|
return builder.AddUInt16Attribute(mesh, type, vertexCount, size, new Uint16Array(buffer));
|
|
404
|
-
|
|
405
363
|
case Uint32Array:
|
|
406
364
|
return builder.AddUInt32Attribute(mesh, type, vertexCount, size, new Uint32Array(buffer));
|
|
407
|
-
|
|
408
365
|
case Float32Array:
|
|
409
366
|
default:
|
|
410
367
|
return builder.AddFloatAttribute(mesh, type, vertexCount, size, new Float32Array(buffer));
|
|
@@ -415,56 +372,43 @@ class DracoBuilder {
|
|
|
415
372
|
switch (attributeName.toLowerCase()) {
|
|
416
373
|
case 'indices':
|
|
417
374
|
return 'indices';
|
|
418
|
-
|
|
419
375
|
case 'position':
|
|
420
376
|
case 'positions':
|
|
421
377
|
case 'vertices':
|
|
422
378
|
return this.draco.POSITION;
|
|
423
|
-
|
|
424
379
|
case 'normal':
|
|
425
380
|
case 'normals':
|
|
426
381
|
return this.draco.NORMAL;
|
|
427
|
-
|
|
428
382
|
case 'color':
|
|
429
383
|
case 'colors':
|
|
430
384
|
return this.draco.COLOR;
|
|
431
|
-
|
|
432
385
|
case 'texcoord':
|
|
433
386
|
case 'texcoords':
|
|
434
387
|
return this.draco.TEX_COORD;
|
|
435
|
-
|
|
436
388
|
default:
|
|
437
389
|
return this.draco.GENERIC;
|
|
438
390
|
}
|
|
439
391
|
}
|
|
440
|
-
|
|
441
392
|
_getPositionAttribute(attributes) {
|
|
442
393
|
for (const attributeName in attributes) {
|
|
443
394
|
const attribute = attributes[attributeName];
|
|
444
|
-
|
|
445
395
|
const dracoType = this._getDracoAttributeType(attributeName);
|
|
446
|
-
|
|
447
396
|
if (dracoType === this.draco.POSITION) {
|
|
448
397
|
return attribute;
|
|
449
398
|
}
|
|
450
399
|
}
|
|
451
|
-
|
|
452
400
|
return null;
|
|
453
401
|
}
|
|
454
402
|
|
|
455
403
|
_addGeometryMetadata(dracoGeometry, metadata) {
|
|
456
404
|
const dracoMetadata = new this.draco.Metadata();
|
|
457
|
-
|
|
458
405
|
this._populateDracoMetadata(dracoMetadata, metadata);
|
|
459
|
-
|
|
460
406
|
this.dracoMeshBuilder.AddMetadata(dracoGeometry, dracoMetadata);
|
|
461
407
|
}
|
|
462
408
|
|
|
463
409
|
_addAttributeMetadata(dracoGeometry, uniqueAttributeId, metadata) {
|
|
464
410
|
const dracoAttributeMetadata = new this.draco.Metadata();
|
|
465
|
-
|
|
466
411
|
this._populateDracoMetadata(dracoAttributeMetadata, metadata);
|
|
467
|
-
|
|
468
412
|
this.dracoMeshBuilder.SetMetadataForAttribute(dracoGeometry, uniqueAttributeId, dracoAttributeMetadata);
|
|
469
413
|
}
|
|
470
414
|
|
|
@@ -477,34 +421,27 @@ class DracoBuilder {
|
|
|
477
421
|
} else {
|
|
478
422
|
this.dracoMetadataBuilder.AddDoubleEntry(dracoMetadata, key, value);
|
|
479
423
|
}
|
|
480
|
-
|
|
481
424
|
break;
|
|
482
|
-
|
|
483
425
|
case 'object':
|
|
484
426
|
if (value instanceof Int32Array) {
|
|
485
427
|
this.dracoMetadataBuilder.AddIntEntryArray(dracoMetadata, key, value, value.length);
|
|
486
428
|
}
|
|
487
|
-
|
|
488
429
|
break;
|
|
489
|
-
|
|
490
430
|
case 'string':
|
|
491
431
|
default:
|
|
492
432
|
this.dracoMetadataBuilder.AddStringEntry(dracoMetadata, key, value);
|
|
493
433
|
}
|
|
494
434
|
}
|
|
495
435
|
}
|
|
496
|
-
|
|
497
436
|
}
|
|
498
437
|
|
|
499
438
|
function dracoInt8ArrayToArrayBuffer(dracoData) {
|
|
500
439
|
const byteLength = dracoData.size();
|
|
501
440
|
const outputBuffer = new ArrayBuffer(byteLength);
|
|
502
441
|
const outputData = new Int8Array(outputBuffer);
|
|
503
|
-
|
|
504
442
|
for (let i = 0; i < byteLength; ++i) {
|
|
505
443
|
outputData[i] = dracoData.GetValue(i);
|
|
506
444
|
}
|
|
507
|
-
|
|
508
445
|
return outputBuffer;
|
|
509
446
|
}
|
|
510
447
|
|
|
@@ -516,10 +453,10 @@ function getEntries(container) {
|
|
|
516
453
|
|
|
517
454
|
/***/ }),
|
|
518
455
|
|
|
519
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
520
|
-
|
|
521
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
522
|
-
|
|
456
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js":
|
|
457
|
+
/*!***************************************************************************************************************************************!*\
|
|
458
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-module-loader.js ***!
|
|
459
|
+
\***************************************************************************************************************************************/
|
|
523
460
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
524
461
|
|
|
525
462
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -527,13 +464,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
527
464
|
/* harmony export */ "loadDracoDecoderModule": () => (/* binding */ loadDracoDecoderModule),
|
|
528
465
|
/* harmony export */ "loadDracoEncoderModule": () => (/* binding */ loadDracoEncoderModule)
|
|
529
466
|
/* harmony export */ });
|
|
530
|
-
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
467
|
+
/* harmony import */ var _loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/worker-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js");
|
|
468
|
+
|
|
469
|
+
|
|
531
470
|
|
|
532
|
-
const
|
|
533
|
-
const
|
|
534
|
-
const
|
|
535
|
-
const
|
|
536
|
-
const
|
|
471
|
+
const DRACO_DECODER_VERSION = '1.5.5';
|
|
472
|
+
const DRACO_ENCODER_VERSION = '1.4.1';
|
|
473
|
+
const STATIC_DECODER_URL = "https://www.gstatic.com/draco/versioned/decoders/".concat(DRACO_DECODER_VERSION);
|
|
474
|
+
const DRACO_JS_DECODER_URL = "".concat(STATIC_DECODER_URL, "/draco_decoder.js");
|
|
475
|
+
const DRACO_WASM_WRAPPER_URL = "".concat(STATIC_DECODER_URL, "/draco_wasm_wrapper.js");
|
|
476
|
+
const DRACO_WASM_DECODER_URL = "".concat(STATIC_DECODER_URL, "/draco_decoder.wasm");
|
|
477
|
+
const DRACO_ENCODER_URL = "https://raw.githubusercontent.com/google/draco/".concat(DRACO_ENCODER_VERSION, "/javascript/draco_encoder.js");
|
|
537
478
|
let loadDecoderPromise;
|
|
538
479
|
let loadEncoderPromise;
|
|
539
480
|
async function loadDracoDecoderModule(options) {
|
|
@@ -548,7 +489,6 @@ async function loadDracoDecoderModule(options) {
|
|
|
548
489
|
} else {
|
|
549
490
|
loadDecoderPromise = loadDecoderPromise || loadDracoDecoder(options);
|
|
550
491
|
}
|
|
551
|
-
|
|
552
492
|
return await loadDecoderPromise;
|
|
553
493
|
}
|
|
554
494
|
async function loadDracoEncoderModule(options) {
|
|
@@ -563,37 +503,31 @@ async function loadDracoEncoderModule(options) {
|
|
|
563
503
|
} else {
|
|
564
504
|
loadEncoderPromise = loadEncoderPromise || loadDracoEncoder(options);
|
|
565
505
|
}
|
|
566
|
-
|
|
567
506
|
return await loadEncoderPromise;
|
|
568
507
|
}
|
|
569
508
|
|
|
570
509
|
async function loadDracoDecoder(options) {
|
|
571
510
|
let DracoDecoderModule;
|
|
572
511
|
let wasmBinary;
|
|
573
|
-
|
|
574
512
|
switch (options.draco && options.draco.decoderType) {
|
|
575
513
|
case 'js':
|
|
576
514
|
DracoDecoderModule = await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_JS_DECODER_URL, 'draco', options);
|
|
577
515
|
break;
|
|
578
|
-
|
|
579
516
|
case 'wasm':
|
|
580
517
|
default:
|
|
581
518
|
[DracoDecoderModule, wasmBinary] = await Promise.all([await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_WASM_WRAPPER_URL, 'draco', options), await (0,_loaders_gl_worker_utils__WEBPACK_IMPORTED_MODULE_0__.loadLibrary)(DRACO_WASM_DECODER_URL, 'draco', options)]);
|
|
582
519
|
}
|
|
583
|
-
|
|
584
520
|
DracoDecoderModule = DracoDecoderModule || globalThis.DracoDecoderModule;
|
|
585
521
|
return await initializeDracoDecoder(DracoDecoderModule, wasmBinary);
|
|
586
522
|
}
|
|
587
|
-
|
|
588
523
|
function initializeDracoDecoder(DracoDecoderModule, wasmBinary) {
|
|
589
524
|
const options = {};
|
|
590
|
-
|
|
591
525
|
if (wasmBinary) {
|
|
592
526
|
options.wasmBinary = wasmBinary;
|
|
593
527
|
}
|
|
594
|
-
|
|
595
528
|
return new Promise(resolve => {
|
|
596
|
-
DracoDecoderModule({
|
|
529
|
+
DracoDecoderModule({
|
|
530
|
+
...options,
|
|
597
531
|
onModuleLoaded: draco => resolve({
|
|
598
532
|
draco
|
|
599
533
|
})
|
|
@@ -616,19 +550,21 @@ async function loadDracoEncoder(options) {
|
|
|
616
550
|
|
|
617
551
|
/***/ }),
|
|
618
552
|
|
|
619
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
620
|
-
|
|
621
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
622
|
-
|
|
553
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js":
|
|
554
|
+
/*!********************************************************************************************************************************!*\
|
|
555
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/draco-parser.js ***!
|
|
556
|
+
\********************************************************************************************************************************/
|
|
623
557
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
624
558
|
|
|
625
559
|
__webpack_require__.r(__webpack_exports__);
|
|
626
560
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
627
561
|
/* harmony export */ "default": () => (/* binding */ DracoParser)
|
|
628
562
|
/* harmony export */ });
|
|
629
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
630
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
631
|
-
/* harmony import */ var _utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/get-draco-schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
563
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.21.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
564
|
+
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js");
|
|
565
|
+
/* harmony import */ var _utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/get-draco-schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js");
|
|
566
|
+
|
|
567
|
+
|
|
632
568
|
|
|
633
569
|
|
|
634
570
|
|
|
@@ -636,6 +572,7 @@ const GEOMETRY_TYPE = {
|
|
|
636
572
|
TRIANGULAR_MESH: 0,
|
|
637
573
|
POINT_CLOUD: 1
|
|
638
574
|
};
|
|
575
|
+
|
|
639
576
|
const DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP = {
|
|
640
577
|
POSITION: 'POSITION',
|
|
641
578
|
NORMAL: 'NORMAL',
|
|
@@ -655,11 +592,8 @@ const INDEX_ITEM_SIZE = 4;
|
|
|
655
592
|
class DracoParser {
|
|
656
593
|
constructor(draco) {
|
|
657
594
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "draco", void 0);
|
|
658
|
-
|
|
659
595
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "decoder", void 0);
|
|
660
|
-
|
|
661
596
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadataQuerier", void 0);
|
|
662
|
-
|
|
663
597
|
this.draco = draco;
|
|
664
598
|
this.decoder = new this.draco.Decoder();
|
|
665
599
|
this.metadataQuerier = new this.draco.MetadataQuerier();
|
|
@@ -670,40 +604,31 @@ class DracoParser {
|
|
|
670
604
|
this.draco.destroy(this.metadataQuerier);
|
|
671
605
|
}
|
|
672
606
|
|
|
673
|
-
parseSync(arrayBuffer
|
|
607
|
+
parseSync(arrayBuffer) {
|
|
608
|
+
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
674
609
|
const buffer = new this.draco.DecoderBuffer();
|
|
675
610
|
buffer.Init(new Int8Array(arrayBuffer), arrayBuffer.byteLength);
|
|
676
|
-
|
|
677
611
|
this._disableAttributeTransforms(options);
|
|
678
|
-
|
|
679
612
|
const geometry_type = this.decoder.GetEncodedGeometryType(buffer);
|
|
680
613
|
const dracoGeometry = geometry_type === this.draco.TRIANGULAR_MESH ? new this.draco.Mesh() : new this.draco.PointCloud();
|
|
681
|
-
|
|
682
614
|
try {
|
|
683
615
|
let dracoStatus;
|
|
684
|
-
|
|
685
616
|
switch (geometry_type) {
|
|
686
617
|
case this.draco.TRIANGULAR_MESH:
|
|
687
618
|
dracoStatus = this.decoder.DecodeBufferToMesh(buffer, dracoGeometry);
|
|
688
619
|
break;
|
|
689
|
-
|
|
690
620
|
case this.draco.POINT_CLOUD:
|
|
691
621
|
dracoStatus = this.decoder.DecodeBufferToPointCloud(buffer, dracoGeometry);
|
|
692
622
|
break;
|
|
693
|
-
|
|
694
623
|
default:
|
|
695
624
|
throw new Error('DRACO: Unknown geometry type.');
|
|
696
625
|
}
|
|
697
|
-
|
|
698
626
|
if (!dracoStatus.ok() || !dracoGeometry.ptr) {
|
|
699
627
|
const message = "DRACO decompression failed: ".concat(dracoStatus.error_msg());
|
|
700
628
|
throw new Error(message);
|
|
701
629
|
}
|
|
702
|
-
|
|
703
630
|
const loaderData = this._getDracoLoaderData(dracoGeometry, geometry_type, options);
|
|
704
|
-
|
|
705
631
|
const geometry = this._getMeshData(dracoGeometry, loaderData, options);
|
|
706
|
-
|
|
707
632
|
const boundingBox = (0,_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__.getMeshBoundingBox)(geometry.attributes);
|
|
708
633
|
const schema = (0,_utils_get_draco_schema__WEBPACK_IMPORTED_MODULE_2__.getDracoSchema)(geometry.attributes, loaderData, geometry.indices);
|
|
709
634
|
const data = {
|
|
@@ -719,7 +644,6 @@ class DracoParser {
|
|
|
719
644
|
return data;
|
|
720
645
|
} finally {
|
|
721
646
|
this.draco.destroy(buffer);
|
|
722
|
-
|
|
723
647
|
if (dracoGeometry) {
|
|
724
648
|
this.draco.destroy(dracoGeometry);
|
|
725
649
|
}
|
|
@@ -728,9 +652,7 @@ class DracoParser {
|
|
|
728
652
|
|
|
729
653
|
_getDracoLoaderData(dracoGeometry, geometry_type, options) {
|
|
730
654
|
const metadata = this._getTopLevelMetadata(dracoGeometry);
|
|
731
|
-
|
|
732
655
|
const attributes = this._getDracoAttributes(dracoGeometry, options);
|
|
733
|
-
|
|
734
656
|
return {
|
|
735
657
|
geometry_type,
|
|
736
658
|
num_attributes: dracoGeometry.num_attributes(),
|
|
@@ -743,12 +665,9 @@ class DracoParser {
|
|
|
743
665
|
|
|
744
666
|
_getDracoAttributes(dracoGeometry, options) {
|
|
745
667
|
const dracoAttributes = {};
|
|
746
|
-
|
|
747
668
|
for (let attributeId = 0; attributeId < dracoGeometry.num_attributes(); attributeId++) {
|
|
748
669
|
const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attributeId);
|
|
749
|
-
|
|
750
670
|
const metadata = this._getAttributeMetadata(dracoGeometry, attributeId);
|
|
751
|
-
|
|
752
671
|
dracoAttributes[dracoAttribute.unique_id()] = {
|
|
753
672
|
unique_id: dracoAttribute.unique_id(),
|
|
754
673
|
attribute_type: dracoAttribute.attribute_type(),
|
|
@@ -762,26 +681,20 @@ class DracoParser {
|
|
|
762
681
|
};
|
|
763
682
|
|
|
764
683
|
const quantization = this._getQuantizationTransform(dracoAttribute, options);
|
|
765
|
-
|
|
766
684
|
if (quantization) {
|
|
767
685
|
dracoAttributes[dracoAttribute.unique_id()].quantization_transform = quantization;
|
|
768
686
|
}
|
|
769
|
-
|
|
770
687
|
const octahedron = this._getOctahedronTransform(dracoAttribute, options);
|
|
771
|
-
|
|
772
688
|
if (octahedron) {
|
|
773
689
|
dracoAttributes[dracoAttribute.unique_id()].octahedron_transform = octahedron;
|
|
774
690
|
}
|
|
775
691
|
}
|
|
776
|
-
|
|
777
692
|
return dracoAttributes;
|
|
778
693
|
}
|
|
779
694
|
|
|
780
695
|
_getMeshData(dracoGeometry, loaderData, options) {
|
|
781
696
|
const attributes = this._getMeshAttributes(loaderData, dracoGeometry, options);
|
|
782
|
-
|
|
783
697
|
const positionAttribute = attributes.POSITION;
|
|
784
|
-
|
|
785
698
|
if (!positionAttribute) {
|
|
786
699
|
throw new Error('DRACO: No position attribute found.');
|
|
787
700
|
}
|
|
@@ -798,7 +711,6 @@ class DracoParser {
|
|
|
798
711
|
size: 1
|
|
799
712
|
}
|
|
800
713
|
};
|
|
801
|
-
|
|
802
714
|
case 'triangle-list':
|
|
803
715
|
default:
|
|
804
716
|
return {
|
|
@@ -819,20 +731,15 @@ class DracoParser {
|
|
|
819
731
|
attributes
|
|
820
732
|
};
|
|
821
733
|
}
|
|
822
|
-
|
|
823
734
|
_getMeshAttributes(loaderData, dracoGeometry, options) {
|
|
824
735
|
const attributes = {};
|
|
825
|
-
|
|
826
736
|
for (const loaderAttribute of Object.values(loaderData.attributes)) {
|
|
827
737
|
const attributeName = this._deduceAttributeName(loaderAttribute, options);
|
|
828
|
-
|
|
829
738
|
loaderAttribute.name = attributeName;
|
|
830
|
-
|
|
831
739
|
const {
|
|
832
740
|
value,
|
|
833
741
|
size
|
|
834
742
|
} = this._getAttributeValues(dracoGeometry, loaderAttribute);
|
|
835
|
-
|
|
836
743
|
attributes[attributeName] = {
|
|
837
744
|
value,
|
|
838
745
|
size,
|
|
@@ -841,7 +748,6 @@ class DracoParser {
|
|
|
841
748
|
normalized: loaderAttribute.normalized
|
|
842
749
|
};
|
|
843
750
|
}
|
|
844
|
-
|
|
845
751
|
return attributes;
|
|
846
752
|
}
|
|
847
753
|
|
|
@@ -849,9 +755,7 @@ class DracoParser {
|
|
|
849
755
|
const numFaces = dracoGeometry.num_faces();
|
|
850
756
|
const numIndices = numFaces * 3;
|
|
851
757
|
const byteLength = numIndices * INDEX_ITEM_SIZE;
|
|
852
|
-
|
|
853
758
|
const ptr = this.draco._malloc(byteLength);
|
|
854
|
-
|
|
855
759
|
try {
|
|
856
760
|
this.decoder.GetTrianglesUInt32Array(dracoGeometry, byteLength, ptr);
|
|
857
761
|
return new Uint32Array(this.draco.HEAPF32.buffer, ptr, numIndices).slice();
|
|
@@ -862,7 +766,6 @@ class DracoParser {
|
|
|
862
766
|
|
|
863
767
|
_getTriangleStripIndices(dracoGeometry) {
|
|
864
768
|
const dracoArray = new this.draco.DracoInt32Array();
|
|
865
|
-
|
|
866
769
|
try {
|
|
867
770
|
this.decoder.GetTriangleStripsFromMesh(dracoGeometry, dracoArray);
|
|
868
771
|
return getUint32Array(dracoArray);
|
|
@@ -879,9 +782,7 @@ class DracoParser {
|
|
|
879
782
|
const byteLength = numValues * TypedArrayCtor.BYTES_PER_ELEMENT;
|
|
880
783
|
const dataType = getDracoDataType(this.draco, TypedArrayCtor);
|
|
881
784
|
let value;
|
|
882
|
-
|
|
883
785
|
const ptr = this.draco._malloc(byteLength);
|
|
884
|
-
|
|
885
786
|
try {
|
|
886
787
|
const dracoAttribute = this.decoder.GetAttribute(dracoGeometry, attribute.attribute_index);
|
|
887
788
|
this.decoder.GetAttributeDataArrayForAllPoints(dracoGeometry, dracoAttribute, dataType, byteLength, ptr);
|
|
@@ -889,7 +790,6 @@ class DracoParser {
|
|
|
889
790
|
} finally {
|
|
890
791
|
this.draco._free(ptr);
|
|
891
792
|
}
|
|
892
|
-
|
|
893
793
|
return {
|
|
894
794
|
value,
|
|
895
795
|
size: numComponents
|
|
@@ -898,7 +798,6 @@ class DracoParser {
|
|
|
898
798
|
|
|
899
799
|
_deduceAttributeName(attribute, options) {
|
|
900
800
|
const uniqueId = attribute.unique_id;
|
|
901
|
-
|
|
902
801
|
for (const [attributeName, attributeUniqueId] of Object.entries(options.extraAttributes || {})) {
|
|
903
802
|
if (attributeUniqueId === uniqueId) {
|
|
904
803
|
return attributeName;
|
|
@@ -906,17 +805,14 @@ class DracoParser {
|
|
|
906
805
|
}
|
|
907
806
|
|
|
908
807
|
const thisAttributeType = attribute.attribute_type;
|
|
909
|
-
|
|
910
808
|
for (const dracoAttributeConstant in DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP) {
|
|
911
809
|
const attributeType = this.draco[dracoAttributeConstant];
|
|
912
|
-
|
|
913
810
|
if (attributeType === thisAttributeType) {
|
|
914
811
|
return DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP[dracoAttributeConstant];
|
|
915
812
|
}
|
|
916
813
|
}
|
|
917
814
|
|
|
918
815
|
const entryName = options.attributeNameEntry || 'name';
|
|
919
|
-
|
|
920
816
|
if (attribute.metadata[entryName]) {
|
|
921
817
|
return attribute.metadata[entryName].string;
|
|
922
818
|
}
|
|
@@ -938,21 +834,17 @@ class DracoParser {
|
|
|
938
834
|
if (!dracoMetadata || !dracoMetadata.ptr) {
|
|
939
835
|
return {};
|
|
940
836
|
}
|
|
941
|
-
|
|
942
837
|
const result = {};
|
|
943
838
|
const numEntries = this.metadataQuerier.NumEntries(dracoMetadata);
|
|
944
|
-
|
|
945
839
|
for (let entryIndex = 0; entryIndex < numEntries; entryIndex++) {
|
|
946
840
|
const entryName = this.metadataQuerier.GetEntryName(dracoMetadata, entryIndex);
|
|
947
841
|
result[entryName] = this._getDracoMetadataField(dracoMetadata, entryName);
|
|
948
842
|
}
|
|
949
|
-
|
|
950
843
|
return result;
|
|
951
844
|
}
|
|
952
845
|
|
|
953
846
|
_getDracoMetadataField(dracoMetadata, entryName) {
|
|
954
847
|
const dracoArray = new this.draco.DracoInt32Array();
|
|
955
|
-
|
|
956
848
|
try {
|
|
957
849
|
this.metadataQuerier.GetIntEntryArray(dracoMetadata, entryName, dracoArray);
|
|
958
850
|
const intArray = getInt32Array(dracoArray);
|
|
@@ -973,7 +865,6 @@ class DracoParser {
|
|
|
973
865
|
octahedronAttributes = []
|
|
974
866
|
} = options;
|
|
975
867
|
const skipAttributes = [...quantizedAttributes, ...octahedronAttributes];
|
|
976
|
-
|
|
977
868
|
for (const dracoAttributeName of skipAttributes) {
|
|
978
869
|
this.decoder.SkipAttributeTransform(this.draco[dracoAttributeName]);
|
|
979
870
|
}
|
|
@@ -985,10 +876,8 @@ class DracoParser {
|
|
|
985
876
|
} = options;
|
|
986
877
|
const attribute_type = dracoAttribute.attribute_type();
|
|
987
878
|
const skip = quantizedAttributes.map(type => this.decoder[type]).includes(attribute_type);
|
|
988
|
-
|
|
989
879
|
if (skip) {
|
|
990
880
|
const transform = new this.draco.AttributeQuantizationTransform();
|
|
991
|
-
|
|
992
881
|
try {
|
|
993
882
|
if (transform.InitFromAttribute(dracoAttribute)) {
|
|
994
883
|
return {
|
|
@@ -1001,20 +890,16 @@ class DracoParser {
|
|
|
1001
890
|
this.draco.destroy(transform);
|
|
1002
891
|
}
|
|
1003
892
|
}
|
|
1004
|
-
|
|
1005
893
|
return null;
|
|
1006
894
|
}
|
|
1007
|
-
|
|
1008
895
|
_getOctahedronTransform(dracoAttribute, options) {
|
|
1009
896
|
const {
|
|
1010
897
|
octahedronAttributes = []
|
|
1011
898
|
} = options;
|
|
1012
899
|
const attribute_type = dracoAttribute.attribute_type();
|
|
1013
900
|
const octahedron = octahedronAttributes.map(type => this.decoder[type]).includes(attribute_type);
|
|
1014
|
-
|
|
1015
901
|
if (octahedron) {
|
|
1016
902
|
const transform = new this.draco.AttributeQuantizationTransform();
|
|
1017
|
-
|
|
1018
903
|
try {
|
|
1019
904
|
if (transform.InitFromAttribute(dracoAttribute)) {
|
|
1020
905
|
return {
|
|
@@ -1025,7 +910,6 @@ class DracoParser {
|
|
|
1025
910
|
this.draco.destroy(transform);
|
|
1026
911
|
}
|
|
1027
912
|
}
|
|
1028
|
-
|
|
1029
913
|
return null;
|
|
1030
914
|
}
|
|
1031
915
|
|
|
@@ -1035,25 +919,18 @@ function getDracoDataType(draco, attributeType) {
|
|
|
1035
919
|
switch (attributeType) {
|
|
1036
920
|
case Float32Array:
|
|
1037
921
|
return draco.DT_FLOAT32;
|
|
1038
|
-
|
|
1039
922
|
case Int8Array:
|
|
1040
923
|
return draco.DT_INT8;
|
|
1041
|
-
|
|
1042
924
|
case Int16Array:
|
|
1043
925
|
return draco.DT_INT16;
|
|
1044
|
-
|
|
1045
926
|
case Int32Array:
|
|
1046
927
|
return draco.DT_INT32;
|
|
1047
|
-
|
|
1048
928
|
case Uint8Array:
|
|
1049
929
|
return draco.DT_UINT8;
|
|
1050
|
-
|
|
1051
930
|
case Uint16Array:
|
|
1052
931
|
return draco.DT_UINT16;
|
|
1053
|
-
|
|
1054
932
|
case Uint32Array:
|
|
1055
933
|
return draco.DT_UINT32;
|
|
1056
|
-
|
|
1057
934
|
default:
|
|
1058
935
|
return draco.DT_INVALID;
|
|
1059
936
|
}
|
|
@@ -1062,110 +939,97 @@ function getDracoDataType(draco, attributeType) {
|
|
|
1062
939
|
function getInt32Array(dracoArray) {
|
|
1063
940
|
const numValues = dracoArray.size();
|
|
1064
941
|
const intArray = new Int32Array(numValues);
|
|
1065
|
-
|
|
1066
942
|
for (let i = 0; i < numValues; i++) {
|
|
1067
943
|
intArray[i] = dracoArray.GetValue(i);
|
|
1068
944
|
}
|
|
1069
|
-
|
|
1070
945
|
return intArray;
|
|
1071
946
|
}
|
|
1072
947
|
|
|
1073
948
|
function getUint32Array(dracoArray) {
|
|
1074
949
|
const numValues = dracoArray.size();
|
|
1075
950
|
const intArray = new Int32Array(numValues);
|
|
1076
|
-
|
|
1077
951
|
for (let i = 0; i < numValues; i++) {
|
|
1078
952
|
intArray[i] = dracoArray.GetValue(i);
|
|
1079
953
|
}
|
|
1080
|
-
|
|
1081
954
|
return intArray;
|
|
1082
955
|
}
|
|
1083
956
|
|
|
1084
957
|
|
|
1085
958
|
/***/ }),
|
|
1086
959
|
|
|
1087
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
1088
|
-
|
|
1089
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
1090
|
-
|
|
960
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js":
|
|
961
|
+
/*!******************************************************************************************************************************************!*\
|
|
962
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/get-draco-schema.js ***!
|
|
963
|
+
\******************************************************************************************************************************************/
|
|
1091
964
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1092
965
|
|
|
1093
966
|
__webpack_require__.r(__webpack_exports__);
|
|
1094
967
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1095
968
|
/* harmony export */ "getDracoSchema": () => (/* binding */ getDracoSchema)
|
|
1096
969
|
/* harmony export */ });
|
|
1097
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1098
|
-
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
970
|
+
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js");
|
|
971
|
+
/* harmony import */ var _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @loaders.gl/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js");
|
|
1099
972
|
|
|
1100
973
|
|
|
1101
974
|
function getDracoSchema(attributes, loaderData, indices) {
|
|
1102
975
|
const metadataMap = makeMetadata(loaderData.metadata);
|
|
1103
976
|
const fields = [];
|
|
1104
977
|
const namedLoaderDataAttributes = transformAttributesLoaderData(loaderData.attributes);
|
|
1105
|
-
|
|
1106
978
|
for (const attributeName in attributes) {
|
|
1107
979
|
const attribute = attributes[attributeName];
|
|
1108
980
|
const field = getArrowFieldFromAttribute(attributeName, attribute, namedLoaderDataAttributes[attributeName]);
|
|
1109
981
|
fields.push(field);
|
|
1110
982
|
}
|
|
1111
|
-
|
|
1112
983
|
if (indices) {
|
|
1113
984
|
const indicesField = getArrowFieldFromAttribute('indices', indices);
|
|
1114
985
|
fields.push(indicesField);
|
|
1115
986
|
}
|
|
1116
|
-
|
|
1117
987
|
return new _loaders_gl_schema__WEBPACK_IMPORTED_MODULE_0__["default"](fields, metadataMap);
|
|
1118
988
|
}
|
|
1119
|
-
|
|
1120
989
|
function transformAttributesLoaderData(loaderData) {
|
|
1121
990
|
const result = {};
|
|
1122
|
-
|
|
1123
991
|
for (const key in loaderData) {
|
|
1124
992
|
const dracoAttribute = loaderData[key];
|
|
1125
993
|
result[dracoAttribute.name || 'undefined'] = dracoAttribute;
|
|
1126
994
|
}
|
|
1127
|
-
|
|
1128
995
|
return result;
|
|
1129
996
|
}
|
|
1130
|
-
|
|
1131
997
|
function getArrowFieldFromAttribute(attributeName, attribute, loaderData) {
|
|
1132
998
|
const metadataMap = loaderData ? makeMetadata(loaderData.metadata) : undefined;
|
|
1133
999
|
const field = (0,_loaders_gl_schema__WEBPACK_IMPORTED_MODULE_1__.deduceMeshField)(attributeName, attribute, metadataMap);
|
|
1134
1000
|
return field;
|
|
1135
1001
|
}
|
|
1136
|
-
|
|
1137
1002
|
function makeMetadata(metadata) {
|
|
1138
1003
|
const metadataMap = new Map();
|
|
1139
|
-
|
|
1140
1004
|
for (const key in metadata) {
|
|
1141
1005
|
metadataMap.set("".concat(key, ".string"), JSON.stringify(metadata[key]));
|
|
1142
1006
|
}
|
|
1143
|
-
|
|
1144
1007
|
return metadataMap;
|
|
1145
1008
|
}
|
|
1146
1009
|
|
|
1147
1010
|
|
|
1148
1011
|
/***/ }),
|
|
1149
1012
|
|
|
1150
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
1151
|
-
|
|
1152
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.
|
|
1153
|
-
|
|
1013
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js":
|
|
1014
|
+
/*!*********************************************************************************************************************************!*\
|
|
1015
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.3.1/node_modules/@loaders.gl/draco/dist/esm/lib/utils/version.js ***!
|
|
1016
|
+
\*********************************************************************************************************************************/
|
|
1154
1017
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1155
1018
|
|
|
1156
1019
|
__webpack_require__.r(__webpack_exports__);
|
|
1157
1020
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1158
1021
|
/* harmony export */ "VERSION": () => (/* binding */ VERSION)
|
|
1159
1022
|
/* harmony export */ });
|
|
1160
|
-
|
|
1023
|
+
|
|
1024
|
+
const VERSION = true ? "3.3.1" : 0;
|
|
1161
1025
|
|
|
1162
1026
|
|
|
1163
1027
|
/***/ }),
|
|
1164
1028
|
|
|
1165
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1166
|
-
|
|
1167
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1168
|
-
|
|
1029
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js":
|
|
1030
|
+
/*!**************************************************************************************************************************************************!*\
|
|
1031
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/category/mesh/deduce-mesh-schema.js ***!
|
|
1032
|
+
\**************************************************************************************************************************************************/
|
|
1169
1033
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1170
1034
|
|
|
1171
1035
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -1174,16 +1038,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1174
1038
|
/* harmony export */ "deduceMeshSchema": () => (/* binding */ deduceMeshSchema),
|
|
1175
1039
|
/* harmony export */ "makeMeshAttributeMetadata": () => (/* binding */ makeMeshAttributeMetadata)
|
|
1176
1040
|
/* harmony export */ });
|
|
1177
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1178
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1179
|
-
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1180
|
-
/* harmony import */ var _lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/arrow/arrow-like-type-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1041
|
+
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js");
|
|
1042
|
+
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js");
|
|
1043
|
+
/* harmony import */ var _lib_schema_schema__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../lib/schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js");
|
|
1044
|
+
/* harmony import */ var _lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../lib/arrow/arrow-like-type-utils */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js");
|
|
1045
|
+
|
|
1181
1046
|
|
|
1182
1047
|
|
|
1183
1048
|
function deduceMeshSchema(attributes, metadata) {
|
|
1184
1049
|
const fields = deduceMeshFields(attributes);
|
|
1185
1050
|
return new _lib_schema_schema__WEBPACK_IMPORTED_MODULE_0__["default"](fields, metadata);
|
|
1186
1051
|
}
|
|
1052
|
+
|
|
1187
1053
|
function deduceMeshField(attributeName, attribute, optionalMetadata) {
|
|
1188
1054
|
const type = (0,_lib_arrow_arrow_like_type_utils__WEBPACK_IMPORTED_MODULE_1__.getArrowTypeFromTypedArray)(attribute.value);
|
|
1189
1055
|
const metadata = optionalMetadata ? optionalMetadata : makeMeshAttributeMetadata(attribute);
|
|
@@ -1193,40 +1059,34 @@ function deduceMeshField(attributeName, attribute, optionalMetadata) {
|
|
|
1193
1059
|
|
|
1194
1060
|
function deduceMeshFields(attributes) {
|
|
1195
1061
|
const fields = [];
|
|
1196
|
-
|
|
1197
1062
|
for (const attributeName in attributes) {
|
|
1198
1063
|
const attribute = attributes[attributeName];
|
|
1199
1064
|
fields.push(deduceMeshField(attributeName, attribute));
|
|
1200
1065
|
}
|
|
1201
|
-
|
|
1202
1066
|
return fields;
|
|
1203
1067
|
}
|
|
1204
1068
|
|
|
1205
1069
|
function makeMeshAttributeMetadata(attribute) {
|
|
1206
1070
|
const result = new Map();
|
|
1207
|
-
|
|
1208
1071
|
if ('byteOffset' in attribute) {
|
|
1209
1072
|
result.set('byteOffset', attribute.byteOffset.toString(10));
|
|
1210
1073
|
}
|
|
1211
|
-
|
|
1212
1074
|
if ('byteStride' in attribute) {
|
|
1213
1075
|
result.set('byteStride', attribute.byteStride.toString(10));
|
|
1214
1076
|
}
|
|
1215
|
-
|
|
1216
1077
|
if ('normalized' in attribute) {
|
|
1217
1078
|
result.set('normalized', attribute.normalized.toString());
|
|
1218
1079
|
}
|
|
1219
|
-
|
|
1220
1080
|
return result;
|
|
1221
1081
|
}
|
|
1222
1082
|
|
|
1223
1083
|
|
|
1224
1084
|
/***/ }),
|
|
1225
1085
|
|
|
1226
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1227
|
-
|
|
1228
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1229
|
-
|
|
1086
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js":
|
|
1087
|
+
/*!******************************************************************************************************************************************!*\
|
|
1088
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/category/mesh/mesh-utils.js ***!
|
|
1089
|
+
\******************************************************************************************************************************************/
|
|
1230
1090
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1231
1091
|
|
|
1232
1092
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -1234,19 +1094,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1234
1094
|
/* harmony export */ "getMeshBoundingBox": () => (/* binding */ getMeshBoundingBox),
|
|
1235
1095
|
/* harmony export */ "getMeshSize": () => (/* binding */ getMeshSize)
|
|
1236
1096
|
/* harmony export */ });
|
|
1097
|
+
|
|
1098
|
+
|
|
1237
1099
|
function getMeshSize(attributes) {
|
|
1238
1100
|
let size = 0;
|
|
1239
|
-
|
|
1240
1101
|
for (const attributeName in attributes) {
|
|
1241
1102
|
const attribute = attributes[attributeName];
|
|
1242
|
-
|
|
1243
1103
|
if (ArrayBuffer.isView(attribute)) {
|
|
1244
1104
|
size += attribute.byteLength * attribute.BYTES_PER_ELEMENT;
|
|
1245
1105
|
}
|
|
1246
1106
|
}
|
|
1247
|
-
|
|
1248
1107
|
return size;
|
|
1249
1108
|
}
|
|
1109
|
+
|
|
1250
1110
|
function getMeshBoundingBox(attributes) {
|
|
1251
1111
|
let minX = Infinity;
|
|
1252
1112
|
let minY = Infinity;
|
|
@@ -1256,7 +1116,6 @@ function getMeshBoundingBox(attributes) {
|
|
|
1256
1116
|
let maxZ = -Infinity;
|
|
1257
1117
|
const positions = attributes.POSITION ? attributes.POSITION.value : [];
|
|
1258
1118
|
const len = positions && positions.length;
|
|
1259
|
-
|
|
1260
1119
|
for (let i = 0; i < len; i += 3) {
|
|
1261
1120
|
const x = positions[i];
|
|
1262
1121
|
const y = positions[i + 1];
|
|
@@ -1268,51 +1127,42 @@ function getMeshBoundingBox(attributes) {
|
|
|
1268
1127
|
maxY = y > maxY ? y : maxY;
|
|
1269
1128
|
maxZ = z > maxZ ? z : maxZ;
|
|
1270
1129
|
}
|
|
1271
|
-
|
|
1272
1130
|
return [[minX, minY, minZ], [maxX, maxY, maxZ]];
|
|
1273
1131
|
}
|
|
1274
1132
|
|
|
1275
1133
|
|
|
1276
1134
|
/***/ }),
|
|
1277
1135
|
|
|
1278
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1279
|
-
|
|
1280
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1281
|
-
|
|
1136
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js":
|
|
1137
|
+
/*!*************************************************************************************************************************************************!*\
|
|
1138
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/arrow/arrow-like-type-utils.js ***!
|
|
1139
|
+
\*************************************************************************************************************************************************/
|
|
1282
1140
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1283
1141
|
|
|
1284
1142
|
__webpack_require__.r(__webpack_exports__);
|
|
1285
1143
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1286
1144
|
/* harmony export */ "getArrowTypeFromTypedArray": () => (/* binding */ getArrowTypeFromTypedArray)
|
|
1287
1145
|
/* harmony export */ });
|
|
1288
|
-
/* harmony import */ var _schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1146
|
+
/* harmony import */ var _schema_schema__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../schema/schema */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js");
|
|
1289
1147
|
|
|
1290
1148
|
function getArrowTypeFromTypedArray(array) {
|
|
1291
1149
|
switch (array.constructor) {
|
|
1292
1150
|
case Int8Array:
|
|
1293
1151
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int8();
|
|
1294
|
-
|
|
1295
1152
|
case Uint8Array:
|
|
1296
1153
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint8();
|
|
1297
|
-
|
|
1298
1154
|
case Int16Array:
|
|
1299
1155
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int16();
|
|
1300
|
-
|
|
1301
1156
|
case Uint16Array:
|
|
1302
1157
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint16();
|
|
1303
|
-
|
|
1304
1158
|
case Int32Array:
|
|
1305
1159
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Int32();
|
|
1306
|
-
|
|
1307
1160
|
case Uint32Array:
|
|
1308
1161
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Uint32();
|
|
1309
|
-
|
|
1310
1162
|
case Float32Array:
|
|
1311
1163
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Float32();
|
|
1312
|
-
|
|
1313
1164
|
case Float64Array:
|
|
1314
1165
|
return new _schema_schema__WEBPACK_IMPORTED_MODULE_0__.Float64();
|
|
1315
|
-
|
|
1316
1166
|
default:
|
|
1317
1167
|
throw new Error('array type not supported');
|
|
1318
1168
|
}
|
|
@@ -1321,18 +1171,19 @@ function getArrowTypeFromTypedArray(array) {
|
|
|
1321
1171
|
|
|
1322
1172
|
/***/ }),
|
|
1323
1173
|
|
|
1324
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1325
|
-
|
|
1326
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1327
|
-
|
|
1174
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js":
|
|
1175
|
+
/*!**************************************************************************************************************************************!*\
|
|
1176
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js ***!
|
|
1177
|
+
\**************************************************************************************************************************************/
|
|
1328
1178
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1329
1179
|
|
|
1330
1180
|
__webpack_require__.r(__webpack_exports__);
|
|
1331
1181
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1332
1182
|
/* harmony export */ "Type": () => (/* binding */ Type)
|
|
1333
1183
|
/* harmony export */ });
|
|
1334
|
-
let Type;
|
|
1335
1184
|
|
|
1185
|
+
|
|
1186
|
+
let Type;
|
|
1336
1187
|
(function (Type) {
|
|
1337
1188
|
Type[Type["NONE"] = 0] = "NONE";
|
|
1338
1189
|
Type[Type["Null"] = 1] = "Null";
|
|
@@ -1383,75 +1234,67 @@ let Type;
|
|
|
1383
1234
|
|
|
1384
1235
|
/***/ }),
|
|
1385
1236
|
|
|
1386
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1387
|
-
|
|
1388
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1389
|
-
|
|
1237
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js":
|
|
1238
|
+
/*!***************************************************************************************************************************************!*\
|
|
1239
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/field.js ***!
|
|
1240
|
+
\***************************************************************************************************************************************/
|
|
1390
1241
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1391
1242
|
|
|
1392
1243
|
__webpack_require__.r(__webpack_exports__);
|
|
1393
1244
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1394
1245
|
/* harmony export */ "default": () => (/* binding */ Field)
|
|
1395
1246
|
/* harmony export */ });
|
|
1396
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
1247
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.21.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1397
1248
|
|
|
1398
1249
|
class Field {
|
|
1399
|
-
constructor(name, type
|
|
1250
|
+
constructor(name, type) {
|
|
1251
|
+
let nullable = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
1252
|
+
let metadata = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new Map();
|
|
1400
1253
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "name", void 0);
|
|
1401
|
-
|
|
1402
1254
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "type", void 0);
|
|
1403
|
-
|
|
1404
1255
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "nullable", void 0);
|
|
1405
|
-
|
|
1406
1256
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
|
|
1407
|
-
|
|
1408
1257
|
this.name = name;
|
|
1409
1258
|
this.type = type;
|
|
1410
1259
|
this.nullable = nullable;
|
|
1411
1260
|
this.metadata = metadata;
|
|
1412
1261
|
}
|
|
1413
|
-
|
|
1414
1262
|
get typeId() {
|
|
1415
1263
|
return this.type && this.type.typeId;
|
|
1416
1264
|
}
|
|
1417
|
-
|
|
1418
1265
|
clone() {
|
|
1419
1266
|
return new Field(this.name, this.type, this.nullable, this.metadata);
|
|
1420
1267
|
}
|
|
1421
|
-
|
|
1422
1268
|
compareTo(other) {
|
|
1423
1269
|
return this.name === other.name && this.type === other.type && this.nullable === other.nullable && this.metadata === other.metadata;
|
|
1424
1270
|
}
|
|
1425
|
-
|
|
1426
1271
|
toString() {
|
|
1427
1272
|
return "".concat(this.type).concat(this.nullable ? ', nullable' : '').concat(this.metadata ? ", metadata: ".concat(this.metadata) : '');
|
|
1428
1273
|
}
|
|
1429
|
-
|
|
1430
1274
|
}
|
|
1431
1275
|
|
|
1432
1276
|
|
|
1433
1277
|
/***/ }),
|
|
1434
1278
|
|
|
1435
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1436
|
-
|
|
1437
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1438
|
-
|
|
1279
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js":
|
|
1280
|
+
/*!****************************************************************************************************************************************!*\
|
|
1281
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/schema.js ***!
|
|
1282
|
+
\****************************************************************************************************************************************/
|
|
1439
1283
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1440
1284
|
|
|
1441
1285
|
__webpack_require__.r(__webpack_exports__);
|
|
1442
1286
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1443
1287
|
/* harmony export */ "default": () => (/* binding */ Schema)
|
|
1444
1288
|
/* harmony export */ });
|
|
1445
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
1446
|
-
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1289
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.21.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1290
|
+
/* harmony import */ var _utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js");
|
|
1447
1291
|
|
|
1448
1292
|
|
|
1449
1293
|
class Schema {
|
|
1294
|
+
|
|
1450
1295
|
constructor(fields, metadata) {
|
|
1451
1296
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "fields", void 0);
|
|
1452
|
-
|
|
1453
1297
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "metadata", void 0);
|
|
1454
|
-
|
|
1455
1298
|
(0,_utils_assert__WEBPACK_IMPORTED_MODULE_1__.assert)(Array.isArray(fields));
|
|
1456
1299
|
checkNames(fields);
|
|
1457
1300
|
this.fields = fields;
|
|
@@ -1462,40 +1305,37 @@ class Schema {
|
|
|
1462
1305
|
if (this.metadata !== other.metadata) {
|
|
1463
1306
|
return false;
|
|
1464
1307
|
}
|
|
1465
|
-
|
|
1466
1308
|
if (this.fields.length !== other.fields.length) {
|
|
1467
1309
|
return false;
|
|
1468
1310
|
}
|
|
1469
|
-
|
|
1470
1311
|
for (let i = 0; i < this.fields.length; ++i) {
|
|
1471
1312
|
if (!this.fields[i].compareTo(other.fields[i])) {
|
|
1472
1313
|
return false;
|
|
1473
1314
|
}
|
|
1474
1315
|
}
|
|
1475
|
-
|
|
1476
1316
|
return true;
|
|
1477
1317
|
}
|
|
1478
|
-
|
|
1479
|
-
select(...columnNames) {
|
|
1318
|
+
select() {
|
|
1480
1319
|
const nameMap = Object.create(null);
|
|
1481
|
-
|
|
1320
|
+
for (var _len = arguments.length, columnNames = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1321
|
+
columnNames[_key] = arguments[_key];
|
|
1322
|
+
}
|
|
1482
1323
|
for (const name of columnNames) {
|
|
1483
1324
|
nameMap[name] = true;
|
|
1484
1325
|
}
|
|
1485
|
-
|
|
1486
1326
|
const selectedFields = this.fields.filter(field => nameMap[field.name]);
|
|
1487
1327
|
return new Schema(selectedFields, this.metadata);
|
|
1488
1328
|
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1329
|
+
selectAt() {
|
|
1330
|
+
for (var _len2 = arguments.length, columnIndices = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1331
|
+
columnIndices[_key2] = arguments[_key2];
|
|
1332
|
+
}
|
|
1491
1333
|
const selectedFields = columnIndices.map(index => this.fields[index]).filter(Boolean);
|
|
1492
1334
|
return new Schema(selectedFields, this.metadata);
|
|
1493
1335
|
}
|
|
1494
|
-
|
|
1495
1336
|
assign(schemaOrFields) {
|
|
1496
1337
|
let fields;
|
|
1497
1338
|
let metadata = this.metadata;
|
|
1498
|
-
|
|
1499
1339
|
if (schemaOrFields instanceof Schema) {
|
|
1500
1340
|
const otherSchema = schemaOrFields;
|
|
1501
1341
|
fields = otherSchema.fields;
|
|
@@ -1505,33 +1345,26 @@ class Schema {
|
|
|
1505
1345
|
}
|
|
1506
1346
|
|
|
1507
1347
|
const fieldMap = Object.create(null);
|
|
1508
|
-
|
|
1509
1348
|
for (const field of this.fields) {
|
|
1510
1349
|
fieldMap[field.name] = field;
|
|
1511
1350
|
}
|
|
1512
|
-
|
|
1513
1351
|
for (const field of fields) {
|
|
1514
1352
|
fieldMap[field.name] = field;
|
|
1515
1353
|
}
|
|
1516
|
-
|
|
1517
1354
|
const mergedFields = Object.values(fieldMap);
|
|
1518
1355
|
return new Schema(mergedFields, metadata);
|
|
1519
1356
|
}
|
|
1520
|
-
|
|
1521
1357
|
}
|
|
1522
1358
|
|
|
1523
1359
|
function checkNames(fields) {
|
|
1524
1360
|
const usedNames = {};
|
|
1525
|
-
|
|
1526
1361
|
for (const field of fields) {
|
|
1527
1362
|
if (usedNames[field.name]) {
|
|
1528
1363
|
console.warn('Schema: duplicated field name', field.name, field);
|
|
1529
1364
|
}
|
|
1530
|
-
|
|
1531
1365
|
usedNames[field.name] = true;
|
|
1532
1366
|
}
|
|
1533
1367
|
}
|
|
1534
|
-
|
|
1535
1368
|
function mergeMaps(m1, m2) {
|
|
1536
1369
|
return new Map([...(m1 || new Map()), ...(m2 || new Map())]);
|
|
1537
1370
|
}
|
|
@@ -1539,10 +1372,10 @@ function mergeMaps(m1, m2) {
|
|
|
1539
1372
|
|
|
1540
1373
|
/***/ }),
|
|
1541
1374
|
|
|
1542
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1543
|
-
|
|
1544
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1545
|
-
|
|
1375
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js":
|
|
1376
|
+
/*!**************************************************************************************************************************************!*\
|
|
1377
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/type.js ***!
|
|
1378
|
+
\**************************************************************************************************************************************/
|
|
1546
1379
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1547
1380
|
|
|
1548
1381
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -1583,9 +1416,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1583
1416
|
/* harmony export */ "Uint8": () => (/* binding */ Uint8),
|
|
1584
1417
|
/* harmony export */ "Utf8": () => (/* binding */ Utf8)
|
|
1585
1418
|
/* harmony export */ });
|
|
1586
|
-
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.
|
|
1587
|
-
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
1588
|
-
|
|
1419
|
+
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "../../common/temp/node_modules/.pnpm/@babel+runtime@7.21.0/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
1420
|
+
/* harmony import */ var _enum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./enum */ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/schema/impl/enum.js");
|
|
1589
1421
|
|
|
1590
1422
|
let _Symbol$toStringTag, _Symbol$toStringTag2, _Symbol$toStringTag3, _Symbol$toStringTag4, _Symbol$toStringTag5, _Symbol$toStringTag6, _Symbol$toStringTag7, _Symbol$toStringTag8;
|
|
1591
1423
|
|
|
@@ -1595,75 +1427,57 @@ class DataType {
|
|
|
1595
1427
|
static isNull(x) {
|
|
1596
1428
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Null;
|
|
1597
1429
|
}
|
|
1598
|
-
|
|
1599
1430
|
static isInt(x) {
|
|
1600
1431
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Int;
|
|
1601
1432
|
}
|
|
1602
|
-
|
|
1603
1433
|
static isFloat(x) {
|
|
1604
1434
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Float;
|
|
1605
1435
|
}
|
|
1606
|
-
|
|
1607
1436
|
static isBinary(x) {
|
|
1608
1437
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Binary;
|
|
1609
1438
|
}
|
|
1610
|
-
|
|
1611
1439
|
static isUtf8(x) {
|
|
1612
1440
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Utf8;
|
|
1613
1441
|
}
|
|
1614
|
-
|
|
1615
1442
|
static isBool(x) {
|
|
1616
1443
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Bool;
|
|
1617
1444
|
}
|
|
1618
|
-
|
|
1619
1445
|
static isDecimal(x) {
|
|
1620
1446
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Decimal;
|
|
1621
1447
|
}
|
|
1622
|
-
|
|
1623
1448
|
static isDate(x) {
|
|
1624
1449
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Date;
|
|
1625
1450
|
}
|
|
1626
|
-
|
|
1627
1451
|
static isTime(x) {
|
|
1628
1452
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Time;
|
|
1629
1453
|
}
|
|
1630
|
-
|
|
1631
1454
|
static isTimestamp(x) {
|
|
1632
1455
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Timestamp;
|
|
1633
1456
|
}
|
|
1634
|
-
|
|
1635
1457
|
static isInterval(x) {
|
|
1636
1458
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Interval;
|
|
1637
1459
|
}
|
|
1638
|
-
|
|
1639
1460
|
static isList(x) {
|
|
1640
1461
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.List;
|
|
1641
1462
|
}
|
|
1642
|
-
|
|
1643
1463
|
static isStruct(x) {
|
|
1644
1464
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Struct;
|
|
1645
1465
|
}
|
|
1646
|
-
|
|
1647
1466
|
static isUnion(x) {
|
|
1648
1467
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Union;
|
|
1649
1468
|
}
|
|
1650
|
-
|
|
1651
1469
|
static isFixedSizeBinary(x) {
|
|
1652
1470
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeBinary;
|
|
1653
1471
|
}
|
|
1654
|
-
|
|
1655
1472
|
static isFixedSizeList(x) {
|
|
1656
1473
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeList;
|
|
1657
1474
|
}
|
|
1658
|
-
|
|
1659
1475
|
static isMap(x) {
|
|
1660
1476
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Map;
|
|
1661
1477
|
}
|
|
1662
|
-
|
|
1663
1478
|
static isDictionary(x) {
|
|
1664
1479
|
return x && x.typeId === _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Dictionary;
|
|
1665
1480
|
}
|
|
1666
|
-
|
|
1667
1481
|
get typeId() {
|
|
1668
1482
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.NONE;
|
|
1669
1483
|
}
|
|
@@ -1671,110 +1485,93 @@ class DataType {
|
|
|
1671
1485
|
compareTo(other) {
|
|
1672
1486
|
return this === other;
|
|
1673
1487
|
}
|
|
1674
|
-
|
|
1675
1488
|
}
|
|
1489
|
+
|
|
1676
1490
|
class Null extends DataType {
|
|
1677
1491
|
get typeId() {
|
|
1678
1492
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Null;
|
|
1679
1493
|
}
|
|
1680
|
-
|
|
1681
1494
|
get [Symbol.toStringTag]() {
|
|
1682
1495
|
return 'Null';
|
|
1683
1496
|
}
|
|
1684
|
-
|
|
1685
1497
|
toString() {
|
|
1686
1498
|
return 'Null';
|
|
1687
1499
|
}
|
|
1688
|
-
|
|
1689
1500
|
}
|
|
1501
|
+
|
|
1690
1502
|
class Bool extends DataType {
|
|
1691
1503
|
get typeId() {
|
|
1692
1504
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Bool;
|
|
1693
1505
|
}
|
|
1694
|
-
|
|
1695
1506
|
get [Symbol.toStringTag]() {
|
|
1696
1507
|
return 'Bool';
|
|
1697
1508
|
}
|
|
1698
|
-
|
|
1699
1509
|
toString() {
|
|
1700
1510
|
return 'Bool';
|
|
1701
1511
|
}
|
|
1702
|
-
|
|
1703
1512
|
}
|
|
1513
|
+
|
|
1704
1514
|
_Symbol$toStringTag = Symbol.toStringTag;
|
|
1515
|
+
|
|
1705
1516
|
class Int extends DataType {
|
|
1706
1517
|
constructor(isSigned, bitWidth) {
|
|
1707
1518
|
super();
|
|
1708
|
-
|
|
1709
1519
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "isSigned", void 0);
|
|
1710
|
-
|
|
1711
1520
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
|
|
1712
|
-
|
|
1713
1521
|
this.isSigned = isSigned;
|
|
1714
1522
|
this.bitWidth = bitWidth;
|
|
1715
1523
|
}
|
|
1716
|
-
|
|
1717
1524
|
get typeId() {
|
|
1718
1525
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Int;
|
|
1719
1526
|
}
|
|
1720
|
-
|
|
1721
1527
|
get [_Symbol$toStringTag]() {
|
|
1722
1528
|
return 'Int';
|
|
1723
1529
|
}
|
|
1724
|
-
|
|
1725
1530
|
toString() {
|
|
1726
1531
|
return "".concat(this.isSigned ? 'I' : 'Ui', "nt").concat(this.bitWidth);
|
|
1727
1532
|
}
|
|
1728
|
-
|
|
1729
1533
|
}
|
|
1730
1534
|
class Int8 extends Int {
|
|
1731
1535
|
constructor() {
|
|
1732
1536
|
super(true, 8);
|
|
1733
1537
|
}
|
|
1734
|
-
|
|
1735
1538
|
}
|
|
1736
1539
|
class Int16 extends Int {
|
|
1737
1540
|
constructor() {
|
|
1738
1541
|
super(true, 16);
|
|
1739
1542
|
}
|
|
1740
|
-
|
|
1741
1543
|
}
|
|
1742
1544
|
class Int32 extends Int {
|
|
1743
1545
|
constructor() {
|
|
1744
1546
|
super(true, 32);
|
|
1745
1547
|
}
|
|
1746
|
-
|
|
1747
1548
|
}
|
|
1748
1549
|
class Int64 extends Int {
|
|
1749
1550
|
constructor() {
|
|
1750
1551
|
super(true, 64);
|
|
1751
1552
|
}
|
|
1752
|
-
|
|
1753
1553
|
}
|
|
1754
1554
|
class Uint8 extends Int {
|
|
1755
1555
|
constructor() {
|
|
1756
1556
|
super(false, 8);
|
|
1757
1557
|
}
|
|
1758
|
-
|
|
1759
1558
|
}
|
|
1760
1559
|
class Uint16 extends Int {
|
|
1761
1560
|
constructor() {
|
|
1762
1561
|
super(false, 16);
|
|
1763
1562
|
}
|
|
1764
|
-
|
|
1765
1563
|
}
|
|
1766
1564
|
class Uint32 extends Int {
|
|
1767
1565
|
constructor() {
|
|
1768
1566
|
super(false, 32);
|
|
1769
1567
|
}
|
|
1770
|
-
|
|
1771
1568
|
}
|
|
1772
1569
|
class Uint64 extends Int {
|
|
1773
1570
|
constructor() {
|
|
1774
1571
|
super(false, 64);
|
|
1775
1572
|
}
|
|
1776
|
-
|
|
1777
1573
|
}
|
|
1574
|
+
|
|
1778
1575
|
const Precision = {
|
|
1779
1576
|
HALF: 16,
|
|
1780
1577
|
SINGLE: 32,
|
|
@@ -1784,75 +1581,61 @@ _Symbol$toStringTag2 = Symbol.toStringTag;
|
|
|
1784
1581
|
class Float extends DataType {
|
|
1785
1582
|
constructor(precision) {
|
|
1786
1583
|
super();
|
|
1787
|
-
|
|
1788
1584
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "precision", void 0);
|
|
1789
|
-
|
|
1790
1585
|
this.precision = precision;
|
|
1791
1586
|
}
|
|
1792
|
-
|
|
1793
1587
|
get typeId() {
|
|
1794
1588
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Float;
|
|
1795
1589
|
}
|
|
1796
|
-
|
|
1797
1590
|
get [_Symbol$toStringTag2]() {
|
|
1798
1591
|
return 'Float';
|
|
1799
1592
|
}
|
|
1800
|
-
|
|
1801
1593
|
toString() {
|
|
1802
1594
|
return "Float".concat(this.precision);
|
|
1803
1595
|
}
|
|
1804
|
-
|
|
1805
1596
|
}
|
|
1806
1597
|
class Float16 extends Float {
|
|
1807
1598
|
constructor() {
|
|
1808
1599
|
super(Precision.HALF);
|
|
1809
1600
|
}
|
|
1810
|
-
|
|
1811
1601
|
}
|
|
1812
1602
|
class Float32 extends Float {
|
|
1813
1603
|
constructor() {
|
|
1814
1604
|
super(Precision.SINGLE);
|
|
1815
1605
|
}
|
|
1816
|
-
|
|
1817
1606
|
}
|
|
1818
1607
|
class Float64 extends Float {
|
|
1819
1608
|
constructor() {
|
|
1820
1609
|
super(Precision.DOUBLE);
|
|
1821
1610
|
}
|
|
1822
|
-
|
|
1823
1611
|
}
|
|
1824
1612
|
class Binary extends DataType {
|
|
1825
1613
|
constructor() {
|
|
1826
1614
|
super();
|
|
1827
1615
|
}
|
|
1828
|
-
|
|
1829
1616
|
get typeId() {
|
|
1830
1617
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Binary;
|
|
1831
1618
|
}
|
|
1832
|
-
|
|
1833
1619
|
toString() {
|
|
1834
1620
|
return 'Binary';
|
|
1835
1621
|
}
|
|
1836
|
-
|
|
1837
1622
|
get [Symbol.toStringTag]() {
|
|
1838
1623
|
return 'Binary';
|
|
1839
1624
|
}
|
|
1840
|
-
|
|
1841
1625
|
}
|
|
1626
|
+
|
|
1842
1627
|
class Utf8 extends DataType {
|
|
1843
1628
|
get typeId() {
|
|
1844
1629
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Utf8;
|
|
1845
1630
|
}
|
|
1846
|
-
|
|
1847
1631
|
get [Symbol.toStringTag]() {
|
|
1848
1632
|
return 'Utf8';
|
|
1849
1633
|
}
|
|
1850
|
-
|
|
1851
1634
|
toString() {
|
|
1852
1635
|
return 'Utf8';
|
|
1853
1636
|
}
|
|
1854
|
-
|
|
1855
1637
|
}
|
|
1638
|
+
|
|
1856
1639
|
const DateUnit = {
|
|
1857
1640
|
DAY: 0,
|
|
1858
1641
|
MILLISECOND: 1
|
|
@@ -1861,36 +1644,28 @@ _Symbol$toStringTag3 = Symbol.toStringTag;
|
|
|
1861
1644
|
class Date extends DataType {
|
|
1862
1645
|
constructor(unit) {
|
|
1863
1646
|
super();
|
|
1864
|
-
|
|
1865
1647
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1866
|
-
|
|
1867
1648
|
this.unit = unit;
|
|
1868
1649
|
}
|
|
1869
|
-
|
|
1870
1650
|
get typeId() {
|
|
1871
1651
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Date;
|
|
1872
1652
|
}
|
|
1873
|
-
|
|
1874
1653
|
get [_Symbol$toStringTag3]() {
|
|
1875
1654
|
return 'Date';
|
|
1876
1655
|
}
|
|
1877
|
-
|
|
1878
1656
|
toString() {
|
|
1879
1657
|
return "Date".concat((this.unit + 1) * 32, "<").concat(DateUnit[this.unit], ">");
|
|
1880
1658
|
}
|
|
1881
|
-
|
|
1882
1659
|
}
|
|
1883
1660
|
class DateDay extends Date {
|
|
1884
1661
|
constructor() {
|
|
1885
1662
|
super(DateUnit.DAY);
|
|
1886
1663
|
}
|
|
1887
|
-
|
|
1888
1664
|
}
|
|
1889
1665
|
class DateMillisecond extends Date {
|
|
1890
1666
|
constructor() {
|
|
1891
1667
|
super(DateUnit.MILLISECOND);
|
|
1892
1668
|
}
|
|
1893
|
-
|
|
1894
1669
|
}
|
|
1895
1670
|
const TimeUnit = {
|
|
1896
1671
|
SECOND: 1,
|
|
@@ -1902,89 +1677,76 @@ _Symbol$toStringTag4 = Symbol.toStringTag;
|
|
|
1902
1677
|
class Time extends DataType {
|
|
1903
1678
|
constructor(unit, bitWidth) {
|
|
1904
1679
|
super();
|
|
1905
|
-
|
|
1906
1680
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1907
|
-
|
|
1908
1681
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "bitWidth", void 0);
|
|
1909
|
-
|
|
1910
1682
|
this.unit = unit;
|
|
1911
1683
|
this.bitWidth = bitWidth;
|
|
1912
1684
|
}
|
|
1913
|
-
|
|
1914
1685
|
get typeId() {
|
|
1915
1686
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Time;
|
|
1916
1687
|
}
|
|
1917
|
-
|
|
1918
1688
|
toString() {
|
|
1919
1689
|
return "Time".concat(this.bitWidth, "<").concat(TimeUnit[this.unit], ">");
|
|
1920
1690
|
}
|
|
1921
|
-
|
|
1922
1691
|
get [_Symbol$toStringTag4]() {
|
|
1923
1692
|
return 'Time';
|
|
1924
1693
|
}
|
|
1925
|
-
|
|
1926
1694
|
}
|
|
1695
|
+
|
|
1927
1696
|
class TimeSecond extends Time {
|
|
1928
1697
|
constructor() {
|
|
1929
1698
|
super(TimeUnit.SECOND, 32);
|
|
1930
1699
|
}
|
|
1931
|
-
|
|
1932
1700
|
}
|
|
1933
1701
|
class TimeMillisecond extends Time {
|
|
1934
1702
|
constructor() {
|
|
1935
1703
|
super(TimeUnit.MILLISECOND, 32);
|
|
1936
1704
|
}
|
|
1937
|
-
|
|
1938
1705
|
}
|
|
1939
1706
|
_Symbol$toStringTag5 = Symbol.toStringTag;
|
|
1707
|
+
|
|
1940
1708
|
class Timestamp extends DataType {
|
|
1941
|
-
constructor(unit
|
|
1709
|
+
constructor(unit) {
|
|
1710
|
+
let timezone = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1942
1711
|
super();
|
|
1943
|
-
|
|
1944
1712
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1945
|
-
|
|
1946
1713
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "timezone", void 0);
|
|
1947
|
-
|
|
1948
1714
|
this.unit = unit;
|
|
1949
1715
|
this.timezone = timezone;
|
|
1950
1716
|
}
|
|
1951
|
-
|
|
1952
1717
|
get typeId() {
|
|
1953
1718
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Timestamp;
|
|
1954
1719
|
}
|
|
1955
|
-
|
|
1956
1720
|
get [_Symbol$toStringTag5]() {
|
|
1957
1721
|
return 'Timestamp';
|
|
1958
1722
|
}
|
|
1959
|
-
|
|
1960
1723
|
toString() {
|
|
1961
1724
|
return "Timestamp<".concat(TimeUnit[this.unit]).concat(this.timezone ? ", ".concat(this.timezone) : '', ">");
|
|
1962
1725
|
}
|
|
1963
|
-
|
|
1964
1726
|
}
|
|
1965
1727
|
class TimestampSecond extends Timestamp {
|
|
1966
|
-
constructor(
|
|
1728
|
+
constructor() {
|
|
1729
|
+
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1967
1730
|
super(TimeUnit.SECOND, timezone);
|
|
1968
1731
|
}
|
|
1969
|
-
|
|
1970
1732
|
}
|
|
1971
1733
|
class TimestampMillisecond extends Timestamp {
|
|
1972
|
-
constructor(
|
|
1734
|
+
constructor() {
|
|
1735
|
+
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1973
1736
|
super(TimeUnit.MILLISECOND, timezone);
|
|
1974
1737
|
}
|
|
1975
|
-
|
|
1976
1738
|
}
|
|
1977
1739
|
class TimestampMicrosecond extends Timestamp {
|
|
1978
|
-
constructor(
|
|
1740
|
+
constructor() {
|
|
1741
|
+
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1979
1742
|
super(TimeUnit.MICROSECOND, timezone);
|
|
1980
1743
|
}
|
|
1981
|
-
|
|
1982
1744
|
}
|
|
1983
1745
|
class TimestampNanosecond extends Timestamp {
|
|
1984
|
-
constructor(
|
|
1746
|
+
constructor() {
|
|
1747
|
+
let timezone = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
1985
1748
|
super(TimeUnit.NANOSECOND, timezone);
|
|
1986
1749
|
}
|
|
1987
|
-
|
|
1988
1750
|
}
|
|
1989
1751
|
const IntervalUnit = {
|
|
1990
1752
|
DAY_TIME: 0,
|
|
@@ -1994,108 +1756,86 @@ _Symbol$toStringTag6 = Symbol.toStringTag;
|
|
|
1994
1756
|
class Interval extends DataType {
|
|
1995
1757
|
constructor(unit) {
|
|
1996
1758
|
super();
|
|
1997
|
-
|
|
1998
1759
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "unit", void 0);
|
|
1999
|
-
|
|
2000
1760
|
this.unit = unit;
|
|
2001
1761
|
}
|
|
2002
|
-
|
|
2003
1762
|
get typeId() {
|
|
2004
1763
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Interval;
|
|
2005
1764
|
}
|
|
2006
|
-
|
|
2007
1765
|
get [_Symbol$toStringTag6]() {
|
|
2008
1766
|
return 'Interval';
|
|
2009
1767
|
}
|
|
2010
|
-
|
|
2011
1768
|
toString() {
|
|
2012
1769
|
return "Interval<".concat(IntervalUnit[this.unit], ">");
|
|
2013
1770
|
}
|
|
2014
|
-
|
|
2015
1771
|
}
|
|
2016
1772
|
class IntervalDayTime extends Interval {
|
|
2017
1773
|
constructor() {
|
|
2018
1774
|
super(IntervalUnit.DAY_TIME);
|
|
2019
1775
|
}
|
|
2020
|
-
|
|
2021
1776
|
}
|
|
2022
1777
|
class IntervalYearMonth extends Interval {
|
|
2023
1778
|
constructor() {
|
|
2024
1779
|
super(IntervalUnit.YEAR_MONTH);
|
|
2025
1780
|
}
|
|
2026
|
-
|
|
2027
1781
|
}
|
|
2028
1782
|
_Symbol$toStringTag7 = Symbol.toStringTag;
|
|
2029
1783
|
class FixedSizeList extends DataType {
|
|
2030
1784
|
constructor(listSize, child) {
|
|
2031
1785
|
super();
|
|
2032
|
-
|
|
2033
1786
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "listSize", void 0);
|
|
2034
|
-
|
|
2035
1787
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
|
|
2036
|
-
|
|
2037
1788
|
this.listSize = listSize;
|
|
2038
1789
|
this.children = [child];
|
|
2039
1790
|
}
|
|
2040
|
-
|
|
2041
1791
|
get typeId() {
|
|
2042
1792
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.FixedSizeList;
|
|
2043
1793
|
}
|
|
2044
|
-
|
|
2045
1794
|
get valueType() {
|
|
2046
1795
|
return this.children[0].type;
|
|
2047
1796
|
}
|
|
2048
|
-
|
|
2049
1797
|
get valueField() {
|
|
2050
1798
|
return this.children[0];
|
|
2051
1799
|
}
|
|
2052
|
-
|
|
2053
1800
|
get [_Symbol$toStringTag7]() {
|
|
2054
1801
|
return 'FixedSizeList';
|
|
2055
1802
|
}
|
|
2056
|
-
|
|
2057
1803
|
toString() {
|
|
2058
1804
|
return "FixedSizeList[".concat(this.listSize, "]<").concat(this.valueType, ">");
|
|
2059
1805
|
}
|
|
2060
|
-
|
|
2061
1806
|
}
|
|
2062
1807
|
_Symbol$toStringTag8 = Symbol.toStringTag;
|
|
2063
1808
|
class Struct extends DataType {
|
|
2064
1809
|
constructor(children) {
|
|
2065
1810
|
super();
|
|
2066
|
-
|
|
2067
1811
|
(0,_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "children", void 0);
|
|
2068
|
-
|
|
2069
1812
|
this.children = children;
|
|
2070
1813
|
}
|
|
2071
|
-
|
|
2072
1814
|
get typeId() {
|
|
2073
1815
|
return _enum__WEBPACK_IMPORTED_MODULE_1__.Type.Struct;
|
|
2074
1816
|
}
|
|
2075
|
-
|
|
2076
1817
|
toString() {
|
|
2077
1818
|
return "Struct<{".concat(this.children.map(f => "".concat(f.name, ":").concat(f.type)).join(', '), "}>");
|
|
2078
1819
|
}
|
|
2079
|
-
|
|
2080
1820
|
get [_Symbol$toStringTag8]() {
|
|
2081
1821
|
return 'Struct';
|
|
2082
1822
|
}
|
|
2083
|
-
|
|
2084
1823
|
}
|
|
2085
1824
|
|
|
2086
1825
|
|
|
2087
1826
|
/***/ }),
|
|
2088
1827
|
|
|
2089
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
2090
|
-
|
|
2091
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.
|
|
2092
|
-
|
|
1828
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js":
|
|
1829
|
+
/*!**********************************************************************************************************************************!*\
|
|
1830
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+schema@3.3.1/node_modules/@loaders.gl/schema/dist/esm/lib/utils/assert.js ***!
|
|
1831
|
+
\**********************************************************************************************************************************/
|
|
2093
1832
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2094
1833
|
|
|
2095
1834
|
__webpack_require__.r(__webpack_exports__);
|
|
2096
1835
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2097
1836
|
/* harmony export */ "assert": () => (/* binding */ assert)
|
|
2098
1837
|
/* harmony export */ });
|
|
1838
|
+
|
|
2099
1839
|
function assert(condition, message) {
|
|
2100
1840
|
if (!condition) {
|
|
2101
1841
|
throw new Error(message || 'loader assertion failed.');
|
|
@@ -2105,16 +1845,18 @@ function assert(condition, message) {
|
|
|
2105
1845
|
|
|
2106
1846
|
/***/ }),
|
|
2107
1847
|
|
|
2108
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
2109
|
-
|
|
2110
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
2111
|
-
|
|
1848
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js":
|
|
1849
|
+
/*!**************************************************************************************************************************************************!*\
|
|
1850
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js ***!
|
|
1851
|
+
\**************************************************************************************************************************************************/
|
|
2112
1852
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2113
1853
|
|
|
2114
1854
|
__webpack_require__.r(__webpack_exports__);
|
|
2115
1855
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2116
1856
|
/* harmony export */ "assert": () => (/* binding */ assert)
|
|
2117
1857
|
/* harmony export */ });
|
|
1858
|
+
|
|
1859
|
+
|
|
2118
1860
|
function assert(condition, message) {
|
|
2119
1861
|
if (!condition) {
|
|
2120
1862
|
throw new Error(message || 'loaders.gl assertion failed.');
|
|
@@ -2124,10 +1866,10 @@ function assert(condition, message) {
|
|
|
2124
1866
|
|
|
2125
1867
|
/***/ }),
|
|
2126
1868
|
|
|
2127
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
2128
|
-
|
|
2129
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
2130
|
-
|
|
1869
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js":
|
|
1870
|
+
/*!***************************************************************************************************************************************************!*\
|
|
1871
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js ***!
|
|
1872
|
+
\***************************************************************************************************************************************************/
|
|
2131
1873
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2132
1874
|
|
|
2133
1875
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -2141,6 +1883,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2141
1883
|
/* harmony export */ "self": () => (/* binding */ self_),
|
|
2142
1884
|
/* harmony export */ "window": () => (/* binding */ window_)
|
|
2143
1885
|
/* harmony export */ });
|
|
1886
|
+
|
|
1887
|
+
|
|
2144
1888
|
const globals = {
|
|
2145
1889
|
self: typeof self !== 'undefined' && self,
|
|
2146
1890
|
window: typeof window !== 'undefined' && window,
|
|
@@ -2152,19 +1896,25 @@ const window_ = globals.window || globals.self || globals.global || {};
|
|
|
2152
1896
|
const global_ = globals.global || globals.self || globals.window || {};
|
|
2153
1897
|
const document_ = globals.document || {};
|
|
2154
1898
|
|
|
2155
|
-
|
|
1899
|
+
|
|
1900
|
+
const isBrowser =
|
|
1901
|
+
typeof process !== 'object' || String(process) !== '[object process]' || process.browser;
|
|
1902
|
+
|
|
2156
1903
|
const isWorker = typeof importScripts === 'function';
|
|
1904
|
+
|
|
2157
1905
|
const isMobile = typeof window !== 'undefined' && typeof window.orientation !== 'undefined';
|
|
1906
|
+
|
|
2158
1907
|
const matches = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
|
|
1908
|
+
|
|
2159
1909
|
const nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
2160
1910
|
|
|
2161
1911
|
|
|
2162
1912
|
/***/ }),
|
|
2163
1913
|
|
|
2164
|
-
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
2165
|
-
|
|
2166
|
-
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
2167
|
-
|
|
1914
|
+
/***/ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js":
|
|
1915
|
+
/*!*************************************************************************************************************************************************************!*\
|
|
1916
|
+
!*** ../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/library-utils/library-utils.js ***!
|
|
1917
|
+
\*************************************************************************************************************************************************************/
|
|
2168
1918
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2169
1919
|
|
|
2170
1920
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -2172,32 +1922,38 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2172
1922
|
/* harmony export */ "getLibraryUrl": () => (/* binding */ getLibraryUrl),
|
|
2173
1923
|
/* harmony export */ "loadLibrary": () => (/* binding */ loadLibrary)
|
|
2174
1924
|
/* harmony export */ });
|
|
2175
|
-
/* harmony import */ var _env_utils_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/globals */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
2176
|
-
/* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node/require-utils.node */ "?
|
|
1925
|
+
/* harmony import */ var _env_utils_globals__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../env-utils/globals */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/globals.js");
|
|
1926
|
+
/* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../node/require-utils.node */ "?d48c");
|
|
2177
1927
|
/* harmony import */ var _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__);
|
|
2178
|
-
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.
|
|
1928
|
+
/* harmony import */ var _env_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../env-utils/assert */ "../../common/temp/node_modules/.pnpm/@loaders.gl+worker-utils@3.3.1/node_modules/@loaders.gl/worker-utils/dist/esm/lib/env-utils/assert.js");
|
|
1929
|
+
|
|
1930
|
+
|
|
2179
1931
|
|
|
2180
1932
|
|
|
2181
1933
|
|
|
2182
1934
|
|
|
2183
1935
|
const LATEST = 'latest';
|
|
2184
|
-
const VERSION = true ? "3.
|
|
1936
|
+
const VERSION = true ? "3.3.1" : 0;
|
|
2185
1937
|
const loadLibraryPromises = {};
|
|
2186
|
-
|
|
1938
|
+
|
|
1939
|
+
async function loadLibrary(libraryUrl) {
|
|
1940
|
+
let moduleName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
1941
|
+
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
2187
1942
|
if (moduleName) {
|
|
2188
1943
|
libraryUrl = getLibraryUrl(libraryUrl, moduleName, options);
|
|
2189
1944
|
}
|
|
2190
1945
|
|
|
2191
|
-
loadLibraryPromises[libraryUrl] =
|
|
1946
|
+
loadLibraryPromises[libraryUrl] =
|
|
1947
|
+
loadLibraryPromises[libraryUrl] || loadLibraryFromFile(libraryUrl);
|
|
2192
1948
|
return await loadLibraryPromises[libraryUrl];
|
|
2193
1949
|
}
|
|
1950
|
+
|
|
2194
1951
|
function getLibraryUrl(library, moduleName, options) {
|
|
2195
1952
|
if (library.startsWith('http')) {
|
|
2196
1953
|
return library;
|
|
2197
1954
|
}
|
|
2198
1955
|
|
|
2199
1956
|
const modules = options.modules || {};
|
|
2200
|
-
|
|
2201
1957
|
if (modules[library]) {
|
|
2202
1958
|
return modules[library];
|
|
2203
1959
|
}
|
|
@@ -2214,16 +1970,13 @@ function getLibraryUrl(library, moduleName, options) {
|
|
|
2214
1970
|
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
|
|
2215
1971
|
return "../src/libs/".concat(library);
|
|
2216
1972
|
}
|
|
2217
|
-
|
|
2218
1973
|
return "modules/".concat(moduleName, "/src/libs/").concat(library);
|
|
2219
1974
|
}
|
|
2220
|
-
|
|
2221
1975
|
async function loadLibraryFromFile(libraryUrl) {
|
|
2222
1976
|
if (libraryUrl.endsWith('wasm')) {
|
|
2223
1977
|
const response = await fetch(libraryUrl);
|
|
2224
1978
|
return await response.arrayBuffer();
|
|
2225
1979
|
}
|
|
2226
|
-
|
|
2227
1980
|
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
|
|
2228
1981
|
try {
|
|
2229
1982
|
return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__ && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromFile && (await _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromFile(libraryUrl));
|
|
@@ -2231,7 +1984,6 @@ async function loadLibraryFromFile(libraryUrl) {
|
|
|
2231
1984
|
return null;
|
|
2232
1985
|
}
|
|
2233
1986
|
}
|
|
2234
|
-
|
|
2235
1987
|
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
|
|
2236
1988
|
return importScripts(libraryUrl);
|
|
2237
1989
|
}
|
|
@@ -2245,21 +1997,17 @@ function loadLibraryFromString(scriptSource, id) {
|
|
|
2245
1997
|
if (!_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isBrowser) {
|
|
2246
1998
|
return _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromString && _node_require_utils_node__WEBPACK_IMPORTED_MODULE_0__.requireFromString(scriptSource, id);
|
|
2247
1999
|
}
|
|
2248
|
-
|
|
2249
2000
|
if (_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.isWorker) {
|
|
2250
2001
|
eval.call(_env_utils_globals__WEBPACK_IMPORTED_MODULE_1__.global, scriptSource);
|
|
2251
2002
|
return null;
|
|
2252
2003
|
}
|
|
2253
|
-
|
|
2254
2004
|
const script = document.createElement('script');
|
|
2255
2005
|
script.id = id;
|
|
2256
|
-
|
|
2257
2006
|
try {
|
|
2258
2007
|
script.appendChild(document.createTextNode(scriptSource));
|
|
2259
2008
|
} catch (e) {
|
|
2260
2009
|
script.text = scriptSource;
|
|
2261
2010
|
}
|
|
2262
|
-
|
|
2263
2011
|
document.body.appendChild(script);
|
|
2264
2012
|
return null;
|
|
2265
2013
|
}
|
|
@@ -2268,4 +2016,4 @@ function loadLibraryFromString(scriptSource, id) {
|
|
|
2268
2016
|
/***/ })
|
|
2269
2017
|
|
|
2270
2018
|
}]);
|
|
2271
|
-
//# sourceMappingURL=vendors-
|
|
2019
|
+
//# sourceMappingURL=vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41.bundled-tests.js.map
|