Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Trackball controls allowing you to move only one object of your scene instead of camera. Based on Three.js Trackball Controls

Notifications You must be signed in to change notification settings

vdaguenet/ObjectTrackballControls.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Object Trackball Controls

Custom version of Three.js TrackballControls.js made by Eberhard Graether and Mark Lundin

It allows you to move only one object of your scene and zoom/pan with the camera

Usage

controls = new THREE.ObjectTrackballControls( object, camera, domElement );

See example to usage precisions.

API

  • enabled: Enable controls. Default is true.
  • moveCamera: Moe camera instead of object (equivalent as using classic TrackballControls). Default is false.
  • rotateSpeed: Rotation speed factor.
  • zoomSpeed: Zoom speed factor.
  • panSpeed: Pan speed factor.
  • noRotate: Disable rotation. Default is false.
  • noZoom: Disable camera zoom. Default is false.
  • noPan: Disable camera paning. Default is false.
  • noRoll: Disable rolling effect. Default is false.
  • staticMoving: Disable inertia effect. Default is false.
  • dynamicCameraDampingFactor: Factor of camera inertia. Used when moveCamera is set to true
  • dynamicObjectDampingFactor: Factor of object inertia. Used when moveCamera is set to false
  • minDistance: Minimal distance the camera can reach while zoom.
  • maxDistance: Maximal distance the camera can reach while zoom.

About

Trackball controls allowing you to move only one object of your scene instead of camera. Based on Three.js Trackball Controls

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published