Skip to content

Commit

Permalink
Point cloud layer example fix for the layer browser (visgl#490)
Browse files Browse the repository at this point in the history
* Comment out modelMatrix.rotateZ and modelMatrix.rotateX for the point cloud layer in the layer browser as we removed those controls in a previous commit

* address review comment
  • Loading branch information
Shaojing Li authored Mar 29, 2017
1 parent d6c3856 commit e8eafaf
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions examples/layer-browser/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,24 @@ class App extends PureComponent {
/* eslint-enable max-depth */

_getModelMatrix(index, offsetMode) {
const {settings: {separation, rotationZ, rotationX}} = this.state;
// the rotation controls works only for layers in
// meter offset projection mode. They are commented out
// here since layer browser currently only have one layer
// in this mode.

// const {settings: {separation, rotationZ, rotationX}} = this.state;
const {settings: {separation}} = this.state;
// const {mapViewState: {longitude, latitude}} = this.props;
// const modelMatrix = new Matrix4().fromTranslation([0, 0, 1000 * index * separation]);

const modelMatrix = new Matrix4()
.fromTranslation([0, 0, 1000 * index * separation]);
if (offsetMode) {
modelMatrix.rotateZ(index * rotationZ * Math.PI);
modelMatrix.rotateX(index * rotationX * Math.PI);
}

// if (offsetMode) {
// modelMatrix.rotateZ(index * rotationZ * Math.PI);
// modelMatrix.rotateX(index * rotationX * Math.PI);
// }

return modelMatrix;
}

Expand Down

0 comments on commit e8eafaf

Please sign in to comment.