예제 #1
0
        public static IEnumerator <Vector4> PerlinWith(Vector4 offset, Vector4 speed, float fps = 0f)
        {
            Source.ValidateFrameRate(ref fps);
            var f = 0f;

            for (;;)
            {
                var t = offset + (f / fps) * speed;
                yield return(new Vector4(P.Noise(t.x), P.Noise(t.y), P.Noise(t.z), P.Noise(t.w)));

                f += 1.0f;
            }
        }
예제 #2
0
        public static IEnumerator <Vector4> FbmWith(Vector4 offset, Vector4 speed, int octave, float fps = 0f)
        {
            Source.ValidateFrameRate(ref fps);
            var f = 0f;

            for (;;)
            {
                var t = offset + (f / fps) * speed;
                yield return(new Vector4(P.Fbm(t.x, octave), P.Fbm(t.y, octave), P.Fbm(t.z, octave), P.Fbm(t.w, octave)));

                f += 1.0f;
            }
        }
예제 #3
0
        public static IEnumerator <float> PerlinWith(float offset, float speed, float fps = 0f)
        {
            Source.ValidateFrameRate(ref fps);
            var f = 0f;

            for (;;)
            {
                var t = offset + (f / fps) * speed;
                yield return(P.Noise(t));

                f += 1.0f;
            }
        }
예제 #4
0
        public static IEnumerator <float> FbmWith(float offset, float speed, int octave, float fps = 0f)
        {
            Source.ValidateFrameRate(ref fps);
            var f = 0f;

            for (;;)
            {
                var t = offset + (f / fps) * speed;
                yield return(P.Fbm(t, octave));

                f += 1.0f;
            }
        }