// Spreads a squid body toward/from a point
Spreads a squid body toward/from a point
Spreads a squid body toward / from a point
pub fn spread(&mut self, current: &glm::Vec2, _options: &InteractionOptions) {
        match &mut self.data {
            SquidData::Rect(rect) => {
                let mut new_data = *rect.data.get_real();
                new_data.position = MultiLerp::Linear(rect.spread_behavior.express(current));
                rect.data.set(new_data);
            }
            SquidData::Circle(circle) => {
                let mut new_data = *circle.data.get_real();
                new_data.position = MultiLerp::Linear(circle.spread_behavior.express(current));
                circle.data.set(new_data);
            }
            SquidData::Tri(tri) => {
                let mut new_data = *tri.data.get_real();
                new_data.position = MultiLerp::Linear(tri.spread_behavior.express(current));
                tri.data.set(new_data);
            }
        }
    }
pub fn spread ( & mut self , current : & glm :: Vec2 , _options : & InteractionOptions ) { match & mut self . data { SquidData :: Rect ( rect ) => { let mut new_data = * rect . data . get_real ( ) ; new_data . position = MultiLerp :: Linear ( rect . spread_behavior . express ( current ) ) ; rect . data . set ( new_data ) ; } SquidData :: Circle ( circle ) => { let mut new_data = * circle . data . get_real ( ) ; new_data . position = MultiLerp :: Linear ( circle . spread_behavior . express ( current ) ) ; circle . data . set ( new_data ) ; } SquidData :: Tri ( tri ) => { let mut new_data = * tri . data . get_real ( ) ; new_data . position = MultiLerp :: Linear ( tri . spread_behavior . express ( current ) ) ; tri . data . set ( new_data ) ; } } }
Spreads a squid body toward/from a point
Spreads a squid body toward / from a point
&mut self
current
&glm::Vec2
_options
&InteractionOptions