Quickstart

Loading Ebi…
let google_fonts = reflect(false, label="Google font demo")
let sans = google_fonts ? Font(["Noto Sans JP", "sans-serif"]) : Font(["sans-serif"])
let greeting = reflect("Hello World", label="Greeting")
let title = <Text font={sans} font_size={72pt} font_weight={650} fill="light1">{greeting}</Text>

let seed = 51

fn launch_position(rng: Random): List<Percent, 2> {
    let side = rng.choose(0, [-1, 1])
    let x = rng.integer(1, min = 30, max = 55) * 1%
    let offscreen_y = 120%
    return [side * x, offscreen_y]
}

let blue_rng = Random(seed)
let orange_rng = Random(seed + 1)
let paper_rng = Random(seed + 2)
let green_rng = Random(seed + 3)
let eggshell_rng = Random(seed + 4)
let blue_start = launch_position(blue_rng)
let orange_start = launch_position(orange_rng)
let paper_start = launch_position(paper_rng)
let green_start = launch_position(green_rng)
let eggshell_start = launch_position(eggshell_rng)

let glass = Material.glass(blur = 4pt, refraction = 14pt, tint = Color("blue1").alpha(32%))
let paper = Material.paper(color = Color("light2"), grain = 0.7)
let eggshell = Material.eggshell(color = Color("purple1"))
let marble = Material.marble(color = Color("green1"), vein = Color("green5"), contrast = 0.65, scale = 0.7)
let hatches = Material.hatches(color = Color("orange5").alpha(80%))
let rest_radius = 40pt
mut tonal_radius = rest_radius
let blue = <Box position={blue_start} w-126 h-126 rounded-32 corner_style="continuous" material={glass}
    x_align={Align.Center} y_align={Align.Center}/>
let orange = <Box position={orange_start} w-150 h-84 radius={tonal_radius}
    fill="orange1" material={hatches} rotation={-24deg} x_align={Align.Center} y_align={Align.Center}/>
let sheet = <Box position={paper_start} w-114 h-66 rounded-2 material={paper}
    rotation={24deg} x_align={Align.Center} y_align={Align.Center}/>
let green = <Box position={green_start} w-96 h-96 rounded-full material={marble}
    x_align={Align.Center} y_align={Align.Center}/>
let painted = <Box position={eggshell_start} w-92 h-68 rounded-10 material={eggshell}
    x_align={Align.Center} y_align={Align.Center}/>

let shapes = [painted, orange, sheet, green]
shapes.fade_out(duration = 0s)
# Draw the lens above the shapes and keep the title above the lens.
blue.fade_out(duration = 0s)

title.write(duration = 800ms)
wait(550ms)
title.edit("Hello Ebi!", animation = "type", duration = 550ms)

wait(100ms)
if google_fonts {
    let fonts = [
        Font(["Lobster", "sans-serif"]),
        Font(["Playfair Display", "serif"]),
        Font(["Bricolage Grotesque", "sans-serif"]),
        Font(["Rubik", "sans-serif"])
    ]
    for font in fonts {
        title.edit(font = font)
        wait(100ms)
    }
    title.edit(font = sans)
} else {
    wait(400ms)
}
wait(80ms)

let longest_flight = 880ms
let stagger = 80ms

fn toss(shape: Element, start: List<Percent, 2>, rng: Random, delay: Duration): Animation {
    let flight = rng.integer(3, min = 720, max = longest_flight / 1ms) * 1ms
    let end_x = -start[0] * rng.integer(4, min = 7, max = 11) / 10
    let apex = rng.number(5, min = -32%, max = -15%)
    let turn = rng.number(6, min = -100deg, max = 100deg)
    # Short time handles leave more of the flight near the apex.
    let distance = end_x - start[0]
    let handle_time = flight / 16
    let lift = (apex - start[1]) * 4 / 3
    let path = Curve(keys = [
        Keyframe(time = 0s, value = start, tangents = "manual",
            handle_out = {
                time = handle_time,
                value = [distance / 4, lift]
            }),
        Keyframe(time = flight, value = [end_x, start[1]], tangents = "manual",
            handle_in = {
                time = -handle_time,
                value = [-distance / 8, lift]
            })
    ])
    return <Animation offset={delay}>
        {shape.fade_in(duration = 0s)}
        {shape.move_to(path)}
        {shape.rotate_to(turn, duration = flight, ease = "linear")}
        <Animation offset={flight}>
            {shape.fade_out(duration = 0s)}
        </Animation>
    </Animation>
}

<Animation duration={longest_flight + 3 * stagger}>
    {toss(painted, eggshell_start, eggshell_rng, 0ms)}
    {toss(orange, orange_start, orange_rng, stagger)}
    {toss(sheet, paper_start, paper_rng, 2 * stagger)}
    {toss(green, green_start, green_rng, 3 * stagger)}
    {toss(blue, blue_start, blue_rng, 2 * stagger)}
    <Animation offset={stagger} flow="sequence">
        {animate(tonal_radius, to = 12pt, duration = 230ms)}
        {animate(tonal_radius, to = rest_radius, duration = 430ms)}
    </Animation>
</Animation>
wait(290ms)
title.uncreate(duration = 700ms)
wait(200ms)

Change the text in title.edit("Hello Ebi!", ...) to try a different greeting. Enable Google font demo to download those fonts and see the greeting cycle through them. Save the source as hello.ebi and drag it onto a Shrimply video track, or render it from the terminal.

Change seed to try different tosses. The random source gives each shape repeatable directions, heights, and spins.

The blue lens passes over the shapes while the title stays sharp above it. Change the alpha of its Adwaita blue tint to adjust how much of the artwork shows through. The orange shape uses Material.hatches for fine overlapping ink strokes and animates its corner radius. The light sheet uses Material.paper for subtle fibers. The purple shape uses Material.eggshell for a fine, pebbled finish, and the green circle uses Material.marble for soft mineral veins. Surface controls and more examples

shrimply ebi check hello.ebi
shrimply ebi video hello.ebi --output hello.mp4

Change Greeting in the playground or in Shrimply's inspector to set the opening title.