Skip to content

Commit

Permalink
fix: Updated camera manager helper test
Browse files Browse the repository at this point in the history
Updated API documentaiton
  • Loading branch information
hugolafis committed Jun 26, 2023
1 parent 242f0c1 commit a530058
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe(CameraManagerHelper.name, () => {
// creates rotation around Y axis of 180 degrees.
const rotation = new THREE.Quaternion().setFromAxisAngle(new THREE.Vector3(0, 1, 0), Math.PI);

const newTarget = CameraManagerHelper.calculateNewTargetFromRotation(camera, rotation, target);
const newTarget = CameraManagerHelper.calculateNewTargetFromRotation(camera, rotation, target, camera.position);

expect(newTarget.x).toBeCloseTo(target.x);
expect(newTarget.y).toBeCloseTo(target.y);
Expand Down
2 changes: 1 addition & 1 deletion viewer/reveal.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export class CameraManagerHelper {
target: THREE_2.Vector3;
};
static calculateNewRotationFromTarget(camera: THREE_2.PerspectiveCamera, newTarget: THREE_2.Vector3): THREE_2.Quaternion;
static calculateNewTargetFromRotation(camera: THREE_2.PerspectiveCamera, rotation: THREE_2.Quaternion, currentTarget: THREE_2.Vector3): THREE_2.Vector3;
static calculateNewTargetFromRotation(camera: THREE_2.PerspectiveCamera, rotation: THREE_2.Quaternion, currentTarget: THREE_2.Vector3, position: THREE_2.Vector3): THREE_2.Vector3;
static updateCameraNearAndFar(camera: THREE_2.PerspectiveCamera, combinedBbox: THREE_2.Box3): void;
}

Expand Down

0 comments on commit a530058

Please sign in to comment.