diff --git a/CHANGES.md b/CHANGES.md index 36f1df04d5ed..8cb37d09b292 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ Change Log ##### Additions :tada: * Added support for the [AGI_articulations](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/AGI_articulations) vendor extension of glTF 2.0 to the Entity API and CZML. [#7907](https://github.com/AnalyticalGraphicsInc/cesium/pull/7907) +* Added CZML support for `heightReference` to `box`, `cylinder`, and `ellipsoid`, and added CZML support for `classificationType` to `corridor`, `ellipse`, `polygon`, `polyline`, and `rectangle`. [#7899](https://github.com/AnalyticalGraphicsInc/cesium/pull/7899) ##### Fixes :wrench: * Fixed a bug that caused missing segments for ground polylines with coplanar points over large distances and problems with polylines containing duplicate points. [#7885](https://github.com/AnalyticalGraphicsInc/cesium//pull/7885) diff --git a/Source/DataSources/BillboardGraphics.js b/Source/DataSources/BillboardGraphics.js index 0de17a6dd1eb..d2ecc1c15d04 100644 --- a/Source/DataSources/BillboardGraphics.js +++ b/Source/DataSources/BillboardGraphics.js @@ -27,71 +27,71 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Property} [options.image] A Property specifying the Image, URI, or Canvas to use for the billboard. * @param {Property} [options.show=true] A boolean Property specifying the visibility of the billboard. + * @param {Property} [options.image] A Property specifying the Image, URI, or Canvas to use for the billboard. * @param {Property} [options.scale=1.0] A numeric Property specifying the scale to apply to the image size. + * @param {Property} [options.pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset. + * @param {Property} [options.eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset. * @param {Property} [options.horizontalOrigin=HorizontalOrigin.CENTER] A Property specifying the {@link HorizontalOrigin}. * @param {Property} [options.verticalOrigin=VerticalOrigin.CENTER] A Property specifying the {@link VerticalOrigin}. - * @param {Property} [options.eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset. - * @param {Property} [options.pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset. + * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to. + * @param {Property} [options.color=Color.WHITE] A Property specifying the tint {@link Color} of the image. * @param {Property} [options.rotation=0] A numeric Property specifying the rotation about the alignedAxis. * @param {Property} [options.alignedAxis=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the unit vector axis of rotation. + * @param {Property} [options.sizeInMeters] A boolean Property specifying whether this billboard's size should be measured in meters. * @param {Property} [options.width] A numeric Property specifying the width of the billboard in pixels, overriding the native size. * @param {Property} [options.height] A numeric Property specifying the height of the billboard in pixels, overriding the native size. - * @param {Property} [options.color=Color.WHITE] A Property specifying the tint {@link Color} of the image. * @param {Property} [options.scaleByDistance] A {@link NearFarScalar} Property used to scale the point based on distance from the camera. * @param {Property} [options.translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera. * @param {Property} [options.pixelOffsetScaleByDistance] A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera. * @param {Property} [options.imageSubRegion] A Property specifying a {@link BoundingRectangle} that defines a sub-region of the image to use for the billboard, rather than the entire image, measured in pixels from the bottom-left. - * @param {Property} [options.sizeInMeters] A boolean Property specifying whether this billboard's size should be measured in meters. - * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this billboard will be displayed. * @param {Property} [options.disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to. * * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Billboards.html|Cesium Sandcastle Billboard Demo} */ function BillboardGraphics(options) { + this._definitionChanged = new Event(); + this._show = undefined; + this._showSubscription = undefined; this._image = undefined; this._imageSubscription = undefined; - this._imageSubRegion = undefined; - this._imageSubRegionSubscription = undefined; - this._width = undefined; - this._widthSubscription = undefined; - this._height = undefined; - this._heightSubscription = undefined; this._scale = undefined; this._scaleSubscription = undefined; - this._rotation = undefined; - this._rotationSubscription = undefined; - this._alignedAxis = undefined; - this._alignedAxisSubscription = undefined; + this._pixelOffset = undefined; + this._pixelOffsetSubscription = undefined; + this._eyeOffset = undefined; + this._eyeOffsetSubscription = undefined; this._horizontalOrigin = undefined; this._horizontalOriginSubscription = undefined; this._verticalOrigin = undefined; this._verticalOriginSubscription = undefined; - this._color = undefined; - this._colorSubscription = undefined; - this._eyeOffset = undefined; - this._eyeOffsetSubscription = undefined; this._heightReference = undefined; this._heightReferenceSubscription = undefined; - this._pixelOffset = undefined; - this._pixelOffsetSubscription = undefined; - this._show = undefined; - this._showSubscription = undefined; + this._color = undefined; + this._colorSubscription = undefined; + this._rotation = undefined; + this._rotationSubscription = undefined; + this._alignedAxis = undefined; + this._alignedAxisSubscription = undefined; + this._sizeInMeters = undefined; + this._sizeInMetersSubscription = undefined; + this._width = undefined; + this._widthSubscription = undefined; + this._height = undefined; + this._heightSubscription = undefined; this._scaleByDistance = undefined; this._scaleByDistanceSubscription = undefined; this._translucencyByDistance = undefined; this._translucencyByDistanceSubscription = undefined; this._pixelOffsetScaleByDistance = undefined; this._pixelOffsetScaleByDistanceSubscription = undefined; - this._sizeInMeters = undefined; - this._sizeInMetersSubscription = undefined; + this._imageSubRegion = undefined; + this._imageSubRegionSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; this._disableDepthTestDistance = undefined; this._disableDepthTestDistanceSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -111,20 +111,19 @@ define([ }, /** - * Gets or sets the Property specifying the Image, URI, or Canvas to use for the billboard. + * Gets or sets the boolean Property specifying the visibility of the billboard. * @memberof BillboardGraphics.prototype * @type {Property} + * @default true */ - image : createPropertyDescriptor('image'), + show : createPropertyDescriptor('show'), /** - * Gets or sets the Property specifying a {@link BoundingRectangle} that defines a - * sub-region of the image to use for the billboard, rather than the entire image, - * measured in pixels from the bottom-left. + * Gets or sets the Property specifying the Image, URI, or Canvas to use for the billboard. * @memberof BillboardGraphics.prototype * @type {Property} */ - imageSubRegion : createPropertyDescriptor('imageSubRegion'), + image : createPropertyDescriptor('image'), /** * Gets or sets the numeric Property specifying the uniform scale to apply to the image. @@ -142,22 +141,49 @@ define([ scale : createPropertyDescriptor('scale'), /** - * Gets or sets the numeric Property specifying the rotation of the image - * counter clockwise from the alignedAxis. + * Gets or sets the {@link Cartesian2} Property specifying the billboard's pixel offset in screen space + * from the origin of this billboard. This is commonly used to align multiple billboards and labels at + * the same position, e.g., an image and text. The screen space origin is the top, left corner of the + * canvas; x increases from left to right, and y increases from top to bottom. + *

+ *

+ * + * + * + *
default
b.pixeloffset = new Cartesian2(50, 25);
+ * The billboard's origin is indicated by the yellow point. + *
+ *

* @memberof BillboardGraphics.prototype * @type {Property} - * @default 0 + * @default Cartesian2.ZERO */ - rotation : createPropertyDescriptor('rotation'), + pixelOffset : createPropertyDescriptor('pixelOffset'), /** - * Gets or sets the {@link Cartesian3} Property specifying the unit vector axis of rotation - * in the fixed frame. When set to Cartesian3.ZERO the rotation is from the top of the screen. + * Gets or sets the {@link Cartesian3} Property specifying the billboard's offset in eye coordinates. + * Eye coordinates is a left-handed coordinate system, where x points towards the viewer's + * right, y points up, and z points into the screen. + *

+ * An eye offset is commonly used to arrange multiple billboards or objects at the same position, e.g., to + * arrange a billboard above its corresponding 3D model. + *

+ * Below, the billboard is positioned at the center of the Earth but an eye offset makes it always + * appear on top of the Earth regardless of the viewer's or Earth's orientation. + *

+ *

+ * + * + * + *
+ * b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0); + *
+ *

* @memberof BillboardGraphics.prototype * @type {Property} * @default Cartesian3.ZERO */ - alignedAxis : createPropertyDescriptor('alignedAxis'), + eyeOffset : createPropertyDescriptor('eyeOffset'), /** * Gets or sets the Property specifying the {@link HorizontalOrigin}. @@ -175,6 +201,14 @@ define([ */ verticalOrigin : createPropertyDescriptor('verticalOrigin'), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof BillboardGraphics.prototype + * @type {Property} + * @default HeightReference.NONE + */ + heightReference : createPropertyDescriptor('heightReference'), + /** * Gets or sets the Property specifying the {@link Color} that is multiplied with the image. * This has two common use cases. First, the same white texture may be used by many different billboards, @@ -196,68 +230,33 @@ define([ color : createPropertyDescriptor('color'), /** - * Gets or sets the {@link Cartesian3} Property specifying the billboard's offset in eye coordinates. - * Eye coordinates is a left-handed coordinate system, where x points towards the viewer's - * right, y points up, and z points into the screen. - *

- * An eye offset is commonly used to arrange multiple billboards or objects at the same position, e.g., to - * arrange a billboard above its corresponding 3D model. - *

- * Below, the billboard is positioned at the center of the Earth but an eye offset makes it always - * appear on top of the Earth regardless of the viewer's or Earth's orientation. - *

- *

- * - * - * - *
- * b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0); - *
- *

- * @memberof BillboardGraphics.prototype - * @type {Property} - * @default Cartesian3.ZERO - */ - eyeOffset : createPropertyDescriptor('eyeOffset'), - - /** - * Gets or sets the Property specifying the {@link HeightReference}. + * Gets or sets the numeric Property specifying the rotation of the image + * counter clockwise from the alignedAxis. * @memberof BillboardGraphics.prototype * @type {Property} - * @default HeightReference.NONE + * @default 0 */ - heightReference : createPropertyDescriptor('heightReference'), + rotation : createPropertyDescriptor('rotation'), /** - * Gets or sets the {@link Cartesian2} Property specifying the billboard's pixel offset in screen space - * from the origin of this billboard. This is commonly used to align multiple billboards and labels at - * the same position, e.g., an image and text. The screen space origin is the top, left corner of the - * canvas; x increases from left to right, and y increases from top to bottom. - *

- *

- * - * - * - *
default
b.pixeloffset = new Cartesian2(50, 25);
- * The billboard's origin is indicated by the yellow point. - *
- *

+ * Gets or sets the {@link Cartesian3} Property specifying the unit vector axis of rotation + * in the fixed frame. When set to Cartesian3.ZERO the rotation is from the top of the screen. * @memberof BillboardGraphics.prototype * @type {Property} - * @default Cartesian2.ZERO + * @default Cartesian3.ZERO */ - pixelOffset : createPropertyDescriptor('pixelOffset'), + alignedAxis : createPropertyDescriptor('alignedAxis'), /** - * Gets or sets the boolean Property specifying the visibility of the billboard. + * Gets or sets the boolean Property specifying if this billboard's size will be measured in meters. * @memberof BillboardGraphics.prototype * @type {Property} - * @default true + * @default false */ - show : createPropertyDescriptor('show'), + sizeInMeters : createPropertyDescriptor('sizeInMeters'), /** - * Gets or sets the numeric Property specifying the billboard's width in pixels. + * Gets or sets the numeric Property specifying the width of the billboard in pixels. * When undefined, the native width is used. * @memberof BillboardGraphics.prototype * @type {Property} @@ -306,12 +305,13 @@ define([ pixelOffsetScaleByDistance : createPropertyDescriptor('pixelOffsetScaleByDistance'), /** - * Gets or sets the boolean Property specifying if this billboard's size will be measured in meters. + * Gets or sets the Property specifying a {@link BoundingRectangle} that defines a + * sub-region of the image to use for the billboard, rather than the entire image, + * measured in pixels from the bottom-left. * @memberof BillboardGraphics.prototype * @type {Property} - * @default false */ - sizeInMeters : createPropertyDescriptor('sizeInMeters'), + imageSubRegion : createPropertyDescriptor('imageSubRegion'), /** * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this billboard will be displayed. @@ -339,24 +339,24 @@ define([ if (!defined(result)) { return new BillboardGraphics(this); } - result.color = this._color; - result.eyeOffset = this._eyeOffset; - result.heightReference = this._heightReference; - result.horizontalOrigin = this._horizontalOrigin; + result.show = this._show; result.image = this._image; - result.imageSubRegion = this._imageSubRegion; - result.pixelOffset = this._pixelOffset; result.scale = this._scale; + result.pixelOffset = this._pixelOffset; + result.eyeOffset = this._eyeOffset; + result.horizontalOrigin = this._horizontalOrigin; + result.verticalOrigin = this._verticalOrigin; + result.heightReference = this._heightReference; + result.color = this._color; result.rotation = this._rotation; result.alignedAxis = this._alignedAxis; - result.show = this._show; - result.verticalOrigin = this._verticalOrigin; + result.sizeInMeters = this._sizeInMeters; result.width = this._width; result.height = this._height; result.scaleByDistance = this._scaleByDistance; result.translucencyByDistance = this._translucencyByDistance; result.pixelOffsetScaleByDistance = this._pixelOffsetScaleByDistance; - result.sizeInMeters = this._sizeInMeters; + result.imageSubRegion = this._imageSubRegion; result.distanceDisplayCondition = this._distanceDisplayCondition; result.disableDepthTestDistance = this._disableDepthTestDistance; return result; @@ -375,24 +375,24 @@ define([ } //>>includeEnd('debug'); - this.color = defaultValue(this._color, source.color); - this.eyeOffset = defaultValue(this._eyeOffset, source.eyeOffset); - this.heightReference = defaultValue(this._heightReference, source.heightReference); - this.horizontalOrigin = defaultValue(this._horizontalOrigin, source.horizontalOrigin); + this.show = defaultValue(this._show, source.show); this.image = defaultValue(this._image, source.image); - this.imageSubRegion = defaultValue(this._imageSubRegion, source.imageSubRegion); - this.pixelOffset = defaultValue(this._pixelOffset, source.pixelOffset); this.scale = defaultValue(this._scale, source.scale); + this.pixelOffset = defaultValue(this._pixelOffset, source.pixelOffset); + this.eyeOffset = defaultValue(this._eyeOffset, source.eyeOffset); + this.horizontalOrigin = defaultValue(this._horizontalOrigin, source.horizontalOrigin); + this.verticalOrigin = defaultValue(this._verticalOrigin, source.verticalOrigin); + this.heightReference = defaultValue(this._heightReference, source.heightReference); + this.color = defaultValue(this._color, source.color); this.rotation = defaultValue(this._rotation, source.rotation); this.alignedAxis = defaultValue(this._alignedAxis, source.alignedAxis); - this.show = defaultValue(this._show, source.show); - this.verticalOrigin = defaultValue(this._verticalOrigin, source.verticalOrigin); + this.sizeInMeters = defaultValue(this._sizeInMeters, source.sizeInMeters); this.width = defaultValue(this._width, source.width); this.height = defaultValue(this._height, source.height); this.scaleByDistance = defaultValue(this._scaleByDistance, source.scaleByDistance); this.translucencyByDistance = defaultValue(this._translucencyByDistance, source.translucencyByDistance); this.pixelOffsetScaleByDistance = defaultValue(this._pixelOffsetScaleByDistance, source.pixelOffsetScaleByDistance); - this.sizeInMeters = defaultValue(this._sizeInMeters, source.sizeInMeters); + this.imageSubRegion = defaultValue(this._imageSubRegion, source.imageSubRegion); this.distanceDisplayCondition = defaultValue(this._distanceDisplayCondition, source.distanceDisplayCondition); this.disableDepthTestDistance = defaultValue(this._disableDepthTestDistance, source.disableDepthTestDistance); }; diff --git a/Source/DataSources/BoxGraphics.js b/Source/DataSources/BoxGraphics.js index d9b96a63f493..5714c0a209e9 100644 --- a/Source/DataSources/BoxGraphics.js +++ b/Source/DataSources/BoxGraphics.js @@ -23,9 +23,9 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Property} [options.heightReference] A Property specifying what the height from the entity position is relative to. - * @param {Property} [options.dimensions] A {@link Cartesian3} Property specifying the length, width, and height of the box. * @param {Property} [options.show=true] A boolean Property specifying the visibility of the box. + * @param {Property} [options.dimensions] A {@link Cartesian3} Property specifying the length, width, and height of the box. + * @param {Property} [options.heightReference] A Property specifying what the height from the entity position is relative to. * @param {Property} [options.fill=true] A boolean Property specifying whether the box is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the box. * @param {Property} [options.outline=false] A boolean Property specifying whether the box is outlined. @@ -37,11 +37,13 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Box.html|Cesium Sandcastle Box Demo} */ function BoxGraphics(options) { - this._heightReference = undefined; - this._dimensions = undefined; - this._dimensionsSubscription = undefined; + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; + this._dimensions = undefined; + this._dimensionsSubscription = undefined; + this._heightReference = undefined; + this._heightReferenceSubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; this._material = undefined; @@ -56,7 +58,6 @@ define([ this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -74,14 +75,6 @@ define([ } }, - /** - * Gets or sets the Property specifying the {@link HeightReference}. - * @memberof BoxGraphics.prototype - * @type {Property} - * @default HeightReference.NONE - */ - heightReference : createPropertyDescriptor('heightReference'), - /** * Gets or sets the boolean Property specifying the visibility of the box. * @memberof BoxGraphics.prototype @@ -98,12 +91,12 @@ define([ dimensions : createPropertyDescriptor('dimensions'), /** - * Gets or sets the material used to fill the box. + * Gets or sets the Property specifying the {@link HeightReference}. * @memberof BoxGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE + * @type {Property} + * @default HeightReference.NONE */ - material : createMaterialPropertyDescriptor('material'), + heightReference : createPropertyDescriptor('heightReference'), /** * Gets or sets the boolean Property specifying whether the box is filled with the provided material. @@ -113,6 +106,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the material used to fill the box. + * @memberof BoxGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the box is outlined. * @memberof BoxGraphics.prototype @@ -164,11 +165,11 @@ define([ if (!defined(result)) { return new BoxGraphics(this); } - result.heightReference = this.heightReference; - result.dimensions = this.dimensions; result.show = this.show; - result.material = this.material; + result.dimensions = this.dimensions; + result.heightReference = this.heightReference; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; @@ -190,11 +191,11 @@ define([ } //>>includeEnd('debug'); - this.heightReference = defaultValue(this.heightReference, source.heightReference); - this.dimensions = defaultValue(this.dimensions, source.dimensions); this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); + this.dimensions = defaultValue(this.dimensions, source.dimensions); + this.heightReference = defaultValue(this.heightReference, source.heightReference); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); diff --git a/Source/DataSources/CheckerboardMaterialProperty.js b/Source/DataSources/CheckerboardMaterialProperty.js index f60ba8f18bbe..e6e8e472c3e7 100644 --- a/Source/DataSources/CheckerboardMaterialProperty.js +++ b/Source/DataSources/CheckerboardMaterialProperty.js @@ -36,13 +36,10 @@ define([ options = defaultValue(options, defaultValue.EMPTY_OBJECT); this._definitionChanged = new Event(); - this._evenColor = undefined; this._evenColorSubscription = undefined; - this._oddColor = undefined; this._oddColorSubscription = undefined; - this._repeat = undefined; this._repeatSubscription = undefined; @@ -67,6 +64,7 @@ define([ Property.isConstant(this._repeat); } }, + /** * Gets the event that is raised whenever the definition of this property changes. * The definition is considered to have changed if a call to getValue would return @@ -81,6 +79,7 @@ define([ return this._definitionChanged; } }, + /** * Gets or sets the Property specifying the first {@link Color}. * @memberof CheckerboardMaterialProperty.prototype @@ -88,6 +87,7 @@ define([ * @default Color.WHITE */ evenColor : createPropertyDescriptor('evenColor'), + /** * Gets or sets the Property specifying the second {@link Color}. * @memberof CheckerboardMaterialProperty.prototype @@ -95,6 +95,7 @@ define([ * @default Color.BLACK */ oddColor : createPropertyDescriptor('oddColor'), + /** * Gets or sets the {@link Cartesian2} Property specifying how many times the tiles repeat in each direction. * @memberof CheckerboardMaterialProperty.prototype diff --git a/Source/DataSources/ColorMaterialProperty.js b/Source/DataSources/ColorMaterialProperty.js index c4d29aeff65c..4360d949fda3 100644 --- a/Source/DataSources/ColorMaterialProperty.js +++ b/Source/DataSources/ColorMaterialProperty.js @@ -26,6 +26,7 @@ define([ this._definitionChanged = new Event(); this._color = undefined; this._colorSubscription = undefined; + this.color = color; } @@ -43,6 +44,7 @@ define([ return Property.isConstant(this._color); } }, + /** * Gets the event that is raised whenever the definition of this property changes. * The definition is considered to have changed if a call to getValue would return @@ -57,6 +59,7 @@ define([ return this._definitionChanged; } }, + /** * Gets or sets the {@link Color} {@link Property}. * @memberof ColorMaterialProperty.prototype diff --git a/Source/DataSources/CorridorGraphics.js b/Source/DataSources/CorridorGraphics.js index aef29581bf11..bbce80cab3d0 100644 --- a/Source/DataSources/CorridorGraphics.js +++ b/Source/DataSources/CorridorGraphics.js @@ -25,20 +25,20 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the corridor. * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor. * @param {Property} [options.width] A numeric Property specifying the distance between the edges of the corridor. - * @param {Property} [options.cornerType=CornerType.ROUNDED] A {@link CornerType} Property specifying the style of the corners. * @param {Property} [options.height=0] A numeric Property specifying the altitude of the corridor relative to the ellipsoid surface. * @param {Property} [options.heightReference] A Property specifying what the height is relative to. * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the corridor's extruded face relative to the ellipsoid surface. * @param {Property} [options.extrudedHeightReference] A Property specifying what the extrudedHeight is relative to. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the corridor. + * @param {Property} [options.cornerType=CornerType.ROUNDED] A {@link CornerType} Property specifying the style of the corners. + * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the distance between each latitude and longitude. * @param {Property} [options.fill=true] A boolean Property specifying whether the corridor is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the corridor. * @param {Property} [options.outline=false] A boolean Property specifying whether the corridor is outlined. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline. - * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the distance between each latitude and longitude. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the corridor casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this corridor will be displayed. * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this corridor will classify terrain, 3D Tiles, or both when on the ground. @@ -48,12 +48,13 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Corridor.html|Cesium Sandcastle Corridor Demo} */ function CorridorGraphics(options) { + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; this._positions = undefined; this._positionsSubscription = undefined; + this._width = undefined; + this._widthSubscription = undefined; this._height = undefined; this._heightSubscription = undefined; this._heightReference = undefined; @@ -62,14 +63,14 @@ define([ this._extrudedHeightSubscription = undefined; this._extrudedHeightReference = undefined; this._extrudedHeightReferenceSubscription = undefined; - this._granularity = undefined; - this._granularitySubscription = undefined; - this._width = undefined; - this._widthSubscription = undefined; this._cornerType = undefined; this._cornerTypeSubscription = undefined; + this._granularity = undefined; + this._granularitySubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; @@ -84,7 +85,6 @@ define([ this._classificationTypeSubscription = undefined; this._zIndex = undefined; this._zIndexSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -111,19 +111,18 @@ define([ show : createPropertyDescriptor('show'), /** - * Gets or sets the Property specifying the material used to fill the corridor. + * Gets or sets a Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor. * @memberof CorridorGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE + * @type {Property} */ - material : createMaterialPropertyDescriptor('material'), + positions : createPropertyDescriptor('positions'), /** - * Gets or sets a Property specifying the array of {@link Cartesian3} positions that define the centerline of the corridor. + * Gets or sets the numeric Property specifying the width of the corridor. * @memberof CorridorGraphics.prototype * @type {Property} */ - positions : createPropertyDescriptor('positions'), + width : createPropertyDescriptor('width'), /** * Gets or sets the numeric Property specifying the altitude of the corridor. @@ -159,19 +158,20 @@ define([ extrudedHeightReference : createPropertyDescriptor('extrudedHeightReference'), /** - * Gets or sets the numeric Property specifying the sampling distance between each latitude and longitude point. + * Gets or sets the {@link CornerType} Property specifying how corners are styled. * @memberof CorridorGraphics.prototype * @type {Property} - * @default {CesiumMath.RADIANS_PER_DEGREE} + * @default CornerType.ROUNDED */ - granularity : createPropertyDescriptor('granularity'), + cornerType : createPropertyDescriptor('cornerType'), /** - * Gets or sets the numeric Property specifying the width of the corridor. + * Gets or sets the numeric Property specifying the sampling distance between each latitude and longitude point. * @memberof CorridorGraphics.prototype * @type {Property} + * @default {CesiumMath.RADIANS_PER_DEGREE} */ - width : createPropertyDescriptor('width'), + granularity : createPropertyDescriptor('granularity'), /** * Gets or sets the boolean Property specifying whether the corridor is filled with the provided material. @@ -181,6 +181,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the Property specifying the material used to fill the corridor. + * @memberof CorridorGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the corridor is outlined. * @memberof CorridorGraphics.prototype @@ -205,14 +213,6 @@ define([ */ outlineWidth : createPropertyDescriptor('outlineWidth'), - /** - * Gets or sets the {@link CornerType} Property specifying how corners are styled. - * @memberof CorridorGraphics.prototype - * @type {Property} - * @default CornerType.ROUNDED - */ - cornerType : createPropertyDescriptor('cornerType'), - /** * Get or sets the enum Property specifying whether the corridor * casts or receives shadows from each light source. @@ -257,19 +257,19 @@ define([ return new CorridorGraphics(this); } result.show = this.show; - result.material = this.material; result.positions = this.positions; + result.width = this.width; result.height = this.height; result.heightReference = this.heightReference; result.extrudedHeight = this.extrudedHeight; result.extrudedHeightReference = this.extrudedHeightReference; + result.cornerType = this.cornerType; result.granularity = this.granularity; - result.width = this.width; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; - result.cornerType = this.cornerType; result.shadows = this.shadows; result.distanceDisplayCondition = this.distanceDisplayCondition; result.classificationType = this.classificationType; @@ -291,19 +291,19 @@ define([ //>>includeEnd('debug'); this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); this.positions = defaultValue(this.positions, source.positions); + this.width = defaultValue(this.width, source.width); this.height = defaultValue(this.height, source.height); this.heightReference = defaultValue(this.heightReference, source.heightReference); this.extrudedHeight = defaultValue(this.extrudedHeight, source.extrudedHeight); this.extrudedHeightReference = defaultValue(this.extrudedHeightReference, source.extrudedHeightReference); + this.cornerType = defaultValue(this.cornerType, source.cornerType); this.granularity = defaultValue(this.granularity, source.granularity); - this.width = defaultValue(this.width, source.width); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); - this.cornerType = defaultValue(this.cornerType, source.cornerType); this.shadows = defaultValue(this.shadows, source.shadows); this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); this.classificationType = defaultValue(this.classificationType, source.classificationType); diff --git a/Source/DataSources/CylinderGraphics.js b/Source/DataSources/CylinderGraphics.js index fb74a8ff0cb3..f49e2f303390 100644 --- a/Source/DataSources/CylinderGraphics.js +++ b/Source/DataSources/CylinderGraphics.js @@ -24,11 +24,11 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Property} [options.heightReference] A Property specifying what the height from the entity position is relative to. + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the cylinder. * @param {Property} [options.length] A numeric Property specifying the length of the cylinder. * @param {Property} [options.topRadius] A numeric Property specifying the radius of the top of the cylinder. * @param {Property} [options.bottomRadius] A numeric Property specifying the radius of the bottom of the cylinder. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the cylinder. + * @param {Property} [options.heightReference] A Property specifying what the height from the entity position is relative to. * @param {Property} [options.fill=true] A boolean Property specifying whether the cylinder is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the cylinder. * @param {Property} [options.outline=false] A boolean Property specifying whether the cylinder is outlined. @@ -40,34 +40,35 @@ define([ * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this cylinder will be displayed. */ function CylinderGraphics(options) { - this._heightReference = undefined; + this._definitionChanged = new Event(); + this._show = undefined; + this._showSubscription = undefined; this._length = undefined; this._lengthSubscription = undefined; this._topRadius = undefined; this._topRadiusSubscription = undefined; this._bottomRadius = undefined; this._bottomRadiusSubscription = undefined; - this._numberOfVerticalLines = undefined; - this._numberOfVerticalLinesSubscription = undefined; - this._slices = undefined; - this._slicesSubscription = undefined; - this._show = undefined; - this._showSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; + this._heightReference = undefined; + this._heightReferenceSubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; this._outlineColorSubscription = undefined; this._outlineWidth = undefined; this._outlineWidthSubscription = undefined; + this._numberOfVerticalLines = undefined; + this._numberOfVerticalLinesSubscription = undefined; + this._slices = undefined; + this._slicesSubscription = undefined; this._shadows = undefined; this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -87,12 +88,12 @@ define([ }, /** - * Gets or sets the Property specifying the {@link HeightReference}. + * Gets or sets the boolean Property specifying the visibility of the cylinder. * @memberof CylinderGraphics.prototype * @type {Property} - * @default HeightReference.NONE + * @default true */ - heightReference : createPropertyDescriptor('heightReference'), + show : createPropertyDescriptor('show'), /** * Gets or sets the numeric Property specifying the length of the cylinder. @@ -116,28 +117,20 @@ define([ bottomRadius : createPropertyDescriptor('bottomRadius'), /** - * Gets or sets the Property specifying the number of vertical lines to draw along the perimeter for the outline. - * @memberof CylinderGraphics.prototype - * @type {Property} - * @default 16 - */ - numberOfVerticalLines : createPropertyDescriptor('numberOfVerticalLines'), - - /** - * Gets or sets the Property specifying the number of edges around the perimeter of the cylinder. + * Gets or sets the Property specifying the {@link HeightReference}. * @memberof CylinderGraphics.prototype * @type {Property} - * @default 128 + * @default HeightReference.NONE */ - slices : createPropertyDescriptor('slices'), + heightReference : createPropertyDescriptor('heightReference'), /** - * Gets or sets the boolean Property specifying the visibility of the cylinder. + * Gets or sets the boolean Property specifying whether the cylinder is filled with the provided material. * @memberof CylinderGraphics.prototype * @type {Property} * @default true */ - show : createPropertyDescriptor('show'), + fill : createPropertyDescriptor('fill'), /** * Gets or sets the Property specifying the material used to fill the cylinder. @@ -147,14 +140,6 @@ define([ */ material : createMaterialPropertyDescriptor('material'), - /** - * Gets or sets the boolean Property specifying whether the cylinder is filled with the provided material. - * @memberof CylinderGraphics.prototype - * @type {Property} - * @default true - */ - fill : createPropertyDescriptor('fill'), - /** * Gets or sets the boolean Property specifying whether the cylinder is outlined. * @memberof CylinderGraphics.prototype @@ -179,6 +164,22 @@ define([ */ outlineWidth : createPropertyDescriptor('outlineWidth'), + /** + * Gets or sets the Property specifying the number of vertical lines to draw along the perimeter for the outline. + * @memberof CylinderGraphics.prototype + * @type {Property} + * @default 16 + */ + numberOfVerticalLines : createPropertyDescriptor('numberOfVerticalLines'), + + /** + * Gets or sets the Property specifying the number of edges around the perimeter of the cylinder. + * @memberof CylinderGraphics.prototype + * @type {Property} + * @default 128 + */ + slices : createPropertyDescriptor('slices'), + /** * Get or sets the enum Property specifying whether the cylinder * casts or receives shadows from each light source. @@ -206,18 +207,18 @@ define([ if (!defined(result)) { return new CylinderGraphics(this); } - result.heightReference = this.heightReference; - result.bottomRadius = this.bottomRadius; + result.show = this.show; result.length = this.length; result.topRadius = this.topRadius; - result.show = this.show; - result.material = this.material; - result.numberOfVerticalLines = this.numberOfVerticalLines; - result.slices = this.slices; + result.bottomRadius = this.bottomRadius; + result.heightReference = this.heightReference; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; + result.numberOfVerticalLines = this.numberOfVerticalLines; + result.slices = this.slices; result.shadows = this.shadows; result.distanceDisplayCondition = this.distanceDisplayCondition; return result; @@ -236,18 +237,18 @@ define([ } //>>includeEnd('debug'); - this.heightReference = defaultValue(this.heightReference, source.heightReference); - this.bottomRadius = defaultValue(this.bottomRadius, source.bottomRadius); + this.show = defaultValue(this.show, source.show); this.length = defaultValue(this.length, source.length); this.topRadius = defaultValue(this.topRadius, source.topRadius); - this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); - this.numberOfVerticalLines = defaultValue(this.numberOfVerticalLines, source.numberOfVerticalLines); - this.slices = defaultValue(this.slices, source.slices); + this.bottomRadius = defaultValue(this.bottomRadius, source.bottomRadius); + this.heightReference = defaultValue(this.heightReference, source.heightReference); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); + this.numberOfVerticalLines = defaultValue(this.numberOfVerticalLines, source.numberOfVerticalLines); + this.slices = defaultValue(this.slices, source.slices); this.shadows = defaultValue(this.shadows, source.shadows); this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); }; diff --git a/Source/DataSources/CzmlDataSource.js b/Source/DataSources/CzmlDataSource.js index 2132ef20cf00..1eb992f5a63b 100644 --- a/Source/DataSources/CzmlDataSource.js +++ b/Source/DataSources/CzmlDataSource.js @@ -34,6 +34,7 @@ define([ '../Core/Spherical', '../Core/TimeInterval', '../Core/TimeIntervalCollection', + '../Scene/ClassificationType', '../Scene/ColorBlendMode', '../Scene/HeightReference', '../Scene/HorizontalOrigin', @@ -124,6 +125,7 @@ define([ Spherical, TimeInterval, TimeIntervalCollection, + ClassificationType, ColorBlendMode, HeightReference, HorizontalOrigin, @@ -515,6 +517,8 @@ define([ return Color; } else if (czmlInterval.hasOwnProperty('arcType')) { return ArcType; + } else if (czmlInterval.hasOwnProperty('classificationType')) { + return ClassificationType; } else if (czmlInterval.hasOwnProperty('colorBlendMode')) { return ColorBlendMode; } else if (czmlInterval.hasOwnProperty('cornerType')) { @@ -576,6 +580,8 @@ define([ return unwrapUnitCartesianInterval(czmlInterval); case Color: return unwrapColorInterval(czmlInterval); + case ClassificationType: + return ClassificationType[defaultValue(czmlInterval.classificationType, czmlInterval)]; case ColorBlendMode: return ColorBlendMode[defaultValue(czmlInterval.colorBlendMode, czmlInterval)]; case CornerType: @@ -1442,6 +1448,7 @@ define([ processPacketData(Boolean, box, 'show', boxData.show, interval, sourceUri, entityCollection); processPacketData(Cartesian3, box, 'dimensions', boxData.dimensions, interval, sourceUri, entityCollection); + processPacketData(HeightReference, box, 'heightReference', boxData.heightReference, interval, sourceUri, entityCollection); processPacketData(Boolean, box, 'fill', boxData.fill, interval, sourceUri, entityCollection); processMaterialPacketData(box, 'material', boxData.material, interval, sourceUri, entityCollection); processPacketData(Boolean, box, 'outline', boxData.outline, interval, sourceUri, entityCollection); @@ -1473,8 +1480,8 @@ define([ processPositions(corridor, 'positions', corridorData.positions, entityCollection); processPacketData(Number, corridor, 'width', corridorData.width, interval, sourceUri, entityCollection); processPacketData(Number, corridor, 'height', corridorData.height, interval, sourceUri, entityCollection); - processPacketData(Number, corridor, 'extrudedHeight', corridorData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, corridor, 'heightReference', corridorData.heightReference, interval, sourceUri, entityCollection); + processPacketData(Number, corridor, 'extrudedHeight', corridorData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, corridor, 'extrudedHeightReference', corridorData.extrudedHeightReference, interval, sourceUri, entityCollection); processPacketData(CornerType, corridor, 'cornerType', corridorData.cornerType, interval, sourceUri, entityCollection); processPacketData(Number, corridor, 'granularity', corridorData.granularity, interval, sourceUri, entityCollection); @@ -1485,6 +1492,7 @@ define([ processPacketData(Number, corridor, 'outlineWidth', corridorData.outlineWidth, interval, sourceUri, entityCollection); processPacketData(ShadowMode, corridor, 'shadows', corridorData.shadows, interval, sourceUri, entityCollection); processPacketData(DistanceDisplayCondition, corridor, 'distanceDisplayCondition', corridorData.distanceDisplayCondition, interval, sourceUri, entityCollection); + processPacketData(ClassificationType, corridor, 'classificationType', corridorData.classificationType, interval, sourceUri, entityCollection); processPacketData(Number, corridor, 'zIndex', corridorData.zIndex, interval, sourceUri, entityCollection); } @@ -1510,6 +1518,7 @@ define([ processPacketData(Number, cylinder, 'length', cylinderData.length, interval, sourceUri, entityCollection); processPacketData(Number, cylinder, 'topRadius', cylinderData.topRadius, interval, sourceUri, entityCollection); processPacketData(Number, cylinder, 'bottomRadius', cylinderData.bottomRadius, interval, sourceUri, entityCollection); + processPacketData(HeightReference, cylinder, 'heightReference', cylinderData.heightReference, interval, sourceUri, entityCollection); processPacketData(Boolean, cylinder, 'fill', cylinderData.fill, interval, sourceUri, entityCollection); processMaterialPacketData(cylinder, 'material', cylinderData.material, interval, sourceUri, entityCollection); processPacketData(Boolean, cylinder, 'outline', cylinderData.outline, interval, sourceUri, entityCollection); @@ -1588,8 +1597,8 @@ define([ processPacketData(Number, ellipse, 'semiMajorAxis', ellipseData.semiMajorAxis, interval, sourceUri, entityCollection); processPacketData(Number, ellipse, 'semiMinorAxis', ellipseData.semiMinorAxis, interval, sourceUri, entityCollection); processPacketData(Number, ellipse, 'height', ellipseData.height, interval, sourceUri, entityCollection); - processPacketData(Number, ellipse, 'extrudedHeight', ellipseData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, ellipse, 'heightReference', ellipseData.heightReference, interval, sourceUri, entityCollection); + processPacketData(Number, ellipse, 'extrudedHeight', ellipseData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, ellipse, 'extrudedHeightReference', ellipseData.extrudedHeightReference, interval, sourceUri, entityCollection); processPacketData(Rotation, ellipse, 'rotation', ellipseData.rotation, interval, sourceUri, entityCollection); processPacketData(Rotation, ellipse, 'stRotation', ellipseData.stRotation, interval, sourceUri, entityCollection); @@ -1602,6 +1611,7 @@ define([ processPacketData(Number, ellipse, 'numberOfVerticalLines', ellipseData.numberOfVerticalLines, interval, sourceUri, entityCollection); processPacketData(ShadowMode, ellipse, 'shadows', ellipseData.shadows, interval, sourceUri, entityCollection); processPacketData(DistanceDisplayCondition, ellipse, 'distanceDisplayCondition', ellipseData.distanceDisplayCondition, interval, sourceUri, entityCollection); + processPacketData(ClassificationType, ellipse, 'classificationType', ellipseData.classificationType, interval, sourceUri, entityCollection); processPacketData(Number, ellipse, 'zIndex', ellipseData.zIndex, interval, sourceUri, entityCollection); } @@ -1625,6 +1635,7 @@ define([ processPacketData(Boolean, ellipsoid, 'show', ellipsoidData.show, interval, sourceUri, entityCollection); processPacketData(Cartesian3, ellipsoid, 'radii', ellipsoidData.radii, interval, sourceUri, entityCollection); + processPacketData(HeightReference, ellipsoid, 'heightReference', ellipsoidData.heightReference, interval, sourceUri, entityCollection); processPacketData(Boolean, ellipsoid, 'fill', ellipsoidData.fill, interval, sourceUri, entityCollection); processMaterialPacketData(ellipsoid, 'material', ellipsoidData.material, interval, sourceUri, entityCollection); processPacketData(Boolean, ellipsoid, 'outline', ellipsoidData.outline, interval, sourceUri, entityCollection); @@ -1843,10 +1854,10 @@ define([ } processPacketData(Boolean, path, 'show', pathData.show, interval, sourceUri, entityCollection); - processPacketData(Number, path, 'width', pathData.width, interval, sourceUri, entityCollection); - processPacketData(Number, path, 'resolution', pathData.resolution, interval, sourceUri, entityCollection); processPacketData(Number, path, 'leadTime', pathData.leadTime, interval, sourceUri, entityCollection); processPacketData(Number, path, 'trailTime', pathData.trailTime, interval, sourceUri, entityCollection); + processPacketData(Number, path, 'width', pathData.width, interval, sourceUri, entityCollection); + processPacketData(Number, path, 'resolution', pathData.resolution, interval, sourceUri, entityCollection); processMaterialPacketData(path, 'material', pathData.material, interval, sourceUri, entityCollection); processPacketData(DistanceDisplayCondition, path, 'distanceDisplayCondition', pathData.distanceDisplayCondition, interval, sourceUri, entityCollection); } @@ -1902,8 +1913,8 @@ define([ processPacketData(Boolean, polygon, 'show', polygonData.show, interval, sourceUri, entityCollection); processPositions(polygon, 'hierarchy', polygonData.positions, entityCollection); processPacketData(Number, polygon, 'height', polygonData.height, interval, sourceUri, entityCollection); - processPacketData(Number, polygon, 'extrudedHeight', polygonData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, polygon, 'heightReference', polygonData.heightReference, interval, sourceUri, entityCollection); + processPacketData(Number, polygon, 'extrudedHeight', polygonData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, polygon, 'extrudedHeightReference', polygonData.extrudedHeightReference, interval, sourceUri, entityCollection); processPacketData(Rotation, polygon, 'stRotation', polygonData.stRotation, interval, sourceUri, entityCollection); processPacketData(Number, polygon, 'granularity', polygonData.granularity, interval, sourceUri, entityCollection); @@ -1918,6 +1929,7 @@ define([ processPacketData(ArcType, polygon, 'arcType', polygonData.arcType, interval, sourceUri, entityCollection); processPacketData(ShadowMode, polygon, 'shadows', polygonData.shadows, interval, sourceUri, entityCollection); processPacketData(DistanceDisplayCondition, polygon, 'distanceDisplayCondition', polygonData.distanceDisplayCondition, interval, sourceUri, entityCollection); + processPacketData(ClassificationType, polygon, 'classificationType', polygonData.classificationType, interval, sourceUri, entityCollection); processPacketData(Number, polygon, 'zIndex', polygonData.zIndex, interval, sourceUri, entityCollection); } @@ -1953,6 +1965,7 @@ define([ processPacketData(Boolean, polyline, 'clampToGround', polylineData.clampToGround, interval, sourceUri, entityCollection); processPacketData(ShadowMode, polyline, 'shadows', polylineData.shadows, interval, sourceUri, entityCollection); processPacketData(DistanceDisplayCondition, polyline, 'distanceDisplayCondition', polylineData.distanceDisplayCondition, interval, sourceUri, entityCollection); + processPacketData(ClassificationType, polyline, 'classificationType', polylineData.classificationType, interval, sourceUri, entityCollection); processPacketData(Number, polyline, 'zIndex', polylineData.zIndex, interval, sourceUri, entityCollection); // for backwards compatibility, adapt CZML followSurface to arcType. @@ -1984,8 +1997,8 @@ define([ processPacketData(Boolean, rectangle, 'show', rectangleData.show, interval, sourceUri, entityCollection); processPacketData(Rectangle, rectangle, 'coordinates', rectangleData.coordinates, interval, sourceUri, entityCollection); processPacketData(Number, rectangle, 'height', rectangleData.height, interval, sourceUri, entityCollection); - processPacketData(Number, rectangle, 'extrudedHeight', rectangleData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, rectangle, 'heightReference', rectangleData.heightReference, interval, sourceUri, entityCollection); + processPacketData(Number, rectangle, 'extrudedHeight', rectangleData.extrudedHeight, interval, sourceUri, entityCollection); processPacketData(HeightReference, rectangle, 'extrudedHeightReference', rectangleData.extrudedHeightReference, interval, sourceUri, entityCollection); processPacketData(Rotation, rectangle, 'rotation', rectangleData.rotation, interval, sourceUri, entityCollection); processPacketData(Rotation, rectangle, 'stRotation', rectangleData.stRotation, interval, sourceUri, entityCollection); @@ -1997,6 +2010,7 @@ define([ processPacketData(Number, rectangle, 'outlineWidth', rectangleData.outlineWidth, interval, sourceUri, entityCollection); processPacketData(ShadowMode, rectangle, 'shadows', rectangleData.shadows, interval, sourceUri, entityCollection); processPacketData(DistanceDisplayCondition, rectangle, 'distanceDisplayCondition', rectangleData.distanceDisplayCondition, interval, sourceUri, entityCollection); + processPacketData(ClassificationType, rectangle, 'classificationType', rectangleData.classificationType, interval, sourceUri, entityCollection); processPacketData(Number, rectangle, 'zIndex', rectangleData.zIndex, interval, sourceUri, entityCollection); } diff --git a/Source/DataSources/DataSourceClock.js b/Source/DataSources/DataSourceClock.js index a539a2bba0c8..383c56b3dc03 100644 --- a/Source/DataSources/DataSourceClock.js +++ b/Source/DataSources/DataSourceClock.js @@ -26,13 +26,13 @@ define([ * @constructor */ function DataSourceClock() { + this._definitionChanged = new Event(); this._startTime = undefined; this._stopTime = undefined; this._currentTime = undefined; this._clockRange = undefined; this._clockStep = undefined; this._multiplier = undefined; - this._definitionChanged = new Event(); } defineProperties(DataSourceClock.prototype, { diff --git a/Source/DataSources/EllipseGraphics.js b/Source/DataSources/EllipseGraphics.js index acdf7b9e1d29..dc56995f93bd 100644 --- a/Source/DataSources/EllipseGraphics.js +++ b/Source/DataSources/EllipseGraphics.js @@ -26,22 +26,22 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the ellipse. * @param {Property} [options.semiMajorAxis] The numeric Property specifying the semi-major axis. * @param {Property} [options.semiMinorAxis] The numeric Property specifying the semi-minor axis. * @param {Property} [options.height=0] A numeric Property specifying the altitude of the ellipse relative to the ellipsoid surface. * @param {Property} [options.heightReference] A Property specifying what the height is relative to. * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the ellipse's extruded face relative to the ellipsoid surface. * @param {Property} [options.extrudedHeightReference] A Property specifying what the extrudedHeight is relative to. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the ellipse. + * @param {Property} [options.rotation=0.0] A numeric property specifying the rotation of the ellipse counter-clockwise from north. + * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the ellipse texture counter-clockwise from north. + * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the ellipse. * @param {Property} [options.fill=true] A boolean Property specifying whether the ellipse is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the ellipse. * @param {Property} [options.outline=false] A boolean Property specifying whether the ellipse is outlined. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline. * @param {Property} [options.numberOfVerticalLines=16] A numeric Property specifying the number of vertical lines to draw along the perimeter for the outline. - * @param {Property} [options.rotation=0.0] A numeric property specifying the rotation of the ellipse counter-clockwise from north. - * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the ellipse texture counter-clockwise from north. - * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the ellipse. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the ellipse casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this ellipse will be displayed. * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this ellipse will classify terrain, 3D Tiles, or both when on the ground. @@ -50,16 +50,13 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Circles and Ellipses.html|Cesium Sandcastle Circles and Ellipses Demo} */ function EllipseGraphics(options) { + this._definitionChanged = new Event(); + this._show = undefined; + this._showSubscription = undefined; this._semiMajorAxis = undefined; this._semiMajorAxisSubscription = undefined; this._semiMinorAxis = undefined; this._semiMinorAxisSubscription = undefined; - this._rotation = undefined; - this._rotationSubscription = undefined; - this._show = undefined; - this._showSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; this._height = undefined; this._heightSubscription = undefined; this._heightReference = undefined; @@ -68,12 +65,16 @@ define([ this._extrudedHeightSubscription = undefined; this._extrudedHeightReference = undefined; this._extrudedHeightReferenceSubscription = undefined; - this._granularity = undefined; - this._granularitySubscription = undefined; + this._rotation = undefined; + this._rotationSubscription = undefined; this._stRotation = undefined; this._stRotationSubscription = undefined; + this._granularity = undefined; + this._granularitySubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; @@ -90,7 +91,6 @@ define([ this._classificationTypeSubscription = undefined; this._zIndex = undefined; this._zIndexSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -110,42 +110,26 @@ define([ }, /** - * Gets or sets the numeric Property specifying the semi-major axis. - * @memberof EllipseGraphics.prototype - * @type {Property} - */ - semiMajorAxis : createPropertyDescriptor('semiMajorAxis'), - - /** - * Gets or sets the numeric Property specifying the semi-minor axis. + * Gets or sets the boolean Property specifying the visibility of the ellipse. * @memberof EllipseGraphics.prototype * @type {Property} + * @default true */ - semiMinorAxis : createPropertyDescriptor('semiMinorAxis'), + show : createPropertyDescriptor('show'), /** - * Gets or sets the numeric property specifying the rotation of the ellipse clockwise from north. + * Gets or sets the numeric Property specifying the semi-major axis. * @memberof EllipseGraphics.prototype * @type {Property} - * @default 0 */ - rotation : createPropertyDescriptor('rotation'), + semiMajorAxis : createPropertyDescriptor('semiMajorAxis'), /** - * Gets or sets the boolean Property specifying the visibility of the ellipse. + * Gets or sets the numeric Property specifying the semi-minor axis. * @memberof EllipseGraphics.prototype * @type {Property} - * @default true - */ - show : createPropertyDescriptor('show'), - - /** - * Gets or sets the Property specifying the material used to fill the ellipse. - * @memberof EllipseGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE */ - material : createMaterialPropertyDescriptor('material'), + semiMinorAxis : createPropertyDescriptor('semiMinorAxis'), /** * Gets or sets the numeric Property specifying the altitude of the ellipse. @@ -180,12 +164,12 @@ define([ extrudedHeightReference : createPropertyDescriptor('extrudedHeightReference'), /** - * Gets or sets the numeric Property specifying the angular distance between points on the ellipse. + * Gets or sets the numeric property specifying the rotation of the ellipse clockwise from north. * @memberof EllipseGraphics.prototype * @type {Property} - * @default {CesiumMath.RADIANS_PER_DEGREE} + * @default 0 */ - granularity : createPropertyDescriptor('granularity'), + rotation : createPropertyDescriptor('rotation'), /** * Gets or sets the numeric property specifying the rotation of the ellipse texture counter-clockwise from north. @@ -195,6 +179,14 @@ define([ */ stRotation : createPropertyDescriptor('stRotation'), + /** + * Gets or sets the numeric Property specifying the angular distance between points on the ellipse. + * @memberof EllipseGraphics.prototype + * @type {Property} + * @default {CesiumMath.RADIANS_PER_DEGREE} + */ + granularity : createPropertyDescriptor('granularity'), + /** * Gets or sets the boolean Property specifying whether the ellipse is filled with the provided material. * @memberof EllipseGraphics.prototype @@ -203,6 +195,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the Property specifying the material used to fill the ellipse. + * @memberof EllipseGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the ellipse is outlined. * @memberof EllipseGraphics.prototype @@ -278,18 +278,18 @@ define([ if (!defined(result)) { return new EllipseGraphics(this); } - result.rotation = this.rotation; + result.show = this.show; result.semiMajorAxis = this.semiMajorAxis; result.semiMinorAxis = this.semiMinorAxis; - result.show = this.show; - result.material = this.material; result.height = this.height; result.heightReference = this.heightReference; result.extrudedHeight = this.extrudedHeight; result.extrudedHeightReference = this.extrudedHeightReference; - result.granularity = this.granularity; + result.rotation = this.rotation; result.stRotation = this.stRotation; + result.granularity = this.granularity; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; @@ -314,18 +314,18 @@ define([ } //>>includeEnd('debug'); - this.rotation = defaultValue(this.rotation, source.rotation); + this.show = defaultValue(this.show, source.show); this.semiMajorAxis = defaultValue(this.semiMajorAxis, source.semiMajorAxis); this.semiMinorAxis = defaultValue(this.semiMinorAxis, source.semiMinorAxis); - this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); this.height = defaultValue(this.height, source.height); this.heightReference = defaultValue(this.heightReference, source.heightReference); this.extrudedHeight = defaultValue(this.extrudedHeight, source.extrudedHeight); this.extrudedHeightReference = defaultValue(this.extrudedHeightReference, source.extrudedHeightReference); - this.granularity = defaultValue(this.granularity, source.granularity); + this.rotation = defaultValue(this.rotation, source.rotation); this.stRotation = defaultValue(this.stRotation, source.stRotation); + this.granularity = defaultValue(this.granularity, source.granularity); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); diff --git a/Source/DataSources/EllipsoidGraphics.js b/Source/DataSources/EllipsoidGraphics.js index 9f2894b09eed..ab72100f35f9 100644 --- a/Source/DataSources/EllipsoidGraphics.js +++ b/Source/DataSources/EllipsoidGraphics.js @@ -23,49 +23,50 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Property} [options.heightReference] A Property specifying what the height from the entity position is relative to. - * @param {Property} [options.radii] A {@link Cartesian3} Property specifying the radii of the ellipsoid. * @param {Property} [options.show=true] A boolean Property specifying the visibility of the ellipsoid. + * @param {Property} [options.radii] A {@link Cartesian3} Property specifying the radii of the ellipsoid. + * @param {Property} [options.heightReference] A Property specifying what the height from the entity position is relative to. * @param {Property} [options.fill=true] A boolean Property specifying whether the ellipsoid is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the ellipsoid. * @param {Property} [options.outline=false] A boolean Property specifying whether the ellipsoid is outlined. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline. - * @param {Property} [options.subdivisions=128] A Property specifying the number of samples per outline ring, determining the granularity of the curvature. * @param {Property} [options.stackPartitions=64] A Property specifying the number of stacks. * @param {Property} [options.slicePartitions=64] A Property specifying the number of radial slices. + * @param {Property} [options.subdivisions=128] A Property specifying the number of samples per outline ring, determining the granularity of the curvature. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the ellipsoid casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this ellipsoid will be displayed. * * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Spheres%20and%20Ellipsoids.html|Cesium Sandcastle Spheres and Ellipsoids Demo} */ function EllipsoidGraphics(options) { - this._heightReference = undefined; + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; this._radii = undefined; this._radiiSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; - this._stackPartitions = undefined; - this._stackPartitionsSubscription = undefined; - this._slicePartitions = undefined; - this._slicePartitionsSubscription = undefined; - this._subdivisions = undefined; - this._subdivisionsSubscription = undefined; + this._heightReference = undefined; + this._heightReferenceSubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; this._outlineColorSubscription = undefined; this._outlineWidth = undefined; this._outlineWidthSubscription = undefined; + this._stackPartitions = undefined; + this._stackPartitionsSubscription = undefined; + this._slicePartitions = undefined; + this._slicePartitionsSubscription = undefined; + this._subdivisions = undefined; + this._subdivisionsSubscription = undefined; this._shadows = undefined; this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -84,14 +85,6 @@ define([ } }, - /** - * Gets or sets the Property specifying the {@link HeightReference}. - * @memberof EllipsoidGraphics.prototype - * @type {Property} - * @default HeightReference.NONE - */ - heightReference : createPropertyDescriptor('heightReference'), - /** * Gets or sets the boolean Property specifying the visibility of the ellipsoid. * @memberof EllipsoidGraphics.prototype @@ -108,12 +101,12 @@ define([ radii : createPropertyDescriptor('radii'), /** - * Gets or sets the Property specifying the material used to fill the ellipsoid. + * Gets or sets the Property specifying the {@link HeightReference}. * @memberof EllipsoidGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE + * @type {Property} + * @default HeightReference.NONE */ - material : createMaterialPropertyDescriptor('material'), + heightReference : createPropertyDescriptor('heightReference'), /** * Gets or sets the boolean Property specifying whether the ellipsoid is filled with the provided material. @@ -123,6 +116,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the Property specifying the material used to fill the ellipsoid. + * @memberof EllipsoidGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the ellipsoid is outlined. * @memberof EllipsoidGraphics.prototype @@ -198,11 +199,11 @@ define([ if (!defined(result)) { return new EllipsoidGraphics(this); } - result.heightReference = this.heightReference; result.show = this.show; result.radii = this.radii; - result.material = this.material; + result.heightReference = this.heightReference; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; @@ -211,7 +212,6 @@ define([ result.subdivisions = this.subdivisions; result.shadows = this.shadows; result.distanceDisplayCondition = this.distanceDisplayCondition; - return result; }; @@ -228,11 +228,11 @@ define([ } //>>includeEnd('debug'); - this.heightReference = defaultValue(this.heightReference, source.heightReference); this.show = defaultValue(this.show, source.show); this.radii = defaultValue(this.radii, source.radii); - this.material = defaultValue(this.material, source.material); + this.heightReference = defaultValue(this.heightReference, source.heightReference); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); diff --git a/Source/DataSources/GridMaterialProperty.js b/Source/DataSources/GridMaterialProperty.js index 55848325e59b..4d965acb3b26 100644 --- a/Source/DataSources/GridMaterialProperty.js +++ b/Source/DataSources/GridMaterialProperty.js @@ -77,6 +77,7 @@ define([ Property.isConstant(this._lineOffset); } }, + /** * Gets the event that is raised whenever the definition of this property changes. * The definition is considered to have changed if a call to getValue would return @@ -91,6 +92,7 @@ define([ return this._definitionChanged; } }, + /** * Gets or sets the Property specifying the grid {@link Color}. * @memberof GridMaterialProperty.prototype @@ -98,6 +100,7 @@ define([ * @default Color.WHITE */ color : createPropertyDescriptor('color'), + /** * Gets or sets the numeric Property specifying cell alpha values. * @memberof GridMaterialProperty.prototype @@ -105,6 +108,7 @@ define([ * @default 0.1 */ cellAlpha : createPropertyDescriptor('cellAlpha'), + /** * Gets or sets the {@link Cartesian2} Property specifying the number of grid lines along each axis. * @memberof GridMaterialProperty.prototype @@ -112,6 +116,7 @@ define([ * @default new Cartesian2(8.0, 8.0) */ lineCount : createPropertyDescriptor('lineCount'), + /** * Gets or sets the {@link Cartesian2} Property specifying the thickness of grid lines along each axis. * @memberof GridMaterialProperty.prototype @@ -119,6 +124,7 @@ define([ * @default new Cartesian2(1.0, 1.0) */ lineThickness : createPropertyDescriptor('lineThickness'), + /** * Gets or sets the {@link Cartesian2} Property specifying the starting offset of grid lines along each axis. * @memberof GridMaterialProperty.prototype diff --git a/Source/DataSources/ImageMaterialProperty.js b/Source/DataSources/ImageMaterialProperty.js index ae0b9412ed2d..69d648bc30d0 100644 --- a/Source/DataSources/ImageMaterialProperty.js +++ b/Source/DataSources/ImageMaterialProperty.js @@ -45,6 +45,7 @@ define([ this._colorSubscription = undefined; this._transparent = undefined; this._transparentSubscription = undefined; + this.image = options.image; this.repeat = options.repeat; this.color = options.color; @@ -65,6 +66,7 @@ define([ return Property.isConstant(this._image) && Property.isConstant(this._repeat); } }, + /** * Gets the event that is raised whenever the definition of this property changes. * The definition is considered to have changed if a call to getValue would return @@ -79,12 +81,14 @@ define([ return this._definitionChanged; } }, + /** * Gets or sets the Property specifying Image, URL, Canvas, or Video to use. * @memberof ImageMaterialProperty.prototype * @type {Property} */ image : createPropertyDescriptor('image'), + /** * Gets or sets the {@link Cartesian2} Property specifying the number of times the image repeats in each direction. * @memberof ImageMaterialProperty.prototype @@ -92,6 +96,7 @@ define([ * @default new Cartesian2(1, 1) */ repeat : createPropertyDescriptor('repeat'), + /** * Gets or sets the Color Property specifying the desired color applied to the image. * @memberof ImageMaterialProperty.prototype @@ -99,6 +104,7 @@ define([ * @default 1.0 */ color : createPropertyDescriptor('color'), + /** * Gets or sets the Boolean Property specifying whether the image has transparency * @memberof ImageMaterialProperty.prototype @@ -151,9 +157,9 @@ define([ return this === other || (other instanceof ImageMaterialProperty && Property.equals(this._image, other._image) && + Property.equals(this._repeat, other._repeat) && Property.equals(this._color, other._color) && - Property.equals(this._transparent, other._transparent) && - Property.equals(this._repeat, other._repeat)); + Property.equals(this._transparent, other._transparent)); }; return ImageMaterialProperty; diff --git a/Source/DataSources/LabelGraphics.js b/Source/DataSources/LabelGraphics.js index b1075c768dc6..acf9eb8f798c 100644 --- a/Source/DataSources/LabelGraphics.js +++ b/Source/DataSources/LabelGraphics.js @@ -27,63 +27,64 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the label. * @param {Property} [options.text] A Property specifying the text. Explicit newlines '\n' are supported. * @param {Property} [options.font='30px sans-serif'] A Property specifying the CSS font. * @param {Property} [options.style=LabelStyle.FILL] A Property specifying the {@link LabelStyle}. - * @param {Property} [options.fillColor=Color.WHITE] A Property specifying the fill {@link Color}. - * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the outline {@link Color}. - * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the outline width. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the label. + * @param {Property} [options.scale=1.0] A numeric Property specifying the scale to apply to the text. * @param {Property} [options.showBackground=false] A boolean Property specifying the visibility of the background behind the label. * @param {Property} [options.backgroundColor=new Color(0.165, 0.165, 0.165, 0.8)] A Property specifying the background {@link Color}. * @param {Property} [options.backgroundPadding=new Cartesian2(7, 5)] A {@link Cartesian2} Property specifying the horizontal and vertical background padding in pixels. - * @param {Property} [options.scale=1.0] A numeric Property specifying the scale to apply to the text. + * @param {Property} [options.pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset. + * @param {Property} [options.eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset. * @param {Property} [options.horizontalOrigin=HorizontalOrigin.CENTER] A Property specifying the {@link HorizontalOrigin}. * @param {Property} [options.verticalOrigin=VerticalOrigin.CENTER] A Property specifying the {@link VerticalOrigin}. - * @param {Property} [options.eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset. - * @param {Property} [options.pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset. + * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to. + * @param {Property} [options.fillColor=Color.WHITE] A Property specifying the fill {@link Color}. + * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the outline {@link Color}. + * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the outline width. * @param {Property} [options.translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera. * @param {Property} [options.pixelOffsetScaleByDistance] A {@link NearFarScalar} Property used to set pixelOffset based on distance from the camera. * @param {Property} [options.scaleByDistance] A {@link NearFarScalar} Property used to set scale based on distance from the camera. - * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this label will be displayed. * @param {Property} [options.disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to. * * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Labels.html|Cesium Sandcastle Labels Demo} */ function LabelGraphics(options) { + this._definitionChanged = new Event(); + this._show = undefined; + this._showSubscription = undefined; this._text = undefined; this._textSubscription = undefined; this._font = undefined; this._fontSubscription = undefined; this._style = undefined; this._styleSubscription = undefined; - this._fillColor = undefined; - this._fillColorSubscription = undefined; - this._outlineColor = undefined; - this._outlineColorSubscription = undefined; - this._outlineWidth = undefined; - this._outlineWidthSubscription = undefined; - this._horizontalOrigin = undefined; - this._horizontalOriginSubscription = undefined; - this._verticalOrigin = undefined; - this._verticalOriginSubscription = undefined; - this._eyeOffset = undefined; - this._eyeOffsetSubscription = undefined; - this._heightReference = undefined; - this._heightReferenceSubscription = undefined; - this._pixelOffset = undefined; - this._pixelOffsetSubscription = undefined; this._scale = undefined; this._scaleSubscription = undefined; - this._show = undefined; - this._showSubscription = undefined; this._showBackground = undefined; this._showBackgroundSubscription = undefined; this._backgroundColor = undefined; this._backgroundColorSubscription = undefined; this._backgroundPadding = undefined; this._backgroundPaddingSubscription = undefined; + this._pixelOffset = undefined; + this._pixelOffsetSubscription = undefined; + this._eyeOffset = undefined; + this._eyeOffsetSubscription = undefined; + this._horizontalOrigin = undefined; + this._horizontalOriginSubscription = undefined; + this._verticalOrigin = undefined; + this._verticalOriginSubscription = undefined; + this._heightReference = undefined; + this._heightReferenceSubscription = undefined; + this._fillColor = undefined; + this._fillColorSubscription = undefined; + this._outlineColor = undefined; + this._outlineColorSubscription = undefined; + this._outlineWidth = undefined; + this._outlineWidthSubscription = undefined; this._translucencyByDistance = undefined; this._translucencyByDistanceSubscription = undefined; this._pixelOffsetScaleByDistance = undefined; @@ -94,7 +95,6 @@ define([ this._distanceDisplayConditionSubscription = undefined; this._disableDepthTestDistance = undefined; this._disableDepthTestDistanceSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -113,6 +113,13 @@ define([ } }, + /** + * Gets or sets the boolean Property specifying the visibility of the label. + * @memberof LabelGraphics.prototype + * @type {Property} + */ + show : createPropertyDescriptor('show'), + /** * Gets or sets the string Property specifying the text of the label. * Explicit newlines '\n' are supported. @@ -137,39 +144,65 @@ define([ style : createPropertyDescriptor('style'), /** - * Gets or sets the Property specifying the fill {@link Color}. + * Gets or sets the numeric Property specifying the uniform scale to apply to the image. + * A scale greater than 1.0 enlarges the label while a scale less than 1.0 shrinks it. + *

+ *

+ *
+ * From left to right in the above image, the scales are 0.5, 1.0, + * and 2.0. + *
+ *

* @memberof LabelGraphics.prototype * @type {Property} + * @default 1.0 */ - fillColor : createPropertyDescriptor('fillColor'), + scale : createPropertyDescriptor('scale'), /** - * Gets or sets the Property specifying the outline {@link Color}. + * Gets or sets the boolean Property specifying the visibility of the background behind the label. * @memberof LabelGraphics.prototype * @type {Property} + * @default false */ - outlineColor : createPropertyDescriptor('outlineColor'), + showBackground : createPropertyDescriptor('showBackground'), /** - * Gets or sets the numeric Property specifying the outline width. + * Gets or sets the Property specifying the background {@link Color}. * @memberof LabelGraphics.prototype * @type {Property} + * @default new Color(0.165, 0.165, 0.165, 0.8) */ - outlineWidth : createPropertyDescriptor('outlineWidth'), + backgroundColor : createPropertyDescriptor('backgroundColor'), /** - * Gets or sets the Property specifying the {@link HorizontalOrigin}. + * Gets or sets the {@link Cartesian2} Property specifying the label's horizontal and vertical + * background padding in pixels. * @memberof LabelGraphics.prototype * @type {Property} + * @default new Cartesian2(7, 5) */ - horizontalOrigin : createPropertyDescriptor('horizontalOrigin'), + backgroundPadding : createPropertyDescriptor('backgroundPadding'), /** - * Gets or sets the Property specifying the {@link VerticalOrigin}. + * Gets or sets the {@link Cartesian2} Property specifying the label's pixel offset in screen space + * from the origin of this label. This is commonly used to align multiple labels and labels at + * the same position, e.g., an image and text. The screen space origin is the top, left corner of the + * canvas; x increases from left to right, and y increases from top to bottom. + *

+ *

+ * + * + * + *
default
l.pixeloffset = new Cartesian2(25, 75);
+ * The label's origin is indicated by the yellow point. + *
+ *

* @memberof LabelGraphics.prototype * @type {Property} + * @default Cartesian2.ZERO */ - verticalOrigin : createPropertyDescriptor('verticalOrigin'), + pixelOffset : createPropertyDescriptor('pixelOffset'), /** * Gets or sets the {@link Cartesian3} Property specifying the label's offset in eye coordinates. @@ -197,80 +230,47 @@ define([ eyeOffset : createPropertyDescriptor('eyeOffset'), /** - * Gets or sets the Property specifying the {@link HeightReference}. - * @memberof LabelGraphics.prototype - * @type {Property} - * @default HeightReference.NONE - */ - heightReference : createPropertyDescriptor('heightReference'), - - /** - * Gets or sets the {@link Cartesian2} Property specifying the label's pixel offset in screen space - * from the origin of this label. This is commonly used to align multiple labels and labels at - * the same position, e.g., an image and text. The screen space origin is the top, left corner of the - * canvas; x increases from left to right, and y increases from top to bottom. - *

- *

- * - * - * - *
default
l.pixeloffset = new Cartesian2(25, 75);
- * The label's origin is indicated by the yellow point. - *
- *

+ * Gets or sets the Property specifying the {@link HorizontalOrigin}. * @memberof LabelGraphics.prototype * @type {Property} - * @default Cartesian2.ZERO */ - pixelOffset : createPropertyDescriptor('pixelOffset'), + horizontalOrigin : createPropertyDescriptor('horizontalOrigin'), /** - * Gets or sets the numeric Property specifying the uniform scale to apply to the image. - * A scale greater than 1.0 enlarges the label while a scale less than 1.0 shrinks it. - *

- *

- *
- * From left to right in the above image, the scales are 0.5, 1.0, - * and 2.0. - *
- *

+ * Gets or sets the Property specifying the {@link VerticalOrigin}. * @memberof LabelGraphics.prototype * @type {Property} - * @default 1.0 */ - scale : createPropertyDescriptor('scale'), + verticalOrigin : createPropertyDescriptor('verticalOrigin'), /** - * Gets or sets the boolean Property specifying the visibility of the label. + * Gets or sets the Property specifying the {@link HeightReference}. * @memberof LabelGraphics.prototype * @type {Property} + * @default HeightReference.NONE */ - show : createPropertyDescriptor('show'), + heightReference : createPropertyDescriptor('heightReference'), /** - * Gets or sets the boolean Property specifying the visibility of the background behind the label. + * Gets or sets the Property specifying the fill {@link Color}. * @memberof LabelGraphics.prototype * @type {Property} - * @default false */ - showBackground : createPropertyDescriptor('showBackground'), + fillColor : createPropertyDescriptor('fillColor'), /** - * Gets or sets the Property specifying the background {@link Color}. + * Gets or sets the Property specifying the outline {@link Color}. * @memberof LabelGraphics.prototype * @type {Property} - * @default new Color(0.165, 0.165, 0.165, 0.8) */ - backgroundColor : createPropertyDescriptor('backgroundColor'), + outlineColor : createPropertyDescriptor('outlineColor'), /** - * Gets or sets the {@link Cartesian2} Property specifying the label's horizontal and vertical - * background padding in pixels. + * Gets or sets the numeric Property specifying the outline width. * @memberof LabelGraphics.prototype * @type {Property} - * @default new Cartesian2(7, 5) */ - backgroundPadding : createPropertyDescriptor('backgroundPadding'), + outlineWidth : createPropertyDescriptor('outlineWidth'), /** * Gets or sets {@link NearFarScalar} Property specifying the translucency of the label based on the distance from the camera. @@ -332,22 +332,22 @@ define([ if (!defined(result)) { return new LabelGraphics(this); } + result.show = this.show; result.text = this.text; result.font = this.font; - result.show = this.show; result.style = this.style; - result.fillColor = this.fillColor; - result.outlineColor = this.outlineColor; - result.outlineWidth = this.outlineWidth; + result.scale = this.scale; result.showBackground = this.showBackground; result.backgroundColor = this.backgroundColor; result.backgroundPadding = this.backgroundPadding; - result.scale = this.scale; + result.pixelOffset = this.pixelOffset; + result.eyeOffset = this.eyeOffset; result.horizontalOrigin = this.horizontalOrigin; result.verticalOrigin = this.verticalOrigin; - result.eyeOffset = this.eyeOffset; result.heightReference = this.heightReference; - result.pixelOffset = this.pixelOffset; + result.fillColor = this.fillColor; + result.outlineColor = this.outlineColor; + result.outlineWidth = this.outlineWidth; result.translucencyByDistance = this.translucencyByDistance; result.pixelOffsetScaleByDistance = this.pixelOffsetScaleByDistance; result.scaleByDistance = this.scaleByDistance; @@ -369,22 +369,22 @@ define([ } //>>includeEnd('debug'); + this.show = defaultValue(this.show, source.show); this.text = defaultValue(this.text, source.text); this.font = defaultValue(this.font, source.font); - this.show = defaultValue(this.show, source.show); this.style = defaultValue(this.style, source.style); - this.fillColor = defaultValue(this.fillColor, source.fillColor); - this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); - this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); + this.scale = defaultValue(this.scale, source.scale); this.showBackground = defaultValue(this.showBackground, source.showBackground); this.backgroundColor = defaultValue(this.backgroundColor, source.backgroundColor); this.backgroundPadding = defaultValue(this.backgroundPadding, source.backgroundPadding); - this.scale = defaultValue(this.scale, source.scale); + this.pixelOffset = defaultValue(this.pixelOffset, source.pixelOffset); + this.eyeOffset = defaultValue(this.eyeOffset, source.eyeOffset); this.horizontalOrigin = defaultValue(this.horizontalOrigin, source.horizontalOrigin); this.verticalOrigin = defaultValue(this.verticalOrigin, source.verticalOrigin); - this.eyeOffset = defaultValue(this.eyeOffset, source.eyeOffset); this.heightReference = defaultValue(this.heightReference, source.heightReference); - this.pixelOffset = defaultValue(this.pixelOffset, source.pixelOffset); + this.fillColor = defaultValue(this.fillColor, source.fillColor); + this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); + this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); this.translucencyByDistance = defaultValue(this.translucencyByDistance, source.translucencyByDistance); this.pixelOffsetScaleByDistance = defaultValue(this.pixelOffsetScaleByDistance, source.pixelOffsetScaleByDistance); this.scaleByDistance = defaultValue(this.scaleByDistance, source.scaleByDistance); diff --git a/Source/DataSources/ModelGraphics.js b/Source/DataSources/ModelGraphics.js index afe99a157dd3..0012a6c086cf 100644 --- a/Source/DataSources/ModelGraphics.js +++ b/Source/DataSources/ModelGraphics.js @@ -42,34 +42,37 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Property} [options.uri] A string or Resource Property specifying the URI of the glTF asset. * @param {Property} [options.show=true] A boolean Property specifying the visibility of the model. + * @param {Property} [options.uri] A string or Resource Property specifying the URI of the glTF asset. * @param {Property} [options.scale=1.0] A numeric Property specifying a uniform linear scale. * @param {Property} [options.minimumPixelSize=0.0] A numeric Property specifying the approximate minimum pixel size of the model regardless of zoom. * @param {Property} [options.maximumScale] The maximum scale size of a model. An upper limit for minimumPixelSize. * @param {Property} [options.incrementallyLoadTextures=true] Determine if textures may continue to stream in after the model is loaded. * @param {Property} [options.runAnimations=true] A boolean Property specifying if glTF animations specified in the model should be started. * @param {Property} [options.clampAnimations=true] A boolean Property specifying if glTF animations should hold the last pose for time durations with no keyframes. - * @param {PropertyBag} [options.nodeTransformations] An object, where keys are names of nodes, and values are {@link TranslationRotationScale} Properties describing the transformation to apply to that node. The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation. - * @param {PropertyBag} [options.articulations] An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties. * @param {Property} [options.shadows=ShadowMode.ENABLED] An enum Property specifying whether the model casts or receives shadows from each light source. * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to. - * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this model will be displayed. * @param {Property} [options.silhouetteColor=Color.RED] A Property specifying the {@link Color} of the silhouette. * @param {Property} [options.silhouetteSize=0.0] A numeric Property specifying the size of the silhouette in pixels. * @param {Property} [options.color=Color.WHITE] A Property specifying the {@link Color} that blends with the model's rendered color. * @param {Property} [options.colorBlendMode=ColorBlendMode.HIGHLIGHT] An enum Property specifying how the color blends with the model. * @param {Property} [options.colorBlendAmount=0.5] A numeric Property specifying the color strength when the colorBlendMode is MIX. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two. - * @param {Property} [options.clippingPlanes] A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model. * @param {Property} [options.imageBasedLightingFactor=new Cartesian2(1.0, 1.0)] A property specifying the contribution from diffuse and specular image-based lighting. * @param {Property} [options.lightColor] A property specifying the light color to use when shading the model. The default sun light color will be used when undefined. + * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this model will be displayed. + * @param {PropertyBag} [options.nodeTransformations] An object, where keys are names of nodes, and values are {@link TranslationRotationScale} Properties describing the transformation to apply to that node. The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation. + * @param {PropertyBag} [options.articulations] An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties. + * @param {Property} [options.clippingPlanes] A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model. * * @see {@link https://cesiumjs.org/tutorials/3D-Models-Tutorial/|3D Models Tutorial} * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=3D%20Models.html|Cesium Sandcastle 3D Models Demo} */ function ModelGraphics(options) { + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; + this._uri = undefined; + this._uriSubscription = undefined; this._scale = undefined; this._scaleSubscription = undefined; this._minimumPixelSize = undefined; @@ -78,21 +81,14 @@ define([ this._maximumScaleSubscription = undefined; this._incrementallyLoadTextures = undefined; this._incrementallyLoadTexturesSubscription = undefined; - this._shadows = undefined; - this._shadowsSubscription = undefined; - this._uri = undefined; - this._uriSubscription = undefined; this._runAnimations = undefined; - this._clampAnimations = undefined; this._runAnimationsSubscription = undefined; - this._nodeTransformations = undefined; - this._nodeTransformationsSubscription = undefined; - this._articulations = undefined; - this._articulationsSubscription = undefined; + this._clampAnimations = undefined; + this._clampAnimationsSubscription = undefined; + this._shadows = undefined; + this._shadowsSubscription = undefined; this._heightReference = undefined; this._heightReferenceSubscription = undefined; - this._distanceDisplayCondition = undefined; - this._distanceDisplayConditionSubscription = undefined; this._silhouetteColor = undefined; this._silhouetteColorSubscription = undefined; this._silhouetteSize = undefined; @@ -103,13 +99,18 @@ define([ this._colorBlendModeSubscription = undefined; this._colorBlendAmount = undefined; this._colorBlendAmountSubscription = undefined; - this._clippingPlanes = undefined; - this._clippingPlanesSubscription = undefined; this._imageBasedLightingFactor = undefined; this._imageBasedLightingFactorSubscription = undefined; this._lightColor = undefined; this._lightColorSubscription = undefined; - this._definitionChanged = new Event(); + this._distanceDisplayCondition = undefined; + this._distanceDisplayConditionSubscription = undefined; + this._nodeTransformations = undefined; + this._nodeTransformationsSubscription = undefined; + this._articulations = undefined; + this._articulationsSubscription = undefined; + this._clippingPlanes = undefined; + this._clippingPlanesSubscription = undefined; this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -135,6 +136,13 @@ define([ */ show : createPropertyDescriptor('show'), + /** + * Gets or sets the string Property specifying the URI of the glTF asset. + * @memberof ModelGraphics.prototype + * @type {Property} + */ + uri : createPropertyDescriptor('uri'), + /** * Gets or sets the numeric Property specifying a uniform linear scale * for this model. Values greater than 1.0 increase the size of the model while @@ -173,22 +181,6 @@ define([ */ incrementallyLoadTextures : createPropertyDescriptor('incrementallyLoadTextures'), - /** - * Get or sets the enum Property specifying whether the model - * casts or receives shadows from each light source. - * @memberof ModelGraphics.prototype - * @type {Property} - * @default ShadowMode.ENABLED - */ - shadows : createPropertyDescriptor('shadows'), - - /** - * Gets or sets the string Property specifying the URI of the glTF asset. - * @memberof ModelGraphics.prototype - * @type {Property} - */ - uri : createPropertyDescriptor('uri'), - /** * Gets or sets the boolean Property specifying if glTF animations should be run. * @memberof ModelGraphics.prototype @@ -206,21 +198,13 @@ define([ clampAnimations : createPropertyDescriptor('clampAnimations'), /** - * Gets or sets the set of node transformations to apply to this model. This is represented as an {@link PropertyBag}, where keys are - * names of nodes, and values are {@link TranslationRotationScale} Properties describing the transformation to apply to that node. - * The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation. - * @memberof ModelGraphics.prototype - * @type {PropertyBag} - */ - nodeTransformations : createPropertyDescriptor('nodeTransformations', undefined, createNodeTransformationPropertyBag), - - /** - * Gets or sets the set of articulation values to apply to this model. This is represented as an {@link PropertyBag}, where keys are - * composed as the name of the articulation, a single space, and the name of the stage. + * Get or sets the enum Property specifying whether the model + * casts or receives shadows from each light source. * @memberof ModelGraphics.prototype - * @type {PropertyBag} + * @type {Property} + * @default ShadowMode.ENABLED */ - articulations : createPropertyDescriptor('articulations', undefined, createArticulationStagePropertyBag), + shadows : createPropertyDescriptor('shadows'), /** * Gets or sets the Property specifying the {@link HeightReference}. @@ -230,13 +214,6 @@ define([ */ heightReference : createPropertyDescriptor('heightReference'), - /** - * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this model will be displayed. - * @memberof ModelGraphics.prototype - * @type {Property} - */ - distanceDisplayCondition : createPropertyDescriptor('distanceDisplayCondition'), - /** * Gets or sets the Property specifying the {@link Color} of the silhouette. * @memberof ModelGraphics.prototype @@ -280,25 +257,49 @@ define([ colorBlendAmount : createPropertyDescriptor('colorBlendAmount'), /** - * A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model. + * A property specifying the {@link Cartesian2} used to scale the diffuse and specular image-based lighting contribution to the final color. * @memberof ModelGraphics.prototype * @type {Property} */ - clippingPlanes : createPropertyDescriptor('clippingPlanes'), + imageBasedLightingFactor : createPropertyDescriptor('imageBasedLightingFactor'), /** - * A property specifying the {@link Cartesian2} used to scale the diffuse and specular image-based lighting contribution to the final color. + * A property specifying the {@link Cartesian3} color of the light source when shading the model. + * @memberOf ModelGraphics.prototype + * @type {Property} + */ + lightColor : createPropertyDescriptor('lightColor'), + + /** + * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this model will be displayed. * @memberof ModelGraphics.prototype * @type {Property} */ - imageBasedLightingFactor : createPropertyDescriptor('imageBasedLightingFactor'), + distanceDisplayCondition : createPropertyDescriptor('distanceDisplayCondition'), /** - * A property specifying the {@link Cartesian3} color of the light source when shading the model. - * @memberOf ModelGraphics.prototype + * Gets or sets the set of node transformations to apply to this model. This is represented as an {@link PropertyBag}, where keys are + * names of nodes, and values are {@link TranslationRotationScale} Properties describing the transformation to apply to that node. + * The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation. + * @memberof ModelGraphics.prototype + * @type {PropertyBag} + */ + nodeTransformations : createPropertyDescriptor('nodeTransformations', undefined, createNodeTransformationPropertyBag), + + /** + * Gets or sets the set of articulation values to apply to this model. This is represented as an {@link PropertyBag}, where keys are + * composed as the name of the articulation, a single space, and the name of the stage. + * @memberof ModelGraphics.prototype + * @type {PropertyBag} + */ + articulations : createPropertyDescriptor('articulations', undefined, createArticulationStagePropertyBag), + + /** + * A property specifying the {@link ClippingPlaneCollection} used to selectively disable rendering the model. + * @memberof ModelGraphics.prototype * @type {Property} */ - lightColor : createPropertyDescriptor('lightColor') + clippingPlanes : createPropertyDescriptor('clippingPlanes') }); /** @@ -312,27 +313,25 @@ define([ return new ModelGraphics(this); } result.show = this.show; + result.uri = this.uri; result.scale = this.scale; result.minimumPixelSize = this.minimumPixelSize; result.maximumScale = this.maximumScale; result.incrementallyLoadTextures = this.incrementallyLoadTextures; - result.shadows = this.shadows; - result.uri = this.uri; result.runAnimations = this.runAnimations; result.clampAnimations = this.clampAnimations; - result.nodeTransformations = this.nodeTransformations; - result.articulations = this.articulations; result.heightReference = this._heightReference; - result.distanceDisplayCondition = this.distanceDisplayCondition; result.silhouetteColor = this.silhouetteColor; result.silhouetteSize = this.silhouetteSize; result.color = this.color; result.colorBlendMode = this.colorBlendMode; result.colorBlendAmount = this.colorBlendAmount; - result.clippingPlanes = this.clippingPlanes; result.imageBasedLightingFactor = this.imageBasedLightingFactor; result.lightColor = this.lightColor; - + result.distanceDisplayCondition = this.distanceDisplayCondition; + result.nodeTransformations = this.nodeTransformations; + result.articulations = this.articulations; + result.clippingPlanes = this.clippingPlanes; return result; }; @@ -350,24 +349,24 @@ define([ //>>includeEnd('debug'); this.show = defaultValue(this.show, source.show); + this.uri = defaultValue(this.uri, source.uri); this.scale = defaultValue(this.scale, source.scale); this.minimumPixelSize = defaultValue(this.minimumPixelSize, source.minimumPixelSize); this.maximumScale = defaultValue(this.maximumScale, source.maximumScale); this.incrementallyLoadTextures = defaultValue(this.incrementallyLoadTextures, source.incrementallyLoadTextures); - this.shadows = defaultValue(this.shadows, source.shadows); - this.uri = defaultValue(this.uri, source.uri); this.runAnimations = defaultValue(this.runAnimations, source.runAnimations); this.clampAnimations = defaultValue(this.clampAnimations, source.clampAnimations); + this.shadows = defaultValue(this.shadows, source.shadows); this.heightReference = defaultValue(this.heightReference, source.heightReference); - this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); this.silhouetteColor = defaultValue(this.silhouetteColor, source.silhouetteColor); this.silhouetteSize = defaultValue(this.silhouetteSize, source.silhouetteSize); this.color = defaultValue(this.color, source.color); this.colorBlendMode = defaultValue(this.colorBlendMode, source.colorBlendMode); this.colorBlendAmount = defaultValue(this.colorBlendAmount, source.colorBlendAmount); - this.clippingPlanes = defaultValue(this.clippingPlanes, source.clippingPlanes); this.imageBasedLightingFactor = defaultValue(this.imageBasedLightingFactor, source.imageBasedLightingFactor); this.lightColor = defaultValue(this.lightColor, source.lightColor); + this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); + this.clippingPlanes = defaultValue(this.clippingPlanes, source.clippingPlanes); var sourceNodeTransformations = source.nodeTransformations; if (defined(sourceNodeTransformations)) { diff --git a/Source/DataSources/PathGraphics.js b/Source/DataSources/PathGraphics.js index 0f617347b500..6186a4f98b82 100644 --- a/Source/DataSources/PathGraphics.js +++ b/Source/DataSources/PathGraphics.js @@ -23,30 +23,30 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the path. * @param {Property} [options.leadTime] A Property specifying the number of seconds behind the object to show. * @param {Property} [options.trailTime] A Property specifying the number of seconds in front of the object to show. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the path. * @param {Property} [options.width=1.0] A numeric Property specifying the width in pixels. - * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to draw the path. * @param {Property} [options.resolution=60] A numeric Property specifying the maximum number of seconds to step when sampling the position. + * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to draw the path. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this path will be displayed. */ function PathGraphics(options) { - this._material = undefined; - this._materialSubscription = undefined; + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; - this._width = undefined; - this._widthSubscription = undefined; - this._resolution = undefined; - this._resolutionSubscription = undefined; this._leadTime = undefined; this._leadTimeSubscription = undefined; this._trailTime = undefined; this._trailTimeSubscription = undefined; + this._width = undefined; + this._widthSubscription = undefined; + this._resolution = undefined; + this._resolutionSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -73,12 +73,18 @@ define([ show : createPropertyDescriptor('show'), /** - * Gets or sets the Property specifying the material used to draw the path. + * Gets or sets the Property specifying the number of seconds in front of the object to show. * @memberof PathGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE + * @type {Property} */ - material : createMaterialPropertyDescriptor('material'), + leadTime : createPropertyDescriptor('leadTime'), + + /** + * Gets or sets the Property specifying the number of seconds behind the object to show. + * @memberof PathGraphics.prototype + * @type {Property} + */ + trailTime : createPropertyDescriptor('trailTime'), /** * Gets or sets the numeric Property specifying the width in pixels. @@ -97,18 +103,12 @@ define([ resolution : createPropertyDescriptor('resolution'), /** - * Gets or sets the Property specifying the number of seconds in front of the object to show. - * @memberof PathGraphics.prototype - * @type {Property} - */ - leadTime : createPropertyDescriptor('leadTime'), - - /** - * Gets or sets the Property specifying the number of seconds behind the object to show. + * Gets or sets the Property specifying the material used to draw the path. * @memberof PathGraphics.prototype - * @type {Property} + * @type {MaterialProperty} + * @default Color.WHITE */ - trailTime : createPropertyDescriptor('trailTime'), + material : createMaterialPropertyDescriptor('material'), /** * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this path will be displayed. @@ -128,12 +128,12 @@ define([ if (!defined(result)) { return new PathGraphics(this); } - result.material = this.material; - result.width = this.width; - result.resolution = this.resolution; result.show = this.show; result.leadTime = this.leadTime; result.trailTime = this.trailTime; + result.width = this.width; + result.resolution = this.resolution; + result.material = this.material; result.distanceDisplayCondition = this.distanceDisplayCondition; return result; }; @@ -151,12 +151,12 @@ define([ } //>>includeEnd('debug'); - this.material = defaultValue(this.material, source.material); - this.width = defaultValue(this.width, source.width); - this.resolution = defaultValue(this.resolution, source.resolution); this.show = defaultValue(this.show, source.show); this.leadTime = defaultValue(this.leadTime, source.leadTime); this.trailTime = defaultValue(this.trailTime, source.trailTime); + this.width = defaultValue(this.width, source.width); + this.resolution = defaultValue(this.resolution, source.resolution); + this.material = defaultValue(this.material, source.material); this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); }; diff --git a/Source/DataSources/PlaneGraphics.js b/Source/DataSources/PlaneGraphics.js index ef344e672d89..75741cc510f4 100644 --- a/Source/DataSources/PlaneGraphics.js +++ b/Source/DataSources/PlaneGraphics.js @@ -23,9 +23,9 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the plane. * @param {Property} [options.plane] A {@link Plane} Property specifying the normal and distance for the plane. * @param {Property} [options.dimensions] A {@link Cartesian2} Property specifying the width and height of the plane. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the plane. * @param {Property} [options.fill=true] A boolean Property specifying whether the plane is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the plane. * @param {Property} [options.outline=false] A boolean Property specifying whether the plane is outlined. @@ -37,12 +37,13 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Plane.html|Cesium Sandcastle Plane Demo} */ function PlaneGraphics(options) { + this._definitionChanged = new Event(); + this._show = undefined; + this._showSubscription = undefined; this._plane = undefined; this._planeSubscription = undefined; this._dimensions = undefined; this._dimensionsSubscription = undefined; - this._show = undefined; - this._showSubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; this._material = undefined; @@ -57,7 +58,6 @@ define([ this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -99,14 +99,6 @@ define([ */ dimensions : createPropertyDescriptor('dimensions'), - /** - * Gets or sets the material used to fill the plane. - * @memberof PlaneGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE - */ - material : createMaterialPropertyDescriptor('material'), - /** * Gets or sets the boolean Property specifying whether the plane is filled with the provided material. * @memberof PlaneGraphics.prototype @@ -115,6 +107,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the material used to fill the plane. + * @memberof PlaneGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the plane is outlined. * @memberof PlaneGraphics.prototype @@ -166,11 +166,11 @@ define([ if (!defined(result)) { return new PlaneGraphics(this); } + result.show = this.show; result.plane = this.plane; result.dimensions = this.dimensions; - result.show = this.show; - result.material = this.material; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; @@ -192,11 +192,11 @@ define([ } //>>includeEnd('debug'); + this.show = defaultValue(this.show, source.show); this.plane = defaultValue(this.plane, source.plane); this.dimensions = defaultValue(this.dimensions, source.dimensions); - this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); diff --git a/Source/DataSources/PointGraphics.js b/Source/DataSources/PointGraphics.js index 14b10d6f78a2..9acfb622965f 100644 --- a/Source/DataSources/PointGraphics.js +++ b/Source/DataSources/PointGraphics.js @@ -21,39 +21,39 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: - * @param {Property} [options.color=Color.WHITE] A Property specifying the {@link Color} of the point. + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the point. * @param {Property} [options.pixelSize=1] A numeric Property specifying the size in pixels. + * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to. + * @param {Property} [options.color=Color.WHITE] A Property specifying the {@link Color} of the point. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=0] A numeric Property specifying the the outline width in pixels. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the point. * @param {Property} [options.scaleByDistance] A {@link NearFarScalar} Property used to scale the point based on distance. * @param {Property} [options.translucencyByDistance] A {@link NearFarScalar} Property used to set translucency based on distance from the camera. - * @param {Property} [options.heightReference=HeightReference.NONE] A Property specifying what the height is relative to. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this point will be displayed. * @param {Property} [options.disableDepthTestDistance] A Property specifying the distance from the camera at which to disable the depth test to. */ function PointGraphics(options) { - this._color = undefined; - this._colorSubscription = undefined; + this._definitionChanged = new Event(); + this._show = undefined; + this._showSubscription = undefined; this._pixelSize = undefined; this._pixelSizeSubscription = undefined; + this._heightReference = undefined; + this._heightReferenceSubscription = undefined; + this._color = undefined; + this._colorSubscription = undefined; this._outlineColor = undefined; this._outlineColorSubscription = undefined; this._outlineWidth = undefined; this._outlineWidthSubscription = undefined; - this._show = undefined; - this._showSubscription = undefined; this._scaleByDistance = undefined; this._scaleByDistanceSubscription = undefined; this._translucencyByDistance = undefined; this._translucencyByDistanceSubscription = undefined; - this._heightReference = undefined; - this._heightReferenceSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; this._disableDepthTestDistance = undefined; this._disableDepthTestDistanceSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -73,12 +73,12 @@ define([ }, /** - * Gets or sets the Property specifying the {@link Color} of the point. + * Gets or sets the boolean Property specifying the visibility of the point. * @memberof PointGraphics.prototype * @type {Property} - * @default Color.WHITE + * @default true */ - color : createPropertyDescriptor('color'), + show : createPropertyDescriptor('show'), /** * Gets or sets the numeric Property specifying the size in pixels. @@ -88,6 +88,22 @@ define([ */ pixelSize : createPropertyDescriptor('pixelSize'), + /** + * Gets or sets the Property specifying the {@link HeightReference}. + * @memberof PointGraphics.prototype + * @type {Property} + * @default HeightReference.NONE + */ + heightReference : createPropertyDescriptor('heightReference'), + + /** + * Gets or sets the Property specifying the {@link Color} of the point. + * @memberof PointGraphics.prototype + * @type {Property} + * @default Color.WHITE + */ + color : createPropertyDescriptor('color'), + /** * Gets or sets the Property specifying the {@link Color} of the outline. * @memberof PointGraphics.prototype @@ -104,14 +120,6 @@ define([ */ outlineWidth : createPropertyDescriptor('outlineWidth'), - /** - * Gets or sets the boolean Property specifying the visibility of the point. - * @memberof PointGraphics.prototype - * @type {Property} - * @default true - */ - show : createPropertyDescriptor('show'), - /** * Gets or sets the {@link NearFarScalar} Property used to scale the point based on distance. * If undefined, a constant size is used. @@ -131,14 +139,6 @@ define([ */ translucencyByDistance : createPropertyDescriptor('translucencyByDistance'), - /** - * Gets or sets the Property specifying the {@link HeightReference}. - * @memberof PointGraphics.prototype - * @type {Property} - * @default HeightReference.NONE - */ - heightReference : createPropertyDescriptor('heightReference'), - /** * Gets or sets the {@link DistanceDisplayCondition} Property specifying at what distance from the camera that this point will be displayed. * @memberof PointGraphics.prototype @@ -165,14 +165,14 @@ define([ if (!defined(result)) { return new PointGraphics(this); } - result.color = this.color; + result.show = this.show; result.pixelSize = this.pixelSize; + result.heightReference = this.heightReference; + result.color = this.color; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; - result.show = this.show; result.scaleByDistance = this.scaleByDistance; result.translucencyByDistance = this._translucencyByDistance; - result.heightReference = this.heightReference; result.distanceDisplayCondition = this.distanceDisplayCondition; result.disableDepthTestDistance = this.disableDepthTestDistance; return result; @@ -191,14 +191,14 @@ define([ } //>>includeEnd('debug'); - this.color = defaultValue(this.color, source.color); + this.show = defaultValue(this.show, source.show); this.pixelSize = defaultValue(this.pixelSize, source.pixelSize); + this.heightReference = defaultValue(this.heightReference, source.heightReference); + this.color = defaultValue(this.color, source.color); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); - this.show = defaultValue(this.show, source.show); this.scaleByDistance = defaultValue(this.scaleByDistance, source.scaleByDistance); this.translucencyByDistance = defaultValue(this._translucencyByDistance, source.translucencyByDistance); - this.heightReference = defaultValue(this.heightReference, source.heightReference); this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); this.disableDepthTestDistance = defaultValue(this.disableDepthTestDistance, source.disableDepthTestDistance); }; diff --git a/Source/DataSources/PolygonGraphics.js b/Source/DataSources/PolygonGraphics.js index ede07748796f..77ef91c5029f 100644 --- a/Source/DataSources/PolygonGraphics.js +++ b/Source/DataSources/PolygonGraphics.js @@ -25,36 +25,35 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the polygon. * @param {Property} [options.hierarchy] A Property specifying the {@link PolygonHierarchy}. * @param {Property} [options.height=0] A numeric Property specifying the altitude of the polygon relative to the ellipsoid surface. * @param {Property} [options.heightReference] A Property specifying what the height is relative to. * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the polygon's extruded face relative to the ellipsoid surface. * @param {Property} [options.extrudedHeightReference] A Property specifying what the extrudedHeight is relative to. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the polygon. + * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the polygon texture counter-clockwise from north. + * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point. * @param {Property} [options.fill=true] A boolean Property specifying whether the polygon is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the polygon. * @param {Property} [options.outline=false] A boolean Property specifying whether the polygon is outlined. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline. - * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the polygon texture counter-clockwise from north. - * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point. * @param {Property} [options.perPositionHeight=false] A boolean specifying whether or not the the height of each position is used. * @param {Boolean} [options.closeTop=true] When false, leaves off the top of an extruded polygon open. * @param {Boolean} [options.closeBottom=true] When false, leaves off the bottom of an extruded polygon open. + * @param {Property} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the polygon casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this polygon will be displayed. * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this polygon will classify terrain, 3D Tiles, or both when on the ground. - * @param {Property} [options.arcType=ArcType.GEODESIC] The type of line the polygon edges must follow. * @param {ConstantProperty} [options.zIndex=0] A property specifying the zIndex used for ordering ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified. * * @see Entity * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polygon.html|Cesium Sandcastle Polygon Demo} */ function PolygonGraphics(options) { + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; this._hierarchy = undefined; this._hierarchySubscription = undefined; this._height = undefined; @@ -65,35 +64,36 @@ define([ this._extrudedHeightSubscription = undefined; this._extrudedHeightReference = undefined; this._extrudedHeightReferenceSubscription = undefined; - this._granularity = undefined; - this._granularitySubscription = undefined; this._stRotation = undefined; this._stRotationSubscription = undefined; - this._perPositionHeight = undefined; - this._perPositionHeightSubscription = undefined; + this._granularity = undefined; + this._granularitySubscription = undefined; + this._fill = undefined; + this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; this._outlineColorSubscription = undefined; this._outlineWidth = undefined; this._outlineWidthSubscription = undefined; - this._fill = undefined; - this._fillSubscription = undefined; + this._perPositionHeight = undefined; + this._perPositionHeightSubscription = undefined; this._closeTop = undefined; this._closeTopSubscription = undefined; this._closeBottom = undefined; this._closeBottomSubscription = undefined; + this._arcType = undefined; + this._arcTypeSubscription = undefined; this._shadows = undefined; this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; this._classificationType = undefined; this._classificationTypeSubscription = undefined; - this._arcType = undefined; - this._arcTypeSubscription = undefined; this._zIndex = undefined; this._zIndexSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -120,14 +120,6 @@ define([ */ show : createPropertyDescriptor('show'), - /** - * Gets or sets the Property specifying the material used to fill the polygon. - * @memberof PolygonGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE - */ - material : createMaterialPropertyDescriptor('material'), - /** * Gets or sets the Property specifying the {@link PolygonHierarchy}. * @memberof PolygonGraphics.prototype @@ -169,20 +161,20 @@ define([ extrudedHeightReference : createPropertyDescriptor('extrudedHeightReference'), /** - * Gets or sets the numeric Property specifying the angular distance between points on the polygon. + * Gets or sets the numeric property specifying the rotation of the polygon texture counter-clockwise from north. * @memberof PolygonGraphics.prototype * @type {Property} - * @default {CesiumMath.RADIANS_PER_DEGREE} + * @default 0 */ - granularity : createPropertyDescriptor('granularity'), + stRotation : createPropertyDescriptor('stRotation'), /** - * Gets or sets the numeric property specifying the rotation of the polygon texture counter-clockwise from north. + * Gets or sets the numeric Property specifying the angular distance between points on the polygon. * @memberof PolygonGraphics.prototype * @type {Property} - * @default 0 + * @default {CesiumMath.RADIANS_PER_DEGREE} */ - stRotation : createPropertyDescriptor('stRotation'), + granularity : createPropertyDescriptor('granularity'), /** * Gets or sets the boolean Property specifying whether the polygon is filled with the provided material. @@ -192,6 +184,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the Property specifying the material used to fill the polygon. + * @memberof PolygonGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the polygon is outlined. * @memberof PolygonGraphics.prototype @@ -239,6 +239,14 @@ define([ */ closeBottom : createPropertyDescriptor('closeBottom'), + /** + * Gets or sets the {@link ArcType} Property specifying the type of lines the polygon edges use. + * @memberof PolygonGraphics.prototype + * @type {Property} + * @default ArcType.GEODESIC + */ + arcType : createPropertyDescriptor('arcType'), + /** * Get or sets the enum Property specifying whether the polygon * casts or receives shadows from each light source. @@ -263,14 +271,6 @@ define([ */ classificationType : createPropertyDescriptor('classificationType'), - /** - * Gets or sets the {@link ArcType} Property specifying the type of lines the polygon edges use. - * @memberof PolygonGraphics.prototype - * @type {Property} - * @default ArcType.GEODESIC - */ - arcType : createPropertyDescriptor('arcType'), - /** * Gets or sets the zIndex Prperty specifying the ordering of ground geometry. Only has an effect if the polygon is constant and neither height or extrudedHeight are specified. * @memberof PolygonGraphics.prototype @@ -291,27 +291,26 @@ define([ return new PolygonGraphics(this); } result.show = this.show; - result.material = this.material; result.hierarchy = this.hierarchy; result.height = this.height; result.heightReference = this.heightReference; result.extrudedHeight = this.extrudedHeight; result.extrudedHeightReference = this.extrudedHeightReference; - result.granularity = this.granularity; result.stRotation = this.stRotation; + result.granularity = this.granularity; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; result.perPositionHeight = this.perPositionHeight; result.closeTop = this.closeTop; result.closeBottom = this.closeBottom; + result.arcType = this.arcType; result.shadows = this.shadows; result.distanceDisplayCondition = this.distanceDisplayCondition; result.classificationType = this.classificationType; - result.arcType = this.arcType; result.zIndex = this.zIndex; - return result; }; @@ -329,25 +328,25 @@ define([ //>>includeEnd('debug'); this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); this.hierarchy = defaultValue(this.hierarchy, source.hierarchy); this.height = defaultValue(this.height, source.height); this.heightReference = defaultValue(this.heightReference, source.heightReference); this.extrudedHeight = defaultValue(this.extrudedHeight, source.extrudedHeight); this.extrudedHeightReference = defaultValue(this.extrudedHeightReference, source.extrudedHeightReference); - this.granularity = defaultValue(this.granularity, source.granularity); this.stRotation = defaultValue(this.stRotation, source.stRotation); + this.granularity = defaultValue(this.granularity, source.granularity); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); this.perPositionHeight = defaultValue(this.perPositionHeight, source.perPositionHeight); this.closeTop = defaultValue(this.closeTop, source.closeTop); this.closeBottom = defaultValue(this.closeBottom, source.closeBottom); + this.arcType = defaultValue(this.arcType, source.arcType); this.shadows = defaultValue(this.shadows, source.shadows); this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); this.classificationType = defaultValue(this.classificationType, source.classificationType); - this.arcType = defaultValue(this.arcType, source.arcType); this.zIndex = defaultValue(this.zIndex, source.zIndex); }; diff --git a/Source/DataSources/PolylineArrowMaterialProperty.js b/Source/DataSources/PolylineArrowMaterialProperty.js index 3c213d380a19..74a643287b4e 100644 --- a/Source/DataSources/PolylineArrowMaterialProperty.js +++ b/Source/DataSources/PolylineArrowMaterialProperty.js @@ -26,6 +26,7 @@ define([ this._definitionChanged = new Event(); this._color = undefined; this._colorSubscription = undefined; + this.color = color; } diff --git a/Source/DataSources/PolylineDashMaterialProperty.js b/Source/DataSources/PolylineDashMaterialProperty.js index bd8339bbbe87..a1f640494e79 100644 --- a/Source/DataSources/PolylineDashMaterialProperty.js +++ b/Source/DataSources/PolylineDashMaterialProperty.js @@ -86,18 +86,21 @@ define([ * @type {Property} */ color : createPropertyDescriptor('color'), + /** * Gets or sets the Property specifying the {@link Color} of the gaps in the line. * @memberof PolylineDashMaterialProperty.prototype * @type {Property} */ gapColor : createPropertyDescriptor('gapColor'), + /** * Gets or sets the numeric Property specifying the length of a dash cycle * @memberof PolylineDashMaterialProperty.prototype * @type {Property} */ dashLength : createPropertyDescriptor('dashLength'), + /** * Gets or sets the numeric Property specifying a dash pattern * @memberof PolylineDashMaterialProperty.prototype @@ -147,8 +150,7 @@ define([ Property.equals(this._color, other._color) && Property.equals(this._gapColor, other._gapColor) && Property.equals(this._dashLength, other._dashLength) && - Property.equals(this._dashPattern, other._dashPattern) - ); + Property.equals(this._dashPattern, other._dashPattern)); }; return PolylineDashMaterialProperty; diff --git a/Source/DataSources/PolylineGlowMaterialProperty.js b/Source/DataSources/PolylineGlowMaterialProperty.js index fcdc39a58b75..1c9b1e458e42 100644 --- a/Source/DataSources/PolylineGlowMaterialProperty.js +++ b/Source/DataSources/PolylineGlowMaterialProperty.js @@ -78,12 +78,14 @@ define([ * @type {Property} */ color : createPropertyDescriptor('color'), + /** * Gets or sets the numeric Property specifying the strength of the glow, as a percentage of the total line width (less than 1.0). * @memberof PolylineGlowMaterialProperty.prototype * @type {Property} */ glowPower : createPropertyDescriptor('glowPower'), + /** * Gets or sets the numeric Property specifying the strength of the tapering effect, as a percentage of the total line length. If 1.0 or higher, no taper effect is used. * @memberof PolylineGlowMaterialProperty.prototype diff --git a/Source/DataSources/PolylineGraphics.js b/Source/DataSources/PolylineGraphics.js index ab7ac2223fc9..954b37176d36 100644 --- a/Source/DataSources/PolylineGraphics.js +++ b/Source/DataSources/PolylineGraphics.js @@ -27,14 +27,14 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the polyline. * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions that define the line strip. - * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow. - * @param {Property} [options.clampToGround=false] A boolean Property specifying whether the Polyline should be clamped to the ground. * @param {Property} [options.width=1.0] A numeric Property specifying the width in pixels. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the polyline. + * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to draw the polyline. * @param {MaterialProperty} [options.depthFailMaterial] A property specifying the material used to draw the polyline when it is below the terrain. - * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE. + * @param {ArcType} [options.arcType=ArcType.GEODESIC] The type of line the polyline segments must follow. + * @param {Property} [options.clampToGround=false] A boolean Property specifying whether the Polyline should be clamped to the ground. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the polyline casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this polyline will be displayed. * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this polyline will classify terrain, 3D Tiles, or both when on the ground. @@ -44,23 +44,23 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polyline.html|Cesium Sandcastle Polyline Demo} */ function PolylineGraphics(options) { + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; + this._positions = undefined; + this._positionsSubscription = undefined; + this._width = undefined; + this._widthSubscription = undefined; + this._granularity = undefined; + this._granularitySubscription = undefined; this._material = undefined; this._materialSubscription = undefined; this._depthFailMaterial = undefined; this._depthFailMaterialSubscription = undefined; - this._positions = undefined; - this._positionsSubscription = undefined; this._arcType = undefined; this._arcTypeSubscription = undefined; this._clampToGround = undefined; this._clampToGroundSubscription = undefined; - this._granularity = undefined; - this._granularitySubscription = undefined; - this._widthSubscription = undefined; - this._width = undefined; - this._widthSubscription = undefined; this._shadows = undefined; this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; @@ -70,8 +70,6 @@ define([ this._zIndex = undefined; this._zIndexSubscription = undefined; - this._definitionChanged = new Event(); - this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -97,6 +95,30 @@ define([ */ show : createPropertyDescriptor('show'), + /** + * Gets or sets the Property specifying the array of {@link Cartesian3} + * positions that define the line strip. + * @memberof PolylineGraphics.prototype + * @type {Property} + */ + positions : createPropertyDescriptor('positions'), + + /** + * Gets or sets the numeric Property specifying the width in pixels. + * @memberof PolylineGraphics.prototype + * @type {Property} + * @default 1.0 + */ + width : createPropertyDescriptor('width'), + + /** + * Gets or sets the numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE and clampToGround is false. + * @memberof PolylineGraphics.prototype + * @type {Property} + * @default Cesium.Math.RADIANS_PER_DEGREE + */ + granularity : createPropertyDescriptor('granularity'), + /** * Gets or sets the Property specifying the material used to draw the polyline. * @memberof PolylineGraphics.prototype @@ -117,22 +139,6 @@ define([ */ depthFailMaterial : createMaterialPropertyDescriptor('depthFailMaterial'), - /** - * Gets or sets the Property specifying the array of {@link Cartesian3} - * positions that define the line strip. - * @memberof PolylineGraphics.prototype - * @type {Property} - */ - positions : createPropertyDescriptor('positions'), - - /** - * Gets or sets the numeric Property specifying the width in pixels. - * @memberof PolylineGraphics.prototype - * @type {Property} - * @default 1.0 - */ - width : createPropertyDescriptor('width'), - /** * Gets or sets the {@link ArcType} Property specifying whether the line segments should be great arcs, rhumb lines or linearly connected. * @memberof PolylineGraphics.prototype @@ -150,14 +156,6 @@ define([ */ clampToGround : createPropertyDescriptor('clampToGround'), - /** - * Gets or sets the numeric Property specifying the angular distance between each latitude and longitude if arcType is not ArcType.NONE and clampToGround is false. - * @memberof PolylineGraphics.prototype - * @type {Property} - * @default Cesium.Math.RADIANS_PER_DEGREE - */ - granularity : createPropertyDescriptor('granularity'), - /** * Get or sets the enum Property specifying whether the polyline * casts or receives shadows from each light source. @@ -202,18 +200,17 @@ define([ return new PolylineGraphics(this); } result.show = this.show; - result.material = this.material; - result.depthFailMaterial = this.depthFailMaterial; result.positions = this.positions; result.width = this.width; + result.granularity = this.granularity; + result.material = this.material; + result.depthFailMaterial = this.depthFailMaterial; result.arcType = this.arcType; result.clampToGround = this.clampToGround; - result.granularity = this.granularity; result.shadows = this.shadows; result.distanceDisplayCondition = this.distanceDisplayCondition; result.classificationType = this.classificationType; result.zIndex = this.zIndex; - return result; }; @@ -231,13 +228,13 @@ define([ //>>includeEnd('debug'); this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); - this.depthFailMaterial = defaultValue(this.depthFailMaterial, source.depthFailMaterial); this.positions = defaultValue(this.positions, source.positions); this.width = defaultValue(this.width, source.width); + this.granularity = defaultValue(this.granularity, source.granularity); + this.material = defaultValue(this.material, source.material); + this.depthFailMaterial = defaultValue(this.depthFailMaterial, source.depthFailMaterial); this.arcType = defaultValue(this.arcType, source.arcType); this.clampToGround = defaultValue(this.clampToGround, source.clampToGround); - this.granularity = defaultValue(this.granularity, source.granularity); this.shadows = defaultValue(this.shadows, source.shadows); this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); this.classificationType = defaultValue(this.classificationType, source.classificationType); diff --git a/Source/DataSources/PolylineOutlineMaterialProperty.js b/Source/DataSources/PolylineOutlineMaterialProperty.js index 1667686c08ef..df4289870dc1 100644 --- a/Source/DataSources/PolylineOutlineMaterialProperty.js +++ b/Source/DataSources/PolylineOutlineMaterialProperty.js @@ -81,6 +81,7 @@ define([ * @default Color.WHITE */ color : createPropertyDescriptor('color'), + /** * Gets or sets the Property specifying the {@link Color} of the outline. * @memberof PolylineOutlineMaterialProperty.prototype @@ -88,6 +89,7 @@ define([ * @default Color.BLACK */ outlineColor : createPropertyDescriptor('outlineColor'), + /** * Gets or sets the numeric Property specifying the width of the outline. * @memberof PolylineOutlineMaterialProperty.prototype diff --git a/Source/DataSources/PolylineVolumeGraphics.js b/Source/DataSources/PolylineVolumeGraphics.js index 04c997b83b59..a992a47e7f17 100644 --- a/Source/DataSources/PolylineVolumeGraphics.js +++ b/Source/DataSources/PolylineVolumeGraphics.js @@ -24,16 +24,16 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the volume. * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions which define the line strip. * @param {Property} [options.shape] A Property specifying the array of {@link Cartesian2} positions which define the shape to be extruded. * @param {Property} [options.cornerType=CornerType.ROUNDED] A {@link CornerType} Property specifying the style of the corners. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the volume. + * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point. * @param {Property} [options.fill=true] A boolean Property specifying whether the volume is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the volume. * @param {Property} [options.outline=false] A boolean Property specifying whether the volume is outlined. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline. - * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the volume casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this volume will be displayed. * @@ -41,20 +41,21 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Polyline%20Volume.html|Cesium Sandcastle Polyline Volume Demo} */ function PolylineVolumeGraphics(options) { + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; this._positions = undefined; this._positionsSubscription = undefined; this._shape = undefined; this._shapeSubscription = undefined; - this._granularity = undefined; - this._granularitySubscription = undefined; this._cornerType = undefined; this._cornerTypeSubscription = undefined; + this._granularity = undefined; + this._granularitySubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; @@ -65,7 +66,6 @@ define([ this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubsription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -92,14 +92,6 @@ define([ */ show : createPropertyDescriptor('show'), - /** - * Gets or sets the Property specifying the material used to fill the volume. - * @memberof PolylineVolumeGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE - */ - material : createMaterialPropertyDescriptor('material'), - /** * Gets or sets the Property specifying the array of {@link Cartesian3} positions which define the line strip. * @memberof PolylineVolumeGraphics.prototype @@ -114,6 +106,14 @@ define([ */ shape : createPropertyDescriptor('shape'), + /** + * Gets or sets the {@link CornerType} Property specifying the style of the corners. + * @memberof PolylineVolumeGraphics.prototype + * @type {Property} + * @default CornerType.ROUNDED + */ + cornerType : createPropertyDescriptor('cornerType'), + /** * Gets or sets the numeric Property specifying the angular distance between points on the volume. * @memberof PolylineVolumeGraphics.prototype @@ -130,6 +130,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the Property specifying the material used to fill the volume. + * @memberof PolylineVolumeGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the volume is outlined. * @memberof PolylineVolumeGraphics.prototype @@ -154,14 +162,6 @@ define([ */ outlineWidth : createPropertyDescriptor('outlineWidth'), - /** - * Gets or sets the {@link CornerType} Property specifying the style of the corners. - * @memberof PolylineVolumeGraphics.prototype - * @type {Property} - * @default CornerType.ROUNDED - */ - cornerType : createPropertyDescriptor('cornerType'), - /** * Get or sets the enum Property specifying whether the volume * casts or receives shadows from each light source. @@ -190,15 +190,15 @@ define([ return new PolylineVolumeGraphics(this); } result.show = this.show; - result.material = this.material; result.positions = this.positions; result.shape = this.shape; + result.cornerType = this.cornerType; result.granularity = this.granularity; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; - result.cornerType = this.cornerType; result.shadows = this.shadows; result.distanceDisplayCondition = this.distanceDisplayCondition; return result; @@ -218,15 +218,15 @@ define([ //>>includeEnd('debug'); this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); this.positions = defaultValue(this.positions, source.positions); this.shape = defaultValue(this.shape, source.shape); + this.cornerType = defaultValue(this.cornerType, source.cornerType); this.granularity = defaultValue(this.granularity, source.granularity); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); - this.cornerType = defaultValue(this.cornerType, source.cornerType); this.shadows = defaultValue(this.shadows, source.shadows); this.distanceDisplayCondition = defaultValue(this.distanceDisplayCondition, source.distanceDisplayCondition); }; diff --git a/Source/DataSources/RectangleGraphics.js b/Source/DataSources/RectangleGraphics.js index 69b251c1a684..65ea7a8cf83a 100644 --- a/Source/DataSources/RectangleGraphics.js +++ b/Source/DataSources/RectangleGraphics.js @@ -25,20 +25,20 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the rectangle. * @param {Property} [options.coordinates] The Property specifying the {@link Rectangle}. * @param {Property} [options.height=0] A numeric Property specifying the altitude of the rectangle relative to the ellipsoid surface. * @param {Property} [options.heightReference] A Property specifying what the height is relative to. * @param {Property} [options.extrudedHeight] A numeric Property specifying the altitude of the rectangle's extruded face relative to the ellipsoid surface. * @param {Property} [options.extrudedHeightReference] A Property specifying what the extrudedHeight is relative to. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the rectangle. + * @param {Property} [options.rotation=0.0] A numeric property specifying the rotation of the rectangle clockwise from north. + * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the rectangle texture counter-clockwise from north. + * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the rectangle. * @param {Property} [options.fill=true] A boolean Property specifying whether the rectangle is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the rectangle. * @param {Property} [options.outline=false] A boolean Property specifying whether the rectangle is outlined. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline. - * @param {Property} [options.rotation=0.0] A numeric property specifying the rotation of the rectangle clockwise from north. - * @param {Property} [options.stRotation=0.0] A numeric property specifying the rotation of the rectangle texture counter-clockwise from north. - * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between points on the rectangle. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the rectangle casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this rectangle will be displayed. * @param {Property} [options.classificationType=ClassificationType.BOTH] An enum Property specifying whether this rectangle will classify terrain, 3D Tiles, or both when on the ground. @@ -48,10 +48,9 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Rectangle.html|Cesium Sandcastle Rectangle Demo} */ function RectangleGraphics(options) { + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; this._coordinates = undefined; this._coordinatesSubscription = undefined; this._height = undefined; @@ -62,14 +61,16 @@ define([ this._extrudedHeightSubscription = undefined; this._extrudedHeightReference = undefined; this._extrudedHeightReferenceSubscription = undefined; - this._granularity = undefined; - this._granularitySubscription = undefined; - this._stRotation = undefined; - this._stRotationSubscription = undefined; this._rotation = undefined; this._rotationSubscription = undefined; + this._stRotation = undefined; + this._stRotationSubscription = undefined; + this._granularity = undefined; + this._granularitySubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; @@ -85,8 +86,6 @@ define([ this._zIndex = undefined; this._zIndexSubscription = undefined; - this._definitionChanged = new Event(); - this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -119,14 +118,6 @@ define([ */ coordinates : createPropertyDescriptor('coordinates'), - /** - * Gets or sets the Property specifying the material used to fill the rectangle. - * @memberof RectangleGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE - */ - material : createMaterialPropertyDescriptor('material'), - /** * Gets or sets the numeric Property specifying the altitude of the rectangle. * @memberof RectangleGraphics.prototype @@ -160,12 +151,12 @@ define([ extrudedHeightReference : createPropertyDescriptor('extrudedHeightReference'), /** - * Gets or sets the numeric Property specifying the angular distance between points on the rectangle. + * Gets or sets the numeric property specifying the rotation of the rectangle clockwise from north. * @memberof RectangleGraphics.prototype * @type {Property} - * @default {CesiumMath.RADIANS_PER_DEGREE} + * @default 0 */ - granularity : createPropertyDescriptor('granularity'), + rotation : createPropertyDescriptor('rotation'), /** * Gets or sets the numeric property specifying the rotation of the rectangle texture counter-clockwise from north. @@ -176,12 +167,12 @@ define([ stRotation : createPropertyDescriptor('stRotation'), /** - * Gets or sets the numeric property specifying the rotation of the rectangle clockwise from north. + * Gets or sets the numeric Property specifying the angular distance between points on the rectangle. * @memberof RectangleGraphics.prototype * @type {Property} - * @default 0 + * @default {CesiumMath.RADIANS_PER_DEGREE} */ - rotation : createPropertyDescriptor('rotation'), + granularity : createPropertyDescriptor('granularity'), /** * Gets or sets the boolean Property specifying whether the rectangle is filled with the provided material. @@ -191,6 +182,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the Property specifying the material used to fill the rectangle. + * @memberof RectangleGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the rectangle is outlined. * @memberof RectangleGraphics.prototype @@ -260,15 +259,15 @@ define([ } result.show = this.show; result.coordinates = this.coordinates; - result.material = this.material; result.height = this.height; result.heightReference = this.heightReference; result.extrudedHeight = this.extrudedHeight; result.extrudedHeightReference = this.extrudedHeightReference; - result.granularity = this.granularity; - result.stRotation = this.stRotation; result.rotation = this.rotation; + result.stRotation = this.stRotation; + result.granularity = this.granularity; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; @@ -276,7 +275,6 @@ define([ result.distanceDisplayCondition = this.distanceDisplayCondition; result.classificationType = this.classificationType; result.zIndex = this.zIndex; - return result; }; @@ -295,15 +293,15 @@ define([ this.show = defaultValue(this.show, source.show); this.coordinates = defaultValue(this.coordinates, source.coordinates); - this.material = defaultValue(this.material, source.material); this.height = defaultValue(this.height, source.height); this.heightReference = defaultValue(this.heightReference, source.heightReference); this.extrudedHeight = defaultValue(this.extrudedHeight, source.extrudedHeight); this.extrudedHeightReference = defaultValue(this.extrudedHeightReference, source.extrudedHeightReference); - this.granularity = defaultValue(this.granularity, source.granularity); - this.stRotation = defaultValue(this.stRotation, source.stRotation); this.rotation = defaultValue(this.rotation, source.rotation); + this.stRotation = defaultValue(this.stRotation, source.stRotation); + this.granularity = defaultValue(this.granularity, source.granularity); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); diff --git a/Source/DataSources/StripeMaterialProperty.js b/Source/DataSources/StripeMaterialProperty.js index c3fc1197ea6b..3bb1bb2c30da 100644 --- a/Source/DataSources/StripeMaterialProperty.js +++ b/Source/DataSources/StripeMaterialProperty.js @@ -30,29 +30,24 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.orientation=StripeOrientation.HORIZONTAL] A Property specifying the {@link StripeOrientation}. * @param {Property} [options.evenColor=Color.WHITE] A Property specifying the first {@link Color}. * @param {Property} [options.oddColor=Color.BLACK] A Property specifying the second {@link Color}. - * @param {Property} [options.repeat=1] A numeric Property specifying how many times the stripes repeat. * @param {Property} [options.offset=0] A numeric Property specifying how far into the pattern to start the material. - * @param {Property} [options.orientation=StripeOrientation.HORIZONTAL] A Property specifying the {@link StripeOrientation}. + * @param {Property} [options.repeat=1] A numeric Property specifying how many times the stripes repeat. */ function StripeMaterialProperty(options) { options = defaultValue(options, defaultValue.EMPTY_OBJECT); this._definitionChanged = new Event(); - this._orientation = undefined; this._orientationSubscription = undefined; - this._evenColor = undefined; this._evenColorSubscription = undefined; - this._oddColor = undefined; this._oddColorSubscription = undefined; - this._offset = undefined; this._offsetSubscription = undefined; - this._repeat = undefined; this._repeatSubscription = undefined; @@ -95,6 +90,7 @@ define([ return this._definitionChanged; } }, + /** * Gets or sets the Property specifying the {@link StripeOrientation}/ * @memberof StripeMaterialProperty.prototype @@ -102,6 +98,7 @@ define([ * @default StripeOrientation.HORIZONTAL */ orientation : createPropertyDescriptor('orientation'), + /** * Gets or sets the Property specifying the first {@link Color}. * @memberof StripeMaterialProperty.prototype @@ -109,6 +106,7 @@ define([ * @default Color.WHITE */ evenColor : createPropertyDescriptor('evenColor'), + /** * Gets or sets the Property specifying the second {@link Color}. * @memberof StripeMaterialProperty.prototype @@ -116,6 +114,7 @@ define([ * @default Color.BLACK */ oddColor : createPropertyDescriptor('oddColor'), + /** * Gets or sets the numeric Property specifying the point into the pattern * to begin drawing; with 0.0 being the beginning of the even color, 1.0 the beginning @@ -126,6 +125,7 @@ define([ * @default 0.0 */ offset : createPropertyDescriptor('offset'), + /** * Gets or sets the numeric Property specifying how many times the stripes repeat. * @memberof StripeMaterialProperty.prototype diff --git a/Source/DataSources/WallGraphics.js b/Source/DataSources/WallGraphics.js index 6c52be641112..4b9e8e1aef88 100644 --- a/Source/DataSources/WallGraphics.js +++ b/Source/DataSources/WallGraphics.js @@ -24,16 +24,16 @@ define([ * @constructor * * @param {Object} [options] Object with the following properties: + * @param {Property} [options.show=true] A boolean Property specifying the visibility of the wall. * @param {Property} [options.positions] A Property specifying the array of {@link Cartesian3} positions which define the top of the wall. - * @param {Property} [options.maximumHeights] A Property specifying an array of heights to be used for the top of the wall instead of the height of each position. * @param {Property} [options.minimumHeights] A Property specifying an array of heights to be used for the bottom of the wall instead of the globe surface. - * @param {Property} [options.show=true] A boolean Property specifying the visibility of the wall. + * @param {Property} [options.maximumHeights] A Property specifying an array of heights to be used for the top of the wall instead of the height of each position. + * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point. * @param {Property} [options.fill=true] A boolean Property specifying whether the wall is filled with the provided material. * @param {MaterialProperty} [options.material=Color.WHITE] A Property specifying the material used to fill the wall. * @param {Property} [options.outline=false] A boolean Property specifying whether the wall is outlined. * @param {Property} [options.outlineColor=Color.BLACK] A Property specifying the {@link Color} of the outline. * @param {Property} [options.outlineWidth=1.0] A numeric Property specifying the width of the outline. - * @param {Property} [options.granularity=Cesium.Math.RADIANS_PER_DEGREE] A numeric Property specifying the angular distance between each latitude and longitude point. * @param {Property} [options.shadows=ShadowMode.DISABLED] An enum Property specifying whether the wall casts or receives shadows from each light source. * @param {Property} [options.distanceDisplayCondition] A Property specifying at what distance from the camera that this wall will be displayed. * @@ -41,10 +41,9 @@ define([ * @demo {@link https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Wall.html|Cesium Sandcastle Wall Demo} */ function WallGraphics(options) { + this._definitionChanged = new Event(); this._show = undefined; this._showSubscription = undefined; - this._material = undefined; - this._materialSubscription = undefined; this._positions = undefined; this._positionsSubscription = undefined; this._minimumHeights = undefined; @@ -55,6 +54,8 @@ define([ this._granularitySubscription = undefined; this._fill = undefined; this._fillSubscription = undefined; + this._material = undefined; + this._materialSubscription = undefined; this._outline = undefined; this._outlineSubscription = undefined; this._outlineColor = undefined; @@ -65,7 +66,6 @@ define([ this._shadowsSubscription = undefined; this._distanceDisplayCondition = undefined; this._distanceDisplayConditionSubscription = undefined; - this._definitionChanged = new Event(); this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT)); } @@ -92,14 +92,6 @@ define([ */ show : createPropertyDescriptor('show'), - /** - * Gets or sets the Property specifying the material used to fill the wall. - * @memberof WallGraphics.prototype - * @type {MaterialProperty} - * @default Color.WHITE - */ - material : createMaterialPropertyDescriptor('material'), - /** * Gets or sets the Property specifying the array of {@link Cartesian3} positions which define the top of the wall. * @memberof WallGraphics.prototype @@ -139,6 +131,14 @@ define([ */ fill : createPropertyDescriptor('fill'), + /** + * Gets or sets the Property specifying the material used to fill the wall. + * @memberof WallGraphics.prototype + * @type {MaterialProperty} + * @default Color.WHITE + */ + material : createMaterialPropertyDescriptor('material'), + /** * Gets or sets the Property specifying whether the wall is outlined. * @memberof WallGraphics.prototype @@ -191,12 +191,12 @@ define([ return new WallGraphics(this); } result.show = this.show; - result.material = this.material; result.positions = this.positions; result.minimumHeights = this.minimumHeights; result.maximumHeights = this.maximumHeights; result.granularity = this.granularity; result.fill = this.fill; + result.material = this.material; result.outline = this.outline; result.outlineColor = this.outlineColor; result.outlineWidth = this.outlineWidth; @@ -219,12 +219,12 @@ define([ //>>includeEnd('debug'); this.show = defaultValue(this.show, source.show); - this.material = defaultValue(this.material, source.material); this.positions = defaultValue(this.positions, source.positions); this.minimumHeights = defaultValue(this.minimumHeights, source.minimumHeights); this.maximumHeights = defaultValue(this.maximumHeights, source.maximumHeights); this.granularity = defaultValue(this.granularity, source.granularity); this.fill = defaultValue(this.fill, source.fill); + this.material = defaultValue(this.material, source.material); this.outline = defaultValue(this.outline, source.outline); this.outlineColor = defaultValue(this.outlineColor, source.outlineColor); this.outlineWidth = defaultValue(this.outlineWidth, source.outlineWidth); diff --git a/Specs/Data/CZML/ValidationDocument.czml b/Specs/Data/CZML/ValidationDocument.czml index 0612e4570187..323dd451a657 100644 --- a/Specs/Data/CZML/ValidationDocument.czml +++ b/Specs/Data/CZML/ValidationDocument.czml @@ -94,6 +94,7 @@ 57494,62432,42995 ] }, + "heightReference":"CLAMP_TO_GROUND", "fill":true, "material":{ "solidColor":{ @@ -128,8 +129,8 @@ }, "width":20413, "height":8062, - "extrudedHeight":22846, "heightReference":"CLAMP_TO_GROUND", + "extrudedHeight":22846, "extrudedHeightReference":"CLAMP_TO_GROUND", "cornerType":"BEVELED", "granularity":44105, @@ -156,6 +157,7 @@ 15797,46507 ] }, + "classificationType":"TERRAIN", "zIndex":59315 }, "cylinder":{ @@ -163,6 +165,7 @@ "length":33298, "topRadius":16245, "bottomRadius":59378, + "heightReference":"CLAMP_TO_GROUND", "fill":true, "material":{ "solidColor":{ @@ -194,8 +197,8 @@ "semiMajorAxis":60072, "semiMinorAxis":38653, "height":15549, - "extrudedHeight":55640, "heightReference":"CLAMP_TO_GROUND", + "extrudedHeight":55640, "extrudedHeightReference":"CLAMP_TO_GROUND", "rotation":27722, "stRotation":4692, @@ -224,6 +227,7 @@ 27813,30828 ] }, + "classificationType":"TERRAIN", "zIndex":3341 }, "ellipsoid":{ @@ -233,6 +237,7 @@ 15638,24381,37983 ] }, + "heightReference":"CLAMP_TO_GROUND", "fill":true, "material":{ "solidColor":{ @@ -369,14 +374,17 @@ ] } } + }, + "articulations":{ + "prop":25496 } }, "path":{ "show":true, - "width":56040, - "resolution":31563, "leadTime":5997, "trailTime":52915, + "width":56040, + "resolution":31563, "material":{ "solidColor":{ "color":{ @@ -434,8 +442,8 @@ }, "arcType":"RHUMB", "height":26391, - "extrudedHeight":15922, "heightReference":"CLAMP_TO_GROUND", + "extrudedHeight":15922, "extrudedHeightReference":"CLAMP_TO_GROUND", "stRotation":2555, "granularity":17060, @@ -465,6 +473,7 @@ 5989,26104 ] }, + "classificationType":"TERRAIN", "zIndex":31269 }, "polyline":{ @@ -503,6 +512,7 @@ ] }, "clampToGround":true, + "classificationType":"TERRAIN", "zIndex":17658 }, "rectangle":{ @@ -513,8 +523,8 @@ ] }, "height":20608, - "extrudedHeight":23002, "heightReference":"CLAMP_TO_GROUND", + "extrudedHeight":23002, "extrudedHeightReference":"CLAMP_TO_GROUND", "rotation":54979, "stRotation":8079, @@ -542,6 +552,7 @@ 21388,23379 ] }, + "classificationType":"TERRAIN", "zIndex":445 }, "wall":{ @@ -7274,6 +7285,9 @@ "dimensions":{ "reference":"Constant#box.dimensions" }, + "heightReference":{ + "reference":"Constant#box.heightReference" + }, "fill":{ "reference":"Constant#box.fill" }, @@ -7316,12 +7330,12 @@ "height":{ "reference":"Constant#corridor.height" }, - "extrudedHeight":{ - "reference":"Constant#corridor.extrudedHeight" - }, "heightReference":{ "reference":"Constant#corridor.heightReference" }, + "extrudedHeight":{ + "reference":"Constant#corridor.extrudedHeight" + }, "extrudedHeightReference":{ "reference":"Constant#corridor.extrudedHeightReference" }, @@ -7356,6 +7370,9 @@ "distanceDisplayCondition":{ "reference":"Constant#corridor.distanceDisplayCondition" }, + "classificationType":{ + "reference":"Constant#corridor.classificationType" + }, "zIndex":{ "reference":"Constant#corridor.zIndex" } @@ -7373,6 +7390,9 @@ "bottomRadius":{ "reference":"Constant#cylinder.bottomRadius" }, + "heightReference":{ + "reference":"Constant#cylinder.heightReference" + }, "fill":{ "reference":"Constant#cylinder.fill" }, @@ -7418,12 +7438,12 @@ "height":{ "reference":"Constant#ellipse.height" }, - "extrudedHeight":{ - "reference":"Constant#ellipse.extrudedHeight" - }, "heightReference":{ "reference":"Constant#ellipse.heightReference" }, + "extrudedHeight":{ + "reference":"Constant#ellipse.extrudedHeight" + }, "extrudedHeightReference":{ "reference":"Constant#ellipse.extrudedHeightReference" }, @@ -7464,6 +7484,9 @@ "distanceDisplayCondition":{ "reference":"Constant#ellipse.distanceDisplayCondition" }, + "classificationType":{ + "reference":"Constant#ellipse.classificationType" + }, "zIndex":{ "reference":"Constant#ellipse.zIndex" } @@ -7475,6 +7498,9 @@ "radii":{ "reference":"Constant#ellipsoid.radii" }, + "heightReference":{ + "reference":"Constant#ellipsoid.heightReference" + }, "fill":{ "reference":"Constant#ellipsoid.fill" }, @@ -7633,24 +7659,29 @@ "reference":"Constant#model.nodeTransformations.prop.scale" } } + }, + "articulations":{ + "referenceProp":{ + "reference":"Constant#model.articulations.prop" + } } }, "path":{ "show":{ "reference":"Constant#path.show" }, - "width":{ - "reference":"Constant#path.width" - }, - "resolution":{ - "reference":"Constant#path.resolution" - }, "leadTime":{ "reference":"Constant#path.leadTime" }, "trailTime":{ "reference":"Constant#path.trailTime" }, + "width":{ + "reference":"Constant#path.width" + }, + "resolution":{ + "reference":"Constant#path.resolution" + }, "material":{ "solidColor":{ "color":{ @@ -7710,12 +7741,12 @@ "height":{ "reference":"Constant#polygon.height" }, - "extrudedHeight":{ - "reference":"Constant#polygon.extrudedHeight" - }, "heightReference":{ "reference":"Constant#polygon.heightReference" }, + "extrudedHeight":{ + "reference":"Constant#polygon.extrudedHeight" + }, "extrudedHeightReference":{ "reference":"Constant#polygon.extrudedHeightReference" }, @@ -7759,6 +7790,9 @@ "distanceDisplayCondition":{ "reference":"Constant#polygon.distanceDisplayCondition" }, + "classificationType":{ + "reference":"Constant#polygon.classificationType" + }, "zIndex":{ "reference":"Constant#polygon.zIndex" } @@ -7805,6 +7839,9 @@ "clampToGround":{ "reference":"Constant#polyline.clampToGround" }, + "classificationType":{ + "reference":"Constant#polyline.classificationType" + }, "zIndex":{ "reference":"Constant#polyline.zIndex" } @@ -7819,12 +7856,12 @@ "height":{ "reference":"Constant#rectangle.height" }, - "extrudedHeight":{ - "reference":"Constant#rectangle.extrudedHeight" - }, "heightReference":{ "reference":"Constant#rectangle.heightReference" }, + "extrudedHeight":{ + "reference":"Constant#rectangle.extrudedHeight" + }, "extrudedHeightReference":{ "reference":"Constant#rectangle.extrudedHeightReference" }, @@ -7862,6 +7899,9 @@ "distanceDisplayCondition":{ "reference":"Constant#rectangle.distanceDisplayCondition" }, + "classificationType":{ + "reference":"Constant#rectangle.classificationType" + }, "zIndex":{ "reference":"Constant#rectangle.zIndex" } @@ -11419,32 +11459,32 @@ } }, "path":{ - "width":{ + "leadTime":{ "epoch":"2016-06-17T12:00:00Z", "number":[ - 0,32449, - 3600,33819 + 0,40222, + 3600,33294 ] }, - "resolution":{ + "trailTime":{ "epoch":"2016-06-17T12:00:00Z", "number":[ - 0,8399, - 3600,19400 + 0,34052, + 3600,57713 ] }, - "leadTime":{ + "width":{ "epoch":"2016-06-17T12:00:00Z", "number":[ - 0,40222, - 3600,33294 + 0,32449, + 3600,33819 ] }, - "trailTime":{ + "resolution":{ "epoch":"2016-06-17T12:00:00Z", "number":[ - 0,34052, - 3600,57713 + 0,8399, + 3600,19400 ] }, "material":{ diff --git a/Specs/DataSources/CzmlDataSourceSpec.js b/Specs/DataSources/CzmlDataSourceSpec.js index 5b11f38ea90a..20d075d1576d 100644 --- a/Specs/DataSources/CzmlDataSourceSpec.js +++ b/Specs/DataSources/CzmlDataSourceSpec.js @@ -38,6 +38,7 @@ defineSuite([ 'DataSources/StripeOrientation', 'DataSources/TimeIntervalCollectionPositionProperty', 'DataSources/TimeIntervalCollectionProperty', + 'Scene/ClassificationType', 'Scene/ColorBlendMode', 'Scene/HeightReference', 'Scene/HorizontalOrigin', @@ -85,6 +86,7 @@ defineSuite([ StripeOrientation, TimeIntervalCollectionPositionProperty, TimeIntervalCollectionProperty, + ClassificationType, ColorBlendMode, HeightReference, HorizontalOrigin, @@ -1131,7 +1133,8 @@ defineSuite([ }, outlineWidth : 6, shadows : 'ENABLED', - zIndex: 8 + zIndex: 8, + classificationType : 'TERRAIN' } }; @@ -1148,6 +1151,7 @@ defineSuite([ expect(entity.ellipse.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6); expect(entity.ellipse.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED); expect(entity.ellipse.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(8); + expect(entity.ellipse.classificationType.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ClassificationType.TERRAIN); }); }); @@ -3013,7 +3017,8 @@ defineSuite([ closeTop : false, closeBottom : false, shadows : 'ENABLED', - zIndex: 3 + zIndex: 3, + classificationType : 'TERRAIN' } }; @@ -3035,6 +3040,7 @@ defineSuite([ expect(entity.polygon.closeBottom.getValue(Iso8601.MINIMUM_VALUE)).toEqual(false); expect(entity.polygon.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED); expect(entity.polygon.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(3); + expect(entity.polygon.classificationType.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ClassificationType.TERRAIN); }); }); @@ -3090,7 +3096,8 @@ defineSuite([ }, width : 1.0, show : true, - shadows : 'ENABLED' + shadows : 'ENABLED', + classificationType : 'CESIUM_3D_TILE' } }; @@ -3105,6 +3112,7 @@ defineSuite([ expect(entity.polyline.material.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual(1.0); expect(entity.polyline.show.getValue(Iso8601.MINIMUM_VALUE)).toEqual(true); expect(entity.polyline.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED); + expect(entity.polyline.classificationType.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ClassificationType.CESIUM_3D_TILE); }); }); @@ -3597,7 +3605,8 @@ defineSuite([ }, outlineWidth : 6, shadows : 'ENABLED', - zIndex : 6 + zIndex : 6, + classificationType : 'TERRAIN' } }; @@ -3621,6 +3630,7 @@ defineSuite([ expect(entity.rectangle.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6); expect(entity.rectangle.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED); expect(entity.rectangle.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6); + expect(entity.rectangle.classificationType.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ClassificationType.TERRAIN); }); }); @@ -3885,7 +3895,8 @@ defineSuite([ }, outlineWidth : 6, shadows : 'ENABLED', - zIndex: 5 + zIndex: 5, + classificationType : 'TERRAIN' } }; @@ -3909,6 +3920,7 @@ defineSuite([ expect(entity.corridor.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6); expect(entity.corridor.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED); expect(entity.corridor.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(5); + expect(entity.corridor.classificationType.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ClassificationType.TERRAIN); }); }); @@ -4362,6 +4374,7 @@ defineSuite([ expect(e.billboard.disableDepthTestDistance.getValue(date)).toEqual(39764.0); expect(e.box.show.getValue(date)).toEqual(true); expect(e.box.dimensions.getValue(date)).toEqual(new Cartesian3(57494, 62432, 42995)); + expect(e.box.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); expect(e.box.fill.getValue(date)).toEqual(true); expect(e.box.material.color.getValue(date)).toEqual(Color.fromBytes(88, 226, 91, 144)); expect(e.box.outline.getValue(date)).toEqual(true); @@ -4373,8 +4386,8 @@ defineSuite([ expect(e.corridor.positions.getValue(date)).toEqual([ new Cartesian3(36415, 2702, 36618), new Cartesian3(47759, 11706, 63277) ]); expect(e.corridor.width.getValue(date)).toEqual(20413.0); expect(e.corridor.height.getValue(date)).toEqual(8062.0); - expect(e.corridor.extrudedHeight.getValue(date)).toEqual(22846.0); expect(e.corridor.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.corridor.extrudedHeight.getValue(date)).toEqual(22846.0); expect(e.corridor.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); expect(e.corridor.cornerType.getValue(date)).toEqual(CornerType.BEVELED); expect(e.corridor.granularity.getValue(date)).toEqual(44105.0); @@ -4385,11 +4398,13 @@ defineSuite([ expect(e.corridor.outlineWidth.getValue(date)).toEqual(9132.0); expect(e.corridor.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); expect(e.corridor.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(15797, 46507)); + expect(e.corridor.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); expect(e.corridor.zIndex.getValue(date)).toEqual(59315); expect(e.cylinder.show.getValue(date)).toEqual(true); expect(e.cylinder.length.getValue(date)).toEqual(33298.0); expect(e.cylinder.topRadius.getValue(date)).toEqual(16245.0); expect(e.cylinder.bottomRadius.getValue(date)).toEqual(59378.0); + expect(e.cylinder.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); expect(e.cylinder.fill.getValue(date)).toEqual(true); expect(e.cylinder.material.color.getValue(date)).toEqual(Color.fromBytes(216, 68, 53, 64)); expect(e.cylinder.outline.getValue(date)).toEqual(true); @@ -4403,8 +4418,8 @@ defineSuite([ expect(e.ellipse.semiMajorAxis.getValue(date)).toEqual(60072.0); expect(e.ellipse.semiMinorAxis.getValue(date)).toEqual(38653.0); expect(e.ellipse.height.getValue(date)).toEqual(15549.0); - expect(e.ellipse.extrudedHeight.getValue(date)).toEqual(55640.0); expect(e.ellipse.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.ellipse.extrudedHeight.getValue(date)).toEqual(55640.0); expect(e.ellipse.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); expect(e.ellipse.rotation.getValue(date)).toEqual(27722.0); expect(e.ellipse.stRotation.getValue(date)).toEqual(4692.0); @@ -4417,9 +4432,11 @@ defineSuite([ expect(e.ellipse.numberOfVerticalLines.getValue(date)).toEqual(38878); expect(e.ellipse.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); expect(e.ellipse.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(27813, 30828)); + expect(e.ellipse.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); expect(e.ellipse.zIndex.getValue(date)).toEqual(3341); expect(e.ellipsoid.show.getValue(date)).toEqual(true); expect(e.ellipsoid.radii.getValue(date)).toEqual(new Cartesian3(15638, 24381, 37983)); + expect(e.ellipsoid.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); expect(e.ellipsoid.fill.getValue(date)).toEqual(true); expect(e.ellipsoid.material.color.getValue(date)).toEqual(Color.fromBytes(202, 67, 110, 69)); expect(e.ellipsoid.outline.getValue(date)).toEqual(true); @@ -4469,11 +4486,12 @@ defineSuite([ expect(e.model.nodeTransformations.prop.translation.getValue(date)).toEqual(new Cartesian3(18548, 48456, 21181)); expect(e.model.nodeTransformations.prop.rotation.getValue(date)).toEqualEpsilon(new Quaternion(0.527960606328925, 0.567156704919186, 0.624812964569899, 0.0959146992664751), 1e-14); expect(e.model.nodeTransformations.prop.scale.getValue(date)).toEqual(new Cartesian3(53739, 37841, 41107)); + expect(e.model.articulations.prop.getValue(date)).toEqual(25496.0); expect(e.path.show.getValue(date)).toEqual(true); - expect(e.path.width.getValue(date)).toEqual(56040.0); - expect(e.path.resolution.getValue(date)).toEqual(31563.0); expect(e.path.leadTime.getValue(date)).toEqual(5997.0); expect(e.path.trailTime.getValue(date)).toEqual(52915.0); + expect(e.path.width.getValue(date)).toEqual(56040.0); + expect(e.path.resolution.getValue(date)).toEqual(31563.0); expect(e.path.material.color.getValue(date)).toEqual(Color.fromBytes(10, 78, 168, 13)); expect(e.path.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(11646, 32422)); expect(e.point.show.getValue(date)).toEqual(true); @@ -4490,8 +4508,8 @@ defineSuite([ expect(e.polygon.hierarchy.getValue(date)).toEqual([ new Cartesian3(39143, 2200, 6408), new Cartesian3(27161, 33386, 62338) ]); expect(e.polygon.arcType.getValue(date)).toEqual(ArcType.RHUMB); expect(e.polygon.height.getValue(date)).toEqual(26391.0); - expect(e.polygon.extrudedHeight.getValue(date)).toEqual(15922.0); expect(e.polygon.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.polygon.extrudedHeight.getValue(date)).toEqual(15922.0); expect(e.polygon.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); expect(e.polygon.stRotation.getValue(date)).toEqual(2555.0); expect(e.polygon.granularity.getValue(date)).toEqual(17060.0); @@ -4505,6 +4523,7 @@ defineSuite([ expect(e.polygon.closeBottom.getValue(date)).toEqual(true); expect(e.polygon.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); expect(e.polygon.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(5989, 26104)); + expect(e.polygon.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); expect(e.polygon.zIndex.getValue(date)).toEqual(31269); expect(e.polyline.show.getValue(date)).toEqual(true); expect(e.polyline.positions.getValue(date)).toEqual([ new Cartesian3(23333, 31067, 17529), new Cartesian3(57924, 41186, 31648) ]); @@ -4516,12 +4535,13 @@ defineSuite([ expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(Color.fromBytes(197, 195, 115, 198)); expect(e.polyline.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(5807, 30486)); expect(e.polyline.clampToGround.getValue(date)).toEqual(true); + expect(e.polyline.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); expect(e.polyline.zIndex.getValue(date)).toEqual(17658); expect(e.rectangle.show.getValue(date)).toEqual(true); expect(e.rectangle.coordinates.getValue(date)).toEqual(new Rectangle(1.13325368272577, 0.703573207377445, 0.756676249095309, 0.339217858685931)); expect(e.rectangle.height.getValue(date)).toEqual(20608.0); - expect(e.rectangle.extrudedHeight.getValue(date)).toEqual(23002.0); expect(e.rectangle.heightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); + expect(e.rectangle.extrudedHeight.getValue(date)).toEqual(23002.0); expect(e.rectangle.extrudedHeightReference.getValue(date)).toEqual(HeightReference.CLAMP_TO_GROUND); expect(e.rectangle.rotation.getValue(date)).toEqual(54979.0); expect(e.rectangle.stRotation.getValue(date)).toEqual(8079.0); @@ -4533,6 +4553,7 @@ defineSuite([ expect(e.rectangle.outlineWidth.getValue(date)).toEqual(59794.0); expect(e.rectangle.shadows.getValue(date)).toEqual(ShadowMode.CAST_ONLY); expect(e.rectangle.distanceDisplayCondition.getValue(date)).toEqual(new DistanceDisplayCondition(21388, 23379)); + expect(e.rectangle.classificationType.getValue(date)).toEqual(ClassificationType.TERRAIN); expect(e.rectangle.zIndex.getValue(date)).toEqual(445); expect(e.wall.show.getValue(date)).toEqual(true); expect(e.wall.positions.getValue(date)).toEqual([ new Cartesian3(21681, 40276, 30621), new Cartesian3(3959, 61967, 19442) ]); @@ -5325,6 +5346,7 @@ defineSuite([ expect(e.billboard.disableDepthTestDistance.getValue(date)).toEqual(constant.billboard.disableDepthTestDistance.getValue(date)); expect(e.box.show.getValue(date)).toEqual(constant.box.show.getValue(date)); expect(e.box.dimensions.getValue(date)).toEqual(constant.box.dimensions.getValue(date)); + expect(e.box.heightReference.getValue(date)).toEqual(constant.box.heightReference.getValue(date)); expect(e.box.fill.getValue(date)).toEqual(constant.box.fill.getValue(date)); expect(e.box.material.color.getValue(date)).toEqual(constant.box.material.color.getValue(date)); expect(e.box.outline.getValue(date)).toEqual(constant.box.outline.getValue(date)); @@ -5336,8 +5358,8 @@ defineSuite([ expect(e.corridor.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); expect(e.corridor.width.getValue(date)).toEqual(constant.corridor.width.getValue(date)); expect(e.corridor.height.getValue(date)).toEqual(constant.corridor.height.getValue(date)); - expect(e.corridor.extrudedHeight.getValue(date)).toEqual(constant.corridor.extrudedHeight.getValue(date)); expect(e.corridor.heightReference.getValue(date)).toEqual(constant.corridor.heightReference.getValue(date)); + expect(e.corridor.extrudedHeight.getValue(date)).toEqual(constant.corridor.extrudedHeight.getValue(date)); expect(e.corridor.extrudedHeightReference.getValue(date)).toEqual(constant.corridor.extrudedHeightReference.getValue(date)); expect(e.corridor.cornerType.getValue(date)).toEqual(constant.corridor.cornerType.getValue(date)); expect(e.corridor.granularity.getValue(date)).toEqual(constant.corridor.granularity.getValue(date)); @@ -5348,11 +5370,13 @@ defineSuite([ expect(e.corridor.outlineWidth.getValue(date)).toEqual(constant.corridor.outlineWidth.getValue(date)); expect(e.corridor.shadows.getValue(date)).toEqual(constant.corridor.shadows.getValue(date)); expect(e.corridor.distanceDisplayCondition.getValue(date)).toEqual(constant.corridor.distanceDisplayCondition.getValue(date)); + expect(e.corridor.classificationType.getValue(date)).toEqual(constant.corridor.classificationType.getValue(date)); expect(e.corridor.zIndex.getValue(date)).toEqual(constant.corridor.zIndex.getValue(date)); expect(e.cylinder.show.getValue(date)).toEqual(constant.cylinder.show.getValue(date)); expect(e.cylinder.length.getValue(date)).toEqual(constant.cylinder.length.getValue(date)); expect(e.cylinder.topRadius.getValue(date)).toEqual(constant.cylinder.topRadius.getValue(date)); expect(e.cylinder.bottomRadius.getValue(date)).toEqual(constant.cylinder.bottomRadius.getValue(date)); + expect(e.cylinder.heightReference.getValue(date)).toEqual(constant.cylinder.heightReference.getValue(date)); expect(e.cylinder.fill.getValue(date)).toEqual(constant.cylinder.fill.getValue(date)); expect(e.cylinder.material.color.getValue(date)).toEqual(constant.cylinder.material.color.getValue(date)); expect(e.cylinder.outline.getValue(date)).toEqual(constant.cylinder.outline.getValue(date)); @@ -5366,8 +5390,8 @@ defineSuite([ expect(e.ellipse.semiMajorAxis.getValue(date)).toEqual(constant.ellipse.semiMajorAxis.getValue(date)); expect(e.ellipse.semiMinorAxis.getValue(date)).toEqual(constant.ellipse.semiMinorAxis.getValue(date)); expect(e.ellipse.height.getValue(date)).toEqual(constant.ellipse.height.getValue(date)); - expect(e.ellipse.extrudedHeight.getValue(date)).toEqual(constant.ellipse.extrudedHeight.getValue(date)); expect(e.ellipse.heightReference.getValue(date)).toEqual(constant.ellipse.heightReference.getValue(date)); + expect(e.ellipse.extrudedHeight.getValue(date)).toEqual(constant.ellipse.extrudedHeight.getValue(date)); expect(e.ellipse.extrudedHeightReference.getValue(date)).toEqual(constant.ellipse.extrudedHeightReference.getValue(date)); expect(e.ellipse.rotation.getValue(date)).toEqual(constant.ellipse.rotation.getValue(date)); expect(e.ellipse.stRotation.getValue(date)).toEqual(constant.ellipse.stRotation.getValue(date)); @@ -5380,9 +5404,11 @@ defineSuite([ expect(e.ellipse.numberOfVerticalLines.getValue(date)).toEqual(constant.ellipse.numberOfVerticalLines.getValue(date)); expect(e.ellipse.shadows.getValue(date)).toEqual(constant.ellipse.shadows.getValue(date)); expect(e.ellipse.distanceDisplayCondition.getValue(date)).toEqual(constant.ellipse.distanceDisplayCondition.getValue(date)); + expect(e.ellipse.classificationType.getValue(date)).toEqual(constant.ellipse.classificationType.getValue(date)); expect(e.ellipse.zIndex.getValue(date)).toEqual(constant.ellipse.zIndex.getValue(date)); expect(e.ellipsoid.show.getValue(date)).toEqual(constant.ellipsoid.show.getValue(date)); expect(e.ellipsoid.radii.getValue(date)).toEqual(constant.ellipsoid.radii.getValue(date)); + expect(e.ellipsoid.heightReference.getValue(date)).toEqual(constant.ellipsoid.heightReference.getValue(date)); expect(e.ellipsoid.fill.getValue(date)).toEqual(constant.ellipsoid.fill.getValue(date)); expect(e.ellipsoid.material.color.getValue(date)).toEqual(constant.ellipsoid.material.color.getValue(date)); expect(e.ellipsoid.outline.getValue(date)).toEqual(constant.ellipsoid.outline.getValue(date)); @@ -5432,11 +5458,12 @@ defineSuite([ expect(e.model.nodeTransformations.referenceProp.translation.getValue(date)).toEqual(constant.model.nodeTransformations.prop.translation.getValue(date)); expect(e.model.nodeTransformations.referenceProp.rotation.getValue(date)).toEqual(constant.model.nodeTransformations.prop.rotation.getValue(date)); expect(e.model.nodeTransformations.referenceProp.scale.getValue(date)).toEqual(constant.model.nodeTransformations.prop.scale.getValue(date)); + expect(e.model.articulations.referenceProp.getValue(date)).toEqual(constant.model.articulations.prop.getValue(date)); expect(e.path.show.getValue(date)).toEqual(constant.path.show.getValue(date)); - expect(e.path.width.getValue(date)).toEqual(constant.path.width.getValue(date)); - expect(e.path.resolution.getValue(date)).toEqual(constant.path.resolution.getValue(date)); expect(e.path.leadTime.getValue(date)).toEqual(constant.path.leadTime.getValue(date)); expect(e.path.trailTime.getValue(date)).toEqual(constant.path.trailTime.getValue(date)); + expect(e.path.width.getValue(date)).toEqual(constant.path.width.getValue(date)); + expect(e.path.resolution.getValue(date)).toEqual(constant.path.resolution.getValue(date)); expect(e.path.material.color.getValue(date)).toEqual(constant.path.material.color.getValue(date)); expect(e.path.distanceDisplayCondition.getValue(date)).toEqual(constant.path.distanceDisplayCondition.getValue(date)); expect(e.point.show.getValue(date)).toEqual(constant.point.show.getValue(date)); @@ -5453,8 +5480,8 @@ defineSuite([ expect(e.polygon.hierarchy.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); expect(e.polygon.arcType.getValue(date)).toEqual(constant.polygon.arcType.getValue(date)); expect(e.polygon.height.getValue(date)).toEqual(constant.polygon.height.getValue(date)); - expect(e.polygon.extrudedHeight.getValue(date)).toEqual(constant.polygon.extrudedHeight.getValue(date)); expect(e.polygon.heightReference.getValue(date)).toEqual(constant.polygon.heightReference.getValue(date)); + expect(e.polygon.extrudedHeight.getValue(date)).toEqual(constant.polygon.extrudedHeight.getValue(date)); expect(e.polygon.extrudedHeightReference.getValue(date)).toEqual(constant.polygon.extrudedHeightReference.getValue(date)); expect(e.polygon.stRotation.getValue(date)).toEqual(constant.polygon.stRotation.getValue(date)); expect(e.polygon.granularity.getValue(date)).toEqual(constant.polygon.granularity.getValue(date)); @@ -5468,6 +5495,7 @@ defineSuite([ expect(e.polygon.closeBottom.getValue(date)).toEqual(constant.polygon.closeBottom.getValue(date)); expect(e.polygon.shadows.getValue(date)).toEqual(constant.polygon.shadows.getValue(date)); expect(e.polygon.distanceDisplayCondition.getValue(date)).toEqual(constant.polygon.distanceDisplayCondition.getValue(date)); + expect(e.polygon.classificationType.getValue(date)).toEqual(constant.polygon.classificationType.getValue(date)); expect(e.polygon.zIndex.getValue(date)).toEqual(constant.polygon.zIndex.getValue(date)); expect(e.polyline.show.getValue(date)).toEqual(constant.polyline.show.getValue(date)); expect(e.polyline.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); @@ -5479,12 +5507,13 @@ defineSuite([ expect(e.polyline.depthFailMaterial.color.getValue(date)).toEqual(constant.polyline.depthFailMaterial.color.getValue(date)); expect(e.polyline.distanceDisplayCondition.getValue(date)).toEqual(constant.polyline.distanceDisplayCondition.getValue(date)); expect(e.polyline.clampToGround.getValue(date)).toEqual(constant.polyline.clampToGround.getValue(date)); + expect(e.polyline.classificationType.getValue(date)).toEqual(constant.polyline.classificationType.getValue(date)); expect(e.polyline.zIndex.getValue(date)).toEqual(constant.polyline.zIndex.getValue(date)); expect(e.rectangle.show.getValue(date)).toEqual(constant.rectangle.show.getValue(date)); expect(e.rectangle.coordinates.getValue(date)).toEqual(constant.rectangle.coordinates.getValue(date)); expect(e.rectangle.height.getValue(date)).toEqual(constant.rectangle.height.getValue(date)); - expect(e.rectangle.extrudedHeight.getValue(date)).toEqual(constant.rectangle.extrudedHeight.getValue(date)); expect(e.rectangle.heightReference.getValue(date)).toEqual(constant.rectangle.heightReference.getValue(date)); + expect(e.rectangle.extrudedHeight.getValue(date)).toEqual(constant.rectangle.extrudedHeight.getValue(date)); expect(e.rectangle.extrudedHeightReference.getValue(date)).toEqual(constant.rectangle.extrudedHeightReference.getValue(date)); expect(e.rectangle.rotation.getValue(date)).toEqual(constant.rectangle.rotation.getValue(date)); expect(e.rectangle.stRotation.getValue(date)).toEqual(constant.rectangle.stRotation.getValue(date)); @@ -5496,6 +5525,7 @@ defineSuite([ expect(e.rectangle.outlineWidth.getValue(date)).toEqual(constant.rectangle.outlineWidth.getValue(date)); expect(e.rectangle.shadows.getValue(date)).toEqual(constant.rectangle.shadows.getValue(date)); expect(e.rectangle.distanceDisplayCondition.getValue(date)).toEqual(constant.rectangle.distanceDisplayCondition.getValue(date)); + expect(e.rectangle.classificationType.getValue(date)).toEqual(constant.rectangle.classificationType.getValue(date)); expect(e.rectangle.zIndex.getValue(date)).toEqual(constant.rectangle.zIndex.getValue(date)); expect(e.wall.show.getValue(date)).toEqual(constant.wall.show.getValue(date)); expect(e.wall.positions.getValue(date)).toEqual([dataSource.entities.getById('ConstantPosition1').position.getValue(date), dataSource.entities.getById('ConstantPosition2').position.getValue(date)]); @@ -6019,14 +6049,14 @@ defineSuite([ expect(e.model.colorBlendAmount.getValue(documentStopDate)).toEqual(21967.0); expect(e.model.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(33246, 36993)); expect(e.model.distanceDisplayCondition.getValue(documentStopDate)).toEqual(new DistanceDisplayCondition(5814, 10006)); - expect(e.path.width.getValue(documentStartDate)).toEqual(32449.0); - expect(e.path.width.getValue(documentStopDate)).toEqual(33819.0); - expect(e.path.resolution.getValue(documentStartDate)).toEqual(8399.0); - expect(e.path.resolution.getValue(documentStopDate)).toEqual(19400.0); expect(e.path.leadTime.getValue(documentStartDate)).toEqual(40222.0); expect(e.path.leadTime.getValue(documentStopDate)).toEqual(33294.0); expect(e.path.trailTime.getValue(documentStartDate)).toEqual(34052.0); expect(e.path.trailTime.getValue(documentStopDate)).toEqual(57713.0); + expect(e.path.width.getValue(documentStartDate)).toEqual(32449.0); + expect(e.path.width.getValue(documentStopDate)).toEqual(33819.0); + expect(e.path.resolution.getValue(documentStartDate)).toEqual(8399.0); + expect(e.path.resolution.getValue(documentStopDate)).toEqual(19400.0); expect(e.path.material.color.getValue(documentStartDate)).toEqual(Color.fromBytes(97, 239, 22, 105)); expect(e.path.material.color.getValue(documentStopDate)).toEqual(Color.fromBytes(242, 157, 215, 125)); expect(e.path.distanceDisplayCondition.getValue(documentStartDate)).toEqual(new DistanceDisplayCondition(42994, 62047));