MCPcopy Create free account

hub / github.com/LottieFiles/dotlottie-web / functions

Functions921 in github.com/LottieFiles/dotlottie-web

↓ 340 callersMethodaddEventListener
* 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 callersMethoddispatch
(event: EventByType<T>)
packages/web/src/event-manager.ts:269
↓ 86 callersFunctionrerender
(givenAttributes: Record<string, string>)
packages/wc/__tests__/dotlottie-wc.spec.ts:34
↓ 76 callersMethod_sendMessage
( method: T, params: MethodParamsMap[T], transfer?: Transferable[], )
packages/web/src/worker/dotlottie.ts:957
↓ 48 callersMethod_updateDotLottieInstanceState
()
packages/web/src/worker/dotlottie.ts:904
↓ 41 callersFunctionpassStringToWasm0
(arg, malloc, realloc)
packages/web/src/webgl/dotlottie-player.js:44
↓ 41 callersMethodremoveEventListener
* 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 callersFunctionpassStringToWasm0
(arg, malloc, realloc)
packages/web/src/webgpu/dotlottie-player.js:44
↓ 38 callersFunctionpassStringToWasm0
(arg, malloc, realloc)
packages/web/src/core/dotlottie-player.js:29
↓ 33 callersMethodload
* 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 callersMethodsetWasmUrl
* 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 callersFunctiongetPointerPosition
(event: MouseEvent | PointerEvent)
packages/web/src/utils.ts:130
↓ 23 callersMethoddestroy
* 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 callersFunctiongetStringFromWasm0
(ptr, len)
packages/web/src/webgpu/dotlottie-player.js:96
↓ 23 callersMethodrender
* Render the current frame without advancing time. * @returns {boolean}
packages/web/src/core/dotlottie-player.js:1104
↓ 22 callersFunctiongetStringFromWasm0
(ptr, len)
packages/web/src/webgl/dotlottie-player.js:105
↓ 22 callersFunctionrender
( elementName: T, attributes: Record<string, string> = {}, )
packages/wc/__tests__/dotlottie-wc.spec.ts:14
↓ 21 callersMethod_draw
()
packages/web/src/dotlottie.ts:887
↓ 21 callersFunctionrender
(ui: React.ReactNode, options?: ComponentRenderOptions)
packages/react/tests/dotlottie-react.spec.tsx:21
↓ 20 callersMethodplay
* 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 callersFunctiongetStringFromWasm0
(ptr, len)
packages/web/src/core/dotlottie-player.js:96
↓ 19 callersMethodpause
* 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 callersFunctionhandleError
(f, args)
packages/web/src/webgpu/dotlottie-player.js:9
↓ 18 callersFunctionrender
()
packages/wc/src/base-dotlottie-wc.ts:249
↓ 17 callersFunctionisElementInViewport
(element: HTMLElement)
packages/web/src/utils.ts:117
↓ 16 callersFunctioncreateWasmLoader
(initFn: WasmInitFn, primaryUrl: string, backupUrl: string)
packages/web/src/wasm-loader.ts:4
↓ 15 callersFunctiongetDataViewMemory0
()
packages/web/src/webgl/dotlottie-player.js:85
↓ 14 callersFunctiongetDefaultDPR
()
packages/web/src/utils.ts:105
↓ 13 callersFunctioncreateMockEvent
(clientX: number, clientY: number, target: HTMLCanvasElement)
packages/web/tests/utils.test.ts:282
↓ 13 callersFunctionisLikeNone
(x)
packages/web/src/webgl/dotlottie-player.js:17
↓ 12 callersFunctioncreateCanvas
( canvasWidth: number, canvasHeight: number, rectLeft: number, rectTop: number, rectWidth:
packages/web/tests/utils.test.ts:259
↓ 12 callersMethodsetTheme
* 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 callersMethodfreeze
* 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 callersMethod_stopAnimationLoop
()
packages/web/src/dotlottie.ts:1025
↓ 10 callersFunctionaddToExternrefTable0
(obj)
packages/web/src/webgl/dotlottie-player.js:21
↓ 10 callersFunctionhandleError
(f, args)
packages/web/src/webgl/dotlottie-player.js:92
↓ 10 callersMethodloadAnimation
* 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 callersMethodobserve
(canvas: HTMLCanvasElement, dotLottieInstance: DotLottie | DotLottieWorker)
packages/web/src/offscreen-observer.ts:32
↓ 10 callersMethodsetMode
* 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 callersMethod_drainPlayerEvents
({ skipFrame = false }: { skipFrame?: boolean } = {})
packages/web/src/dotlottie.ts:264
↓ 9 callersMethodaddEventListener
(type: T, listener: EventListener<T>)
packages/web/src/worker/dotlottie.ts:985
↓ 9 callersFunctiongetDataViewMemory0
()
packages/web/src/webgpu/dotlottie-player.js:85
↓ 9 callersMethodsetBackgroundColor
* 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 callersMethodsetMarker
* 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 callersMethodsetRenderConfig
* Updates rendering configuration like autoResize, devicePixelRatio, and freezeOnOffscreen. * Dynamically changes how the canvas behaves without re
packages/web/src/dotlottie.ts:1454
↓ 9 callersMethodsetSegment
* 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 callersMethodstateMachineStart
* @experimental * Start the state machine * @returns true if the state machine was started successfully
packages/web/src/dotlottie.ts:2029
↓ 8 callersMethodsetFrame
* 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 callersMethodsetSpeed
* 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 callersMethodstateMachineLoad
* @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 callersMethodstop
* 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 callersMethodunobserve
(canvas: HTMLCanvasElement)
packages/web/src/offscreen-observer.ts:41
↓ 7 callersMethodfreeze
()
packages/web/src/worker/dotlottie.ts:781
↓ 7 callersFunctiongetDataViewMemory0
()
packages/web/src/core/dotlottie-player.js:70
↓ 7 callersFunctionhandleError
(f, args)
packages/web/src/core/dotlottie-player.js:83
↓ 7 callersMethodis_playing
* @returns {boolean}
packages/web/src/core/dotlottie-player.js:193
↓ 7 callersMethodremoveEventListener
(type: T, listener?: EventListener<T>)
packages/web/src/worker/dotlottie.ts:989
↓ 7 callersMethodsetLoop
* 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 callersFunctionsleep
(ms: number)
packages/web/tests/test-utils.ts:1
↓ 7 callersMethodstateMachineStop
* @experimental * Stop the state machine * @returns true if the state machine was stopped successfully
packages/web/src/dotlottie.ts:2053
↓ 6 callersMethod_dispatchError
(message: string)
packages/web/src/dotlottie.ts:436
↓ 6 callersMethod_startAnimationLoop
()
packages/web/src/dotlottie.ts:1033
↓ 6 callersFunctiongetUint8ArrayMemory0
()
packages/web/src/webgl/dotlottie-player.js:5
↓ 6 callersFunctiongetUint8ArrayMemory0
()
packages/web/src/webgpu/dotlottie-player.js:22
↓ 6 callersMethodresize
* 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 callersMethodsetUseFrameInterpolation
* 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 callersFunctione
(t)
fixtures/profiler.js:10
↓ 5 callersMethodgetSlot
* 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 callersFunctiongetUint8ArrayMemory0
()
packages/web/src/core/dotlottie-player.js:7
↓ 5 callersFunctionokResponse
()
packages/web/tests/wasm-loader.test.ts:11
↓ 5 callersMethodrequestAnimationFrame
(callback: (time: number) => void)
packages/web/src/animation-frame-manager.ts:5
↓ 5 callersFunctionsetQueryStringParameter
(name: string, value: string)
apps/viewer/src/pages/perf.tsx:191
↓ 5 callersMethodsetThemeData
* 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 callersMethodset_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 callersMethodunfreeze
* 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 callersMethod_cleanupStateMachineListeners
()
packages/web/src/dotlottie.ts:2366
↓ 4 callersMethod_cleanupStateMachineListeners
()
packages/web/src/worker/dotlottie.ts:1437
↓ 4 callersMethod_loadFromData
(data: Data)
packages/web/src/dotlottie.ts:458
↓ 4 callersMethod_setupTarget
(width: number, height: number)
packages/web/src/dotlottie.ts:256
↓ 4 callersFunctionhandleChange
(newColor: string)
apps/viewer/src/components/slot-controller.tsx:61
↓ 4 callersFunctionisDotLottie
(fileData: ArrayBuffer)
packages/web/src/utils.ts:59
↓ 4 callersFunctionisLottie
(fileData: string | Record<string, unknown>)
packages/web/src/utils.ts:88
↓ 4 callersMethodmarkers
* 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 callersMethodremoveAllEventListeners
()
packages/web/src/event-manager.ts:275
↓ 4 callersMethodsetLayout
* 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 callersFunctionsetLoop
(request)
packages/web/src/worker/dotlottie.worker.ts:1261
↓ 4 callersMethodsetLoopCount
* 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 callersMethodset_marker
* @param {string} name
packages/web/src/core/dotlottie-player.js:266
↓ 4 callersMethodset_segment
* @param {number} start * @param {number} end * @returns {boolean}
packages/web/src/core/dotlottie-player.js:327
↓ 4 callersMethodstateMachineSetConfig
* @experimental * Set the state machine config * @param config - The state machine config
packages/web/src/dotlottie.ts:2020
↓ 3 callersMethod_cleanupCanvas
()
packages/web/src/dotlottie.ts:982
↓ 3 callersMethod_drainSmEvents
()
packages/web/src/dotlottie.ts:319
↓ 3 callersMethod_isKeyframeArray
* Check if value is an array of keyframes (has objects with 't' and 's' properties)
packages/web/src/dotlottie.ts:1635
↓ 3 callersMethod_loadFromSrc
(src: string)
packages/web/src/dotlottie.ts:588
↓ 3 callersFunctioncleanup
()
packages/wc/__tests__/dotlottie-wc.spec.ts:52
↓ 3 callersMethodclear_segment
* @returns {boolean}
packages/web/src/core/dotlottie-player.js:476
↓ 3 callersFunctiongenerateUniqueId
()
packages/web/src/worker/dotlottie.ts:42
↓ 3 callersFunctiongetPlaygroundUrl
(code: string)
apps/viewer/src/utils/url-compression.ts:26
↓ 3 callersFunctionhexStringToRGBAInt
(colorHex: string)
packages/web/src/utils.ts:18
↓ 3 callersFunctionisHexColor
(color: string)
packages/web/src/utils.ts:8
next →1–100 of 921, ranked by callers