matter-attractors icon indicating copy to clipboard operation
matter-attractors copied to clipboard

an attractors plugin for matter.js

Results 10 matter-attractors issues
Sort by recently updated
recently updated
newest added

When you add bodies before the attractor, they will have no force applied. You were applying force only to bodies of index attractor + 1

Nothing too crucial, but just wanted to note version declaration is not consistent. Latest package version states `0.1.6`, but the plugin is registered as version `0.1.4`: https://github.com/liabru/matter-attractors/blob/c470ed42e279a2a4d248e984d78a9e20ac374855/build/matter-attractors.js#L107

main.js:5301 matter-js: Plugin.use: [email protected] is for matter-js@^0.12.0 but installed on [email protected].

task

Hello! I'm attempting to achieve and effect where the attraction between bodies varies depending on their distance and mass (like a magnet). I've attempted to use the following function, using...

Hey so I'm working on creating body orbits which pull certain other bodies towards them. I've managed to create the code that allows some bodies to only exert forces on...

It seems that an attracting body will not attract other bodies added to the world before it. Demo here: https://codepen.io/lonekorean/pen/cfc51f387d8f32727288f3a59113ceeb Comment/uncomment line 42/43 to see.

Because static bodies have infinite mass and other propeties, after setting at least 1 body to static this results with completely bugged stage (bodies get infinite prop.) Actually there should...

The plugin is breaking when running in IE11. You can try it with your example page aswell. Error is: "Invalid calling object"...

Wondering how you'd simulate wind. Single attractor pulling all bodies towards it? Negative attractor gravity pushing all away? (that seems more like a circular 'hill' with even slopes). I'm interested...

I have a spherical area, and I'd like for particles to naturally distribute themselves somewhat evenly inside the area. Could I possibly use Matter's gravity along with this to somehow...