Skip to content

Commit

Permalink
🔟
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed May 10, 2019
1 parent 07dbb75 commit 29143ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ await renderLottie({
})
```

#### Output Scaling

If you pass `width` or `height`, the other dimension will be inferred by maintaining the original animation's aspect ratio.

If both `width` and `height` are passed, the output will have those dimensions, but there will be extra whitespace (or transparency if rendering PNGs) due to `lottie-web`'s default `rendererSettings.preserveAspectRatio` of `xMidyMid meet` ([docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio) and [demo](https://codepen.io/giodif/pen/VYpaeo)).

For `mp4` outputs, the height may be different by a pixel due to the `x264` encoder requiring even heights.

## API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
Expand Down

0 comments on commit 29143ed

Please sign in to comment.