@cesium/engine 12.0.1 → 13.0.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/Build/Workers/{chunk-WMHJAREU.js → chunk-22NU5WU5.js} +2 -2
- package/Build/Workers/{chunk-NL73INJS.js → chunk-2IIE2UZ3.js} +2 -2
- package/Build/Workers/{chunk-54NYY4U4.js → chunk-2OD54CUD.js} +7 -7
- package/Build/Workers/{chunk-NELAPOO6.js → chunk-2TSF7N76.js} +2 -2
- package/Build/Workers/{chunk-KKMH4BKN.js → chunk-3VHIUS7I.js} +6 -6
- package/Build/Workers/{chunk-U7SH6OK7.js → chunk-3ZMTG4X5.js} +4 -4
- package/Build/Workers/{chunk-ENARO52I.js → chunk-4HS475MU.js} +14 -14
- package/Build/Workers/{chunk-7CKQ7PVJ.js → chunk-4IM6WQEI.js} +6 -6
- package/Build/Workers/{chunk-3Y4UGAYI.js → chunk-6HWW6KNV.js} +6 -6
- package/Build/Workers/{chunk-VO4SXJXT.js → chunk-6ZOS2ACR.js} +7 -7
- package/Build/Workers/{chunk-7D6T2WYT.js → chunk-BFNZUP2C.js} +7 -41
- package/Build/Workers/{chunk-Q7IIOKAT.js → chunk-BLTSMJIP.js} +1 -1
- package/Build/Workers/{chunk-VXVQITFC.js → chunk-BZMHXDKV.js} +13 -13
- package/Build/Workers/{chunk-DR56WFYZ.js → chunk-CQDSGG3R.js} +7 -7
- package/Build/Workers/{chunk-DJ7K7EYK.js → chunk-CUMDCSMT.js} +11 -11
- package/Build/Workers/{chunk-2F42VIW6.js → chunk-D3VPMNUR.js} +13 -13
- package/Build/Workers/{chunk-76KRKKEF.js → chunk-DIAH2ZTB.js} +9 -9
- package/Build/Workers/{chunk-X6YBZOOA.js → chunk-EXDSJZ7J.js} +4 -4
- package/Build/Workers/{chunk-EMCXAVSG.js → chunk-FANORJU6.js} +2 -2
- package/Build/Workers/{chunk-GBPW65E3.js → chunk-FLPIQK2R.js} +6 -6
- package/Build/Workers/{chunk-ZPTNVB3S.js → chunk-GBXJIWAZ.js} +34 -8
- package/Build/Workers/{chunk-BH5M522L.js → chunk-GJZQSAES.js} +7 -7
- package/Build/Workers/{chunk-LBNGHEJY.js → chunk-GNG3V432.js} +4 -4
- package/Build/Workers/{chunk-2IJZVFHY.js → chunk-H4Y7ADFL.js} +5 -5
- package/Build/Workers/{chunk-ETXXXGMP.js → chunk-H7BML7HH.js} +6 -6
- package/Build/Workers/{chunk-PISTPJXS.js → chunk-HMMPNR4Z.js} +12 -12
- package/Build/Workers/{chunk-XDJ7V4NZ.js → chunk-JISDBAYP.js} +5 -5
- package/Build/Workers/{chunk-VHGI7D3P.js → chunk-KCCTLUKK.js} +10 -10
- package/Build/Workers/{chunk-2XOUWNPN.js → chunk-KKVKSTWC.js} +5 -5
- package/Build/Workers/{chunk-PNA47CR7.js → chunk-KRCUHV7P.js} +1 -1
- package/Build/Workers/{chunk-KJ65M35B.js → chunk-MMILY4S7.js} +11 -11
- package/Build/Workers/{chunk-22FZ334F.js → chunk-MSKD73KW.js} +10 -10
- package/Build/Workers/{chunk-PH3T7LNP.js → chunk-NVFEDMX4.js} +15 -15
- package/Build/Workers/{chunk-MV7YO647.js → chunk-OUIF26MQ.js} +6 -6
- package/Build/Workers/{chunk-IAX6MIST.js → chunk-OZZD3VY4.js} +17 -17
- package/Build/Workers/{chunk-647NL6VU.js → chunk-PD2MCNV7.js} +2 -2
- package/Build/Workers/{chunk-PJHRB4YJ.js → chunk-PMNQULFU.js} +7 -7
- package/Build/Workers/{chunk-YT5PQMSP.js → chunk-Q4MTXEB7.js} +6 -6
- package/Build/Workers/{chunk-JAKTB6CE.js → chunk-RC5N5SJL.js} +7 -7
- package/Build/Workers/{chunk-LVHHB5T6.js → chunk-RGZWZ4PP.js} +4 -4
- package/Build/Workers/{chunk-IVCFTVYW.js → chunk-RIQGQMS4.js} +4 -4
- package/Build/Workers/{chunk-GRQQHWMD.js → chunk-RR4M3ZGF.js} +7 -7
- package/Build/Workers/{chunk-K7QC3WDT.js → chunk-S4SCKDK4.js} +1 -1
- package/Build/Workers/{chunk-AGYO4ZSF.js → chunk-T5H7YWC7.js} +17 -17
- package/Build/Workers/{chunk-GSJ6LWIS.js → chunk-W2DVQETH.js} +10 -10
- package/Build/Workers/{chunk-JPNFQRN7.js → chunk-W2E67GLE.js} +13 -13
- package/Build/Workers/{chunk-ZCCI55EY.js → chunk-WXJY6NDI.js} +13 -13
- package/Build/Workers/{chunk-AER5CLXD.js → chunk-XQP37R5E.js} +5 -5
- package/Build/Workers/{chunk-7EBHNJTG.js → chunk-YBDL7YPF.js} +1 -1
- package/Build/Workers/{chunk-IJWXYSFC.js → chunk-YDEZMDB7.js} +2 -2
- package/Build/Workers/{chunk-H3RMGG7L.js → chunk-Z7OYBX6P.js} +5 -5
- package/Build/Workers/{chunk-COHL4R3G.js → chunk-ZIWULRRD.js} +1 -1
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +24 -24
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +27 -27
- package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +20 -20
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +30 -30
- package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createPolylineGeometry.js +23 -23
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -32
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
- package/Build/Workers/createRectangleGeometry.js +25 -25
- package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
- package/Build/Workers/createSimplePolylineGeometry.js +21 -21
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +20 -20
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +22 -22
- package/Build/Workers/createWallOutlineGeometry.js +21 -21
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +7 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/BingMapsGeocoderService.js +2 -0
- package/Source/Core/GoogleGeocoderService.js +110 -0
- package/Source/Core/ITwinPlatform.js +359 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonGeocodeProviderType.js +33 -0
- package/Source/Core/IonGeocoderService.js +72 -0
- package/Source/Core/Rectangle.js +0 -20
- package/Source/Core/TrackingReferenceFrame.js +45 -0
- package/Source/DataSources/Entity.js +15 -1
- package/Source/DataSources/EntityView.js +55 -4
- package/Source/DataSources/SampledProperty.js +24 -0
- package/Source/Renderer/ContextLimits.js +1 -1
- package/Source/Renderer/Texture.js +104 -92
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Cesium3DTilesetStatistics.js +109 -42
- package/Source/Scene/DerivedCommand.js +109 -16
- package/Source/Scene/DynamicEnvironmentMapManager.js +87 -7
- package/Source/Scene/GltfTextureLoader.js +16 -1
- package/Source/Scene/ITwinData.js +138 -0
- package/Source/Scene/Label.js +17 -3
- package/Source/Scene/MetadataClassProperty.js +26 -0
- package/Source/Scene/MetadataPicking.js +108 -17
- package/Source/Scene/MetadataType.js +20 -0
- package/Source/Scene/Model/Extensions/Gpm/GltfMeshPrimitiveGpmLoader.js +6 -11
- package/Source/Scene/Model/Model3DTileContent.js +23 -1
- package/Source/Scene/Model/ModelStatistics.js +33 -5
- package/Source/Scene/Model/PointCloudStylingPipelineStage.js +2 -1
- package/Source/Scene/PickedMetadataInfo.js +21 -3
- package/Source/Scene/Picking.js +7 -1
- package/Source/Scene/PostProcessStage.js +14 -17
- package/Source/Scene/PostProcessStageCollection.js +4 -16
- package/Source/Scene/PostProcessStageLibrary.js +13 -51
- package/Source/Scene/PropertyAttributeProperty.js +15 -3
- package/Source/Scene/PropertyTextureProperty.js +12 -0
- package/Source/Scene/Scene.js +17 -2
- package/Source/Scene/SkyBox.js +23 -4
- package/Source/Scene/UrlTemplateImageryProvider.js +5 -5
- package/Source/Scene/createGooglePhotorealistic3DTileset.js +55 -16
- package/Source/Scene/getMetadataProperty.js +48 -0
- package/Source/Shaders/Builtin/Functions/reverseLogDepth.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/reverseLogDepth.js +1 -1
- package/Source/Shaders/ConvolveSpecularMapFS.glsl +1 -1
- package/Source/Shaders/ConvolveSpecularMapFS.js +1 -1
- package/Source/Shaders/Model/ModelFS.glsl +7 -0
- package/Source/Shaders/Model/ModelFS.js +7 -0
- package/Source/Shaders/Model/ModelVS.glsl +9 -1
- package/Source/Shaders/Model/ModelVS.js +9 -1
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.glsl +66 -37
- package/Source/Shaders/PostProcessStages/AmbientOcclusionGenerate.js +66 -37
- package/index.d.ts +270 -39
- package/index.js +59 -53
- package/package.json +1 -1
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import Check from "./Check.js";
|
|
2
|
+
import defined from "./defined.js";
|
|
3
|
+
import DeveloperError from "./DeveloperError.js";
|
|
4
|
+
import Resource from "./Resource.js";
|
|
5
|
+
import RuntimeError from "./RuntimeError.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Default settings for accessing the iTwin platform.
|
|
9
|
+
*
|
|
10
|
+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
11
|
+
*
|
|
12
|
+
* @see ITwinData
|
|
13
|
+
* @namespace ITwinPlatform
|
|
14
|
+
*/
|
|
15
|
+
const ITwinPlatform = {};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Status states for a mesh-export export.
|
|
19
|
+
* Valid values are: <code>NotStarted</code>, <code>InProgress</code>, <code>Complete</code>, <code>Invalid</code>
|
|
20
|
+
* @enum {string}
|
|
21
|
+
*/
|
|
22
|
+
ITwinPlatform.ExportStatus = Object.freeze({
|
|
23
|
+
NotStarted: "NotStarted",
|
|
24
|
+
InProgress: "InProgress",
|
|
25
|
+
Complete: "Complete",
|
|
26
|
+
Invalid: "Invalid",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Types of mesh-export exports. CesiumJS only supports loading <code>3DTILES</code> type exports.
|
|
31
|
+
* Valid values are: <code>IMODEL</code>, <code>CESIUM</code>, <code>3DTILES</code>
|
|
32
|
+
* @enum {string}
|
|
33
|
+
*/
|
|
34
|
+
ITwinPlatform.ExportType = Object.freeze({
|
|
35
|
+
IMODEL: "IMODEL",
|
|
36
|
+
CESIUM: "CESIUM",
|
|
37
|
+
"3DTILES": "3DTILES",
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Types of Reality data
|
|
42
|
+
* @see https://developer.bentley.com/apis/reality-management/rm-rd-details/#types
|
|
43
|
+
* @enum {string}
|
|
44
|
+
*/
|
|
45
|
+
ITwinPlatform.RealityDataType = Object.freeze({
|
|
46
|
+
Cesium3DTiles: "Cesium3DTiles",
|
|
47
|
+
PNTS: "PNTS",
|
|
48
|
+
OPC: "OPC",
|
|
49
|
+
RealityMesh3DTiles: "RealityMesh3DTiles",
|
|
50
|
+
Terrain3DTiles: "Terrain3DTiles",
|
|
51
|
+
"3MX": "3MX",
|
|
52
|
+
"3SM": "3SM",
|
|
53
|
+
CCCloudProject: "CCCloudProject",
|
|
54
|
+
CCImageCollection: "CCImageCollection",
|
|
55
|
+
CCOrientations: "CCOrientations",
|
|
56
|
+
ContextCaptureInputs: "ContextCaptureInputs",
|
|
57
|
+
ContextDetector: "ContextDetector",
|
|
58
|
+
ContextScene: "ContextScene",
|
|
59
|
+
DAE: "DAE",
|
|
60
|
+
DGN: "DGN",
|
|
61
|
+
DSM: "DSM",
|
|
62
|
+
FBX: "FBX",
|
|
63
|
+
GLB: "GLB",
|
|
64
|
+
GLTF: "GLTF",
|
|
65
|
+
KML: "KML",
|
|
66
|
+
LAS: "LAS",
|
|
67
|
+
LAZ: "LAZ",
|
|
68
|
+
LOD: "LOD",
|
|
69
|
+
LodTree: "LodTree",
|
|
70
|
+
OBJ: "OBJ",
|
|
71
|
+
OMI: "OMI",
|
|
72
|
+
OMR: "OMR",
|
|
73
|
+
Orthophoto: "Orthophoto",
|
|
74
|
+
OrthophotoDSM: "OrthophotoDSM",
|
|
75
|
+
OSGB: "OSGB",
|
|
76
|
+
OVF: "OVF",
|
|
77
|
+
OBT: "OBT",
|
|
78
|
+
PLY: "PLY",
|
|
79
|
+
PointCloud: "PointCloud",
|
|
80
|
+
S3C: "S3C",
|
|
81
|
+
ScanCollection: "ScanCollection",
|
|
82
|
+
SHP: "SHP",
|
|
83
|
+
SLPK: "SLPK",
|
|
84
|
+
SpaceEyes3D: "SpaceEyes3D",
|
|
85
|
+
STL: "STL",
|
|
86
|
+
TSM: "TSM",
|
|
87
|
+
Unstructured: "Unstructured",
|
|
88
|
+
Other: "Other",
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Gets or sets the default iTwin access token. This token should have the <code>itwin-platform</code> scope.
|
|
93
|
+
*
|
|
94
|
+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
95
|
+
*
|
|
96
|
+
* @type {string|undefined}
|
|
97
|
+
*/
|
|
98
|
+
ITwinPlatform.defaultAccessToken = undefined;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Gets or sets the default iTwin API endpoint.
|
|
102
|
+
*
|
|
103
|
+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
104
|
+
*
|
|
105
|
+
* @type {string|Resource}
|
|
106
|
+
* @default "https://api.bentley.com"
|
|
107
|
+
*/
|
|
108
|
+
ITwinPlatform.apiEndpoint = new Resource({
|
|
109
|
+
url: "https://api.bentley.com",
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* @typedef {Object} ExportRequest
|
|
114
|
+
* @private
|
|
115
|
+
* @property {string} iModelId
|
|
116
|
+
* @property {string} changesetId
|
|
117
|
+
* @property {ITwinPlatform.ExportType} exportType Type of the export. CesiumJS only supports the 3DTILES type
|
|
118
|
+
*/
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @typedef {Object} Link
|
|
122
|
+
* @private
|
|
123
|
+
* @property {string} href
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @typedef {Object} ExportRepresentation
|
|
128
|
+
* The export objects from get-exports when using return=representation
|
|
129
|
+
* @private
|
|
130
|
+
* @property {string} id Export id
|
|
131
|
+
* @property {string} displayName Name of the iModel
|
|
132
|
+
* @property {ITwinPlatform.ExportStatus} status Status of this export
|
|
133
|
+
* @property {string} lastModified
|
|
134
|
+
* @property {ExportRequest} request Object containing info about the export itself
|
|
135
|
+
* @property {{mesh: Link}} _links Object containing relevant links. For Exports this includes the access url for the mesh itself
|
|
136
|
+
*/
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* @typedef {Object} GetExportsResponse
|
|
140
|
+
* @private
|
|
141
|
+
* @property {ExportRepresentation[]} exports The list of exports for the current page
|
|
142
|
+
* @property {{self: Link, next: Link | undefined, prev: Link | undefined}} _links Pagination links
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Get the list of exports for the specified iModel at it's most current version.
|
|
147
|
+
* This will only return the top 5 exports with {@link ITwinPlatform.ExportType} of <code>3DTILES</code>.
|
|
148
|
+
*
|
|
149
|
+
* @private
|
|
150
|
+
*
|
|
151
|
+
* @param {string} iModelId iModel id
|
|
152
|
+
* @returns {Promise<GetExportsResponse>}
|
|
153
|
+
*
|
|
154
|
+
* @throws {RuntimeError} If the iTwin API request is not successful
|
|
155
|
+
*/
|
|
156
|
+
ITwinPlatform.getExports = async function (iModelId) {
|
|
157
|
+
//>>includeStart('debug', pragmas.debug);
|
|
158
|
+
Check.typeOf.string("iModelId", iModelId);
|
|
159
|
+
if (!defined(ITwinPlatform.defaultAccessToken)) {
|
|
160
|
+
throw new DeveloperError("Must set ITwinPlatform.defaultAccessToken first");
|
|
161
|
+
}
|
|
162
|
+
//>>includeEnd('debug')
|
|
163
|
+
|
|
164
|
+
const resource = new Resource({
|
|
165
|
+
url: `${ITwinPlatform.apiEndpoint}mesh-export`,
|
|
166
|
+
headers: {
|
|
167
|
+
Authorization: `Bearer ${ITwinPlatform.defaultAccessToken}`,
|
|
168
|
+
Accept: "application/vnd.bentley.itwin-platform.v1+json",
|
|
169
|
+
Prefer: "return=representation",
|
|
170
|
+
},
|
|
171
|
+
queryParameters: {
|
|
172
|
+
iModelId: iModelId,
|
|
173
|
+
exportType: ITwinPlatform.ExportType["3DTILES"],
|
|
174
|
+
// With the export auto-generation it will auto-delete the 6th export so
|
|
175
|
+
// there should never be more than 5 results. Just request them all and parse
|
|
176
|
+
// for ones that are COMPLETE
|
|
177
|
+
$top: "5",
|
|
178
|
+
client: "CesiumJS",
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
/* global CESIUM_VERSION */
|
|
182
|
+
if (typeof CESIUM_VERSION !== "undefined") {
|
|
183
|
+
resource.appendQueryParameters({ clientVersion: CESIUM_VERSION });
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
try {
|
|
187
|
+
const response = await resource.fetchJson();
|
|
188
|
+
return response;
|
|
189
|
+
} catch (error) {
|
|
190
|
+
const result = JSON.parse(error.response);
|
|
191
|
+
if (error.statusCode === 401) {
|
|
192
|
+
throw new RuntimeError(
|
|
193
|
+
`Unauthorized, bad token, wrong scopes or headers bad. ${result.error.details[0].code}`,
|
|
194
|
+
);
|
|
195
|
+
} else if (error.statusCode === 403) {
|
|
196
|
+
console.error(result.error.code, result.error.message);
|
|
197
|
+
throw new RuntimeError("Not allowed, forbidden");
|
|
198
|
+
} else if (error.statusCode === 422) {
|
|
199
|
+
throw new RuntimeError(
|
|
200
|
+
`Unprocessable Entity:${result.error.code} ${result.error.message}`,
|
|
201
|
+
);
|
|
202
|
+
} else if (error.statusCode === 429) {
|
|
203
|
+
throw new RuntimeError("Too many requests");
|
|
204
|
+
}
|
|
205
|
+
throw new RuntimeError(`Unknown request failure ${error.statusCode}`);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @typedef {Object} RealityDataExtent
|
|
211
|
+
* @private
|
|
212
|
+
* @property {{latitude: number, longitude: number}} southWest
|
|
213
|
+
* @property {{latitude: number, longitude: number}} northEast
|
|
214
|
+
*/
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @typedef {Object} RealityDataRepresentation
|
|
218
|
+
* @private
|
|
219
|
+
* @property {string} id "95d8dccd-d89e-4287-bb5f-3219acbc71ae",
|
|
220
|
+
* @property {string} displayName "Name of reality data",
|
|
221
|
+
* @property {string} dataset "Dataset",
|
|
222
|
+
* @property {string} group "73d09423-28c3-4fdb-ab4a-03a47a5b04f8",
|
|
223
|
+
* @property {string} description "Description of reality data",
|
|
224
|
+
* @property {string} rootDocument "Directory/SubDirectory/realityData.3mx",
|
|
225
|
+
* @property {number} size 6521212,
|
|
226
|
+
* @property {string} classification "Model",
|
|
227
|
+
* @property {ITwinPlatform.RealityDataType} type "3MX",
|
|
228
|
+
* @property {{startDateTime: string, endDateTime: string, acquirer: string}} acquisition
|
|
229
|
+
* @property {RealityDataExtent} extent
|
|
230
|
+
* @property {boolean} authoring false,
|
|
231
|
+
* @property {string} dataCenterLocation "North Europe",
|
|
232
|
+
* @property {string} modifiedDateTime "2021-04-09T19:03:12Z",
|
|
233
|
+
* @property {string} lastAccessedDateTime "2021-04-09T00:00:00Z",
|
|
234
|
+
* @property {string} createdDateTime "2021-02-22T20:03:40Z",
|
|
235
|
+
* @property {string} ownerId "f1d49cc7-f9b3-494f-9c67-563ea5597063",
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Load the full metadata for the given iTwin id and reality data id.
|
|
240
|
+
*
|
|
241
|
+
* @private
|
|
242
|
+
*
|
|
243
|
+
* @param {string} iTwinId The id of the iTwin to load data from
|
|
244
|
+
* @param {string} realityDataId The id of the reality data to load
|
|
245
|
+
* @returns {Promise<RealityDataRepresentation>}
|
|
246
|
+
*/
|
|
247
|
+
ITwinPlatform.getRealityDataMetadata = async function (iTwinId, realityDataId) {
|
|
248
|
+
//>>includeStart('debug', pragmas.debug);
|
|
249
|
+
Check.typeOf.string("iTwinId", iTwinId);
|
|
250
|
+
Check.typeOf.string("realityDataId", realityDataId);
|
|
251
|
+
if (!defined(ITwinPlatform.defaultAccessToken)) {
|
|
252
|
+
throw new DeveloperError("Must set ITwinPlatform.defaultAccessToken first");
|
|
253
|
+
}
|
|
254
|
+
//>>includeEnd('debug')
|
|
255
|
+
|
|
256
|
+
const resource = new Resource({
|
|
257
|
+
url: `${ITwinPlatform.apiEndpoint}reality-management/reality-data/${realityDataId}`,
|
|
258
|
+
headers: {
|
|
259
|
+
Authorization: `Bearer ${ITwinPlatform.defaultAccessToken}`,
|
|
260
|
+
Accept: "application/vnd.bentley.itwin-platform.v1+json",
|
|
261
|
+
},
|
|
262
|
+
queryParameters: { iTwinId: iTwinId },
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
try {
|
|
266
|
+
const response = await resource.fetchJson();
|
|
267
|
+
return response.realityData;
|
|
268
|
+
} catch (error) {
|
|
269
|
+
const result = JSON.parse(error.response);
|
|
270
|
+
if (error.statusCode === 401) {
|
|
271
|
+
throw new RuntimeError(
|
|
272
|
+
`Unauthorized, bad token, wrong scopes or headers bad. ${result.error.details[0].code}`,
|
|
273
|
+
);
|
|
274
|
+
} else if (error.statusCode === 403) {
|
|
275
|
+
console.error(result.error.code, result.error.message);
|
|
276
|
+
throw new RuntimeError("Not allowed, forbidden");
|
|
277
|
+
} else if (error.statusCode === 404) {
|
|
278
|
+
throw new RuntimeError(
|
|
279
|
+
`Reality data not found: ${iTwinId}, ${realityDataId}`,
|
|
280
|
+
);
|
|
281
|
+
} else if (error.statusCode === 422) {
|
|
282
|
+
throw new RuntimeError(
|
|
283
|
+
`Unprocessable Entity:${result.error.code} ${result.error.message}`,
|
|
284
|
+
);
|
|
285
|
+
} else if (error.statusCode === 429) {
|
|
286
|
+
throw new RuntimeError("Too many requests");
|
|
287
|
+
}
|
|
288
|
+
throw new RuntimeError(`Unknown request failure ${error.statusCode}`);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Request the access url for the given iTwin id, reality data id and root document.
|
|
294
|
+
* The root document can be requested from the list using <code>return=representation</code>
|
|
295
|
+
* or the metadata route from {@link ITwinPlatform.getRealityDataMetadata}
|
|
296
|
+
*
|
|
297
|
+
* @private
|
|
298
|
+
*
|
|
299
|
+
* @param {string} iTwinId The id of the iTwin to load data from
|
|
300
|
+
* @param {string} realityDataId The id of the reality data to load
|
|
301
|
+
* @param {string} rootDocument The path of the root document for this reality data
|
|
302
|
+
* @returns {Promise<string>}
|
|
303
|
+
*/
|
|
304
|
+
ITwinPlatform.getRealityDataURL = async function (
|
|
305
|
+
iTwinId,
|
|
306
|
+
realityDataId,
|
|
307
|
+
rootDocument,
|
|
308
|
+
) {
|
|
309
|
+
//>>includeStart('debug', pragmas.debug);
|
|
310
|
+
Check.typeOf.string("iTwinId", iTwinId);
|
|
311
|
+
Check.typeOf.string("realityDataId", realityDataId);
|
|
312
|
+
Check.typeOf.string("rootDocument", rootDocument);
|
|
313
|
+
if (!defined(ITwinPlatform.defaultAccessToken)) {
|
|
314
|
+
throw new DeveloperError("Must set ITwinPlatform.defaultAccessToken first");
|
|
315
|
+
}
|
|
316
|
+
//>>includeEnd('debug')
|
|
317
|
+
|
|
318
|
+
const resource = new Resource({
|
|
319
|
+
url: `${ITwinPlatform.apiEndpoint}reality-management/reality-data/${realityDataId}/readaccess`,
|
|
320
|
+
headers: {
|
|
321
|
+
Authorization: `Bearer ${ITwinPlatform.defaultAccessToken}`,
|
|
322
|
+
Accept: "application/vnd.bentley.itwin-platform.v1+json",
|
|
323
|
+
},
|
|
324
|
+
queryParameters: { iTwinId: iTwinId },
|
|
325
|
+
});
|
|
326
|
+
|
|
327
|
+
try {
|
|
328
|
+
const result = await resource.fetchJson();
|
|
329
|
+
|
|
330
|
+
const containerUrl = result._links.containerUrl.href;
|
|
331
|
+
const tilesetUrl = new URL(containerUrl);
|
|
332
|
+
tilesetUrl.pathname = `${tilesetUrl.pathname}/${rootDocument}`;
|
|
333
|
+
|
|
334
|
+
return tilesetUrl.toString();
|
|
335
|
+
} catch (error) {
|
|
336
|
+
const result = JSON.parse(error.response);
|
|
337
|
+
if (error.statusCode === 401) {
|
|
338
|
+
throw new RuntimeError(
|
|
339
|
+
`Unauthorized, bad token, wrong scopes or headers bad. ${result.error.details[0].code}`,
|
|
340
|
+
);
|
|
341
|
+
} else if (error.statusCode === 403) {
|
|
342
|
+
console.error(result.error.code, result.error.message);
|
|
343
|
+
throw new RuntimeError("Not allowed, forbidden");
|
|
344
|
+
} else if (error.statusCode === 404) {
|
|
345
|
+
throw new RuntimeError(
|
|
346
|
+
`Reality data not found: ${iTwinId}, ${realityDataId}`,
|
|
347
|
+
);
|
|
348
|
+
} else if (error.statusCode === 422) {
|
|
349
|
+
throw new RuntimeError(
|
|
350
|
+
`Unprocessable Entity:${result.error.code} ${result.error.message}`,
|
|
351
|
+
);
|
|
352
|
+
} else if (error.statusCode === 429) {
|
|
353
|
+
throw new RuntimeError("Too many requests");
|
|
354
|
+
}
|
|
355
|
+
throw new RuntimeError(`Unknown request failure ${error.statusCode}`);
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
export default ITwinPlatform;
|
package/Source/Core/Ion.js
CHANGED
|
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
7
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI0ZDdmNWJiNy0wMmNlLTQ1MWUtODM2YS02NGM1MTBlOGMwMWQiLCJpZCI6MjU5LCJpYXQiOjE3MzMxNTc4OTV9.B3URHf0VdHDtGckb-hv7uqATdn8KfvkiuoAFZUq8tAo";
|
|
8
8
|
/**
|
|
9
9
|
* Default settings for accessing the Cesium ion API.
|
|
10
10
|
*
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Underlying geocoding services that can be used via Cesium ion.
|
|
3
|
+
*
|
|
4
|
+
* @enum {string}
|
|
5
|
+
*/
|
|
6
|
+
const IonGeocodeProviderType = {
|
|
7
|
+
/**
|
|
8
|
+
* Google geocoder, for use with Google data.
|
|
9
|
+
*
|
|
10
|
+
* @type {string}
|
|
11
|
+
* @constant
|
|
12
|
+
*/
|
|
13
|
+
GOOGLE: "GOOGLE",
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Bing geocoder, for use with Bing data.
|
|
17
|
+
*
|
|
18
|
+
* @type {string}
|
|
19
|
+
* @constant
|
|
20
|
+
*/
|
|
21
|
+
BING: "BING",
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Use the default geocoder as set on the server. Used when neither Bing or
|
|
25
|
+
* Google data is used.
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @constant
|
|
29
|
+
*/
|
|
30
|
+
DEFAULT: "DEFAULT",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default Object.freeze(IonGeocodeProviderType);
|
|
@@ -2,10 +2,45 @@ import Check from "./Check.js";
|
|
|
2
2
|
import Credit from "./Credit.js";
|
|
3
3
|
import defaultValue from "./defaultValue.js";
|
|
4
4
|
import defined from "./defined.js";
|
|
5
|
+
import DeveloperError from "./DeveloperError.js";
|
|
5
6
|
import Ion from "./Ion.js";
|
|
7
|
+
import IonGeocodeProviderType from "./IonGeocodeProviderType.js";
|
|
6
8
|
import PeliasGeocoderService from "./PeliasGeocoderService.js";
|
|
7
9
|
import Resource from "./Resource.js";
|
|
8
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @param {*} geocodeProviderType
|
|
13
|
+
* @throws {DeveloperError}
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
function validateIonGeocodeProviderType(geocodeProviderType) {
|
|
17
|
+
if (
|
|
18
|
+
!Object.values(IonGeocodeProviderType).some(
|
|
19
|
+
(value) => value === geocodeProviderType,
|
|
20
|
+
)
|
|
21
|
+
) {
|
|
22
|
+
throw new DeveloperError(
|
|
23
|
+
`Invalid geocodeProviderType: "${geocodeProviderType}"`,
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const providerToParameterMap = Object.freeze({
|
|
29
|
+
[IonGeocodeProviderType.GOOGLE]: "google",
|
|
30
|
+
[IonGeocodeProviderType.BING]: "bing",
|
|
31
|
+
[IonGeocodeProviderType.DEFAULT]: undefined,
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
function providerToQueryParameter(provider) {
|
|
35
|
+
return providerToParameterMap[provider];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function queryParameterToProvider(parameter) {
|
|
39
|
+
return Object.entries(providerToParameterMap).find(
|
|
40
|
+
(entry) => entry[1] === parameter,
|
|
41
|
+
)[0];
|
|
42
|
+
}
|
|
43
|
+
|
|
9
44
|
/**
|
|
10
45
|
* Provides geocoding through Cesium ion.
|
|
11
46
|
* @alias IonGeocoderService
|
|
@@ -15,6 +50,7 @@ import Resource from "./Resource.js";
|
|
|
15
50
|
* @param {Scene} options.scene The scene
|
|
16
51
|
* @param {string} [options.accessToken=Ion.defaultAccessToken] The access token to use.
|
|
17
52
|
* @param {string|Resource} [options.server=Ion.defaultServer] The resource to the Cesium ion API server.
|
|
53
|
+
* @param {IonGeocodeProviderType} [options.geocodeProviderType=IonGeocodeProviderType.DEFAULT] The geocoder the Cesium ion API server should use to fulfill this request.
|
|
18
54
|
*
|
|
19
55
|
* @see Ion
|
|
20
56
|
*/
|
|
@@ -25,6 +61,14 @@ function IonGeocoderService(options) {
|
|
|
25
61
|
Check.typeOf.object("options.scene", options.scene);
|
|
26
62
|
//>>includeEnd('debug');
|
|
27
63
|
|
|
64
|
+
const geocodeProviderType = defaultValue(
|
|
65
|
+
options.geocodeProviderType,
|
|
66
|
+
IonGeocodeProviderType.DEFAULT,
|
|
67
|
+
);
|
|
68
|
+
//>>includeStart('debug', pragmas.debug);
|
|
69
|
+
validateIonGeocodeProviderType(geocodeProviderType);
|
|
70
|
+
//>>includeEnd('debug');
|
|
71
|
+
|
|
28
72
|
const accessToken = defaultValue(options.accessToken, Ion.defaultAccessToken);
|
|
29
73
|
const server = Resource.createIfNeeded(
|
|
30
74
|
defaultValue(options.server, Ion.defaultServer),
|
|
@@ -49,6 +93,9 @@ function IonGeocoderService(options) {
|
|
|
49
93
|
this._accessToken = accessToken;
|
|
50
94
|
this._server = server;
|
|
51
95
|
this._pelias = new PeliasGeocoderService(searchEndpoint);
|
|
96
|
+
// geocoderProviderType isn't stored here directly but instead relies on the
|
|
97
|
+
// query parameters of this._pelias.url. Use the setter logic to update value.
|
|
98
|
+
this.geocodeProviderType = geocodeProviderType;
|
|
52
99
|
}
|
|
53
100
|
|
|
54
101
|
Object.defineProperties(IonGeocoderService.prototype, {
|
|
@@ -64,6 +111,31 @@ Object.defineProperties(IonGeocoderService.prototype, {
|
|
|
64
111
|
return undefined;
|
|
65
112
|
},
|
|
66
113
|
},
|
|
114
|
+
/**
|
|
115
|
+
* The geocoding service that Cesium ion API server should use to fulfill geocding requests.
|
|
116
|
+
* @memberof IonGeocoderService.prototype
|
|
117
|
+
* @type {IonGeocodeProviderType}
|
|
118
|
+
* @default IonGeocodeProviderType.DEFAULT
|
|
119
|
+
*/
|
|
120
|
+
geocodeProviderType: {
|
|
121
|
+
get: function () {
|
|
122
|
+
return queryParameterToProvider(
|
|
123
|
+
this._pelias.url.queryParameters["geocoder"],
|
|
124
|
+
);
|
|
125
|
+
},
|
|
126
|
+
set: function (geocodeProviderType) {
|
|
127
|
+
validateIonGeocodeProviderType(geocodeProviderType);
|
|
128
|
+
const query = {
|
|
129
|
+
...this._pelias.url.queryParameters,
|
|
130
|
+
geocoder: providerToQueryParameter(geocodeProviderType),
|
|
131
|
+
};
|
|
132
|
+
// Delete the geocoder parameter to prevent sending &geocoder=undefined in the query
|
|
133
|
+
if (!defined(query.geocoder)) {
|
|
134
|
+
delete query.geocoder;
|
|
135
|
+
}
|
|
136
|
+
this._pelias.url.setQueryParameters(query);
|
|
137
|
+
},
|
|
138
|
+
},
|
|
67
139
|
});
|
|
68
140
|
|
|
69
141
|
/**
|
package/Source/Core/Rectangle.js
CHANGED
|
@@ -7,7 +7,6 @@ import Ellipsoid from "./Ellipsoid.js";
|
|
|
7
7
|
import CesiumMath from "./Math.js";
|
|
8
8
|
import Transforms from "./Transforms.js";
|
|
9
9
|
import Matrix4 from "./Matrix4.js";
|
|
10
|
-
import deprecationWarning from "./deprecationWarning.js";
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* A two dimensional region specified as longitude and latitude coordinates.
|
|
@@ -533,25 +532,6 @@ Rectangle.prototype.equalsEpsilon = function (other, epsilon) {
|
|
|
533
532
|
return Rectangle.equalsEpsilon(this, other, epsilon);
|
|
534
533
|
};
|
|
535
534
|
|
|
536
|
-
/**
|
|
537
|
-
* Checks a Rectangle's properties and throws if they are not in valid ranges.
|
|
538
|
-
*
|
|
539
|
-
* @param {Rectangle} rectangle The rectangle to validate
|
|
540
|
-
*
|
|
541
|
-
* @exception {DeveloperError} <code>north</code> must be in the interval [<code>-Pi/2</code>, <code>Pi/2</code>].
|
|
542
|
-
* @exception {DeveloperError} <code>south</code> must be in the interval [<code>-Pi/2</code>, <code>Pi/2</code>].
|
|
543
|
-
* @exception {DeveloperError} <code>east</code> must be in the interval [<code>-Pi</code>, <code>Pi</code>].
|
|
544
|
-
* @exception {DeveloperError} <code>west</code> must be in the interval [<code>-Pi</code>, <code>Pi</code>].
|
|
545
|
-
* @deprecated This function is deprecated and will be removed in Cesium 1.124. See <a href="https://github.com/CesiumGS/cesium/issues/4921">Issue 4921</a>
|
|
546
|
-
*/
|
|
547
|
-
Rectangle.validate = function (rectangle) {
|
|
548
|
-
deprecationWarning(
|
|
549
|
-
"Rectangle.validate",
|
|
550
|
-
"Rectangle.validate is a no-op and has been deprecated. It will be removed in Cesium 1.124.",
|
|
551
|
-
);
|
|
552
|
-
return Rectangle._validate(rectangle);
|
|
553
|
-
};
|
|
554
|
-
|
|
555
535
|
/**
|
|
556
536
|
* Checks a Rectangle's properties and throws if they are not in valid ranges.
|
|
557
537
|
*
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constants for identifying well-known tracking reference frames.
|
|
3
|
+
*
|
|
4
|
+
* @enum {number}
|
|
5
|
+
*/
|
|
6
|
+
const TrackingReferenceFrame = {
|
|
7
|
+
/**
|
|
8
|
+
* Auto-detect algorithm. The reference frame used to track the Entity will
|
|
9
|
+
* be automatically selected based on its trajectory: near-surface slow moving
|
|
10
|
+
* objects will be tracked in the entity's local east-north-up reference
|
|
11
|
+
* frame, while faster objects like satellites will use VVLH (Vehicle Velocity,
|
|
12
|
+
* Local Horizontal).
|
|
13
|
+
*
|
|
14
|
+
* @type {number}
|
|
15
|
+
* @constant
|
|
16
|
+
*/
|
|
17
|
+
AUTODETECT: 0,
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The entity's local East-North-Up reference frame.
|
|
21
|
+
*
|
|
22
|
+
* @type {number}
|
|
23
|
+
* @constant
|
|
24
|
+
*/
|
|
25
|
+
ENU: 1,
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The entity's inertial reference frame. If entity has no defined orientation
|
|
29
|
+
* property, it falls back to auto-detect algorithm.
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @constant
|
|
33
|
+
*/
|
|
34
|
+
INERTIAL: 2,
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The entity's inertial reference frame with orientation fixed to its
|
|
38
|
+
* {@link VelocityOrientationProperty}, ignoring its own orientation.
|
|
39
|
+
*
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @constant
|
|
42
|
+
*/
|
|
43
|
+
VELOCITY: 3,
|
|
44
|
+
};
|
|
45
|
+
export default Object.freeze(TrackingReferenceFrame);
|
|
@@ -10,6 +10,7 @@ import CesiumMath from "../Core/Math.js";
|
|
|
10
10
|
import Matrix3 from "../Core/Matrix3.js";
|
|
11
11
|
import Matrix4 from "../Core/Matrix4.js";
|
|
12
12
|
import Quaternion from "../Core/Quaternion.js";
|
|
13
|
+
import TrackingReferenceFrame from "../Core/TrackingReferenceFrame.js";
|
|
13
14
|
import Transforms from "../Core/Transforms.js";
|
|
14
15
|
import GroundPolylinePrimitive from "../Scene/GroundPolylinePrimitive.js";
|
|
15
16
|
import GroundPrimitive from "../Scene/GroundPrimitive.js";
|
|
@@ -73,8 +74,9 @@ function createPropertyTypeDescriptor(name, Type) {
|
|
|
73
74
|
* @property {string} [name] A human readable name to display to users. It does not have to be unique.
|
|
74
75
|
* @property {TimeIntervalCollection} [availability] The availability, if any, associated with this object.
|
|
75
76
|
* @property {boolean} [show] A boolean value indicating if the entity and its children are displayed.
|
|
77
|
+
* @property {TrackingReferenceFrame} [trackingReferenceFrame=TrackingReferenceFrame.AUTODETECT] The reference frame used when this entity is being tracked. <br/> If <code>undefined</code>, reference frame is determined based on entity velocity: near-surface slow moving entities are tracked using the local east-north-up reference frame, whereas fast moving entities such as satellites are tracked using VVLH (Vehicle Velocity, Local Horizontal).
|
|
76
78
|
* @property {Property | string} [description] A string Property specifying an HTML description for this entity.
|
|
77
|
-
* @property {PositionProperty | Cartesian3 |
|
|
79
|
+
* @property {PositionProperty | Cartesian3 | CallbackPositionProperty} [position] A Property specifying the entity position.
|
|
78
80
|
* @property {Property | Quaternion} [orientation=Transforms.eastNorthUpToFixedFrame(position)] A Property specifying the entity orientation in respect to Earth-fixed-Earth-centered (ECEF). If undefined, east-north-up at entity position is used.
|
|
79
81
|
* @property {Property | Cartesian3} [viewFrom] A suggested initial offset for viewing this object.
|
|
80
82
|
* @property {Entity} [parent] A parent entity to associate with this entity.
|
|
@@ -122,6 +124,10 @@ function Entity(options) {
|
|
|
122
124
|
this._definitionChanged = new Event();
|
|
123
125
|
this._name = options.name;
|
|
124
126
|
this._show = defaultValue(options.show, true);
|
|
127
|
+
this._trackingReferenceFrame = defaultValue(
|
|
128
|
+
options.trackingReferenceFrame,
|
|
129
|
+
TrackingReferenceFrame.AUTODETECT,
|
|
130
|
+
);
|
|
125
131
|
this._parent = undefined;
|
|
126
132
|
this._propertyNames = [
|
|
127
133
|
"billboard",
|
|
@@ -296,6 +302,14 @@ Object.defineProperties(Entity.prototype, {
|
|
|
296
302
|
this._definitionChanged.raiseEvent(this, "show", value, !value);
|
|
297
303
|
},
|
|
298
304
|
},
|
|
305
|
+
/**
|
|
306
|
+
* Gets or sets the entity's tracking reference frame.
|
|
307
|
+
* @demo {@link https://sandcastle.cesium.com/index.html?src=Entity tracking.html|Cesium Sandcastle Entity tracking Demo}
|
|
308
|
+
*
|
|
309
|
+
* @memberof Entity.prototype
|
|
310
|
+
* @type {TrackingReferenceFrame}
|
|
311
|
+
*/
|
|
312
|
+
trackingReferenceFrame: createRawPropertyDescriptor("trackingReferenceFrame"),
|
|
299
313
|
/**
|
|
300
314
|
* Gets whether this entity is being displayed, taking into account
|
|
301
315
|
* the visibility of any ancestor entities.
|