updateCurve method

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

Implementation

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