@cesium/engine 0.1.0 → 1.1.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/{AttributeCompression-4589338a.js → AttributeCompression-b646d393.js} +1 -1
- package/Build/Workers/{AxisAlignedBoundingBox-bfb1234f.js → AxisAlignedBoundingBox-a4321399.js} +1 -1
- package/Build/Workers/{BoundingRectangle-7ffc2153.js → BoundingRectangle-80d8801f.js} +1 -1
- package/Build/Workers/{BoxGeometry-93f344a3.js → BoxGeometry-33c10a4f.js} +1 -1
- package/Build/Workers/{Color-0c5aaf47.js → Color-1bf9a6e0.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-6597982a.js → CoplanarPolygonGeometryLibrary-5c5b981b.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-2119580e.js → CorridorGeometryLibrary-7cbae7a0.js} +1 -1
- package/Build/Workers/{CylinderGeometry-f9503c6d.js → CylinderGeometry-42740df0.js} +1 -1
- package/Build/Workers/{EllipseGeometry-fedf72d5.js → EllipseGeometry-49a3ac21.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-4ea68687.js → EllipseGeometryLibrary-b891b2f8.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-e2ae6a35.js → EllipseOutlineGeometry-fbd72e07.js} +1 -1
- package/Build/Workers/{EllipsoidGeodesic-16de63ea.js → EllipsoidGeodesic-98c62a56.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-95c0330e.js → EllipsoidGeometry-a351dba8.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-d6d2ceec.js → EllipsoidOutlineGeometry-3e8779bf.js} +1 -1
- package/Build/Workers/{EllipsoidRhumbLine-ae5e65e0.js → EllipsoidRhumbLine-19756602.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-bfc674bf.js → EllipsoidTangentPlane-cfb50678.js} +1 -1
- package/Build/Workers/{EncodedCartesian3-f473ea18.js → EncodedCartesian3-81f70735.js} +1 -1
- package/Build/Workers/{FrustumGeometry-3bf2e4eb.js → FrustumGeometry-c5754412.js} +1 -1
- package/Build/Workers/{GeometryAttribute-df5f473e.js → GeometryAttribute-0bfd05e8.js} +1 -1
- package/Build/Workers/{GeometryInstance-aa75b4cf.js → GeometryInstance-451dc1cd.js} +1 -1
- package/Build/Workers/{GeometryPipeline-f0e46c42.js → GeometryPipeline-0166905d.js} +1 -1
- package/Build/Workers/{IntersectionTests-9de29d51.js → IntersectionTests-a93d3de9.js} +1 -1
- package/Build/Workers/{Matrix2-ce637455.js → Matrix2-13178034.js} +4 -2
- package/Build/Workers/{Matrix3-4f4df527.js → Matrix3-315394f6.js} +2 -1
- package/Build/Workers/{OrientedBoundingBox-d3ff3d4d.js → OrientedBoundingBox-b450cb61.js} +5 -5
- package/Build/Workers/{Plane-b81241c2.js → Plane-900aa728.js} +1 -1
- package/Build/Workers/{PolygonGeometryLibrary-6f4937bb.js → PolygonGeometryLibrary-f918ac26.js} +1 -1
- package/Build/Workers/PolygonPipeline-f59a8f0a.js +1345 -0
- package/Build/Workers/{PolylinePipeline-2e2b015c.js → PolylinePipeline-d8e6bd9b.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-7ee1d449.js → PolylineVolumeGeometryLibrary-125d2edf.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-a9b7aae0.js → PrimitivePipeline-0d7b5ed4.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-9aa6c8f6.js → RectangleGeometryLibrary-0768db63.js} +1 -1
- package/Build/Workers/{TerrainEncoding-b52dcfc5.js → TerrainEncoding-06470d7f.js} +1 -1
- package/Build/Workers/{Transforms-2f755df8.js → Transforms-26539bce.js} +97 -83
- package/Build/Workers/{WallGeometryLibrary-ab19a93d.js → WallGeometryLibrary-6167b0fc.js} +1 -1
- package/Build/Workers/{WebMercatorProjection-9f25de49.js → WebMercatorProjection-13a90d41.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +25 -1
- package/Build/Workers/combineGeometry.js +1 -1
- package/Build/Workers/createBoxGeometry.js +1 -1
- package/Build/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Workers/createCircleGeometry.js +1 -1
- package/Build/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createCorridorGeometry.js +1 -1
- package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Workers/createCylinderGeometry.js +1 -1
- package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipseGeometry.js +1 -1
- package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Workers/createFrustumGeometry.js +1 -1
- package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Workers/createGeometry.js +1 -1
- package/Build/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Workers/createPlaneGeometry.js +1 -1
- package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Workers/createPolygonGeometry.js +1 -1
- package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Workers/createRectangleGeometry.js +1 -1
- package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createSphereGeometry.js +1 -1
- package/Build/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Workers/createVectorTileClampedPolylines.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePoints.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVectorTilePolylines.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +7 -3
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +1 -1
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +95 -76
- package/Build/Workers/decodeI3S.js +1 -1
- package/Build/Workers/package.js +25 -1
- package/Build/Workers/transferTypedArrayTest.js +25 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/README.md +9 -9
- package/Source/Core/EarthOrientationParameters.js +67 -63
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Matrix2.js +2 -1
- package/Source/Core/Matrix3.js +2 -1
- package/Source/Core/Matrix4.js +1 -0
- package/Source/Core/OrientedBoundingBox.js +4 -4
- package/Source/Core/S2Cell.js +3 -3
- package/Source/Core/Transforms.js +3 -7
- package/Source/DataSources/GpxDataSource.js +4 -6
- package/Source/DataSources/KmlDataSource.js +3 -5
- package/Source/Renderer/Context.js +230 -177
- package/Source/Renderer/Pass.js +3 -2
- package/Source/Scene/Cesium3DTileContentType.js +19 -0
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +482 -0
- package/Source/Scene/Cesium3DTilesetMetadata.js +2 -2
- package/Source/Scene/ContentMetadata.js +2 -2
- package/Source/Scene/DerivedCommand.js +7 -0
- package/Source/Scene/Expression.js +1 -1
- package/Source/Scene/Globe.js +10 -0
- package/Source/Scene/GlobeSurfaceTileProvider.js +7 -0
- package/Source/Scene/GltfImageLoader.js +1 -1
- package/Source/Scene/GltfVertexBufferLoader.js +10 -2
- package/Source/Scene/GroupMetadata.js +2 -2
- package/Source/Scene/I3SDataProvider.js +2 -1
- package/Source/Scene/I3SFeature.js +1 -1
- package/Source/Scene/I3SLayer.js +64 -2
- package/Source/Scene/I3SNode.js +50 -6
- package/Source/Scene/ImplicitMetadataView.js +2 -2
- package/Source/Scene/ImplicitSubtreeCache.js +127 -0
- package/Source/Scene/ImplicitSubtreeMetadata.js +2 -2
- package/Source/Scene/ImplicitTileset.js +3 -2
- package/Source/Scene/KeyframeNode.js +47 -0
- package/Source/Scene/Megatexture.js +490 -0
- package/Source/Scene/MetadataClass.js +60 -25
- package/Source/Scene/MetadataClassProperty.js +132 -68
- package/Source/Scene/MetadataComponentType.js +78 -57
- package/Source/Scene/MetadataEnum.js +59 -23
- package/Source/Scene/MetadataEnumValue.js +49 -15
- package/Source/Scene/MetadataSchema.js +53 -24
- package/Source/Scene/MetadataSchemaLoader.js +2 -2
- package/Source/Scene/MetadataTableProperty.js +2 -2
- package/Source/Scene/MetadataType.js +6 -14
- package/Source/Scene/Model/GeoJsonLoader.js +1 -1
- package/Source/Scene/Model/Model.js +38 -6
- package/Source/Scene/Model/buildDrawCommand.js +19 -11
- package/Source/Scene/PointCloud.js +1 -1
- package/Source/Scene/PropertyAttribute.js +2 -2
- package/Source/Scene/PropertyAttributeProperty.js +2 -2
- package/Source/Scene/PropertyTable.js +2 -2
- package/Source/Scene/PropertyTexture.js +2 -2
- package/Source/Scene/PropertyTextureProperty.js +2 -2
- package/Source/Scene/ResourceCache.js +9 -1
- package/Source/Scene/ResourceCacheKey.js +9 -1
- package/Source/Scene/Scene.js +20 -50
- package/Source/Scene/SpatialNode.js +375 -0
- package/Source/Scene/StructuralMetadata.js +2 -2
- package/Source/Scene/TileMetadata.js +2 -2
- package/Source/Scene/TilesetMetadata.js +2 -2
- package/Source/Scene/VoxelBoxShape.js +527 -0
- package/Source/Scene/VoxelContent.js +169 -0
- package/Source/Scene/VoxelCylinderShape.js +937 -0
- package/Source/Scene/VoxelEllipsoidShape.js +937 -0
- package/Source/Scene/VoxelPrimitive.js +1919 -0
- package/Source/Scene/VoxelProvider.js +255 -0
- package/Source/Scene/VoxelRenderResources.js +224 -0
- package/Source/Scene/VoxelShape.js +152 -0
- package/Source/Scene/VoxelShapeType.js +105 -0
- package/Source/Scene/VoxelTraversal.js +1144 -0
- package/Source/Scene/buildVoxelDrawCommands.js +116 -0
- package/Source/Scene/parseBatchTable.js +18 -2
- package/Source/Scene/preprocess3DTileContent.js +8 -0
- package/Source/Scene/processVoxelProperties.js +455 -0
- package/Source/Shaders/BillboardCollectionVS.glsl +1 -1
- package/Source/Shaders/BillboardCollectionVS.js +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/Constants/passVoxels.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passVoxels.js +11 -0
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.glsl +55 -43
- package/Source/Shaders/Builtin/Functions/windowToEyeCoordinates.js +55 -43
- package/Source/Shaders/GlobeFS.glsl +2 -1
- package/Source/Shaders/GlobeFS.js +2 -1
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +5 -2
- package/Source/Shaders/PointPrimitiveCollectionVS.js +5 -2
- package/Source/Shaders/Voxels/IntersectBox.glsl +79 -0
- package/Source/Shaders/Voxels/IntersectBox.js +81 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.glsl +70 -0
- package/Source/Shaders/Voxels/IntersectClippingPlanes.js +72 -0
- package/Source/Shaders/Voxels/IntersectCylinder.glsl +273 -0
- package/Source/Shaders/Voxels/IntersectCylinder.js +275 -0
- package/Source/Shaders/Voxels/IntersectDepth.glsl +23 -0
- package/Source/Shaders/Voxels/IntersectDepth.js +25 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.glsl +337 -0
- package/Source/Shaders/Voxels/IntersectEllipsoid.js +339 -0
- package/Source/Shaders/Voxels/Intersection.glsl +54 -0
- package/Source/Shaders/Voxels/Intersection.js +56 -0
- package/Source/Shaders/Voxels/IntersectionUtils.glsl +151 -0
- package/Source/Shaders/Voxels/IntersectionUtils.js +153 -0
- package/Source/Shaders/Voxels/Megatexture.glsl +136 -0
- package/Source/Shaders/Voxels/Megatexture.js +138 -0
- package/Source/Shaders/Voxels/Octree.glsl +221 -0
- package/Source/Shaders/Voxels/Octree.js +223 -0
- package/Source/Shaders/Voxels/VoxelFS.glsl +150 -0
- package/Source/Shaders/Voxels/VoxelFS.js +152 -0
- package/Source/Shaders/Voxels/VoxelVS.glsl +11 -0
- package/Source/Shaders/Voxels/VoxelVS.js +13 -0
- package/Source/Shaders/Voxels/convertUvToBox.glsl +16 -0
- package/Source/Shaders/Voxels/convertUvToBox.js +18 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +79 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.js +81 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.glsl +133 -0
- package/Source/Shaders/Voxels/convertUvToEllipsoid.js +135 -0
- package/Source/ThirdParty/Workers/draco_decoder_nodejs.js +100 -101
- package/Source/ThirdParty/Workers/pako_deflate.min.js +2 -2
- package/Source/ThirdParty/Workers/pako_inflate.min.js +2 -2
- package/Source/ThirdParty/draco_decoder.wasm +0 -0
- package/Source/Widget/CesiumWidget.js +1 -1
- package/index.d.ts +961 -56
- package/index.js +92 -60
- package/package.json +6 -4
- package/Build/ThirdParty/Workers/basis_transcoder.js +0 -2233
- package/Build/ThirdParty/Workers/draco_decoder_nodejs.js +0 -1872
- package/Build/ThirdParty/Workers/package.json +0 -1
- package/Build/ThirdParty/Workers/pako_deflate.min.js +0 -589
- package/Build/ThirdParty/Workers/pako_inflate.min.js +0 -798
- package/Build/ThirdParty/Workers/z-worker-pako.js +0 -503
- package/Build/ThirdParty/basis_transcoder.wasm +0 -0
- package/Build/ThirdParty/draco_decoder.wasm +0 -0
- package/Build/ThirdParty/google-earth-dbroot-parser.js +0 -8019
- package/Build/Widget/CesiumWidget.css +0 -120
- package/Build/Widget/lighter.css +0 -13
- package/Build/Workers/PolygonPipeline-774a8aaf.js +0 -1341
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Check from "../Core/Check.js";
|
|
2
|
+
import clone from "../Core/clone.js";
|
|
3
|
+
import defaultValue from "../Core/defaultValue.js";
|
|
2
4
|
import defined from "../Core/defined.js";
|
|
3
5
|
import MetadataClass from "./MetadataClass.js";
|
|
4
6
|
import MetadataEnum from "./MetadataEnum.js";
|
|
@@ -6,17 +8,50 @@ import MetadataEnum from "./MetadataEnum.js";
|
|
|
6
8
|
/**
|
|
7
9
|
* A schema containing classes and enums.
|
|
8
10
|
* <p>
|
|
9
|
-
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/
|
|
11
|
+
* See the {@link https://github.com/CesiumGS/3d-tiles/tree/main/specification/Metadata|3D Metadata Specification} for 3D Tiles
|
|
10
12
|
* </p>
|
|
11
13
|
*
|
|
12
|
-
* @param {Object}
|
|
14
|
+
* @param {Object} options Object with the following properties:
|
|
15
|
+
* @param {String} [options.id] The ID of the schema
|
|
16
|
+
* @param {String} [options.name] The name of the schema.
|
|
17
|
+
* @param {String} [options.description] The description of the schema.
|
|
18
|
+
* @param {String} [options.version] The application-specific version of the schema.
|
|
19
|
+
* @param {Object.<String, MetadataClass>} [options.classes] Classes defined in the schema, where each key is the class ID.
|
|
20
|
+
* @param {Object.<String, MetadataEnum>} [options.enums] Enums defined in the schema, where each key is the enum ID.
|
|
21
|
+
* @param {*} [options.extras] Extra user-defined properties.
|
|
22
|
+
* @param {Object} [options.extensions] An object containing extensions.
|
|
13
23
|
*
|
|
14
24
|
* @alias MetadataSchema
|
|
15
25
|
* @constructor
|
|
26
|
+
* @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.
|
|
27
|
+
*/
|
|
28
|
+
function MetadataSchema(options) {
|
|
29
|
+
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
30
|
+
|
|
31
|
+
const classes = defaultValue(options.classes, {});
|
|
32
|
+
const enums = defaultValue(options.enums, {});
|
|
33
|
+
|
|
34
|
+
this._classes = classes;
|
|
35
|
+
this._enums = enums;
|
|
36
|
+
this._id = options.id;
|
|
37
|
+
this._name = options.name;
|
|
38
|
+
this._description = options.description;
|
|
39
|
+
this._version = options.version;
|
|
40
|
+
this._extras = clone(options.extras, true);
|
|
41
|
+
this._extensions = clone(options.extensions, true);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Creates a {@link MetadataSchema} from either 3D Tiles 1.1, 3DTILES_metadata, EXT_structural_metadata, or EXT_feature_metadata.
|
|
46
|
+
*
|
|
47
|
+
* @param {Object} schema The schema JSON object.
|
|
48
|
+
*
|
|
49
|
+
* @returns {MetadataSchema} The newly created metadata schema
|
|
50
|
+
*
|
|
16
51
|
* @private
|
|
17
52
|
* @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.
|
|
18
53
|
*/
|
|
19
|
-
function
|
|
54
|
+
MetadataSchema.fromJson = function (schema) {
|
|
20
55
|
//>>includeStart('debug', pragmas.debug);
|
|
21
56
|
Check.typeOf.object("schema", schema);
|
|
22
57
|
//>>includeEnd('debug');
|
|
@@ -25,7 +60,7 @@ function MetadataSchema(schema) {
|
|
|
25
60
|
if (defined(schema.enums)) {
|
|
26
61
|
for (const enumId in schema.enums) {
|
|
27
62
|
if (schema.enums.hasOwnProperty(enumId)) {
|
|
28
|
-
enums[enumId] =
|
|
63
|
+
enums[enumId] = MetadataEnum.fromJson({
|
|
29
64
|
id: enumId,
|
|
30
65
|
enum: schema.enums[enumId],
|
|
31
66
|
});
|
|
@@ -37,7 +72,7 @@ function MetadataSchema(schema) {
|
|
|
37
72
|
if (defined(schema.classes)) {
|
|
38
73
|
for (const classId in schema.classes) {
|
|
39
74
|
if (schema.classes.hasOwnProperty(classId)) {
|
|
40
|
-
classes[classId] =
|
|
75
|
+
classes[classId] = MetadataClass.fromJson({
|
|
41
76
|
id: classId,
|
|
42
77
|
class: schema.classes[classId],
|
|
43
78
|
enums: enums,
|
|
@@ -46,15 +81,17 @@ function MetadataSchema(schema) {
|
|
|
46
81
|
}
|
|
47
82
|
}
|
|
48
83
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
84
|
+
return new MetadataSchema({
|
|
85
|
+
id: schema.id,
|
|
86
|
+
name: schema.name,
|
|
87
|
+
description: schema.description,
|
|
88
|
+
version: schema.version,
|
|
89
|
+
classes: classes,
|
|
90
|
+
enums: enums,
|
|
91
|
+
extras: schema.extras,
|
|
92
|
+
extensions: schema.extensions,
|
|
93
|
+
});
|
|
94
|
+
};
|
|
58
95
|
|
|
59
96
|
Object.defineProperties(MetadataSchema.prototype, {
|
|
60
97
|
/**
|
|
@@ -63,7 +100,6 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
63
100
|
* @memberof MetadataSchema.prototype
|
|
64
101
|
* @type {Object.<String, MetadataClass>}
|
|
65
102
|
* @readonly
|
|
66
|
-
* @private
|
|
67
103
|
*/
|
|
68
104
|
classes: {
|
|
69
105
|
get: function () {
|
|
@@ -77,7 +113,6 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
77
113
|
* @memberof MetadataSchema.prototype
|
|
78
114
|
* @type {Object.<String, MetadataEnum>}
|
|
79
115
|
* @readonly
|
|
80
|
-
* @private
|
|
81
116
|
*/
|
|
82
117
|
enums: {
|
|
83
118
|
get: function () {
|
|
@@ -91,7 +126,6 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
91
126
|
* @memberof MetadataSchema.prototype
|
|
92
127
|
* @type {String}
|
|
93
128
|
* @readonly
|
|
94
|
-
* @private
|
|
95
129
|
*/
|
|
96
130
|
id: {
|
|
97
131
|
get: function () {
|
|
@@ -105,7 +139,6 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
105
139
|
* @memberof MetadataSchema.prototype
|
|
106
140
|
* @type {String}
|
|
107
141
|
* @readonly
|
|
108
|
-
* @private
|
|
109
142
|
*/
|
|
110
143
|
name: {
|
|
111
144
|
get: function () {
|
|
@@ -119,7 +152,6 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
119
152
|
* @memberof MetadataSchema.prototype
|
|
120
153
|
* @type {String}
|
|
121
154
|
* @readonly
|
|
122
|
-
* @private
|
|
123
155
|
*/
|
|
124
156
|
description: {
|
|
125
157
|
get: function () {
|
|
@@ -133,7 +165,6 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
133
165
|
* @memberof MetadataSchema.prototype
|
|
134
166
|
* @type {String}
|
|
135
167
|
* @readonly
|
|
136
|
-
* @private
|
|
137
168
|
*/
|
|
138
169
|
version: {
|
|
139
170
|
get: function () {
|
|
@@ -142,12 +173,11 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
142
173
|
},
|
|
143
174
|
|
|
144
175
|
/**
|
|
145
|
-
*
|
|
176
|
+
* Extra user-defined properties.
|
|
146
177
|
*
|
|
147
178
|
* @memberof MetadataSchema.prototype
|
|
148
179
|
* @type {*}
|
|
149
180
|
* @readonly
|
|
150
|
-
* @private
|
|
151
181
|
*/
|
|
152
182
|
extras: {
|
|
153
183
|
get: function () {
|
|
@@ -156,12 +186,11 @@ Object.defineProperties(MetadataSchema.prototype, {
|
|
|
156
186
|
},
|
|
157
187
|
|
|
158
188
|
/**
|
|
159
|
-
*
|
|
189
|
+
* An object containing extensions.
|
|
160
190
|
*
|
|
161
191
|
* @memberof MetadataSchema.prototype
|
|
162
192
|
* @type {Object}
|
|
163
193
|
* @readonly
|
|
164
|
-
* @private
|
|
165
194
|
*/
|
|
166
195
|
extensions: {
|
|
167
196
|
get: function () {
|
|
@@ -39,7 +39,7 @@ function MetadataSchemaLoader(options) {
|
|
|
39
39
|
}
|
|
40
40
|
//>>includeEnd('debug');
|
|
41
41
|
|
|
42
|
-
this._schema = defined(schema) ?
|
|
42
|
+
this._schema = defined(schema) ? MetadataSchema.fromJson(schema) : undefined;
|
|
43
43
|
this._resource = resource;
|
|
44
44
|
this._cacheKey = cacheKey;
|
|
45
45
|
this._state = ResourceLoaderState.UNLOADED;
|
|
@@ -120,7 +120,7 @@ function loadExternalSchema(schemaLoader) {
|
|
|
120
120
|
if (schemaLoader.isDestroyed()) {
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
schemaLoader._schema =
|
|
123
|
+
schemaLoader._schema = MetadataSchema.fromJson(json);
|
|
124
124
|
schemaLoader._state = ResourceLoaderState.READY;
|
|
125
125
|
return schemaLoader;
|
|
126
126
|
})
|
|
@@ -265,7 +265,7 @@ Object.defineProperties(MetadataTableProperty.prototype, {
|
|
|
265
265
|
},
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
|
-
*
|
|
268
|
+
* Extra user-defined properties.
|
|
269
269
|
*
|
|
270
270
|
* @memberof MetadataTableProperty.prototype
|
|
271
271
|
* @type {*}
|
|
@@ -279,7 +279,7 @@ Object.defineProperties(MetadataTableProperty.prototype, {
|
|
|
279
279
|
},
|
|
280
280
|
|
|
281
281
|
/**
|
|
282
|
-
*
|
|
282
|
+
* An object containing extensions.
|
|
283
283
|
*
|
|
284
284
|
* @memberof MetadataTableProperty.prototype
|
|
285
285
|
* @type {*}
|
|
@@ -11,8 +11,7 @@ import Matrix4 from "../Core/Matrix4.js";
|
|
|
11
11
|
* An enum of metadata types. These metadata types are containers containing
|
|
12
12
|
* one or more components of type {@link MetadataComponentType}
|
|
13
13
|
*
|
|
14
|
-
* @enum
|
|
15
|
-
* @private
|
|
14
|
+
* @enum {String}
|
|
16
15
|
* @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.
|
|
17
16
|
*/
|
|
18
17
|
const MetadataType = {
|
|
@@ -21,7 +20,6 @@ const MetadataType = {
|
|
|
21
20
|
*
|
|
22
21
|
* @type {String}
|
|
23
22
|
* @constant
|
|
24
|
-
* @private
|
|
25
23
|
*/
|
|
26
24
|
SCALAR: "SCALAR",
|
|
27
25
|
/**
|
|
@@ -29,7 +27,6 @@ const MetadataType = {
|
|
|
29
27
|
*
|
|
30
28
|
* @type {String}
|
|
31
29
|
* @constant
|
|
32
|
-
* @private
|
|
33
30
|
*/
|
|
34
31
|
VEC2: "VEC2",
|
|
35
32
|
/**
|
|
@@ -37,7 +34,6 @@ const MetadataType = {
|
|
|
37
34
|
*
|
|
38
35
|
* @type {String}
|
|
39
36
|
* @constant
|
|
40
|
-
* @private
|
|
41
37
|
*/
|
|
42
38
|
VEC3: "VEC3",
|
|
43
39
|
/**
|
|
@@ -45,7 +41,6 @@ const MetadataType = {
|
|
|
45
41
|
*
|
|
46
42
|
* @type {String}
|
|
47
43
|
* @constant
|
|
48
|
-
* @private
|
|
49
44
|
*/
|
|
50
45
|
VEC4: "VEC4",
|
|
51
46
|
/**
|
|
@@ -53,23 +48,20 @@ const MetadataType = {
|
|
|
53
48
|
*
|
|
54
49
|
* @type {String}
|
|
55
50
|
* @constant
|
|
56
|
-
* @private
|
|
57
51
|
*/
|
|
58
52
|
MAT2: "MAT2",
|
|
59
53
|
/**
|
|
60
|
-
* A
|
|
54
|
+
* A 3x3 matrix, stored in column-major format.
|
|
61
55
|
*
|
|
62
56
|
* @type {String}
|
|
63
57
|
* @constant
|
|
64
|
-
* @private
|
|
65
58
|
*/
|
|
66
59
|
MAT3: "MAT3",
|
|
67
60
|
/**
|
|
68
|
-
* A
|
|
61
|
+
* A 4x4 matrix, stored in column-major format.
|
|
69
62
|
*
|
|
70
63
|
* @type {String}
|
|
71
64
|
* @constant
|
|
72
|
-
* @private
|
|
73
65
|
*/
|
|
74
66
|
MAT4: "MAT4",
|
|
75
67
|
/**
|
|
@@ -77,7 +69,6 @@ const MetadataType = {
|
|
|
77
69
|
*
|
|
78
70
|
* @type {String}
|
|
79
71
|
* @constant
|
|
80
|
-
* @private
|
|
81
72
|
*/
|
|
82
73
|
BOOLEAN: "BOOLEAN",
|
|
83
74
|
/**
|
|
@@ -85,7 +76,6 @@ const MetadataType = {
|
|
|
85
76
|
*
|
|
86
77
|
* @type {String}
|
|
87
78
|
* @constant
|
|
88
|
-
* @private
|
|
89
79
|
*/
|
|
90
80
|
STRING: "STRING",
|
|
91
81
|
/**
|
|
@@ -95,7 +85,6 @@ const MetadataType = {
|
|
|
95
85
|
*
|
|
96
86
|
* @type {String}
|
|
97
87
|
* @constant
|
|
98
|
-
* @private
|
|
99
88
|
*/
|
|
100
89
|
ENUM: "ENUM",
|
|
101
90
|
};
|
|
@@ -105,6 +94,7 @@ const MetadataType = {
|
|
|
105
94
|
*
|
|
106
95
|
* @param {MetadataType} type The type
|
|
107
96
|
* @return {Boolean} <code>true</code> if the type is a vector, <code>false</code> otherwise
|
|
97
|
+
* @private
|
|
108
98
|
*/
|
|
109
99
|
MetadataType.isVectorType = function (type) {
|
|
110
100
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -126,6 +116,7 @@ MetadataType.isVectorType = function (type) {
|
|
|
126
116
|
*
|
|
127
117
|
* @param {MetadataType} type The type
|
|
128
118
|
* @return {Boolean} <code>true</code> if the type is a matrix, <code>false</code> otherwise
|
|
119
|
+
* @private
|
|
129
120
|
*/
|
|
130
121
|
MetadataType.isMatrixType = function (type) {
|
|
131
122
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -148,6 +139,7 @@ MetadataType.isMatrixType = function (type) {
|
|
|
148
139
|
*
|
|
149
140
|
* @param {MetadataType} type The type to get the component count for
|
|
150
141
|
* @return {Number} The number of components
|
|
142
|
+
* @private
|
|
151
143
|
*/
|
|
152
144
|
MetadataType.getComponentCount = function (type) {
|
|
153
145
|
//>>includeStart('debug', pragmas.debug);
|
|
@@ -606,7 +606,7 @@ function parse(geoJson, frameState) {
|
|
|
606
606
|
});
|
|
607
607
|
const propertyTables = [propertyTable];
|
|
608
608
|
|
|
609
|
-
const schema =
|
|
609
|
+
const schema = MetadataSchema.fromJson({});
|
|
610
610
|
|
|
611
611
|
const structuralMetadata = new StructuralMetadata({
|
|
612
612
|
schema: schema,
|
|
@@ -49,22 +49,55 @@ import StyleCommandsNeeded from "./StyleCommandsNeeded.js";
|
|
|
49
49
|
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations/README.md|AGI_articulations}
|
|
50
50
|
* </li>
|
|
51
51
|
* <li>
|
|
52
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/CESIUM_primitive_outline|CESIUM_primitive_outline}
|
|
53
|
+
* </li>
|
|
54
|
+
* <li>
|
|
55
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/1.0/Vendor/CESIUM_RTC/README.md|CESIUM_RTC}
|
|
56
|
+
* </li>
|
|
57
|
+
* <li>
|
|
58
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_instance_features|EXT_instance_features}
|
|
59
|
+
* </li>
|
|
60
|
+
* <li>
|
|
61
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_mesh_features|EXT_mesh_features}
|
|
62
|
+
* </li>
|
|
63
|
+
* <li>
|
|
64
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_mesh_gpu_instancing|EXT_mesh_gpu_instancing}
|
|
65
|
+
* </li>
|
|
66
|
+
* <li>
|
|
67
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_meshopt_compression|EXT_meshopt_compression}
|
|
68
|
+
* </li>
|
|
69
|
+
* <li>
|
|
70
|
+
* {@link https://github.com/CesiumGS/glTF/tree/3d-tiles-next/extensions/2.0/Vendor/EXT_structural_metadata|EXT_structural_metadata}
|
|
71
|
+
* </li>
|
|
72
|
+
* <li>
|
|
73
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Vendor/EXT_texture_webp|EXT_texture_webp}
|
|
74
|
+
* </li>
|
|
75
|
+
* <li>
|
|
52
76
|
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_draco_mesh_compression/README.md|KHR_draco_mesh_compression}
|
|
53
77
|
* </li>
|
|
54
78
|
* <li>
|
|
55
|
-
* {@link https://github.com/KhronosGroup/glTF/
|
|
79
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Archived/KHR_techniques_webgl/README.md|KHR_techniques_webgl}
|
|
80
|
+
* </li>
|
|
81
|
+
* <li>
|
|
82
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Khronos/KHR_materials_common/README.md|KHR_materials_common}
|
|
83
|
+
* </li>
|
|
84
|
+
* <li>
|
|
85
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Archived/KHR_materials_pbrSpecularGlossiness|KHR_materials_pbrSpecularGlossiness}
|
|
56
86
|
* </li>
|
|
57
87
|
* <li>
|
|
58
88
|
* {@link https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit/README.md|KHR_materials_unlit}
|
|
59
89
|
* </li>
|
|
60
90
|
* <li>
|
|
61
|
-
* {@link https://github.com/KhronosGroup/glTF/
|
|
91
|
+
* {@link https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_mesh_quantization|KHR_mesh_quantization}
|
|
62
92
|
* </li>
|
|
63
93
|
* <li>
|
|
64
94
|
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_basisu|KHR_texture_basisu}
|
|
65
95
|
* </li>
|
|
66
96
|
* <li>
|
|
67
|
-
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/
|
|
97
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_texture_transform/README.md|KHR_texture_transform}
|
|
98
|
+
* </li>
|
|
99
|
+
* <li>
|
|
100
|
+
* {@link https://github.com/KhronosGroup/glTF/blob/main/extensions/1.0/Vendor/WEB3D_quantized_attributes/README.md|WEB3D_quantized_attributes}
|
|
68
101
|
* </li>
|
|
69
102
|
* </ul>
|
|
70
103
|
* </p>
|
|
@@ -2066,9 +2099,8 @@ function updateComputedScale(model, modelMatrix, frameState) {
|
|
|
2066
2099
|
context.drawingBufferWidth,
|
|
2067
2100
|
context.drawingBufferHeight
|
|
2068
2101
|
);
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
scratchPosition.z = modelMatrix[14];
|
|
2102
|
+
|
|
2103
|
+
Matrix4.getTranslation(modelMatrix, scratchPosition);
|
|
2072
2104
|
|
|
2073
2105
|
if (model._sceneMode !== SceneMode.SCENE3D) {
|
|
2074
2106
|
SceneTransforms.computeActualWgs84Position(
|
|
@@ -48,21 +48,29 @@ function buildDrawCommand(primitiveRenderResources, frameState) {
|
|
|
48
48
|
const pass = primitiveRenderResources.alphaOptions.pass;
|
|
49
49
|
const sceneGraph = model.sceneGraph;
|
|
50
50
|
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
const is3D = frameState.mode === SceneMode.SCENE3D;
|
|
52
|
+
let modelMatrix, boundingSphere;
|
|
53
|
+
|
|
54
|
+
if (!is3D && !frameState.scene3DOnly && model._projectTo2D) {
|
|
55
|
+
modelMatrix = Matrix4.multiplyTransformation(
|
|
56
|
+
sceneGraph._computedModelMatrix,
|
|
57
|
+
primitiveRenderResources.runtimeNode.computedTransform,
|
|
58
|
+
new Matrix4()
|
|
59
|
+
);
|
|
56
60
|
|
|
57
|
-
let boundingSphere;
|
|
58
|
-
if (
|
|
59
|
-
frameState.mode !== SceneMode.SCENE3D &&
|
|
60
|
-
!frameState.scene3DOnly &&
|
|
61
|
-
model._projectTo2D
|
|
62
|
-
) {
|
|
63
61
|
const runtimePrimitive = primitiveRenderResources.runtimePrimitive;
|
|
64
62
|
boundingSphere = runtimePrimitive.boundingSphere2D;
|
|
65
63
|
} else {
|
|
64
|
+
const computedModelMatrix = is3D
|
|
65
|
+
? sceneGraph._computedModelMatrix
|
|
66
|
+
: sceneGraph._computedModelMatrix2D;
|
|
67
|
+
|
|
68
|
+
modelMatrix = Matrix4.multiplyTransformation(
|
|
69
|
+
computedModelMatrix,
|
|
70
|
+
primitiveRenderResources.runtimeNode.computedTransform,
|
|
71
|
+
new Matrix4()
|
|
72
|
+
);
|
|
73
|
+
|
|
66
74
|
boundingSphere = BoundingSphere.transform(
|
|
67
75
|
primitiveRenderResources.boundingSphere,
|
|
68
76
|
modelMatrix,
|
|
@@ -347,7 +347,7 @@ function prepareVertexAttribute(typedArray, name) {
|
|
|
347
347
|
) {
|
|
348
348
|
oneTimeWarning(
|
|
349
349
|
"Cast pnts property to floats",
|
|
350
|
-
`Point cloud property "${name}" will be
|
|
350
|
+
`Point cloud property "${name}" will be cast to a float array because INT, UNSIGNED_INT, and DOUBLE are not valid WebGL vertex attribute types. Some precision may be lost.`
|
|
351
351
|
);
|
|
352
352
|
return new Float32Array(typedArray);
|
|
353
353
|
}
|
|
@@ -112,7 +112,7 @@ Object.defineProperties(PropertyAttribute.prototype, {
|
|
|
112
112
|
},
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* Extra user-defined properties.
|
|
116
116
|
*
|
|
117
117
|
* @memberof PropertyAttribute.prototype
|
|
118
118
|
*
|
|
@@ -127,7 +127,7 @@ Object.defineProperties(PropertyAttribute.prototype, {
|
|
|
127
127
|
},
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* An object containing extensions.
|
|
131
131
|
*
|
|
132
132
|
* @memberof PropertyAttribute.prototype
|
|
133
133
|
*
|
|
@@ -134,7 +134,7 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
|
|
|
134
134
|
},
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
137
|
+
* Extra user-defined properties.
|
|
138
138
|
*
|
|
139
139
|
* @memberof PropertyAttributeProperty.prototype
|
|
140
140
|
* @type {*}
|
|
@@ -148,7 +148,7 @@ Object.defineProperties(PropertyAttributeProperty.prototype, {
|
|
|
148
148
|
},
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
|
-
*
|
|
151
|
+
* An object containing extensions.
|
|
152
152
|
*
|
|
153
153
|
* @memberof PropertyAttributeProperty.prototype
|
|
154
154
|
* @type {*}
|
|
@@ -113,7 +113,7 @@ Object.defineProperties(PropertyTable.prototype, {
|
|
|
113
113
|
},
|
|
114
114
|
|
|
115
115
|
/**
|
|
116
|
-
*
|
|
116
|
+
* Extra user-defined properties.
|
|
117
117
|
*
|
|
118
118
|
* @memberof PropertyTable.prototype
|
|
119
119
|
* @type {*}
|
|
@@ -127,7 +127,7 @@ Object.defineProperties(PropertyTable.prototype, {
|
|
|
127
127
|
},
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* An object containing extensions.
|
|
131
131
|
*
|
|
132
132
|
* @memberof PropertyTable.prototype
|
|
133
133
|
* @type {Object}
|
|
@@ -116,7 +116,7 @@ Object.defineProperties(PropertyTexture.prototype, {
|
|
|
116
116
|
},
|
|
117
117
|
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Extra user-defined properties.
|
|
120
120
|
*
|
|
121
121
|
* @memberof PropertyTexture.prototype
|
|
122
122
|
* @type {*}
|
|
@@ -130,7 +130,7 @@ Object.defineProperties(PropertyTexture.prototype, {
|
|
|
130
130
|
},
|
|
131
131
|
|
|
132
132
|
/**
|
|
133
|
-
*
|
|
133
|
+
* An object containing extensions.
|
|
134
134
|
*
|
|
135
135
|
* @memberof PropertyTexture.prototype
|
|
136
136
|
* @type {Object}
|
|
@@ -150,7 +150,7 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
|
|
|
150
150
|
},
|
|
151
151
|
|
|
152
152
|
/**
|
|
153
|
-
*
|
|
153
|
+
* Extra user-defined properties.
|
|
154
154
|
*
|
|
155
155
|
* @memberof PropertyTextureProperty.prototype
|
|
156
156
|
* @type {*}
|
|
@@ -164,7 +164,7 @@ Object.defineProperties(PropertyTextureProperty.prototype, {
|
|
|
164
164
|
},
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
|
-
*
|
|
167
|
+
* An object containing extensions.
|
|
168
168
|
*
|
|
169
169
|
* @memberof PropertyTextureProperty.prototype
|
|
170
170
|
* @type {*}
|
|
@@ -476,7 +476,7 @@ ResourceCache.loadVertexBuffer = function (options) {
|
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
const hasBufferViewId = defined(bufferViewId);
|
|
479
|
-
const hasDraco =
|
|
479
|
+
const hasDraco = hasDracoCompression(draco, attributeSemantic);
|
|
480
480
|
const hasAttributeSemantic = defined(attributeSemantic);
|
|
481
481
|
const hasAccessorId = defined(accessorId);
|
|
482
482
|
|
|
@@ -553,6 +553,14 @@ ResourceCache.loadVertexBuffer = function (options) {
|
|
|
553
553
|
return vertexBufferLoader;
|
|
554
554
|
};
|
|
555
555
|
|
|
556
|
+
function hasDracoCompression(draco, semantic) {
|
|
557
|
+
return (
|
|
558
|
+
defined(draco) &&
|
|
559
|
+
defined(draco.attributes) &&
|
|
560
|
+
defined(draco.attributes[semantic])
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
|
|
556
564
|
/**
|
|
557
565
|
* Loads a glTF index buffer from the cache.
|
|
558
566
|
*
|
|
@@ -327,7 +327,7 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
|
|
|
327
327
|
Check.typeOf.object("options.frameState", frameState);
|
|
328
328
|
|
|
329
329
|
const hasBufferViewId = defined(bufferViewId);
|
|
330
|
-
const hasDraco =
|
|
330
|
+
const hasDraco = hasDracoCompression(draco, attributeSemantic);
|
|
331
331
|
const hasAttributeSemantic = defined(attributeSemantic);
|
|
332
332
|
|
|
333
333
|
if (hasBufferViewId === hasDraco) {
|
|
@@ -394,6 +394,14 @@ ResourceCacheKey.getVertexBufferCacheKey = function (options) {
|
|
|
394
394
|
return `vertex-buffer:${bufferCacheKey}-range-${bufferViewCacheKey}${cacheKeySuffix}`;
|
|
395
395
|
};
|
|
396
396
|
|
|
397
|
+
function hasDracoCompression(draco, semantic) {
|
|
398
|
+
return (
|
|
399
|
+
defined(draco) &&
|
|
400
|
+
defined(draco.attributes) &&
|
|
401
|
+
defined(draco.attributes[semantic])
|
|
402
|
+
);
|
|
403
|
+
}
|
|
404
|
+
|
|
397
405
|
/**
|
|
398
406
|
* Gets the index buffer cache key.
|
|
399
407
|
*
|