@graphty/graphty-element / index / AnimationOptions
Interface: AnimationOptions ​
Defined in: graphty-element/src/video/VideoCapture.ts:24
Options for capturing animation/video from the graph.
Video capture uses the browser's MediaRecorder API for hardware-accelerated real-time capture. This provides excellent performance but operates in real-time, meaning the video is captured as the animation plays. Frame timing depends on system performance; on slower systems, some frames may be dropped.
For guaranteed frame-perfect capture (e.g., for production video rendering), consider using external screen recording software or frame-by-frame export with a third-party video encoding library like ffmpeg.
See ​
- design/screen-capture-design-review.md for technical details on capture modes
- src/screenshot/constants.ts for default values (VIDEO_CONSTANTS)
Properties ​
camera? ​
optionalcamera?:CameraState| {preset:string; }
Defined in: graphty-element/src/video/VideoCapture.ts:49
Camera position/state or preset name for stationary mode
cameraMode ​
cameraMode:
"stationary"|"animated"
Defined in: graphty-element/src/video/VideoCapture.ts:47
Camera behavior during capture: 'stationary' or 'animated'
cameraPath? ​
optionalcameraPath?:CameraWaypoint[]
Defined in: graphty-element/src/video/VideoCapture.ts:51
Waypoints for camera animation path (animated mode)
download? ​
optionaldownload?:boolean
Defined in: graphty-element/src/video/VideoCapture.ts:55
Whether to automatically download the video after capture
downloadFilename? ​
optionaldownloadFilename?:string
Defined in: graphty-element/src/video/VideoCapture.ts:57
Filename for downloaded video (default: 'graphty-animation.{format}')
duration ​
duration:
number
Defined in: graphty-element/src/video/VideoCapture.ts:26
Total duration of the video capture in milliseconds
easing? ​
optionaleasing?:"linear"|"easeIn"|"easeOut"|"easeInOut"
Defined in: graphty-element/src/video/VideoCapture.ts:53
Easing function for camera animations (default: 'easeInOut')
format? ​
optionalformat?:"auto"|"webm"|"mp4"
Defined in: graphty-element/src/video/VideoCapture.ts:33
Video format: 'webm', 'mp4', or 'auto' to detect best format for browser
fps? ​
optionalfps?:number
Defined in: graphty-element/src/video/VideoCapture.ts:31
Target frames per second.
Default ​
30 (VIDEO_CONSTANTS.DEFAULT_FPS)height? ​
optionalheight?:number
Defined in: graphty-element/src/video/VideoCapture.ts:43
Output height in pixels (default: canvas height)
transparentBackground? ​
optionaltransparentBackground?:boolean
Defined in: graphty-element/src/video/VideoCapture.ts:45
Whether to capture with transparent background
videoBitrate? ​
optionalvideoBitrate?:number
Defined in: graphty-element/src/video/VideoCapture.ts:39
Video bitrate in bits per second. Higher values = better quality but larger file size.
Default ​
5000000 (VIDEO_CONSTANTS.DEFAULT_VIDEO_BITRATE - 5 Mbps)width? ​
optionalwidth?:number
Defined in: graphty-element/src/video/VideoCapture.ts:41
Output width in pixels (default: canvas width)