Usando createjs.Shape, dibujé un trazo entre dos puntos. Me gustaría convertir el trazo en una ruta de animación para un objeto. Mirando en GSAP animateToPath, aparentemente la ruta debe ser un .svg. ¿Hay alguna manera de convertir mi trazo a svg usando código? ¿Existen bibliotecas que faciliten este tipo de interpolación de ruta? Muy apreciado.
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);
Si solo está buscando convertir las instrucciones de EaselJS a SVG, no busque más allá de la clase SVGExporter.
https://github.com/CreateJS/EaselJS/tree/master/extras/SVGExporter
var exporter = new SVGExporter(stage, false, false, false); exporter.run(); document.body.appendChild(exporter.svg);¡La mejor de las suertes!