holoviz-topics / imagen

ImaGen: Generic Python library for 0D, 1D and 2D pattern distributions
https://imagen.holoviz.org/
BSD 3-Clause "New" or "Revised" License
31 stars 16 forks source link

Patterns using time_fn should be TimeDependent #35

Open jlstevens opened 10 years ago

jlstevens commented 10 years ago

There are several pattern generators that use time_fn independently when they should be (mix-in) subclasses of `TimeDependent``. The following classes should be defined as follows:

class Translator(PatternGenerator, numbergen.TimeDependent):
   ...

class Sweeper(PatternGenerator, numbergen.TimeDependent):
   ...

class Animation(SheetStack, numbergen.TimeDependent):
   ...

They should all use self._check_time_fn() in the constructor. This change will allow the global time_fn to be set in one place.

jbednar commented 10 years ago

I agree with this proposed change.