public void Update(LayerModel layerModel, bool updateAnimations)
{
// TODO: Generic implementation
// Reset animation progress if layer wasn't drawn for 100ms
if ((new TimeSpan(0, 0, 0, 0, 100) < DateTime.Now - layerModel.LastRender) && updateAnimations)
layerModel.Properties.AnimationProgress = 0;
var progress = layerModel.Properties.AnimationProgress;
if (MustExpire(layerModel))
progress = 0;
progress = progress + layerModel.Properties.AnimationSpeed/2.5;
// If not previewing, store the animation progress in the actual model for the next frame
if (updateAnimations)
layerModel.Properties.AnimationProgress = progress;
}