Merge pull request #724 from ousttrue/fix10/fix_simpleviewer

use SetWeight
This commit is contained in:
PoChang007
2021-02-03 15:37:08 +09:00
committed by GitHub
2 changed files with 8 additions and 8 deletions

View File

@@ -30,17 +30,17 @@ namespace UniVRM10.Samples
{
for (var value = 0.0f; value <= 1.0f; value += velocity)
{
VRM.Expression.Accumulator.SetPresetValue(preset, value);
VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), value);
yield return null;
}
VRM.Expression.Accumulator.SetPresetValue(preset, 1.0f);
VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), 1.0f);
yield return new WaitForSeconds(wait);
for (var value = 1.0f; value >= 0; value -= velocity)
{
VRM.Expression.Accumulator.SetPresetValue(preset, value);
VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), value);
yield return null;
}
VRM.Expression.Accumulator.SetPresetValue(preset, 0);
VRM.Expression.SetWeight(ExpressionKey.CreateFromPreset(preset), 0);
yield return new WaitForSeconds(wait * 2);
}

View File

@@ -72,10 +72,10 @@ namespace UniVRM10.Samples
break;
}
m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, value);
m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), value);
yield return null;
}
m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, 1.0f);
m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), 1.0f);
// wait...
yield return new WaitForSeconds(ClosingTime);
@@ -91,10 +91,10 @@ namespace UniVRM10.Samples
break;
}
m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, value);
m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), value);
yield return null;
}
m_controller.Expression.Accumulator.SetPresetValue(VrmLib.ExpressionPreset.Blink, 0);
m_controller.Expression.SetWeight(ExpressionKey.CreateFromPreset(VrmLib.ExpressionPreset.Blink), 0);
}
}