mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-06-06 08:42:35 +00:00
Extended GLTF classes to support: material colours, and images buffer view index / image type.
This commit is contained in:
@@ -277,10 +277,11 @@ namespace gltf
|
||||
{
|
||||
public:
|
||||
std::optional<JsonTextureInfo> baseColorTexture;
|
||||
std::optional<std::array<float, 4>> baseColorFactor;
|
||||
std::optional<float> metallicFactor;
|
||||
};
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonPbrMetallicRoughness, baseColorTexture, metallicFactor);
|
||||
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonPbrMetallicRoughness, baseColorTexture, baseColorFactor, metallicFactor);
|
||||
|
||||
class JsonNormalTextureInfo
|
||||
{
|
||||
@@ -388,9 +389,12 @@ namespace gltf
|
||||
{
|
||||
public:
|
||||
std::optional<std::string> uri;
|
||||
|
||||
std::optional<unsigned int> bufferView;
|
||||
std::optional<std::string> mimeType;
|
||||
};
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonImage, uri);
|
||||
NLOHMANN_DEFINE_TYPE_EXTENSION(JsonImage, uri, bufferView, mimeType);
|
||||
|
||||
class JsonRoot
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user