mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-20 09:34:42 -05:00
Merge pull request #724 from ousttrue/fix10/fix_simpleviewer
use SetWeight
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user