ハーネスのケースと基準値を加える
このコミットが含まれているのは:
2ファイル変更
+259
-7
検索条件に一致するファイルはありません
@@ -1,21 +1,77 @@
|
||||
using YukkuriMovieMaker.Plugin.Effects;
|
||||
using System.Globalization;
|
||||
using YukkuriMovieMaker.Commons;
|
||||
using YukkuriMovieMaker.Json;
|
||||
|
||||
namespace Inflate.Harness;
|
||||
|
||||
internal static class HarnessCases
|
||||
{
|
||||
public static IEnumerable<(string Name, IVideoEffect Effect, IReadOnlyList<int> Frames)> All()
|
||||
public static IEnumerable<(string Name, InflateEffect Effect, IReadOnlyList<int> Frames)> All()
|
||||
{
|
||||
yield break;
|
||||
yield return ("default", Create(), [0]);
|
||||
yield return ("height-animated-frames", Create(effect => effect.Height.CopyFrom(Linear(20d, 200d))), [0, 100, 200, 299]);
|
||||
yield return ("light-animated-frames", Create(effect => effect.LightDirection.CopyFrom(Linear(-135d, 135d))), [0, 100, 200, 299]);
|
||||
yield return ("amount-0", Create(effect => effect.Amount.Values[0].Value = 0), [0]);
|
||||
yield return ("amount-50", Create(effect => effect.Amount.Values[0].Value = 50), [0]);
|
||||
yield return ("height-0", Create(effect => effect.Height.Values[0].Value = 0), [0]);
|
||||
yield return ("height-50", Create(effect => effect.Height.Values[0].Value = 50), [0]);
|
||||
yield return ("height-300", Create(effect => effect.Height.Values[0].Value = 300), [0]);
|
||||
yield return ("quality-balanced", Create(effect => effect.Quality = InflateQuality.Balanced), [0]);
|
||||
yield return ("quality-ultra", Create(effect => effect.Quality = InflateQuality.Ultra), [0]);
|
||||
yield return ("light-direction-90", Create(effect => effect.LightDirection.Values[0].Value = 90), [0]);
|
||||
yield return ("light-direction-minus-135", Create(effect => effect.LightDirection.Values[0].Value = -135), [0]);
|
||||
yield return ("light-elevation-0", Create(effect => effect.LightElevation.Values[0].Value = 0), [0]);
|
||||
yield return ("light-elevation-90", Create(effect => effect.LightElevation.Values[0].Value = 90), [0]);
|
||||
yield return ("ambient-0", Create(effect => effect.Ambient.Values[0].Value = 0), [0]);
|
||||
yield return ("ambient-100", Create(effect => effect.Ambient.Values[0].Value = 100), [0]);
|
||||
yield return ("specular-0", Create(effect => effect.Specular.Values[0].Value = 0), [0]);
|
||||
yield return ("specular-200", Create(effect => effect.Specular.Values[0].Value = 200), [0]);
|
||||
yield return ("sharpness-0", Create(effect => effect.Sharpness.Values[0].Value = 0), [0]);
|
||||
yield return ("sharpness-100", Create(effect => effect.Sharpness.Values[0].Value = 100), [0]);
|
||||
yield return ("reflection-0", Create(effect => effect.Reflection.Values[0].Value = 0), [0]);
|
||||
yield return ("reflection-100", Create(effect => effect.Reflection.Values[0].Value = 100), [0]);
|
||||
yield return ("rim-0", Create(effect => effect.Rim.Values[0].Value = 0), [0]);
|
||||
yield return ("rim-100", Create(effect => effect.Rim.Values[0].Value = 100), [0]);
|
||||
yield return ("color-keep-0", Create(effect => effect.ColorKeep.Values[0].Value = 0), [0]);
|
||||
yield return ("color-keep-50", Create(effect => effect.ColorKeep.Values[0].Value = 50), [0]);
|
||||
}
|
||||
|
||||
public static IEnumerable<(string Name, Func<IVideoEffect> Create, Action<IVideoEffect> Change, int Frame)> Transitions()
|
||||
public static IEnumerable<(string Name, Func<InflateEffect> Create, Action<InflateEffect> Change, int Frame)> Transitions()
|
||||
{
|
||||
yield break;
|
||||
yield return ("amount-100-to-0", () => Create(), effect => effect.Amount.Values[0].Value = 0, 0);
|
||||
yield return ("amount-0-to-100", () => Create(effect => effect.Amount.Values[0].Value = 0), effect => effect.Amount.Values[0].Value = 100, 0);
|
||||
yield return ("amount-100-to-50", () => Create(), effect => effect.Amount.Values[0].Value = 50, 0);
|
||||
yield return ("height-100-to-200", () => Create(), effect => effect.Height.Values[0].Value = 200, 0);
|
||||
yield return ("height-100-to-0", () => Create(), effect => effect.Height.Values[0].Value = 0, 0);
|
||||
yield return ("quality-high-to-ultra", () => Create(), effect => effect.Quality = InflateQuality.Ultra, 0);
|
||||
yield return ("quality-high-to-balanced", () => Create(), effect => effect.Quality = InflateQuality.Balanced, 0);
|
||||
yield return ("light-direction-minus-45-to-90", () => Create(), effect => effect.LightDirection.Values[0].Value = 90, 0);
|
||||
yield return ("light-elevation-50-to-10", () => Create(), effect => effect.LightElevation.Values[0].Value = 10, 0);
|
||||
yield return ("ambient-30-to-0", () => Create(), effect => effect.Ambient.Values[0].Value = 0, 0);
|
||||
yield return ("specular-80-to-0", () => Create(), effect => effect.Specular.Values[0].Value = 0, 0);
|
||||
yield return ("sharpness-50-to-100", () => Create(), effect => effect.Sharpness.Values[0].Value = 100, 0);
|
||||
yield return ("reflection-30-to-100", () => Create(), effect => effect.Reflection.Values[0].Value = 100, 0);
|
||||
yield return ("rim-20-to-100", () => Create(), effect => effect.Rim.Values[0].Value = 100, 0);
|
||||
yield return ("color-keep-100-to-0", () => Create(), effect => effect.ColorKeep.Values[0].Value = 0, 0);
|
||||
}
|
||||
|
||||
public static IEnumerable<(string Name, IVideoEffect Effect)> Benchmarks()
|
||||
public static IEnumerable<(string Name, InflateEffect Effect)> Benchmarks()
|
||||
{
|
||||
yield break;
|
||||
yield return ("quality-balanced", Create(effect => effect.Quality = InflateQuality.Balanced));
|
||||
yield return ("default", Create());
|
||||
yield return ("quality-ultra", Create(effect => effect.Quality = InflateQuality.Ultra));
|
||||
yield return ("height-animated", Create(effect => effect.Height.CopyFrom(Linear(20d, 200d))));
|
||||
yield return ("light-animated", Create(effect => effect.LightDirection.CopyFrom(Linear(-135d, 135d))));
|
||||
yield return ("amount-0", Create(effect => effect.Amount.Values[0].Value = 0));
|
||||
}
|
||||
|
||||
static Animation Linear(double from, double to)
|
||||
=> Json.LoadFromText<Animation>(string.Create(CultureInfo.InvariantCulture, $$"""{"AnimationType":"直線移動","Values":[{"Value":{{from}}},{"Value":{{to}}}]}""")) ?? throw new HarnessException("アニメーションを読み込めません。");
|
||||
|
||||
public static InflateEffect Create(Action<InflateEffect>? configure = null)
|
||||
{
|
||||
var effect = new InflateEffect();
|
||||
configure?.Invoke(effect);
|
||||
return effect;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,196 @@
|
||||
{
|
||||
"adapter": "Intel(R) Iris(R) Xe Graphics",
|
||||
"driver": "32.0.101.7085",
|
||||
"input": "synthetic 640x480 89838D8976198E40",
|
||||
"canvas": "1280x720",
|
||||
"cases": [
|
||||
{
|
||||
"name": "default",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "5E413532E9415A974D6DDEEE25682B2B11FE5E8F502EFEBA56ACB35E157E14BF"
|
||||
},
|
||||
{
|
||||
"name": "height-animated-frames",
|
||||
"frames": [
|
||||
0,
|
||||
100,
|
||||
200,
|
||||
299
|
||||
],
|
||||
"hash": "B695C5496E09CBF56A5A2A1DACAD97BE0FEC83649665FD673B5049B9A0240CDC"
|
||||
},
|
||||
{
|
||||
"name": "light-animated-frames",
|
||||
"frames": [
|
||||
0,
|
||||
100,
|
||||
200,
|
||||
299
|
||||
],
|
||||
"hash": "4EBEE322F9C5D68344BF6A929A56BCE1EB1BFC82BAAA8ACF5B49DDA993E7FE3C"
|
||||
},
|
||||
{
|
||||
"name": "amount-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "0A700F76CEDDBAD7C4B6A2C19D46939C1A93940E86C6EFEF1E5A53DB48D2A020"
|
||||
},
|
||||
{
|
||||
"name": "amount-50",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "80B04573FA947CC8CBAAD0464AF935D0558C60A2FBB8B8E4C415C3650EFDCE97"
|
||||
},
|
||||
{
|
||||
"name": "height-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "7046BFF0FE9B95E20B1A142AF79B2C9D1042A47A0D68BF3FF7D4B4BA28470749"
|
||||
},
|
||||
{
|
||||
"name": "height-50",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "5B61BDC0C355F058EAEC780AA2038195270229450EFCE5CF144F9F808AA356D8"
|
||||
},
|
||||
{
|
||||
"name": "height-300",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "EF745CFC3E153115047A8748890DF22B3DB47A46C1B321E5FC59E15D95C79CFB"
|
||||
},
|
||||
{
|
||||
"name": "quality-balanced",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "16E840EF062E69ADAF4169A2196922F856654FB3E68AC50449920B05135810C9"
|
||||
},
|
||||
{
|
||||
"name": "quality-ultra",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "E676677800943FB2F27A36A2F8B6791DD92CFF6FAA2E16C1C0E757BACBD531CC"
|
||||
},
|
||||
{
|
||||
"name": "light-direction-90",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "2B96BF50BB42FD6EB308CBCF2395DB0BF4CEC8DAC27D8A98BDEDE7AB4B2DAEA2"
|
||||
},
|
||||
{
|
||||
"name": "light-direction-minus-135",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "4E421D920DE5CC8E2E21B8A8A7C09B00A6E1C6EB7BD946128A65B84B62E73508"
|
||||
},
|
||||
{
|
||||
"name": "light-elevation-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "B724612D295FD7F3219822D21A71086F1EA72512E852B697CEA737AB5A868442"
|
||||
},
|
||||
{
|
||||
"name": "light-elevation-90",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "687C4DE2C04BBEB8FFC30CF95600E5A0326BA3163C6547E2866A62DAE17E210C"
|
||||
},
|
||||
{
|
||||
"name": "ambient-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "E6814D23030735EC00B07434F82D23CCBA0C0ED4091AE0A7DBE8E1195061C4FB"
|
||||
},
|
||||
{
|
||||
"name": "ambient-100",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "7089598AB75AF71CA580322372CDB51BCDE105A2CD211A7EC5F17C3843BB088D"
|
||||
},
|
||||
{
|
||||
"name": "specular-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "7520B4CD0CE60B9600358D7C1090EF86C1A15BC85EFD41EAD427A07A2F0EA36C"
|
||||
},
|
||||
{
|
||||
"name": "specular-200",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "6427A36A5CB1AFC3E71B607D2A5A2375A1881B0EA2C193DD1D452794FE143033"
|
||||
},
|
||||
{
|
||||
"name": "sharpness-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "E9F7A660C14C45DE4FE1599DBE0611A5FC155B7B78F852E6BAAA53E32DF16289"
|
||||
},
|
||||
{
|
||||
"name": "sharpness-100",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "A90DFB5EAABA348DCD0B1B09D3CB638FCDF20525DBB25723FD5B4707286CF318"
|
||||
},
|
||||
{
|
||||
"name": "reflection-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "63AA58C0655B582EAE4E65B6C79D92931314B858370AD1C044EB3346A99CE25F"
|
||||
},
|
||||
{
|
||||
"name": "reflection-100",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "246D5AF1BE35F2BDA8E69E945E1917998A677C0C3700CB3FAFE08BF5B42F10B9"
|
||||
},
|
||||
{
|
||||
"name": "rim-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "722F6F84AFFC6B3AD0164F7CF5330FE242C5E91C98A74D21E102C042004E32EB"
|
||||
},
|
||||
{
|
||||
"name": "rim-100",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "1CB27C4FB9488F9E67CFED6D43511B55C943FB3CF294A0D8B5143C7ABF61E8F1"
|
||||
},
|
||||
{
|
||||
"name": "color-keep-0",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "14D6472254538AE72FC12F4AD0A6E577AC53AB377988021AD265019BA6564870"
|
||||
},
|
||||
{
|
||||
"name": "color-keep-50",
|
||||
"frames": [
|
||||
0
|
||||
],
|
||||
"hash": "7FB457792C18D7F1308ED9974FA2BDE33E8E02A5D0F65895F8AA237297BA0A7F"
|
||||
}
|
||||
]
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする