Example #1
0
    void CalculAnimation()
    {
        for (int i = 0; i < nbKeys; i++)
        {
            allValues[i] = randomizeValues(defaultValues.Length);
        }

        calculInterpolation();


        NA_AnimateSynthTwister anim = GetComponent <NA_AnimateSynthTwister>();

        anim.SetValuesAndInterpolation(allValues, interpolatePositions, nbFrames, nbKeys);

        NA_Simple_CurveMaker cmk = GetComponent <NA_Simple_CurveMaker>();

        cmk.StartCurveMaker(nbPoints, nbCircles, amplitude, material);
    }
Example #2
0
    void BuildSynthTwister()
    {
        for (int i = 0; i < nbKeys; i++)
        {
            allValues[i] = randomizeValues(defaultValues.Length);
        }

        calculInterpolation();

        GameObject newTwister = GameObject.Instantiate(twister);

        newTwister.transform.localScale = new Vector3(scale, scale, scale);
        newTwister.transform.position   = transform.position;
        NA_AnimateSynthTwister anim = newTwister.GetComponent <NA_AnimateSynthTwister>();

        anim.SetValuesAndInterpolation(allValues, interpolatePositions, nbFrames, nbKeys);

        NA_Simple_CurveMaker cmk = newTwister.GetComponent <NA_Simple_CurveMaker>();

        cmk.StartCurveMaker(nbPoints, nbCircles, amplitude, material);
    }