Notable changes to this project are documented in this file.
The format is based on Keep a Changelog.
The top-level gltf
crate adheres to Semantic Versioning. Historically, semantic versioning has not applied to gltf-json
. This is planned to change from version 2—see issue #409.
- New functions
animation::Channel::index
andanimation::Sampler::index
. - New feature flag
allow_empty_texture
to avoid required extension checks.
- Fix
attempt to to subtract with overflow
-panic insize_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.
- Update
image
to0.25.0
. - Validation will now fail if a glTF document requires extensions that are not supported by the crate.
- Feature
image_jpeg_rayon
no longer needed, asimage 0.25.0
now useszune-jpeg
for jpeg decoding.
- New API for reading arbitary extension data.
- Interval improvements to prevent panics on 32 bit systems when loading large glTF files.
- Offsets and sizes in the
gltf-json
crate have been widened to 64 bits. - Loading glTF on a 32 bit system containing offsets or sizes larger than
u32
will result in a validation error.
Gltf::from_reader
no longer winds the reader back to offset zero.- Broken link in
Material::unlit
documentation.
- Support for the
KHR_materials_emissive_strength
extension.
Accessor::byte_offset
is now optional for sparse accessors.
- New functions
import_buffers
andimport_images
for advanced import use cases.
Primitive::attributes
now usesBTreeMap
instead ofHashMap
deterministic serialization.
- Fix relative file path imports with url encoded characters.
- Fix bounds calculation in export example.
- Support for the
KHR_materials_specular
extension. - Support for the
KHR_materials_variants
extension. - Support for the
KHR_materials_volume
extension. ExactSizeIterator
implementation forJoints
iterator.
- The
mesh.primitives
property is now always serialized.
- Incorrect implementation of
Normalize<u16>
andNormalize<f32>
foru16
.
- Support for the
KHR_texture_transform
extension. - Support for the
KHR_materials_transmission_ior
extension.
Material::alpha_cutoff
is now optional.
- URIs with embedded data failing to import when using
import_slice
. - Serialization of empty primitives object being skipped.
- All features are now exposed in the online documentation.
- Primary iterators now implement
Iterator::nth
explicitly for improved performance.
- Compiler warnings regarding deprecation of
std::error::Error::description
.
- New feature
guess_mime_type
which, as the name suggests, attempts to guess the MIME type of an image if it doesn't exactly match the standard.
base64
updated to0.11
.byteorder
updated to1.3
.image
updated to0.23.0
.Format
has additional variants for 16-bit pixel formats.
- Off-by-one error when reading whole files incurring a gratuitous reallocation.
- Support for the
KHR_materials_unlit
extension, which adds anunlit
field toMaterial
. ExactSizeIterator
implementations for accessor iterators.
- Some lifetimes for accessing fields (e.g.
Node::children
) have been relaxed. Accessor::buffer_view
is now optional for the benefit of sparse accessors.
animation::Interpolation::CatmullRomSpline
import_slice
function.Clone
andDebug
implementations forMaterial
.accessor::util::SparseIter
andaccessor::util::SparseIndicesIter
which iterate over items and indices in sparse accessors respectively.
accessor::util::Iter
is now an enum; sparse accessors are now read correctly.- The original version of
accessor::util::Iter
has been renamed asItemIter
.
- Support for the
KHR_lights_punctual
extension. gltf-roundtrip
example.
- Renamed
validate_minimally
asvalidate
. - Removed dependency on
cgmath
.
- Incorrect version in README instructions.
- Compiler warnings.
- Trait function
Validate::validate_completely
and its implementations.
- New image format variants
B8G8R8
andB8G8R8A8
. - New export example.
- The crate now builds with Rust 2018 edition.
Extras
are now exposed asRawValue
.Index
now implementsCopy
.- Meshes will no longer report a zero byte stride.
- Updated the following dependendies:
- approx
- base64
- cgmath
- image
- lazy_static
- proc_macro2
- quote
- syn
- Removed an unused field in
Accessor
which was a cause of poor performance. - Borrow checker complaint regarding
Glb::from_reader
.
- New function
gltf_json::Index::new
for export. - Support for the
KHR_materials_pbrSpecularGlossiness
extension. - Extra
Eq
andPartialEq
implementations.
Accessor::min
is no longer serialized ifNone
.Extras::_allow_unknown_fields
is no longer serialized.bufferView.byteOffset
is now optional.- Node translation/rotation/scale values are now optional.
- Removed serialization of some default values.
extras::Void
is no longer serialized.
- JSON chunk padding is now padded with spaces (0x20) rather than zeros.
None
is no longer serialized.Vec
is no longer serialized when empty.
payload
field inGltf
in order to handle binary glTF directly.Error::Io
enum variant.Gltf::from_reader_without_validation
andGltf::from_slice_without_validation
.- All functionality from the
gltf-utils
crate, feature gated with the newutils
feature. - Most functionality from the
gltf-importer
crate, feature gated with the newimport
feature. enum Uri
to represent uniform resource locators.
fn Gltf::from_*
now imports binary glTF as well as standard glTF.fn Gltf::from_reader
now requiresreader
to implementstd::io::Seek
.Buffer::uri
now returnsNone
in the case of binary glTF payload instead of the magic string"#bin"
.- The
POSITION
attribute is now required by all mesh primitives. - Several renames:
glb
→binary
.Error::Glb
→Error::Binary
.TrsProperty
→Property
.InterpolationAlgorithm
→Interpolation
.Target::path
→Target::property
.Primitive::position_bounds
→Primitive::bounding_box
.
- The
names
feature is now enabled by default, along withutils
andimport
. Rationale: Pareto principle.
- Data structures in
gltf_json
now implementSerialize
.
fn Gltf::from_str
-- usefn Gltf::from_slice
instead.fn Gltf::from_value
-- no longer supported.fn gltf::is_binary
-- useslice.starts_with("glTF")
instead.struct Unvalidated
-- replaced withenum Validation
.crate gltf-importer
-- no longer supported.Node::matrix
-- usetransform().matrix()
instead.Node::rotation
-- usetransform().decomposed()
instead.- All hidden
as_json
functions -- no longer supported.
gltf_utils::AccessorIter::new
is markedpub
again.
ChannelIterators
.
- Rework of GLB parser and
AccessorIter
in order to reduceunsafe
code and to allow loading of binary glTF data on non-little-endian machines. - More descriptive errors in the
gltf
andgltf_importer
crates. Gltf::skip_validation
is no longer markedunsafe
.
gltf_utils::PrimitiveIterators::joints_u16
implementation.
- Incorrect implementation of Transform::decomposed (issue #99)
scene::Transform
type, returned byNode::transform
.MorphTarget
type and a correspondingMorphTargets
iterator.Gltf::from_glb
function.Gltf::default_scene
function.
as_json
functions are now hidden from the documentation.scene::Children
is bound to the lifetime ofGltf
instead its parentNode
- Documentation has been improved across the crate.
root
module.- Default constructors for
Material
andtexture::Sampler
.
Node::matrix/translation/rotation/scale
in favour ofNode::transform
.json
module.
- New
gltf-utils
crate, which removes the need for theLoaded
wrapper struct. - New
Attributes
iterator, which visits all vertex attributes of aPrimitive
. - New
glb
module, containing functions for parsing .glb (binary glTF) files. - New
is_binary
function, which tests for the glTF magic string. - New 'explicit' validation strategy with the
gltf::Unvalidated
type. - New
Bounds
type describing the minimum and maximum values of accessors. - New
Accessor::position_bounds
convenience function. Info
,NormalTexture
, andOcclusionTexture
now implementAsRef<Texture>
.
- Removed the
Loaded
struct in favour of new traits in thegltf-utils
crate.
- Implemented
ExactSizeIterator
for primitive iterators.
- Fixed incorrect buffer view slicing from accessors.
- Wrapper struct constructors now use
pub(crate)
instead of#[doc(hidden)]
. - Hence the crate now requires
rustc
version 1.18 or above to build.
- Added the
gltf-tree
example which displays the node heirarchies of scenes.
- Fixed mismatched
names
andextras
feature flags.
- Removed broken link to
gltf-importer
in the crate documentation.
- No concrete changes (unsuccessful update to documentation).
- New
Loaded
type, which providesglTF
objects with buffer data. - New
gltf-json
crate which replaces thejson
module. This is intended to improve build times. - Exported
names
andextras
features from the newgltf-json
crate.
- Redesign of the
Source
trait so that it no longer performs I/O.
Image::data
now returns aDynamicImage
, allowing for post-processing.
Send
andSync
are no longer required by theSource
trait.
- New wrapper interface.
Source
trait, which allows for customizing the import process.- Reference
Source
trait implementation, namelyFromPath
, that can read from the file system and decode embedded base64 data URIs. - Support for binary glTF.
Validate
trait, which validates glTF JSON metadata.Import
struct which drives the asynchronous loading of glTF data.- "Poor man's zero-copy deserialization".
- Moved all extension data structures into a new
extensions
module. - Made the
Get
trait behave the same as theTryGet
trait.
- Removed the
v1
module, as the crate no longer supports glTF 1.0. - Removed the
TryGet
trait in favour of the redesignedGet
trait.
- New
v2
module, containing all glTF 2.0 data structures. - Initial implementation of the glTF 2.0 data structures.
- Internal improvements to decrease the crate build time.
- New
v1
module, containing all glTF 1.0 data structures. - glTF objects are now categorised in submodules.
- Complete implementation of the glTF 1.0 data structures.
- Removed
gl
crate dependency.
- Updated links to the official glTF documentation.
- Allowed the crate to build on the latest stable
rustc
(1.15) using the newserde
frontend, i.e. with the serdeproc_macro
.
- Allowed the crate to build on the latest stable
rustc
(1.14) using theserde_codegen
crate.
- Added
Technique
data structure for glTF 1.0.
- New documentation for glTF 1.0.
- Initial (incomplete) glTF 1.0 implementation.