Skip to content

Commit

Permalink
Merge pull request #1296 from AnalyticalGraphicsInc/preprocess
Browse files Browse the repository at this point in the history
Pre-process Build
  • Loading branch information
shunter committed Dec 18, 2013
2 parents 5e69628 + 79903c0 commit 2bd4f29
Show file tree
Hide file tree
Showing 44 changed files with 1,307 additions and 565 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Beta Releases
* Breaking changes:
* Added `allowTextureFilterAnisotropic` (default: `true`) and `failIfMajorPerformanceCaveat` (default: `true`) properties to the `contextOption` property passed to `Viewer`, `CesiumWidget`, and `Scene` constructors and moved the existing properties to a new `webgl` sub-property. For example, code that looked like:

var viewer = new Viewer('cesiumContainer', {
var viewer = new Viewer('cesiumContainer', {
alpha : true
});

Expand All @@ -23,6 +23,7 @@ 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`.
* 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.
* 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.
Expand Down
18 changes: 18 additions & 0 deletions Source/Core/BoundingSphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,11 @@ define([

stride = defaultValue(stride, 3);

//>>includeStart('debug', pragmas.debug);
if (stride < 3) {
throw new DeveloperError('stride must be 3 or greater.');
}
//>>includeEnd('debug');

var currentPos = fromPointsCurrentPos;
currentPos.x = positions[0] + center.x;
Expand Down Expand Up @@ -506,9 +508,11 @@ define([
* var sphere = BoundingSphere.fromCornerPoints(new Cartesian3(-0.5, -0.5, -0.5), new Cartesian3(0.5, 0.5, 0.5));
*/
BoundingSphere.fromCornerPoints = function(corner, oppositeCorner, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(corner) || !defined(oppositeCorner)) {
throw new DeveloperError('corner and oppositeCorner are required.');
}
//>>includeEnd('debug');

if (!defined(result)) {
result = new BoundingSphere();
Expand Down Expand Up @@ -537,9 +541,11 @@ define([
* var boundingSphere = BoundingSphere.fromEllipsoid(ellipsoid);
*/
BoundingSphere.fromEllipsoid = function(ellipsoid, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(ellipsoid)) {
throw new DeveloperError('ellipsoid is required.');
}
//>>includeEnd('debug');

if (!defined(result)) {
result = new BoundingSphere();
Expand Down Expand Up @@ -587,13 +593,15 @@ define([
* @exception {DeveloperError} right is required.
*/
BoundingSphere.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 BoundingSphere();
Expand Down Expand Up @@ -628,13 +636,15 @@ define([
* @exception {DeveloperError} point is required.
*/
BoundingSphere.expand = function(sphere, point, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

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

result = BoundingSphere.clone(sphere, result);

Expand Down Expand Up @@ -662,13 +672,15 @@ define([
* @exception {DeveloperError} plane is required.
*/
BoundingSphere.intersect = function(sphere, plane) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

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

var center = sphere.center;
var radius = sphere.radius;
Expand Down Expand Up @@ -699,13 +711,15 @@ define([
* @exception {DeveloperError} transform is required.
*/
BoundingSphere.transform = function(sphere, transform, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}

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

if (!defined(result)) {
result = new BoundingSphere();
Expand Down Expand Up @@ -741,6 +755,7 @@ define([
* @exception {DeveloperError} direction is required.
*/
BoundingSphere.getPlaneDistances = function(sphere, position, direction, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}
Expand All @@ -752,6 +767,7 @@ define([
if (!defined(direction)) {
throw new DeveloperError('direction is required.');
}
//>>includeEnd('debug');

if (!defined(result)) {
result = new Interval();
Expand Down Expand Up @@ -789,9 +805,11 @@ define([
* @exception {DeveloperError} sphere is required.
*/
BoundingSphere.projectTo2D = function(sphere, projection, result) {
//>>includeStart('debug', pragmas.debug);
if (!defined(sphere)) {
throw new DeveloperError('sphere is required.');
}
//>>includeEnd('debug');

projection = defaultValue(projection, projectTo2DProjection);

Expand Down
Loading

0 comments on commit 2bd4f29

Please sign in to comment.