Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

202
Visualizações
Converting createjs.Graphics stroke to animation path

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);

about 4 years ago · Santiago Gelvez
1 Respostas
Responde à pergunta

0

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!

about 4 years ago · Santiago Gelvez Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda