From 9d2b5675fb2e640ffc39034bf47f476bb1fe7d3a Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Sat, 8 Nov 2025 20:42:52 -0500 Subject: [PATCH] feat: refactor color handling in Reify implementation to use rgba_linear macro from asteroids --- bridge/src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bridge/src/lib.rs b/bridge/src/lib.rs index 0ac2c7d..da3fdca 100644 --- a/bridge/src/lib.rs +++ b/bridge/src/lib.rs @@ -66,9 +66,6 @@ impl ClientState for BridgeState { impl Reify for BridgeState { fn reify(&self) -> impl ast::Element { - use stardust_xr_fusion::drawable::{Line, LinePoint}; - use stardust_xr_fusion::values::{color::rgba_linear, Vector3}; - // Root playspace. Create appropriate visuals per entity type let children = self.nodes.iter().map(|(id, node)| { // Decompose transform into TRS @@ -82,7 +79,8 @@ impl Reify for BridgeState { scale }; - // Use entity color if set + // Use entity color if set - use rgba_linear macro from asteroids + use ast::client::values::color::rgba_linear; let node_color = rgba_linear!(node.color[0], node.color[1], node.color[2], node.color[3]); // Entity types: 0=Unknown, 1=Box, 2=Sphere, 3=Model, ... @@ -206,6 +204,7 @@ impl Reify for BridgeState { ) }, _ => { + use ast::client::values::color::rgba_linear; // Unknown/default - render as simple wireframe cube let t = 0.004; let c = rgba_linear!(0.6, 0.6, 0.6, 0.8); // Gray for unknown