Render

Information about the render binding

drawRect

render.drawRect(x, y, width, height, color)

Renders a rectangle using the specified parameters

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

color

Color of the rect

drawRoundedRect

render.drawRoundedRect(x, y, width, height, radius, color)

Renders a rounded rectangle

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

radius

Number

Radius of the rounded parts

color

Color of the rect

drawGradientRect

render.drawGradientRect(x, y, width, height, alpha, bottomLeft, topLeft, bottomRight, topRight)

Draws a gradient with values for all corners of a rectangle

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

alpha

Number

Alpha of the gradient

bottomLeft

Color of the bottom left corner

topLeft

Color of the top left corner

bottomRight

Color of the bottom right corner

topRight

Color of the top right corner

drawGradientRectHorizontal

render.drawGradientRectHorizontal(x, y, width, height, alpha, left, right)

Draws a gradient horizontally (left to right)

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

alpha

Number

Alpha of the gradient

left

Color of the left side

right

Color of the right side

drawGradientRectVertical

render.drawGradientRectVertical(x, y, width, height, alpha, top, bottom)

Draws a gradient vertically (top to bottom)

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

alpha

Number

Alpha of the gradient

top

Color of the top side

bottom

Color of the bottom side

drawGradientRoundedRect

render.drawGradientRoundedRect(x, y, width, height, radius, bottomLeft, topLeft, bottomRight, topRight)

Draws a rounded gradient with values for all corners of a rectangle

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

radius

Number

Radius of the rounded rect

bottomLeft

Color of the bottom left corner

topLeft

Color of the top left corner

bottomRight

Color of the bottom right corner

topRight

Color of the top right corner

drawGradientRoundHorizontal

render.drawGradientRoundHorizontal(x, y, width, height, radius, left, right)

Draws a rounded gradient horizontally (left to right)

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

radius

Number

Radius of the rounded rect

left

Color of the left side

right

Color of the right side

drawGradientRoundVertical

render.drawGradientRoundVertical(x, y, width, height, radius, top, bottom)

Draws a rounded gradient horizontally (top to bottom)

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

radius

Number

Radius of the rounded rect

top

Color of the top side

bottom

Color of the bottom side

applyGradient

render.applyGradient(x, y, width, height, alpha, bottomLeft, topLeft, bottomRight, topRight, function() {
    ...
    (Render stuff here) 
    ...
})

Applies a gradient to any rendered object in the callback function

ParameterTypeDescription

x

Number

X pos of the rect

y

Number

Y pos of the rect

width

Number

Width of the rect

height

Number

Height of the rect

alpha

Number

Alpha of the final result

bottomLeft

Color of the bottom left corner

topLeft

Color of the top left corner

bottomRight

Color of the bottom right corner

topRight

Color of the top right corner

callback function

Function

create a function here to specify a specific group of objects for the gradient to be applied too

interpolateColors

var interpolatedColor = render.interpolateColors(colorOld, colorNew, percentage)

Returns a an interpolated Color between the two colors based on the percentage

ParameterTypeDescription

colorOld

Original color

colorNew

New color to be interpolated to

percentage

Number

Percentage to interpolate with

applyOpacity

var color = client.getClientColors().getFirst()
var alpha = .5
var opaqueColor = render.applyOpacity(color, alpha)

Applies opacity to a color with a value ranging from 0-1

ParameterTypeDescription

color

Original color

alpha

Number

Alpha value of the new color

getScaledWidth

render.getScaledWidth()

Returns the scaled width of the screen as a Number

getScaledHeight

render.getScaledHeight()

Returns the scaled height of the screen as a Number

drawEntity3D

render.drawEntity3D(x, y, scale, yaw, pitch, entity)
ParameterTypeDescription

x

Number

X pos of the entity

y

Number

Y pos of the entity

scale

Number

Scale of the entity

yaw

Number

Yaw of the entity

pitch

Number

Pitch of the entity

entity

Entity to render

drawEntity2D

render.drawEntity2D(x, y, width, height, entity)

Draws the entity's head

ParameterTypeDescription

x

Number

X pos of the entity's head

y

Number

Y pos of the entity's head

width

Number

Width of the entity's head

height

Number

Height of the entity's head

entity

Entity to render

newContinualAnimation

var anim = render.newContinualAnimation()

Returns a new Continual Animation object

createFramebuffer

var buffer = render.createFramebuffer()

Returns a new Framebuffer object

drawBoundingBox

render.drawBoundingBox(entity, color)

This renders the entity's bounding box with the specified color

ParameterTypeDescription

entity

Entity to render the bounding box on

color

Color

Color of the bounding box

scissorStart

render.scissorStart(x, y, width, height)

This is a helper function for scissoring out stuff

ParameterTypeDescription

x

Number

The x position of the scissor

y

Number

The y position of the scissor

width

Number

The width of the scissor

height

Number

The height of the scissor

scissorEnd

render.scissorEnd()

Disables the scissor test

getPartialTicks

var ticks = render.getPartialTicks()

Gets the render partial ticks as a Number

bindMinecraftFramebuffer

render.bindMinecraftFramebuffer()

This rebinds the Minecraft framebuffer so you can continue rendering after using other Framebuffer objects

createShaderUtil

var shader = render.createShaderUtil(fragSource)

Returns a ShaderUtil object

NameTypeDescription

fragSource

String

The complete fragment shader source

Last updated