mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-16 13:05:57 +08:00
Merge pull request #155 from ffreling/accessor-normalized
Serialize accessor 'normalized' attribute.
This commit is contained in:
commit
b3c1471317
@ -569,7 +569,7 @@ struct Accessor {
|
|||||||
// are not supported
|
// are not supported
|
||||||
std::string name;
|
std::string name;
|
||||||
size_t byteOffset;
|
size_t byteOffset;
|
||||||
bool normalized; // optinal.
|
bool normalized; // optional.
|
||||||
int componentType; // (required) One of TINYGLTF_COMPONENT_TYPE_***
|
int componentType; // (required) One of TINYGLTF_COMPONENT_TYPE_***
|
||||||
size_t count; // required
|
size_t count; // required
|
||||||
int type; // (required) One of TINYGLTF_TYPE_*** ..
|
int type; // (required) One of TINYGLTF_TYPE_*** ..
|
||||||
@ -4615,6 +4615,7 @@ static void SerializeGltfAccessor(Accessor &accessor, json &o) {
|
|||||||
SerializeNumberProperty<size_t>("count", accessor.count, o);
|
SerializeNumberProperty<size_t>("count", accessor.count, o);
|
||||||
SerializeNumberArrayProperty<double>("min", accessor.minValues, o);
|
SerializeNumberArrayProperty<double>("min", accessor.minValues, o);
|
||||||
SerializeNumberArrayProperty<double>("max", accessor.maxValues, o);
|
SerializeNumberArrayProperty<double>("max", accessor.maxValues, o);
|
||||||
|
SerializeValue("normalized", Value(accessor.normalized), o);
|
||||||
std::string type;
|
std::string type;
|
||||||
switch (accessor.type) {
|
switch (accessor.type) {
|
||||||
case TINYGLTF_TYPE_SCALAR:
|
case TINYGLTF_TYPE_SCALAR:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user