Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new PlaneGeometry(width?: number, height?: number, segWidth?: number, segHeight?: number): PlaneGeometry
  • Parameters

    • Optional width: number
    • Optional height: number
    • Optional segWidth: number
    • Optional segHeight: number

    Returns PlaneGeometry

Properties

_updateId

_updateId: number

attributes

attributes: {}

Type declaration

buffers

buffers: Buffer[]

disposeRunner

disposeRunner: Runner

glVertexArrayObjects

glVertexArrayObjects: {}

Type declaration

  • [key: number]: {}
    • [key: string]: WebGLVertexArrayObject

height

height: number

id

id: number

indexBuffer

indexBuffer: Buffer

instanceCount

instanceCount: number

instanced

instanced: boolean

refCount

refCount: number

segHeight

segHeight: number

segWidth

segWidth: number

width

width: number

Accessors

Private vertexDirtyId

  • get vertexDirtyId(): number
  • If the vertex position is updated.

    member

    {number}

    readonly

    Returns number

Methods

addAttribute

  • addAttribute(id: string, buffer: Uint32Array | Float32Array | number[] | Buffer, size?: number, normalized?: boolean, type?: TYPES, stride?: number, start?: number, instance?: boolean): PlaneGeometry
  • Adds an attribute to the geometry Note: stride and start should be undefined if you dont know them, not 0!

    Parameters

    • id: string

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

    • buffer: Uint32Array | Float32Array | number[] | Buffer

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

    • Optional size: number
    • Optional normalized: boolean
    • Optional type: TYPES
    • Optional stride: number
    • Optional start: number
    • Optional instance: boolean

    Returns PlaneGeometry

    returns self, useful for chaining.

addIndex

  • 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.

    Parameters

    Returns Geometry

    returns self, useful for chaining.

Private build

  • build(): void
  • Refreshes plane coordinates

    Returns void

clone

  • returns a clone of the geometry

    Returns Geometry

    a new clone of this geometry

destroy

  • destroy(): void
  • Destroys the geometry.

    Returns void

dispose

  • dispose(): void
  • disposes WebGL resources that are connected to this geometry

    Returns void

getAttribute

  • returns the requested attribute

    Parameters

    • id: string

      the name of the attribute required

    Returns Attribute

    the attribute requested.

getBuffer

  • getBuffer(id: string): Buffer
  • returns the requested buffer

    Parameters

    • id: string

      the name of the buffer required

    Returns Buffer

    the buffer requested.

getIndex

  • returns the index buffer

    Returns Buffer

    the index buffer.

getSize

  • getSize(): number
  • Returns number

interleave

  • 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 Geometry

    returns self, useful for chaining.

Static merge

  • merges an array of geometries into a new single one geometry attribute styles must match for this operation to work

    Parameters

    • geometries: Geometry[]

      array of geometries to merge

    Returns Geometry

    shiny new geometry!

Generated using TypeDoc