API

API

The browser module exports createThinkingDots and its timeline. The React package adds ThinkingDots.

NameDescription
createThinkingDots(canvas, options?)Draws the dots on a canvas in its text color. Options: size, config and seed.
play(), pause(), setConfig(config), destroy()Controls the animation and swaps the figure or sequence.
figureConfig(name), figureNamesA config that repeats one figure, and the list of figure names.
THINKING_DOTSThe default config, which moves through every figure.
createTimeline(config, seed), sampleDot(timeline, dot, time)The timeline and sampler the canvas uses, for your own renderer.
ThinkingDotsThe React component. Pass a label to announce it as a status.