| 232 | } |
| 233 | |
| 234 | void FireAnimation::init(wayfire_view view, wf::animation_description_t dur, wf::animate::animation_type type) |
| 235 | { |
| 236 | this->view = view; |
| 237 | |
| 238 | auto bbox = view->get_transformed_node()->get_bounding_box(); |
| 239 | dur.length_ms *= fire_duration_mod_for_height(bbox.height); |
| 240 | this->progression = wf::animation::simple_animation_t( |
| 241 | wf::create_option<wf::animation_description_t>(dur)); |
| 242 | this->progression.animate(0, 1); |
| 243 | |
| 244 | if (type & WF_ANIMATE_HIDING_ANIMATION) |
| 245 | { |
| 246 | this->progression.flip(); |
| 247 | } |
| 248 | |
| 249 | name = "animation-fire-" + std::to_string(type); |
| 250 | |
| 251 | auto tr = std::make_shared<fire_node_t>(); |
| 252 | view->get_transformed_node()->add_transformer( |
| 253 | tr, wf::TRANSFORMER_HIGHLEVEL + 1, name); |
| 254 | } |
| 255 | |
| 256 | bool FireAnimation::step() |
| 257 | { |
nothing calls this directly
no test coverage detected