EasyDraw

I made a little module-ish thing that just gives some simple draw functions. Instead of having to put all of it in postdrawopaquerenderables, then do the offsets etc, with EasyDraw all you have to do is, for example, if you want to make a box at the origin, 100x100 with a color white, you’d just do:

[lua]
New3DSquare(nil,Vector(0,0,0),Angle(90,0,0),100,100,nil)//The last nil is just easier than doing Color(255,255,255,255) because its already in an or statement.
[/lua]

Function list:



Del3DElement(Id)

New3DSquare(Id,Pos,Ang,Width,Height,Col)
Mod3DSquare(Id,Pos,Ang,Width,Height,Col)

New3DSquareOutline(Id2,Pos,Ang,Width,Height,Col)
Mod3DSquareOutline(Id,Pos,Ang,Width,Height,Col)

New3DOutlineFilled(Id2,Pos,Ang,Width,Height,Col1,Col2)
Mod3DOutlineFilled(Id,Pos,Ang,Width,Height,Col,Col2)

New3DText(Id2,Pos,Ang,Font,Col,Text,Dr)
Mod3DText(Id,Pos,Ang,Font,Col,Text,Dr)


Dr for the text is to make it double-sided. Should be pretty self-explanitory. Screenshot of a scoreboard i whipped up with it:

http://dl.dropbox.com/u/5270951/gm_wireconstruct_rc0000.jpg

Link

Enjoy, and post what ever you make with it here if you want. The part at the bottom is the scoreboard, its sort of a documentation if you will.

There, now the scoreboard works by updating not re making

There doesn’t seem to be any way of removing any of the objects. Also, why are you using the object calling syntax (:slight_smile: on a library. There isn’t any need to send the library as the first arguments to any of those functions.

Changed, and fixed. I don’t actually remember why I did that. Anyway its gone now.

You need to return the ID so that it can be stored and later used to delete or modify the objects.

[editline]03:58PM[/editline]

Useful’d

Ahh thats a good idea!

Wow, thats an AWESOME idea! I didn’t ever think of that. I’ll get on it right now.

I’ll be using this :smiley:

Good :slight_smile: