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

MeltyPlayer / MeltyTool / 20982513833

14 Jan 2026 04:35AM UTC coverage: 41.138% (-0.8%) from 41.907%
20982513833

push

github

MeltyPlayer
Fixed broken shader source tests.

6752 of 18485 branches covered (36.53%)

Branch coverage included in aggregate %.

28650 of 67572 relevant lines covered (42.4%)

64006.02 hits per line

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

82.35
/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 int AnimationLength => sharedConfig.AnimationLength;
×
30
  public bool Looping => sharedConfig.Looping;
×
31

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

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

45
    if (this.IndividualConfig.DefaultValue?.Try(out value) ?? false) {
13✔
46
      return true;
5✔
47
    }
48

49
    value = default!;
3✔
50
    return false;
3✔
51
  }
50✔
52

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

60
    dst.Fill(defaultValue);
4✔
61
    if (this.impl_.Count == 0) {
4!
62
      return;
×
63
    }
64

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

74
  // TODO: Implement this
75
  public bool TryGetSimpleKeyframes(
76
      out IReadOnlyList<(float frame, T value)> keyframes,
77
      out IReadOnlyList<(T tangentIn, T tangentOut)>? tangentKeyframes) {
×
78
    keyframes = null;
×
79
    tangentKeyframes = null;
×
80
    return false;
×
81
  }
×
82
}
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