geometry_get_fibers
Retrieves vertex data from a Fibers element in the format used by the generate_fibers command, a map containing a fibers and type properties corresponding to the parameters of the same name for that command. Alternatively an optimized binary representation can be returned for use in V8 commands.
References:
arguments
- "binary" : Boolean (default: false)
If true a binary representation of the Fibers object will be returned instead of the format used for the generate_fibers command. This is primarily intended for consumption within server-side V8 JavaScript commands and is much faster to generate. Here is an example of the binary format returned. The binary elements are returned as raw binary data (bytes). You will need to decode them to the appropriate type before use. In V8 this will usually mean retrieving the ArrayBuffer object from the binary data and accessing this through buffer view objects like Float32Array, Uint32Array and so on. The types in brackets in the sample below indicates the expected type.
{ control_points: Binary (Float32Array), radii: Binary (Float32Array), uvs: Binary (Float32Array), uv_size: Uint32 (either 1, 2 or 3), fiber_sizes: Binary (Uint32Array), type: String (either bspline, cutmull_rom or linear) }
Control point and radii information is mandatory but UVs are optional. The fiber_sizes property indicates the number of vertices per individual fiber. For instance, a fiber_sizes of [3,4,2] would indicate the first 3 control points, radii and uv coordinates are part of the first fiber, the next 4 points make up the the next fiber, and the last 2 points makes up the last fiber. - "fibers_name" : String
Name of the Fibers element to retrieve