Skip to content

Commit

Permalink
improve vellottie error message
Browse files Browse the repository at this point in the history
  • Loading branch information
seabassjh committed Sep 14, 2023
1 parent 9521d75 commit e325b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/assets/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn load_svg_from_str(svg_str: &str) -> Result<VelloVector, bevy::asset::Erro
pub fn load_lottie_from_bytes(bytes: &[u8]) -> Result<VelloVector, bevy::asset::Error> {
// Load Lottie JSON bytes with the Velato (bodymovin) parser
let composition = vellottie::Composition::from_bytes(bytes)
.map_err(|err| bevy::asset::Error::msg(format!("Unable to parse lottie JSON: {err:?}")))?;
.map_err(|err| bevy::asset::Error::msg(format!("Unable to parse lottie JSON: {err}")))?;

let width = composition.width as f32;
let height = composition.height as f32;
Expand Down

0 comments on commit e325b1f

Please sign in to comment.