Class: PlaneGeometry

PIXI.PlaneGeometry

new PIXI.PlaneGeometry (width, height, segWidth, segHeight) overrides

PlaneGeometry.ts:13
Name Type Default Description
width 100

The width of the plane.

height 100

The height of the plane.

segWidth 10

Number of horizontal segments.

segHeight 10

Number of vertical segments.

Extends

Inherited Properties

From class PIXI.Geometry

instanceCount number inherited

Number of instances in this geometry, pass it to GeometrySystem.draw()

Default Value:
  • 1

refCount number inherited

Count of existing (not destroyed) meshes that reference this geometry

Default Value:
  • 0

glVertexArrayObjects object protected inherited

A map of renderer IDs to webgl VAOs

Inherited Methods

From class PIXI.Geometry

addAttribute (id, buffer, size, normalized, type, stride, start, instance) PIXI.Geometry inherited

Geometry.ts:95

Adds an attribute to the geometry Note: stride and start should be undefined if you dont know them, not 0!

Name Type Attributes Default Description
id String

the name of the attribute (matching up to a shader)

buffer PIXI.Buffer | number<Array>

the buffer that holds the data of the attribute . You can also provide an Array and a buffer will be created from it.

size Number <optional>
0

the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2

normalized Boolean <optional>
false

should the data be normalized.

type PIXI.TYPES <optional>
PIXI.TYPES.FLOAT

what type of number is the attribute. Check {PIXI.TYPES} to see the ones available

stride Number <optional>

How far apart (in floats) the start of each value is. (used for interleaving data)

start Number <optional>

How far into the array to start reading values (used for interleaving data)

instance boolean <optional>
false

Instancing flag

Returns:
Type Description
PIXI.Geometry returns self, useful for chaining.

addIndex (buffer) PIXI.Geometry inherited

Geometry.ts:181

Adds an index buffer to the geometry The index buffer contains integers, three for each triangle in the geometry, which reference the various attribute buffers (position, colour, UV coordinates, other UV coordinates, normal, …). There is only ONE index buffer.

Name Type Attributes Description
buffer PIXI.Buffer | number<Array> <optional>

the buffer that holds the data of the index buffer. You can also provide an Array and a buffer will be created from it.

Returns:
Type Description
PIXI.Geometry returns self, useful for chaining.

clone () PIXI.Geometry inherited

Geometry.ts:307

returns a clone of the geometry

Returns:
Type Description
PIXI.Geometry a new clone of this geometry

destroy () void inherited

Geometry.ts:295

Destroys the geometry.

dispose () void inherited

Geometry.ts:287

disposes WebGL resources that are connected to this geometry

getAttribute (id) PIXI.Attribute inherited

Geometry.ts:159

returns the requested attribute

Name Type Description
id String

the name of the attribute required

Returns:
Type Description
PIXI.Attribute the attribute requested.

getBuffer (id) PIXI.Buffer inherited

Geometry.ts:170

returns the requested buffer

Name Type Description
id String

the name of the buffer required

Returns:
Type Description
PIXI.Buffer the buffer requested.

getIndex () PIXI.Buffer inherited

Geometry.ts:214

returns the index buffer

Returns:
Type Description
PIXI.Buffer the index buffer.

interleave () PIXI.Geometry inherited

Geometry.ts:224

this function modifies the structure so that all current attributes become interleaved into a single buffer This can be useful if your model remains static as it offers a little performance boost

Returns:
Type Description
PIXI.Geometry returns self, useful for chaining.