Function: useCamera()
useCamera(
options?):object
Defined in: packages/core/src/hooks/useCamera.ts:19
React hook that helps you to manage the camera.
const {zoomIn, zoomOut, reset, goto, gotoNode } = useCamera();
Parameters
options?
CameraOptions
Returns
object
goto()
goto: (
state,options?) =>void
Parameters
state
Partial<CameraState>
options?
Partial<AnimateOptions>
Returns
void
gotoNode()
gotoNode: (
nodeKey,options?) =>void
Parameters
nodeKey
string
options?
Partial<AnimateOptions>
Returns
void
reset()
reset: (
options?) =>void
Parameters
options?
Partial<AnimateOptions>
Returns
void
zoomIn()
zoomIn: (
options?) =>void
Parameters
options?
CameraOptions
Returns
void
zoomOut()
zoomOut: (
options?) =>void
Parameters
options?
CameraOptions
Returns
void