Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for load_with_settings #28

Open
jonathandw743 opened this issue Feb 23, 2025 · 2 comments
Open

support for load_with_settings #28

jonathandw743 opened this issue Feb 23, 2025 · 2 comments

Comments

@jonathandw743
Copy link
Contributor

Is there any plan to support AssetServer::load_with_settings so we can do something like:

aseprite: asset_server.load_with_settings(
    "image.aseprite",
    |settings: &mut ImageLoaderSettings| {
        settings.sampler = ImageSampler::Descriptor(ImageSamplerDescriptor {
            mag_filter: ImageFilterMode::Nearest,
            min_filter: ImageFilterMode::Nearest,
            mipmap_filter: ImageFilterMode::Nearest,
            ..default()
        });
    },
),

And if not is there another way to do per-sprite filtering settings?

@jonathandw743
Copy link
Contributor Author

currently settings are ignored:

async fn load(
    &self,
    reader: &mut dyn Reader,
    _settings: &Self::Settings,
    load_context: &mut bevy::asset::LoadContext<'_>,
) -> Result<Self::Asset, Self::Error> {

@Lommix
Copy link
Owner

Lommix commented Feb 25, 2025

Agreed, this would be a nice change. Per Sprite is impossible, since the source atlas is usually shared by many sprites. But per aseprite file is doable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants