diff --git a/Apps/Sandcastle/gallery/development/Circle Outline.html b/Apps/Sandcastle/gallery/development/Circle Outline.html index 1b4b8197bf2c..1a86927228f6 100644 --- a/Apps/Sandcastle/gallery/development/Circle Outline.html +++ b/Apps/Sandcastle/gallery/development/Circle Outline.html @@ -42,7 +42,7 @@ }); // Add the geometry instance to primitives. scene.primitives.add(new Cesium.Primitive({ - geometryInstances : [circleOutlineInstance], + geometryInstances : circleOutlineInstance, appearance : new Cesium.PerInstanceColorAppearance({ flat : true, renderState : { @@ -72,7 +72,7 @@ }); // Add the geometry instance to primitives. scene.primitives.add(new Cesium.Primitive({ - geometryInstances : [circleOutlineInstance], + geometryInstances : circleOutlineInstance, appearance : new Cesium.PerInstanceColorAppearance({ flat : true, renderState : { diff --git a/Apps/Sandcastle/gallery/development/Circle.html b/Apps/Sandcastle/gallery/development/Circle.html index 90ce6451ddbd..8249668fcada 100644 --- a/Apps/Sandcastle/gallery/development/Circle.html +++ b/Apps/Sandcastle/gallery/development/Circle.html @@ -45,7 +45,7 @@ }); // Add the geometry instance to primitives. scene.primitives.add(new Cesium.Primitive({ - geometryInstances: [redCircleInstance], + geometryInstances: redCircleInstance, appearance: new Cesium.PerInstanceColorAppearance({ closed: true }) @@ -71,7 +71,7 @@ }); // Add the geometry instance to primitives. scene.primitives.add(new Cesium.Primitive({ - geometryInstances: [greenCircleInstance], + geometryInstances: greenCircleInstance, appearance: new Cesium.PerInstanceColorAppearance({ closed: true }) diff --git a/Apps/Sandcastle/gallery/development/Corridor.html b/Apps/Sandcastle/gallery/development/Corridor.html index ab28a0500387..7866eb4b355a 100644 --- a/Apps/Sandcastle/gallery/development/Corridor.html +++ b/Apps/Sandcastle/gallery/development/Corridor.html @@ -49,7 +49,7 @@ }); // Add the geometry instance to primitives. scene.primitives.add(new Cesium.Primitive({ - geometryInstances : [redCorridorInstance], + geometryInstances : redCorridorInstance, appearance : new Cesium.PerInstanceColorAppearance({ closed : true }) @@ -118,7 +118,7 @@ }); // Add the geometry instance to primitives. scene.primitives.add(new Cesium.Primitive({ - geometryInstances : [blueCorridorInstance], + geometryInstances : blueCorridorInstance, appearance : new Cesium.PerInstanceColorAppearance({ closed : true }) diff --git a/Apps/Sandcastle/gallery/development/Cylinder Outline.html b/Apps/Sandcastle/gallery/development/Cylinder Outline.html index bdee996bacf6..98bb094eb184 100644 --- a/Apps/Sandcastle/gallery/development/Cylinder Outline.html +++ b/Apps/Sandcastle/gallery/development/Cylinder Outline.html @@ -55,7 +55,7 @@ }); // Add the instance to primitives. scene.primitives.add(new Cesium.Primitive({ - geometryInstances : [cylinderOutline], + geometryInstances : cylinderOutline, appearance : new Cesium.PerInstanceColorAppearance({ flat : true, renderState : { diff --git a/CHANGES.md b/CHANGES.md index c83cacff0d0b..888bf37ee814 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -42,7 +42,8 @@ Change Log * Fixed a bug where toggling point cloud classification visibility would result in a grey screen on Linux / Nvidia [#8538](https://github.com/AnalyticalGraphicsInc/cesium/pull/8538) * Fixed a bug where a point in a `PointPrimitiveCollection` is rendered in the middle of the screen instead of being clipped. [#8542](https://github.com/AnalyticalGraphicsInc/cesium/pull/8542) * Fixed a crash when deleting and re-creating polylines from CZML. `ReferenceProperty` now returns undefined when the target entity or property does not exist, instead of throwing. [#8544](https://github.com/AnalyticalGraphicsInc/cesium/pull/8544) -* Fixed a bug where rapidly updating a PolylineCollection could result in an instanceIndex is out of range error [#8546](https://github.com/AnalyticalGraphicsInc/cesium/pull/8546) +* Fixed a bug where rapidly updating a `PolylineCollection` could result in an instanceIndex is out of range error. [#8546](https://github.com/AnalyticalGraphicsInc/cesium/pull/8546) +* Fixed a crash that could occur when an entity was deleted while the corresponding `Primitive` was being created asynchronously. [#8569](https://github.com/AnalyticalGraphicsInc/cesium/pull/8569) ### 1.65.0 - 2020-01-06 diff --git a/Source/DataSources/StaticGeometryColorBatch.js b/Source/DataSources/StaticGeometryColorBatch.js index b8e3f8572411..c91067d16421 100644 --- a/Source/DataSources/StaticGeometryColorBatch.js +++ b/Source/DataSources/StaticGeometryColorBatch.js @@ -131,7 +131,7 @@ import Property from './Property.js'; primitive = new Primitive({ show : false, asynchronous : true, - geometryInstances : geometries, + geometryInstances : geometries.slice(), appearance : new this.appearanceType({ translucent : this.translucent, closed : this.closed diff --git a/Source/DataSources/StaticGeometryPerMaterialBatch.js b/Source/DataSources/StaticGeometryPerMaterialBatch.js index 850209590347..59bd5ffb57ac 100644 --- a/Source/DataSources/StaticGeometryPerMaterialBatch.js +++ b/Source/DataSources/StaticGeometryPerMaterialBatch.js @@ -127,7 +127,7 @@ import Property from './Property.js'; primitive = new Primitive({ show : false, asynchronous : true, - geometryInstances : geometries, + geometryInstances : geometries.slice(), appearance : new this.appearanceType({ material : this.material, translucent : this.material.isTranslucent(), diff --git a/Source/DataSources/StaticGroundGeometryColorBatch.js b/Source/DataSources/StaticGroundGeometryColorBatch.js index c565a3a092fc..79859d83b861 100644 --- a/Source/DataSources/StaticGroundGeometryColorBatch.js +++ b/Source/DataSources/StaticGroundGeometryColorBatch.js @@ -89,7 +89,7 @@ import Property from './Property.js'; primitive = new GroundPrimitive({ show : false, asynchronous : true, - geometryInstances : geometries, + geometryInstances : geometries.slice(), classificationType : this.classificationType }); primitives.add(primitive, this.zIndex); diff --git a/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js b/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js index 7ddb610f66a7..e34e513f636f 100644 --- a/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +++ b/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js @@ -119,7 +119,7 @@ import Property from './Property.js'; primitive = new GroundPrimitive({ show : false, asynchronous : true, - geometryInstances : geometries, + geometryInstances : geometries.slice(), appearance : new this.appearanceType({ material : this.material // translucent and closed properties overridden diff --git a/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js b/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js index 4794d6702715..317cc0c1732b 100644 --- a/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +++ b/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js @@ -121,7 +121,7 @@ import Property from './Property.js'; primitive = new GroundPolylinePrimitive({ show : false, asynchronous : this._asynchronous, - geometryInstances : geometries, + geometryInstances : geometries.slice(), appearance : new this.appearanceType(), classificationType : this.classificationType }); diff --git a/Source/DataSources/StaticOutlineGeometryBatch.js b/Source/DataSources/StaticOutlineGeometryBatch.js index f37ed8bee20a..03feea0bcd5f 100644 --- a/Source/DataSources/StaticOutlineGeometryBatch.js +++ b/Source/DataSources/StaticOutlineGeometryBatch.js @@ -90,7 +90,7 @@ import Property from './Property.js'; primitive = new Primitive({ show : false, asynchronous : true, - geometryInstances : geometries, + geometryInstances : geometries.slice(), appearance : new PerInstanceColorAppearance({ flat : true, translucent : this.translucent,