public static FrameObjectAnimation ChristmasLights() { ColourObject[] colourObjArray = new ColourObject[3]; ColourObjectFrame[] Frames = new ColourObjectFrame[3]; for (int i = 0; i < 3; ++i) { colourObjArray[i] = new ColourObject(255, 215, 0, (KeyBoardPart)(i + 1)); } Frames[0] = new ColourObjectFrame(colourObjArray); for (int y = 0; y < 3; ++y) { colourObjArray[y] = new ColourObject(0, 0, 0, (KeyBoardPart)(y + 1)); } Frames[1] = new ColourObjectFrame(colourObjArray); for (int z = 0; z < 3; ++z) { colourObjArray[z] = new ColourObject(0, 255, 0, (KeyBoardPart)(z + 1)); } Frames[2] = new ColourObjectFrame(colourObjArray); return(new FrameObjectAnimation(Frames)); }
public static FrameObjectAnimation BasicSlowBreathing() { ColourObject cObj1; ColourObject cObj2; ColourObject cObj3; ColourObjectFrame[] Frames = new ColourObjectFrame[510]; int idx = 0; for (byte i = 255; i > 0; i--) { cObj1 = new ColourObject(0, 0, i, KeyBoardPart.LEFT); cObj2 = new ColourObject(0, i, 0, KeyBoardPart.MIDDLE); cObj3 = new ColourObject(i, 0, 0, KeyBoardPart.RIGHT); Frames[idx] = new ColourObjectFrame(new ColourObject[] { cObj1, cObj2, cObj3 }); idx++; } for (byte y = 0; y < 255; y++) { cObj1 = new ColourObject(0, 0, y, KeyBoardPart.LEFT); cObj2 = new ColourObject(0, y, 0, KeyBoardPart.MIDDLE); cObj3 = new ColourObject(y, 0, 0, KeyBoardPart.RIGHT); Frames[idx] = new ColourObjectFrame(new ColourObject[] { cObj1, cObj2, cObj3 }); idx++; } return(new FrameObjectAnimation(Frames, 0)); }
public static ColourObjectFrame BGRKeyboard() { ColourObject cObj1 = new ColourObject(0, 0, 255, KeyBoardPart.LEFT); ColourObject cObj2 = new ColourObject(0, 255, 0, KeyBoardPart.MIDDLE); ColourObject cObj3 = new ColourObject(255, 0, 0, KeyBoardPart.RIGHT); return(new ColourObjectFrame(new ColourObject[] { cObj1, cObj2, cObj3 })); }
public static ColourObjectFrame WhiteKeyboard() { ColourObject c1 = new ColourObject(255, 255, 255, KeyBoardPart.LEFT); return(new ColourObjectFrame(new ColourObject[3] { c1, c1, c1 })); }
private static void SetKeyboardColour(ColourObjectFrame colour) { ColourObject[] objArray = new ColourObject[] { colour.getColourObject(0), colour.getColourObject(1), colour.getColourObject(2) }; byte[] ColourArray = new byte[3]; for (int i = 0; i < 3; ++i) { ColourArray = objArray[i].getColours(); _keyboard.SetColor(ColourArray[0], ColourArray[1], ColourArray[2], objArray[i].getPart()); } }
public static FrameObjectAnimation FlashingLights() { ColourObject[] cObjArray = new ColourObject[3]; for (byte i = 0; i < 3; ++i) { cObjArray[i] = new ColourObject(255, 0, 0, (KeyBoardPart)(i + 1)); } ColourObjectFrame Frame1 = new ColourObjectFrame(cObjArray); for (byte i = 0; i < 3; ++i) { cObjArray[i] = new ColourObject(0, 255, 0, (KeyBoardPart)(i + 1)); } ColourObjectFrame Frame3 = new ColourObjectFrame(cObjArray); for (byte i = 0; i < 3; ++i) { cObjArray[i] = new ColourObject(0, 0, 255, (KeyBoardPart)(i + 1)); } ColourObjectFrame Frame5 = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(0, 0, 255, KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(0, 255, 0, KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(255, 0, 0, KeyBoardPart.RIGHT); ColourObjectFrame Frame7 = new ColourObjectFrame(cObjArray); for (byte i = 0; i < 3; ++i) { cObjArray[i] = new ColourObject(0, 0, 0, (KeyBoardPart)(i + 1)); } ColourObjectFrame BlankFrame = new ColourObjectFrame(cObjArray); return(new FrameObjectAnimation(new ColourObjectFrame[] { Frame1, BlankFrame, Frame3, BlankFrame, Frame5, BlankFrame, Frame7, BlankFrame }, 500)); }
public static FrameObjectAnimation BasicColourWave() { ColourObject cObj1 = new ColourObject(0, 0, 255, KeyBoardPart.LEFT); ColourObject cObj2 = new ColourObject(0, 255, 0, KeyBoardPart.MIDDLE); ColourObject cObj3 = new ColourObject(255, 0, 0, KeyBoardPart.RIGHT); ColourObjectFrame Frame1 = new ColourObjectFrame(new ColourObject[] { cObj1, cObj2, cObj3 }); cObj1 = new ColourObject(255, 0, 0, KeyBoardPart.LEFT); cObj2 = new ColourObject(0, 0, 255, KeyBoardPart.MIDDLE); cObj3 = new ColourObject(0, 255, 0, KeyBoardPart.RIGHT); ColourObjectFrame Frame2 = new ColourObjectFrame(new ColourObject[] { cObj1, cObj2, cObj3 }); cObj1 = new ColourObject(0, 255, 0, KeyBoardPart.LEFT); cObj2 = new ColourObject(255, 0, 0, KeyBoardPart.MIDDLE); cObj3 = new ColourObject(0, 0, 255, KeyBoardPart.RIGHT); ColourObjectFrame Frame3 = new ColourObjectFrame(new ColourObject[] { cObj1, cObj2, cObj3 }); return(new FrameObjectAnimation(new ColourObjectFrame[] { Frame1, Frame2, Frame3 }, 500)); }
public static FrameObjectAnimation TransformingLights() { ColourObject[] cObjArray = new ColourObject[3]; ColourObjectFrame[] AnimationFrames = new ColourObjectFrame[15]; cObjArray[0] = new ColourObject(0, 0, 255, KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(KeyBoardPart.RIGHT); AnimationFrames[0] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(0, 0, 255, KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(KeyBoardPart.RIGHT); AnimationFrames[1] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(0, 0, 255, KeyBoardPart.RIGHT); AnimationFrames[2] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(0, 255, 0, KeyBoardPart.RIGHT); AnimationFrames[3] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(0, 255, 0, KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(KeyBoardPart.RIGHT); AnimationFrames[4] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(0, 255, 0, KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(KeyBoardPart.RIGHT); AnimationFrames[5] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(255, 0, 0, KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(KeyBoardPart.RIGHT); AnimationFrames[6] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(255, 0, 0, KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(KeyBoardPart.RIGHT); AnimationFrames[7] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(255, 0, 0, KeyBoardPart.RIGHT); AnimationFrames[8] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(0, 0, 255, KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(0, 0, 0, KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(255, 0, 0, KeyBoardPart.RIGHT); AnimationFrames[9] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(0, 0, 0, KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(0, 0, 255, KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(255, 0, 0, KeyBoardPart.RIGHT); AnimationFrames[10] = new ColourObjectFrame(cObjArray); cObjArray[0] = new ColourObject(0, 255, 0, KeyBoardPart.LEFT); cObjArray[1] = new ColourObject(0, 0, 255, KeyBoardPart.MIDDLE); cObjArray[2] = new ColourObject(255, 0, 0, KeyBoardPart.RIGHT); AnimationFrames[11] = new ColourObjectFrame(cObjArray); for (int i = 0; i < 3; ++i) { cObjArray[i] = new ColourObject(255, 0, 0, (KeyBoardPart)(i + 1)); } AnimationFrames[12] = new ColourObjectFrame(cObjArray); for (int i = 0; i < 3; ++i) { cObjArray[i] = new ColourObject(0, 255, 0, (KeyBoardPart)(i + 1)); } AnimationFrames[13] = new ColourObjectFrame(cObjArray); for (int i = 0; i < 3; ++i) { cObjArray[i] = new ColourObject(0, 0, 255, (KeyBoardPart)(i + 1)); } AnimationFrames[14] = new ColourObjectFrame(cObjArray); return(new FrameObjectAnimation(AnimationFrames, 500)); }