Repository

TextTroika

Extends:

Mesh → TextTroika

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
public

center: *

public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public
public

text: *

public
public
public
public
Private Members
private

_mesh: *

Method Summary

Public Methods
public
public

setText(text: *)

public

Inherited Summary

From class Mesh
public static

generateStrokeMesh(mesh: Mesh, inflateValue: Number): Mesh

Static Utils to generate the stroke Mesh from a given shape

public static

generateStrokeShape(mesh: Mesh, inflateValue: Number): *

Static Utils to generate the stroke for the given vertices with the given stroke width

public static

geometryIsCW(geometry: Geometry): Boolean

Static Utils to check the direction of a geometry (ccw o cw)

public

events: *

public
public
public
public
public
public

indices: *[]

public
public
public

name: *

public
public
public
public

type: *

public
public
private

_mesh: *

public

Attach the material to this mesh.

public

clone(): *

deep clone this Mesh return {Mesh} a new clone (copy) of this Mesh in a new Mesh object

public

compute Face and Vertex Normals for the current geometry

public

Call this method to construct a custom mesh

public

erase(recursive: Boolean)

Erase this mesh's geometry and material from memory

public

generateFillMesh(vertices: *)

Generate the mesh for the given vertices and generates flat uvs for it.

public

Generate the flat uvs for this mesh.

public

genereate a mesh from already made geometry and material

public

Compute and returns the bounding box of the current geometry or Node, which is an object made of 2 Vector3.

public

Compute and returns the bounding sphere of the current geometry or Node, which is an object with a radius :

public

Returns the center of the geometry (vertices) based on boundingbox

public

Shortcut for getSize().y

public

Shortcut for getSize().z

public
public
public

Returns the size of the geometry (vertices) based on boundingbox

public

getUVs(index: integer): Array

Get the UV of this mesh geometry

public

Get the vertexColors of this mesh geometry's vertices

public

Get the vertices of this mesh geometry

public

Get the visibility of this mesh

public

Shortcut for getSize().x

public

Generate Float32Array and BufferAttribute for this geometry

public

Adds a Normal to the current geometry

public

pushQuad(v1: Vector3, v2: Vector3, v3: Vector3, v4: Vector3)

Adds a Quad to the current geometry

public

Adds a triangle to the current geometry

public

pushUV(uv1: Vector2, uv2: Vector2, uv3: Vector2)

Adds a UV to the current geometry

public

Adds a vertex to the current geometry

public

convinient method to reverse this Mesh geometry's normals

public

setCastShadow

public

Defines the position of the geometry's center (NOT the transform!).

public

setEventEmitterTrigger(scope: *, eventType: *)

public

Sets this Mesh material.

public
public

setReceiveShadow

public
public

setRotationX(value: float)

Set the rotation around x axis of the vertices (not the transform!)

public

setRotationY(value: float)

Set the rotation around y axis of the vertices (not the transform!)

public

setRotationZ(value: float)

Set the rotation around z axis of the vertices (not the transform!)

public

setScale(number|Vector3|Vector2: float | Vector3 | Vector2, Number: float, Number: float)

Set the scale of the geometry (vertices) - this is not like scaling the transform.

public

setTranslation(value: float, value: float, value: float)

Set the translation along all axis of the vertices (not the transform!)

public

setUVs(index: integer, uvs: Array)

Set the UV of this mesh geometry

public

setVertex(index: *, vertex: *)

public

Set the vertexColors of this mesh geometry's vertices

public

setVertices(vertices: Object)

Set the vertices of this mesh geometry

public

Set the visibility of this mesh

private

Updates this mesh material

Public Constructors

public constructor(params: Object) source

Construct an empty and unfinished Mesh for which a geometry must be constructed. Once filled with vertices, constructMesh method must be called, or a method generating a complete Mesh must be used (i.e generateFillMesh)

Override:

Mesh#constructor

Params:

NameTypeAttributeDescription
paramsObject

Parameters object, given by the constructor.

params.textNumber
  • optional
  • default: "text"

the text string

params.fontSizeNumber
  • optional
  • default: 1

the text font height

params.depthNumber
  • optional
  • default: 1

the glyph extrusion height. 0 to have flat letters.

params.bevelSegmentsNumber
  • optional
  • default: 5

the text bevel details and tesselation

params.bevelEnabledBoolean
  • optional
  • default: false

the text geometry uses curves

params.bevelSizeNumber
  • optional
  • default: 1

the text geometry bevel

params.fontNumber

the text font to use.

Public Members

public anchorX: * source

public anchorY: * source

public center: * source

public centerOffset: * source

public direction: * source

public fontFile: * source

public fontSize: * source

public geometry: * source

Override:

Mesh#geometry

public geometryNormalAttributes: * source

Override:

Mesh#geometryNormalAttributes

public geometryUVAttributes: * source

Override:

Mesh#geometryUVAttributes

public geometryVerticesAttributes: * source

Override:

Mesh#geometryVerticesAttributes

public letterSpacing: * source

public lineHeight: * source

public maxWidth: * source

public outlineColor: * source

public outlineOffsetX: * source

public outlineOffsetY: * source

public outlineOpacity: * source

public outlineWidth: * source

public overflowWrap: * source

public text: * source

public textAlign: * source

public textIndent: * source

public transform: * source

Override:

Mesh#transform

public whiteSpace: * source

Private Members

private _mesh: * source

Override:

Mesh#_mesh

Public Methods

public constructedCallback() source

public setText(text: *) source

Params:

NameTypeAttributeDescription
text*

public syncCallBack() source