Skip to content

Commit

Permalink
Merge pull request CesiumGS#11776 from CesiumGS/documentation-fixes-2…
Browse files Browse the repository at this point in the history
…024-01-20

Documentation fixes 2024-01-20
  • Loading branch information
ggetz authored Jan 23, 2024
2 parents dbce10a + 611ee23 commit 8c147eb
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
- Fixed `Entity` documentation for `orientation` property. [#11762](https://github.com/CesiumGS/cesium/pull/11762)
- Fixed an issue where `DataSource` objects incorrectly shared a single `PolylineCollection` in the `PolylineGeometryUpdater`. Updated `PolylineGeometryUpdater` to create a distinct `PolylineCollection` instance per `DataSource`. This resolves the crashes reported under [#7758](https://github.com/CesiumGS/cesium/issues/7758) and [#9154](https://github.com/CesiumGS/cesium/issues/9154).
- Fixed a bug where transforms that had been defined with the `KHR_texture_transform` extension had not been applied to Feature ID Textures in `EXT_mesh_features`. [#11731](https://github.com/CesiumGS/cesium/issues/11731)
- The `EntityCollection#add` method was documented to throw a `DeveloperError` for duplicate IDs, but did throw a `RuntimeError` in this case. This is now changed to throw a `DeveloperError`. [#11776](https://github.com/CesiumGS/cesium/pull/11776)
- Parts of the documentation have been updated to resolve potential issues with the generated TypedScript definitions. [#11776](https://github.com/CesiumGS/cesium/pull/11776)
- Fixed type definition for `Camera.constrainedAxis`. [#11475](https://github.com/CesiumGS/cesium/issues/11475)

#### @cesium/widgets
Expand Down
4 changes: 2 additions & 2 deletions packages/engine/Source/DataSources/Entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ function createPropertyTypeDescriptor(name, Type) {
* @property {boolean} [show] A boolean value indicating if the entity and its children are displayed.
* @property {Property | string} [description] A string Property specifying an HTML description for this entity.
* @property {PositionProperty | Cartesian3} [position] A Property specifying the entity position.
* @property {Property} [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.
* @property {Property} [viewFrom] A suggested initial offset for viewing this object.
* @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.
* @property {Property | Cartesian3} [viewFrom] A suggested initial offset for viewing this object.
* @property {Entity} [parent] A parent entity to associate with this entity.
* @property {BillboardGraphics | BillboardGraphics.ConstructorOptions} [billboard] A billboard to associate with this entity.
* @property {BoxGraphics | BoxGraphics.ConstructorOptions} [box] A box to associate with this entity.
Expand Down
3 changes: 1 addition & 2 deletions packages/engine/Source/DataSources/EntityCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import DeveloperError from "../Core/DeveloperError.js";
import Event from "../Core/Event.js";
import Iso8601 from "../Core/Iso8601.js";
import JulianDate from "../Core/JulianDate.js";
import RuntimeError from "../Core/RuntimeError.js";
import TimeInterval from "../Core/TimeInterval.js";
import Entity from "./Entity.js";

Expand Down Expand Up @@ -281,7 +280,7 @@ EntityCollection.prototype.add = function (entity) {
const id = entity.id;
const entities = this._entities;
if (entities.contains(id)) {
throw new RuntimeError(
throw new DeveloperError(
`An entity with id ${id} already exists in this collection.`
);
}
Expand Down
3 changes: 1 addition & 2 deletions packages/engine/Source/DataSources/GeometryUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ Object.defineProperties(GeometryUpdater.prototype, {
},
/**
* Gets a value indicating if the geometry is time-varying.
* If true, all visualization is delegated to a DynamicGeometryUpdater
* returned by GeometryUpdater#createDynamicUpdater.
*
* @memberof GeometryUpdater.prototype
*
* @type {boolean}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ Object.defineProperties(PolylineGeometryUpdater.prototype, {
},
/**
* Gets a value indicating if the geometry is time-varying.
* If true, all visualization is delegated to the {@link DynamicGeometryUpdater}
* returned by GeometryUpdater#createDynamicUpdater.
*
* @memberof PolylineGeometryUpdater.prototype
*
* @type {boolean}
Expand Down
9 changes: 7 additions & 2 deletions packages/engine/Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,8 @@ Object.defineProperties(Cesium3DTileset.prototype, {
* @param {Cesium3DTileset.ConstructorOptions} [options] An object describing initialization options
* @returns {Promise<Cesium3DTileset>}
*
* @exception {DeveloperError} The tileset must be 3D Tiles version 0.0 or 1.0.
* @exception {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
* or when the tileset contains a required extension that is not supported.
*
* @see Cesium3DTileset#fromUrl
*
Expand Down Expand Up @@ -1986,7 +1987,8 @@ Cesium3DTileset.fromIonAssetId = async function (assetId, options) {
* @param {Cesium3DTileset.ConstructorOptions} [options] An object describing initialization options
* @returns {Promise<Cesium3DTileset>}
*
* @exception {DeveloperError} The tileset must be 3D Tiles version 0.0 or 1.0.
* @exception {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
* or when the tileset contains a required extension that is not supported.
*
* @see Cesium3DTileset#fromIonAssetId
*
Expand Down Expand Up @@ -2129,6 +2131,9 @@ Cesium3DTileset.prototype.makeStyleDirty = function () {
/**
* Loads the main tileset JSON file or a tileset JSON file referenced from a tile.
*
* @exception {RuntimeError} When the tileset asset version is not 0.0, 1.0, or 1.1,
* or when the tileset contains a required extension that is not supported.
*
* @private
*/
Cesium3DTileset.prototype.loadTileset = function (
Expand Down
3 changes: 1 addition & 2 deletions packages/engine/Specs/DataSources/EntityCollectionSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
TimeIntervalCollection,
Entity,
EntityCollection,
RuntimeError,
} from "../../index.js";

describe("DataSources/EntityCollection", function () {
Expand Down Expand Up @@ -474,7 +473,7 @@ describe("DataSources/EntityCollection", function () {

expect(function () {
entityCollection.add(entity2);
}).toThrowError(RuntimeError);
}).toThrowDeveloperError();
});

it("contains returns true if in collection", function () {
Expand Down
2 changes: 1 addition & 1 deletion packages/engine/Specs/Scene/Cesium3DTilesetSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ describe(
it("loads json with static loadJson method", async function () {
const tilesetJson = {
asset: {
version: 2.0,
version: 1.1,
},
};

Expand Down

0 comments on commit 8c147eb

Please sign in to comment.