Class: NineSliceGeometry

NineSliceGeometry

The NineSliceGeometry class allows you to create a NineSlicePlane object.

Extends

Members

defaultOptions NineSliceGeometryOptions static

The default options for the NineSliceGeometry.

Properties:
Name Type Default Description
bottomHeight number 10

The height of the bottom row.

height number 100

The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane.

leftWidth number 10

The width of the left column.

originalHeight number 100

The original height of the texture

originalWidth number 100

The original width of the texture

rightWidth number 10

The width of the right column.

topHeight number 10

The height of the top row.

width number 100

The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane.

Methods

update (options)

Updates the NineSliceGeometry with the options.

Name Type Description
options NineSliceGeometryOptions

The options of the NineSliceGeometry.

updatePositions ()

Updates the positions of the vertices.

updateUvs ()

Updates the UVs of the vertices.

Inherited Properties

From class PlaneGeometry

height number inherited

The height of plane

verticesX number inherited

The number of vertices on x-axis

verticesY number inherited

The number of vertices on y-axis

width number inherited

The width of plane

From class MeshGeometry

indices Uint32Array inherited

The indices of the mesh.

positions Float32Array inherited

The positions of the mesh.

uvs Float32Array inherited

The UVs of the mesh.

From class Geometry

attributes Record<string, Attribute> readonly inherited

A record of the attributes of the geometry.

bounds Bounds inherited

Returns the bounds of the geometry.

buffers Buffer[] readonly inherited

The buffers that the attributes use

indexBuffer Buffer readonly inherited

The index buffer of the geometry

instanceCount number inherited

the instance count of the geometry to draw

Default Value:
  • 1

topology Topology inherited

The topology of the geometry.

uid number readonly inherited

The unique id of the geometry.

Inherited Methods

From class PlaneGeometry

build (options) void inherited

Refreshes plane coordinates

Name Type Description
options PlaneGeometryOptions

Options to be applied to plane geometry

From class Geometry

destroy (destroyBuffers) void inherited

destroys the geometry.

Name Type Default Description
destroyBuffers boolean false

destroy the buffers associated with this geometry

getAttribute (id) Attribute inherited

Returns the requested attribute.

Name Type Description
id string

The name of the attribute required

Returns:
Type Description
Attribute
  • The attribute requested.

getBuffer (id) Buffer inherited

Returns the requested buffer.

Name Type Description
id string

The name of the buffer required.

Returns:
Type Description
Buffer
  • The buffer requested.

getIndex () Buffer inherited

Returns the index buffer

Returns:
Type Description
Buffer
  • The index buffer.

getSize () number inherited

Used to figure out how many vertices there are in this geometry

Returns:
Type Description
number the number of vertices in the geometry