hmd orient, vr ui
This commit is contained in:
@@ -19,6 +19,7 @@ void App::tick(float dt)
|
||||
|
||||
void App::resize(float w, float h)
|
||||
{
|
||||
uirtt.create(w, h);
|
||||
redraw = true;
|
||||
width = w;
|
||||
height = h;
|
||||
@@ -181,6 +182,7 @@ bool App::mouse_down(int button, float x, float y, float pressure, kEventSource
|
||||
}
|
||||
bool App::mouse_move(float x, float y, float pressure, kEventSource source, bool eraser)
|
||||
{
|
||||
cursor = { x / zoom, y / zoom };
|
||||
redraw = true;
|
||||
MouseEvent e;
|
||||
e.m_type = kEventType::MouseMove;
|
||||
@@ -264,6 +266,8 @@ bool App::gesture_end()
|
||||
}
|
||||
bool App::key_down(kKey key)
|
||||
{
|
||||
if (key == kKey::KeySpacebar)
|
||||
canvas->m_canvas->m_cam_rot = vr_rot;
|
||||
redraw = true;
|
||||
keys[(int)key] = true;
|
||||
KeyEvent e;
|
||||
|
||||
Reference in New Issue
Block a user