Updated to latest fusion
This commit is contained in:
@@ -132,7 +132,9 @@ impl RootHandler for AppHexGrid {
|
||||
let color = [0.0, 1.0, 0.0, 1.0];
|
||||
self.button
|
||||
.model
|
||||
.set_material_parameter(1, "color", MaterialParameter::Color(color))
|
||||
.model_part("?????")
|
||||
.unwrap()
|
||||
.set_material_parameter("color", MaterialParameter::Color(color))
|
||||
.unwrap();
|
||||
for app in &mut self.apps {
|
||||
app.protostar.toggle();
|
||||
@@ -141,7 +143,9 @@ impl RootHandler for AppHexGrid {
|
||||
let color = [0.0, 0.0, 1.0, 1.0];
|
||||
self.button
|
||||
.model
|
||||
.set_material_parameter(1, "color", MaterialParameter::Color(color))
|
||||
.model_part("?????")
|
||||
.unwrap()
|
||||
.set_material_parameter("color", MaterialParameter::Color(color))
|
||||
.unwrap();
|
||||
}
|
||||
for app in &mut self.apps {
|
||||
@@ -183,7 +187,7 @@ struct Button {
|
||||
impl Button {
|
||||
fn new(client: &Client) -> Result<Self, NodeError> {
|
||||
let field = BoxField::create(client.get_root(), Transform::default(), [APP_SIZE; 3])?;
|
||||
let grabbable = Grabbable::new(
|
||||
let grabbable = Grabbable::create(
|
||||
client.get_root(),
|
||||
Transform::default(),
|
||||
&field,
|
||||
@@ -193,11 +197,13 @@ impl Button {
|
||||
},
|
||||
)?;
|
||||
field.set_spatial_parent(grabbable.content_parent())?;
|
||||
let touch_plane = TouchPlane::new(
|
||||
let touch_plane = TouchPlane::create(
|
||||
grabbable.content_parent(),
|
||||
Transform::default(),
|
||||
[(APP_SIZE + PADDING) / 2.0; 2],
|
||||
(APP_SIZE + PADDING) / 2.0,
|
||||
1.0..0.0,
|
||||
1.0..0.0,
|
||||
)?;
|
||||
|
||||
let model = Model::create(
|
||||
@@ -208,7 +214,10 @@ impl Button {
|
||||
),
|
||||
&ResourceID::new_namespaced("protostar", "hexagon/hexagon"),
|
||||
)?;
|
||||
model.set_material_parameter(1, "color", MaterialParameter::Color([0.0, 0.0, 1.0, 1.0]))?;
|
||||
model
|
||||
.model_part("?????")
|
||||
.unwrap()
|
||||
.set_material_parameter("color", MaterialParameter::Color([0.0, 0.0, 1.0, 1.0]))?;
|
||||
Ok(Button {
|
||||
touch_plane,
|
||||
grabbable,
|
||||
|
||||
Reference in New Issue
Block a user