Switch to animating visibility, remove flicker

This commit is contained in:
Ian Gulliver
2021-05-13 05:02:05 +00:00
parent b491fbd9fc
commit 65a1b6d942
3 changed files with 9 additions and 9 deletions

View File

@@ -13,21 +13,21 @@ export class SequenceTile extends AnimatableTile {
tile.elem.style.position = 'absolute';
tile.elem.style.top = '0';
tile.elem.style.left = '0';
tile.elem.style.opacity = '0.0';
tile.elem.style.visibility = 'hidden';
animation = tile.elem.animate([
{
'offset': 0,
'easing': 'step-end',
'opacity': '0.0',
'visibility': 'hidden',
},
{
'offset': i * tile_chunk,
'easing': 'step-end',
'opacity': '1.0',
'visibility': 'visible',
},
{
'offset': (i + 1) * tile_chunk,
'opacity': '0.0',
'visibility': 'hidden',
},
], {
'duration': tiles.length * delay,