Class PathParticleRope
Namespace: ValveResourceFormat.ResourceTypes
Assembly: ValveResourceFormat.dll
Parsers for the KeyValues3 text values stored as strings on path_particle_rope / path_particle_rope_clientside entities (pathnodes, pathnoderadiusscales, pathnodecolors, pathnodepinsenabled). The values look like "[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 2.0, 3.0, ], [ ... ], ]".
public static class PathParticleRopeInheritance
object ← PathParticleRope
Remarks
The keys hold KV3 text arrays, not keyvalue strings, so the keyvalue text parsers do not read them. Older data without KV3 syntax is read as plain numbers, where brackets, commas and spaces only separate them.
Fields
FloatsPerNode
Floats per pathnodes entry: position(3) + inTangent(3) + outTangent(3).
public const int FloatsPerNode = 9Field Value
int
Methods
ParseColors(string?, int)
Parses the pathnodecolors value ([[r,g,b],...], components in 0-1) into nodeCount per-node colors. An entry that is not three components is black, and missing entries are white.
public static Vector3[] ParseColors(string? input, int nodeCount)Parameters
input string?
nodeCount int
Returns
Vector3[]
ParseFloats(string?, int, float)
Parses a per-node array of floats such as pathnodemovespeedtypes into nodeCount values. Missing entries are defaultValue.
public static float[] ParseFloats(string? input, int nodeCount, float defaultValue)Parameters
input string?
nodeCount int
defaultValue float
Returns
float[]
ParseNodes(string?)
Parses the pathnodes value into a list of spline nodes. Each node reads exactly 9 floats, zero-padding a short entry. Returns an empty list when the text is empty.
public static List<PathParticleRopeNode> ParseNodes(string? pathNodes)Parameters
pathNodes string?
Returns
ParsePins(string?, int)
Parses the pathnodepinsenabled value ([true, false, ...]) into nodeCount booleans. Missing entries are true.
public static bool[] ParsePins(string? input, int nodeCount)Parameters
input string?
nodeCount int
Returns
bool[]
ParseRadiusScales(string?, int)
Parses the pathnoderadiusscales value into nodeCount per-node radius multipliers. Missing entries are 1.
public static float[] ParseRadiusScales(string? input, int nodeCount)Parameters
input string?
nodeCount int
Returns
float[]

