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

118
Visualizações
Line in matter.js

I'm trying to create a triangular billiard table. My question is how do I make a line in matter.js? This way, I can make 3 intersecting lines to create a triangle. Here's some stuff I've already tried:

  • Creating a triangle with Bodies.polygon(x,y,3), but then I can't place a billiard ball inside, due to collision detection.
  • Ising thin rectangles to create a triangular boundary with Bodies.rectangle(x, y, 1, 200); (3 times), but then realized that if I want to create different triangles (i.e., obtuse, acute, right, isosceles, etc.), this would require too much manual tuning.
  • I tried using matter.vertices, but there's no examples of using it to create a line in the documentation! Closest thing I found was this GitHub issue, but I don't know what vertexSets is.

Any help is appreciated.

about 4 years ago · Juan Pablo Isaza
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