Posted 21 July 2017 - 05:26 PM
litPix v0.8
Little Pixels without Limits
litPix (Little Pixels) is an API that can be used to make square pixels in CC, with a normal size of 28x51.
litPix can be used for a plethora of things, like video games and drawing applications. litPix is only in Beta, and is missing features and needs some speed optimization. Unlike the majority of APIs, you must run the API, instead of loading it.
Functions:
litpix.setBackgroundColor(color) - Sets Background Color to color
litpix.clear() - Clear Screen
litpix.drawPixel(x, y, c) - Draws LitPix pixel at x, y
litpix.drawLine(x1, y1, x2, y2, c) - Draws line from x1,y1 to x2,y2 with color c
litpix.drawRect(x1, y1, x2, y2, c, filled) - Draws rectangle with color c, if filled is true it will fill
litpix.drawPoly(x1, y1, x2, y2, x3, y3…, c) - Draws polygon with color c
litpix.createSymbol(table) - Returns LitPix symbol; Table must be a 2 dimensional array; 0 is transparent, 1 is the first color in the pallete, etc…
litpix.createPallete(table) - Returns LitPix pallete; Pallete must be an array
litpix.createPallete(table) - Returns LitPix pallete; Pallete must be an array
litpix.drawSymbol(x, y, symbol, pallete) - Draws Symbol with Pallete
litpix.push() - Disables Rendering until Pop is executed
litpis.pop() - Render immediately and allow rendering after Push
For more information, look at the Example Program's code. I am working on a Wiki.
Example Program: https://pastebin.com/L4GCTcDd
Screenshot of Example Program:
Todo:
Todo List
- Add transformation to Symbols
- Make litPix faster
- Color changes
Enjoy!