public override void Draw()
    {
        base.Draw();

        float _startX  = 0.1f;
        float _w       = 0.8f;
        float _h       = 0.075f;
        float _offsetA = 0.1f;
        float _offsetB = 0.05f;
        Color _colA    = P.Get(3);
        Color _colB    = P.Get(4);

        HUD.Draw_HISTOGRAM_LINE_X(_startX, 0.05f, _w, _h, _colA, _colB, VALUES.RandomValues_NOISE_TIME(15, _offsetA: _offsetA, _offsetB: _offsetB));
        HUD.Draw_HISTOGRAM_BAR_X(_startX, 0.14f, _w, _h, _colA, _colB, 1f, false, VALUES.RandomValues_NOISE_TIME(30, _offsetA: _offsetA, _offsetB: _offsetB));
        HUD.Draw_HISTOGRAM_BAR_X(_startX, 0.21f, _w, _h, _colB, _colA, 0.9f, true, VALUES.RandomValues_NOISE_TIME(20, _offsetA: _offsetA, _offsetB: _offsetB));
        HUD.Draw_HISTOGRAM_POLY(_startX, 0.29f, _w, _h, _colB, VALUES.RandomValues_NOISE_TIME(5, _offsetA: _offsetA * 2f, _offsetB: _offsetB * 2f));
        HUD.Draw_HISTOGRAM_POLY_FILL(_startX, 0.36f, _w, _h, _colA, _colB, VALUES.RandomValues_NOISE_TIME(5, _offsetA: _offsetA * 2f, _offsetB: _offsetB * 2f));

        HUD.Draw_HISTOGRAM_RADIAL(VALUES.RandomValues_NOISE_TIME(10, _offsetA: _offsetA, _offsetB: _offsetB), 0.2f, 0.6f, 0.05f, 0.15f, _colA, _colB);
        HUD.Draw_HISTOGRAM_RADIAL(VALUES.RandomValues_NOISE_TIME(40, _rateA: 1f, _rateB: 3f, _offsetA: _offsetA, _offsetB: _offsetB), 0.4f, 0.6f, 0.05f, 0.15f, _colB, _colA);

        _arcGraph1.UpdateNoise();
        _arcGraph2.UpdateNoise();

        HUD.Draw_ArcGraph(_arcGraph1, 0.6f, 0.6f, 0.05f, 0.1f, 0, 1, _colA, _colB);
        HUD.Draw_ArcGraph(_arcGraph2, 0.8f, 0.6f, 0.01f, 0.1f, 0, 0.5f, _colB, _colA, _gutterRatio: 1f);

        TXT("use methods in \"Values\" to create graphs", 0.1f, 0.9f, P.Get(4));
    }
Example #2
0
    void FloorMarker(float _x, float _y, float _size, float _value, int _dataIndex = 0, float _timeOffset = 0)
    {
        Color _COL        = P.Get(3);
        float _markerSize = _HOOP_SIZE * _size;
        float _valueInv   = 1f - _value;
        float _SIZE2      = _size * 0.5f;
        float _Y_OFFSET   = Mathf.Lerp(0.01f * _size, 0.4f * _size, _value);

        // floor hoop
        DrawHoop(_x, _y, _size, 0.05f + (_valueInv * 0.2f), _angleOffset: 0);
        DrawHoop(_x, _y, _SIZE2, 0.075f + (_valueInv * 0.05f), _angleOffset: 0);

        for (int i = 0; i < 3; i++)
        {
            float _ANGLE_OFF = 0.33f * i;
            DrawHoop(_x, _y, _size * 1.5f, 0.3f, _ANGLE_OFF, _ANGLE_OFF + .1666666f, _angleOffset: Anim.Runtime(-0.1f));
        }

        // raised
        DrawHoop(_x, _y + _Y_OFFSET, _size, 0.3f, _angleOffset: 0);

        for (int i = 0; i < 4; i++)
        {
            float _ANGLE_OFF = 0.25f * i;
            DrawHoop(_x, _y + _Y_OFFSET, _size * 0.75f, 0.3f, _ANGLE_OFF, _ANGLE_OFF + .125f, _angleOffset: Anim.Runtime(0.25f, _timeOffset * 0.2f));
        }

        HUD.Draw_LABEL_LINE_X("pt :: " + _dataIndex, _x, _y, _size * 2f, _size * 0.1f, P.Get(3, 0f), _COL, _COL);

        float _statPad  = _size * 0.2f;
        float _statPad2 = _statPad * 2;
        float _stat_W   = _size * 2;
        float _stat_H   = _size * 4;
        float _stat_X   = _size + _statPad;
        float _stat_Y   = -_stat_H - (_statPad * 2);

        GL.PushMatrix();
        GL_DRAW.TransformMatrix(_x, _y);
        GL_DRAW.Draw_RECT(_stat_X, _stat_Y, _stat_W, _stat_H, _COL);
        float[] _values = VALUES.RandomValues_NOISE_TIME(5, _offsetA: _timeOffset, _offsetB: _timeOffset * 1.4f);
        sprawls[_dataIndex].Draw(_stat_X + _statPad, _stat_Y + (_stat_H * 0.75f), _stat_W - _statPad2, _stat_H * 0.2f, _COL);
        HUD.Draw_HISTOGRAM_BAR_X(_stat_X + _statPad, _stat_Y + _statPad, _stat_W - _statPad2, _stat_H * 0.5f, _COL, _COL, 0.75f, false, _values);
        HUD.Draw_HISTOGRAM_BAR_X(_stat_X + _statPad, _stat_Y - (_statPad - (_stat_H * 0.75f)), _stat_W - _statPad2, _stat_H * -0.2f, P.Get(3, 0), P.Get(2), 0.75f, false, _values);
        GL.PopMatrix();
    }
    public override void Draw()
    {
        base.Draw();
        for (int i = 0; i < totalSprawls; i++)
        {
            DataSprawl _sp = sprawls[i];
            _sp.Update();
        }
        for (int i = 0; i < partitionListCount; i++)
        {
        }

        GL_DRAW.Draw_GRID_DOT(0, 0, 1, 1, 40, 40, P.Get(2, Anim.Sin_Time(25, 0.5f, 0.6f)));
        GL_DRAW.Draw_ZOOM_GRID(0, 0, 1, 1, P.Lerp(2, 3, my_eased), 20, 20, mx, my, 0.01f);

        // skewed edge rects
        GL_DRAW.SKEW(0.2f, 0f);


        HUD.Draw_LABEL_LINE_X("example: 1", 0.1f, 0.9f, Anim.Sin_Time(2f, 0.1f, 0.25f), 0.01f, P.Get(2), P.Get(3), P.Get(3));
        int   _BOXES       = 6;
        float _BOX_STARTX  = 0.1f;
        float _BOX_SIZE    = 0.05f;
        float _BOX_SPACING = 0.01f;

        for (int i = 0; i < _BOXES; i++)
        {
            HUD.Draw_LABEL_BOX(
                "exe_" + i,
                _BOX_STARTX + (i * _BOX_SIZE) + (i * _BOX_SPACING),
                0.8f,
                _BOX_SIZE,
                _BOX_SIZE,
                Anim.Sin_Time(10, 0.005f, 0.01f, i * 0.1f),
                0.1f,
                0.5f,
                P.Lerp(2, 3, (float)i / _BOXES),
                P.Get(0));
        }

        sprawls[0].Draw(0.05f, 0.5f, 0.05f, 0.2f, P.Get(3, Anim.Cos_Time(20, 0.1f, 0.15f, 0.1f)));
        sprawls[1].Draw(0.05f, 0.45f, 0.1f, 0.05f, P.Get(4, Anim.Cos_Time(20, 0.1f, 0.15f, 0.2f)));

        //GL_DRAW.Draw_RECT_FILL(0.1f, 0.5f, 0.1f, 0.1f, P.Get(2,Anim.Sin_Time(30,0.1f, 0.12f)));

        GL_DRAW.Draw_AXIS(0.1f, 0.1f, 0.1f, 0.5f, 0.01f, 0.005f, 20, 5, P.Get(2), P.Get(3));
        GL_DRAW.Draw_AXIS(0.11f, 0.1f, 0.11f, 0.5f, 0.01f, 0.005f, 40, 10, P.Get(2), P.Get(3));

        // histograms
        int   _HIST_COUNT    = 10;
        int   _BIN_COUNT     = 20;
        float _HIST_START_X  = 0.25f;
        float _HIST_START_Y  = 0.4f;
        float _HIST_END_X    = 0.4f;
        float _HIST_END_Y    = 0.1f;
        float _HIST_W        = 0.4f;
        float _BIN_W         = _HIST_W / _BIN_COUNT;
        float _HIST_H_MIN    = 0.2f;
        float _HIST_H_MAX    = 0.05f;
        float _HIST_H_DIV    = (_HIST_H_MAX - _HIST_H_MIN) / _HIST_COUNT;
        float _HIST_OFFSET_X = (_HIST_END_X - _HIST_START_X) / _HIST_COUNT;
        float _HIST_OFFSET_Y = (_HIST_END_Y - _HIST_START_Y) / _HIST_COUNT;

        for (int i = 0; i < _HIST_COUNT; i++)
        {
            int   i1  = i + 1;
            float _F  = (float)i / _HIST_COUNT;
            float _RF = 1f - _F;
            HUD.Draw_HISTOGRAM_BAR_X(_HIST_START_X + (i * _HIST_OFFSET_X), _HIST_START_Y + (i * _HIST_OFFSET_Y), _HIST_W, _HIST_H_MIN + (i * _HIST_H_DIV),
                                     P.Lerp(0, 3, _F), P.Lerp(0, 4, _F), 1, false,
                                     VALUES.RandomValues_NOISE_TIME(_BIN_COUNT, 1f, 1.1f, i1 * 0.01f, i1 * 0.02f));
        }
        float[] _polyValues = VALUES.RandomValues_NOISE_TIME(10, 1f, 1.1f, 0.1f, 0.2f, 0.1f, 0.5f);
        float   _polyX      = _HIST_END_X + (_HIST_OFFSET_X);
        float   _polyY      = _HIST_END_Y + (_HIST_OFFSET_Y);

        HUD.Draw_HISTOGRAM_POLY(_polyX, _polyY, _HIST_W, _HIST_H_MAX, P.Get(2), _polyValues);
        HUD.Draw_HISTOGRAM_LINE_X(_polyX, _polyY, _HIST_W, _HIST_H_MAX, P.Get(2), P.Get(2), _polyValues);



        for (int i = 0; i < _BIN_COUNT; i++)
        {
            DataSprawl _SPRAWL = sprawls[i];
            _SPRAWL.Draw(_HIST_END_X + (i * _BIN_W), _HIST_END_Y - 0.1f, _BIN_W, 0.05f, P.Lerp(3, 4, Anim.Sin_Time(3f, _timeOffset: i * 0.1f)));
        }

        for (int i = 0; i < partitionListCount; i++)
        {
        }
    }