Skip to content

Commit

Permalink
Feature : added new PlanarControls (#454)
Browse files Browse the repository at this point in the history
* Feature : added new PlanarControls

PlanarControls offers ergonomic camera controls for the planar mode : drag, pan, orbit,
zoom and animated expression to smoothly move and orient the camera.

Modified planar example to use these controls
Update contributors
  • Loading branch information
EmmanuelSchmuck authored and autra committed Aug 30, 2017
1 parent eb27dc4 commit 92f404d
Show file tree
Hide file tree
Showing 5 changed files with 753 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ The following people have contributed to iTowns 2.

* [AtolCD](http://www.atolcd.com)
* [Thomas Broyer](https://github.com/tbroyer)

* [LIRIS](https://liris.cnrs.fr/)
* [Nicolas Saul](https://github.com/NikoSaul)
* [Emmanuel Schmück](https://github.com/EmmanuelSchmuck/)
* [Marie Lamure](https://github.com/mlamure)

The following organizations supported iTowns2 :
* IGN ( http://www.ign.fr )
Expand Down
11 changes: 7 additions & 4 deletions examples/planar.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,13 @@
<div id="help">
<p>Key bindings</p>
<ul>
<li>↑ ↓ : forward / backward</li>
<li>← → : strafe left / right</li>
<li>⇞ (PageUp), ⇟ (PageDown) : move up / down</li>
<li>mouse Clic + drag : camera rotation</li>
<li>Left-Click: camera translation (drag)</li>
<li>Right-Click: camera translation (pan)</li>
<li>Ctrl + Left-Click: camera rotation (orbit)</li>
<li>Spacebar / Wheel-Click: smart zoom</li>
<li>Mouse Wheel: zoom in/out</li>
<li>T: orient camera to a top view</li>
<li>Y: move camera to start position</li>
</ul>
</div>
<div id="viewerDiv"></div>
Expand Down
2 changes: 1 addition & 1 deletion examples/planar.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ view.camera.camera3D.lookAt(extent.center().xyz());

// instanciate controls
// eslint-disable-next-line no-new
new itowns.FirstPersonControls(view, { focusOnClick: true, moveSpeed: 1000 });
new itowns.PlanarControls(view, {});

// Request redraw
view.notifyChange(true);
Expand Down
1 change: 1 addition & 0 deletions src/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export { default as PointsMaterial } from './Renderer/PointsMaterial';
export { default as PointCloudProcessing } from './Process/PointCloudProcessing';
export { default as FlyControls } from './Renderer/ThreeExtended/FlyControls';
export { default as FirstPersonControls } from './Renderer/ThreeExtended/FirstPersonControls';
export { default as PlanarControls } from './Renderer/ThreeExtended/PlanarControls';
export { default as GeoJSON2Three } from './Renderer/ThreeExtended/GeoJSON2Three';
export { CONTROL_EVENTS } from './Renderer/ThreeExtended/GlobeControls';
export { default as DEMUtils } from './utils/DEMUtils';
Loading

0 comments on commit 92f404d

Please sign in to comment.