fix: polish stuff a bit
This commit is contained in:
@@ -101,8 +101,10 @@ impl Drop for Lines {
|
||||
|
||||
pub fn draw_all(token: &MainThreadToken) {
|
||||
for lines in LINES_REGISTRY.get_valid_contents() {
|
||||
if lines.space.node().unwrap().enabled() {
|
||||
lines.draw(token);
|
||||
if let Some(node) = lines.space.node() {
|
||||
if node.enabled() {
|
||||
lines.draw(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,8 +163,10 @@ impl Drop for Text {
|
||||
|
||||
pub fn draw_all(token: &MainThreadToken) {
|
||||
for text in TEXT_REGISTRY.get_valid_contents() {
|
||||
if text.space.node().unwrap().enabled() {
|
||||
text.draw(token);
|
||||
if let Some(node) = text.space.node() {
|
||||
if node.enabled() {
|
||||
text.draw(token);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ impl FieldRefAspect for Field {
|
||||
) -> Result<f32> {
|
||||
let reference_space = space.get_aspect::<Spatial>()?;
|
||||
let field = node.get_aspect::<Field>()?;
|
||||
Ok(field.distance(&reference_space, point.into()).into())
|
||||
Ok(field.distance(&reference_space, point.into()))
|
||||
}
|
||||
|
||||
async fn normal(
|
||||
|
||||
Reference in New Issue
Block a user