Skip to content

Commit

Permalink
Merge pull request bevyengine#104 from bitshifter/glam-0.9
Browse files Browse the repository at this point in the history
Upgrade glam from 0.8.7 to 0.9.3
  • Loading branch information
cart authored Aug 12, 2020
2 parents 00a8872 + 5912206 commit 5d0d3e8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 29 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ license = "MIT"
keywords = ["bevy"]

[dependencies]
glam = { version = "0.8.7", features = ["serde"] }
glam = { version = "0.9.3", features = ["serde"] }
2 changes: 0 additions & 2 deletions crates/bevy_math/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
mod face_toward;
mod geometry;
mod perspective;

pub use face_toward::*;
pub use geometry::*;
pub use glam::*;
pub use perspective::*;

pub mod prelude {
pub use crate::{FaceToward, Mat3, Mat4, Quat, Rect, Size, Vec2, Vec3, Vec4};
Expand Down
23 changes: 0 additions & 23 deletions crates/bevy_math/src/perspective.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/bevy_render/src/camera/projection.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use bevy_math::{Mat4, PerspectiveRh};
use bevy_math::Mat4;
use bevy_property::{Properties, Property};
use serde::{Deserialize, Serialize};
use super::DepthCalculation;
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ui/src/widget/text.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{CalculatedSize, Node};
use bevy_asset::{Assets, Handle};
use bevy_ecs::{Changed, Query, Res, ResMut};
use bevy_math::Size;
use bevy_math::{Size, Vec3};
use bevy_render::{
draw::{Draw, DrawContext, Drawable},
renderer::{AssetRenderResourceBindings, RenderResourceBindings},
Expand Down Expand Up @@ -59,7 +59,7 @@ pub fn draw_text_system(
mut query: Query<(&mut Draw, &Text, &Node, &Transform)>,
) {
for (mut draw, text, node, transform) in &mut query.iter() {
let position = transform.value.w_axis().truncate() - (node.size / 2.0).extend(0.0);
let position = Vec3::from(transform.value.w_axis().truncate()) - (node.size / 2.0).extend(0.0);

let mut drawable_text = DrawableText {
font: fonts.get(&text.font).unwrap(),
Expand Down

0 comments on commit 5d0d3e8

Please sign in to comment.