-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BoxOutlineGeometry and BoxGeometry Cleanup #3073
Conversation
Thanks @ggetz.
|
* }); | ||
* var geometry = Cesium.BoxGeometry.createGeometry(box); | ||
*/ | ||
BoxGeometry.fromAxisAlignedBoundingBox = function(options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't need to take options
. It can just take the bounding box object directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention this function and BoxOutlineGeometry.fromAxisAlignedBoundingBox
in CHANGES.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For more info on opening a complete pull request, see CONTRIBUTING.md.
Ready for another look |
I also did a search on the project and found no other references to |
* Decreased GPU memory usage in `BillboardCollection` and `LabelCollection` by using the WebGL ANGLE_instanced_arrays extension. | ||
* Added CZML examples to Sandcastle. See the new CZML tab. | ||
* Fixed token issue in ArcGisMapServerImageryProvider. | ||
* `ImageryLayerFeatureInfo` now has an `imageryLayer` property, indicating the layer that contains the feature. | ||
* Added `BoxOutlineGeometry.fromAxisAlignedBoundingBox` and `BoxGeometry.fromAxisAlignedBoundingBox` functtions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"functtions" -> "functions."
@ggetz can you give me commit access to your repo to help us collaborate on pull requests? |
@@ -34,6 +36,8 @@ define([ | |||
* @constructor | |||
* | |||
* @param {Object} options Object with the following properties: | |||
* @param {Cartesian3} options.minimum The minimum x, y, and z coordinates of the box. | |||
* @param {Cartesian3} options.maximum The maximum x, y, and z coordinates of the box. | |||
* @param {Cartesian3} options.minimumCorner The minimum x, y, and z coordinates of the box. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the doc for minimumCorner
and maximumCorner
(since we don't want users to use them). Same comment for BoxOutlineGeometry
.
throw new DeveloperError('boundingBox is required.'); | ||
} | ||
|
||
var min = boundingBox.minimum; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we only use them in one place, there's no need to declare these locals. Let's keep it concise:
return new BoxGeometry({
minimum : boundingBox.minimum,
maximum : boundingBox.maximum
});
@ggetz thanks for the updates. Any comment I made about |
@pjcozzi I made the changes you suggested |
@@ -1,28 +1,29 @@ | |||
/*global define*/ | |||
define([ | |||
'./BoundingSphere', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure WebStorm is inserting spaces for tabs. We did not need to change the formatting here. We just wanted to add a reference for deprecationWarning
.
…into boxOutlineGeometry-cleanup # Conflicts: # Source/Core/BoxGeometry.js # Source/Core/BoxOutlineGeometry.js
…into boxOutlineGeometry-cleanup # Conflicts: # Source/Core/BoxGeometry.js
@pjcozzi I think I've fixed the formatting changes. |
* ]) | ||
* }, | ||
* extrudedHeight: 300000 | ||
* ]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the branches got mixed up, and this reverts your previous fix. Can you please update this?
…into boxOutlineGeometry-cleanup
@pjcozzi All the tests are now working and I merged the conflicting changes. |
@@ -6,6 +6,8 @@ Change Log | |||
* Breaking changes | |||
* Deleted old `<subfolder>/package.json` and `*.profile.js` files, not used since we moved away from a Dojo-based build years ago. This should allow future compatibility with newer systems like Browserify and Webpack. | |||
* Deprecated | |||
* Depreciated `BoxGeometry.minimumCorner` and `BoxGeometry.maximumCorner`, use `BoxGeometry.minimum` and `BoxGeometry.maximum` instead. These will be removed in 1.17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be Deprecated
not Depreciated
Tests are good. |
@ggetz congrats on another merged pull request! |
BoxOutlineGeometry and BoxGeometry Cleanup
@pjcozzi thanks! |
#3073 introduced a bug where the deprecated behavior did not work in release mode. Any code that handles deprecated behavior must be outside of pragma statements or else it won't be part of the minified release.
Fixes #2260.
Changed
minimumCorner
andmaximumCorner
properties to justminimum
andmaximum
.Added
fromAxisAlignedBoundingBox
function.