Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/yomotsu/camera-controls
/ functions
Functions
111 in github.com/yomotsu/camera-controls
⨍
Functions
111
◇
Types & classes
15
↓ 30 callers
Function
approxEquals
( a: number, b: number, error: number = EPSILON )
src/utils/math-utils.ts:19
↓ 29 callers
Function
approxZero
( number: number, error: number = EPSILON )
src/utils/math-utils.ts:13
↓ 19 callers
Method
removeEventListener
* Removes the specified event listener * e.g. * ``` * cameraControl.addEventListener( 'controlstart', myCallbackFunction ); * ``` * @param t
src/CameraControls.ts:1530
↓ 12 callers
Method
addEventListener
* Adds the specified event listener. * Applicable event types (which is `K`) are: * | Event name | Timing | * | ------------------- | -
src/CameraControls.ts:1511
↓ 12 callers
Method
dispatchEvent
* Fire an event type. * @param event DispatcherEvent * @category Methods
src/EventDispatcher.ts:86
↓ 11 callers
Function
clamp
( value: number, min: number, max: number )
src/utils/math-utils.ts:7
↓ 8 callers
Method
_createOnRestPromise
( resolveImmediately: boolean )
src/CameraControls.ts:3331
↓ 8 callers
Function
isOrthographicCamera
( camera: _THREE.Camera )
src/types.ts:135
↓ 8 callers
Method
moveTo
* Move target position to given point. * @param x x coord to move center position * @param y y coord to move center position * @param z z coord
src/CameraControls.ts:1865
↓ 8 callers
Method
setFocalOffset
* Set focal offset using the screen parallel coordinates. z doesn't affect in Orthographic as with Dolly. * @param x * @param y * @param z * @
src/CameraControls.ts:2316
↓ 7 callers
Function
isPerspectiveCamera
( camera: _THREE.Camera )
src/types.ts:129
↓ 6 callers
Method
zoomTo
* Zoom in/out camera to given scale. The value overwrites camera zoom. * Limits set with .minZoom and .maxZoom * @param zoom * @param enableTran
src/CameraControls.ts:1770
↓ 5 callers
Method
dollyTo
* Dolly in/out camera position to given distance. * @param distance Distance of dolly. * @param enableTransition Whether to move smoothly or immed
src/CameraControls.ts:1682
↓ 5 callers
Function
infinityToMaxNumber
( value: number )
src/utils/math-utils.ts:31
↓ 5 callers
Function
maxNumberToInfinity
( value: number )
src/utils/math-utils.ts:41
↓ 5 callers
Method
rotateTo
* Rotate azimuthal angle(horizontal) and polar angle(vertical) to the given angle. * Camera view will rotate over the orbit pivot absolutely: *
src/CameraControls.ts:1637
↓ 4 callers
Method
_disposePointer
( pointer: PointerInput )
src/CameraControls.ts:3071
↓ 4 callers
Method
_dollyToNoClamp
( distance: number, enableTransition: boolean = false )
src/CameraControls.ts:1691
↓ 4 callers
Method
getPosition
* Returns the camera position. * @param out The receiving Vector3 instance to copy the result * @param receiveEndValue Whether receive the transit
src/CameraControls.ts:2478
↓ 4 callers
Function
smoothDamp
( current: number, target: number, currentVelocityRef: Ref, smoothTime: number, maxSpeed: number = Infini
src/utils/math-utils.ts:51
↓ 3 callers
Method
_findPointerById
( pointerId: number )
src/CameraControls.ts:3058
↓ 3 callers
Method
_getCameraDirection
( out: _THREE.Vector3 )
src/CameraControls.ts:3052
↓ 3 callers
Method
_getClientRect
* Get its client rect and package into given `DOMRect` .
src/CameraControls.ts:3304
↓ 3 callers
Method
_updateNearPlaneCorners
()
src/CameraControls.ts:3117
↓ 3 callers
Function
extractClientCoordFromEvent
( pointers: PointerInput[], out: _THREE.Vector2 )
src/utils/extractClientCoordFromEvent.ts:4
↓ 3 callers
Method
getBoundingClientRect
* @returns {DOMRect} The DOMRect.
examples/PseudoElement.js:25
↓ 3 callers
Method
lerp
* Interpolates between two states. * @param stateA * @param stateB * @param t * @param enableTransition * @category Methods
src/CameraControls.ts:2151
↓ 3 callers
Function
notSupportedInOrthographicCamera
( camera: _THREE.OrthographicCamera | _THREE.PerspectiveCamera, message: string )
src/utils/notSupportedInOrthographicCamera.ts:4
↓ 3 callers
Method
setLookAt
* Look at the `target` from the `position`. * @param positionX * @param positionY * @param positionZ * @param targetX * @param targetY * @
src/CameraControls.ts:2086
↓ 3 callers
Method
setPosition
* Set angle and distance by given position. * An alias of `setLookAt()`, without target change. Thus keep gazing at the current target * @param po
src/CameraControls.ts:2272
↓ 3 callers
Method
truck
* Truck and pedestal camera using current azimuthal angle * @param x Horizontal translate amount * @param y Vertical translate amount * @param e
src/CameraControls.ts:1807
↓ 3 callers
Method
update
* Updates the PseudoElement size based on a given bound. * @param {number} x The new bound x. * @param {number} y The new bound y. * @param {num
examples/PseudoElement.js:55
↓ 3 callers
Method
updateCameraUp
* Sync camera-up direction. * When camera-up vector is changed, `.updateCameraUp()` must be called. * @category Methods
src/CameraControls.ts:2596
↓ 2 callers
Method
_collisionTest
()
src/CameraControls.ts:3266
↓ 2 callers
Method
_encloseToBoundary
( position: _THREE.Vector3, offset: _THREE.Vector3, friction: number )
src/CameraControls.ts:3077
↓ 2 callers
Method
_getTargetDirection
( out: _THREE.Vector3 )
src/CameraControls.ts:3044
↓ 2 callers
Function
roundToStep
( value: number, step: number )
src/utils/math-utils.ts:25
↓ 2 callers
Function
smoothDampVec3
( current: _THREE.Vector3, target: _THREE.Vector3, currentVelocityRef: _THREE.Vector3, smoothTime: number,
src/utils/math-utils.ts:92
↓ 1 callers
Method
_addAllEventListeners
( _domElement: HTMLElement )
src/CameraControls.ts:3354
↓ 1 callers
Method
_findPointerByMouseButton
( mouseButton: MOUSE_BUTTON )
src/CameraControls.ts:3064
↓ 1 callers
Method
_removeAllEventListeners
()
src/CameraControls.ts:3356
↓ 1 callers
Method
connect
* Attach all internal event handlers to enable drag control. * @category Methods
src/CameraControls.ts:2998
↓ 1 callers
Method
createBoundingSphere
( object3d: _THREE.Object3D, out: _THREE.Sphere = new THREE.Sphere() )
src/CameraControls.ts:3404
↓ 1 callers
Method
disconnect
* Detach all internal event handlers to disable drag control.
src/CameraControls.ts:3016
↓ 1 callers
Method
dollyInFixed
* Dolly in, but does not change the distance between the target and the camera, and moves the target position instead. * Specify a negative value fo
src/CameraControls.ts:1732
↓ 1 callers
Method
exitPointerLock
* Exits pointer lock.
examples/PseudoElement.js:86
↓ 1 callers
Method
forward
* Move forward / backward. * @param distance Amount to move forward / backward. Negative value to move backward * @param enableTransition Whether
src/CameraControls.ts:1828
↓ 1 callers
Method
getDistanceToFitBox
* Calculate the distance to fit the box. * @param width box width * @param height box height * @param depth box depth * @returns distance *
src/CameraControls.ts:2428
↓ 1 callers
Method
getDistanceToFitSphere
* Calculate the distance to fit the sphere. * @param radius sphere radius * @returns distance * @category Methods
src/CameraControls.ts:2447
↓ 1 callers
Method
getTarget
* Returns the orbit center position, where the camera looking at. * @param out The receiving Vector3 instance to copy the result * @param receiveE
src/CameraControls.ts:2465
↓ 1 callers
Method
install
* Injects THREE as the dependency. You can then proceed to use CameraControls. * * e.g * ```javascript * CameraControls.install( { THREE: THRE
src/CameraControls.ts:106
↓ 1 callers
Method
normalizeRotations
* Normalize camera azimuth angle (horizontal rotation) between -180 and 180 degrees. * @returns This CameraControls instance. * @category Methods
src/CameraControls.ts:2516
↓ 1 callers
Method
removeAllEventListeners
* Removes all event listeners * @param type event name * @category Methods
src/EventDispatcher.ts:68
↓ 1 callers
Method
requestPointerLock
* Just for compatibility. doesn't work. * @returns {Promise<void>} A promise that rejects.
examples/PseudoElement.js:35
↓ 1 callers
Method
reset
* Reset all rotation and position to defaults. * @param enableTransition * @category Methods
src/CameraControls.ts:2543
↓ 1 callers
Method
rotate
* Rotate azimuthal angle(horizontal) and polar angle(vertical). * Every value is added to the current value. * @param azimuthAngle Azimuth rotate
src/CameraControls.ts:1547
↓ 1 callers
Method
setAttribute
* Just for compatibility. do nothing. * @param {string} _ The attribute name. * @param {string} __ The attribute value.
examples/PseudoElement.js:46
↓ 1 callers
Method
update
* Update camera position and directions. * This should be called in your tick loop every time, and returns true if re-rendering is needed. * @pa
src/CameraControls.ts:2633
Method
ACTION
* list all ACTIONs * @category Statics
src/CameraControls.ts:138
Method
active
* Returns `true` if the controls are active updating. * readonly value. * @category Properties
src/CameraControls.ts:1365
Method
addEventListener
* Adds the specified event listener. * @param type event name * @param listener handler function * @category Methods
src/EventDispatcher.ts:18
Method
applyCameraUp
* Apply current camera-up direction to the camera. * The orbit system will be re-initialized with the current position. * @category Methods
src/CameraControls.ts:2608
Method
azimuthAngle
* get/set the azimuth angle (horizontal) in radians. * Every 360 degrees turn is added to `.azimuthAngle` value, which is accumulative. * @categ
src/CameraControls.ts:1411
Method
boundaryEnclosesCamera
* Whether camera position should be enclosed in the boundary or not. * @category Properties
src/CameraControls.ts:1458
Method
camera
* The camera to be controlled * @category Properties
src/CameraControls.ts:1311
Method
constructor
* Creates a `CameraControls` instance. * * Note: * You **must install** three.js before using camera-controls. see [#install](#install) * Not
src/CameraControls.ts:463
Method
constructor
()
examples/PseudoElement.js:16
Method
constructor
* Creates an instance of PseudoDocument. * @param {PseudoElement} pseudoElement
examples/PseudoElement.js:76
Method
currentAction
* Getter for the current `ACTION`. * readonly value. * @category Properties
src/CameraControls.ts:1376
Method
dampingFactor
* backward compatible * @deprecated use smoothTime (in seconds) instead * @category Properties
src/CameraControls.ts:3363
Method
dispose
* Dispose the cameraControls instance itself, remove all eventListeners. * @category Methods
src/CameraControls.ts:3034
Method
distance
* get/set Current distance. * @category Properties
src/CameraControls.ts:1386
Method
dolly
* Dolly in/out camera position. * @param distance Distance of dollyIn. Negative number for dollyOut. * @param enableTransition Whether to move smo
src/CameraControls.ts:1670
Method
dragging
()
src/CameraControls.ts:1023
Method
draggingDampingFactor
* backward compatible * @deprecated use draggingSmoothTime (in seconds) instead * @category Properties
src/CameraControls.ts:3386
Method
elevate
* Move up / down. * @param height Amount to move up / down. Negative value to move down * @param enableTransition Whether to move smoothly or imme
src/CameraControls.ts:1845
Method
enabled
* Whether or not the controls are enabled. * `false` to disable user dragging/touch-move, but all methods works. * @category Properties
src/CameraControls.ts:1332
Method
endDragging
()
src/CameraControls.ts:1162
Method
fitToBox
* Fit the viewport to the box or the bounding box of the object, using the nearest axis. paddings are in unit. * set `cover: true` to fill enter scr
src/CameraControls.ts:1919
Method
fitToSphere
* Fit the viewport to the sphere or the bounding sphere of the object. * @param sphereOrMesh * @param enableTransition * @category Methods
src/CameraControls.ts:2039
Method
fromJSON
* Reproduce the control state with JSON. enableTransition is where anim or not in a boolean. * @param json * @param enableTransition * @category
src/CameraControls.ts:2958
Method
getFocalOffset
* Returns the focal offset, which is how much the camera appears to be translated in screen parallel coordinates. * @param out The receiving Vector3
src/CameraControls.ts:2504
Method
getSpherical
* Returns the spherical coordinates of the orbit. * @param out The receiving Spherical instance to copy the result * @param receiveEndValue Whethe
src/CameraControls.ts:2491
Method
hasEventListener
* Presence of the specified event listener. * @param type event name * @param listener handler function * @category Methods
src/EventDispatcher.ts:34
Method
interactiveArea
* Set drag-start, touches and wheel enable area in the domElement. * each values are between `0` and `1` inclusive, where `0` is left/top and `1`
src/CameraControls.ts:1477
Method
lerpLookAt
* Similar to setLookAt, but it interpolates between two states. * @param positionAX * @param positionAY * @param positionAZ * @param targetAX
src/CameraControls.ts:2238
Method
lookInDirectionOf
* Look in the given point direction. * @param x point x. * @param y point y. * @param z point z. * @param enableTransition Whether to move smo
src/CameraControls.ts:1897
Method
onContextMenu
( event: Event )
src/CameraControls.ts:840
Method
onMouseWheel
( event: WheelEvent )
src/CameraControls.ts:725
Method
onPointerDown
( event: PointerEvent )
src/CameraControls.ts:546
Method
onPointerLockChange
()
src/CameraControls.ts:1239
Method
onPointerLockError
()
src/CameraControls.ts:1246
Method
onPointerMove
( event: PointerEvent )
src/CameraControls.ts:613
Method
onPointerUp
( event: PointerEvent )
src/CameraControls.ts:679
Method
onResolve
()
src/CameraControls.ts:3340
Method
pan
* @deprecated `pan()` has been renamed to `truck()` * @category Methods
src/CameraControls.ts:1793
Method
pointerLockElement
* Just for compatibility. do nothing. * @returns {PseudoElement} The element locking the pointer.
examples/PseudoElement.js:92
Method
polarAngle
* get/set the polar angle (vertical) in radians. * @category Properties
src/CameraControls.ts:1435
Method
removeEventListener
* Removes the specified event listener * @param type event name * @param listener handler function * @category Methods
src/EventDispatcher.ts:48
Method
rotateAzimuthTo
* Rotate azimuthal angle(horizontal) to the given angle and keep the same polar angle(vertical) target. * * e.g. * ``` * cameraControls.rotate
src/CameraControls.ts:1568
next →
1–100 of 111, ranked by callers