feat: simplify arguments

This commit is contained in:
Nova
2023-01-05 08:30:52 -05:00
parent c8d7fa725f
commit 764483ef3d
2 changed files with 11 additions and 5 deletions

View File

@@ -8,6 +8,7 @@ use stardust_xr_molecules::{
drawable::Model,
fields::SphereField,
node::NodeType,
resource::NamespacedResource,
startup_settings::StartupSettings,
},
GrabData, Grabbable,
@@ -26,7 +27,7 @@ pub struct ProtoStar {
executable_path: PathBuf,
}
impl ProtoStar {
pub fn new(client: Arc<Client>, icon: PathBuf, size: f32, executable_path: PathBuf) -> Self {
pub fn new(client: Arc<Client>, size: f32, executable_path: PathBuf) -> Self {
let field =
SphereField::create(client.get_root(), Vector3::from([0.0; 3]), size * 0.5).unwrap();
let grabbable = Grabbable::new(
@@ -42,7 +43,7 @@ impl ProtoStar {
let icon = Model::create(
grabbable.content_parent(),
Transform::from_scale([size; 3]),
&icon,
&NamespacedResource::new("protostar", "default_icon"),
)
.unwrap();
ProtoStar {