fix parallax camera
This commit is contained in:
@@ -95,7 +95,7 @@ android {
|
||||
// Specifies the ABI configurations of your native
|
||||
// libraries Gradle should build and package with your APK.
|
||||
// abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
|
||||
abiFilters 'armeabi-v7a'
|
||||
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1089,7 +1089,7 @@ Here's a list of what's available in this release.
|
||||
<image path="data/ui/eraser.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
</button-custom>
|
||||
|
||||
<!--<button id="btn-cam" width="70" height="100%" margin="0 0 0 5" text="Parallax"/>-->
|
||||
<button id="btn-cam" width="70" height="100%" margin="0 0 0 5" text="Parallax"/>
|
||||
|
||||
<button-custom id="btn-line" width="40" height="100%" margin="0 0 0 5" thickness="1" border-color="0 0 0 1" pad="2">
|
||||
<image path="data/ui/line.png" width="100%" height="100%" align="center" justify="flex-end"/>
|
||||
|
||||
@@ -277,7 +277,7 @@ void select_button(Node* main, T* button) {
|
||||
main->find<NodeButtonCustom>("btn-pen")->set_color(color_button_normal);
|
||||
main->find<NodeButtonCustom>("btn-erase")->set_color(color_button_normal);
|
||||
main->find<NodeButtonCustom>("btn-line")->set_color(color_button_normal);
|
||||
//main->find<NodeButton>("btn-cam")->set_color(color_button_normal);
|
||||
main->find<NodeButton>("btn-cam")->set_color(color_button_normal);
|
||||
main->find<NodeButton>("btn-grid")->set_color(color_button_normal);
|
||||
main->find<NodeButton>("btn-copy")->set_color(color_button_normal);
|
||||
main->find<NodeButton>("btn-cut")->set_color(color_button_normal);
|
||||
|
||||
@@ -76,7 +76,7 @@ void NodeCanvas::draw()
|
||||
|
||||
glm::mat4 ortho_proj = glm::ortho(0.f, box.z, 0.f, box.w, -1000.f, 1000.f);
|
||||
glm::mat4 proj = glm::perspective(glm::radians(m_canvas->m_cam_fov), box.z / box.w, 0.001f, 1000.f);
|
||||
glm::mat4 camera = m_canvas->m_cam_rot * glm::translate(m_canvas->m_cam_pos);
|
||||
glm::mat4 camera = glm::translate(m_canvas->m_cam_pos) * m_canvas->m_cam_rot;
|
||||
|
||||
m_canvas->m_mv = camera;
|
||||
m_canvas->m_proj = proj;
|
||||
|
||||
Reference in New Issue
Block a user