GraphX.lua

From Moondust Wiki
Revision as of 22:29, 2 November 2015 by Rockythechao (talk | contribs)
Jump to navigation Jump to search


NOTE: This page is currently under construction. Apologies for any messiness and incomplete/outdated information!

graphX is a helper library for drawing primitives. It was derived from colliders.lua and is being developed as part of the cinematX suite.


Installation

graphX will come packaged with cinematX from v0.0.8 onward; for now, you can download graphX v0.3 from this link. Add graphX.lua and the graphX folder to your LuaScriptsLib folder.

How to Use

Code Documentation

graphX
Type Function/Field Return values/Value type Description
function boxLevel (double x, double y, double width, double height, Color color, LuaImageResource texture) nil Draws a colored box at the given coordinates in the level.

(Texture only in v0.3+)
function boxScreen (double x, double y, double width, double height, Color color, LuaImageResource texture) nil Draws a colored box at the given coordinates on the screen.

(Texture only in v0.3+)
function circleLevel (double x, double y, double radius, Color color) nil Draws a colored circle at the given coordinates in the level.
function circleScreen (double x, double y, double radius, Color color) nil Draws a colored circle at the given coordinates on the screen.