fix CurveMapper initialValues

This commit is contained in:
ousttrue 2018-04-05 21:27:19 +09:00
parent 87a7212a4c
commit 03babfaba3
4 changed files with 25 additions and 13 deletions

View File

@ -12,10 +12,22 @@ namespace VRM
public AnimationCurve Curve = AnimationCurve.Linear(0, 0, 1.0f, 1.0f);
[Range(20.0f, 90.0f)]
public float CurveXRangeDegree = 90.0f;
public float CurveXRangeDegree;
[Range(0, 90.0f)]
public float CurveYRangeDegree = 10.0f;
public float CurveYRangeDegree;
/*
public CurveMapper() : this(90.0f, 10.0f)
{
}
*/
public CurveMapper(float xRange, float yRange)
{
CurveXRangeDegree = xRange;
CurveYRangeDegree = yRange;
}
public void OnValidate()
{

View File

@ -28,16 +28,16 @@ namespace VRM
public OffsetOnTransform Head;
[SerializeField, Header("Degree Mapping")]
public CurveMapper HorizontalOuter = new CurveMapper();
public CurveMapper HorizontalOuter = new CurveMapper(90.0f, 10.0f);
[SerializeField]
public CurveMapper HorizontalInner = new CurveMapper();
public CurveMapper HorizontalInner = new CurveMapper(90.0f, 10.0f);
[SerializeField]
public CurveMapper VerticalDown = new CurveMapper();
public CurveMapper VerticalDown = new CurveMapper(90.0f, 10.0f);
[SerializeField]
public CurveMapper VerticalUp = new CurveMapper();
public CurveMapper VerticalUp = new CurveMapper(90.0f, 10.0f);
public Texture2D CreateThumbnail()
{

View File

@ -9,13 +9,13 @@ namespace VRM
public bool DrawGizmo = true;
[SerializeField, Header("Degree Mapping")]
public CurveMapper Horizontal = new CurveMapper();
public CurveMapper Horizontal = new CurveMapper(90.0f, 1.0f);
[SerializeField]
public CurveMapper VerticalDown = new CurveMapper();
public CurveMapper VerticalDown = new CurveMapper(90.0f, 1.0f);
[SerializeField]
public CurveMapper VerticalUp = new CurveMapper();
public CurveMapper VerticalUp = new CurveMapper(90.0f, 1.0f);
VRMLookAtHead m_head;
VRMBlendShapeProxy m_propxy;

View File

@ -16,16 +16,16 @@ namespace VRM
public OffsetOnTransform RightEye;
[SerializeField, Header("Degree Mapping")]
public CurveMapper HorizontalOuter = new CurveMapper();
public CurveMapper HorizontalOuter = new CurveMapper(90.0f, 10.0f);
[SerializeField]
public CurveMapper HorizontalInner = new CurveMapper();
public CurveMapper HorizontalInner = new CurveMapper(90.0f, 10.0f);
[SerializeField]
public CurveMapper VerticalDown = new CurveMapper();
public CurveMapper VerticalDown = new CurveMapper(90.0f, 10.0f);
[SerializeField]
public CurveMapper VerticalUp = new CurveMapper();
public CurveMapper VerticalUp = new CurveMapper(90.0f, 10.0f);
private void Reset()
{