コード例 #1
0
    public override void Draw()
    {
        base.Draw();
        int   _DIVS_X        = 20;
        int   _DIVS_Y        = 20;
        float _txt_x         = 0.1f;
        float _txt_y         = 0.9f;
        float _start_x       = 0.1f;
        float _start_y       = 0.1f;
        float _w             = 0.7f;
        float _h             = 0.7f;
        float _grid_offset_x = Anim.PNoise(0.1f, 0.05f);
        float _grid_offset_y = Anim.PNoise(0.1f, 0.05f, _offsetA: 0.5f, _offsetB: 0.1f);
        Color _gridColour    = P.Get(2);
        Color _TXT_COL       = P.Lerp(3, 4, Anim.Sin_Time(10));
        float _TXT_SIZE      = Anim.Cos_Time(15, 0.0035f, 0.005f);

        if (timeRemaining < 0.2f)
        {
            TXT("DOTS", _txt_x, _txt_y, _TXT_COL, _TXT_SIZE);
            GL_DRAW.Draw_GRID_DOT(_start_x, _start_y, _w, _h, _DIVS_X, _DIVS_Y, _gridColour);
        }
        else if (timeRemaining < 0.4f)
        {
            TXT("LINES", _txt_x, _txt_y, _TXT_COL, _TXT_SIZE);
            GL_DRAW.Draw_GRID_LINE(_start_x, _start_y, _w, _h, _DIVS_X, _DIVS_Y, _gridColour, _grid_offset_x, _grid_offset_y);
        }
        else if (timeRemaining < 0.6f)
        {
            TXT("triangles", _txt_x, _txt_y, _TXT_COL, _TXT_SIZE);
            GL_DRAW.Draw_GRID_NGON(_start_x, _start_y, _w, _h, _DIVS_X, _DIVS_Y, 3, 0.01f, _gridColour);
        }
        else
        {
            TXT("zoom!!", _txt_x, _txt_y, _TXT_COL, _TXT_SIZE);
            GL_DRAW.Draw_ZOOM_GRID(_start_x, _start_y, _w, _h, _gridColour, _DIVS_X, _DIVS_Y, mx_eased, my_eased, 0.1f);
        }
    }
コード例 #2
0
    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++)
        {
        }
    }