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

Version 1.4.1 #420

Merged
merged 4 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ jobs:

- name: Tests (default features)
run: cargo test --all --release

- name: Tests (all features)
run: cargo test --all --all-features --release

- name: Formatting
run: cargo fmt --all -- --check

- name: Clippy
run: cargo clippy --all-features

- name: Semantic versioning checks
uses: obi1kenobi/cargo-semver-checks-action@v2
21 changes: 16 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,30 @@ Notable changes to this project are documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

The `gltf` crate adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
The top-level `gltf` crate adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Historically, semantic versioning has not applied to `gltf-json`. This is planned to change from version 2—see issue #409.

## Unreleased

## [1.4.1] - 2024-05-09

### Added

- New functions `animation::Channel::index` and `animation::Sampler::index`.
- New feature flag `allow_empty_texture` to avoid required extension checks.

### Fixed
- Fix `attemt to to subtract with overflow`-panic in `size_hint()` of sparse accessor when collecting items.
- Fix incorrect values returned from `size_hint()` in sparse accessor
- Add support to read items from sparse accessor without base buffer view

- Fix `attempt to to subtract with overflow`-panic in `size_hint()` of sparse accessor when collecting items.
- Fix incorrect values returned from `size_hint()` in sparse accessor.
- Add support to read items from sparse accessor without base buffer view.

### Changed
- Update `image` to `0.25.0`.

- Update `image` to `0.25.0`.
- Validation will now fail if a glTF documentation requires extensions that are not supported by the crate.
alteous marked this conversation as resolved.
Show resolved Hide resolved

### Removed

- Feature `image_jpeg_rayon` no longer needed, as `image 0.25.0` now uses `zune-jpeg` for jpeg decoding.

## [1.4.0] - 2023-12-17
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gltf"
version = "1.4.0"
version = "1.4.1"
authors = ["David Harvey-Macaulay <[email protected]>"]
description = "glTF 2.0 loader"
documentation = "https://docs.rs/gltf"
Expand All @@ -25,7 +25,7 @@ approx = "0.5"
[dependencies]
base64 = { optional = true, version = "0.13" }
byteorder = "1.3"
gltf-json = { path = "gltf-json", version = "1.4.0" }
gltf-json = { path = "gltf-json", version = "=1.4.1" }
lazy_static = "1"
urlencoding = { optional = true, version = "2.1" }
serde_json = { features = ["raw_value"], version = "1.0" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ By default, `gltf` ignores all `extras` and `names` included with glTF assets. Y

```toml
[dependencies.gltf]
version = "1.2"
version = "1.4"
features = ["extras", "names"]
```

Expand Down
2 changes: 1 addition & 1 deletion gltf-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gltf-derive"
version = "1.4.0"
version = "1.4.1"
authors = ["David Harvey-Macaulay <[email protected]>"]
description = "Internal macros for the gltf crate"
repository = "https://github.com/gltf-rs/gltf"
Expand Down
4 changes: 2 additions & 2 deletions gltf-json/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gltf-json"
version = "1.4.0"
version = "1.4.1"
authors = ["David Harvey-Macaulay <[email protected]>"]
description = "JSON parsing for the gltf crate"
repository = "https://github.com/gltf-rs/gltf"
Expand All @@ -9,7 +9,7 @@ edition = "2021"
rust-version = "1.61"

[dependencies]
gltf-derive = { path = "../gltf-derive", version = "1.4.0" }
gltf-derive = { path = "../gltf-derive", version = "=1.4.1" }
serde = "1.0"
serde_derive = "1.0"
serde_json = { features = ["raw_value"], version = "1.0" }
Expand Down
13 changes: 11 additions & 2 deletions src/accessor/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,21 @@ impl<'a, T: Item> SparseIter<'a, T> {
///
/// Here `base` is allowed to be `None` when the base buffer view is not explicitly specified.
pub fn new(
base: Option<ItemIter<'a, T>>,
indices: SparseIndicesIter<'a>,
values: ItemIter<'a, T>,
) -> Self {
Self::with_base_count(base, 0, indices, values)
}

/// Supplemental constructor.
pub fn with_base_count(
base: Option<ItemIter<'a, T>>,
base_count: usize,
indices: SparseIndicesIter<'a>,
values: ItemIter<'a, T>,
) -> Self {
SparseIter {
Self {
base,
base_count,
indices: indices.peekable(),
Expand Down Expand Up @@ -354,7 +363,7 @@ impl<'a, 's, T: Item> Iter<'s, T> {
ItemIter::new(subslice, stride)
};

Some(Iter::Sparse(SparseIter::new(
Some(Iter::Sparse(SparseIter::with_base_count(
base_iter, base_count, index_iter, value_iter,
)))
}
Expand Down
Loading