Dawn/src/dawnhelloworld/scene/HelloWorldScene.cpp

20 lines
562 B
C++

// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "scene/SceneList.hpp"
#include "component/display/Camera.hpp"
#include "prefab/SimpleSpinningCube.hpp"
using namespace Dawn;
void Dawn::helloWorldScene(Scene &s) {
std::cout << "Hello World Scene" << std::endl;
auto cameraItem = s.createSceneItem();
auto camera = cameraItem->addComponent<Camera>();
cameraItem->lookAt({ 5, 5, 5 }, { 0, 0, 0 }, { 0, 1, 0 });
auto cubeItem = createSimpleSpinningCube(s);
}