reduce texture sizing

This commit is contained in:
Evan Pratten 2022-03-29 14:22:15 -04:00
parent 32ec6c43cc
commit bfe1ea01ce
23 changed files with 91 additions and 90 deletions

1
assets/ewpratten/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
**/*.jpg~

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,117 +1,117 @@
{ {
"sheet_height": 1080, "sheet_height": 338,
"sheet_width": 34560, "sheet_width": 10800,
"published_at": "2022-03-29 16:46:34", "published_at": "2022-03-29 18:21:28",
"published_by": "ewpratten", "published_by": "ewpratten",
"fps": 24.0, "fps": 24.0,
"frames": [ "frames": [
{ {
"x": 0, "x": 0,
"y": 0, "y": 0,
"width": 1920, "width": 600,
"height": 1080 "height": 338
}, },
{ {
"x": 1920, "x": 600,
"y": 0, "y": 0,
"width": 1920, "width": 600,
"height": 1080 "height": 338
}, },
{ {
"x": 3840, "x": 1200,
"y": 0, "y": 0,
"width": 1920, "width": 600,
"height": 1080 "height": 338
}, },
{ {
"x": 5760, "x": 1800,
"y": 0, "y": 0,
"width": 1920, "width": 600,
"height": 1080 "height": 338
}, },
{ {
"x": 7680, "x": 2400,
"y": 0, "y": 0,
"width": 1920, "width": 600,
"height": 1080 "height": 338
},
{
"x": 3000,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 3600,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 4200,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 4800,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 5400,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 6000,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 6600,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 7200,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 7800,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 8400,
"y": 0,
"width": 600,
"height": 338
},
{
"x": 9000,
"y": 0,
"width": 600,
"height": 338
}, },
{ {
"x": 9600, "x": 9600,
"y": 0, "y": 0,
"width": 1920, "width": 600,
"height": 1080 "height": 338
}, },
{ {
"x": 11520, "x": 10200,
"y": 0, "y": 0,
"width": 1920, "width": 600,
"height": 1080 "height": 338
},
{
"x": 13440,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 15360,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 17280,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 19200,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 21120,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 23040,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 24960,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 26880,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 28800,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 30720,
"y": 0,
"width": 1920,
"height": 1080
},
{
"x": 32640,
"y": 0,
"width": 1920,
"height": 1080
} }
] ]
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 991 KiB

After

Width:  |  Height:  |  Size: 200 KiB

View File

@ -142,7 +142,7 @@ impl AnimatedTexture {
); );
let origin: raylib::core::math::Vector2 = let origin: raylib::core::math::Vector2 =
origin.unwrap_or_else(|| Vector2::<f32>::zeros()).into(); origin.unwrap_or_else(|| Vector2::<f32>::zeros()).into();
debug!("{:?} -> {:?}", source, destination); // debug!("{:?} -> {:?}", source, destination);
// Render the frame // Render the frame
draw_handle.draw_texture_pro( draw_handle.draw_texture_pro(

View File

@ -18,7 +18,7 @@ impl TestFoxScene {
/// Construct a new `TestFoxScene` /// Construct a new `TestFoxScene`
pub fn new(raylib_handle: &mut RaylibHandle, thread: &RaylibThread) -> Self { pub fn new(raylib_handle: &mut RaylibHandle, thread: &RaylibThread) -> Self {
// Load the fox texture // Load the fox texture
let fox = AnimatedTexture::new(raylib_handle, thread, "test", "debugTexture").unwrap(); let fox = AnimatedTexture::new(raylib_handle, thread, "chr", "testFox").unwrap();
Self { fox_animation: fox } Self { fox_animation: fox }
} }