Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
¿Cómo creo un compuesto de matter.js a partir de svgs?

¿Cómo puedo crear un cuerpo a partir de múltiples svg, de modo que al final tenga un svg con otro colocado encima como parte del svg más grande?

Ahora tengo dos svgs aquí: https://codepen.io/m42444/pen/eYVEbOq Quiero que la "H" quede fija en el svg grande.

¡Gracias por cualquier ayuda!

 const vertexSets = [], firstColor = '#F9420B'; secondColor = '#009245'; $('#svgOne').find('path').each(function(i, path){ var svgOne = Bodies.fromVertices(percentX(80), percentY(30), Matter.Vertices.scale(Svg.pathToVertices(path, 10), (window.innerWidth / 2000), (window.innerWidth / 2000)), { render: { fillStyle: firstColor, strokeStyle: firstColor, lineWidth: 1 } }, true); vertexSets.push(svgOne); console.log(vertexSets) }); $('#svgTwo').find('path').each(function(i, path){ var svgTwo = Bodies.fromVertices(percentX(80), percentY(30), Matter.Vertices.scale(Svg.pathToVertices(path, 10), (window.innerWidth / 2000), (window.innerWidth / 2000)), { render: { fillStyle: secondColor, strokeStyle: secondColor, lineWidth: 1 } }, true); vertexSets.push(svgTwo); });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!