public override void SetPXValue(PXValue pxValue, float id01)
 {
     for (int chl = 0; chl < _ChannelCurves.Count; chl++)
     {
         float value = _ChannelCurves[chl].Evaluate(id01);
         pxValue.LerpValue(value, 1.0f, chl);
     }
 }
Пример #2
0
        // ----------------- assist  -------------------------------------------
        private void PaintOnPXValue(
            float lerpT, Vector2 vel, PXValue pXValue)
        {
            float val0, val1;

            GetVal2_RadiusTheta(vel, out val0, out val1);

            float alpha  = GetPaintAlpha(Time.deltaTime, pXValue);
            float lerpT2 = lerpT * alpha;

            float   v00  = pXValue.GetValue(0);
            float   v10  = pXValue.GetValue(1);
            Vector2 vec0 = GetVec2FromRT(v00, v10);
            Vector2 vec1 = Vector2.Lerp(vec0, vel, lerpT);

            Vector2 rt = GetRTFromVec2(vec1);

            pXValue.LerpValue(rt.x, 1.0f, 0);
            pXValue.LerpValue(rt.y, 1.0f, 1);
        }
Пример #3
0
        public void PaintOnPxValue(PXValue pXValue, float dt)
        {
            Vector2 Offset =
                (Vector2)(pXValue.transform.position -
                          transform.position);
            float dist    = Offset.magnitude;
            float scl     = 0.5f * (transform.localScale.x + transform.localScale.y);
            float dist01  = dist / scl;
            float brAlpha = GetBrushAlpha(dist01, _Softness);
            float alpha   = brAlpha * dt * _Power;

            for (int i = 0; i < _Values.Count; i++)
            {
                pXValue.LerpValue(_Values[i], alpha, i);
            }
        }
Пример #4
0
        public void LerpSetValues(List <float> values, float lerpT)
        {
            PXValue pXValue = CheckPXValue();

            if (!pXValue)
            {
                return;
            }

            if (_bMousePressed)
            {
                for (int chl = 0; chl < values.Count; chl++)
                {
                    float v = values[chl];
                    pXValue.LerpValue(v, lerpT, chl);
                }
            }
        }