mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-12 18:39:08 +08:00
Fixes typos and useless data
This commit is contained in:
parent
2682c6fb4b
commit
8d5e0a75e8
@ -327,6 +327,7 @@ struct Skin {
|
|||||||
Skin()
|
Skin()
|
||||||
{
|
{
|
||||||
inverseBindMatrices = -1;
|
inverseBindMatrices = -1;
|
||||||
|
skeleton = -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -356,7 +357,7 @@ struct Image{
|
|||||||
std::vector<unsigned char> image;
|
std::vector<unsigned char> image;
|
||||||
int bufferView; // (required if no uri)
|
int bufferView; // (required if no uri)
|
||||||
std::string mimeType; // (required if no uri) ["image/jpeg", "image/png"]
|
std::string mimeType; // (required if no uri) ["image/jpeg", "image/png"]
|
||||||
std::string uri; // (reqiored if no mimeType)
|
std::string uri; // (required if no mimeType)
|
||||||
Value extras;
|
Value extras;
|
||||||
|
|
||||||
Image()
|
Image()
|
||||||
@ -367,7 +368,7 @@ struct Image{
|
|||||||
|
|
||||||
struct Texture {
|
struct Texture {
|
||||||
int sampler;
|
int sampler;
|
||||||
int source; // Required (not specified in the spec ?)
|
int source;
|
||||||
Value extras;
|
Value extras;
|
||||||
|
|
||||||
Texture()
|
Texture()
|
||||||
@ -408,7 +409,7 @@ struct BufferView{
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct Accessor {
|
struct Accessor {
|
||||||
int bufferView; // optional in spec but required here since sparse accessor are not supported
|
int bufferView; // optional in spec but required here since sparse accessor are not yet supported
|
||||||
std::string name;
|
std::string name;
|
||||||
size_t byteOffset;
|
size_t byteOffset;
|
||||||
size_t byteStride;
|
size_t byteStride;
|
||||||
@ -474,7 +475,7 @@ struct Primitive {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
std::string name;
|
std::string name;
|
||||||
std::vector<Primitive> primitives;
|
std::vector<Primitive> primitives;
|
||||||
std::vector<double> weights; // weights to be applied to the Morph Targets
|
std::vector<double> weights; // weights to be applied to the morph targets
|
||||||
ParameterMap extensions;
|
ParameterMap extensions;
|
||||||
Value extras;
|
Value extras;
|
||||||
} Mesh;
|
} Mesh;
|
||||||
@ -1464,9 +1465,7 @@ static bool ParseTexture(Texture *texture, std::string *err,
|
|||||||
double source = -1.0;
|
double source = -1.0;
|
||||||
ParseNumberProperty(&sampler, err, o, "sampler", false);
|
ParseNumberProperty(&sampler, err, o, "sampler", false);
|
||||||
|
|
||||||
if (!ParseNumberProperty(&source, err, o, "source", true)) {
|
ParseNumberProperty(&source, err, o, "source", false);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
texture->sampler = static_cast<int>(sampler);
|
texture->sampler = static_cast<int>(sampler);
|
||||||
texture->source = static_cast<int>(source);
|
texture->source = static_cast<int>(source);
|
||||||
@ -2051,7 +2050,7 @@ static bool ParseSkin(Skin *skin, std::string *err,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
double skeleton;
|
double skeleton = -1.0;
|
||||||
ParseNumberProperty(&skeleton, err, o, "skeleton", false, "Skin");
|
ParseNumberProperty(&skeleton, err, o, "skeleton", false, "Skin");
|
||||||
skin->skeleton = static_cast<int>(skeleton);
|
skin->skeleton = static_cast<int>(skeleton);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user