google / google/bigwheels

[glTF] support image URIs that use JSON escaping

Open
#602 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
107
Forks
42
PR merge metrics
No merged PRs in 30d

Description

If `image.uri` represents a path, it may encode certain characters with JSON escaping. From glTF2.0 spec, [section 2.8](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#uris):

> Paths with non-ASCII characters MAY be written as-is, with JSON string escaping, or with percent-encoding; all these options are valid

I'm not aware of any glTF-Sample-Assets that use this.

cgltf provides the `cgltf_decode_string` function which may help here to remove the JSON escaping.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.