public EditRGBTrack Duplicate() { var track = new EditRGBTrack(); track.ledIndices = new List <int>(ledIndices); track.gradient = gradient.Duplicate(); return(track); }
public override Animation ToAnimation(EditDataSet editSet, DataSet.AnimationBits bits) { var ret = new AnimationGradient(); ret.duration = (ushort)(this.duration * 1000.0f); ret.faceMask = (uint)this.faces; // Add gradient ret.gradientTrackOffset = (ushort)bits.rgbTracks.Count; var tempTrack = new EditRGBTrack() { gradient = gradient }; var gradientTrack = tempTrack.ToTrack(editSet, bits); bits.rgbTracks.Add(gradientTrack); return(ret); }
public override Animation ToAnimation(EditDataSet editSet, DataSet.AnimationBits bits) { var ret = new AnimationGradientPattern(); ret.duration = (ushort)(duration * 1000); // stored in milliseconds ret.speedMultiplier256 = (ushort)(this.speedMultiplier * 256.0f); ret.tracksOffset = (ushort)editSet.getPatternTrackOffset(pattern); ret.trackCount = (ushort)pattern.gradients.Count; // Add gradient ret.gradientTrackOffset = (ushort)bits.rgbTracks.Count; var tempTrack = new EditRGBTrack() { gradient = gradient }; var gradientTrack = tempTrack.ToTrack(editSet, bits); bits.rgbTracks.Add(gradientTrack); ret.overrideWithFace = (byte)(overrideWithFace ? 1 : 0); return(ret); }