private static string Parse(string spec, float lifetime) { var parsed = ParserKeyframes.Parse(Encoding.Default.GetBytes(spec), lifetime); Assert.NotNull(parsed); var result = ""; foreach (var frame in parsed.GetFrames()) { if (result != "") { result += " -> "; } result += $"{frame.value}@{frame.start.ToString(CultureInfo.InvariantCulture)}"; } return(result); }
public static PartSysParamKeyframes ParseKeyframes(ReadOnlySpan <byte> value, float parentLifespan) { return(ParserKeyframes.Parse(value, parentLifespan)); }