mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 20:56:12 +08:00
Update README. Add note on tinygltf::Value
for extensions.
This commit is contained in:
parent
046400b17f
commit
0ee273fdfa
@ -7,6 +7,7 @@ If you are looking for old, C++03 version, please use `devel-picojson` branch.
|
|||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
|
||||||
|
- v2.3.0 Modified Material representation according to glTF 2.0 schema(and introduced TextureInfo class)
|
||||||
- v2.2.0 release(Support loading 16bit PNG. Sparse accessor support)
|
- v2.2.0 release(Support loading 16bit PNG. Sparse accessor support)
|
||||||
- v2.1.0 release(Draco support)
|
- v2.1.0 release(Draco support)
|
||||||
- v2.0.0 release(22 Aug, 2018)!
|
- v2.0.0 release(22 Aug, 2018)!
|
||||||
@ -54,6 +55,12 @@ If you are looking for old, C++03 version, please use `devel-picojson` branch.
|
|||||||
* Extensions
|
* Extensions
|
||||||
* [x] Draco mesh decoding
|
* [x] Draco mesh decoding
|
||||||
|
|
||||||
|
## Note on extension property
|
||||||
|
|
||||||
|
In extension(`ExtensionMap`), JSON number value is parsed as int or float(number) and stored as `tinygltf::Value` object. If you want a floating point value from `tinygltf::Value`, use `GetAsFloat()` method.
|
||||||
|
|
||||||
|
`IsNumber()` only returns true if the underlying value is a floating point value. If you wan to check if the value is `number`(int or real, in the context of JSON), Plese use `IsNumberOrInt()` method.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
* [glview](examples/glview) : Simple glTF geometry viewer.
|
* [glview](examples/glview) : Simple glTF geometry viewer.
|
||||||
@ -76,7 +83,7 @@ If you are looking for old, C++03 version, please use `devel-picojson` branch.
|
|||||||
* [x] Load Draco compressed mesh
|
* [x] Load Draco compressed mesh
|
||||||
* [ ] Save Draco compressed mesh
|
* [ ] Save Draco compressed mesh
|
||||||
* [ ] Open3DGC?
|
* [ ] Open3DGC?
|
||||||
* [ ] Support `extensions` and `extras` property
|
* [x] Support `extensions` and `extras` property
|
||||||
* [ ] HDR image?
|
* [ ] HDR image?
|
||||||
* [ ] OpenEXR extension through TinyEXR.
|
* [ ] OpenEXR extension through TinyEXR.
|
||||||
* [ ] 16bit PNG support in Serialization
|
* [ ] 16bit PNG support in Serialization
|
||||||
|
@ -301,7 +301,9 @@ TEST_CASE("pbr-khr-texture-transform", "[material]") {
|
|||||||
REQUIRE(texform.count("scale"));
|
REQUIRE(texform.count("scale"));
|
||||||
|
|
||||||
REQUIRE(texform["scale"].IsArray());
|
REQUIRE(texform["scale"].IsArray());
|
||||||
std::cout << "ty " << int(texform["scale"].Get(0).Type()) << "\n";
|
|
||||||
|
// It looks json.hpp parse integer JSON number as integer, not floating point.
|
||||||
|
// so we'll check if Value is number(floating point) or integer value.
|
||||||
REQUIRE(texform["scale"].Get(0).IsNumberOrInt());
|
REQUIRE(texform["scale"].Get(0).IsNumberOrInt());
|
||||||
REQUIRE(texform["scale"].Get(1).IsNumberOrInt());
|
REQUIRE(texform["scale"].Get(1).IsNumberOrInt());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user