make polyline optional

This commit is contained in:
Aevyrie Roessler 2023-01-29 01:10:49 -08:00
parent 2a74df453d
commit 1d31e14ad9
No known key found for this signature in database
GPG Key ID: F975B68AD0BCCF40
2 changed files with 10 additions and 4 deletions

View File

@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
[dependencies]
bevy = { version = "0.9", default_features = false }
bevy_polyline = "0.4"
bevy_polyline = { version = "0.4", optional = true }
[dev-dependencies]
bevy = { version = "0.9", default_features = false, features = [
@ -17,3 +17,7 @@ bevy = { version = "0.9", default_features = false, features = [
"bevy_winit",
"x11",
] }
[features]
default = ["debug"]
debug = ["bevy_polyline"]

View File

@ -90,9 +90,11 @@ use bevy::{math::DVec3, prelude::*, transform::TransformSystem};
use std::marker::PhantomData;
pub mod camera;
pub mod debug;
pub mod precision;
#[cfg(feature = "debug")]
pub mod debug;
use precision::*;
/// Add this plugin to your [`App`] to for floating origin functionality.
@ -264,7 +266,7 @@ pub struct FloatingSpatialBundle<P: GridPrecision> {
pub grid_position: GridCell<P>,
}
/// Defines the grid cell this entity's [`Transform`] is relative to.
/// Defines the grid cell this entity's `Transform` is relative to.
///
/// This component is generic over a few integer types to allow you to select the grid size you
/// need. These correspond to a total usable volume of a cube with the following edge lengths:
@ -272,7 +274,7 @@ pub struct FloatingSpatialBundle<P: GridPrecision> {
/// **Assuming you are using a grid cell edge length of 10,000 meters, and `1.0` == 1 meter**
///
/// - i8: 2,560 km = 74% of the diameter of the Moon
/// - i16 655,350 km = 85% of the diameter of the Moon's orbit around Earth
/// - i16: 655,350 km = 85% of the diameter of the Moon's orbit around Earth
/// - i32: 0.0045 light years = ~4 times the width of the solar system
/// - i64: 19.5 million light years = ~100 times the width of the milky way galaxy
/// - i128: 3.6e+26 light years = ~3.9e+15 times the width of the observable universe