增加Settings中关于关于材质球设置的参数 #140

This commit is contained in:
monitor1394
2021-05-01 22:43:17 +08:00
parent a7f1723559
commit 95b9917220
10 changed files with 90 additions and 0 deletions

View File

@@ -19,6 +19,9 @@ namespace XCharts
{
[SerializeField] [Range(1, 20)] protected int m_MaxPainter = 10;
[SerializeField] protected bool m_ReversePainter = false;
[SerializeField] protected Material m_BasePainterMaterial;
[SerializeField] protected Material m_SeriePainterMaterial;
[SerializeField] protected Material m_TopPainterMaterial;
[SerializeField] [Range(1, 10)] protected float m_LineSmoothStyle = 3f;
[SerializeField] [Range(1f, 20)] protected float m_LineSmoothness = 2f;
[SerializeField] [Range(1f, 20)] protected float m_LineSegmentDistance = 3f;
@@ -44,6 +47,30 @@ namespace XCharts
set { if (PropertyUtil.SetStruct(ref m_ReversePainter, value)) SetVerticesDirty(); }
}
/// <summary>
/// Base Pointer 材质球设置后会影响Axis等。
/// </summary>
public Material basePainterMaterial
{
get { return m_BasePainterMaterial; }
set { if (PropertyUtil.SetClass(ref m_BasePainterMaterial, value)) SetComponentDirty(); }
}
/// <summary>
/// Serie Pointer 材质球设置后会影响所有Serie。
/// </summary>
public Material seriePainterMaterial
{
get { return m_SeriePainterMaterial; }
set { if (PropertyUtil.SetClass(ref m_SeriePainterMaterial, value)) SetComponentDirty(); }
}
/// <summary>
/// Top Pointer 材质球设置后会影响Tooltip等。
/// </summary>
public Material topPainterMaterial
{
get { return m_TopPainterMaterial; }
set { if (PropertyUtil.SetClass(ref m_TopPainterMaterial, value)) SetComponentDirty(); }
}
/// <summary>
/// Curve smoothing factor. By adjusting the smoothing coefficient, the curvature of the curve can be changed,
/// and different curves with slightly different appearance can be obtained.
/// 曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。
@@ -110,6 +137,9 @@ namespace XCharts
{
m_ReversePainter = settings.reversePainter;
m_MaxPainter = settings.maxPainter;
m_BasePainterMaterial = settings.basePainterMaterial;
m_SeriePainterMaterial = settings.seriePainterMaterial;
m_TopPainterMaterial = settings.topPainterMaterial;
m_LineSmoothStyle = settings.lineSmoothStyle;
m_LineSmoothness = settings.lineSmoothness;
m_LineSegmentDistance = settings.lineSegmentDistance;