From 33cd5566909ac089cdf56db38a3d1daf0cb7dd10 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Mon, 9 Dec 2024 15:35:36 +0100 Subject: fixed the aspect ratio and removed the ratio from sprite and give it to texture. however the problem still lies with if animator is given the aspect ratio is then off --- src/example/rendering_particle.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/example') diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp index 87a6eb9..cfc5a84 100644 --- a/src/example/rendering_particle.cpp +++ b/src/example/rendering_particle.cpp @@ -54,17 +54,16 @@ public: Asset img{"asset/texture/test_ap43.png"}; - Sprite & test_sprite - = game_object.add_component(img, ivec2{259, 195}, - Sprite::Data{ - .color = color, - .flip = Sprite::FlipSettings{false, false}, - .sorting_in_layer = 2, - .order_in_layer = 2, - .size = {0, 100}, - .angle_offset = 0, - .position_offset = {0, 0}, - }); + Sprite & test_sprite = game_object.add_component( + img, Sprite::Data{ + .color = color, + .flip = Sprite::FlipSettings{false, false}, + .sorting_in_layer = 2, + .order_in_layer = 2, + .size = {0, 100}, + .angle_offset = 0, + .position_offset = {0, 0}, + }); /* -- cgit v1.2.3