diff --git a/Source/Scene/Cesium3DTileset.js b/Source/Scene/Cesium3DTileset.js index 7ad4400326b..7486706a8b8 100644 --- a/Source/Scene/Cesium3DTileset.js +++ b/Source/Scene/Cesium3DTileset.js @@ -388,6 +388,17 @@ define([ this.debugShowGeometricError = defaultValue(options.debugShowGeometricError, false); this._tileInfoLabels = undefined; + /** + * This property is for debugging only; it is not optimized for production use. + *

+ * When true, draws label displaying tile info only for picked tile. + *

+ * + * @type {Boolean} + * @default false + */ + this.debugShowOnlyPickedTile = defaultValue(options.debugShowOnlyPickedTile, false); + /** * This property is for debugging only; it is not optimized for production use. *

diff --git a/Source/Widgets/CesiumInspector/Cesium3DTilesInspector.js b/Source/Widgets/CesiumInspector/Cesium3DTilesInspector.js index ec4e22ba588..3c2bc653799 100644 --- a/Source/Widgets/CesiumInspector/Cesium3DTilesInspector.js +++ b/Source/Widgets/CesiumInspector/Cesium3DTilesInspector.js @@ -170,6 +170,7 @@ define([ stylePanel.contents.appendChild(errorBox); knockout.applyBindings(viewModel, stylePanel.contents); + tileInfoPanel.contents.appendChild(makeCheckbox('onlyPickedTileInfo', 'Display Only Picked Tile Info')); tileInfoPanel.contents.appendChild(makeCheckbox('showGeometricError', 'Geometric Error')); tileInfoPanel.contents.appendChild(makeCheckbox('numberOfCommands', 'Number of Commands')); tileInfoPanel.contents.appendChild(makeCheckbox('numberOfPoints', 'Number of Points')); diff --git a/Source/Widgets/CesiumInspector/Cesium3DTilesInspectorViewModel.js b/Source/Widgets/CesiumInspector/Cesium3DTilesInspectorViewModel.js index 750b6454b69..a2c44e3142d 100644 --- a/Source/Widgets/CesiumInspector/Cesium3DTilesInspectorViewModel.js +++ b/Source/Widgets/CesiumInspector/Cesium3DTilesInspectorViewModel.js @@ -2,6 +2,7 @@ define([ '../../Core/Cartesian3', '../../Core/Cartographic', + '../../Scene/Cesium3DTile', '../../Scene/Cesium3DTileFeature', '../../Scene/Cesium3DTileset', '../../Scene/Cesium3DTileStyle', @@ -20,6 +21,7 @@ define([ ], function( Cartesian3, Cartographic, + Cesium3DTile, Cesium3DTileFeature, Cesium3DTileset, Cesium3DTileStyle, @@ -400,12 +402,28 @@ define([ } }, + /** + * Displays tile info for only picked tile. This property is observable. + * @memberof Cesium3DTilesInspectorViewModel.prototype + * + * @type {Boolean} + * @default false + */ + onlyPickedTileInfo: { + default: false, + subscribe: function(val) { + if (defined(that._tileset)) { + that._tileset.debugShowOnlyPickedTile = val; + } + } + }, + /** * Displays the texture memory used per tile. This property is observable. * @memberof Cesium3DTilesInspectorViewModel.prototype * - * @type {String} - * @default '{}' + * @type {Boolean} + * @default false */ textureMemory : { default: false, @@ -420,8 +438,8 @@ define([ * Displays the number of triangles per tile. This property is observable. * @memberof Cesium3DTilesInspectorViewModel.prototype * - * @type {String} - * @default '{}' + * @type {Boolean} + * @default false */ numberOfTriangles : { default: false, @@ -436,8 +454,8 @@ define([ * Displays the number of points per tile. This property is observable. * @memberof Cesium3DTilesInspectorViewModel.prototype * - * @type {String} - * @default '{}' + * @type {Boolean} + * @default false */ numberOfPoints : { default: false, @@ -452,8 +470,8 @@ define([ * Displays the vertex memory used per tile. This property is observable. * @memberof Cesium3DTilesInspectorViewModel.prototype * - * @type {String} - * @default '{}' + * @type {Boolean} + * @default false */ vertexMemory : { default: false, @@ -468,8 +486,8 @@ define([ * Displays the number of commands used per tile. This property is observable. * @memberof Cesium3DTilesInspectorViewModel.prototype * - * @type {String} - * @default '{}' + * @type {Boolean} + * @default false */ numberOfCommands : { default: false,