增加LineChart的Animation初始化动画配置支持

This commit is contained in:
monitor1394
2019-09-02 08:43:52 +08:00
parent 8c3ec020e2
commit e5ce16e076
12 changed files with 11756 additions and 16941 deletions

View File

@@ -230,11 +230,13 @@ namespace XCharts
public static void DrawLine(VertexHelper vh, Vector3 p1, Vector3 p2, float size, Color32 color)
{
if (p1 == p2) return;
Vector3 v = Vector3.Cross(p2 - p1, Vector3.forward).normalized * size;
vertex[0].position = p1 + v;
vertex[1].position = p2 + v;
vertex[2].position = p2 - v;
vertex[3].position = p1 - v;
vertex[0].position = p1 - v;
vertex[1].position = p2 - v;
vertex[2].position = p2 + v;
vertex[3].position = p1 + v;
for (int j = 0; j < 4; j++)
{
vertex[j].color = color;