Skip to content

Commit

Permalink
Added groups
Browse files Browse the repository at this point in the history
  • Loading branch information
denis authored and denis committed Nov 15, 2024
1 parent 0eaff10 commit bb907a1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Engine/include/SceneData/SceneExporterLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ namespace Prisma
}

j["components"] = componentJson;
j["visible"] = n->visible();
}

// Deserialize NodeExport from JSON
Expand Down Expand Up @@ -681,6 +682,13 @@ namespace Prisma

mesh->loadAnimateModel(verticesData);
}
if (j.contains("visible"))
{
bool visible = true;
j.at("visible").get_to(visible);
n->visible(visible);
}

if (!j.contains("components") || !j["components"].is_array())
return;

Expand Down
Binary file modified Resources/DefaultScene/default.prisma
Binary file not shown.
2 changes: 0 additions & 2 deletions UserEngine/src/PlayerController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ PlayerController::PlayerController(std::shared_ptr<Prisma::Scene> scene) : m_sce
}

m_bboxMesh = std::dynamic_pointer_cast<Prisma::Mesh>(nodeHelper.find(m_scene->root, "BBoxMesh"));
m_bboxMesh->visible(false);

m_sphereMesh = std::dynamic_pointer_cast<Prisma::Mesh>(nodeHelper.find(m_scene->root, "SphereMesh"));
m_sphereMesh->visible(false);

m_gunPosition = nodeHelper.find(m_scene->root, "GunPosition");

Expand Down
1 change: 0 additions & 1 deletion UserEngine/src/UserEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ void UserEngine::start()
texture.loadEquirectangular("../../../Resources/Skybox/cloudy.hdr");
texture.data({4096, 4096, 3});
Prisma::PipelineSkybox::getInstance().texture(texture, true);

m_player = std::make_shared<PlayerController>(m_root);

m_player->scene(m_root);
Expand Down

0 comments on commit bb907a1

Please sign in to comment.