Skip to content

Commit

Permalink
Merge branch 'master' into camera-flight-transforms
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGES.md
  • Loading branch information
bagnell committed Feb 22, 2014
2 parents 7a2f633 + 67be26b commit 61115ea
Show file tree
Hide file tree
Showing 119 changed files with 8,829 additions and 3,183 deletions.
43 changes: 28 additions & 15 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ Beta Releases
* `EllipsoidalOccluder`
* `getEllipsoid` -> `ellipsoid`
* `getCameraPosition`, `setCameraPosition` -> `cameraPosition`
* Removed `Scene.getUniformState()`. Use `scene.context.getUniformState()`
* Removed `Scene.getUniformState()`. Use `scene.context.getUniformState()`.
* Visualizers no longer create a `dynamicObject` property on the primitives they create. Instead, they set the `id` property that is standard for all primitives.
* The `propertyChanged` on DynamicScene objects has been renamed to `definitionChanged`. Also, the event is now raised in the case of an existing property being modified as well as having a new property assigned (previously only property assignment would raise the event).
* The `visualizerTypes` parameter to the `DataSouceDisplay` has been changed to a callback function that creates an array of visualizer instances.
* `DynamicDirectionsProperty` and `DynamicVertexPositionsProperty` were both removed, they have been superseded by `PropertyArray` and `PropertyPositionArray`, which make it easy for DataSource implementations to create time-dynamic arrays.
* `VisualizerCollection` has been removed. It is superseded by `DataSourceDisplay`.
* `DynamicEllipsoidVisualizer`, `DynamicPolygonVisualizer`, and `DynamicPolylineVisualizer` have been removed. They are superseded by `GeometryVisualizer` and corresponding `GeometryUpdater` implementations; `EllipsoidGeometryUpdater`, `PolygonGeometryUpdater`, `PolylineGeometryUpdater`.
* Modified `CameraFlightPath` functions to take place in the camera's current reference frame. The arguments to the function now need to be given in world coordinates and an optional reference frame can be given when the flight is completed.
* DynamicScene now makes use of Geometry and Appearances, which provides a tremendous improvements to DataSource visualization (CZML, GeoJSON, etc..). Extruded geometries are now supported and in many use cases performance is now GPU bound.
* Added new `SelectionIndicator` and `InfoBox` widgets to `Viewer`, activated by `viewerDynamicObjectMixin`.
* Fix developer error when zooming in 2D. If the zoom would create an invalid frustum, nothing is done. [#1432](https://github.com/AnalyticalGraphicsInc/cesium/issues/1432)
* `OpenStreetMapImageryProvider` now supports imagery with a minimum level.
Expand All @@ -49,8 +56,14 @@ Beta Releases
* View-dependent imagery source attribution is now added to the `CreditDisplay` by the `BingMapsImageryProvider`.
* `BingMapsImageryProvider` now uses HTTPS by default for metadata and tiles when the document is loaded over HTTPS.
* `RequestErrorEvent` now includes the headers that were returned with the error response.
* Added `CesiumInspector` widget for graphics debugging. In Cesium Viewer, it is enabled by using the query parameter `inspector=true`.
* Added `CesiumInspector` widget for graphics debugging. In Cesium Viewer, it is enabled by using the query parameter `inspector=true`.
* Fixed `WallGeometry` bug that failed by removing positions that were less close together by less than 6 decimal places. [#1483](https://github.com/AnalyticalGraphicsInc/cesium/pull/1483)
* `DynamicEllipse`, `DynamicPolygon`, and `DynamicEllipsoid` now have properties matching their geometry counterpart, i.e. `EllipseGeometry`, `EllipseOutlineGeometry`, etc. These properties are also available in CZML.
* Added a `definitionChanged` event to the `Property` interface as well as most `DynamicScene` objects. This makes it easy for a client to observe when new data is loaded into a property or object.
* Added an `isConstant` property to the `Property` interface. Constant properties do not change in regards to simulation time, i.e. `Property.getValue` will always return the same result for all times.
* `ConstantProperty` is now mutable; it's value can be updated via `ConstantProperty.setValue`.
* Added `AssociativeArray`, which is a helper class for maintaining a hash of objects that also needs to be iterated often.
* Added `TimeIntervalCollection.getChangedEvent` which returns an event that will be raised whenever intervals are updated.

### b25 - 2014-02-03

Expand All @@ -61,7 +74,7 @@ Beta Releases
* `Asphalt`, `Blob`, `Brick`, `Cement`, `Erosion`, `Facet`, `Grass`, `TieDye`, and `Wood` materials were moved to the [Materials Pack Plugin](https://github.com/AnalyticalGraphicsInc/cesium-materials-pack).
* Renamed `GeometryPipeline.createAttributeIndices` to `GeometryPipeline.createAttributeLocations`.
* Renamed `attributeIndices` property to `attributeLocations` when calling `Context.createVertexArrayFromGeometry`.
* `PerformanceDisplay` requires a DOM element as a parameter
* `PerformanceDisplay` requires a DOM element as a parameter.
* Fixed globe rendering in the current Canary version of Google Chrome.
* `Viewer` now monitors the clock settings of the first added `DataSource` for changes, and also now has a constructor option `automaticallyTrackFirstDataSourceClock` which will turn off this behavior.
* The `DynamicObjectCollection` created by `CzmlDataSource` now sends a single `collectionChanged` event after CZML is loaded; previously it was sending an event every time an object was created or removed during the load process.
Expand Down Expand Up @@ -103,8 +116,8 @@ Beta Releases
* The CSS files for individual widgets, e.g. `BaseLayerPicker.css`, no longer import other CSS files. Most applications should import `widgets.css` (and optionally `lighter.css`).
* `SvgPath` has been replaced by a Knockout binding: `cesiumSvgPath`.
* `DynamicObject.availability` is now a `TimeIntervalCollection` instead of a `TimeInterval`.
* Removed prototype version of `BoundingSphere.transform`
* `Matrix4.multiplyByPoint` now returns a `Cartesian3` instead of a `Cartesian4`
* Removed prototype version of `BoundingSphere.transform`.
* `Matrix4.multiplyByPoint` now returns a `Cartesian3` instead of a `Cartesian4`.
* The minified, combined `Cesium.js` file now omits certain `DeveloperError` checks, to increase performance and reduce file size. When developing your application, we recommend using the unminified version locally for early error detection, then deploying the minified version to production.
* Fixed disabling `CentralBody.enableLighting`.
* Fixed `Geocoder` flights when following an object.
Expand All @@ -113,9 +126,9 @@ Beta Releases
* Added `CentralBody.maximumScreenSpaceError`.
* Added `translateEventTypes`, `zoomEventTypes`, `rotateEventTypes`, `tiltEventTypes`, and `lookEventTypes` properties to `ScreenSpaceCameraController` to change the default mouse inputs.
* Added `Billboard.setPixelOffsetScaleByDistance`, `Label.setPixelOffsetScaleByDistance`, `DynamicBillboard.pixelOffsetScaleByDistance`, and `DynamicLabel.pixelOffsetScaleByDistance` to control minimum/maximum pixelOffset scaling based on camera distance.
* Added `BoundingSphere.transformsWithoutScale`
* Added `fromArray` function to `Matrix2`, `Matrix3` and `Matrix4`
* Added `Matrix4.multiplyTransformation`, `Matrix4.multiplyByPointAsVector`
* Added `BoundingSphere.transformsWithoutScale`.
* Added `fromArray` function to `Matrix2`, `Matrix3` and `Matrix4`.
* Added `Matrix4.multiplyTransformation`, `Matrix4.multiplyByPointAsVector`.

### b23 - 2013-12-02

Expand Down Expand Up @@ -184,7 +197,7 @@ Beta Releases
* The `SkyBox` constructor now takes an `options` argument with a `sources` property, instead of directly taking `sources`.
* Replaced `SkyBox.getSources` with `SkyBox.sources`.
* The `bearing` property of `DynamicEllipse` is now called `rotation`.
* CZML `ellipse.bearing` property is now `ellipse.rotation`
* CZML `ellipse.bearing` property is now `ellipse.rotation`.
* Added a `Geocoder` widget that allows users to enter an address or the name of a landmark and zoom to that location. It is enabled by default in applications that use the `Viewer` widget.
* Added `GoogleEarthImageryProvider`.
* Added `Moon` for drawing the moon, and `IauOrientationAxes` for computing the Moon's orientation.
Expand Down Expand Up @@ -258,8 +271,8 @@ Beta Releases

Code that previously looked like `quaternion.magnitude();` should now look like `Quaternion.magnitude(quaternion);`.
* `DynamicObjectCollection` and `CompositeDynamicObjectCollection` have been largely re-written, see the documentation for complete details. Highlights include:
* `getObject` has been renamed `getById`
* `removeObject` has been renamed `removeById`
* `getObject` has been renamed `getById`.
* `removeObject` has been renamed `removeById`.
* `collectionChanged` event added for notification of objects being added or removed.
* `DynamicScene` graphics object (`DynamicBillboard`, etc...) have had their static `mergeProperties` and `clean` functions removed.
* `UniformState.update` now takes a context as its first parameter.
Expand Down Expand Up @@ -429,7 +442,7 @@ _This releases fixes 2D and other issues with Chrome 29.0.1547.57 ([#1002](https
* Removed `Assets/Textures/NE2_LR_LC_SR_W_DR_2048.jpg`. If you were previously using this image with `SingleTileImageryProvider`, consider instead using `TileMapServiceImageryProvider` with a URL of `Assets/Textures/NaturalEarthII`.
* The `Client CZML` SandCastle demo has been removed, largely because it is redundant with the Simple CZML demo.
* The `Two Viewer Widgets` SandCastle demo has been removed. We will add back a multi-scene example when we have a good architecture for it in place.
* Changed static `clone` functions in all objects such that if the object being cloned is undefined, the function will return undefined instead of throwing an exception
* Changed static `clone` functions in all objects such that if the object being cloned is undefined, the function will return undefined instead of throwing an exception.
* Fix resizing issues in `CesiumWidget` ([#608](https://github.com/AnalyticalGraphicsInc/cesium/issues/608), [#834](https://github.com/AnalyticalGraphicsInc/cesium/issues/834)).
* Added initial support for [GeoJSON](http://www.geojson.org/) and [TopoJSON](https://github.com/mbostock/topojson). ([#890](https://github.com/AnalyticalGraphicsInc/cesium/pull/890), [#906](https://github.com/AnalyticalGraphicsInc/cesium/pull/906))
* Added rotation, aligned axis, width, and height properties to `Billboard`s.
Expand Down Expand Up @@ -474,7 +487,7 @@ _This releases fixes 2D and other issues with Chrome 29.0.1547.57 ([#1002](https
* Improved appearance of the Polyline arrow material.
* Fixed polyline clipping artifact. [#728](https://github.com/AnalyticalGraphicsInc/cesium/issues/728).
* Fixed polygon crossing International Date Line for 2D and Columbus view. [#99](https://github.com/AnalyticalGraphicsInc/cesium/issues/99).
* Fixed issue for camera flights when `frameState.mode === SceneMode.MORPHING`
* Fixed issue for camera flights when `frameState.mode === SceneMode.MORPHING`.
* Fixed ISO8601 date parsing when UTC offset is specified in the extended format, such as `2008-11-10T14:00:00+02:30`.

### b16 - 2013-05-01
Expand Down Expand Up @@ -551,7 +564,7 @@ _This releases fixes 2D and other issues with Chrome 29.0.1547.57 ([#1002](https
* Major refactoring of both animation and widgets systems as we move to an MVVM-like architecture for user interfaces.
* New `Animation` widget for controlling playback.
* AnimationController.js has been deleted.
* `ClockStep.SYSTEM_CLOCK_DEPENDENT` was renamed to `ClockStep.SYSTEM_CLOCK_MULTIPLIER`
* `ClockStep.SYSTEM_CLOCK_DEPENDENT` was renamed to `ClockStep.SYSTEM_CLOCK_MULTIPLIER`.
* `ClockStep.SYSTEM_CLOCK` was added to have the clock always match the system time.
* `ClockRange.LOOP` was renamed to `ClockRange.LOOP_STOP` and now only loops in the forward direction.
* `Clock.reverseTick` was removed, simply negate `Clock.multiplier` and pass it to `Clock.tick`.
Expand All @@ -565,7 +578,7 @@ _This releases fixes 2D and other issues with Chrome 29.0.1547.57 ([#1002](https
* Added `FullscreenWidget` which is a simple, single-button widget that toggles fullscreen mode of the specified element.
* Added interactive extent drawing to the `Picking` Sandcastle example.
* Added `HeightmapTessellator` to create a mesh from a heightmap.
* Added `JulianDate.equals`
* Added `JulianDate.equals`.
* Added `Plane` for representing the equation of a plane.
* Added a line segment-plane intersection test to `IntersectionTests`.
* Improved the lighting used in 2D and Columbus View modes. In general, the surface lighting in these modes should look just like it does in 3D.
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
* [David Hudlow](https://github.com/DavidHudlow)
* [Evax Software](http://www.evax.fr)
* [Evax Software](https://github.com/evax)
* [Aviture](http://aviture.us.com)
* [Mike Macaulay](https://github.com/mmacaula)

## [Individual CLA](http://www.agi.com/licenses/individual-cla-agi-v1.0.txt)
* [Victor Berchet](https://github.com/vicb)
Expand Down
8 changes: 5 additions & 3 deletions Source/Core/LeapSecond.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/*global define*/
define([
'./defined',
'./DeveloperError'
'./DeveloperError',
'./isArray'
], function(
defined,
DeveloperError) {
DeveloperError,
isArray) {
"use strict";

/**
Expand Down Expand Up @@ -77,7 +79,7 @@ define([
*/
LeapSecond.setLeapSeconds = function(leapSeconds) {
//>>includeStart('debug', pragmas.debug);
if (!Array.isArray(leapSeconds)) {
if (!isArray(leapSeconds)) {
throw new DeveloperError("leapSeconds is required and must be an array.");
}
//>>includeEnd('debug');
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/PolylinePipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ define([
'./Ellipsoid',
'./EllipsoidGeodesic',
'./IntersectionTests',
'./isArray',
'./Math',
'./Matrix4',
'./Plane'
Expand All @@ -22,6 +23,7 @@ define([
Ellipsoid,
EllipsoidGeodesic,
IntersectionTests,
isArray,
CesiumMath,
Matrix4,
Plane) {
Expand Down Expand Up @@ -326,7 +328,7 @@ define([
}

var h;
if (Array.isArray(height)) {
if (isArray(height)) {
if (height.length !== length/3) {
throw new DeveloperError('height.length must be equal to positions.length');
}
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/getTimestamp.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/*global define,performance*/
/*global define*/
define([
'./defined'
], function(
defined) {
"use strict";
/*global performance*/

/**
* Gets a timestamp that can be used in measuring the time between events. Timestamps
Expand Down
22 changes: 22 additions & 0 deletions Source/Core/isArray.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*global define*/
define(['./defined'
], function(
defined) {
"use strict";

/**
* Tests an object to see if it is an array.
* @exports isArray
*
* @param {Object} value The value to test.
* @returns {Boolean} true if the value is an array, false otherwise.
*/
var isArray = Array.isArray;
if (!defined(isArray)) {
isArray = function(value) {
return Object.prototype.toString.call(value) === '[object Array]';
};
}

return isArray;
});
80 changes: 72 additions & 8 deletions Source/DynamicScene/ColorMaterialProperty.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,86 @@
/*global define*/
define([
'../Core/Color',
define(['../Core/Color',
'../Core/defaultValue',
'../Core/defined',
'../Core/defineProperties',
'../Core/DeveloperError',
'../Core/Event',
'./createDynamicPropertyDescriptor',
'./ConstantProperty',
'./Property'
], function(
Color,
defaultValue,
defined,
defineProperties,
DeveloperError,
Event,
createDynamicPropertyDescriptor,
ConstantProperty,
Property) {
"use strict";

/**
* A {@link MaterialProperty} that maps to solid color {@link Material} uniforms.
*
* @param {Property} [color] The {@link Color} property to be used.
*
* @alias ColorMaterialProperty
* @constructor
*/
var ColorMaterialProperty = function() {
var ColorMaterialProperty = function(colorProperty) {
this._definitionChanged = new Event();
this._color = undefined;
this._colorSubscription = undefined;
this.color = defaultValue(colorProperty, new ConstantProperty(Color.WHITE));
};

/**
* Creates a new instance that represents a constant color.
*
* @param {Color} color The color.
* @returns {ColorMaterialProperty} A new instance configured to represent the provided color.
*/
ColorMaterialProperty.fromColor = function(color) {
//>>includeStart('debug', pragmas.debug);
if (!defined(color)) {
throw new DeveloperError('color is required');
}
//>>includeEnd('debug');
return new ColorMaterialProperty(new ConstantProperty(color));
};

defineProperties(ColorMaterialProperty.prototype, {
/**
* Gets a value indicating if this property is constant. A property is considered
* constant if getValue always returns the same result for the current definition.
* @memberof ColorMaterialProperty.prototype
* @type {Boolean}
*/
isConstant : {
get : function() {
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
* a different result for the same time.
* @memberof ColorMaterialProperty.prototype
* @type {Event}
*/
definitionChanged : {
get : function() {
return this._definitionChanged;
}
},
/**
* A {@link Color} {@link Property} which determines the material's color.
* @memberof ColorMaterialProperty.prototype
* @type {Property}
* @default new ConstantProperty(Color.WHITE)
*/
this.color = new ConstantProperty(Color.WHITE);
};
color : createDynamicPropertyDescriptor('color')
});

/**
* Gets the {@link Material} type at the provided time.
Expand All @@ -48,7 +105,7 @@ define([
if (!defined(result)) {
result = {};
}
result.color = defined(this.color) ? this.color.getValue(time, result.color) : undefined;
result.color = defined(this._color) ? this._color.getValue(time, result.color) : undefined;
return result;
};

Expand All @@ -63,7 +120,14 @@ define([
ColorMaterialProperty.prototype.equals = function(other) {
return this === other || //
(other instanceof ColorMaterialProperty && //
Property.equals(this.color, other.color));
Property.equals(this._color, other._color));
};

/**
* @private
*/
ColorMaterialProperty.prototype._raiseDefinitionChanged = function() {
this._definitionChanged.raiseEvent(this);
};

return ColorMaterialProperty;
Expand Down
Loading

0 comments on commit 61115ea

Please sign in to comment.