Class CharDataModifiers
- Namespace
- TMPEffects.Modifiers
Modifiers applied to a TextMeshPro character.
Used by CharData to store modifications.
[Serializable]
public class CharDataModifiers
- Inheritance
-
CharDataModifiers
- Inherited Members
Constructors
CharDataModifiers()
public CharDataModifiers()
CharDataModifiers(CharDataModifiers)
public CharDataModifiers(CharDataModifiers original)
Parameters
original
CharDataModifiers
Properties
BL_Color
Stores the color of the bottom-left vertex after calling CalculateVertexColors(CharData, IAnimatorDataProvider).
public Color32 BL_Color { get; }
Property Value
- Color32
BL_Position
Stores the position of the bottom-left vertex after calling CalculateVertexPositions(CharData, IAnimatorDataProvider).
public Vector3 BL_Position { get; }
Property Value
- Vector3
BR_Color
Stores the color of the bottom-right vertex after calling CalculateVertexColors(CharData, IAnimatorDataProvider).
public Color32 BR_Color { get; }
Property Value
- Color32
BR_Position
Stores the position of the bottom-right vertex after calling CalculateVertexPositions(CharData, IAnimatorDataProvider).
public Vector3 BR_Position { get; }
Property Value
- Vector3
CharacterModifiers
The character modifiers, applied uniformly to all vertices of the character.
public TMPCharacterModifiers CharacterModifiers { get; }
Property Value
MeshModifiers
The mesh modifiers, applied to individual vertices.
public TMPMeshModifiers MeshModifiers { get; }
Property Value
TL_Color
Stores the color of the top-left vertex after calling CalculateVertexColors(CharData, IAnimatorDataProvider).
public Color32 TL_Color { get; }
Property Value
- Color32
TL_Position
Stores the position of the top-left vertex after calling CalculateVertexPositions(CharData, IAnimatorDataProvider).
public Vector3 TL_Position { get; }
Property Value
- Vector3
TR_Color
Stores the color of the top-right vertex after calling CalculateVertexColors(CharData, IAnimatorDataProvider).
public Color32 TR_Color { get; }
Property Value
- Color32
TR_Position
Stores the position of the top-right vertex after calling CalculateVertexPositions(CharData, IAnimatorDataProvider).
public Vector3 TR_Position { get; }
Property Value
- Vector3
Methods
CalculateVertexColors(CharData, IAnimatorDataProvider)
Calculate the vertex colors, applying all relevant modifiers to the passed in CharData. The results are stored in BL_Color, TL_Color, TR_Color, BR_Color.
public void CalculateVertexColors(CharData cData, IAnimatorDataProvider context)
Parameters
cData
CharDataThe CharData to apply the modifiers to.
context
IAnimatorDataProvider
CalculateVertexPositions(CharData, IAnimatorDataProvider)
Calculate the vertex positions, applying all relevant modifiers to the passed in CharData.
The results are stored in BL_Position, TL_Position, TR_Position, BR_Position.
public void CalculateVertexPositions(CharData cData, IAnimatorDataProvider context)
Parameters
cData
CharDataThe CharData to apply the modifiers to.
context
IAnimatorDataProvider
Combine(CharDataModifiers)
Combine this CharDataModifiers with another.
public void Combine(CharDataModifiers other)
Parameters
other
CharDataModifiersThe other CharacterModifiers to combine with.
LerpCharacterModifiersUnclamped(CharData, TMPCharacterModifiers, float, TMPCharacterModifiers)
Linearly interpolate between a CharData and a TMPCharacterModifiers.
This essentially interpolates between "no modifiers" (the CharData's default values, and the TMPCharacterModifiers.
The result is stored in result.
public static void LerpCharacterModifiersUnclamped(CharData cData, TMPCharacterModifiers modifiers, float t, TMPCharacterModifiers result)
Parameters
cData
CharDatamodifiers
TMPCharacterModifierst
floatresult
TMPCharacterModifiers
LerpCharacterModifiersUnclamped(CharData, TMPCharacterModifiers, TMPCharacterModifiers, float, TMPCharacterModifiers)
Linearly interpolate between two TMPCharacterModifiers. The result is stored in result, start and end are not modified.
public static void LerpCharacterModifiersUnclamped(CharData cData, TMPCharacterModifiers start, TMPCharacterModifiers end, float t, TMPCharacterModifiers result)
Parameters
cData
CharDatastart
TMPCharacterModifiersend
TMPCharacterModifierst
floatresult
TMPCharacterModifiersStores the result.
LerpMeshModifiersUnclamped(CharData, IAnimatorDataProvider, TMPMeshModifiers, TMPMeshModifiers, float, TMPMeshModifiers)
Linearly interpolate between two TMPMeshModifiers. The result is stored in result, start and end are not modified.
public static void LerpMeshModifiersUnclamped(CharData cData, IAnimatorDataProvider ctx, TMPMeshModifiers start, TMPMeshModifiers end, float t, TMPMeshModifiers result)
Parameters
cData
CharDatactx
IAnimatorDataProviderstart
TMPMeshModifiersend
TMPMeshModifierst
floatresult
TMPMeshModifiersStores the result.
LerpMeshModifiersUnclamped(CharData, TMPMeshModifiers, float, TMPMeshModifiers)
Linearly interpolate between a CharData and a TMPMeshModifiers.
This essentially interpolates between "no modifiers" (the CharData's default values, and the TMPMeshModifiers.
The result is stored in result.
public static void LerpMeshModifiersUnclamped(CharData cData, TMPMeshModifiers modifiers, float t, TMPMeshModifiers result)
Parameters
cData
CharDatamodifiers
TMPMeshModifierst
floatresult
TMPMeshModifiersStores the result.
LerpUnclamped(CharData, IAnimatorDataProvider, CharDataModifiers, CharDataModifiers, float, CharDataModifiers)
Linearly interpolate between two CharDataModifiers. The result is stored in result, start and end are not modified.
public static void LerpUnclamped(CharData cData, IAnimatorDataProvider ctx, CharDataModifiers start, CharDataModifiers end, float t, CharDataModifiers result)
Parameters
cData
CharDatactx
IAnimatorDataProviderstart
CharDataModifiersend
CharDataModifierst
floatThe
result
CharDataModifiersStores the result.
LerpUnclamped(CharData, CharDataModifiers, float, CharDataModifiers)
Linearly interpolate between a CharData and a CharDataModifiers.
This essentially interpolates between "no modifiers" (the CharData's default values, and the CharDataModifiers.
The result is stored in result.
public static void LerpUnclamped(CharData cData, CharDataModifiers modifiers, float t, CharDataModifiers result)
Parameters
cData
CharDatamodifiers
CharDataModifierst
floatresult
CharDataModifiersStores the result.
Reset()
Reset the modifiers.
public void Reset()
VertexColor(int)
Get the vertex color. You have to call CalculateVertexColors(CharData, IAnimatorDataProvider) before this to populate the values.
public Color32 VertexColor(int i)
Parameters
i
int0: BL, 1: TL, 2: TR, 3: BR
Returns
- Color32
VertexPosition(int)
Get the vertex position. You have to call CalculateVertexPositions(CharData, IAnimatorDataProvider) before this to populate the values.
public Vector3 VertexPosition(int i)
Parameters
i
int0: BL, 1: TL, 2: TR, 3: BR
Returns
- Vector3