Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated to 105, added rotation constraint modes, removed now unnecess…

…ary setActions

Added
// By default, the camera is in "free rotation" mode, but you can
// constrain it to any axis, around the look-at point:
camera.setYawRotationMode();   // like spinning a globe
camera.setPitchRotationMode(); // like a somersault
camera.setRollRotationMode();  // like a radio knob
camera.setSuppressRollRotationMode();  // Permit pitch/yaw only.

// Then you can set it back to its default mode:
camera.setFreeRotationMode();

Removed:
camera.setPanActive(boolean active);  //false to make the pan stop
responding to mouse
camera.setZoomActive(boolean active);  //false to make the zoom stop
responding to mouse
camera.setRotateActive(boolean active);  //false to make the rotate
stop responding to mouse
camera.isPanActive();
camera.isZoomActive();
camera.isRotateActive();
  • Loading branch information...
commit 11077a63b6330cafa1c05ccec7e86f4b6194d6a8 1 parent c893549
@jeffg2k authored
View
18 README.textile
@@ -26,15 +26,19 @@ PeasyCam(PApplet parent, double distance); // look at 0,0,0</pre>
h3. Methods
<pre>camera.setActive(boolean active); // false to make this camera stop responding to mouse
-camera.setPanActive(boolean active); //false to make the pan stop responding to mouse
-camera.setZoomActive(boolean active); //false to make the zoom stop responding to mouse
-camera.setRotateActive(boolean active); //false to make the rotate stop responding to mouse
// returns if camera will respond to mouse
camera.isActive();
-camera.isPanActive();
-camera.isZoomActive();
-camera.isRotateActive();
+
+// By default, the camera is in "free rotation" mode, but you can
+// constrain it to any axis, around the look-at point:
+camera.setYawRotationMode(); // like spinning a globe
+camera.setPitchRotationMode(); // like a somersault
+camera.setRollRotationMode(); // like a radio knob
+camera.setSuppressRollRotationMode(); // Permit pitch/yaw only.
+
+// Then you can set it back to its default mode:
+camera.setFreeRotationMode();
// reassign particular drag gestures, or set them to null
camera.setLeftDragHandler(PeasyDragHandler handler);
@@ -127,4 +131,4 @@ PeasyCam is impervious to gimbal lock, and has no known "singularities" or disco
h3. Contributors
-Thanks: "Michael Kaufmann":http://www.michael-kaufmann.ch/, "Oori Shalev":http://ooish.com/, Jeffrey Gentes, "A.W. Martin":http://imaginationfeed.com, "Yiannis Chatzikonstantinou":http://prototy.blogspot.com/, and "Donald Ephraim Curtis":http://milkbox.net/ for bug reports and feature suggestions.
+Thanks: "Gennaro Senatore":http://wiki.uelceca.net/msc0809/published/gennaro+senatore, "Michael Kaufmann":http://www.michael-kaufmann.ch/, "Oori Shalev":http://ooish.com/, Jeffrey Gentes, "A.W. Martin":http://imaginationfeed.com, "Yiannis Chatzikonstantinou":http://prototy.blogspot.com/, and "Donald Ephraim Curtis":http://milkbox.net/ for bug reports and feature suggestions.
View
2  library.properties
@@ -3,4 +3,4 @@ authorList = [Jonathan Feinberg](http://mrfeinberg.com/)
url = http://mrfeinberg.com/peasycam/
category = 3D
sentence = A mouse driven camera-control library for 3D sketches.
-version = 103.1+
+version = 105+
View
289 src/peasy/PeasyCam.java
@@ -41,7 +41,7 @@
private static final Vector3D UP = Vector3D.plusJ;
private static enum Constraint {
- X, Y
+ YAW, PITCH, ROLL, SUPPRESS_ROLL
}
private final PApplet p;
@@ -56,22 +56,20 @@
private boolean reversePan = false;
private boolean reverseZoom = false;
private boolean reverseRotate = false;
- private boolean panActive = true;
- private boolean zoomActive = true;
- private boolean rotateActive = true;
private Point mouseExit;
private double minimumDistance = 1;
private double maximumDistance = Double.MAX_VALUE;
private double maximumPanDistance = Double.MAX_VALUE;
- private final DampedAction rotateX, rotateY, rotateZ, dampedZoom,
- dampedPanX, dampedPanY;
+ private final DampedAction rotateX, rotateY, rotateZ, dampedZoom, dampedPanX,
+ dampedPanY;
private double distance;
private Vector3D center;
private Rotation rotation;
private Constraint dragConstraint = null;
+ private Constraint permaConstraint = null;
private final InterpolationManager rotationInterps = new InterpolationManager();
private final InterpolationManager centerInterps = new InterpolationManager();
@@ -79,51 +77,43 @@
private final PeasyDragHandler panHandler /* ha ha ha */= new PeasyDragHandler() {
public void handleDrag(double dx, double dy) {
- if (panActive) {
- if (reversePan) {
- dy = dy * -1;
- dx = dx * -1;
- }
- dampedPanX.impulse(panScale * dx / 8.);
- dampedPanY.impulse(panScale * dy / 8.);
+ if (reversePan) {
+ dy = dy * -1;
+ dx = dx * -1;
}
+ dampedPanX.impulse(panScale * dx / 8.);
+ dampedPanY.impulse(panScale * dy / 8.);
}
};
private PeasyDragHandler centerDragHandler = panHandler;
private final PeasyDragHandler rotateHandler = new PeasyDragHandler() {
public void handleDrag(double dx, double dy) {
- if (rotateActive) {
- if (reverseRotate) {
- dy = dy * -1;
- dx = dx * -1;
- }
- mouseRotate(dx, dy);
+ if (reverseRotate) {
+ dy = dy * -1;
+ dx = dx * -1;
}
+ mouseRotate(dx, dy);
}
};
private PeasyDragHandler leftDragHandler = rotateHandler;
private final PeasyDragHandler zoomHandler = new PeasyDragHandler() {
public void handleDrag(final double dx, double dy) {
- if (zoomActive) {
- if (reverseZoom) {
- dy = dy * -1;
- }
- dampedZoom.impulse(zoomScale * dy / 10.0);
+ if (reverseZoom) {
+ dy = dy * -1;
}
+ dampedZoom.impulse(zoomScale * dy / 10.0);
}
};
private PeasyDragHandler rightDraghandler = zoomHandler;
private final PeasyWheelHandler zoomWheelHandler = new PeasyWheelHandler() {
public void handleWheel(int delta) {
- if (zoomActive) {
- if (reverseZoom) {
- delta = delta * -1;
- }
- dampedZoom.impulse(zoomScale * wheelScale * delta);
+ if (reverseZoom) {
+ delta = delta * -1;
}
+ dampedZoom.impulse(zoomScale * wheelScale * delta);
}
};
private PeasyWheelHandler wheelHandler = zoomWheelHandler;
@@ -138,25 +128,25 @@ public void handleWheel(int delta) {
private final PMatrix3D originalMatrix; // for HUD restore
- public static final String VERSION = "103.1+";
+ public static final String VERSION = "105+";
public PeasyCam(final PApplet parent, final double distance) {
this(parent, 0, 0, 0, distance);
}
public void setcam() {
- p.camera((float) 70.0, (float) 35.0, (float) 120.0, (float) 0.0,
- (float) 0.0, (float) 0.0, (float) 0.0, (float) 1.0, (float) 0.0);
+ p.camera((float)70.0, (float)35.0, (float)120.0, (float)0.0, (float)0.0,
+ (float)0.0, (float)0.0, (float)1.0, (float)0.0);
}
- public PeasyCam(final PApplet parent, final double lookAtX,
- final double lookAtY, final double lookAtZ, final double distance) {
+ public PeasyCam(final PApplet parent, final double lookAtX, final double lookAtY,
+ final double lookAtZ, final double distance) {
this.p = parent;
- this.startCenter = this.panCenter = this.center = new Vector3D(lookAtX,
- lookAtY, lookAtZ);
+ this.startCenter = this.panCenter = this.center = new Vector3D(lookAtX, lookAtY,
+ lookAtZ);
this.startDistance = this.distance = distance;
this.rotation = new Rotation();
- this.originalMatrix = parent.getMatrix((PMatrix3D) null);
+ this.originalMatrix = parent.getMatrix((PMatrix3D)null);
andriod = System.getProperty("java.runtime.name").equalsIgnoreCase(
"android runtime");
@@ -169,24 +159,21 @@ public PeasyCam(final PApplet parent, final double lookAtX,
rotateX = new DampedAction(this) {
@Override
protected void behave(final double velocity) {
- rotation = rotation.applyTo(new Rotation(Vector3D.plusI,
- velocity));
+ rotation = rotation.applyTo(new Rotation(Vector3D.plusI, velocity));
}
};
rotateY = new DampedAction(this) {
@Override
protected void behave(final double velocity) {
- rotation = rotation.applyTo(new Rotation(Vector3D.plusJ,
- velocity));
+ rotation = rotation.applyTo(new Rotation(Vector3D.plusJ, velocity));
}
};
rotateZ = new DampedAction(this) {
@Override
protected void behave(final double velocity) {
- rotation = rotation.applyTo(new Rotation(Vector3D.plusK,
- velocity));
+ rotation = rotation.applyTo(new Rotation(Vector3D.plusK, velocity));
}
};
@@ -215,8 +202,7 @@ protected void behave(final double velocity) {
System.out.println("PeasyCam v" + VERSION);
}
- public void setDamping(final double rdamp, final double zdamp,
- final double pdamp) {
+ public void setDamping(final double rdamp, final double zdamp, final double pdamp) {
// default is .84,.84,.84
rotateX.setDamping(Math.min(1, Math.max(0, rdamp)));
rotateY.setDamping(Math.min(1, Math.max(0, rdamp)));
@@ -276,30 +262,6 @@ public boolean isActive() {
return isActive;
}
- public boolean isPanActive() {
- return isActive && panActive;
- }
-
- public boolean isZoomActive() {
- return isActive && zoomActive;
- }
-
- public boolean isRotateActive() {
- return isActive && rotateActive;
- }
-
- public void setPanActive(final boolean active) {
- panActive = active;
- }
-
- public void setRotateActive(final boolean active) {
- rotateActive = active;
- }
-
- public void setZoomActive(final boolean active) {
- zoomActive = active;
- }
-
public void setReverseZoom(final boolean reverse) {
reverseZoom = reverse;
}
@@ -438,8 +400,7 @@ public void mouseWheelMoved(final MouseWheelEvent e) {
protected class PeasyMouseListener {
public void keyEvent(final KeyEvent e) {
- if (e.getID() == KeyEvent.KEY_RELEASED
- && e.getKeyCode() == KeyEvent.VK_SHIFT) {
+ if (e.getID() == KeyEvent.KEY_RELEASED && e.getKeyCode() == KeyEvent.VK_SHIFT) {
dragConstraint = null;
}
}
@@ -457,9 +418,11 @@ public void mouseEvent(final MouseEvent e) {
if (e.isShiftDown()) {
if (dragConstraint == null && Math.abs(dx - dy) > 1) {
- dragConstraint = Math.abs(dx) > Math.abs(dy) ? Constraint.X
- : Constraint.Y;
+ dragConstraint = Math.abs(dx) > Math.abs(dy) ? Constraint.YAW
+ : Constraint.PITCH;
}
+ } else if (permaConstraint != null) {
+ dragConstraint = permaConstraint;
} else {
dragConstraint = null;
}
@@ -490,37 +453,45 @@ private void mouseZoom(final double delta) {
private void mousePan(final double dxMouse, final double dyMouse) {
final double panScale = Math.sqrt(distance * .005);
- pan(dragConstraint == Constraint.Y ? 0 : -dxMouse * panScale,
- dragConstraint == Constraint.X ? 0 : -dyMouse * panScale);
+ pan(dragConstraint == Constraint.PITCH ? 0 : -dxMouse * panScale,
+ dragConstraint == Constraint.YAW ? 0 : -dyMouse * panScale);
}
private void mouseRotate(final double dx, final double dy) {
- final Vector3D u = LOOK.scalarMultiply(100 + .6 * startDistance)
- .negate();
- if (dragConstraint != Constraint.X) {
- final double rho = Math.abs((p.width / 2d) - p.mouseX)
- / (p.width / 2d);
- final double adz = Math.abs(dy) * rho;
- final double ady = Math.abs(dy) * (1 - rho);
- final int ySign = dy < 0 ? -1 : 1;
- final Vector3D vy = u.add(new Vector3D(0, ady, 0));
- rotateX.impulse(Vector3D.angle(u, vy) * ySign * rotateScale);
- final Vector3D vz = u.add(new Vector3D(0, adz, 0));
- rotateZ.impulse(Vector3D.angle(u, vz) * -ySign
- * (p.mouseX < p.width / 2 ? -1 : 1) * rotateScale);
- }
+ final Vector3D u = LOOK.scalarMultiply(100 + .6 * startDistance).negate();
- if (dragConstraint != Constraint.Y) {
- final double eccentricity = Math.abs((p.height / 2d) - p.mouseY)
- / (p.height / 2d);
- final int xSign = dx > 0 ? -1 : 1;
- final double adz = Math.abs(dx) * eccentricity;
+ final int xSign = dx > 0 ? -1 : 1;
+ final int ySign = dy < 0 ? -1 : 1;
+
+ final double eccentricity = Math.abs((p.height / 2d) - p.mouseY)
+ / (p.height / 2d);
+ final double rho = Math.abs((p.width / 2d) - p.mouseX) / (p.width / 2d);
+
+ if (dragConstraint == null || dragConstraint == Constraint.YAW
+ || dragConstraint == Constraint.SUPPRESS_ROLL) {
final double adx = Math.abs(dx) * (1 - eccentricity);
final Vector3D vx = u.add(new Vector3D(adx, 0, 0));
- rotateY.impulse(Vector3D.angle(u, vx) * xSign * rotateScale);
- final Vector3D vz = u.add(new Vector3D(0, adz, 0));
- rotateZ.impulse(Vector3D.angle(u, vz) * xSign
- * (p.mouseY > p.height / 2 ? -1 : 1) * rotateScale);
+ rotateY.impulse(Vector3D.angle(u, vx) * xSign);
+ }
+ if (dragConstraint == null || dragConstraint == Constraint.PITCH
+ || dragConstraint == Constraint.SUPPRESS_ROLL) {
+ final double ady = Math.abs(dy) * (1 - rho);
+ final Vector3D vy = u.add(new Vector3D(0, ady, 0));
+ rotateX.impulse(Vector3D.angle(u, vy) * ySign);
+ }
+ if (dragConstraint == null || dragConstraint == Constraint.ROLL) {
+ {
+ final double adz = Math.abs(dy) * rho;
+ final Vector3D vz = u.add(new Vector3D(0, adz, 0));
+ rotateZ.impulse(Vector3D.angle(u, vz) * -ySign
+ * (p.mouseX < p.width / 2 ? -1 : 1));
+ }
+ {
+ final double adz = Math.abs(dx) * eccentricity;
+ final Vector3D vz = u.add(new Vector3D(0, adz, 0));
+ rotateZ.impulse(Vector3D.angle(u, vz) * xSign
+ * (p.mouseY > p.height / 2 ? -1 : 1));
+ }
}
}
@@ -532,20 +503,18 @@ public void setDistance(final double newDistance) {
setDistance(newDistance, 300);
}
- public void setDistance(final double newDistance,
- final long animationTimeMillis) {
+ public void setDistance(final double newDistance, final long animationTimeMillis) {
distanceInterps.startInterpolation(new DistanceInterp(newDistance,
animationTimeMillis));
}
public float[] getLookAt() {
- return new float[] { (float) center.getX(), (float) center.getY(),
- (float) center.getZ() };
+ return new float[] { (float)center.getX(), (float)center.getY(),
+ (float)center.getZ() };
}
public void lookAt(final double x, final double y, final double z) {
- centerInterps.startInterpolation(new CenterInterp(
- new Vector3D(x, y, z), 300));
+ centerInterps.startInterpolation(new CenterInterp(new Vector3D(x, y, z), 300));
this.panCenter = new Vector3D(x, y, z);
}
@@ -594,8 +563,7 @@ public void lookThrough(final double x, final double y, final double z,
CVZ = CVZ.normalize();
final Vector3D PV = new Vector3D(Vector3D.dotProduct(CVX, CamVector),
- Vector3D.dotProduct(CVY, CamVector), Vector3D.dotProduct(CVZ,
- CamVector));
+ Vector3D.dotProduct(CVY, CamVector), Vector3D.dotProduct(CVZ, CamVector));
final double pitch = Math.atan2(CamVector.getZ(), CamVector.getY())
- (Math.PI * .5);
@@ -608,8 +576,7 @@ public void lookThrough(final double x, final double y, final double z,
private void safeSetDistance(final double distance) {
- this.distance = Math.min(maximumDistance,
- Math.max(minimumDistance, distance));
+ this.distance = Math.min(maximumDistance, Math.max(minimumDistance, distance));
feed();
}
@@ -623,28 +590,22 @@ private Vector3D safePanDistance(final Vector3D newcenter) {
}
public void feed() {
- final Vector3D pos = rotation.applyTo(LOOK).scalarMultiply(distance)
- .add(center);
+ final Vector3D pos = rotation.applyTo(LOOK).scalarMultiply(distance).add(center);
final Vector3D rup = rotation.applyTo(UP);
- p.camera((float) pos.getX(), (float) pos.getY(),
- (float) pos.getZ(), //
- (float) center.getX(), (float) center.getY(),
- (float) center.getZ(), //
- (float) rup.getX(), (float) rup.getY(), (float) rup.getZ());
+ p.camera((float)pos.getX(), (float)pos.getY(), (float)pos.getZ(), //
+ (float)center.getX(), (float)center.getY(), (float)center.getZ(), //
+ (float)rup.getX(), (float)rup.getY(), (float)rup.getZ());
}
public static void apply(final PGraphics g, final Vector3D center,
final Rotation rotation, final double distance) {
- final Vector3D pos = rotation.applyTo(LOOK).scalarMultiply(distance)
- .add(center);
+ final Vector3D pos = rotation.applyTo(LOOK).scalarMultiply(distance).add(center);
final Vector3D rup = rotation.applyTo(UP);
- g.camera((float) pos.getX(), (float) pos.getY(),
- (float) pos.getZ(), //
- (float) center.getX(), (float) center.getY(),
- (float) center.getZ(), //
- (float) rup.getX(), (float) rup.getY(), (float) rup.getZ());
+ g.camera((float)pos.getX(), (float)pos.getY(), (float)pos.getZ(), //
+ (float)center.getX(), (float)center.getY(), (float)center.getZ(), //
+ (float)rup.getX(), (float)rup.getY(), (float)rup.getZ());
}
/**
@@ -653,10 +614,8 @@ public static void apply(final PGraphics g, final Vector3D center,
* @return float[]{x,y,z}
*/
public float[] getPosition() {
- final Vector3D pos = rotation.applyTo(LOOK).scalarMultiply(distance)
- .add(center);
- return new float[] { (float) pos.getX(), (float) pos.getY(),
- (float) pos.getZ() };
+ final Vector3D pos = rotation.applyTo(LOOK).scalarMultiply(distance).add(center);
+ return new float[] { (float)pos.getX(), (float)pos.getY(), (float)pos.getZ() };
}
public void reset() {
@@ -669,8 +628,7 @@ public void reset(final long animationTimeInMillis) {
}
public void pan(final double dx, final double dy) {
- center = safePanDistance(center.add(rotation.applyTo(new Vector3D(dx,
- dy, 0))));
+ center = safePanDistance(center.add(rotation.applyTo(new Vector3D(dx, dy, 0))));
feed();
}
@@ -697,6 +655,41 @@ public CameraState getState() {
return new CameraState(rotation, center, distance);
}
+ /**
+ * Permit arbitrary rotation. (Default mode.)
+ */
+ public void setFreeRotationMode() {
+ permaConstraint = null;
+ }
+
+ /**
+ * Only permit yaw.
+ */
+ public void setYawRotationMode() {
+ permaConstraint = Constraint.YAW;
+ }
+
+ /**
+ * Only permit pitch.
+ */
+ public void setPitchRotationMode() {
+ permaConstraint = Constraint.PITCH;
+ }
+
+ /**
+ * Only permit roll.
+ */
+ public void setRollRotationMode() {
+ permaConstraint = Constraint.ROLL;
+ }
+
+ /**
+ * Only suppress roll.
+ */
+ public void setSuppressRollRotationMode() {
+ permaConstraint = Constraint.SUPPRESS_ROLL;
+ }
+
public double getMinimumDistance() {
return minimumDistance;
}
@@ -737,10 +730,9 @@ public void setPanOnScreenEdge(final boolean panOnScreenEdge) {
}
public double getVelocity() {
- final double[] maxvelocity = { rotateX.getVelocity(),
- rotateY.getVelocity(), rotateZ.getVelocity(),
- dampedZoom.getVelocity(), dampedPanX.getVelocity(),
- dampedPanY.getVelocity() };
+ final double[] maxvelocity = { rotateX.getVelocity(), rotateY.getVelocity(),
+ rotateZ.getVelocity(), dampedZoom.getVelocity(),
+ dampedPanX.getVelocity(), dampedPanY.getVelocity() };
double max = maxvelocity[0];
for (int i = 1; i < maxvelocity.length; ++i) {
@@ -754,9 +746,9 @@ public double getVelocity() {
public boolean isMoving() {
if (rotateX.getVelocity() == 0 && rotateY.getVelocity() == 0
&& rotateZ.getVelocity() == 0 && dampedZoom.getVelocity() == 0
- && dampedPanX.getVelocity() == 0
- && dampedPanY.getVelocity() == 0 && distanceInterps.isStopped()
- && centerInterps.isStopped() && rotationInterps.isStopped()) {
+ && dampedPanX.getVelocity() == 0 && dampedPanY.getVelocity() == 0
+ && distanceInterps.isStopped() && centerInterps.isStopped()
+ && rotationInterps.isStopped()) {
return false;
}
@@ -769,12 +761,12 @@ public void setState(final CameraState state) {
public void setState(final CameraState state, final long animationTimeMillis) {
if (animationTimeMillis > 0) {
- rotationInterps.startInterpolation(new RotationInterp(
- state.rotation, animationTimeMillis));
+ rotationInterps.startInterpolation(new RotationInterp(state.rotation,
+ animationTimeMillis));
centerInterps.startInterpolation(new CenterInterp(state.center,
animationTimeMillis));
- distanceInterps.startInterpolation(new DistanceInterp(
- state.distance, animationTimeMillis));
+ distanceInterps.startInterpolation(new DistanceInterp(state.distance,
+ animationTimeMillis));
} else {
this.rotation = state.rotation;
this.center = state.center;
@@ -783,13 +775,12 @@ public void setState(final CameraState state, final long animationTimeMillis) {
feed();
}
- public void setRotations(final double pitch, final double yaw,
- final double roll) {
+ public void setRotations(final double pitch, final double yaw, final double roll) {
setRotations(pitch, yaw, roll, 0);
}
- public void setRotations(final double pitch, final double yaw,
- final double roll, final long animationTimeMillis) {
+ public void setRotations(final double pitch, final double yaw, final double roll,
+ final long animationTimeMillis) {
rotationInterps.cancelInterpolation();
if (animationTimeMillis > 0) {
rotationInterps.startInterpolation(new RotationInterp(new Rotation(
@@ -816,20 +807,17 @@ public void setRotations(final double pitch, final double yaw,
public float[] getRotations() {
try {
final double[] angles = rotation.getAngles(RotationOrder.XYZ);
- return new float[] { (float) angles[0], (float) angles[1],
- (float) angles[2] };
+ return new float[] { (float)angles[0], (float)angles[1], (float)angles[2] };
} catch (final CardanEulerSingularityException e) {
}
try {
final double[] angles = rotation.getAngles(RotationOrder.YXZ);
- return new float[] { (float) angles[1], (float) angles[0],
- (float) angles[2] };
+ return new float[] { (float)angles[1], (float)angles[0], (float)angles[2] };
} catch (final CardanEulerSingularityException e) {
}
try {
final double[] angles = rotation.getAngles(RotationOrder.ZXY);
- return new float[] { (float) angles[2], (float) angles[0],
- (float) angles[1] };
+ return new float[] { (float)angles[2], (float)angles[0], (float)angles[1] };
} catch (final CardanEulerSingularityException e) {
}
return new float[] { 0, 0, 0 };
@@ -950,8 +938,7 @@ protected void setEndState() {
final Rotation startRotation = rotation;
final Rotation endRotation;
- public RotationInterp(final Rotation endRotation,
- final long timeInMillis) {
+ public RotationInterp(final Rotation endRotation, final long timeInMillis) {
super(timeInMillis);
this.endRotation = endRotation;
}
View
19 web/index.html
@@ -26,7 +26,7 @@
<div id="menu" class="clear">
<ul>
<li><a href="#about">About</a> \ </li>
- <li><a href="#download">Download</a> \ </li>
+ <li><a href="##yourLibrary##_##versionNumber##.zip">Download</a> \ </li>
<li><a href="#download">Installation</a> \ </li>
<!-- <li><a href="#examples">Examples</a> \ </li>-->
<li><a href="#demos">Demo</a> \ </li>
@@ -178,6 +178,7 @@
<li><a href="http://imaginationfeed.com">A.W. Martin</a></li>
<li><a href="http://prototy.blogspot.com/">Yiannis Chatzikonstantinou</a></li>
<li><a href="http://milkbox.net/">Donald Ephraim Curtis</a></li>
+<li><a href="http://wiki.uelceca.net/msc0809/published/gennaro+senatore">Gennaro Senatore</a></li>
</ul>
<p>Please let me know if I've forgotten to acknowledge you.</p>
@@ -201,15 +202,19 @@
<h3>Methods</h3>
<pre class="prettyprint">camera.setActive(boolean active); // false to make this camera stop responding to mouse
-camera.setPanActive(boolean active); //false to make the pan stop responding to mouse
-camera.setZoomActive(boolean active); //false to make the zoom stop responding to mouse
-camera.setRotateActive(boolean active); //false to make the rotate stop responding to mouse
+
+// By default, the camera is in "free rotation" mode, but you can
+// constrain it to any axis, around the look-at point:
+camera.setYawRotationMode(); // like spinning a globe
+camera.setPitchRotationMode(); // like a somersault
+camera.setRollRotationMode(); // like a radio knob
+camera.setSuppressRollRotationMode(); // Permit pitch/yaw only.
+
+// Then you can set it back to its default mode:
+camera.setFreeRotationMode();
// returns if camera will respond to mouse
camera.isActive();
-camera.isPanActive();
-camera.isZoomActive();
-camera.isRotateActive();
// reassign particular drag gestures, or set them to null
camera.setLeftDragHandler(PeasyDragHandler handler);
View
3  web/stylesheet.css
@@ -10,8 +10,7 @@
body {
font-family : Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size : 100%;
- font-size : 0.70em;
+ font-size : 100%;
font-weight : normal;
line-height : normal;
}
Please sign in to comment.
Something went wrong with that request. Please try again.