@pggis/pg-sdk 3.3.10 → 3.5.0
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/README.md +8 -8
- package/dist/index.js +1966 -4
- package/dist/pggis.min.css +1 -1
- package/dist/resources/ThirdParty/Workers/pako_deflate.min.js +1 -2
- package/dist/resources/ThirdParty/Workers/pako_inflate.min.js +1 -2
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/resources/ThirdParty/google-earth-dbroot-parser.js +1 -8337
- package/dist/resources/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/dist/resources/Workers/chunk-35SHYARM.js +26 -0
- package/dist/resources/Workers/chunk-37F5JSTI.js +26 -0
- package/dist/resources/Workers/chunk-3SSKC3VN.js +26 -0
- package/dist/resources/Workers/chunk-3W4GT7KQ.js +26 -0
- package/dist/resources/Workers/chunk-4IW2T6GF.js +26 -0
- package/dist/resources/Workers/chunk-5YEWO3HT.js +26 -0
- package/dist/resources/Workers/chunk-64RSHJUE.js +28 -0
- package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
- package/dist/resources/Workers/chunk-7HTKERZY.js +26 -0
- package/dist/resources/Workers/{chunk-F3YA3Y2Z.js → chunk-A56XVLQR.js} +2 -13
- package/dist/resources/Workers/chunk-AJYK4IVJ.js +26 -0
- package/dist/resources/Workers/{chunk-EHWHNOEX.js → chunk-ARG42DC4.js} +2 -31
- package/dist/resources/Workers/chunk-AU7IKHOH.js +26 -0
- package/dist/resources/Workers/chunk-B4AA3ARO.js +26 -0
- package/dist/resources/Workers/chunk-CNCV5UL7.js +26 -0
- package/dist/resources/Workers/chunk-CYCB63OH.js +26 -0
- package/dist/resources/Workers/{chunk-4H7PY4U5.js → chunk-D6AA5QVT.js} +2 -20
- package/dist/resources/Workers/chunk-D6C66QON.js +26 -0
- package/dist/resources/Workers/chunk-DEPHB2WM.js +26 -0
- package/dist/resources/Workers/chunk-DMEY62ID.js +26 -0
- package/dist/resources/Workers/chunk-DQQ63PYM.js +26 -0
- package/dist/resources/Workers/chunk-ED5JPB3S.js +27 -0
- package/dist/resources/Workers/chunk-EZUYS2JF.js +26 -0
- package/dist/resources/Workers/chunk-FEVXJ54I.js +26 -0
- package/dist/resources/Workers/chunk-G5AGHVVC.js +26 -0
- package/dist/resources/Workers/{chunk-BBWDMCVU.js → chunk-GBYLG25F.js} +2 -15
- package/dist/resources/Workers/chunk-GILIDQNQ.js +26 -0
- package/dist/resources/Workers/chunk-HMIYSTF6.js +26 -0
- package/dist/resources/Workers/chunk-HTFSEEMT.js +26 -0
- package/dist/resources/Workers/chunk-HWXX4CWK.js +26 -0
- package/dist/resources/Workers/chunk-IYTZ52EY.js +26 -0
- package/dist/resources/Workers/chunk-J6UP6FLE.js +26 -0
- package/dist/resources/Workers/chunk-LEYMRMBK.js +27 -0
- package/dist/resources/Workers/chunk-M3MGYQSL.js +26 -0
- package/dist/resources/Workers/chunk-N4VJKXZS.js +26 -0
- package/dist/resources/Workers/chunk-NB3ML6JO.js +26 -0
- package/dist/resources/Workers/chunk-OFUUQVMR.js +26 -0
- package/dist/resources/Workers/chunk-OSW76XDF.js +26 -0
- package/dist/resources/Workers/chunk-PSPPBZWI.js +66 -0
- package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
- package/dist/resources/Workers/chunk-QOUAJ6TL.js +26 -0
- package/dist/resources/Workers/chunk-RCV6KWXS.js +26 -0
- package/dist/resources/Workers/chunk-TCGIRNHN.js +26 -0
- package/dist/resources/Workers/chunk-U4IEOH5K.js +26 -0
- package/dist/resources/Workers/chunk-UP6I5URU.js +26 -0
- package/dist/resources/Workers/chunk-VTAIKJXX.js +26 -0
- package/dist/resources/Workers/chunk-VTBDSFTG.js +26 -0
- package/dist/resources/Workers/chunk-VW6VD53G.js +26 -0
- package/dist/resources/Workers/chunk-WGGIH7QW.js +26 -0
- package/dist/resources/Workers/chunk-WWA5PL4H.js +26 -0
- package/dist/resources/Workers/chunk-WZDE3RYP.js +28 -0
- package/dist/resources/Workers/chunk-XRL4AVS5.js +26 -0
- package/dist/resources/Workers/combineGeometry.js +2 -44
- package/dist/resources/Workers/createBoxGeometry.js +2 -34
- package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -211
- package/dist/resources/Workers/createCircleGeometry.js +2 -173
- package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -123
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -482
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -201
- package/dist/resources/Workers/createCorridorGeometry.js +2 -1239
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -544
- package/dist/resources/Workers/createCylinderGeometry.js +2 -36
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -207
- package/dist/resources/Workers/createEllipseGeometry.js +2 -47
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -40
- package/dist/resources/Workers/createEllipsoidGeometry.js +2 -35
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -37
- package/dist/resources/Workers/createFrustumGeometry.js +2 -34
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -211
- package/dist/resources/Workers/createGeometry.js +2 -147
- package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -1584
- package/dist/resources/Workers/createPlaneGeometry.js +2 -200
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -100
- package/dist/resources/Workers/createPolygonGeometry.js +2 -1387
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -519
- package/dist/resources/Workers/createPolylineGeometry.js +2 -472
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -355
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -253
- package/dist/resources/Workers/createRectangleGeometry.js +2 -1250
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -455
- package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -376
- package/dist/resources/Workers/createSphereGeometry.js +2 -94
- package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -94
- package/dist/resources/Workers/createTaskProcessorWorker.js +2 -8
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -468
- package/dist/resources/Workers/createVectorTileGeometries.js +2 -363
- package/dist/resources/Workers/createVectorTilePoints.js +2 -88
- package/dist/resources/Workers/createVectorTilePolygons.js +2 -361
- package/dist/resources/Workers/createVectorTilePolylines.js +2 -238
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -545
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2254
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -722
- package/dist/resources/Workers/createWallGeometry.js +2 -466
- package/dist/resources/Workers/createWallOutlineGeometry.js +2 -314
- package/dist/resources/Workers/decodeDraco.js +2 -345
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2626
- package/dist/resources/Workers/decodeI3S.js +2 -1320
- package/dist/resources/Workers/gaussianSplatSorter.js +26 -0
- package/dist/resources/Workers/gaussianSplatTextureGenerator.js +26 -0
- package/dist/resources/Workers/transcodeKTX2.js +29 -3398
- package/dist/resources/Workers/transferTypedArrayTest.js +2 -17
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -795
- package/package.json +9 -8
- package/dist/pggis.min.js +0 -14796
- package/dist/resources/ThirdParty/Workers/basis_transcoder.js +0 -21
- package/dist/resources/Workers/chunk-23UFSGND.js +0 -236
- package/dist/resources/Workers/chunk-2A75IWRS.js +0 -218
- package/dist/resources/Workers/chunk-2FRVPMCS.js +0 -1258
- package/dist/resources/Workers/chunk-2FWRMUTY.js +0 -138
- package/dist/resources/Workers/chunk-2UPKWTMJ.js +0 -117
- package/dist/resources/Workers/chunk-34FXV7D7.js +0 -73
- package/dist/resources/Workers/chunk-3VAZEH7M.js +0 -101
- package/dist/resources/Workers/chunk-4DO5W5XZ.js +0 -196
- package/dist/resources/Workers/chunk-5QULIR53.js +0 -501
- package/dist/resources/Workers/chunk-7TC63SJW.js +0 -302
- package/dist/resources/Workers/chunk-7ZFGPDJA.js +0 -122
- package/dist/resources/Workers/chunk-A5DWLWCY.js +0 -834
- package/dist/resources/Workers/chunk-BG4UCVXN.js +0 -73
- package/dist/resources/Workers/chunk-BIKA3NRA.js +0 -59
- package/dist/resources/Workers/chunk-BROJAZRZ.js +0 -390
- package/dist/resources/Workers/chunk-DDUQAJ4P.js +0 -476
- package/dist/resources/Workers/chunk-EERJKOAF.js +0 -305
- package/dist/resources/Workers/chunk-EG6PTBY2.js +0 -2716
- package/dist/resources/Workers/chunk-F4HFJMGM.js +0 -353
- package/dist/resources/Workers/chunk-FJKNFAKQ.js +0 -8219
- package/dist/resources/Workers/chunk-FNIRWHJB.js +0 -289
- package/dist/resources/Workers/chunk-FZRIVR7Y.js +0 -100
- package/dist/resources/Workers/chunk-G43QFN4Q.js +0 -157
- package/dist/resources/Workers/chunk-GATZHF3K.js +0 -1860
- package/dist/resources/Workers/chunk-GRC2ZTAF.js +0 -398
- package/dist/resources/Workers/chunk-HU6N6EXB.js +0 -767
- package/dist/resources/Workers/chunk-I46ZRR5W.js +0 -1052
- package/dist/resources/Workers/chunk-JURN7NPV.js +0 -1075
- package/dist/resources/Workers/chunk-KKCR2YOP.js +0 -421
- package/dist/resources/Workers/chunk-LPR3YNP2.js +0 -138
- package/dist/resources/Workers/chunk-M7ERACJJ.js +0 -511
- package/dist/resources/Workers/chunk-MDWEGWPA.js +0 -1007
- package/dist/resources/Workers/chunk-OGXZVPPM.js +0 -2365
- package/dist/resources/Workers/chunk-PGSJK77E.js +0 -634
- package/dist/resources/Workers/chunk-PPH7OFP3.js +0 -258
- package/dist/resources/Workers/chunk-SH5USDPI.js +0 -456
- package/dist/resources/Workers/chunk-SOWMRMWA.js +0 -629
- package/dist/resources/Workers/chunk-STW2DGFI.js +0 -58
- package/dist/resources/Workers/chunk-T3XIFPYR.js +0 -1477
- package/dist/resources/Workers/chunk-TTUZP4BO.js +0 -501
- package/dist/resources/Workers/chunk-UEXTBDBE.js +0 -693
- package/dist/resources/Workers/chunk-VOXYEYJT.js +0 -684
- package/dist/resources/Workers/chunk-X4356LRH.js +0 -368
- package/dist/resources/Workers/chunk-XGI5BXZY.js +0 -163
- package/dist/resources/Workers/chunk-Y2ME2IJV.js +0 -781
- package/dist/resources/Workers/chunk-Y5UQJLYE.js +0 -171
- package/dist/resources/Workers/chunk-YJEBABKH.js +0 -2977
- package/dist/resources/Workers/chunk-YWTJ2B4B.js +0 -77
- package/dist/resources/Workers/chunk-Z3TIFFGF.js +0 -430
- package/dist/resources/Workers/chunk-ZT7KWISZ.js +0 -102
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.115
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
var __create = Object.create;
|
|
27
|
-
var __defProp = Object.defineProperty;
|
|
28
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
29
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
30
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
31
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
32
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
33
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
34
|
-
}) : x)(function(x) {
|
|
35
|
-
if (typeof require !== "undefined")
|
|
36
|
-
return require.apply(this, arguments);
|
|
37
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
38
|
-
});
|
|
39
|
-
var __glob = (map) => (path) => {
|
|
40
|
-
var fn = map[path];
|
|
41
|
-
if (fn)
|
|
42
|
-
return fn();
|
|
43
|
-
throw new Error("Module not found in bundle: " + path);
|
|
44
|
-
};
|
|
45
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
46
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
47
|
-
};
|
|
48
|
-
var __copyProps = (to, from, except, desc) => {
|
|
49
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
50
|
-
for (let key of __getOwnPropNames(from))
|
|
51
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
52
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
53
|
-
}
|
|
54
|
-
return to;
|
|
55
|
-
};
|
|
56
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
57
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
58
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
59
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
60
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
61
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
62
|
-
mod
|
|
63
|
-
));
|
|
64
|
-
|
|
65
|
-
// packages/engine/Source/Core/defined.js
|
|
66
|
-
function defined(value) {
|
|
67
|
-
return value !== void 0 && value !== null;
|
|
68
|
-
}
|
|
69
|
-
var defined_default = defined;
|
|
70
|
-
|
|
71
|
-
export {
|
|
72
|
-
__require,
|
|
73
|
-
__glob,
|
|
74
|
-
__commonJS,
|
|
75
|
-
__toESM,
|
|
76
|
-
defined_default
|
|
77
|
-
};
|
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.115
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
Cartesian4_default,
|
|
28
|
-
Matrix2_default,
|
|
29
|
-
Matrix4_default
|
|
30
|
-
} from "./chunk-YJEBABKH.js";
|
|
31
|
-
import {
|
|
32
|
-
ComponentDatatype_default
|
|
33
|
-
} from "./chunk-PPH7OFP3.js";
|
|
34
|
-
import {
|
|
35
|
-
Cartesian2_default,
|
|
36
|
-
Cartesian3_default,
|
|
37
|
-
Matrix3_default
|
|
38
|
-
} from "./chunk-OGXZVPPM.js";
|
|
39
|
-
import {
|
|
40
|
-
Math_default
|
|
41
|
-
} from "./chunk-5QULIR53.js";
|
|
42
|
-
import {
|
|
43
|
-
Check_default,
|
|
44
|
-
DeveloperError_default
|
|
45
|
-
} from "./chunk-XGI5BXZY.js";
|
|
46
|
-
import {
|
|
47
|
-
defined_default
|
|
48
|
-
} from "./chunk-YWTJ2B4B.js";
|
|
49
|
-
|
|
50
|
-
// packages/engine/Source/Scene/AttributeType.js
|
|
51
|
-
var AttributeType = {
|
|
52
|
-
/**
|
|
53
|
-
* The attribute is a single component.
|
|
54
|
-
*
|
|
55
|
-
* @type {string}
|
|
56
|
-
* @constant
|
|
57
|
-
*/
|
|
58
|
-
SCALAR: "SCALAR",
|
|
59
|
-
/**
|
|
60
|
-
* The attribute is a two-component vector.
|
|
61
|
-
*
|
|
62
|
-
* @type {string}
|
|
63
|
-
* @constant
|
|
64
|
-
*/
|
|
65
|
-
VEC2: "VEC2",
|
|
66
|
-
/**
|
|
67
|
-
* The attribute is a three-component vector.
|
|
68
|
-
*
|
|
69
|
-
* @type {string}
|
|
70
|
-
* @constant
|
|
71
|
-
*/
|
|
72
|
-
VEC3: "VEC3",
|
|
73
|
-
/**
|
|
74
|
-
* The attribute is a four-component vector.
|
|
75
|
-
*
|
|
76
|
-
* @type {string}
|
|
77
|
-
* @constant
|
|
78
|
-
*/
|
|
79
|
-
VEC4: "VEC4",
|
|
80
|
-
/**
|
|
81
|
-
* The attribute is a 2x2 matrix.
|
|
82
|
-
*
|
|
83
|
-
* @type {string}
|
|
84
|
-
* @constant
|
|
85
|
-
*/
|
|
86
|
-
MAT2: "MAT2",
|
|
87
|
-
/**
|
|
88
|
-
* The attribute is a 3x3 matrix.
|
|
89
|
-
*
|
|
90
|
-
* @type {string}
|
|
91
|
-
* @constant
|
|
92
|
-
*/
|
|
93
|
-
MAT3: "MAT3",
|
|
94
|
-
/**
|
|
95
|
-
* The attribute is a 4x4 matrix.
|
|
96
|
-
*
|
|
97
|
-
* @type {string}
|
|
98
|
-
* @constant
|
|
99
|
-
*/
|
|
100
|
-
MAT4: "MAT4"
|
|
101
|
-
};
|
|
102
|
-
AttributeType.getMathType = function(attributeType) {
|
|
103
|
-
switch (attributeType) {
|
|
104
|
-
case AttributeType.SCALAR:
|
|
105
|
-
return Number;
|
|
106
|
-
case AttributeType.VEC2:
|
|
107
|
-
return Cartesian2_default;
|
|
108
|
-
case AttributeType.VEC3:
|
|
109
|
-
return Cartesian3_default;
|
|
110
|
-
case AttributeType.VEC4:
|
|
111
|
-
return Cartesian4_default;
|
|
112
|
-
case AttributeType.MAT2:
|
|
113
|
-
return Matrix2_default;
|
|
114
|
-
case AttributeType.MAT3:
|
|
115
|
-
return Matrix3_default;
|
|
116
|
-
case AttributeType.MAT4:
|
|
117
|
-
return Matrix4_default;
|
|
118
|
-
default:
|
|
119
|
-
throw new DeveloperError_default("attributeType is not a valid value.");
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
AttributeType.getNumberOfComponents = function(attributeType) {
|
|
123
|
-
switch (attributeType) {
|
|
124
|
-
case AttributeType.SCALAR:
|
|
125
|
-
return 1;
|
|
126
|
-
case AttributeType.VEC2:
|
|
127
|
-
return 2;
|
|
128
|
-
case AttributeType.VEC3:
|
|
129
|
-
return 3;
|
|
130
|
-
case AttributeType.VEC4:
|
|
131
|
-
case AttributeType.MAT2:
|
|
132
|
-
return 4;
|
|
133
|
-
case AttributeType.MAT3:
|
|
134
|
-
return 9;
|
|
135
|
-
case AttributeType.MAT4:
|
|
136
|
-
return 16;
|
|
137
|
-
default:
|
|
138
|
-
throw new DeveloperError_default("attributeType is not a valid value.");
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
AttributeType.getAttributeLocationCount = function(attributeType) {
|
|
142
|
-
switch (attributeType) {
|
|
143
|
-
case AttributeType.SCALAR:
|
|
144
|
-
case AttributeType.VEC2:
|
|
145
|
-
case AttributeType.VEC3:
|
|
146
|
-
case AttributeType.VEC4:
|
|
147
|
-
return 1;
|
|
148
|
-
case AttributeType.MAT2:
|
|
149
|
-
return 2;
|
|
150
|
-
case AttributeType.MAT3:
|
|
151
|
-
return 3;
|
|
152
|
-
case AttributeType.MAT4:
|
|
153
|
-
return 4;
|
|
154
|
-
default:
|
|
155
|
-
throw new DeveloperError_default("attributeType is not a valid value.");
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
AttributeType.getGlslType = function(attributeType) {
|
|
159
|
-
Check_default.typeOf.string("attributeType", attributeType);
|
|
160
|
-
switch (attributeType) {
|
|
161
|
-
case AttributeType.SCALAR:
|
|
162
|
-
return "float";
|
|
163
|
-
case AttributeType.VEC2:
|
|
164
|
-
return "vec2";
|
|
165
|
-
case AttributeType.VEC3:
|
|
166
|
-
return "vec3";
|
|
167
|
-
case AttributeType.VEC4:
|
|
168
|
-
return "vec4";
|
|
169
|
-
case AttributeType.MAT2:
|
|
170
|
-
return "mat2";
|
|
171
|
-
case AttributeType.MAT3:
|
|
172
|
-
return "mat3";
|
|
173
|
-
case AttributeType.MAT4:
|
|
174
|
-
return "mat4";
|
|
175
|
-
default:
|
|
176
|
-
throw new DeveloperError_default("attributeType is not a valid value.");
|
|
177
|
-
}
|
|
178
|
-
};
|
|
179
|
-
var AttributeType_default = Object.freeze(AttributeType);
|
|
180
|
-
|
|
181
|
-
// packages/engine/Source/Core/AttributeCompression.js
|
|
182
|
-
var RIGHT_SHIFT = 1 / 256;
|
|
183
|
-
var LEFT_SHIFT = 256;
|
|
184
|
-
var AttributeCompression = {};
|
|
185
|
-
AttributeCompression.octEncodeInRange = function(vector, rangeMax, result) {
|
|
186
|
-
Check_default.defined("vector", vector);
|
|
187
|
-
Check_default.defined("result", result);
|
|
188
|
-
const magSquared = Cartesian3_default.magnitudeSquared(vector);
|
|
189
|
-
if (Math.abs(magSquared - 1) > Math_default.EPSILON6) {
|
|
190
|
-
throw new DeveloperError_default("vector must be normalized.");
|
|
191
|
-
}
|
|
192
|
-
result.x = vector.x / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
|
|
193
|
-
result.y = vector.y / (Math.abs(vector.x) + Math.abs(vector.y) + Math.abs(vector.z));
|
|
194
|
-
if (vector.z < 0) {
|
|
195
|
-
const x = result.x;
|
|
196
|
-
const y = result.y;
|
|
197
|
-
result.x = (1 - Math.abs(y)) * Math_default.signNotZero(x);
|
|
198
|
-
result.y = (1 - Math.abs(x)) * Math_default.signNotZero(y);
|
|
199
|
-
}
|
|
200
|
-
result.x = Math_default.toSNorm(result.x, rangeMax);
|
|
201
|
-
result.y = Math_default.toSNorm(result.y, rangeMax);
|
|
202
|
-
return result;
|
|
203
|
-
};
|
|
204
|
-
AttributeCompression.octEncode = function(vector, result) {
|
|
205
|
-
return AttributeCompression.octEncodeInRange(vector, 255, result);
|
|
206
|
-
};
|
|
207
|
-
var octEncodeScratch = new Cartesian2_default();
|
|
208
|
-
var uint8ForceArray = new Uint8Array(1);
|
|
209
|
-
function forceUint8(value) {
|
|
210
|
-
uint8ForceArray[0] = value;
|
|
211
|
-
return uint8ForceArray[0];
|
|
212
|
-
}
|
|
213
|
-
AttributeCompression.octEncodeToCartesian4 = function(vector, result) {
|
|
214
|
-
AttributeCompression.octEncodeInRange(vector, 65535, octEncodeScratch);
|
|
215
|
-
result.x = forceUint8(octEncodeScratch.x * RIGHT_SHIFT);
|
|
216
|
-
result.y = forceUint8(octEncodeScratch.x);
|
|
217
|
-
result.z = forceUint8(octEncodeScratch.y * RIGHT_SHIFT);
|
|
218
|
-
result.w = forceUint8(octEncodeScratch.y);
|
|
219
|
-
return result;
|
|
220
|
-
};
|
|
221
|
-
AttributeCompression.octDecodeInRange = function(x, y, rangeMax, result) {
|
|
222
|
-
Check_default.defined("result", result);
|
|
223
|
-
if (x < 0 || x > rangeMax || y < 0 || y > rangeMax) {
|
|
224
|
-
throw new DeveloperError_default(
|
|
225
|
-
`x and y must be unsigned normalized integers between 0 and ${rangeMax}`
|
|
226
|
-
);
|
|
227
|
-
}
|
|
228
|
-
result.x = Math_default.fromSNorm(x, rangeMax);
|
|
229
|
-
result.y = Math_default.fromSNorm(y, rangeMax);
|
|
230
|
-
result.z = 1 - (Math.abs(result.x) + Math.abs(result.y));
|
|
231
|
-
if (result.z < 0) {
|
|
232
|
-
const oldVX = result.x;
|
|
233
|
-
result.x = (1 - Math.abs(result.y)) * Math_default.signNotZero(oldVX);
|
|
234
|
-
result.y = (1 - Math.abs(oldVX)) * Math_default.signNotZero(result.y);
|
|
235
|
-
}
|
|
236
|
-
return Cartesian3_default.normalize(result, result);
|
|
237
|
-
};
|
|
238
|
-
AttributeCompression.octDecode = function(x, y, result) {
|
|
239
|
-
return AttributeCompression.octDecodeInRange(x, y, 255, result);
|
|
240
|
-
};
|
|
241
|
-
AttributeCompression.octDecodeFromCartesian4 = function(encoded, result) {
|
|
242
|
-
Check_default.typeOf.object("encoded", encoded);
|
|
243
|
-
Check_default.typeOf.object("result", result);
|
|
244
|
-
const x = encoded.x;
|
|
245
|
-
const y = encoded.y;
|
|
246
|
-
const z = encoded.z;
|
|
247
|
-
const w = encoded.w;
|
|
248
|
-
if (x < 0 || x > 255 || y < 0 || y > 255 || z < 0 || z > 255 || w < 0 || w > 255) {
|
|
249
|
-
throw new DeveloperError_default(
|
|
250
|
-
"x, y, z, and w must be unsigned normalized integers between 0 and 255"
|
|
251
|
-
);
|
|
252
|
-
}
|
|
253
|
-
const xOct16 = x * LEFT_SHIFT + y;
|
|
254
|
-
const yOct16 = z * LEFT_SHIFT + w;
|
|
255
|
-
return AttributeCompression.octDecodeInRange(xOct16, yOct16, 65535, result);
|
|
256
|
-
};
|
|
257
|
-
AttributeCompression.octPackFloat = function(encoded) {
|
|
258
|
-
Check_default.defined("encoded", encoded);
|
|
259
|
-
return 256 * encoded.x + encoded.y;
|
|
260
|
-
};
|
|
261
|
-
var scratchEncodeCart2 = new Cartesian2_default();
|
|
262
|
-
AttributeCompression.octEncodeFloat = function(vector) {
|
|
263
|
-
AttributeCompression.octEncode(vector, scratchEncodeCart2);
|
|
264
|
-
return AttributeCompression.octPackFloat(scratchEncodeCart2);
|
|
265
|
-
};
|
|
266
|
-
AttributeCompression.octDecodeFloat = function(value, result) {
|
|
267
|
-
Check_default.defined("value", value);
|
|
268
|
-
const temp = value / 256;
|
|
269
|
-
const x = Math.floor(temp);
|
|
270
|
-
const y = (temp - x) * 256;
|
|
271
|
-
return AttributeCompression.octDecode(x, y, result);
|
|
272
|
-
};
|
|
273
|
-
AttributeCompression.octPack = function(v1, v2, v3, result) {
|
|
274
|
-
Check_default.defined("v1", v1);
|
|
275
|
-
Check_default.defined("v2", v2);
|
|
276
|
-
Check_default.defined("v3", v3);
|
|
277
|
-
Check_default.defined("result", result);
|
|
278
|
-
const encoded1 = AttributeCompression.octEncodeFloat(v1);
|
|
279
|
-
const encoded2 = AttributeCompression.octEncodeFloat(v2);
|
|
280
|
-
const encoded3 = AttributeCompression.octEncode(v3, scratchEncodeCart2);
|
|
281
|
-
result.x = 65536 * encoded3.x + encoded1;
|
|
282
|
-
result.y = 65536 * encoded3.y + encoded2;
|
|
283
|
-
return result;
|
|
284
|
-
};
|
|
285
|
-
AttributeCompression.octUnpack = function(packed, v1, v2, v3) {
|
|
286
|
-
Check_default.defined("packed", packed);
|
|
287
|
-
Check_default.defined("v1", v1);
|
|
288
|
-
Check_default.defined("v2", v2);
|
|
289
|
-
Check_default.defined("v3", v3);
|
|
290
|
-
let temp = packed.x / 65536;
|
|
291
|
-
const x = Math.floor(temp);
|
|
292
|
-
const encodedFloat1 = (temp - x) * 65536;
|
|
293
|
-
temp = packed.y / 65536;
|
|
294
|
-
const y = Math.floor(temp);
|
|
295
|
-
const encodedFloat2 = (temp - y) * 65536;
|
|
296
|
-
AttributeCompression.octDecodeFloat(encodedFloat1, v1);
|
|
297
|
-
AttributeCompression.octDecodeFloat(encodedFloat2, v2);
|
|
298
|
-
AttributeCompression.octDecode(x, y, v3);
|
|
299
|
-
};
|
|
300
|
-
AttributeCompression.compressTextureCoordinates = function(textureCoordinates) {
|
|
301
|
-
Check_default.defined("textureCoordinates", textureCoordinates);
|
|
302
|
-
const x = textureCoordinates.x * 4095 | 0;
|
|
303
|
-
const y = textureCoordinates.y * 4095 | 0;
|
|
304
|
-
return 4096 * x + y;
|
|
305
|
-
};
|
|
306
|
-
AttributeCompression.decompressTextureCoordinates = function(compressed, result) {
|
|
307
|
-
Check_default.defined("compressed", compressed);
|
|
308
|
-
Check_default.defined("result", result);
|
|
309
|
-
const temp = compressed / 4096;
|
|
310
|
-
const xZeroTo4095 = Math.floor(temp);
|
|
311
|
-
result.x = xZeroTo4095 / 4095;
|
|
312
|
-
result.y = (compressed - xZeroTo4095 * 4096) / 4095;
|
|
313
|
-
return result;
|
|
314
|
-
};
|
|
315
|
-
function zigZagDecode(value) {
|
|
316
|
-
return value >> 1 ^ -(value & 1);
|
|
317
|
-
}
|
|
318
|
-
AttributeCompression.zigZagDeltaDecode = function(uBuffer, vBuffer, heightBuffer) {
|
|
319
|
-
Check_default.defined("uBuffer", uBuffer);
|
|
320
|
-
Check_default.defined("vBuffer", vBuffer);
|
|
321
|
-
Check_default.typeOf.number.equals(
|
|
322
|
-
"uBuffer.length",
|
|
323
|
-
"vBuffer.length",
|
|
324
|
-
uBuffer.length,
|
|
325
|
-
vBuffer.length
|
|
326
|
-
);
|
|
327
|
-
if (defined_default(heightBuffer)) {
|
|
328
|
-
Check_default.typeOf.number.equals(
|
|
329
|
-
"uBuffer.length",
|
|
330
|
-
"heightBuffer.length",
|
|
331
|
-
uBuffer.length,
|
|
332
|
-
heightBuffer.length
|
|
333
|
-
);
|
|
334
|
-
}
|
|
335
|
-
const count = uBuffer.length;
|
|
336
|
-
let u = 0;
|
|
337
|
-
let v = 0;
|
|
338
|
-
let height = 0;
|
|
339
|
-
for (let i = 0; i < count; ++i) {
|
|
340
|
-
u += zigZagDecode(uBuffer[i]);
|
|
341
|
-
v += zigZagDecode(vBuffer[i]);
|
|
342
|
-
uBuffer[i] = u;
|
|
343
|
-
vBuffer[i] = v;
|
|
344
|
-
if (defined_default(heightBuffer)) {
|
|
345
|
-
height += zigZagDecode(heightBuffer[i]);
|
|
346
|
-
heightBuffer[i] = height;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
};
|
|
350
|
-
AttributeCompression.dequantize = function(typedArray, componentDatatype, type, count) {
|
|
351
|
-
Check_default.defined("typedArray", typedArray);
|
|
352
|
-
Check_default.defined("componentDatatype", componentDatatype);
|
|
353
|
-
Check_default.defined("type", type);
|
|
354
|
-
Check_default.defined("count", count);
|
|
355
|
-
const componentsPerAttribute = AttributeType_default.getNumberOfComponents(type);
|
|
356
|
-
let divisor;
|
|
357
|
-
switch (componentDatatype) {
|
|
358
|
-
case ComponentDatatype_default.BYTE:
|
|
359
|
-
divisor = 127;
|
|
360
|
-
break;
|
|
361
|
-
case ComponentDatatype_default.UNSIGNED_BYTE:
|
|
362
|
-
divisor = 255;
|
|
363
|
-
break;
|
|
364
|
-
case ComponentDatatype_default.SHORT:
|
|
365
|
-
divisor = 32767;
|
|
366
|
-
break;
|
|
367
|
-
case ComponentDatatype_default.UNSIGNED_SHORT:
|
|
368
|
-
divisor = 65535;
|
|
369
|
-
break;
|
|
370
|
-
case ComponentDatatype_default.INT:
|
|
371
|
-
divisor = 2147483647;
|
|
372
|
-
break;
|
|
373
|
-
case ComponentDatatype_default.UNSIGNED_INT:
|
|
374
|
-
divisor = 4294967295;
|
|
375
|
-
break;
|
|
376
|
-
default:
|
|
377
|
-
throw new DeveloperError_default(
|
|
378
|
-
`Cannot dequantize component datatype: ${componentDatatype}`
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
const dequantizedTypedArray = new Float32Array(
|
|
382
|
-
count * componentsPerAttribute
|
|
383
|
-
);
|
|
384
|
-
for (let i = 0; i < count; i++) {
|
|
385
|
-
for (let j = 0; j < componentsPerAttribute; j++) {
|
|
386
|
-
const index = i * componentsPerAttribute + j;
|
|
387
|
-
dequantizedTypedArray[index] = Math.max(
|
|
388
|
-
typedArray[index] / divisor,
|
|
389
|
-
-1
|
|
390
|
-
);
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
return dequantizedTypedArray;
|
|
394
|
-
};
|
|
395
|
-
AttributeCompression.decodeRGB565 = function(typedArray, result) {
|
|
396
|
-
Check_default.defined("typedArray", typedArray);
|
|
397
|
-
const expectedLength = typedArray.length * 3;
|
|
398
|
-
if (defined_default(result)) {
|
|
399
|
-
Check_default.typeOf.number.equals(
|
|
400
|
-
"result.length",
|
|
401
|
-
"typedArray.length * 3",
|
|
402
|
-
result.length,
|
|
403
|
-
expectedLength
|
|
404
|
-
);
|
|
405
|
-
}
|
|
406
|
-
const count = typedArray.length;
|
|
407
|
-
if (!defined_default(result)) {
|
|
408
|
-
result = new Float32Array(count * 3);
|
|
409
|
-
}
|
|
410
|
-
const mask5 = (1 << 5) - 1;
|
|
411
|
-
const mask6 = (1 << 6) - 1;
|
|
412
|
-
const normalize5 = 1 / 31;
|
|
413
|
-
const normalize6 = 1 / 63;
|
|
414
|
-
for (let i = 0; i < count; i++) {
|
|
415
|
-
const value = typedArray[i];
|
|
416
|
-
const red = value >> 11;
|
|
417
|
-
const green = value >> 5 & mask6;
|
|
418
|
-
const blue = value & mask5;
|
|
419
|
-
const offset = 3 * i;
|
|
420
|
-
result[offset] = red * normalize5;
|
|
421
|
-
result[offset + 1] = green * normalize6;
|
|
422
|
-
result[offset + 2] = blue * normalize5;
|
|
423
|
-
}
|
|
424
|
-
return result;
|
|
425
|
-
};
|
|
426
|
-
var AttributeCompression_default = AttributeCompression;
|
|
427
|
-
|
|
428
|
-
export {
|
|
429
|
-
AttributeCompression_default
|
|
430
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.115
|
|
5
|
-
*
|
|
6
|
-
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
-
*
|
|
8
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
-
* you may not use this file except in compliance with the License.
|
|
10
|
-
* You may obtain a copy of the License at
|
|
11
|
-
*
|
|
12
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
-
*
|
|
14
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
-
* See the License for the specific language governing permissions and
|
|
18
|
-
* limitations under the License.
|
|
19
|
-
*
|
|
20
|
-
* Columbus View (Pat. Pend.)
|
|
21
|
-
*
|
|
22
|
-
* Portions licensed separately.
|
|
23
|
-
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
import {
|
|
27
|
-
Cartesian3_default
|
|
28
|
-
} from "./chunk-OGXZVPPM.js";
|
|
29
|
-
import {
|
|
30
|
-
Check_default
|
|
31
|
-
} from "./chunk-XGI5BXZY.js";
|
|
32
|
-
import {
|
|
33
|
-
defined_default
|
|
34
|
-
} from "./chunk-YWTJ2B4B.js";
|
|
35
|
-
|
|
36
|
-
// packages/engine/Source/Core/EncodedCartesian3.js
|
|
37
|
-
function EncodedCartesian3() {
|
|
38
|
-
this.high = Cartesian3_default.clone(Cartesian3_default.ZERO);
|
|
39
|
-
this.low = Cartesian3_default.clone(Cartesian3_default.ZERO);
|
|
40
|
-
}
|
|
41
|
-
EncodedCartesian3.encode = function(value, result) {
|
|
42
|
-
Check_default.typeOf.number("value", value);
|
|
43
|
-
if (!defined_default(result)) {
|
|
44
|
-
result = {
|
|
45
|
-
high: 0,
|
|
46
|
-
low: 0
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
let doubleHigh;
|
|
50
|
-
if (value >= 0) {
|
|
51
|
-
doubleHigh = Math.floor(value / 65536) * 65536;
|
|
52
|
-
result.high = doubleHigh;
|
|
53
|
-
result.low = value - doubleHigh;
|
|
54
|
-
} else {
|
|
55
|
-
doubleHigh = Math.floor(-value / 65536) * 65536;
|
|
56
|
-
result.high = -doubleHigh;
|
|
57
|
-
result.low = value + doubleHigh;
|
|
58
|
-
}
|
|
59
|
-
return result;
|
|
60
|
-
};
|
|
61
|
-
var scratchEncode = {
|
|
62
|
-
high: 0,
|
|
63
|
-
low: 0
|
|
64
|
-
};
|
|
65
|
-
EncodedCartesian3.fromCartesian = function(cartesian, result) {
|
|
66
|
-
Check_default.typeOf.object("cartesian", cartesian);
|
|
67
|
-
if (!defined_default(result)) {
|
|
68
|
-
result = new EncodedCartesian3();
|
|
69
|
-
}
|
|
70
|
-
const high = result.high;
|
|
71
|
-
const low = result.low;
|
|
72
|
-
EncodedCartesian3.encode(cartesian.x, scratchEncode);
|
|
73
|
-
high.x = scratchEncode.high;
|
|
74
|
-
low.x = scratchEncode.low;
|
|
75
|
-
EncodedCartesian3.encode(cartesian.y, scratchEncode);
|
|
76
|
-
high.y = scratchEncode.high;
|
|
77
|
-
low.y = scratchEncode.low;
|
|
78
|
-
EncodedCartesian3.encode(cartesian.z, scratchEncode);
|
|
79
|
-
high.z = scratchEncode.high;
|
|
80
|
-
low.z = scratchEncode.low;
|
|
81
|
-
return result;
|
|
82
|
-
};
|
|
83
|
-
var encodedP = new EncodedCartesian3();
|
|
84
|
-
EncodedCartesian3.writeElements = function(cartesian, cartesianArray, index) {
|
|
85
|
-
Check_default.defined("cartesianArray", cartesianArray);
|
|
86
|
-
Check_default.typeOf.number("index", index);
|
|
87
|
-
Check_default.typeOf.number.greaterThanOrEquals("index", index, 0);
|
|
88
|
-
EncodedCartesian3.fromCartesian(cartesian, encodedP);
|
|
89
|
-
const high = encodedP.high;
|
|
90
|
-
const low = encodedP.low;
|
|
91
|
-
cartesianArray[index] = high.x;
|
|
92
|
-
cartesianArray[index + 1] = high.y;
|
|
93
|
-
cartesianArray[index + 2] = high.z;
|
|
94
|
-
cartesianArray[index + 3] = low.x;
|
|
95
|
-
cartesianArray[index + 4] = low.y;
|
|
96
|
-
cartesianArray[index + 5] = low.z;
|
|
97
|
-
};
|
|
98
|
-
var EncodedCartesian3_default = EncodedCartesian3;
|
|
99
|
-
|
|
100
|
-
export {
|
|
101
|
-
EncodedCartesian3_default
|
|
102
|
-
};
|