Skip to content

Commit

Permalink
Merge branch 'master' into performanceDisplay
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGES.md
  • Loading branch information
hpinkos committed Jan 31, 2014
2 parents 6e520cf + a38a680 commit 14fcce8
Show file tree
Hide file tree
Showing 453 changed files with 4,467 additions and 2,954 deletions.
16 changes: 10 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@ Beta Releases
### b25 - 2014-02-03
* Breaking changes:
* The `Viewer` constructor argument `options.fullscreenElement` now matches the `FullscreenButton` default of `document.body`, it was previously the `Viewer` container itself.
* The `Asphalt`, `Blob`, `Brick`, `Cement`, `Erosion`, `Facet`, `Grass`, `TieDye`, and `Wood` materials have been removed. See the [Cesium Materials Plugin](https://github.com/AnalyticalGraphicsInc/cesium-materials-pack) for details.
* Removed `Viewer.objectTracked` event; `Viewer.trackedObject` is now an ES5 Knockout observable that can be subscribed to directly.
* Renamed `GeometryPipeline.createAttributeIndices` to `GeometryPipeline.createAttributeLocations`.
* Renamed `attributeIndices` property to `attributeLocations` when calling `Context.createVertexArrayFromGeometry`.
* `PerformanceDisplay requires a `description.container` parameter
* Fixed problems that caused the globe to not be rendered in the current Canary version of Google Chrome.
* Added `ScreenSpaceCameraController.enableInputs` to fix issue with inputs not being restored after overlapping camera flights.
* Added `Quaternion.fastSlerp` and `Quaternion.fastSquad`.
* 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.
* `TileMapServiceImageryProvider` can now handle casing differences in tilemapresource.xml.
* Fix picking in 2D with rotated map. [#1337](https://github.com/AnalyticalGraphicsInc/cesium/issues/1337)
* 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.
* Added `ScreenSpaceCameraController.enableInputs` to fix issue with inputs not being restored after overlapping camera flights.
* Fixed picking in 2D with rotated map. [#1337](https://github.com/AnalyticalGraphicsInc/cesium/issues/1337)
* `TileMapServiceImageryProvider` can now handle casing differences in tilemapresource.xml.
* Added `Quaternion.fastSlerp` and `Quaternion.fastSquad`.
* Upgraded Tween.js to version r12.
* `OpenStreetMapImageryProvider` now supports imagery with a minimum level.

### b24 - 2014-01-06

Expand Down
25 changes: 1 addition & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,7 @@ This document describes how we merge pull requests. See the [Contributor's Guid

## License

We love pull requests. We promptly [review](https://github.com/AnalyticalGraphicsInc/cesium/wiki/Code-Review-Tips) them, provide feedback, and merge. We use the [Apache 2.0 License](LICENSE.md). Before we can merge a pull request, we require either:

* A signed [Contributor License Agreement](http://producingoss.com/en/copyright-assignment.html#copyright-assignment-cla) (CLA). This can be emailed to [email protected], and only needs to be completed once. The CLA ensures you retain copyright to your contributions, and we have the right to use them and incorporate them into Cesium. There is a CLA for [individuals](http://www.agi.com/licenses/individual-cla-agi-v1.0.txt) and [corporations](http://www.agi.com/licenses/corporate-cla-agi-v1.0.txt). Please email completed CLAs and related questions to [[email protected]](mailto:[email protected]).

or

* Every commit is signed-off on to indicate agreement to the Developer Certificate of Origin (DCO). The DCO was originally developed for the Linux kernel, and its text is here: [SubmittingPatches](https://github.com/wking/signed-off-by/blob/ab5bce80ad2259b47202b28905efff0d04032709/Documentation/SubmittingPatches). Like the CLA, you retain copyright to your contributions, and we have the right to use them and incorporate them into Cesium. A commit with a sign-off has a line like the following at the bottom:

```
Signed-off-by: First-name Last-name <email-address>
```

To sign-off on commits, first make sure your name and email are setup with git:

```
git config --global --add user.name "First-name Last-name"
git config --global --add user.email "email-address"
```

Then include the `-s` option with every commit, e.g.,

```
git commit -s -m 'commit message as usual`
```
We love pull requests. We promptly [review](https://github.com/AnalyticalGraphicsInc/cesium/wiki/Code-Review-Tips) them, provide feedback, and merge. We use the [Apache 2.0 License](LICENSE.md). Before we can merge a pull request, we require a signed [Contributor License Agreement](http://producingoss.com/en/copyright-assignment.html#copyright-assignment-cla) (CLA). This can be emailed to [email protected], and only needs to be completed once. The CLA ensures you retain copyright to your contributions, and we have the right to use them and incorporate them into Cesium. There is a CLA for [individuals](http://www.agi.com/licenses/individual-cla-agi-v1.0.txt) and [corporations](http://www.agi.com/licenses/corporate-cla-agi-v1.0.txt). Please email completed CLAs and related questions to [[email protected]](mailto:[email protected]).

## Development Best Practices

Expand Down
5 changes: 3 additions & 2 deletions Source/Core/AxisAlignedBoundingBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ define([
*
* @example
* // Compute an axis aligned bounding box enclosing two points.
* var box = AxisAlignedBoundingBox.fromPoints([new Cartesian3(2, 0, 0), new Cartesian3(-2, 0, 0)]);
* var box = Cesium.AxisAlignedBoundingBox.fromPoints([new Cesium.Cartesian3(2, 0, 0), new Cesium.Cartesian3(-2, 0, 0)]);
*/
AxisAlignedBoundingBox.fromPoints = function(positions, result) {
if (!defined(result)) {
Expand Down Expand Up @@ -176,13 +176,14 @@ define([
* @exception {DeveloperError} plane is required.
*/
AxisAlignedBoundingBox.intersect = function(box, plane) {
//>>includeStart('debug', pragmas.debug);
if (!defined(box)) {
throw new DeveloperError('box is required.');
}

if (!defined(plane)) {
throw new DeveloperError('plane is required.');
}
//>>includeEnd('debug');

intersectScratch = Cartesian3.subtract(box.maximum, box.minimum, intersectScratch);
var h = Cartesian3.multiplyByScalar(intersectScratch, 0.5, intersectScratch); //The positive half diagonal
Expand Down
9 changes: 6 additions & 3 deletions Source/Core/BoundingRectangle.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,14 @@ define([
* @exception {DeveloperError} right is required.
*/
BoundingRectangle.union = function(left, right, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(left)) {
throw new DeveloperError('left is required.');
}

if (!defined(right)) {
throw new DeveloperError('right is required.');
}
//>>includeEnd('debug');

if (!defined(result)) {
result = new BoundingRectangle();
Expand Down Expand Up @@ -220,13 +221,14 @@ define([
* @exception {DeveloperError} point is required.
*/
BoundingRectangle.expand = function(rectangle, point, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(rectangle)) {
throw new DeveloperError('rectangle is required.');
}

if (!defined(point)) {
throw new DeveloperError('point is required.');
}
//>>includeEnd('debug');

result = BoundingRectangle.clone(rectangle, result);

Expand Down Expand Up @@ -262,13 +264,14 @@ define([
* @exception {DeveloperError} right is required.
*/
BoundingRectangle.intersect = function(left, right) {
//>>includeStart('debug', pragmas.debug);
if (!defined(left)) {
throw new DeveloperError('left is required.');
}

if (!defined(right)) {
throw new DeveloperError('right is required.');
}
//>>includeEnd('debug');

var leftX = left.x;
var leftY = left.y;
Expand Down
14 changes: 7 additions & 7 deletions Source/Core/BoundingSphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ define([
* // Compute the bounding sphere from 3 positions, each specified relative to a center.
* // In addition to the X, Y, and Z coordinates, the points array contains two additional
* // elements per point which are ignored for the purpose of computing the bounding sphere.
* var center = new Cartesian3(1.0, 2.0, 3.0);
* var center = new Cesium.Cartesian3(1.0, 2.0, 3.0);
* var points = [1.0, 2.0, 3.0, 0.1, 0.2,
* 4.0, 5.0, 6.0, 0.1, 0.2,
* 7.0, 8.0, 9.0, 0.1, 0.2];
* var sphere = BoundingSphere.fromVertices(points, center, 5);
* var sphere = Cesium.BoundingSphere.fromVertices(points, center, 5);
*/
BoundingSphere.fromVertices = function(positions, center, stride, result) {
if (!defined(result)) {
Expand Down Expand Up @@ -505,7 +505,7 @@ define([
*
* @example
* // Create a bounding sphere around the unit cube
* var sphere = BoundingSphere.fromCornerPoints(new Cartesian3(-0.5, -0.5, -0.5), new Cartesian3(0.5, 0.5, 0.5));
* var sphere = Cesium.BoundingSphere.fromCornerPoints(new Cesium.Cartesian3(-0.5, -0.5, -0.5), new Cesium.Cartesian3(0.5, 0.5, 0.5));
*/
BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) {
//>>includeStart('debug', pragmas.debug);
Expand Down Expand Up @@ -538,7 +538,7 @@ define([
* @exception {DeveloperError} ellipsoid is required.
*
* @example
* var boundingSphere = BoundingSphere.fromEllipsoid(ellipsoid);
* var boundingSphere = Cesium.BoundingSphere.fromEllipsoid(ellipsoid);
*/
BoundingSphere.fromEllipsoid = function(ellipsoid, result) {
//>>includeStart('debug', pragmas.debug);
Expand Down Expand Up @@ -748,9 +748,9 @@ define([
* @exception {DeveloperError} transform is required.
*
* @example
* var modelMatrix = Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
* var boundingSphere = new BoundingSphere();
* var newBoundingSphere = BoundingSphere.transformWithoutScale(boundingSphere, modelMatrix);
* var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(positionOnEllipsoid);
* var boundingSphere = new Cesium.BoundingSphere();
* var newBoundingSphere = Cesium.BoundingSphere.transformWithoutScale(boundingSphere, modelMatrix);
*/
BoundingSphere.transformWithoutScale = function(sphere, transform, result) {
//>>includeStart('debug', pragmas.debug);
Expand Down
27 changes: 14 additions & 13 deletions Source/Core/BoxGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@ define([
* @see BoxGeometry#createGeometry
*
* @example
* var box = new BoxGeometry({
* vertexFormat : VertexFormat.POSITION_ONLY,
* maximumCorner : new Cartesian3(250000.0, 250000.0, 250000.0),
* minimumCorner : new Cartesian3(-250000.0, -250000.0, -250000.0)
* var box = new Cesium.BoxGeometry({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
* maximumCorner : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
* minimumCorner : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
* });
* var geometry = BoxGeometry.createGeometry(box);
* var geometry = Cesium.BoxGeometry.createGeometry(box);
*/
var BoxGeometry = function(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);

var min = options.minimumCorner;
var max = options.maximumCorner;

//>>includeStart('debug', pragmas.debug);
if (!defined(min)) {
throw new DeveloperError('options.minimumCorner is required.');
}

if (!defined(max)) {
throw new DeveloperError('options.maximumCorner is required');
}
//>>includeEnd('debug');

var vertexFormat = defaultValue(options.vertexFormat, VertexFormat.DEFAULT);

Expand All @@ -86,23 +86,24 @@ define([
* @see BoxGeometry#createGeometry
*
* @example
* var box = BoxGeometry.fromDimensions({
* vertexFormat : VertexFormat.POSITION_ONLY,
* dimensions : new Cartesian3(500000.0, 500000.0, 500000.0)
* var box = Cesium.BoxGeometry.fromDimensions({
* vertexFormat : Cesium.VertexFormat.POSITION_ONLY,
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* var geometry = BoxGeometry.createGeometry(box);
* var geometry = Cesium.BoxGeometry.createGeometry(box);
*/
BoxGeometry.fromDimensions = function(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);

var dimensions = options.dimensions;

//>>includeStart('debug', pragmas.debug);
if (!defined(dimensions)) {
throw new DeveloperError('options.dimensions is required.');
}

if (dimensions.x < 0 || dimensions.y < 0 || dimensions.z < 0) {
throw new DeveloperError('All dimensions components must be greater than or equal to zero.');
}
//>>includeEnd('debug');

var corner = Cartesian3.multiplyByScalar(dimensions, 0.5);
var min = Cartesian3.negate(corner);
Expand Down
22 changes: 12 additions & 10 deletions Source/Core/BoxOutlineGeometry.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,26 @@ define([
* @see BoxOutlineGeometry#createGeometry
*
* @example
* var box = new BoxOutlineGeometry({
* maximumCorner : new Cartesian3(250000.0, 250000.0, 250000.0),
* minimumCorner : new Cartesian3(-250000.0, -250000.0, -250000.0)
* var box = new Cesium.BoxOutlineGeometry({
* maximumCorner : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
* minimumCorner : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
* });
* var geometry = BoxOutlineGeometry.createGeometry(box);
* var geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
*/
var BoxOutlineGeometry = function(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);

var min = options.minimumCorner;
var max = options.maximumCorner;

//>>includeStart('debug', pragmas.debug);
if (!defined(min)) {
throw new DeveloperError('options.minimumCorner is required.');
}

if (!defined(max)) {
throw new DeveloperError('options.maximumCorner is required');
}
//>>includeEnd('debug');

this._min = Cartesian3.clone(min);
this._max = Cartesian3.clone(max);
Expand All @@ -78,22 +79,23 @@ define([
* @see BoxOutlineGeometry#createGeometry
*
* @example
* var box = BoxOutlineGeometry.fromDimensions({
* dimensions : new Cartesian3(500000.0, 500000.0, 500000.0)
* var box = Cesium.BoxOutlineGeometry.fromDimensions({
* dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
* });
* var geometry = BoxOutlineGeometry.createGeometry(box);
* var geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
*/
BoxOutlineGeometry.fromDimensions = function(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);

var dimensions = options.dimensions;

//>>includeStart('debug', pragmas.debug);
if (!defined(dimensions)) {
throw new DeveloperError('options.dimensions is required.');
}

if (dimensions.x < 0 || dimensions.y < 0 || dimensions.z < 0) {
throw new DeveloperError('All dimensions components must be greater than or equal to zero.');
}
//>>includeEnd('debug');

var corner = Cartesian3.multiplyByScalar(dimensions, 0.5);
var min = Cartesian3.negate(corner);
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Cartesian2.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,11 @@ define([
* @example
* // Create a Cartesian2 with (1.0, 2.0)
* var v = [1.0, 2.0];
* var p = Cartesian2.fromArray(v);
* var p = Cesium.Cartesian2.fromArray(v);
*
* // Create a Cartesian2 with (1.0, 2.0) using an offset into an array
* var v2 = [0.0, 0.0, 1.0, 2.0];
* var p2 = Cartesian2.fromArray(v2, 2);
* var p2 = Cesium.Cartesian2.fromArray(v2, 2);
*/
Cartesian2.fromArray = Cartesian2.unpack;

Expand Down Expand Up @@ -339,7 +339,7 @@ define([
*
* @example
* // Returns 1.0
* var d = Cartesian2.distance(new Cartesian2(1.0, 0.0), new Cartesian2(2.0, 0.0));
* var d = Cesium.Cartesian2.distance(new Cesium.Cartesian2(1.0, 0.0), new Cesium.Cartesian2(2.0, 0.0));
*/
Cartesian2.distance = function(left, right) {
//>>includeStart('debug', pragmas.debug);
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Cartesian3.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ define([
* @example
* // Create a Cartesian3 with (1.0, 2.0, 3.0)
* var v = [1.0, 2.0, 3.0];
* var p = Cartesian3.fromArray(v);
* var p = Cesium.Cartesian3.fromArray(v);
*
* // Create a Cartesian3 with (1.0, 2.0, 3.0) using an offset into an array
* var v2 = [0.0, 0.0, 1.0, 2.0, 3.0];
* var p2 = Cartesian3.fromArray(v2, 2);
* var p2 = Cesium.Cartesian3.fromArray(v2, 2);
*/
Cartesian3.fromArray = Cartesian3.unpack;

Expand Down Expand Up @@ -370,7 +370,7 @@ define([
*
* @example
* // Returns 1.0
* var d = Cartesian3.distance(new Cartesian3(1.0, 0.0, 0.0), new Cartesian3(2.0, 0.0, 0.0));
* var d = Cesium.Cartesian3.distance(new Cesium.Cartesian3(1.0, 0.0, 0.0), new Cesium.Cartesian3(2.0, 0.0, 0.0));
*/
Cartesian3.distance = function(left, right) {
//>>includeStart('debug', pragmas.debug);
Expand Down
6 changes: 3 additions & 3 deletions Source/Core/Cartesian4.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ define([
* @example
* // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0)
* var v = [1.0, 2.0, 3.0, 4.0];
* var p = Cartesian4.fromArray(v);
* var p = Cesium.Cartesian4.fromArray(v);
*
* // Create a Cartesian4 with (1.0, 2.0, 3.0, 4.0) using an offset into an array
* var v2 = [0.0, 0.0, 1.0, 2.0, 3.0, 4.0];
* var p2 = Cartesian4.fromArray(v2, 2);
* var p2 = Cesium.Cartesian4.fromArray(v2, 2);
*/
Cartesian4.fromArray = Cartesian4.unpack;

Expand Down Expand Up @@ -346,7 +346,7 @@ define([
*
* @example
* // Returns 1.0
* var d = Cartesian4.distance(new Cartesian4(1.0, 0.0, 0.0, 0.0), new Cartesian4(2.0, 0.0, 0.0, 0.0));
* var d = Cesium.Cartesian4.distance(new Cesium.Cartesian4(1.0, 0.0, 0.0, 0.0), new Cesium.Cartesian4(2.0, 0.0, 0.0, 0.0));
*/
Cartesian4.distance = function(left, right) {
//>>includeStart('debug', pragmas.debug);
Expand Down
6 changes: 6 additions & 0 deletions Source/Core/Cartographic.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ define([
* @exception {DeveloperError} epsilon is required and must be a number.
*/
Cartographic.equalsEpsilon = function(left, right, epsilon) {
//>>includeStart('debug', pragmas.debug);
if (typeof epsilon !== 'number') {
throw new DeveloperError('epsilon is required and must be a number.');
}
//>>includeEnd('debug');

return (left === right) ||
((defined(left)) &&
(defined(right)) &&
Expand All @@ -148,9 +151,12 @@ define([
* @exception {DeveloperError} cartographic is required.
*/
Cartographic.toString = function(cartographic) {
//>>includeStart('debug', pragmas.debug);
if (!defined(cartographic)) {
throw new DeveloperError('cartographic is required');
}
//>>includeEnd('debug');

return '(' + cartographic.longitude + ', ' + cartographic.latitude + ', ' + cartographic.height + ')';
};

Expand Down
Loading

0 comments on commit 14fcce8

Please sign in to comment.