Repository navigation
Closed
Labels
area/skia ✏️Categorizes an issue or PR as relevant to Skiadifficulty/challenging 🤯Categorizes an issue for which the difficulty level is reachable with internals understandingkind/bugSomething isn't workingplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platformproject/animations 🎡Categorizes an issue or PR as relevant to animations
Description
Current behavior
The circle in the repro does not move
Expected behavior
The circle in the repro should move.
How to reproduce it (as minimally and precisely as possible)
<Grid>
<StackPanel>
<Button x:Name="btnStart" Content="Start" Click="btnStart_Click"></Button>
<Canvas Height="300" Width="400">
<Canvas.Background>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<LinearGradientBrush.GradientStops>
<GradientStop Offset="0.0" Color="Cyan" />
<GradientStop Offset="1.0" Color="White" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Canvas.Background>
<Ellipse Name="bouncingBall" Height="50" Width="50">
<behaviors:DynamicAnimation.Storyboard>
<Storyboard x:Name="stb">
<DoubleAnimation
Storyboard.TargetName="bouncingBall"
Storyboard.TargetProperty="(Canvas.Top)"
From="0"
To="250"
Duration="0:0:2"
RepeatBehavior="Forever"
AutoReverse="True"
/>
<DoubleAnimation
Storyboard.TargetName="bouncingBall"
Storyboard.TargetProperty="(Canvas.Left)"
From="0"
To="350"
Duration="0:0:15"
RepeatBehavior="Forever"
/>
<!-- this is applied properly -->
<ObjectAnimationUsingKeyFrames
Storyboard.TargetName="bouncingBall"
Storyboard.TargetProperty="Opacity">
<DiscreteObjectKeyFrame KeyTime="0" Value="0.5" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</behaviors:DynamicAnimation.Storyboard>
<Ellipse.Fill>
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
<LinearGradientBrush.GradientStops>
<GradientStop Color="White" Offset="0.0" />
<GradientStop Color="Red" Offset="0.75" />
<GradientStop Color="DarkRed" Offset="1.0" />
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Ellipse.Fill>
</Ellipse>
</Canvas>
</StackPanel>
</Grid>Workaround
Set EnableDependentAnimation="True" on the DoubleOpacity animations.
Versions
Uno 4.2.6
Metadata
Metadata
Assignees
Labels
area/skia ✏️Categorizes an issue or PR as relevant to Skiadifficulty/challenging 🤯Categorizes an issue for which the difficulty level is reachable with internals understandingkind/bugSomething isn't workingplatform/wasm 🌐Categorizes an issue or PR as relevant to the WebAssembly platformproject/animations 🎡Categorizes an issue or PR as relevant to animations
Activity
[-][Wasm] `DoubleAnimation` on `Canvas.Top` or `Canvas.Left` is not working[/-][+][Wasm][Skia] `DoubleAnimation` on `Canvas.Top` or `Canvas.Left` is not working[/+]jeromelaban commentedon Apr 27, 2022
@dr1rrb The issue is caused by animations being skipped because of this:
uno/src/Uno.UI/UI/Xaml/Media/Animation/DoubleAnimationUsingKeyFrames.cs
Line 196 in 157226f
Should we be enabling dependent animations on Skia/Wasm until we get actual Compositor based animations?
dr1rrb commentedon Jul 19, 2022
Well I don't think that we should enable them by default. Even if currently we are animating on dispatcher, we should run only animations that "should" be independent (unless flag has been enabled in the app).
MartinZikmund commentedon May 16, 2023
Closing in favor of #12301, as this is present on all targets