Socket
Book a DemoInstallSign in
Socket

camera-controls

Package Overview
Dependencies
Maintainers
2
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

camera-controls

A camera control for three.js, similar to THREE.OrbitControls yet supports smooth transitions and more features.

3.1.0
latest
Source
npmnpm
Version published
Weekly downloads
584K
4.52%
Maintainers
2
Weekly downloads
 
Created

What is camera-controls?

The camera-controls npm package provides a set of controls for manipulating a camera in a 3D scene, typically used with Three.js. It offers a variety of features to control the camera's position, rotation, and zoom, making it easier to navigate and interact with 3D environments.

What are camera-controls's main functionalities?

Orbit Controls

Orbit controls allow the camera to orbit around a target point. This is useful for inspecting objects from different angles.

const cameraControls = new CameraControls(camera, renderer.domElement);
cameraControls.update();
// To rotate the camera around a target
cameraControls.rotate(0.1, 0.1);

Dolly (Zoom) Controls

Dolly controls enable zooming in and out of the scene. This is useful for getting a closer look at objects or zooming out to see the entire scene.

const cameraControls = new CameraControls(camera, renderer.domElement);
cameraControls.update();
// To zoom in or out
cameraControls.dolly(0.5, true);

Pan Controls

Pan controls allow the camera to move horizontally and vertically. This is useful for navigating across a scene without changing the camera's orientation.

const cameraControls = new CameraControls(camera, renderer.domElement);
cameraControls.update();
// To pan the camera
cameraControls.truck(0.5, 0.5, true);

Smooth Transitions

Smooth transitions enable the camera to move smoothly from one position to another. This is useful for creating cinematic movements and improving user experience.

const cameraControls = new CameraControls(camera, renderer.domElement);
cameraControls.update();
// To smoothly transition to a new position
cameraControls.setLookAt(0, 0, 10, 0, 0, 0, true);

Other packages similar to camera-controls

Keywords

three

FAQs

Package last updated on 13 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.