Skip to content

Commit

Permalink
Added group
Browse files Browse the repository at this point in the history
  • Loading branch information
denis authored and denis committed Nov 15, 2024
1 parent f73c990 commit 4b613ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Engine/include/SceneData/SceneExporterLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ namespace Prisma
Texture texture;
if (t.second == "NO_TEXTURE")
{
textures.push_back(Prisma::GlobalData::getInstance().defaultBlack());
textures.push_back(Prisma::GlobalData::getInstance().defaultWhite());
}
else
{
Expand All @@ -577,7 +577,7 @@ namespace Prisma
Texture texture;
if (t.second == "NO_TEXTURE")
{
textures.push_back(Prisma::GlobalData::getInstance().defaultBlack());
textures.push_back(Prisma::GlobalData::getInstance().defaultWhite());
}
else
{
Expand Down
9 changes: 0 additions & 9 deletions UserEngine/src/PlayerController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ PlayerController::PlayerController(std::shared_ptr<Prisma::Scene> scene) : m_sce
m_baseData = m_animatedMesh->parent()->parent()->matrix();
m_animations = IDLE;
m_previousAnimations = IDLE;
auto cloud = std::make_shared<Prisma::Node>();
cloud->name("Cloud");
cloud->addComponent(std::make_shared<Prisma::CloudComponent>());
m_scene->root->addChild(cloud);

auto culling = std::make_shared<Prisma::Node>();
culling->name("Culling");
culling->addComponent(std::make_shared<Prisma::CullingComponent>());
m_scene->root->addChild(culling);

/*auto terrain = std::make_shared<Prisma::Node>();
terrain->name("Terrain");
Expand Down
15 changes: 1 addition & 14 deletions UserEngine/src/UserEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,12 @@

void UserEngine::start()
{
m_root = Prisma::Engine::getInstance().getScene("../../../Resources/DefaultScene/default.gltf", {true});
m_root = Prisma::Engine::getInstance().getScene("../../../Resources/DefaultScene/default.prisma", {true});
Prisma::Texture texture;
texture.loadEquirectangular("../../../Resources/Skybox/cloudy.hdr");
texture.data({4096, 4096, 3});
Prisma::PipelineSkybox::getInstance().texture(texture, true);

Prisma::NodeHelper nodeHelper;

nodeHelper.nodeIterator(m_root->root, [](auto mesh, auto parent)
{
auto currentMesh = std::dynamic_pointer_cast<Prisma::Mesh>(mesh);
if (currentMesh && !std::dynamic_pointer_cast<Prisma::AnimatedMesh>(mesh))
{
auto physicsComponent = std::make_shared<Prisma::PhysicsMeshComponent>();
physicsComponent->collisionData({Prisma::Physics::Collider::BOX_COLLIDER, 0.0, false});
currentMesh->addComponent(physicsComponent);
}
});

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

m_player->scene(m_root);
Expand Down

0 comments on commit 4b613ff

Please sign in to comment.