-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Animate change of color #363
Comments
|
OH!
|
Yeah because it can't interpolate. I think you can use |
Oh yeah. Better to tag it as a |
Just for clarification: you meant interpolation of the fill color and not filling a circle from top to bottom for example, right? That might be interesting as well though. |
Yeah. Filling from top to bottom can go in the Yeah #313 includes all the relevant arguments/Metadata that |
We could chat more @Sov-trotter , but here is how I would do it right now without convenience functionalities: using Javis, Animations, Colors
function ground(args...)
background("black")
sethue("white")
end
color_anim = Animation(
[0, 0.25, 0.5, 0.75, 1], # must go from 0 to 1
[Lab(colorant"black"), Lab(colorant"red"), Lab(colorant"cyan"), Lab(colorant"red"), Lab(colorant"black")],
[sineio(), sineio(), sineio(), sineio()],
)
video = Video(600, 400)
Background(1:200, ground)
blob = Object(1:150, (args...) -> circle(O, 60, :fill))
act!(blob, Action(1:150, color_anim, sethue()))
render(
video;
pathname = "loading.gif",
) Which gives: Obviously a bit verbose. Would be nice to make some reasonable default animation syntax for change where we could have something like:
|
We probably want to have |
I couldn't really figure out a way to fill color in a shape gradually(not instantly).
eg: Something like
Fills color in the 41st frame rather than animating the filing.
The text was updated successfully, but these errors were encountered: