refactor(idl): create_inteface macro
This commit is contained in:
@@ -78,7 +78,7 @@ impl ClientState {
|
||||
.iter()
|
||||
.map(|(k, v)| {
|
||||
(k.clone(), {
|
||||
let node = Node::create(client, "/spatial/anchor", k, true)
|
||||
let node = Node::create_parent_name(client, "/spatial/anchor", k, true)
|
||||
.add_to_scenegraph()
|
||||
.unwrap();
|
||||
Spatial::add_to(&node, None, *v, false).unwrap();
|
||||
|
||||
11
src/core/idl_utils.rs
Normal file
11
src/core/idl_utils.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
#[macro_export]
|
||||
macro_rules! create_interface {
|
||||
($iface:ident, $aspect:ident, $path:expr) => {
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create_path(client, $path, false);
|
||||
<$iface as $aspect>::add_node_members(&node);
|
||||
node.add_to_scenegraph()?;
|
||||
Ok(())
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -3,6 +3,7 @@ pub mod client_state;
|
||||
pub mod delta;
|
||||
pub mod destroy_queue;
|
||||
pub mod eventloop;
|
||||
pub mod idl_utils;
|
||||
pub mod node_collections;
|
||||
pub mod registry;
|
||||
pub mod resource;
|
||||
|
||||
@@ -35,7 +35,7 @@ impl Alias {
|
||||
"Node already exists"
|
||||
);
|
||||
|
||||
let node = Node::create(client, parent, name, true).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(client, parent, name, true).add_to_scenegraph()?;
|
||||
let alias = Alias {
|
||||
enabled: Arc::new(AtomicBool::new(true)),
|
||||
node: Arc::downgrade(&node),
|
||||
|
||||
@@ -107,7 +107,7 @@ pub fn update(sk: &impl StereoKitDraw) {
|
||||
}
|
||||
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create(client, "", "audio", false);
|
||||
let node = Node::create_parent_name(client, "", "audio", false);
|
||||
node.add_local_signal("create_sound", create_flex);
|
||||
node.add_to_scenegraph().map(|_| ())
|
||||
}
|
||||
@@ -121,7 +121,7 @@ pub fn create_flex(_node: Arc<Node>, calling_client: Arc<Client>, message: Messa
|
||||
resource: ResourceID,
|
||||
}
|
||||
let info: CreateSoundInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/audio/sound", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/audio/sound", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, true);
|
||||
let node = node.add_to_scenegraph()?;
|
||||
|
||||
@@ -266,7 +266,7 @@ impl Drop for PulseReceiver {
|
||||
}
|
||||
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create(client, "", "data", false);
|
||||
let node = Node::create_parent_name(client, "", "data", false);
|
||||
node.add_local_signal("create_pulse_sender", create_pulse_sender_flex);
|
||||
node.add_local_signal("create_pulse_receiver", create_pulse_receiver_flex);
|
||||
node.add_local_method("register_keymap", register_keymap_flex);
|
||||
@@ -287,7 +287,7 @@ pub fn create_pulse_sender_flex(
|
||||
mask: Vec<u8>,
|
||||
}
|
||||
let info: CreatePulseSenderInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/data/sender", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/data/sender", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
|
||||
@@ -314,7 +314,7 @@ pub fn create_pulse_receiver_flex(
|
||||
mask: Vec<u8>,
|
||||
}
|
||||
let info: CreatePulseReceiverInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/data/receiver", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/data/receiver", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
let field = find_field(&calling_client, info.field_path)?;
|
||||
|
||||
@@ -158,7 +158,7 @@ pub fn create_flex(_node: Arc<Node>, calling_client: Arc<Client>, message: Messa
|
||||
lines: Vec<Line>,
|
||||
}
|
||||
let mut info: CreateLinesInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/drawable/lines", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/drawable/lines", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, true);
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ use stereokit::StereoKitDraw;
|
||||
use tracing::instrument;
|
||||
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create(client, "", "drawable", false);
|
||||
let node = Node::create_parent_name(client, "", "drawable", false);
|
||||
node.add_local_signal("create_lines", lines::create_flex);
|
||||
node.add_local_signal("create_model", model::create_flex);
|
||||
node.add_local_signal("create_text", text::create_flex);
|
||||
|
||||
@@ -186,7 +186,7 @@ impl ModelPart {
|
||||
let client = stardust_model_part.get_client()?;
|
||||
let mut part_path = parent_part.map(|n| n.path.clone()).unwrap_or_default();
|
||||
part_path.push(sk.model_node_get_name(sk_model, id)?);
|
||||
let node = client.scenegraph.add_node(Node::create(
|
||||
let node = client.scenegraph.add_node(Node::create_parent_name(
|
||||
&client,
|
||||
stardust_model_part.get_path(),
|
||||
part_path.to_str()?,
|
||||
@@ -412,7 +412,7 @@ pub fn create_flex(_node: Arc<Node>, calling_client: Arc<Client>, message: Messa
|
||||
resource: ResourceID,
|
||||
}
|
||||
let info: CreateModelInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/drawable/model", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/drawable/model", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, true);
|
||||
let node = node.add_to_scenegraph()?;
|
||||
|
||||
@@ -204,7 +204,7 @@ pub fn create_flex(_node: Arc<Node>, calling_client: Arc<Client>, message: Messa
|
||||
color: [f32; 4],
|
||||
}
|
||||
let info: CreateTextInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/drawable/text", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/drawable/text", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, true);
|
||||
let color = Rgba::from_slice(&info.color);
|
||||
|
||||
@@ -84,7 +84,7 @@ pub fn create_box_field_flex(
|
||||
size: Vector3<f32>,
|
||||
}
|
||||
let info: CreateFieldInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/field", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/field", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
let node = node.add_to_scenegraph()?;
|
||||
|
||||
@@ -84,7 +84,7 @@ pub fn create_cylinder_field_flex(
|
||||
radius: f32,
|
||||
}
|
||||
let info: CreateFieldInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/field", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/field", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
let node = node.add_to_scenegraph()?;
|
||||
|
||||
@@ -250,7 +250,7 @@ impl Deref for Field {
|
||||
}
|
||||
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create(client, "", "field", false);
|
||||
let node = Node::create_parent_name(client, "", "field", false);
|
||||
node.add_local_signal("create_box_field", create_box_field_flex);
|
||||
node.add_local_signal("create_cylinder_field", create_cylinder_field_flex);
|
||||
node.add_local_signal("create_sphere_field", create_sphere_field_flex);
|
||||
|
||||
@@ -81,7 +81,7 @@ pub fn create_sphere_field_flex(
|
||||
radius: f32,
|
||||
}
|
||||
let info: CreateFieldInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/field", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/field", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = Mat4::from_translation(
|
||||
info.origin
|
||||
|
||||
@@ -84,7 +84,7 @@ pub fn create_torus_field_flex(
|
||||
radius_b: f32,
|
||||
}
|
||||
let info: CreateFieldInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/field", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/field", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
let node = node.add_to_scenegraph()?;
|
||||
|
||||
@@ -13,7 +13,7 @@ lazy_static::lazy_static! {
|
||||
}
|
||||
|
||||
fn create() -> Arc<Node> {
|
||||
let node = Arc::new(Node::create(&INTERNAL_CLIENT, "", "hmd", false));
|
||||
let node = Arc::new(Node::create_parent_name(&INTERNAL_CLIENT, "", "hmd", false));
|
||||
Spatial::add_to(&node, None, Mat4::IDENTITY, false).expect("Unable to make spatial for HMD");
|
||||
|
||||
node
|
||||
|
||||
@@ -352,7 +352,7 @@ impl Drop for InputHandler {
|
||||
}
|
||||
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create(client, "", "input", false);
|
||||
let node = Node::create_parent_name(client, "", "input", false);
|
||||
node.add_local_signal("create_input_handler", create_input_handler_flex);
|
||||
node.add_local_signal("create_input_method_pointer", pointer::create_pointer_flex);
|
||||
node.add_local_signal("create_input_method_tip", tip::create_tip_flex);
|
||||
@@ -376,8 +376,8 @@ pub fn create_input_handler_flex(
|
||||
let transform = parse_transform(info.transform, true, true, true);
|
||||
let field = find_field(&calling_client, info.field_path)?;
|
||||
|
||||
let node =
|
||||
Node::create(&calling_client, "/input/handler", info.name, true).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&calling_client, "/input/handler", info.name, true)
|
||||
.add_to_scenegraph()?;
|
||||
Spatial::add_to(&node, Some(parent), transform, false)?;
|
||||
InputHandler::add_to(&node, &field)?;
|
||||
Ok(())
|
||||
|
||||
@@ -78,7 +78,7 @@ pub fn create_pointer_flex(
|
||||
datamap: Option<Vec<u8>>,
|
||||
}
|
||||
let info: CreatePointerInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/input/method/pointer", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/input/method/pointer", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ pub fn create_tip_flex(
|
||||
datamap: Option<Vec<u8>>,
|
||||
}
|
||||
let info: CreateTipInfo = deserialize(message.as_ref())?;
|
||||
let node = Node::create(&calling_client, "/input/method/tip", info.name, true);
|
||||
let node = Node::create_parent_name(&calling_client, "/input/method/tip", info.name, true);
|
||||
let parent = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
|
||||
|
||||
@@ -181,8 +181,8 @@ pub(super) fn create_camera_item_flex(
|
||||
let space = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
|
||||
let node =
|
||||
Node::create(&INTERNAL_CLIENT, &parent_name, info.name, false).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&INTERNAL_CLIENT, &parent_name, info.name, false)
|
||||
.add_to_scenegraph()?;
|
||||
Spatial::add_to(&node, None, transform * space.global_transform(), false)?;
|
||||
CameraItem::add_to(&node, info.proj_matrix.into(), info.px_size);
|
||||
node.item
|
||||
|
||||
@@ -81,8 +81,8 @@ pub(super) fn create_environment_item_flex(
|
||||
let space = find_spatial_parent(&calling_client, info.parent_path)?;
|
||||
let transform = parse_transform(info.transform, true, true, false);
|
||||
|
||||
let node =
|
||||
Node::create(&INTERNAL_CLIENT, &parent_name, info.name, false).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&INTERNAL_CLIENT, &parent_name, info.name, false)
|
||||
.add_to_scenegraph()?;
|
||||
Spatial::add_to(&node, None, transform * space.global_transform(), false)?;
|
||||
EnvironmentItem::add_to(&node, info.item_data);
|
||||
node.item
|
||||
|
||||
@@ -426,7 +426,7 @@ impl Drop for ItemAcceptor {
|
||||
}
|
||||
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create(client, "", "item", false);
|
||||
let node = Node::create_parent_name(client, "", "item", false);
|
||||
node.add_local_signal("create_camera_item", camera::create_camera_item_flex);
|
||||
node.add_local_signal(
|
||||
"create_environment_item",
|
||||
@@ -457,8 +457,8 @@ pub fn register_item_ui_flex(
|
||||
}
|
||||
let info: RegisterItemUIInfo = deserialize(message.as_ref())?;
|
||||
let type_info = type_info(info.item_type)?;
|
||||
let ui =
|
||||
Node::create(&calling_client, "/item", type_info.type_name, true).add_to_scenegraph()?;
|
||||
let ui = Node::create_parent_name(&calling_client, "/item", type_info.type_name, true)
|
||||
.add_to_scenegraph()?;
|
||||
ItemUI::add_to(&ui, type_info)?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -482,7 +482,7 @@ fn create_item_acceptor_flex(
|
||||
let field = find_field(&calling_client, info.field_path)?;
|
||||
let type_info = type_info(info.item_type)?;
|
||||
|
||||
let node = Node::create(
|
||||
let node = Node::create_parent_name(
|
||||
&calling_client,
|
||||
&format!("/item/{}/acceptor", type_info.type_name),
|
||||
info.name,
|
||||
|
||||
@@ -228,7 +228,7 @@ impl<B: Backend + ?Sized> PanelItem<B> {
|
||||
.and_then(|env| state(&env));
|
||||
|
||||
let uid = nanoid!();
|
||||
let node = Node::create(&INTERNAL_CLIENT, "/item/panel/item", &uid, true)
|
||||
let node = Node::create_parent_name(&INTERNAL_CLIENT, "/item/panel/item", &uid, true)
|
||||
.add_to_scenegraph()
|
||||
.unwrap();
|
||||
let spatial = Spatial::add_to(&node, None, Mat4::IDENTITY, false).unwrap();
|
||||
|
||||
@@ -109,16 +109,24 @@ impl Node {
|
||||
self.path.as_str()
|
||||
}
|
||||
|
||||
pub fn create(client: &Arc<Client>, parent: &str, name: &str, destroyable: bool) -> Self {
|
||||
pub fn create_parent_name(
|
||||
client: &Arc<Client>,
|
||||
parent: &str,
|
||||
name: &str,
|
||||
destroyable: bool,
|
||||
) -> Self {
|
||||
let mut path = parent.to_string();
|
||||
path.push('/');
|
||||
path.push_str(name);
|
||||
Self::create_path(client, path, destroyable)
|
||||
}
|
||||
pub fn create_path(client: &Arc<Client>, path: impl ToString, destroyable: bool) -> Self {
|
||||
let node = Node {
|
||||
enabled: Arc::new(AtomicBool::new(true)),
|
||||
uid: nanoid!(),
|
||||
client: Arc::downgrade(client),
|
||||
message_sender_handle: client.message_sender_handle.clone(),
|
||||
path,
|
||||
path: path.to_string(),
|
||||
// trailing_slash_pos: parent.len(),
|
||||
local_signals: Default::default(),
|
||||
local_methods: Default::default(),
|
||||
|
||||
@@ -25,7 +25,7 @@ pub struct Root {
|
||||
}
|
||||
impl Root {
|
||||
pub fn create(client: &Arc<Client>) -> Result<Arc<Self>> {
|
||||
let node = Node::create(client, "", "", false);
|
||||
let node = Node::create_parent_name(client, "", "", false);
|
||||
node.add_local_signal("subscribe_frame", Root::subscribe_frame_flex);
|
||||
node.add_local_signal("set_base_prefixes", Root::set_base_prefixes_flex);
|
||||
node.add_local_method("state_token", Root::state_token_flex);
|
||||
|
||||
@@ -5,6 +5,7 @@ use super::fields::get_field;
|
||||
use super::Node;
|
||||
use crate::core::client::Client;
|
||||
use crate::core::registry::Registry;
|
||||
use crate::create_interface;
|
||||
use color_eyre::eyre::{ensure, eyre, Result};
|
||||
use glam::{vec3a, Mat4, Quat};
|
||||
use mint::Vector3;
|
||||
@@ -478,8 +479,8 @@ impl SpatialInterfaceAspect for SpatialInterface {
|
||||
) -> Result<()> {
|
||||
let parent = get_spatial(&parent, "Spatial parent")?;
|
||||
let transform = parse_transform(transform, true, true, true);
|
||||
let node =
|
||||
Node::create(&calling_client, "/spatial/spatial", &name, true).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&calling_client, "/spatial/spatial", &name, true)
|
||||
.add_to_scenegraph()?;
|
||||
Spatial::add_to(&node, Some(parent), transform, zoneable)?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -496,16 +497,12 @@ impl SpatialInterfaceAspect for SpatialInterface {
|
||||
let transform = parse_transform(transform, true, true, false);
|
||||
let field = get_field(&field)?;
|
||||
|
||||
let node =
|
||||
Node::create(&calling_client, "/spatial/zone", &name, true).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&calling_client, "/spatial/zone", &name, true)
|
||||
.add_to_scenegraph()?;
|
||||
let space = Spatial::add_to(&node, Some(parent), transform, false)?;
|
||||
Zone::add_to(&node, space, &field);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub fn create_interface(client: &Arc<Client>) -> Result<()> {
|
||||
let node = Node::create(client, "", "spatial", false);
|
||||
<SpatialInterface as SpatialInterfaceAspect>::add_node_members(&node);
|
||||
node.add_to_scenegraph().map(|_| ())
|
||||
}
|
||||
create_interface!(SpatialInterface, SpatialInterfaceAspect, "/spatial");
|
||||
|
||||
@@ -28,7 +28,8 @@ pub struct EyePointer {
|
||||
}
|
||||
impl EyePointer {
|
||||
pub fn new() -> Result<Self> {
|
||||
let node = Node::create(&INTERNAL_CLIENT, "", &nanoid!(), false).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&INTERNAL_CLIENT, "", &nanoid!(), false)
|
||||
.add_to_scenegraph()?;
|
||||
let spatial = Spatial::add_to(&node, None, Mat4::IDENTITY, false).unwrap();
|
||||
let pointer =
|
||||
InputMethod::add_to(&node, InputType::Pointer(Pointer::default()), None).unwrap();
|
||||
|
||||
@@ -56,7 +56,8 @@ pub struct MousePointer {
|
||||
}
|
||||
impl MousePointer {
|
||||
pub fn new() -> Result<Self> {
|
||||
let node = Node::create(&INTERNAL_CLIENT, "", &nanoid!(), false).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&INTERNAL_CLIENT, "", &nanoid!(), false)
|
||||
.add_to_scenegraph()?;
|
||||
let spatial = Spatial::add_to(&node, None, Mat4::IDENTITY, false).unwrap();
|
||||
let pointer =
|
||||
InputMethod::add_to(&node, InputType::Pointer(Pointer::default()), None).unwrap();
|
||||
|
||||
@@ -32,7 +32,7 @@ pub struct SkController {
|
||||
}
|
||||
impl SkController {
|
||||
pub fn new(sk: &impl StereoKitMultiThread, handed: Handed) -> Result<Self> {
|
||||
let _node = Node::create(
|
||||
let _node = Node::create_parent_name(
|
||||
&INTERNAL_CLIENT,
|
||||
"",
|
||||
if handed == Handed::Left {
|
||||
|
||||
@@ -40,7 +40,8 @@ pub struct SkHand {
|
||||
}
|
||||
impl SkHand {
|
||||
pub fn new(handed: Handed) -> Result<Self> {
|
||||
let _node = Node::create(&INTERNAL_CLIENT, "", &nanoid!(), false).add_to_scenegraph()?;
|
||||
let _node = Node::create_parent_name(&INTERNAL_CLIENT, "", &nanoid!(), false)
|
||||
.add_to_scenegraph()?;
|
||||
Spatial::add_to(&_node, None, Mat4::IDENTITY, false)?;
|
||||
let hand = InputType::Hand(Box::new(Hand {
|
||||
base: FlatHand {
|
||||
|
||||
@@ -39,7 +39,8 @@ pub struct PlaySpace {
|
||||
}
|
||||
impl PlaySpace {
|
||||
pub fn new() -> Result<Self> {
|
||||
let node = Node::create(&INTERNAL_CLIENT, "", &nanoid!(), false).add_to_scenegraph()?;
|
||||
let node = Node::create_parent_name(&INTERNAL_CLIENT, "", &nanoid!(), false)
|
||||
.add_to_scenegraph()?;
|
||||
let spatial = Spatial::add_to(&node, None, Mat4::IDENTITY, false)?;
|
||||
let field = BoxField::add_to(&node, [0.0; 3].into())?;
|
||||
|
||||
@@ -60,7 +61,9 @@ impl PlaySpace {
|
||||
pose.orientation,
|
||||
pose.position,
|
||||
));
|
||||
let Field::Box(box_field) = self.field.as_ref() else {return};
|
||||
let Field::Box(box_field) = self.field.as_ref() else {
|
||||
return;
|
||||
};
|
||||
box_field.set_size(
|
||||
[
|
||||
sk.world_get_bounds_size().x,
|
||||
|
||||
Reference in New Issue
Block a user