Quad

Quad

A rectangular, two dimensional shape. The local height of the Quad defines it's size about the y-axis,
while the width defines the x-axis. The z-axis will always be 0.

Constructor

new Quad(widthopt, heightopt, tileXopt, tileYopt, tesselationopt)

Parameters:
Name Type Attributes Default Description
width number <optional>
1

Total width of quad.

height number <optional>
1

Total height of quad.

tileX number <optional>
1

Number of texture repetitions in the texture's x direction.

tileY number <optional>
1

Number of texture repetitions in the texture's y direction.

tesselation number <optional>
1

Level of tesselation of the quad (useful for some vertex shader operations).

Members

tesselation :number

Number of texture repetitions in the texture's y direction.

Default Value:
  • 1

tileX :number

Number of texture repetitions in the texture's x direction.

Default Value:
  • 1

tileY :number

Number of texture repetitions in the texture's y direction.

Default Value:
  • 1

xExtent :number

Half-extent along the local x axis.

Default Value:
  • 0.5

yExtent :number

Half-extent along the local y axis.

Default Value:
  • 0.5

Methods

clone() → {Quad}

Returns a clone of this quad

rebuild() → {Quad}

Builds or rebuilds the mesh data.