diff --git a/CHANGES.md b/CHANGES.md index 49ce27726103..7b75da4bf990 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,13 +7,13 @@ ##### Breaking Changes :mega: - By default, the screen space camera controller will no longer go inside or under instances of `Cesium3DTileset`. [#11581](https://github.com/CesiumGS/cesium/pull/11581) - - This behavior can be disabled by setting `Cesium3DTileset.disableCameraCollision` to true. + - This behavior can be disabled by setting `Cesium3DTileset.disableCollision` to true. - This feature is enabled by default only for WebGL 2 and above, but can be enabled for WebGL 1 by setting the `enablePick` option to true when creating the `Cesium3DTileset`. ##### Additions :tada: - Added `Cesium3DTileset.getHeight` to sample height values of the loaded tiles. If using WebGL 1, the `enablePick` option must be set to true to use this function. [#11581](https://github.com/CesiumGS/cesium/pull/11581) -- Added `Cesium3DTileset.disableCameraCollision` to allow the camera from to go inside or below a 3D tileset, for instance, to be used with 3D Tiles interiors. [#11581](https://github.com/CesiumGS/cesium/pull/11581) +- Added `Cesium3DTileset.disableCollision` to allow the camera from to go inside or below a 3D tileset, for instance, to be used with 3D Tiles interiors. [#11581](https://github.com/CesiumGS/cesium/pull/11581) - The `Cesium3DTileset.dynamicScreenSpaceError` optimization is now enabled by default, as this improves performance for street-level horizon views. Furthermore, the default settings of this feature were tuned for improved performance. `Cesium3DTileset.dynamicScreenSpaceErrorDensity` was changed from 0.00278 to 0.0002. `Cesium3DTileset.dynamicScreenSpaceErrorFactor` was changed from 4 to 24. [#11718](https://github.com/CesiumGS/cesium/pull/11718) ##### Fixes :wrench: diff --git a/packages/engine/Source/Scene/Cesium3DTileset.js b/packages/engine/Source/Scene/Cesium3DTileset.js index 50fbaa6296df..bafb85770c01 100644 --- a/packages/engine/Source/Scene/Cesium3DTileset.js +++ b/packages/engine/Source/Scene/Cesium3DTileset.js @@ -110,7 +110,8 @@ import Ray from "../Core/Ray.js"; * @property {string|number} [featureIdLabel="featureId_0"] Label of the feature ID set to use for picking and styling. For EXT_mesh_features, this is the feature ID's label property, or "featureId_N" (where N is the index in the featureIds array) when not specified. EXT_feature_metadata did not have a label field, so such feature ID sets are always labeled "featureId_N" where N is the index in the list of all feature Ids, where feature ID attributes are listed before feature ID textures. If featureIdLabel is an integer N, it is converted to the string "featureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority. * @property {string|number} [instanceFeatureIdLabel="instanceFeatureId_0"] Label of the instance feature ID set used for picking and styling. If instanceFeatureIdLabel is set to an integer N, it is converted to the string "instanceFeatureId_N" automatically. If both per-primitive and per-instance feature IDs are present, the instance feature IDs take priority. * @property {boolean} [showCreditsOnScreen=false] Whether to display the credits of this tileset on screen. - * @property {boolean} [disableCollision=false] When {@link ScreenSpaceCameraController#enableCollisionDetection} is true, allows the camera to go in or below the tileset surface. + * @property {SplitDirection} [splitDirection=SplitDirection.NONE] The {@link SplitDirection} split to apply to this tileset. + * @property {boolean} [disableCollision=false] Whether to turn off collisions for camera collisions or picking. While this is `false` the camera will be allowed to go in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true. * @property {boolean} [projectTo2D=false] Whether to accurately project the tileset to 2D. If this is true, the tileset will be projected accurately to 2D, but it will use more memory to do so. If this is false, the tileset will use less memory and will still render in 2D / CV mode, but its projected positions may be inaccurate. This cannot be set after the tileset has been created. * @property {boolean} [enablePick=false] Whether to allow collision and CPU picking with pick when using WebGL 1. If using WebGL 2 or above, this option will be ignored. If using WebGL 1 and this is true, the pick operation will work correctly, but it will use more memory to do so. If running with WebGL 1 and this is false, the model will use less memory, but pick will always return undefined. This cannot be set after the tileset has loaded. * @property {string} [debugHeatmapTilePropertyName] The tile variable to colorize as a heatmap. All rendered tiles will be colorized relative to each other's specified variable value. @@ -860,7 +861,7 @@ function Cesium3DTileset(options) { ); /** - * When {@link ScreenSpaceCameraController#enableCollisionDetection} is true, allows the camera to go inside or below the tileset surface. + * Whether to turn off collisions for camera collisions or picking. While this is `false` the camera will be allowed to go in or below the tileset surface if {@link ScreenSpaceCameraController#enableCollisionDetection} is true. * * @type {boolean} * @default false diff --git a/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js b/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js index 7877b3ac852b..aa678f6a0161 100644 --- a/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js +++ b/packages/engine/Source/Scene/createGooglePhotorealistic3DTileset.js @@ -46,10 +46,6 @@ async function createGooglePhotorealistic3DTileset(key, options) { options.maximumCacheOverflowBytes, 1024 * 1024 * 1024 ); - options.enableCameraCollision = defaultValue( - options.enableCameraCollision, - true - ); key = defaultValue(key, GoogleMaps.defaultApiKey); if (!defined(key)) {