updatePath method

void updatePath(
  1. ScenePath path
)

Re-sweeps the tube along path, reusing the GPU buffers.

The radius, tessellation, and caps are unchanged, so the topology is stable. Requires GeometryStorage.updatable.

Implementation

void updatePath(ScenePath path) {
  final arrays = buildTubeArrays(
    path,
    radius: _radius,
    radialSegments: _radialSegments,
    stations: _stations,
    caps: _caps,
  );
  updatePositions(arrays.positions);
  updateNormals(arrays.normals);
  updateTexCoords(arrays.texCoords);
}