Skip to content
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

Use @Action instead of Action #100

Closed
Wikunia opened this issue Aug 18, 2020 · 2 comments
Closed

Use @Action instead of Action #100

Wikunia opened this issue Aug 18, 2020 · 2 comments
Labels
Breaking This issue will break things enhancement New feature or request
Milestone

Comments

@Wikunia
Copy link
Member

Wikunia commented Aug 18, 2020

Is your feature request related to a problem? Please explain.
It's hard to write Actions with (args...)-> every time and using symbols for variables is a bit annoying.

Describe the solution you'd like

video = Video(600, 600)
@Action(1:60, id, func(my_args))
@Action(1:10, func(id))

javis(video; pathname="test.gif")

can be equivalent to:

javis(video, [
    Action(1:60, :id, (args...)->func(my_args))
    Action(1:10, (args...)->func(get_value(:id)))
])

but is much easier to read and write.

@Wikunia Wikunia added the enhancement New feature or request label Aug 18, 2020
@Wikunia
Copy link
Member Author

Wikunia commented Aug 18, 2020

Idea for subactions:

@BackgroundAction(1:180, ground),      
a = @Action(1:180, id, draw_grid)
@SubAction(a, 1:60, appear(:lr, :tb))

@Wikunia Wikunia added the Breaking This issue will break things label Sep 17, 2020
@Wikunia Wikunia added this to the v0.3.0 milestone Sep 22, 2020
@Wikunia
Copy link
Member Author

Wikunia commented Oct 15, 2020

I'm actually a bit against this as it #216 very hard and maybe users can get used to (args...)->. We can also have no arguments such that one can write ()-> and instead have functions like get_current_frame

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking This issue will break things enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants