B.Render.PolygonState()

Represent a polygon rendering state.

To get the object use pass.state(B.Render.State.POLYGON).

TYPES:

Offset

Describes polygon offset parameters.

{number} factor

a scale factor that is used to create a variable depth offset for each polygon.

{number} units

is multiplied by an implementation-specific value to create a constant depth offset

METHODS:

pass()

Returns linked pass.

RETURNS:

default()

Resets to default values.

// equivalent to
state.cull(B.Render.Face.BACK);
state.offset(false);

RETURNS:

cull(face)

Sets polygon culling mode.

PARAMETERS:

{B.Render.Face | false} face

pass false to disable polygon culling

RETURNS:

cull()

Returns polygon culling mode.

RETURNS:

{false | B.Render.Face}

false if culling is disabled

offset(value)

Set polygon offset.

PARAMETERS:

{B.Render.PolygonState~Offset | false} value

pass false to disable polygon offset

RETURNS:

offset(factor, units)

Sets polygon offset parameters.

PARAMETERS:

{number} factor

a scale factor that is used to create a variable depth offset for each polygon

{number} units

is multiplied by an implementation-specific value to create a constant depth offset

RETURNS:

offset()

Returns polygon offset parameters.

RETURNS:

{B.Render.PolygonState~Offset | false}

false if polygon offset is disabled

TYPES:

METHODS: