Skip to content

Instantly share code, notes, and snippets.

@ancientstraits
Created May 5, 2022 13:45
Show Gist options
  • Save ancientstraits/434d08b525dafe7f32859b420cd067f9 to your computer and use it in GitHub Desktop.
Save ancientstraits/434d08b525dafe7f32859b420cd067f9 to your computer and use it in GitHub Desktop.
local cm = require('codim')
-- An animation is a function that takes time in and returns an image.
local function logo(props, time)
if time.seconds <= props.seconds then
return cm.text {
location = cm.position.center,
color = white,
}
else
return nil
end
end
local function main(time)
return cm.background {
color = '#333',
logo({seconds = 3}, time),
cm.tts({text = "hello"}, time),
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment