aboutsummaryrefslogtreecommitdiff
path: root/src/example/rendering_particle.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-09 15:35:36 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-09 15:35:36 +0100
commit33cd5566909ac089cdf56db38a3d1daf0cb7dd10 (patch)
tree1d684595d5e8ef88c6c874ced36e616786231dd0 /src/example/rendering_particle.cpp
parent519cc5d16e65ff501d330c03eeb35d2d095ead29 (diff)
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
Diffstat (limited to 'src/example/rendering_particle.cpp')
-rw-r--r--src/example/rendering_particle.cpp21
1 files changed, 10 insertions, 11 deletions
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<Sprite>(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<Sprite>(
+ 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},
+ });
/*