Using createjs.Shape, I've drawn a stoke between two points. I'd like to convert the stroke to an animation path for an object. Looking into GSAP animateToPath, apparently the path needs to be an .svg. Is there a way to convert my stroke to svg using code? Are there any libraries out there that would facilitate this type of path tween? Much appreciated.
var line = new createjs.Shape(new createjs.Graphics().setStrokeStyle(40).beginStroke("#012849").moveTo(this.cubes[14].x+50,this.cubes[14].y+50).lineTo(this.cubes[57].x+50,this.cubes[57].y+50).endStroke()); this.container.addChild(line);
If you are just looking to convert EaselJS instructions to SVG, look no further than the SVGExporter class.
https://github.com/CreateJS/EaselJS/tree/master/extras/SVGExporter
var exporter = new SVGExporter(stage, false, false, false);
exporter.run();
document.body.appendChild(exporter.svg);
Best of luck!