Skip to content

Latest commit

 

History

History
141 lines (87 loc) · 5.21 KB

File metadata and controls

141 lines (87 loc) · 5.21 KB

Latite Scripting Documentation (Exports)


Exports > gfx/graphics3 > Graphics3D

Graphics3D

Interface

Source: gfx/graphics3.d.ts:1

Methods

drawLine()

drawLine(p1: Vector3, p2: Vector3): void

Draws a line into the world (adds a line into the vertex buffer)

Source: gfx/graphics3.d.ts:20

Parameters

Parameter Type
p1 Vector3
p2 Vector3

Returns

void

drawQuad()

drawQuad( p1: Vector3, p2: Vector3, p3: Vector3, p4: Vector3): void

Draws a quad into the world (adds a quad into the vertex buffer)

Source: gfx/graphics3.d.ts:37

Parameters

Parameter Type
p1 Vector3
p2 Vector3
p3 Vector3
p4 Vector3

Returns

void

drawTriangle()

drawTriangle( p1: Vector3, p2: Vector3, p3: Vector3): void

Draws a triangle into the world (adds a triangle into the vertex buffer)

Source: gfx/graphics3.d.ts:28

Parameters

Parameter Type
p1 Vector3
p2 Vector3
p3 Vector3

Returns

void

finish()

finish(cull?: boolean): void

Call this every time you're done rendering. (batched renders the current vertex buffer into the world)

Source: gfx/graphics3.d.ts:43

Parameters

Parameter Type Description
cull? boolean true for rendering through blocks, false to not render through blocks

Returns

void

setColor()

setColor(color: Color): void

Sets the color.

Source: gfx/graphics3.d.ts:7

Parameters

Parameter Type Description
color Color The color to set

Returns

void

setColors()

setColors( vec1: Color, vec2: Color, vec3: Color, vec4: Color): void

Sets the colors. (allows for gradients)

Source: gfx/graphics3.d.ts:13

Parameters

Parameter Type
vec1 Color
vec2 Color
vec3 Color
vec4 Color

Returns

void