-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
combine actions in a layer #75
Comments
I was actually thinking something similar - especially in regards to scaling. As of right now, I put this under milestone v0.2.0 as I think this would take a bit of time to implement. I like the syntax you described. Here are some options that I can think of: Example 1graph = Layer([Action(1:100, draw_node(1); subactions=[SubAction(1:20, appear(:fade)], layer=:graph),
Action(1:100, draw_node(2); subactions=[SubAction(1:20, appear(:fade)], layer=:graph)])
javis(video, [
graph,
Action(101:200, graph, Translate(200, 0))
]) With this idea, I could see defining a layer becoming very confusing within the general Example 2This takes place inside a Javis function Collection(1:100, :graph)
Collection(:same, :graph, draw_node(1); subactions=[SubAction(1:20, appear(:fade)])
Collection(:same, :graph, draw_node(2); subactions=[SubAction(1:20, appear(:fade)])
CollectionAction(Rel(100), :graph, Translate(200, 0)
This is similar to your original idea that you had but rather than calling this system a "layer", I think the better syntax might be "Collection". The reason why I suggest this is that a layer to me suggests everything on that current frame. However, a collection refers to a subset of what is present in a frame. A Example 3graph = Collection([Action(1:100, draw_node(1); subactions=[SubAction(1:20, appear(:fade)], collection=:graph),
Action(1:100, draw_node(2); subactions=[SubAction(1:20, appear(:fade)], collection=:graph)])
javis(video, [
graph,
CollectionAction(Rel(100), graph, Translate(200, 0))
]) I think this is my favorite syntax idea as it captures concepts from both prior examples. Here, again, I posit that the syntax should be ConclusionThese are just some thoughts, but let me know what you think. @Wikunia |
Thanks for your thoughts! Some more 😉 I'm not sure I understand your confusion (okay I'm confused by your comment 😄 ) on Layer vs Collection. Action(1:100, draw_node(1); subactions=[SubAction(1:20, appear(:fade)], layer=:graph)
Action(1:100, draw_node(2); subactions=[SubAction(1:20, appear(:fade)], layer=:graph)
Action(101:200, layer(:graph), Translate(200, 0)) can be written as graph = [Action(1:100, draw_node(1); subactions=[SubAction(1:20, appear(:fade)], layer=:graph),
Action(1:100, draw_node(2); subactions=[SubAction(1:20, appear(:fade)], layer=:graph)] inside javis: graph...,
Action(101:200, layer(:graph), Translate(200, 0) I was thinking about something like example 2 as well but I don't like the many symbols we already support in the first 2 positions. About Example 1 and 3. We don't need the extra |
A new idea: video = Video(500, 500)
layer = Layer()
draw_circle = Action(1:10, (args...) -> circle())
appear_sub = SubAction(1:5, appear(:fade))
draw_circle += appear_sub
layer += draw_circle
render(video) maybe it makes sense in general to only have some very small things in v0.2.x and release v0.3 with these breaking changes quite quickly without having a lot of v0.2.x changes. What do you think @TheCedarPrince |
Hey @Wikunia , thanks for adding more thoughts. So, after thinking about this syntax for a bit, I feel like some of it is obfuscating while other parts of it I very much like. Parts I Think We Should Definitely Implement
layer1 = Layer()
layer2 = Layer()
...
layer_action = Action(1:10, layer1)
layer_action += SubAction(1:5, scale(1, 0.1))
layer2 += layer_action Essentially, I am trying to figure out the best way to also handle the syntax of combining multiple layers together and mutating an entire layer at once.
Parts I Think Could Be Problematic
Parts I Am Confused About
Conclusion These were just some of my working thoughts on the proposed syntax. I really like the direction you are going with this! Especially the |
As mentioned elsewhere R's ggplot 2 uses |
Regarding the id problem: I would remove the symbol variant then and one can write:
I'm not a fan of using If you want several videos in one julia script you just need to define a new I forgot the BackgroundAction but also thinking that we might want to have a default one. |
Just a small update. We decided against using |
The full discussion is freely viewable here if you want to check it out @xiaodaigh : https://julialang.zulipchat.com/#narrow/stream/253420-javis/topic/Taking.20Object.20Addition.20Seriously/near/213057763 Thanks for your thoughts as they were super valuable! |
|
If we create a ball in real life and move it we don't create a new one but instead move the old one. |
Good point |
I'm not sure whether this should be it's own issue it's somehow related to #64
Let's assume I draw this brain and then I want to rotate the brain. How can I do this?
This seems to be a big probably which is currently in my head.
A different example might make this clearer;
I want to draw a graph with nodes and edges and animate some stuff and then I want to scale it down and move it to a corner of the animation just to still show it and draw something else.
We somehow need to be able to combine actions into a layer than can be accessed later. I neither know a good interface for it nor how to implement it so this is just one idea:
And it would pick the latest version of that layer then which I think makes sense. Any other ideas just for the user interface @TheCedarPrince ?
The text was updated successfully, but these errors were encountered: