/** * An enum to indicate the different types of {@link Cesium3DTileContent}. * For binary files, the enum value is the magic number of the binary file * unless otherwise noted. For JSON files, the enum value is a unique name * for internal use. * * @enum {String} * @see Cesium3DTileContent * * @private */ var Cesium3DTileContentType = { /** * A Batched 3D Model. This is a binary format with * magic number b3dm * * @type {String} * @constant * @private */ BATCHED_3D_MODEL: "b3dm", /** * An Instanced 3D Model. This is a binary format with magic number * i3dm * * @type {String} * @constant * @private */ INSTANCED_3D_MODEL: "i3dm", /** * A Composite model. This is a binary format with magic number * cmpt * * @type {String} * @constant * @private */ COMPOSITE: "cmpt", /** * A Point Cloud model. This is a binary format with magic number * pnts * * @type {String} * @constant * @private */ POINT_CLOUD: "pnts", /** * Vector tiles. This is a binary format with magic number * vctr * * @type {String} * @constant * @private */ VECTOR: "vctr", /** * Geometry tiles. This is a binary format with magic number * geom * * @type {String} * @constant * @private */ GEOMETRY: "geom", /** * A glTF model in JSON + external BIN form. This is treated * as a JSON format. * * @type {String} * @constant * @private * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. */ GLTF: "gltf", /** * The binary form of a glTF file. Internally, the magic number is * changed from glTF to glb to distinguish it from * the JSON glTF format. * * @type {String} * @constant * @private * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. */ GLTF_BINARY: "glb", /** * For the 3DTILES_implicit_tiling extension, * availability bitstreams are stored in binary subtree files. * The magic number is subt * * @type {String} * @constant * @private * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. */ IMPLICIT_SUBTREE: "subt", /** * Contents can reference another tileset.json to use * as an external tileset. This is a JSON-based format. * * @type {String} * @constant * @private */ EXTERNAL_TILESET: "externalTileset", /** * 3DTILES_multiple_contents is a 3D Tiles * extensions. This is handled separately from the other content types * due to differences in request scheduling. * * @type {String} * @constant * @private * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy. */ MULTIPLE_CONTENT: "multipleContent", }; /** * Check if a content is one of the supported binary formats. Otherwise, * the caller can assume a JSON format. * @param {Cesium3DTileContentType} contentType The content type of the content payload. * @return {Boolean} true if the content type is a binary format, or false if the content type is a JSON format. * @private */ Cesium3DTileContentType.isBinaryFormat = function (contentType) { switch (contentType) { case Cesium3DTileContentType.BATCHED_3D_MODEL: case Cesium3DTileContentType.INSTANCED_3D_MODEL: case Cesium3DTileContentType.COMPOSITE: case Cesium3DTileContentType.POINT_CLOUD: case Cesium3DTileContentType.VECTOR: case Cesium3DTileContentType.GEOMETRY: case Cesium3DTileContentType.IMPLICIT_SUBTREE: case Cesium3DTileContentType.GLTF_BINARY: return true; default: return false; } }; export default Object.freeze(Cesium3DTileContentType);