Relative Content

Tag Archive for javascriptmatter.js

Matter.js with custom renderer runs twice as fast as it should

I’m trying to use JavaScript to make it so that when certain pieces of text in the document are clicked, they become physical objects and drop down to the bottom of the screen. I’m using matter.js to do this and it’s only the rendering that’s tripping me up.

How do I re-render after adding a new object in matter.js?

I’m trying to use JavaScript to make it so that when certain pieces of text in the document are clicked, they become physical objects and drop down to the bottom of the screen. I’m using matter.js to do this and it’s only the rendering that’s tripping me up.

How do I re-render after adding a new object in matter.js?

I’m trying to use JavaScript to make it so that when certain pieces of text in the document are clicked, they become physical objects and drop down to the bottom of the screen. I’m using matter.js to do this and it’s only the rendering that’s tripping me up.

Multi-polygon objects in matter.js being “smushed” together?

I have a polygon that I’m trying to make into a Body in matter.js, but it’s concave so i’ve split it into multiple convex polygons as shown below:

here is the point data, it’s very large

But when I try to add this into my matter.js world, like this: