cesium 0.22.0 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/Cesium.js +5 -2
  3. data/app/assets/javascripts/Core/Cartesian2.js +58 -0
  4. data/app/assets/javascripts/Core/Cartesian3.js +67 -7
  5. data/app/assets/javascripts/Core/Cartesian4.js +63 -0
  6. data/app/assets/javascripts/Core/CatmullRomSpline.js +183 -163
  7. data/app/assets/javascripts/Core/CorridorGeometry.js +2 -2
  8. data/app/assets/javascripts/Core/Ellipsoid.js +16 -0
  9. data/app/assets/javascripts/Core/ExtentGeometry.js +9 -2
  10. data/app/assets/javascripts/Core/ExtentOutlineGeometry.js +2 -2
  11. data/app/assets/javascripts/Core/GeometryPipeline.js +23 -23
  12. data/app/assets/javascripts/Core/HermiteSpline.js +260 -155
  13. data/app/assets/javascripts/Core/IndexDatatype.js +43 -34
  14. data/app/assets/javascripts/Core/LinearSpline.js +118 -0
  15. data/app/assets/javascripts/Core/Math.js +34 -3
  16. data/app/assets/javascripts/Core/Matrix2.js +26 -0
  17. data/app/assets/javascripts/Core/Matrix3.js +98 -0
  18. data/app/assets/javascripts/Core/Matrix4.js +42 -0
  19. data/app/assets/javascripts/Core/ObjectOrientedBoundingBox.js +396 -0
  20. data/app/assets/javascripts/Core/PolygonGeometry.js +87 -47
  21. data/app/assets/javascripts/Core/PolygonGeometryLibrary.js +20 -17
  22. data/app/assets/javascripts/Core/PolygonOutlineGeometry.js +68 -40
  23. data/app/assets/javascripts/Core/PolygonPipeline.js +19 -9
  24. data/app/assets/javascripts/Core/PrimitiveType.js +33 -36
  25. data/app/assets/javascripts/Core/Quaternion.js +147 -1
  26. data/app/assets/javascripts/Core/QuaternionSpline.js +160 -0
  27. data/app/assets/javascripts/Core/Spline.js +121 -0
  28. data/app/assets/javascripts/Core/Transforms.js +0 -2
  29. data/app/assets/javascripts/Core/loadArrayBuffer.js +5 -1
  30. data/app/assets/javascripts/Core/loadBlob.js +5 -1
  31. data/app/assets/javascripts/Core/loadText.js +4 -1
  32. data/app/assets/javascripts/Core/loadWithXhr.js +30 -14
  33. data/app/assets/javascripts/DynamicScene/PolylineOutlineMaterialProperty.js +2 -2
  34. data/app/assets/javascripts/Renderer/AutomaticUniforms.js +41 -41
  35. data/app/assets/javascripts/Renderer/Context.js +171 -201
  36. data/app/assets/javascripts/Renderer/CubeMapFace.js +2 -2
  37. data/app/assets/javascripts/Renderer/DrawCommand.js +2 -2
  38. data/app/assets/javascripts/Renderer/PixelFormat.js +22 -28
  39. data/app/assets/javascripts/Renderer/ShaderProgram.js +65 -46
  40. data/app/assets/javascripts/Renderer/Texture.js +1 -1
  41. data/app/assets/javascripts/Renderer/TextureMagnificationFilter.js +7 -9
  42. data/app/assets/javascripts/Renderer/TextureMinificationFilter.js +19 -25
  43. data/app/assets/javascripts/Renderer/TextureWrap.js +11 -13
  44. data/app/assets/javascripts/Renderer/UniformDatatype.js +29 -29
  45. data/app/assets/javascripts/Renderer/VertexArray.js +43 -35
  46. data/app/assets/javascripts/Scene/ArcGisMapServerImageryProvider.js +1 -2
  47. data/app/assets/javascripts/Scene/BillboardCollection.js +10 -1
  48. data/app/assets/javascripts/Scene/CameraFlightPath.js +58 -101
  49. data/app/assets/javascripts/Scene/CentralBody.js +1 -4
  50. data/app/assets/javascripts/Scene/CentralBodySurface.js +1 -2
  51. data/app/assets/javascripts/Scene/CesiumTerrainProvider.js +1 -2
  52. data/app/assets/javascripts/Scene/CustomSensorVolume.js +17 -3
  53. data/app/assets/javascripts/Scene/EllipsoidPrimitive.js +20 -5
  54. data/app/assets/javascripts/Scene/EllipsoidSurfaceAppearance.js +1 -2
  55. data/app/assets/javascripts/Scene/FrameState.js +1 -3
  56. data/app/assets/javascripts/Scene/GoogleEarthImageryProvider.js +2 -5
  57. data/app/assets/javascripts/Scene/OpenStreetMapImageryProvider.js +1 -2
  58. data/app/assets/javascripts/Scene/OrthographicFrustum.js +1 -2
  59. data/app/assets/javascripts/Scene/PerspectiveOffCenterFrustum.js +1 -2
  60. data/app/assets/javascripts/Scene/Polygon.js +1 -3
  61. data/app/assets/javascripts/Scene/Polyline.js +5 -2
  62. data/app/assets/javascripts/Scene/PolylineCollection.js +4 -6
  63. data/app/assets/javascripts/Scene/Primitive.js +19 -13
  64. data/app/assets/javascripts/Scene/PrimitivePipeline.js +1 -1
  65. data/app/assets/javascripts/Scene/Scene.js +7 -10
  66. data/app/assets/javascripts/Scene/SceneTransforms.js +1 -3
  67. data/app/assets/javascripts/Scene/SceneTransitioner.js +11 -11
  68. data/app/assets/javascripts/Scene/SingleTileImageryProvider.js +1 -2
  69. data/app/assets/javascripts/Scene/TexturePool.js +1 -1
  70. data/app/assets/javascripts/Scene/TileMapServiceImageryProvider.js +1 -2
  71. data/app/assets/javascripts/Scene/VRTheWorldTerrainProvider.js +1 -2
  72. data/app/assets/javascripts/Scene/ViewportQuad.js +1 -3
  73. data/app/assets/javascripts/Scene/WebMapServiceImageryProvider.js +1 -2
  74. data/app/assets/javascripts/ThirdParty/knockout-3.0.0.js +6 -3
  75. data/app/assets/javascripts/Widgets/CesiumWidget/CesiumWidget.js +4 -3
  76. data/app/assets/javascripts/Widgets/SceneModePicker/SceneModePickerViewModel.js +1 -1
  77. data/app/assets/javascripts/Widgets/Viewer/Viewer.js +5 -5
  78. data/app/assets/javascripts/Widgets/Viewer/viewerDragDropMixin.js +13 -13
  79. data/app/assets/javascripts/Widgets/Viewer/viewerDynamicObjectMixin.js +6 -6
  80. data/app/assets/javascripts/Widgets/widgets.css +1 -1
  81. data/lib/cesium/version.rb +1 -1
  82. metadata +6 -3
  83. data/app/assets/javascripts/Core/OrientationInterpolator.js +0 -106
@@ -1,11 +1,10 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/VertexFormat', 'Scene/Material', 'Scene/Appearance', 'Scene/MaterialAppearance', 'Shaders/Appearances/EllipsoidSurfaceAppearanceVS', 'Shaders/Appearances/EllipsoidSurfaceAppearanceFS'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/VertexFormat', 'Scene/Material', 'Scene/Appearance', 'Shaders/Appearances/EllipsoidSurfaceAppearanceVS', 'Shaders/Appearances/EllipsoidSurfaceAppearanceFS'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  VertexFormat,
6
6
  Material,
7
7
  Appearance,
8
- MaterialAppearance,
9
8
  EllipsoidSurfaceAppearanceVS,
10
9
  EllipsoidSurfaceAppearanceFS) {
11
10
  "use strict";
@@ -1,7 +1,5 @@
1
1
  /*global define*/
2
- define(['Core/defined', 'Core/Cartesian2', 'Scene/SceneMode'], function(
3
- defined,
4
- Cartesian2,
2
+ define(['Scene/SceneMode'], function(
5
3
  SceneMode) {
6
4
  "use strict";
7
5
 
@@ -1,21 +1,18 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/loadText', 'Core/Cartesian2', 'Core/DeveloperError', 'Core/RuntimeError', 'Core/Event', 'Core/Extent', 'Scene/DiscardMissingTileImagePolicy', 'Scene/ImageryProvider', 'Scene/TileProviderError', 'Scene/WebMercatorTilingScheme', 'Scene/GeographicTilingScheme', 'Scene/Credit', 'ThirdParty/when'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/loadText', 'Core/DeveloperError', 'Core/RuntimeError', 'Core/Event', 'Core/Extent', 'Scene/ImageryProvider', 'Scene/TileProviderError', 'Scene/WebMercatorTilingScheme', 'Scene/GeographicTilingScheme', 'Scene/Credit', 'ThirdParty/when'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  loadText,
6
- Cartesian2,
7
6
  DeveloperError,
8
7
  RuntimeError,
9
8
  Event,
10
9
  Extent,
11
- DiscardMissingTileImagePolicy,
12
10
  ImageryProvider,
13
11
  TileProviderError,
14
12
  WebMercatorTilingScheme,
15
13
  GeographicTilingScheme,
16
14
  Credit,
17
- when
18
- ) {
15
+ when) {
19
16
  "use strict";
20
17
 
21
18
  /**
@@ -1,10 +1,9 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Event', 'Core/writeTextToCanvas', 'Scene/ImageryProvider', 'Scene/WebMercatorTilingScheme', 'Scene/Credit'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Event', 'Scene/ImageryProvider', 'Scene/WebMercatorTilingScheme', 'Scene/Credit'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  DeveloperError,
6
6
  Event,
7
- writeTextToCanvas,
8
7
  ImageryProvider,
9
8
  WebMercatorTilingScheme,
10
9
  Credit) {
@@ -1,9 +1,8 @@
1
1
  /*global define*/
2
- define(['Core/defined', 'Core/defineProperties', 'Core/DeveloperError', 'Core/destroyObject', 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/Matrix4', 'Scene/CullingVolume'], function(
2
+ define(['Core/defined', 'Core/defineProperties', 'Core/DeveloperError', 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/Matrix4', 'Scene/CullingVolume'], function(
3
3
  defined,
4
4
  defineProperties,
5
5
  DeveloperError,
6
- destroyObject,
7
6
  Cartesian2,
8
7
  Cartesian3,
9
8
  Cartesian4,
@@ -1,10 +1,9 @@
1
1
  /*global define*/
2
- define(['Core/DeveloperError', 'Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/destroyObject', 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/Matrix4', 'Scene/CullingVolume'], function(
2
+ define(['Core/DeveloperError', 'Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/Matrix4', 'Scene/CullingVolume'], function(
3
3
  DeveloperError,
4
4
  defaultValue,
5
5
  defined,
6
6
  defineProperties,
7
- destroyObject,
8
7
  Cartesian2,
9
8
  Cartesian3,
10
9
  Cartesian4,
@@ -1,5 +1,5 @@
1
1
  /*global define*/
2
- define(['Core/DeveloperError', 'Core/defaultValue', 'Core/defined', 'Core/Color', 'Core/destroyObject', 'Core/Math', 'Core/Ellipsoid', 'Core/GeometryInstance', 'Core/PolygonGeometry', 'Core/PolygonPipeline', 'Core/Queue', 'Scene/EllipsoidSurfaceAppearance', 'Scene/Primitive', 'Scene/Material'], function(
2
+ define(['Core/DeveloperError', 'Core/defaultValue', 'Core/defined', 'Core/Color', 'Core/destroyObject', 'Core/Math', 'Core/Ellipsoid', 'Core/GeometryInstance', 'Core/PolygonGeometry', 'Scene/EllipsoidSurfaceAppearance', 'Scene/Primitive', 'Scene/Material'], function(
3
3
  DeveloperError,
4
4
  defaultValue,
5
5
  defined,
@@ -9,8 +9,6 @@ define(['Core/DeveloperError', 'Core/defaultValue', 'Core/defined', 'Core/Color'
9
9
  Ellipsoid,
10
10
  GeometryInstance,
11
11
  PolygonGeometry,
12
- PolygonPipeline,
13
- Queue,
14
12
  EllipsoidSurfaceAppearance,
15
13
  Primitive,
16
14
  Material) {
@@ -42,8 +42,8 @@ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Boundi
42
42
  this._id = options.id;
43
43
 
44
44
  var modelMatrix;
45
- if (defined(this._polylineCollection)) {
46
- modelMatrix = Matrix4.clone(this._polylineCollection.modelMatrix);
45
+ if (defined(polylineCollection)) {
46
+ modelMatrix = Matrix4.clone(polylineCollection.modelMatrix);
47
47
  }
48
48
 
49
49
  this._modelMatrix = modelMatrix;
@@ -57,6 +57,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Boundi
57
57
  this._pickId = undefined;
58
58
  this._pickIdThis = options._pickIdThis;
59
59
  this._boundingVolume = BoundingSphere.fromPoints(this._positions);
60
+ this._boundingVolumeWC = BoundingSphere.transform(this._boundingVolume, this._modelMatrix);
60
61
  this._boundingVolume2D = new BoundingSphere(); // modified in PolylineCollection
61
62
  };
62
63
 
@@ -158,6 +159,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Boundi
158
159
  this._positions = value;
159
160
  this._length = value.length;
160
161
  this._boundingVolume = BoundingSphere.fromPoints(this._positions, this._boundingVolume);
162
+ this._boundingVolumeWC = BoundingSphere.transform(this._boundingVolume, this._modelMatrix, this._boundingVolumeWC);
161
163
  makeDirty(this, POSITION_INDEX);
162
164
 
163
165
  this.update();
@@ -178,6 +180,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Boundi
178
180
  var positionsChanged = this._propertiesChanged[POSITION_INDEX] > 0 || this._propertiesChanged[POSITION_SIZE_INDEX] > 0;
179
181
  if (!Matrix4.equals(modelMatrix, this._modelMatrix) || positionsChanged) {
180
182
  this._segments = PolylinePipeline.wrapLongitude(this._positions, modelMatrix);
183
+ this._boundingVolumeWC = BoundingSphere.transform(this._boundingVolume, modelMatrix, this._boundingVolumeWC);
181
184
  }
182
185
 
183
186
  this._modelMatrix = modelMatrix;
@@ -1,10 +1,9 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Color', 'Core/combine', 'Core/destroyObject', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/EncodedCartesian3', 'Core/Matrix4', 'Core/Math', 'Core/ComponentDatatype', 'Core/IndexDatatype', 'Core/PrimitiveType', 'Core/BoundingSphere', 'Core/Intersect', 'Renderer/BlendingState', 'Renderer/BufferUsage', 'Renderer/CommandLists', 'Renderer/DrawCommand', 'Renderer/createShaderSource', 'Scene/Material', 'Scene/SceneMode', 'Scene/Polyline', 'Shaders/PolylineCommon', 'Shaders/PolylineVS', 'Shaders/PolylineFS'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Color', 'Core/destroyObject', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/EncodedCartesian3', 'Core/Matrix4', 'Core/Math', 'Core/ComponentDatatype', 'Core/IndexDatatype', 'Core/PrimitiveType', 'Core/BoundingSphere', 'Core/Intersect', 'Renderer/BlendingState', 'Renderer/BufferUsage', 'Renderer/CommandLists', 'Renderer/DrawCommand', 'Renderer/createShaderSource', 'Scene/Material', 'Scene/SceneMode', 'Scene/Polyline', 'Shaders/PolylineCommon', 'Shaders/PolylineVS', 'Shaders/PolylineFS'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  DeveloperError,
6
6
  Color,
7
- combine,
8
7
  destroyObject,
9
8
  Cartesian3,
10
9
  Cartesian4,
@@ -474,7 +473,6 @@ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Color'
474
473
  commandLists.pickList.opaqueList = pickList;
475
474
  createCommandLists(this, context, frameState, pickList, modelMatrix, false, false);
476
475
 
477
- var size = pickList.length;
478
476
  pickList = this._pickTranslucentCommands;
479
477
  commandLists.pickList.translucentList = pickList;
480
478
  createCommandLists(this, context, frameState, pickList, modelMatrix, false, true);
@@ -565,7 +563,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Color'
565
563
 
566
564
  var boundingVolume;
567
565
  if (frameState.mode === SceneMode.SCENE3D) {
568
- boundingVolume = polyline._boundingVolume;
566
+ boundingVolume = polyline._boundingVolumeWC;
569
567
  } else if (frameState.mode === SceneMode.COLUMBUS_VIEW) {
570
568
  boundingVolume = polyline._boundingVolume2D;
571
569
  } else if (frameState.mode === SceneMode.SCENE2D) {
@@ -573,8 +571,8 @@ define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Color'
573
571
  boundingVolume = BoundingSphere.clone(polyline._boundingVolume2D, boundingSphereScratch2);
574
572
  boundingVolume.center.x = 0.0;
575
573
  }
576
- } else if (defined(polyline._boundingVolume) && defined(polyline._boundingVolume2D)) {
577
- boundingVolume = BoundingSphere.union(polyline._boundingVolume, polyline._boundingVolume2D, boundingSphereScratch2);
574
+ } else if (defined(polyline._boundingVolumeWC) && defined(polyline._boundingVolume2D)) {
575
+ boundingVolume = BoundingSphere.union(polyline._boundingVolumeWC, polyline._boundingVolume2D, boundingSphereScratch2);
578
576
  }
579
577
 
580
578
  if (cloneBoundingSphere) {
@@ -1,5 +1,5 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/DeveloperError', 'Core/destroyObject', 'Core/Matrix4', 'Core/BoundingSphere', 'Core/Geometry', 'Core/GeometryAttribute', 'Core/GeometryAttributes', 'Core/GeometryInstance', 'Core/GeometryInstanceAttribute', 'Core/ComponentDatatype', 'Core/TaskProcessor', 'Core/GeographicProjection', 'Core/Queue', 'Core/clone', 'Renderer/BufferUsage', 'Renderer/VertexLayout', 'Renderer/CommandLists', 'Renderer/DrawCommand', 'Renderer/createShaderSource', 'Renderer/CullFace', 'Scene/PrimitivePipeline', 'Scene/PrimitiveState', 'Scene/SceneMode', 'ThirdParty/when'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/DeveloperError', 'Core/destroyObject', 'Core/Matrix4', 'Core/BoundingSphere', 'Core/Geometry', 'Core/GeometryAttribute', 'Core/GeometryAttributes', 'Core/GeometryInstance', 'Core/GeometryInstanceAttribute', 'Core/ComponentDatatype', 'Core/TaskProcessor', 'Core/GeographicProjection', 'Core/clone', 'Renderer/BufferUsage', 'Renderer/VertexLayout', 'Renderer/CommandLists', 'Renderer/DrawCommand', 'Renderer/createShaderSource', 'Renderer/CullFace', 'Scene/PrimitivePipeline', 'Scene/PrimitiveState', 'Scene/SceneMode', 'ThirdParty/when'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  defineProperties,
@@ -15,7 +15,6 @@ define(['Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/Deve
15
15
  ComponentDatatype,
16
16
  TaskProcessor,
17
17
  GeographicProjection,
18
- Queue,
19
18
  clone,
20
19
  BufferUsage,
21
20
  VertexLayout,
@@ -190,6 +189,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/Deve
190
189
  * @see czm_model
191
190
  */
192
191
  this.modelMatrix = Matrix4.clone(Matrix4.IDENTITY);
192
+ this._modelMatrix = new Matrix4();
193
193
 
194
194
  /**
195
195
  * Determines if the primitive will be shown. This affects all geometry
@@ -278,9 +278,9 @@ define(['Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/Deve
278
278
  this._vaAttributes = undefined;
279
279
  this._error = undefined;
280
280
 
281
- // When true, geometry is transformed to world coordinates even if there is a single
282
- // geometry or all geometries are in the same reference frame.
283
281
  this._boundingSphere = undefined;
282
+ this._boundingSphereWC = undefined;
283
+ this._boundingSphereCV = undefined;
284
284
  this._boundingSphere2D = undefined;
285
285
  this._perInstanceAttributeIndices = undefined;
286
286
  this._instanceIds = [];
@@ -671,9 +671,6 @@ define(['Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/Deve
671
671
  var vaAttributes = this._vaAttributes;
672
672
 
673
673
  this._boundingSphere = BoundingSphere.clone(geometries[0].boundingSphere);
674
- if (!this.allow3DOnly && defined(this._boundingSphere)) {
675
- this._boundingSphere2D = BoundingSphere.projectTo2D(this._boundingSphere, projection);
676
- }
677
674
 
678
675
  var va = [];
679
676
  length = geometries.length;
@@ -881,16 +878,25 @@ define(['Core/defaultValue', 'Core/defined', 'Core/defineProperties', 'Core/Deve
881
878
  attributes.length = 0;
882
879
  }
883
880
 
881
+ if (!Matrix4.equals(this.modelMatrix, this._modelMatrix)) {
882
+ Matrix4.clone(this.modelMatrix, this._modelMatrix);
883
+ this._boundingSphereWC = BoundingSphere.transform(this._boundingSphere, this.modelMatrix, this._boundingSphereWC);
884
+ if (!this.allow3DOnly && defined(this._boundingSphere)) {
885
+ this._boundingSphereCV = BoundingSphere.projectTo2D(this._boundingSphereWC, projection, this._boundingSphereCV);
886
+ this._boundingSphere2D = BoundingSphere.clone(this._boundingSphereCV, this._boundingSphere2D);
887
+ this._boundingSphere2D.center.x = 0.0;
888
+ }
889
+ }
890
+
884
891
  var boundingSphere;
885
892
  if (frameState.mode === SceneMode.SCENE3D) {
886
- boundingSphere = this._boundingSphere;
893
+ boundingSphere = this._boundingSphereWC;
887
894
  } else if (frameState.mode === SceneMode.COLUMBUS_VIEW) {
888
- boundingSphere = this._boundingSphere2D;
895
+ boundingSphere = this._boundingSphereCV;
889
896
  } else if (frameState.mode === SceneMode.SCENE2D && defined(this._boundingSphere2D)) {
890
- boundingSphere = BoundingSphere.clone(this._boundingSphere2D);
891
- boundingSphere.center.x = 0.0;
892
- } else if (defined(this._boundingSphere) && defined(this._boundingSphere2D)) {
893
- boundingSphere = BoundingSphere.union(this._boundingSphere, this._boundingSphere2D);
897
+ boundingSphere = this._boundingSphere2D;
898
+ } else if (defined(this._boundingSphereWC) && defined(this._boundingSphereCV)) {
899
+ boundingSphere = BoundingSphere.union(this._boundingSphereWC, this._boundingSphereCV);
894
900
  }
895
901
 
896
902
  // modelMatrix can change from frame to frame
@@ -157,7 +157,7 @@ define(['Core/defined', 'Core/defaultValue', 'Core/Color', 'Core/ComponentDataty
157
157
  var length = instances.length;
158
158
  var primitiveType = instances[0].geometry.primitiveType;
159
159
  for (i = 1; i < length; ++i) {
160
- if (instances[i].geometry.primitiveType.value !== primitiveType.value) {
160
+ if (instances[i].geometry.primitiveType !== primitiveType) {
161
161
  throw new DeveloperError('All instance geometries must have the same primitiveType.');
162
162
  }
163
163
  }
@@ -490,15 +490,13 @@ define(['Core/Math', 'Core/Color', 'Core/defaultValue', 'Core/defined', 'Core/de
490
490
  var command = commandList[k];
491
491
  var boundingVolume = command.boundingVolume;
492
492
  if (defined(boundingVolume)) {
493
- var modelMatrix = defaultValue(command.modelMatrix, Matrix4.IDENTITY);
494
- var transformedBV = boundingVolume.transform(modelMatrix); //TODO: Remove this allocation.
495
493
  if (command.cull &&
496
- ((cullingVolume.getVisibility(transformedBV) === Intersect.OUTSIDE) ||
497
- (defined(occluder) && !occluder.isBoundingSphereVisible(transformedBV)))) {
494
+ ((cullingVolume.getVisibility(boundingVolume) === Intersect.OUTSIDE) ||
495
+ (defined(occluder) && !occluder.isBoundingSphereVisible(boundingVolume)))) {
498
496
  continue;
499
497
  }
500
498
 
501
- distances = transformedBV.getPlaneDistances(position, direction, distances);
499
+ distances = boundingVolume.getPlaneDistances(position, direction, distances);
502
500
  near = Math.min(near, distances.start);
503
501
  far = Math.max(far, distances.stop);
504
502
  } else {
@@ -614,7 +612,7 @@ define(['Core/Math', 'Core/Color', 'Core/defaultValue', 'Core/defined', 'Core/de
614
612
  });
615
613
  }
616
614
 
617
- var m = Matrix4.multiplyByTranslation(defaultValue(command.modelMatrix, Matrix4.IDENTITY), command.boundingVolume.center);
615
+ var m = Matrix4.multiplyByTranslation(Matrix4.IDENTITY, command.boundingVolume.center);
618
616
  scene._debugSphere.modelMatrix = Matrix4.multiplyByUniformScale(m, command.boundingVolume.radius);
619
617
 
620
618
  var commandList = [];
@@ -638,14 +636,13 @@ define(['Core/Math', 'Core/Color', 'Core/defaultValue', 'Core/defined', 'Core/de
638
636
  }
639
637
  cullingVolume = scratchCullingVolume;
640
638
 
641
- var modelMatrix = defaultValue(command.modelMatrix, Matrix4.IDENTITY);
642
- var transformedBV = command.boundingVolume.transform(modelMatrix); //TODO: Remove this allocation.
639
+ var boundingVolume = command.boundingVolume;
643
640
 
644
641
  return ((defined(command)) &&
645
642
  ((!defined(command.boundingVolume)) ||
646
643
  !command.cull ||
647
- ((cullingVolume.getVisibility(transformedBV) !== Intersect.OUTSIDE) &&
648
- (!defined(occluder) || occluder.isBoundingSphereVisible(transformedBV)))));
644
+ ((cullingVolume.getVisibility(boundingVolume) !== Intersect.OUTSIDE) &&
645
+ (!defined(occluder) || occluder.isBoundingSphereVisible(boundingVolume)))));
649
646
  }
650
647
 
651
648
  function executeCommands(scene, passState, clearColor) {
@@ -1,7 +1,5 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/DeveloperError', 'Core/Cartographic', 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/Matrix4', 'Core/BoundingRectangle', 'Core/Math', 'Scene/SceneMode'],
3
- function(
4
- defaultValue,
2
+ define(['Core/defined', 'Core/DeveloperError', 'Core/Cartographic', 'Core/Cartesian2', 'Core/Cartesian3', 'Core/Cartesian4', 'Core/Matrix4', 'Core/BoundingRectangle', 'Core/Math', 'Scene/SceneMode'], function(
5
3
  defined,
6
4
  DeveloperError,
7
5
  Cartographic,
@@ -61,14 +61,14 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
61
61
  * @type {Event}
62
62
  * @default Event()
63
63
  */
64
- this.onTransitionStart = new Event();
64
+ this.transitionStart = new Event();
65
65
 
66
66
  /**
67
67
  * Gets the event fired at the completion of a transition.
68
68
  * @type {Event}
69
69
  * @default Event()
70
70
  */
71
- this.onTransitionComplete = new Event();
71
+ this.transitionComplete = new Event();
72
72
 
73
73
  this._scene = scene;
74
74
  this._ellipsoid = defaultValue(ellipsoid, Ellipsoid.WGS84);
@@ -161,7 +161,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
161
161
 
162
162
  this._previousMode = this._scene.mode;
163
163
  if (this._previousMode !== SceneMode.SCENE2D) {
164
- this.onTransitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE2D, false);
164
+ this.transitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE2D, false);
165
165
  complete2DCallback(this);
166
166
  }
167
167
  };
@@ -179,7 +179,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
179
179
  this._previousMode = scene.mode;
180
180
 
181
181
  if (this._previousMode !== SceneMode.COLUMBUS_VIEW) {
182
- this.onTransitionStart.raiseEvent(this, this._previousMode, SceneMode.COLUMBUS_VIEW, false);
182
+ this.transitionStart.raiseEvent(this, this._previousMode, SceneMode.COLUMBUS_VIEW, false);
183
183
  completeColumbusViewCallback(this);
184
184
  }
185
185
  };
@@ -197,7 +197,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
197
197
  this._previousMode = scene.mode;
198
198
 
199
199
  if (scene.mode !== SceneMode.SCENE3D) {
200
- this.onTransitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE3D, false);
200
+ this.transitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE3D, false);
201
201
  complete3DCallback(this);
202
202
  }
203
203
  };
@@ -230,7 +230,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
230
230
  if (this._previousMode === SceneMode.SCENE2D || this._previousMode === SceneMode.MORPHING) {
231
231
  return;
232
232
  }
233
- this.onTransitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE2D, true);
233
+ this.transitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE2D, true);
234
234
 
235
235
  updateFrustums(this);
236
236
  scene.mode = SceneMode.MORPHING;
@@ -258,7 +258,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
258
258
  if (this._previousMode === SceneMode.COLUMBUS_VIEW || this._previousMode === SceneMode.MORPHING) {
259
259
  return;
260
260
  }
261
- this.onTransitionStart.raiseEvent(this, this._previousMode, SceneMode.COLUMBUS_VIEW, true);
261
+ this.transitionStart.raiseEvent(this, this._previousMode, SceneMode.COLUMBUS_VIEW, true);
262
262
 
263
263
  updateFrustums(this);
264
264
  scene.mode = SceneMode.MORPHING;
@@ -286,7 +286,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
286
286
  if (this._previousMode === SceneMode.SCENE3D || this._previousMode === SceneMode.MORPHING) {
287
287
  return;
288
288
  }
289
- this.onTransitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE3D, true);
289
+ this.transitionStart.raiseEvent(this, this._previousMode, SceneMode.SCENE3D, true);
290
290
 
291
291
  updateFrustums(this);
292
292
  scene.mode = SceneMode.MORPHING;
@@ -748,7 +748,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
748
748
 
749
749
  var wasMorphing = defined(transitioner._completeMorph);
750
750
  transitioner._completeMorph = undefined;
751
- transitioner.onTransitionComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.SCENE3D, wasMorphing);
751
+ transitioner.transitionComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.SCENE3D, wasMorphing);
752
752
  }
753
753
 
754
754
  function complete2DCallback(transitioner) {
@@ -770,7 +770,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
770
770
 
771
771
  var wasMorphing = defined(transitioner._completeMorph);
772
772
  transitioner._completeMorph = undefined;
773
- transitioner.onTransitionComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.SCENE2D, wasMorphing);
773
+ transitioner.transitionComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.SCENE2D, wasMorphing);
774
774
  }
775
775
 
776
776
  function completeColumbusViewCallback(transitioner) {
@@ -796,7 +796,7 @@ define(['Core/defaultValue', 'Core/defined', 'Core/destroyObject', 'Core/Develop
796
796
 
797
797
  var wasMorphing = defined(transitioner._completeMorph);
798
798
  transitioner._completeMorph = undefined;
799
- transitioner.onTransitionComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.COLUMBUS_VIEW, wasMorphing);
799
+ transitioner.transitionComplete.raiseEvent(transitioner, transitioner._previousMode, SceneMode.COLUMBUS_VIEW, wasMorphing);
800
800
  }
801
801
 
802
802
  return SceneTransitioner;
@@ -1,9 +1,8 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/loadImage', 'Core/writeTextToCanvas', 'Core/DeveloperError', 'Core/Event', 'Core/Extent', 'Scene/Credit', 'Scene/GeographicTilingScheme', 'Scene/TileProviderError', 'ThirdParty/when'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/loadImage', 'Core/DeveloperError', 'Core/Event', 'Core/Extent', 'Scene/Credit', 'Scene/GeographicTilingScheme', 'Scene/TileProviderError', 'ThirdParty/when'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  loadImage,
6
- writeTextToCanvas,
7
6
  DeveloperError,
8
7
  Event,
9
8
  Extent,
@@ -82,7 +82,7 @@ define(['Core/defined', 'Core/destroyObject', 'Core/DeveloperError', 'Renderer/P
82
82
  var width = defined(source) ? source.width : description.width;
83
83
  var height = defined(source) ? source.height : description.height;
84
84
  //coerce values to primitive numbers to make textureTypeKey smaller.
85
- var pixelFormat = +(description.pixelFormat || PixelFormat.RGBA);
85
+ var pixelFormat = (description.pixelFormat || PixelFormat.RGBA);
86
86
  var pixelDatatype = +(description.pixelDatatype || PixelDatatype.UNSIGNED_BYTE);
87
87
  var preMultiplyAlpha = +(description.preMultiplyAlpha || pixelFormat === PixelFormat.RGB || pixelFormat === PixelFormat.LUMINANCE);
88
88
 
@@ -1,12 +1,11 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/Cartographic', 'Core/DeveloperError', 'Core/Event', 'Core/loadXML', 'Core/writeTextToCanvas', 'Core/Extent', 'Scene/Credit', 'Scene/ImageryProvider', 'Scene/WebMercatorTilingScheme', 'Scene/GeographicTilingScheme'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/Cartographic', 'Core/DeveloperError', 'Core/Event', 'Core/loadXML', 'Core/Extent', 'Scene/Credit', 'Scene/ImageryProvider', 'Scene/WebMercatorTilingScheme', 'Scene/GeographicTilingScheme'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  Cartographic,
6
6
  DeveloperError,
7
7
  Event,
8
8
  loadXML,
9
- writeTextToCanvas,
10
9
  Extent,
11
10
  Credit,
12
11
  ImageryProvider,
@@ -1,12 +1,11 @@
1
1
  /*global define*/
2
- define(['Core/defaultValue', 'Core/defined', 'Core/loadImage', 'Core/loadXML', 'Core/getImagePixels', 'Core/throttleRequestByServer', 'Core/writeTextToCanvas', 'Core/DeveloperError', 'Core/Extent', 'Core/Math', 'Core/Ellipsoid', 'Core/Event', 'Scene/Credit', 'Scene/TerrainProvider', 'Scene/TileProviderError', 'Scene/GeographicTilingScheme', 'Scene/HeightmapTerrainData', 'ThirdParty/when'], function(
2
+ define(['Core/defaultValue', 'Core/defined', 'Core/loadImage', 'Core/loadXML', 'Core/getImagePixels', 'Core/throttleRequestByServer', 'Core/DeveloperError', 'Core/Extent', 'Core/Math', 'Core/Ellipsoid', 'Core/Event', 'Scene/Credit', 'Scene/TerrainProvider', 'Scene/TileProviderError', 'Scene/GeographicTilingScheme', 'Scene/HeightmapTerrainData', 'ThirdParty/when'], function(
3
3
  defaultValue,
4
4
  defined,
5
5
  loadImage,
6
6
  loadXML,
7
7
  getImagePixels,
8
8
  throttleRequestByServer,
9
- writeTextToCanvas,
10
9
  DeveloperError,
11
10
  Extent,
12
11
  CesiumMath,