Serialize accessor 'normalized' attribute.

This commit is contained in:
Fabien Freling 2019-03-21 17:03:18 +01:00
parent 29c431b2f2
commit 9056aee823

View File

@ -569,7 +569,7 @@ struct Accessor {
// are not supported
std::string name;
size_t byteOffset;
bool normalized; // optinal.
bool normalized; // optional.
int componentType; // (required) One of TINYGLTF_COMPONENT_TYPE_***
size_t count; // required
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);
SerializeNumberArrayProperty<double>("min", accessor.minValues, o);
SerializeNumberArrayProperty<double>("max", accessor.maxValues, o);
SerializeValue("normalized", Value(accessor.normalized), o);
std::string type;
switch (accessor.type) {
case TINYGLTF_TYPE_SCALAR: