Skip to content

Draw3D Class

wagyourtail edited this page Aug 5, 2020 · 6 revisions

The Draw3D Class, methods are as follows:

Draw3D() 1.0.6+

Example: new Draw3D()

Initialize, to call this it is easiest to refer to Hud.

addBox(Double, Double, Double, Double, Double, Double, Int, [Int], Int, [Int], Bool) 1.0.6+

Example: overlay.addBox(x1, y1, z1, x2, y2, z2, color, alpha, fillColor, fillAlpha, fillBool)

  • alpha fields were added in version 1.1.8+
    • alpha fields are optional and can just be in the argbHex field.
    • if one alpha field is present both need to be.

returns the box object.

removeBox(Draw3D$box) 1.0.6+

Example: overlay.removeBox(box)

removes a box element from the screen.

getBoxes() 1.0.6+

Example: overlay.getBoxes()

returns an ArrayList of box elements.

addLine(Double, Double, Double, Double, Double, Double, Int, [Int]) 1.0.6+

Example: overlay.addLine(x1, y1, z1, x2, y2, z2, color, alpha)

  • alpha was added in version 1.1.8+
    • alpha is optional and can just be in the argbHex field.

returns the box object.

removeLine(Draw3D$line) 1.0.6+

Example: overlay.removeLine(line)

removes a box element from the screen.

getLines() 1.0.6+

Example: overlay.getLines()

returns an ArrayList of line elements.

subclass box 1.0.6+

class box {
    constructor(x1, y1, z1, x2, y2, z2, color, fillColor, fill); //x,y,z are doubles. color are ints, fill is a boolean.
    setPos(x1, y1, z1, x2, y2, z2);
    setColor(color);
    setFillColor(fillColor);
    setFill(fill);
}

subclass line 1.0.6+

class box {
    constructor(x1, y1, z1, x2, y2, z2, color); //x,y,z are doubles. color is int.
    setPos(x1, y1, z1, x2, y2, z2);
    setColor(color);
}
Clone this wiki locally