--- a/src/sprite.c Sat May 10 18:51:45 2025 +0200 +++ b/src/sprite.c Sun May 11 14:51:00 2025 +0200 @@ -56,16 +56,14 @@ node->destroy_func = asc_sprite_destroy; node->position = asc_vec3f_new(args.x, args.y, ASC_SCENE_2D_DEPTH_OFFSET); - // TODO: do not use scale, add mesh params instead - node->scale = asc_vec3f_new( - args.width == 0 ? args.texture->width : args.width, - args.height == 0 ? args.texture->height : args.height, - 1 - ); + node->scale = asc_vec3f_one; asc_node_update_transform(node); // initialize mesh - asc_mesh_plane_2d(&sprite->mesh); + asc_mesh_plane_2d(&sprite->mesh, + .size = asc_vec2f_new(args.width, args.height), + // TODO: support different texture modes + ); return node; }