Example #1
0
        public override void Execute(ref GlyphShaderContext context, ref GlyphData data, int index)
        {
            var timeoffset = (Int32)(DateTime.UtcNow.TimeOfDay.TotalMilliseconds / 25); // number here is speed
            var angle      = ((timeoffset + index) / 60.0) * Math.PI * 2.0;             // change for x scale

            data.Y += (Single)Math.Sin(angle) * 10f;                                    // number there is y scale
        }
 public override void Execute(ref GlyphShaderContext context, ref GlyphData data, Int32 index)
 {
     data.Color = Colors[index % Colors.Length];
 }
Example #3
0
        public override void Execute(ref GlyphShaderContext context, ref GlyphData data, int index)
        {
            var offset = (Int32)(DateTime.UtcNow.TimeOfDay.TotalMilliseconds / 50);

            data.Color = colors[(index + offset) % colors.Length];
        }
Example #4
0
 public override void Execute(ref GlyphShaderContext context, ref GlyphData data, int index)
 {
     data.X += r.Next(-2, 2);
     data.Y += r.Next(-2, 2);
 }