• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MeltyPlayer / MeltyTool / 17993985084

25 Sep 2025 01:17AM UTC coverage: 39.931%. Remained the same
17993985084

push

github

MeltyPlayer
Used concrete types throughout solution.

5826 of 16491 branches covered (35.33%)

Branch coverage included in aggregate %.

44 of 85 new or added lines in 38 files covered. (51.76%)

1 existing line in 1 file now uncovered.

24549 of 59577 relevant lines covered (41.21%)

71883.78 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.85
/FinModelUtility/Fin/Fin/src/animation/keyframes/StairStepKeyframes.cs
1
using System;
2
using System.Collections.Generic;
3

4
using fin.animation.interpolation;
5

6
using readOnly;
7

8
namespace fin.animation.keyframes;
9

10
[GenerateReadOnly]
11
public partial interface IStairStepKeyframes<T>
12
    : IKeyframes<Keyframe<T>>, IConfiguredInterpolatable<T>;
13

14
public sealed class StairStepKeyframes<T>(
3,965✔
15
    ISharedInterpolationConfig sharedConfig,
3,965✔
16
    IndividualInterpolationConfig<T>? individualConfig = null)
3,965✔
17
    : IStairStepKeyframes<T> {
18
  private readonly List<Keyframe<T>> impl_
3,965✔
19
      = new(individualConfig?.InitialCapacity ?? 0);
3,965✔
20

21
  public ISharedInterpolationConfig SharedConfig => sharedConfig;
×
22

23
  public IndividualInterpolationConfig<T> IndividualConfig
24
    => individualConfig ?? IndividualInterpolationConfig<T>.DEFAULT;
62✔
25

26
  public IReadOnlyList<Keyframe<T>> Definitions => this.impl_;
8✔
27
  public bool HasAnyData => this.Definitions.Count > 0;
×
28

29
  public void Add(Keyframe<T> keyframe) => this.impl_.AddKeyframe(keyframe);
214✔
30

31
  public bool TryGetAtFrame(float frame, out T value) {
50✔
32
    if (this.impl_.TryGetPrecedingKeyframe(frame,
50✔
33
                                           sharedConfig,
50✔
34
                                           this.IndividualConfig,
50✔
35
                                           out var keyframe,
50✔
36
                                           out _,
50✔
37
                                           out _)) {
92✔
38
      value = keyframe.ValueOut;
42✔
39
      return true;
42✔
40
    }
41

42
    if (this.IndividualConfig.DefaultValue?.Try(out value) ?? false) {
13✔
43
      return true;
5✔
44
    }
45

46
    value = default!;
3✔
47
    return false;
3✔
48
  }
50✔
49

50
  public void GetAllFrames(Span<T> dst) {
4✔
51
    T defaultValue = default!;
4✔
52
    this.IndividualConfig.DefaultValue?.Try(out defaultValue);
4!
53
    if (sharedConfig.Looping) {
6✔
54
      defaultValue = this.impl_[^1].ValueOut;
2✔
55
    }
2✔
56

57
    dst.Fill(defaultValue);
4✔
58
    if (this.impl_.Count == 0) {
4!
59
      return;
×
60
    }
61

62
    var f = dst.Length - 1;
4✔
63
    for (var k = this.impl_.Count - 1; k >= 0; --k) {
50✔
64
      var keyframe = this.impl_[k];
14✔
65
      while (f >= keyframe.Frame) {
70✔
66
        dst[f--] = keyframe.ValueOut;
28✔
67
      }
28✔
68
    }
14✔
69
  }
4✔
70

71
  // TODO: Implement this
72
  public bool TryGetSimpleKeyframes(
73
      out IReadOnlyList<(float frame, T value)> keyframes,
74
      out IReadOnlyList<(T tangentIn, T tangentOut)>? tangentKeyframes) {
×
NEW
75
    keyframes = null;
×
76
    tangentKeyframes = null;
×
77
    return false;
×
78
  }
×
79
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc