Class: FiberTube

FiberTube(fiber, parametersopt)

FiberTube creates a 3D representation of a given fiber in a tubular shape of given radius.
Subject-Observer pattern must be enabled from its FiberSource reference and fired from subject with refresh();.

Constructor

new FiberTube(fiber, parametersopt)

Parameters:
Name Type Attributes Description
fiber FiberSource Reference fiber.
parameters Object <optional>
Optional parameters
Properties
Name Type Attributes Default Description
axialSegments Number <optional>
256 Number of axial segments to feature in the tube mesh.
radialSegments Number <optional>
64 Number of radial segments to feature in the tube mesh.
color THREE.Color <optional>
Color of the thread. If not specified, generated randomly from colors.
Properties:
Name Type Description
mesh THREE.Mesh Mesh containing the fiber's tubular shape. Ready for scene.add.
fiber FiberSource Reference to source fiber object.
color THREE.Color Color of the tube.
axialSegments Number Amount of segments to feature in the tube mesh.
radialSegments Number Amount of radial segments to feature in the tube mesh.
Source:

Methods

(static) refresh()

Updates tube shape and position from self properties. Must be fired when those change.
Source: