Exemplo n.º 1
0
        public static Mesh BarGraph(float width, float height, float spacing, params float[] values)
        {
            width   = math.clamp(width, 0, float.MaxValue);
            height  = math.clamp(height, 0, float.MaxValue);
            spacing = math.clamp(spacing, 0, float.MaxValue);
            float offset  = width + spacing;
            var   builder = QuadBuilder.Create(values.Length);

            for (int i = 0; i < values.Length; i++)
            {
                builder.CreateQuad(width, math.lerp(0f, height, values[i]), new float3(i * offset, 0, 0));
            }
            return(builder);
        }
Exemplo n.º 2
0
 public static Mesh Quad(float4 uvs) => QuadBuilder.Create().CreateQuad(new float3(0), new float3(0), new float3(1), uvs);
Exemplo n.º 3
0
 public static Mesh Quad() => QuadBuilder.Create().CreateQuad(new float3(0));