Expand description

Crates.io Crates.io MIT/Apache 2.0

§bevy_rapier_collider_gen

§🚚 THIS CRATE HAS MOVED 🚚

https://github.com/shnewto/bevy_collider_gen

Functions§

  • Takes a Bevy Image type and an boolean to indicate whether to translate the points you get back to either side of (0, 0) instead of everything in positive x and y
  • Marching squares adjacent, walks all the pixels in the provided data and keeps track of any that have at least one transparent / zero value neighbor then, while sorting into drawing order, groups them into sets of connected pixels
  • Generate as many bevy_rapier2d convex_hull colliders as it can find in the image, coordinates left alone and all in positive x and y
  • Generate as many bevy_rapier2d convex_hull colliders as it can find in the image, coordinates translated to either side of (0, 0)
  • Generate as many bevy_rapier2d convex_polyline colliders as it can find in the image, coordinates left alone and all in positive x and y
  • Generate as many bevy_rapier2d convex_polyline colliders as it can find in the image, coordinates translated to either side of (0, 0)
  • Generate as many bevy_rapier2d heightfield colliders as it can find in the image, coordinates left alone and all in positive x and y
  • Generate as many bevy_rapier2d heightfield colliders as it can find in the image, coordinates translated to either side of (0, 0)
  • If there’s more than one sprite / object in the image, this returns all it finds, with coordinates translated to either side of (0, 0)
  • If there’s more than one sprite / object in the image, this returns all it finds, with coordinates left alone and all in positive x and y
  • Generate as many bevy_rapier2d polyline colliders as it can find in the image, coordinates left alone and all in positive x and y
  • Generate as many bevy_rapier2d polyline colliders as it can find in the image, coordinates translated to either side of (0, 0)
  • Generate a single bevy_rapier2d convex_hull collider from the image, coordinates left alone and all in positive x and y
  • Generate a single bevy_rapier2d convex_hull collider from the image, coordinates translated to either side of (0, 0)
  • Generate a single bevy_rapier2d convex_polyline collider from the image, coordinates left alone and all in positive x and y
  • Generate a single bevy_rapier2d convex_polyline collider from the image, coordinates translated to either side of (0, 0)
  • Generate a single bevy_rapier2d heightfield collider from the image, coordinates left alone and all in positive x and y
  • Generate a single bevy_rapier2d heightfield collider from the image, coordinates translated to either side of (0, 0)
  • If there’s only one sprite / object in the image, this returns just one, with coordinates left alone and all in positive x and y
  • If there’s only one sprite / object in the image, this returns just one, with coordinates translated to either side of (0, 0)
  • Generate a single bevy_rapier2d polyline collider from the image, coordinates left alone and all in positive x and y
  • Generate a single bevy_rapier2d polyline collider from the image, coordinates translated to either side of (0, 0)
  • Translate vector of points in positive x,y to either side of (0,0)