Fixed text
This commit is contained in:
@@ -7,7 +7,7 @@ use regex::Regex;
|
|||||||
use stardust_xr_fusion::{
|
use stardust_xr_fusion::{
|
||||||
client::{Client, FrameInfo, RootHandler},
|
client::{Client, FrameInfo, RootHandler},
|
||||||
core::values::Transform,
|
core::values::Transform,
|
||||||
drawable::{Alignment, MaterialParameter, Model, ResourceID, Text, TextStyle},
|
drawable::{Alignment, MaterialParameter, Model, ResourceID, Text, TextStyle, Bounds, TextFit},
|
||||||
fields::BoxField,
|
fields::BoxField,
|
||||||
node::NodeType,
|
node::NodeType,
|
||||||
spatial::Spatial,
|
spatial::Spatial,
|
||||||
@@ -144,8 +144,12 @@ impl ProtoStar {
|
|||||||
})?;
|
})?;
|
||||||
|
|
||||||
let label_style = TextStyle {
|
let label_style = TextStyle {
|
||||||
character_height: 0.15,
|
character_height: MODEL_SCALE*4.0 ,
|
||||||
bounds: None,
|
bounds: Some(Bounds{
|
||||||
|
bounds: [1.0; 2].into(),
|
||||||
|
fit: TextFit::Wrap,
|
||||||
|
bounds_align: Alignment::XCenter | Alignment::YCenter,
|
||||||
|
}),
|
||||||
text_align: Alignment::Center.into(),
|
text_align: Alignment::Center.into(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
@@ -153,7 +157,7 @@ impl ProtoStar {
|
|||||||
Text::create(
|
Text::create(
|
||||||
&icon,
|
&icon,
|
||||||
Transform::from_position_rotation(
|
Transform::from_position_rotation(
|
||||||
[0.0, 0.05, -0.6],
|
[0.0, 0.1, -(MODEL_SCALE*8.0)],
|
||||||
Quat::from_rotation_x(PI * 0.5),
|
Quat::from_rotation_x(PI * 0.5),
|
||||||
),
|
),
|
||||||
name,
|
name,
|
||||||
|
|||||||
Reference in New Issue
Block a user