⚠ Early release: v0.3.2.sophistry is not ready for production use. Until 1.0, any minor release may break the API; expect missing features and bugs too.Stability and versioning
Animations
Animations in sophistry are values you compose: presets such as fadeIn, draw and morph write tracks and take { duration, delay, easing }, sequence, parallel and lagged combine them, and a player’s play or timeline runs the result on the stage’s clock (usePlayer() in a component, scene.play without one). Springs (springTo, follow) sit alongside the tweens. Because every animation is seekable, the same script can be played, paused or scrubbed.
Tweens and effects shows the presets one at a time; start there with FadeAndGrow. Sequencing and timelines combines them and drives them from a slider.
Tweens and effects
Entrances, easing, writing, morphs, emphasis and motion along paths.
- Fade and growThree shapes enter in different ways: fading in, growing from their center, and spinning in from nothing.
- First scene: animate with a playerStep two of the first-scene tutorial: tracks drive the ring, the radius and the angle, and usePlayer runs the script on the stage clock.
- Comparing easingsFive dots cover the same distance in the same time, each with a different easing curve, so you can see how the curves feel.
- Manim's rate functionsSix dots make the same trip with Manim's rate functions: a running start, slow into the end, two smooth halves, lingering, exponential decay, and a smooth move squished into the second half.
- Write and unwriteThree outlines are drawn one after another with write, held for a moment, then erased in reverse order with unwrite.
- Emphasis effectsFour ways to draw the eye in turn: indicate swells a dot, wiggle shakes a square, flash sends out a ring, circumscribe boxes a label.
- Indication effectsFour more ways to point at something: a spotlight closes in, a dot blinks, a flash runs along a curve, and a wave ripples through a bar.
- Animated boundaryA stroke keeps running round a box, a new colour each cycle, while the last one thins away underneath: ambient emphasis that needs no animation.
- Morph shapesA circle morphs into a square, a star, and back again.
- Matching shapesA square and a circle become a larger circle and a long bar. TransformMatchingShapes pairs each shape with the one it most resembles, so nothing crosses over.
- Point moving on a shapeA dot travels around a circle at constant speed by following the circle's outline with moveAlong.
- Arcs, trails and changing speedTwo dots swap places along half-circle arcs instead of straight lines, slowing right down as they pass each other, and each leaves a fading trail.
- Moving angleOne ray swings around a fixed one while an Angle arc and a Text readout follow it, all driven by a single tracked number.
- Animated numbersAn Integer, a DecimalNumber and a Variable count up and back down with valueTo; digits keep fixed-width columns so nothing jitters.
Sequencing and timelines
Composing animations, scrubbing, chapters and custom animations.
- Sequencing animationsThe same three lifts played one after another, all together, and staggered, using sequence, parallel and lagged.
- A scrubbable timelineOne script, three steps. player.timeline() runs it and exposes seek, time and playing, so a button and a range slider can pause, resume and scrub it in either direction.
- First scene: scrub it with a timelineStep four of the first-scene tutorial: the whole script becomes a timeline you can seek with a slider, backwards as well as forwards.
- Scrubbable explainer with chaptersA four-step explainer on one timeline. Chapter buttons sit at offsets computed from each step's duration; the slider and the buttons both just call seek.
- One track, many driversThe same x track is written by dragging the knob, by a tween from the button, and by a slider. Nothing is wired together: they all just write the track.
- A custom animation leafanimation({...}) builds a seekable leaf from begin and seek. This one makes a counter tick in whole numbers while a built-in valueTo slides the dot, and both obey scrubbing and composites.