class VertexData
Name | Type | Description | |
---|---|---|---|
data | FloatArray | ||
kind | string |
Associates the vertexData to the passed Mesh.
Sets it as updatable or not (default false
).
Returns the VertexData.
Name | Type | Description | |
---|---|---|---|
mesh | Mesh | ||
optional | updatable | boolean |
Associates the vertexData to the passed Geometry.
Sets it as updatable or not (default false
).
Returns the VertexData.
Name | Type | Description | |
---|---|---|---|
geometry | Geometry | ||
optional | updatable | boolean |
Updates the associated mesh.
Returns the VertexData.
Name | Type | Description | |
---|---|---|---|
mesh | Mesh | ||
optional | updateExtends | boolean | |
optional | makeItUnique | boolean |
Updates the associated geometry.
Returns the VertexData.
Name | Type | Description | |
---|---|---|---|
geometry | Geometry | ||
optional | updateExtends | boolean | |
optional | makeItUnique | boolean |
Transforms each position and each normal of the vertexData according to the passed Matrix.
Returns the VertexData.
Name | Type | Description | |
---|---|---|---|
matrix | Matrix |
Merges the passed VertexData into the current one.
Returns the modified VertexData.
Name | Type | Description | |
---|---|---|---|
other | VertexData | ||
optional | options | { tangentLength: number } |
Serializes the VertexData.
Returns a serialized object.
Returns the object VertexData associated to the passed mesh.
Name | Type | Description | |
---|---|---|---|
mesh | Mesh | ||
optional | copyWhenShared | boolean | |
optional | forceCopy | boolean |
Returns the object VertexData associated to the passed geometry.
Name | Type | Description | |
---|---|---|---|
geometry | Geometry | ||
optional | copyWhenShared | boolean | |
optional | forceCopy | boolean |
Creates the vertexData of the Ribbon.
Name | Type | Description | |
---|---|---|---|
options | { pathArray: Vector3[][], closeArray: boolean, closePath: boolean, offset: number, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4, invertUV: boolean, uvs: Vector2[], colors: Color4[] } |
Creates the VertexData of the Box.
Name | Type | Description | |
---|---|---|---|
options | { size: number, width: number, height: number, depth: number, faceUV: Vector4[], faceColors: Color4[], sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
Creates the VertexData of the Sphere.
Name | Type | Description | |
---|---|---|---|
options | { segments: number, diameter: number, diameterX: number, diameterY: number, diameterZ: number, arc: number, slice: number, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
Creates the VertexData of the Cylinder or Cone.
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, frontUVs: Vector4, backUVs: Vector4 } |
Creates the VertexData of the Torus.
Name | Type | Description | |
---|---|---|---|
options | { diameter: number, thickness: number, tessellation: number, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
Creates the VertexData of the LineSystem.
Name | Type | Description | |
---|---|---|---|
options | { lines: Vector3[][], colors: Nullable<Color4[][]> } |
Create the VertexData of the DashedLines.
Name | Type | Description | |
---|---|---|---|
options | { points: Vector3[], dashSize: number, gapSize: number, dashNb: number } |
Creates the VertexData of the Ground.
Name | Type | Description | |
---|---|---|---|
options | { width: number, height: number, subdivisions: number, subdivisionsX: number, subdivisionsY: number } |
Creates the VertexData of the TiledGround.
Name | Type | Description | |
---|---|---|---|
options | { xmin: number, zmin: number, xmax: number, zmax: number, subdivisions: { w: number, h: number }, precision: { w: number, h: number } } |
Creates the VertexData of the Ground designed from a heightmap.
Name | Type | Description | |
---|---|---|---|
options | { width: number, height: number, subdivisions: number, minHeight: number, maxHeight: number, colorFilter: Color3, buffer: Uint8Array, bufferWidth: number, bufferHeight: number } |
Creates the VertexData of the Plane.
Name | Type | Description | |
---|---|---|---|
options | { size: number, width: number, height: number, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
Creates the VertexData of the Disc or regular Polygon.
Name | Type | Description | |
---|---|---|---|
options | { radius: number, tessellation: number, arc: number, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
Re-creates the VertexData of the Polygon for sideOrientation.
Name | Type | Description | |
---|---|---|---|
polygon | Mesh | ||
sideOrientation | number | ||
optional | fUV | Vector4[] | |
optional | fColors | Color4[] | |
optional | frontUVs | Vector4 |
Creates the VertexData of the IcoSphere.
Name | Type | Description | |
---|---|---|---|
options | { radius: number, radiusX: number, radiusY: number, radiusZ: number, flat: boolean, subdivisions: number, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
Creates the VertexData of the Polyhedron.
Name | Type | Description | |
---|---|---|---|
options | { type: number, size: number, sizeX: number, sizeY: number, sizeZ: number, custom: any, faceUV: Vector4[], faceColors: Color4[], flat: boolean, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
Creates the VertexData of the Torus Knot.
Name | Type | Description | |
---|---|---|---|
options | { radius: number, tube: number, radialSegments: number, tubularSegments: number, p: number, q: number, sideOrientation: number, frontUVs: Vector4, backUVs: Vector4 } |
options (optional) :
facetPositions : optional array of facet positions (vector3)
facetNormals : optional array of facet normals (vector3)
facetPartitioning : optional partitioning array. facetPositions is required for facetPartitioning computation
subDiv : optional partitioning data about subdivsions on each axis (int), required for facetPartitioning computation
ratio : optional partitioning ratio / bounding box, required for facetPartitioning computation
bbSize : optional bounding box size data, required for facetPartitioning computation
bInfo : optional bounding info, required for facetPartitioning computation
useRightHandedSystem: optional boolean to for right handed system computation
depthSort : optional boolean to enable the facet depth sort computation
distanceTo : optional Vector3 to compute the facet depth from this location
depthSortedFacets : optional array of depthSortedFacets to store the facet distances from the reference location
Name | Type | Description | |
---|---|---|---|
positions | any | ||
indices | any | ||
normals | any |
Creates a new VertexData from the imported parameters.
Name | Type | Description | |
---|---|---|---|
parsedVertexData | any | ||
geometry | Geometry |