bevy_aseprite's People
Forkers
lemunozm phigamedevelopment jarkonik nelsontkq eduardorodriguesf noahshomette rocinante42 rcornall eunchuldev keng9 aktowns aekobear cmorrison82z lzurbriggen vergilua datael xiuxiu62 zainrax lommix jkaloger purung fkallevik ablu mystal ryo33 penuvilbevy_aseprite's Issues
"Overlay" layer import issue
Basically, overlay layer is imported into Bevy app as a solid opaque color, instead of being applied as an "additive" value on top as in Aseprite. Maybe alpha is not preserved correctly?
Results in:
(ignore game background)
I've tried changing Sprite -> Color Mode -> RGB Color / Indexed with same results.
Any suggestions how to export / import this layer properly?
Import layers as multiple entities
It'd be nice if we can create an entity for each layer separately. This is possible in Godot and Unity.
Unknown panic
thread 'Compute Task Pool (3)' panicked at 'Image index (32, 7) out of bounds (32,
16)', /home/myfirstname/.cargo/registry/src/index.crates.io-6/bevy_asepr
ite_reader-0.1.1/src/computed.rs:765:26
Cannot work with aseprite files where sprite's Canvas is resized
Description
Panics when spawning a Component
that utilizes an .aseprite
file where a sprite's Canvas was resized (under certain conditions).
Sample Backtrace
bevy_aseprite_reader-0.1.1/src/computed.rs:765:26:
Image index (1, 9) out of bounds (11, 9)
Steps to reproduce:
- in examples folder, open
crow.aseprite
- Enter canvas resize mode,
Sprite (C) -> Canvas Size...
- Draw a bounding box starting from the top left, leave default settings, confirm, save
- run example
Should see similar panic as above
Discussion
If you select
-[X] Trim content outside the canvas
the panic will not occur and behave as one would expect.
I imagine the ImageCel's untrimmed bounds are still parsed and present when the above option is not selected. Currently getting familiar with the codebase.
Is there any scenario where we are still interested in using a pixel that is out-of-bounds of the canvas?
The right way to flip animation?
It seems Quat::from_rotation_y(std::f32::consts::PI) not work.
But scale.x = -1 will cause rapier2d crash
Bevy 0.12 update
Can this crate be updated to support Bevy 0.12?
https://bevyengine.org/learn/migration-guides/0.11-0.12/#bevy-asset-v2
Reader: Layers and Frames are not properly linked
From reading the spec frames and layers should be linked together. Looking at the code this is kind of the case via the image_for_frame
but if you want to get a specific layer's frame data its not possible. Suggested API:
impl<'a> AsepriteFrameRange<'a> {
pub fn get_image_for_layer<N: AsRef<str>>(&self, layer_name: N) {
...
}
}
Lag switching among animations when using dynamic loading
This is in reference to TheNeikos/bevy_spicy_aseprite#6.
Hi @lemunozm, I enabled issues on the forked repo (didn't know they get turned off by default). I don't believe there should be any difference between manually specifying animations or using the derived version which makes me think this is a system ordering issue. Is the lag 1-frame long?
Blank frames cause panic
If an animation has any empty frames on any visible layer, the game will crash. It's common to have empty frames separating animations in Aseprite to prevent ugly tag-stacking that can occur in bigger files. Here is an example of a timeline that would cause a crash. I also tested with a minimal example that also had the same issue :
Bug: Empty Cels not handled quite correctly
Hi, I appreciate this project, really good work!
I found a bug when parsing an aseprite file w/ the following Frame/Cel/Layer setups:
Diagonally staggered keyframes like this causes resulting frame image to be broken.
I hooked into the AsepriteFrameRange::get_images(&self)
fn and wrote all the images to file and they end up looking like this:
Thanks again for this cool project :)
EDITED: Simplified scenario and elaborated a bit.
How to change to an animation from a different aseprite file?
I have these 2 aseprite files imported:
mod sprites {
use bevy_aseprite::aseprite;
aseprite!(pub KnightIdle, "Heroes/Knight/Idle/Idle.aseprite");
aseprite!(pub KnightRun, "Heroes/Knight/Run/Run.aseprite");
}
And I tried changing the animation in a system like this:
fn change_animation(
mut query: Query<&mut Handle<Aseprite>, With<Knight>>,
keyboard_input: Res<Input<KeyCode>>,
asset_server: Res<AssetServer>,
) {
for mut aseprite in &mut query {
if keyboard_input.just_pressed(KeyCode::Space) {
*aseprite = asset_server.load(sprites::KnightRun::PATH);
}
}
}
but when the animation changes i get a crash:
thread '<unnamed>' panicked
Sprite index 4 does not exist for texture atlas handle AssetId<bevy_sprite::texture_atlas::TextureAtlas>{ index: 0, generation: 1}.
Encountered a panic in system `bevy_sprite::render::extract_sprites`!
Release latest changes to bevy_aseprite_derive
Hey, could you make a new release of bevy_aseprite_derive
in crates.io with the changes in #4?
I'm using another crate that depends on bevy_aseprite_derive
and I'm having the same issue as the description of that PR.
The changes are merged but they're not released. Since it's another repo using it and not bevy_aseprite
with path="..."
, I don't get the changes.
Thanks for this repo, I've been using it a bunch in my pet projects.
Independent Scaling
There are situations (for example Rapier collider) where other components scale based off of the Transform scale. This makes it impossible to match the image scale with the collider scale.
Does there exist a "scale_factor", and if not, can we add one?
If this layer is empty in first frame the render will skip this layer forever.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.