Pomax / bezierjs

A nodejs and client-side library for (cubic) Bezier curve work
MIT License
1.7k stars 230 forks source link

intersects bug Bezier to Bezier #201

Open RGBWang opened 11 months ago

RGBWang commented 11 months ago
new Bezier(50, 25, 50, 25, 122, 185, 111, 185);
var curve2 = new Bezier(9, 111, 8, 99, 136,78, 142, 58 );
var draw = function() {
  this.drawSkeleton(curve);
  this.drawCurve(curve);
  this.setColor("red");
  this.drawCurve(curve2);
  this.setColor("black");
  curve.intersects(curve2).forEach(pair => {
    var t = pair.split("/").map(v => parseFloat(v));
    this.drawPoint(curve.get(t[0]));
  });
}
Pomax commented 11 months ago

Don't just text-dump: please explain what's wrong, and how this code shows that off.

RGBWang commented 11 months ago

when copy the code in /docs/index.html ,

Githubissues.
  • Githubissues is a development platform for aggregating issues.