/* This constructor will be called when a layer of your effect is being created. */ public Wave1D(IEffectApi api, int width, int height) : base(width, height) { /* Save the effect helper in your class, you will need it. */ _api = api; /* Create a render for your effect using the effect helper. */ _render = _api.CreateRender(); /* Create a wave simulation using the effect helper. */ _waveSimulation = _api.CreateWaveSimulation1D(); /* Lets double the wave speeds */ _waveSimulation.Speed = 2.0; }
/* This constructor will be called when a layer of your effect is being created. */ public BeatWave1D(IEffectApi effectApi, int width, int height) : base(width, height) { /* Save the effect api in your class, you will need it. */ _api = effectApi; _featureCache = _api.CreateAudioFeatureCache(); /* Create a render for your effect using the effect api. */ _render = _api.CreateRender(); /* Create a wave simulation using the effect api. */ _waveSimulation = _api.CreateWaveSimulation1D(); /* Lets double the wave speeds */ _waveSimulation.Speed = 2.0; }
/* This constructor will be called when a layer of your effect is being created. */ public Wave1D(IEffectApi effectApi, int width, int height) : base(width, height) { /* Save the effect api in your class, you will need it. */ _api = effectApi; /* Set the default color. */ _color = new SKColor(0, 128, 128); /* Create a render for your effect using the effect api. */ _render = _api.CreateRender(); /* Create a wave simulation using the effect api. */ _waveSimulation = _api.CreateWaveSimulation1D(); /* Lets double the wave speeds */ _waveSimulation.Speed = 2.0; }