updateCurve method

dynamic updateCurve(
  1. dynamic index,
  2. dynamic curve
)

Implementation

updateCurve(index, curve) {
  if (index >= curveArray.length) throw ('Index out of range for Flow');
  var curveLength = curve.getLength();
  uniforms["spineLength"]["value"] = curveLength;
  curveLengthArray[index] = curveLength;
  curveArray[index] = curve;
  updateSplineTexture(splineTexure, curve, offset: index);
}