feat(cesium): version bump to 1.67 (#42977)

* feat(cesium): version bump to 1.67

- `Cesium3DTilesetGraphics`
- `Color.lerp`
- `skipLevelOfDetail` default value braking change documented
- `isArray` deprecated
- no changes for ParticleSystem as Particle api is not part of type
definitions yet

https://github.com/CesiumGS/cesium/blob/master/CHANGES.md#1670---2020-03-02

/cc @jrafidi

Thanks!

* Fix PR comments:

- missing test added
- `show` property

/cc @jrafidi

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz)
2020-03-24 17:34:56 -07:00
committed by GitHub
parent 028f391902
commit 65ef3f96f1
3 changed files with 110 additions and 1 deletions
+68 -1
View File
@@ -1,4 +1,4 @@
// Type definitions for cesium 1.66
// Type definitions for cesium 1.67
// Project: http://cesiumjs.org
// Definitions by: Aigars Zeiza <https://github.com/Zuzon>
// Harry Nicholls <https://github.com/hnipps>
@@ -426,6 +426,56 @@ declare namespace Cesium {
constructor(options: { url: string; proxy?: Proxy; requestVertexNormals?: boolean; requestWaterMask?: boolean; ellipsoid?: Ellipsoid; credit?: Credit | string });
}
/**
* A 3D Tiles tileset represented by an Entity.
* The tileset modelMatrix is determined by the containing Entity position and orientation or is left unset if position is undefined.
*/
class Cesium3DTilesetGraphics {
constructor(options?: Cesium3DTilesetGraphicsOptions);
/**
* Duplicates this instance.
*/
clone(result?: Cesium3DTilesetGraphics): Cesium3DTilesetGraphics;
/**
* Assigns each unassigned property on this object to the value of the same property on the provided source object.
*/
merge(source: Cesium3DTilesetGraphics): void;
/**
* Gets the event that is raised whenever a property or sub-property is changed or modified.
*/
readonly definitionChanged: Event;
/**
* Gets or sets the maximum screen space error used to drive level of detail refinement.
* @default true
*/
maximumScreenSpaceError: Property;
/**
* Gets or sets the boolean Property specifying the visibility of the model.
* @default true
*/
show: Property;
/**
* Gets or sets the string Property specifying the URI of the glTF asset.
*/
uri: Property;
}
interface Cesium3DTilesetGraphicsOptions {
/**
* A boolean Property specifying the visibility of the tilese
* @default true
*/
show?: boolean | Property;
/**
* A string or Resource Property specifying the URI of the tileset.
*/
uri?: string | Property;
/**
* A number or Property specifying the maximum screen space error used to drive level of detail refinement.
*/
maximumScreenSpaceError?: number | Property;
}
class CircleGeometry extends Packable {
constructor(options: {
center: Cartesian3;
@@ -650,6 +700,10 @@ declare namespace Cesium {
maximumAlpha?: number
}, result?: Color): Color;
static fromRgba(rgba: number): Color;
/**
* Computes the linear interpolation or extrapolation at t between the provided colors.
*/
static lerp(start: Color, end: Color, t: number, result: Color): Color;
static mod(left: Color, right: Color, result?: Color): Color;
static multiply(left: Color, right: Color, result?: Color): Color;
static multiplyByScalar(color: Color, scalar: number, result?: Color): Color;
@@ -3824,6 +3878,11 @@ declare namespace Cesium {
progressiveResolutionHeightFraction: number;
shadow: ShadowMode;
show: boolean;
/**
* Optimization option.
* Determines if level of detail skipping should be applied during the traversal.
* @default false
*/
skipLevelOfDetail: boolean;
skipLevels: number;
skipScreenSpaceErrorFactor: number;
@@ -3859,6 +3918,11 @@ declare namespace Cesium {
foveatedMinimumScreenSpaceErrorRelaxation?: number;
foveatedInterpolationCallback?: Cesium3DTileset;
foveatedTimeDelay?: number;
/**
* Optimization option.
* Determines if level of detail skipping should be applied during the traversal.
* @default false
*/
skipLevelOfDetail?: boolean;
baseScreenSpaceError?: number;
skipScreenSpaceErrorFactor?: number;
@@ -5406,6 +5470,9 @@ declare namespace Cesium {
function getImagePixels(image: HTMLImageElement): number[];
/**
* @deprecated use Array.isArray
*/
function isArray(value: any): boolean;
function isLeapYear(year: number): boolean;
+21
View File
@@ -76,3 +76,24 @@ const label = new Cesium.LabelGraphics({
viewer.scene.globe.tileLoadProgressEvent.addEventListener((progress: number) => progress);
viewer.scene.globe.terrainProviderChanged.addEventListener((provider: Cesium.TerrainProvider) => provider);
// Cesium3DTileset
const tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'http://localhost:8002/tilesets/Seattle/tileset.json',
skipLevelOfDetail: true,
baseScreenSpaceError: 1024,
skipScreenSpaceErrorFactor: 16,
skipLevels: 1,
immediatelyLoadDesiredLevelOfDetail: false,
loadSiblings: false,
cullWithChildrenBounds: true
}));
// Cesium3DTilesetGraphics
const options = {
uri: '0',
show: false,
maximumScreenSpaceError: 2
};
const tilesetModel = new Cesium.Cesium3DTilesetGraphics(options);
+21
View File
@@ -78,3 +78,24 @@ const label = new Cesium.LabelGraphics({
viewer.scene.globe.tileLoadProgressEvent.addEventListener((progress: number) => progress);
viewer.scene.globe.terrainProviderChanged.addEventListener((provider: Cesium.TerrainProvider) => provider);
// Cesium3DTileset
const tileset = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url: 'http://localhost:8002/tilesets/Seattle/tileset.json',
skipLevelOfDetail: true,
baseScreenSpaceError: 1024,
skipScreenSpaceErrorFactor: 16,
skipLevels: 1,
immediatelyLoadDesiredLevelOfDetail: false,
loadSiblings: false,
cullWithChildrenBounds: true
}));
// Cesium3DTilesetGraphics
const options = {
uri: '0',
show: false,
maximumScreenSpaceError: 2
};
const tilesetModel = new Cesium.Cesium3DTilesetGraphics(options);