CLASSES
TagsA - Z

VertexData

Description

class VertexData

The VertexData class.

Members

positions : number[]

The VertexData position

normals : number[]

The VertexData normals

uvs : number[]

The VertexData uvs

uvs2 : number[]

uvs3 : number[]

uvs4 : number[]

uvs5 : number[]

uvs6 : number[]

colors : number[]

The VertexData colors

matricesIndices : number[]

The VertexData matricesIndices

matricesWeights : number[]

The VertexData matricesWeights

matricesIndicesExtra : number[]

matricesWeightsExtra : number[]

indices : number[]

The VertexData indices

Methods

set(data, kind) → void

Set the vertex data

Parameters

Name Type Description
data number[] @param data
kind string @param kind

applyToMesh(mesh, updatable) → void

Apply To mesh

Parameters

Name Type Description
mesh Mesh @param mesh
optional updatable boolean @param updatable

applyToGeometry(geometry, updatable) → void

Apply to Geometry

Parameters

Name Type Description
geometry Geometry @param geometry
optional updatable boolean @param updatable

updateMesh(mesh, updateExtends, makeItUnique) → void

Update Mesh

Parameters

Name Type Description
mesh Mesh @param mesh
optional updateExtends boolean Not used here
optional makeItUnique boolean Not used here

updateGeometry(geometry, updateExtends, makeItUnique) → void

Update

Parameters

Name Type Description
geometry Geometry @param geometry
optional updateExtends boolean Not used here
optional makeItUnique boolean Not used here

transform(matrix) → void

Transform his vertexdata with the given matri

Parameters

Name Type Description
matrix Matrix @param matrix

merge(other) → void

Merge this vertex data with the one given in parameter

Parameters

Name Type Description
other VertexData @param other

serialize() → any

static ExtractFromMesh(mesh, copyWhenShared) → VertexData

Creates a new VertexDataObject with values extracted of the given mesh

Parameters

Name Type Description
mesh Mesh @param mesh
optional copyWhenShared boolean

static ExtractFromGeometry(geometry, copyWhenShared) → VertexData

Creates a new VertexDataObject with values extracted of the given geometry

Parameters

Name Type Description
geometry Geometry @param geometry
optional copyWhenShared boolean

static CreateRibbon(options) → VertexData

Parameters

Name Type Description
options { pathArray: Vector3[][], closeArray: boolean, closePath: boolean, offset: number, sideOrientation: number, invertUV: boolean }

static CreateBox(options) → VertexData

Parameters

Name Type Description
options { size: number, width: number, height: number, depth: number, faceUV: Vector4[], faceColors: Color4[], sideOrientation: number }

static CreateSphere(options) → VertexData

Parameters

Name Type Description
options { segments: number, diameter: number, diameterX: number, diameterY: number, diameterZ: number, arc: number, slice: number, sideOrientation: number }

static CreateCylinder(options) → VertexData

Parameters

Name Type Description
options { height: number, diameterTop: number, diameterBottom: number, diameter: number, tessellation: number, subdivisions: number, arc: number, faceColors: Color4[], faceUV: Vector4[], hasRings: boolean, enclose: boolean, sideOrientation: number }

static CreateTorus(options) → VertexData

Parameters

Name Type Description
options { diameter: number, thickness: number, tessellation: number, sideOrientation: number }

static CreateLineSystem(options) → VertexData

Parameters

Name Type Description
options { lines: Vector3[][] }

static CreateDashedLines(options) → VertexData

Parameters

Name Type Description
options { points: Vector3[], dashSize: number, gapSize: number, dashNb: number }

static CreateGround(options) → VertexData

Parameters

Name Type Description
options { width: number, height: number, subdivisions: number, subdivisionsX: number, subdivisionsY: number }

static CreateTiledGround(options) → VertexData

Parameters

Name Type Description
options { xmin: number, zmin: number, xmax: number, zmax: number, subdivisions: { w: number, h: number }, precision: { w: number, h: number } }

static CreateGroundFromHeightMap(options) → VertexData

Parameters

Name Type Description
options { width: number, height: number, subdivisions: number, minHeight: number, maxHeight: number, buffer: Uint8Array, bufferWidth: number, bufferHeight: number }

static CreatePlane(options) → VertexData

Parameters

Name Type Description
options { size: number, width: number, height: number, sideOrientation: number }

static CreateDisc(options) → VertexData

Parameters

Name Type Description
options { radius: number, tessellation: number, arc: number, sideOrientation: number }

static CreateIcoSphere(options) → VertexData

Parameters

Name Type Description
options { radius: number, radiusX: number, radiusY: number, radiusZ: number, flat: boolean, subdivisions: number, sideOrientation: number }

static CreatePolyhedron(options) → VertexData

Parameters

Name Type Description
options { type: number, size: number, sizeX: number, sizeY: number, sizeZ: number, custom: any, faceUV: Vector4[], faceColors: Color4[], flat: boolean, sideOrientation: number }

static CreateTorusKnot(options) → VertexData

Parameters

Name Type Description
options { radius: number, tube: number, radialSegments: number, tubularSegments: number, p: number, q: number, sideOrientation: number }

static ComputeNormals(positions, indices, normals) → void

Parameters

Name Type Description
positions any @param positions
indices any @param indices
normals any @param normals

static ImportVertexData(parsedVertexData, geometry) → void

Parameters

Name Type Description
parsedVertexData any
geometry Geometry @param geometry