Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LottieFiles/dotlottie-web
/ functions
Functions
921 in github.com/LottieFiles/dotlottie-web
⨍
Functions
921
◇
Types & classes
150
↓ 340 callers
Method
addEventListener
* Subscribes to animation events like play, pause, frame, complete, etc. * Use this to react to animation state changes and playback progress. *
packages/web/src/dotlottie.ts:1253
↓ 86 callers
Method
dispatch
(event: EventByType<T>)
packages/web/src/event-manager.ts:269
↓ 86 callers
Function
rerender
(givenAttributes: Record<string, string>)
packages/wc/__tests__/dotlottie-wc.spec.ts:34
↓ 76 callers
Method
_sendMessage
( method: T, params: MethodParamsMap[T], transfer?: Transferable[], )
packages/web/src/worker/dotlottie.ts:957
↓ 48 callers
Method
_updateDotLottieInstanceState
()
packages/web/src/worker/dotlottie.ts:904
↓ 41 callers
Function
passStringToWasm0
(arg, malloc, realloc)
packages/web/src/webgl/dotlottie-player.js:44
↓ 41 callers
Method
removeEventListener
* Unsubscribes from animation events. * If no listener is provided, removes all listeners for the given event type. * @param type - Event type t
packages/web/src/dotlottie.ts:1263
↓ 39 callers
Function
passStringToWasm0
(arg, malloc, realloc)
packages/web/src/webgpu/dotlottie-player.js:44
↓ 38 callers
Function
passStringToWasm0
(arg, malloc, realloc)
packages/web/src/core/dotlottie-player.js:29
↓ 33 callers
Method
load
* Dynamically loads a new animation, replacing the current one if any. * Stops current playback, cleans up resources, and loads from the provided s
packages/web/src/dotlottie.ts:833
↓ 29 callers
Method
setWasmUrl
* Configures the URL for loading the WASM module. * Call this before creating any player instances to load the WASM from a custom CDN or local path
packages/web/src/dotlottie.ts:1928
↓ 28 callers
Function
getPointerPosition
(event: MouseEvent | PointerEvent)
packages/web/src/utils.ts:130
↓ 23 callers
Method
destroy
* Cleans up and destroys the player instance, releasing all resources. * Stops playback, removes event listeners, and frees WASM memory. Call when
packages/web/src/dotlottie.ts:1271
↓ 23 callers
Function
getStringFromWasm0
(ptr, len)
packages/web/src/webgpu/dotlottie-player.js:96
↓ 23 callers
Method
render
* Render the current frame without advancing time. * @returns {boolean}
packages/web/src/core/dotlottie-player.js:1104
↓ 22 callers
Function
getStringFromWasm0
(ptr, len)
packages/web/src/webgl/dotlottie-player.js:105
↓ 22 callers
Function
render
( elementName: T, attributes: Record<string, string> = {}, )
packages/wc/__tests__/dotlottie-wc.spec.ts:14
↓ 21 callers
Method
_draw
()
packages/web/src/dotlottie.ts:887
↓ 21 callers
Function
render
(ui: React.ReactNode, options?: ComponentRenderOptions)
packages/react/tests/dotlottie-react.spec.tsx:21
↓ 20 callers
Method
play
* Starts or resumes animation playback from the current frame. * Unfreezes rendering if frozen and starts the animation loop. Updates isPlaying sta
packages/web/src/dotlottie.ts:1095
↓ 19 callers
Function
getStringFromWasm0
(ptr, len)
packages/web/src/core/dotlottie-player.js:96
↓ 19 callers
Method
pause
* Pauses animation playback at the current frame. * Stops the animation loop while preserving the current frame position. Updates isPaused state to
packages/web/src/dotlottie.ts:1130
↓ 18 callers
Function
handleError
(f, args)
packages/web/src/webgpu/dotlottie-player.js:9
↓ 18 callers
Function
render
()
packages/wc/src/base-dotlottie-wc.ts:249
↓ 17 callers
Function
isElementInViewport
(element: HTMLElement)
packages/web/src/utils.ts:117
↓ 16 callers
Function
createWasmLoader
(initFn: WasmInitFn, primaryUrl: string, backupUrl: string)
packages/web/src/wasm-loader.ts:4
↓ 15 callers
Function
getDataViewMemory0
()
packages/web/src/webgl/dotlottie-player.js:85
↓ 14 callers
Function
getDefaultDPR
()
packages/web/src/utils.ts:105
↓ 13 callers
Function
createMockEvent
(clientX: number, clientY: number, target: HTMLCanvasElement)
packages/web/tests/utils.test.ts:282
↓ 13 callers
Function
isLikeNone
(x)
packages/web/src/webgl/dotlottie-player.js:17
↓ 12 callers
Function
createCanvas
( canvasWidth: number, canvasHeight: number, rectLeft: number, rectTop: number, rectWidth:
packages/web/tests/utils.test.ts:259
↓ 12 callers
Method
setTheme
* Applies a theme to the animation, modifying colors and visual properties. * Themes are predefined in the dotLottie manifest. Returns true if them
packages/web/src/dotlottie.ts:1563
↓ 11 callers
Method
freeze
* Pauses the rendering loop without changing playback state. * Useful for reducing CPU/GPU usage when the animation is offscreen or hidden. Dispatc
packages/web/src/dotlottie.ts:1304
↓ 10 callers
Method
_stopAnimationLoop
()
packages/web/src/dotlottie.ts:1025
↓ 10 callers
Function
addToExternrefTable0
(obj)
packages/web/src/webgl/dotlottie-player.js:21
↓ 10 callers
Function
handleError
(f, args)
packages/web/src/webgl/dotlottie-player.js:92
↓ 10 callers
Method
loadAnimation
* Switches to a different animation within a multi-animation dotLottie file. * Use this to load a different animation by its ID without creating a
packages/web/src/dotlottie.ts:1500
↓ 10 callers
Method
observe
(canvas: HTMLCanvasElement, dotLottieInstance: DotLottie | DotLottieWorker)
packages/web/src/offscreen-observer.ts:32
↓ 10 callers
Method
setMode
* Changes the playback direction mode. * Controls whether animation plays forward, in reverse, or alternates (bounce). * @param mode - Playback
packages/web/src/dotlottie.ts:1443
↓ 9 callers
Method
_drainPlayerEvents
({ skipFrame = false }: { skipFrame?: boolean } = {})
packages/web/src/dotlottie.ts:264
↓ 9 callers
Method
addEventListener
(type: T, listener: EventListener<T>)
packages/web/src/worker/dotlottie.ts:985
↓ 9 callers
Function
getDataViewMemory0
()
packages/web/src/webgpu/dotlottie-player.js:85
↓ 9 callers
Method
setBackgroundColor
* Changes the background color of the canvas or animation. * For HTMLCanvasElement, sets the CSS background. For other surfaces, renders behind the
packages/web/src/dotlottie.ts:1199
↓ 9 callers
Method
setMarker
* Activates a named marker to play only that marked segment. * Markers define named sections within an animation. Use markers() to list available m
packages/web/src/dotlottie.ts:1525
↓ 9 callers
Method
setRenderConfig
* Updates rendering configuration like autoResize, devicePixelRatio, and freezeOnOffscreen. * Dynamically changes how the canvas behaves without re
packages/web/src/dotlottie.ts:1454
↓ 9 callers
Method
setSegment
* Sets a frame range to play instead of the full animation. * Useful for playing specific sections or creating animation sequences from subsections
packages/web/src/dotlottie.ts:1421
↓ 9 callers
Method
stateMachineStart
* @experimental * Start the state machine * @returns true if the state machine was started successfully
packages/web/src/dotlottie.ts:2029
↓ 8 callers
Method
setFrame
* Seeks to a specific frame in the animation and renders it. * Useful for implementing custom scrubbing controls or precise frame positioning. *
packages/web/src/dotlottie.ts:1167
↓ 8 callers
Method
setSpeed
* Changes the animation playback speed. * Values above 1 speed up playback, below 1 slow it down. * @param speed - Playback speed multiplier (e.
packages/web/src/dotlottie.ts:1188
↓ 8 callers
Method
stateMachineLoad
* @experimental * Loads a state machine by its ID from the dotLottie manifest. * State machines enable interactive, event-driven animation behav
packages/web/src/dotlottie.ts:1997
↓ 8 callers
Method
stop
* Stops animation playback and resets to the start frame. * Halts the animation loop and returns to the beginning. Updates isStopped state to true.
packages/web/src/dotlottie.ts:1144
↓ 8 callers
Method
unobserve
(canvas: HTMLCanvasElement)
packages/web/src/offscreen-observer.ts:41
↓ 7 callers
Method
freeze
()
packages/web/src/worker/dotlottie.ts:781
↓ 7 callers
Function
getDataViewMemory0
()
packages/web/src/core/dotlottie-player.js:70
↓ 7 callers
Function
handleError
(f, args)
packages/web/src/core/dotlottie-player.js:83
↓ 7 callers
Method
is_playing
* @returns {boolean}
packages/web/src/core/dotlottie-player.js:193
↓ 7 callers
Method
removeEventListener
(type: T, listener?: EventListener<T>)
packages/web/src/worker/dotlottie.ts:989
↓ 7 callers
Method
setLoop
* Enables or disables continuous looping of the animation. * When enabled with loopCount set to 0, animation repeats indefinitely. * @param loop
packages/web/src/dotlottie.ts:1218
↓ 7 callers
Function
sleep
(ms: number)
packages/web/tests/test-utils.ts:1
↓ 7 callers
Method
stateMachineStop
* @experimental * Stop the state machine * @returns true if the state machine was stopped successfully
packages/web/src/dotlottie.ts:2053
↓ 6 callers
Method
_dispatchError
(message: string)
packages/web/src/dotlottie.ts:436
↓ 6 callers
Method
_startAnimationLoop
()
packages/web/src/dotlottie.ts:1033
↓ 6 callers
Function
getUint8ArrayMemory0
()
packages/web/src/webgl/dotlottie-player.js:5
↓ 6 callers
Function
getUint8ArrayMemory0
()
packages/web/src/webgpu/dotlottie-player.js:22
↓ 6 callers
Method
resize
* Recalculates and updates canvas dimensions based on current size. * Call this when the canvas container size changes to maintain proper rendering
packages/web/src/dotlottie.ts:1332
↓ 6 callers
Method
setUseFrameInterpolation
* Enables or disables frame interpolation for smoother playback. * When enabled, interpolates between frames. When disabled, shows exact frame-by-f
packages/web/src/dotlottie.ts:1241
↓ 5 callers
Function
e
(t)
fixtures/profiler.js:10
↓ 5 callers
Method
getSlot
* Get the current value of a slot * @param slotId - The slot ID to query * @returns The parsed slot value or undefined if not found
packages/web/src/dotlottie.ts:1682
↓ 5 callers
Function
getUint8ArrayMemory0
()
packages/web/src/core/dotlottie-player.js:7
↓ 5 callers
Function
okResponse
()
packages/web/tests/wasm-loader.test.ts:11
↓ 5 callers
Method
requestAnimationFrame
(callback: (time: number) => void)
packages/web/src/animation-frame-manager.ts:5
↓ 5 callers
Function
setQueryStringParameter
(name: string, value: string)
apps/viewer/src/pages/perf.tsx:191
↓ 5 callers
Method
setThemeData
* Applies a custom theme from theme data instead of manifest theme ID. * Useful for dynamically generated or user-created themes not in the manifes
packages/web/src/dotlottie.ts:1601
↓ 5 callers
Method
set_slot_str
* Set a single slot by ID from a JSON value string. * @param {string} id * @param {string} json * @returns {boolean}
packages/web/src/core/dotlottie-player.js:447
↓ 5 callers
Method
unfreeze
* Resumes the rendering loop after being frozen. * Restarts frame rendering while maintaining the current playback state. Dispatches 'unfreeze' eve
packages/web/src/dotlottie.ts:1318
↓ 4 callers
Method
_cleanupStateMachineListeners
()
packages/web/src/dotlottie.ts:2366
↓ 4 callers
Method
_cleanupStateMachineListeners
()
packages/web/src/worker/dotlottie.ts:1437
↓ 4 callers
Method
_loadFromData
(data: Data)
packages/web/src/dotlottie.ts:458
↓ 4 callers
Method
_setupTarget
(width: number, height: number)
packages/web/src/dotlottie.ts:256
↓ 4 callers
Function
handleChange
(newColor: string)
apps/viewer/src/components/slot-controller.tsx:61
↓ 4 callers
Function
isDotLottie
(fileData: ArrayBuffer)
packages/web/src/utils.ts:59
↓ 4 callers
Function
isLottie
(fileData: string | Record<string, unknown>)
packages/web/src/utils.ts:88
↓ 4 callers
Method
markers
* Gets all markers defined in the animation with their time and duration. * Markers represent named sections that can be played using setMarker().
packages/web/src/dotlottie.ts:1547
↓ 4 callers
Method
removeAllEventListeners
()
packages/web/src/event-manager.ts:275
↓ 4 callers
Method
setLayout
* Updates the layout configuration for positioning and scaling the animation. * Changes how the animation fits and aligns within the canvas without
packages/web/src/dotlottie.ts:1902
↓ 4 callers
Function
setLoop
(request)
packages/web/src/worker/dotlottie.worker.ts:1261
↓ 4 callers
Method
setLoopCount
* Sets the number of additional times to replay the animation after the first play. * Requires loop to be true. A value of 0 means infinite replays
packages/web/src/dotlottie.ts:1230
↓ 4 callers
Method
set_marker
* @param {string} name
packages/web/src/core/dotlottie-player.js:266
↓ 4 callers
Method
set_segment
* @param {number} start * @param {number} end * @returns {boolean}
packages/web/src/core/dotlottie-player.js:327
↓ 4 callers
Method
stateMachineSetConfig
* @experimental * Set the state machine config * @param config - The state machine config
packages/web/src/dotlottie.ts:2020
↓ 3 callers
Method
_cleanupCanvas
()
packages/web/src/dotlottie.ts:982
↓ 3 callers
Method
_drainSmEvents
()
packages/web/src/dotlottie.ts:319
↓ 3 callers
Method
_isKeyframeArray
* Check if value is an array of keyframes (has objects with 't' and 's' properties)
packages/web/src/dotlottie.ts:1635
↓ 3 callers
Method
_loadFromSrc
(src: string)
packages/web/src/dotlottie.ts:588
↓ 3 callers
Function
cleanup
()
packages/wc/__tests__/dotlottie-wc.spec.ts:52
↓ 3 callers
Method
clear_segment
* @returns {boolean}
packages/web/src/core/dotlottie-player.js:476
↓ 3 callers
Function
generateUniqueId
()
packages/web/src/worker/dotlottie.ts:42
↓ 3 callers
Function
getPlaygroundUrl
(code: string)
apps/viewer/src/utils/url-compression.ts:26
↓ 3 callers
Function
hexStringToRGBAInt
(colorHex: string)
packages/web/src/utils.ts:18
↓ 3 callers
Function
isHexColor
(color: string)
packages/web/src/utils.ts:8
next →
1–100 of 921, ranked by callers