Example #1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            var lightSource = new LayeredLightSource(
                new AngleFilterLightSource(
                    new FadedCircleLightSource(RGB.Red, 0, 0, .5, .25),
                    0,
                    0,
                    20,
                    100),
                new AngleFilterLightSource(
                    new FadedCircleLightSource(RGB.Green, 0, 0, .5, .25),
                    0,
                    0,
                    120,
                    120),
                new AngleFilterLightSource(
                    new FadedCircleLightSource(RGB.Blue, 0, 0, .5, .25),
                    0,
                    0,
                    240,
                    140)
                );

            var layer = lights.AddLayer();

            _ = layer.Transition(new FadeInTransition(lightSource, 2000))
                .ContinueWith(c => lights.RemoveLayer(layer));
        }
        private async Task RunTransition(ITransition transition)
        {
            var layer = lights.AddLayer();
            await layer.Transition(transition);

            lights.RemoveLayer(layer);
        }