You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jonathanolson - The issue #53 made significant difference in performance. I found one more method "computeCuspInfo" in Cubic.js which is creating quite a few vector2 instances.
// t value for the cusp, and the related determinant and inflection pointscomputeCuspInfo: function(){// from http://www.cis.usouthal.edu/~hain/general/Publications/Bezier/BezierFlattening.pdf// TODO: allocation reductionvara=this._start.times(-1).plus(this._control1.times(3)).plus(this._control2.times(-3)).plus(this._end);varb=this._start.times(3).plus(this._control1.times(-6)).plus(this._control2.times(3));varc=this._start.times(-3).plus(this._control1.times(3));varaPerp=a.perpendicular();varbPerp=b.perpendicular();varaPerpDotB=aPerp.dot(b);this._tCusp=-0.5*(aPerp.dot(c)/aPerpDotB);this._tDeterminant=this._tCusp*this._tCusp-(1/3)*(bPerp.dot(c)/aPerpDotB);if(this._tDeterminant>=0){varsqrtDet=Math.sqrt(this._tDeterminant);this._tInflection1=this._tCusp-sqrtDet;this._tInflection2=this._tCusp+sqrtDet;}else{this._tInflection1=NaN;this._tInflection2=NaN;}},
The text was updated successfully, but these errors were encountered:
@jonathanolson - The issue #53 made significant difference in performance. I found one more method "computeCuspInfo" in Cubic.js which is creating quite a few vector2 instances.
The text was updated successfully, but these errors were encountered: