Skip to content

Latest commit

 

History

History
79 lines (68 loc) · 8.8 KB

three-story-controls.md

File metadata and controls

79 lines (68 loc) · 8.8 KB

Home > three-story-controls

three-story-controls package

Classes

Class Description
BaseAdaptor
CameraHelper A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene
CameraRig The CameraRig holds the camera, and can respond to CameraActions such as Pan/Tilt/Dolly etc. It can also be controlled along a given path (in the form of an AnimationClip), or tweened to specified points.
Damper Damper uses simple linear damping for a given collection of values. On every call to update, the damper will approach a given set of target values.
FreeMovementControls Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.
KeyboardAdaptor Parse keyboard events and emit either dampened values for continuous keypresses, or trigger events named according to a provided keymapping.
PathPointsControls Control scheme to transition the camera between specific points (frames) along a path specified through an AnimationClip.
PointerAdaptor Parse pointer events to emit dampened, normalized coordinates along with the pointer count (for detecting multi-touch or drag events)
ScrollAdaptor Emits normalized values for the amount a given DOM element has been scrolled through.
ScrollControls Control scheme to scrub through the CameraRig's AnimationClip based on the scroll of a DOM Element
StoryPointsControls Control scheme to transition the camera between given points in world space.
SwipeAdaptor Emits events in response to swipe gestures above a given threshold.
ThreeDOFControls Control scheme for slight rotation and translation movement in response to mouse movements (designed to be used in conjunction with other control schemes)
WheelAdaptor Parse mouse wheel events and emit either dampened values, or trigger events for swipes that cross a given threshold.

Enumerations

Enumeration Description
Axis Enum of axes
CameraAction Enum of camera actions used to control a CameraRig
RigComponent Enum of CameraRig parts

Interfaces

Interface Description
ActionAxes Mapping of rotation action to axis
BaseControls
CameraMoveEndEvent Event: Fired when CameraRig ends a transition
CameraMoveStartEvent Event: Fired when CameraRig starts a transition
CameraMoveUpdateEvent Event: Fired on every tick of CameraRig's transition
ContinuousEvent
DamperProps
DamperValues
DiscreteEvent
ExitPOIsEvent Event: Fired when attempting to go the the next/previous point of interest, but none exists Fired on StoryPointsControls and PathPointsControls. controls.addEventListener('ExitPOIs', ...)
FreeMovementControlsProps Properties that can be passed to the FreeMovementControls constructor
IntertiaCompleteEvent
KeyboardAdaptorContinuousEvent Event: Fired when a key in a continuous KeyboardAdaptor's mapping is pressed (onKeyDown)
KeyboardAdaptorDiscreteEvent Event: Fired when a key in a discrete KeyboardAdaptor's mapping is released (onKeyUp)
KeyboardAdaptorProps Properties that can be passed to the KeyboardAdaptor constructor
KeyMapping Key-value pairs of semantic labels associated with an array of keys (corresponding to KeybordEvent.keys values)
PathPointMarker
PathPointsControlsProps Properties that can be passed to the PathPointsControls constructor
PointerAdaptorEvent Event: Fired when when PointerEvents are triggered
PointerAdaptorProps Properties that can be passed to the PointerAdaptor constructor
ScrollAction ScrollActions provide a way to add custom callback hooks for specific parts of the scroll area
ScrollAdaptorEvent Event: Fired when when the 'in view' amount of the given DOM element changes
ScrollAdaptorProps Properties that can be passed to the ScrollAdaptor constructor
ScrollControlsProps Properties that can be passed to the ScrollControls constructor
StoryPointMarker
StoryPointsControlsProps Properties that can be passed to the StoryPointsControls constructor
SwipeAdaptorEvent Event: Fired when when swipe are registered
SwipeAdaptorProps Properties that can be passed to the SwipeAdaptor constructor
ThreeDOFControlsProps Properties that can be passed to the ThreeDOFControls constructor
TranslateGuide Describe whether rig should translate along current rotation in each action axis
UpdatePOIsEvent Event: Fired when transitioning between points of interest. Fired on StoryPointsControls and PathPointsControls. controls.addEventListener('update', ...)
WheelAdaptorContinuousEvent Event: Fired on a continuous WheelAdaptor in response to wheel events
WheelAdaptorDiscreteEvent Event: Fired when when discrete wheel events are registered
WheelAdaptorProps Properties that can be passed to the WheelAdaptor constructor

Type Aliases

Type Alias Description
KeyboardAdaptorType A discrete adaptor works as a trigger - only firing events on keyup, whereas a continuous adaptor continuously fires events on keydown
WheelAdaptorType A discrete adaptor works as a trigger - only firing events when wheel events pass a given threshold, whereas a continuous adaptor continuously fires events on wheel