Class: FiberSkeleton

FiberSkeleton(fiber, parametersopt)

FiberSkeleton creates 3D representation of control points and fiber path from a given fiber.
Subject-Observer pattern must be enabled from its FiberSource reference and fired from subject with refresh();.

Constructor

new FiberSkeleton(fiber, parametersopt)

Parameters:
Name Type Attributes Description
fiber FiberSource Reference fiber.
parameters Object <optional>
Optional parameters
Properties
Name Type Attributes Default Description
lineSegments Number <optional>
256 Number of axial segments to feature in line's FiberSkeleton
sphereSegments Number <optional>
32 Number of radial segments to feature in each control point of FiberSkeleton
color THREE.Color <optional>
Color of the thread. If not specified, generated randomly from colors.
Properties:
Name Type Description
line THREE.Line The thread representing the path. Ready for scene.add.
spheres THREE.Mesh Big mesh containing all control-point marking spheres. Ready for scene.add.
fiber FiberSource Reference to source fiber object.
color THREE.Color Color of the thread.
sphereSegments Number Amount of segments (in each dimension) each controlpoint sphere will feature.
lineSegments Number Amount of segments the thread will feature.
Source:

Methods

(static) refresh()

Updates thread and spheres position from self properties. Must be fired when those change.
Source: