class nape.util.ShapeDebug extends Debug

Available on all platforms

Implementation of nape debug draw using flash/openfl||nme graphics API. *

* This debug draw is slower than BitmapDebug which is available in flash10+ * however the BitmapDebug draw makes use of Alchemy opcodes so you may wish * not to use it if you are also using Stage3D and do not wish to be subject * to Adobe licensing.

Instance Fields

var thickness:Float

Thickness to draw lines with. * @default 0.1

function new(width:Int, height:Int, ?bgColour:Int = 3355443):Void

Construct new ShapeDebug with given viewport size and backgruond. *

* Background colour does not have much weight for a ShapeDebug which * always has a transparent background, but serves to bias the colours * chosen for drawing objects. * *

width

The width of Debug draw viewport. *

height

The height of Debug draw viewport. *

bgColour

the background colour for debug draw. (default 0x333333) *

returns

The constructed ShapeDebug. *

function clear():Void

@inheritDoc

function draw(object:Dynamic):Void

@inheritDoc

function drawAABB(aabb:AABB, colour:Int):Void

@inheritDoc

function drawCircle(position:Vec2, radius:Float, colour:Int):Void

@inheritDoc

function drawCurve(start:Vec2, control:Vec2, end:Vec2, colour:Int):Void

@inheritDoc

function drawFilledCircle(position:Vec2, radius:Float, colour:Int):Void

@inheritDoc

function drawFilledPolygon(polygon:Dynamic, colour:Int):Void

@inheritDoc

function drawFilledTriangle(p0:Vec2, p1:Vec2, p2:Vec2, colour:Int):Void

@inheritDoc

function drawLine(start:Vec2, end:Vec2, colour:Int):Void

@inheritDoc

function drawPolygon(polygon:Dynamic, colour:Int):Void

@inheritDoc

function drawSpring(start:Vec2, end:Vec2, colour:Int, ?coils:Int = 3, ?radius:Float = 3.0f):Void

@inheritDoc