leios / Fable.jl

General purpose animations via iterated function systems
MIT License
28 stars 4 forks source link

Time Interface discussion #53

Open leios opened 1 year ago

leios commented 1 year ago

Right now, the time interface in Fae.jl is a bit sticky, but I am honestly not sure the right abstraction to use here. For now, I like the following:

  1. Users can use Floats, Ints, or Unitful quantities (of time) to specify their current time during any visualization
  2. We are able to pass a frame argument to each FractalUserMethod to be used how the user wishes

I do not like the fact that the user needs to know ahead-of-time how many frames to render and put their run! statements in a for loop. As a simple abstraction, I could write a render!(layers, t1, t2) command that renders all layers from t1 to t2 as:

function render!(layers, t1, t2)
    for i = frame(t1):frame(t2)
        run!(layers)
    end
end

But I need to think about this a bit.