After some research, I have created an API that efficiently draws circles using basic algorithms. For now, it only draws circles. However, I plan to add other features soon. :)/>
You may also wish to install the new v2 demo program! [ Installer: pastebin run 8NwC8KxF ]
How to install:
Spoiler
Stable Release: pastebin get dnegTmJY circlesBeta Release: pastebin get xeZeZutq circles
Note:
Ensure that you save the api in the correct location when installing it as a dependency.
Also ensure that you understand that this project is still under heavy development and big, breaking changes may occur.
Outdated Demo Program Screenshots:
Spoiler
Seriously, these are outdated. The circles no longer look the same.I won't update this as often as this API is under heavy development.
http://imgur.com/Yuc2Apj
http://imgur.com/MEo3bRS
http://imgur.com/eMP6gA9
How to use:
Spoiler
circles.drawCircle(radius, centerX, centerY, color)
Radius: The radius of the circle.centerX: The X-position of the center of the circle.
centerY: The Y-position of the center of the circle.
color: The color to draw the circle (Using paint / decimal color codes)
circles.drawFilledCircle(radius, centerX, centerY, color, outlineColor)
Radius: The radius of the circle.centerX: The X-position of the center of the circle.
centerY: The Y-position of the center of the circle.
color: The color to draw the circle (Using decimal color codes)
outlineColor: [Optional] The color of the outline of the circle.
Upcoming Features:
Spoiler
-Add drawEllipse()-Add drawFilledEllipse()
Obsolete Commands:
Spoiler
circles.draw()Spoiler
circles.draw(radius, centerX, centerY, colour)
Draws a simple circle.No longer usable from v2.0.0be / v2.0.0r!
Known Issues:
Spoiler
-API will crash when given invalid decimal color codeChangelog:
Spoiler
v2.0.3r [Beta Version: v2.0.3b]-Accounted ComputerCraft's 6:9 color block ratio for a more accurate circle :D/>
-Used Pythagorean Theorem to replace existing drawCircle() algorithm (it's more efficient and accurate)
-Removed drawFilledCircle() function for now.
v2.0.0r [Beta Version: v2.0.0b]
-New version scheme :P/>
-Optimized circles.drawCircle()
-Fixed and optimized circles.drawFilledCircle()
Beta Changelog:
Spoiler
v2.0.2b / v2.0.3b-Accounted ComputerCraft's 6:9 color block ratio for a more accurate circle
v2.0.1b
-Used Pythagorean Theorem to replace existing drawCircle() algorithm (it's more efficient and accurate)
v2.0.0b
-New version scheme :P/>
-Optimized circles.drawCircle()
-Fixed and optimized circles.drawFilledCircle()