mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Bugfix depth
This commit is contained in:
2
View.cpp
2
View.cpp
@@ -409,7 +409,7 @@ void LayerView::grab (glm::vec2 from, glm::vec2 to, Source *s, std::pair<Node *,
|
|||||||
sourceNode->translation_ = start_translation + gl_Position_to - gl_Position_from;
|
sourceNode->translation_ = start_translation + gl_Position_to - gl_Position_from;
|
||||||
|
|
||||||
// diagonal movement only
|
// diagonal movement only
|
||||||
sourceNode->translation_.x = CLAMP( sourceNode->translation_.x, -10.f, 0.f);
|
sourceNode->translation_.x = CLAMP( sourceNode->translation_.x, SCENE_DEPTH + 2.f, 0.f);
|
||||||
sourceNode->translation_.y = sourceNode->translation_.x / aspect_ratio;
|
sourceNode->translation_.y = sourceNode->translation_.x / aspect_ratio;
|
||||||
|
|
||||||
// change depth
|
// change depth
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#define EUCLIDEAN(P1, P2) sqrt((P1.x() - P2.x()) * (P1.x() - P2.x()) + (P1.y() - P2.y()) * (P1.y() - P2.y()))
|
#define EUCLIDEAN(P1, P2) sqrt((P1.x() - P2.x()) * (P1.x() - P2.x()) + (P1.y() - P2.y()) * (P1.y() - P2.y()))
|
||||||
|
|
||||||
#define SCENE_UNIT 5.f
|
#define SCENE_UNIT 5.f
|
||||||
#define SCENE_DEPTH -10.f
|
#define SCENE_DEPTH -12.f
|
||||||
#define CIRCLE_SQUARE_DIST(x,y) ( (x*x + y*y) / (SCENE_UNIT * SCENE_UNIT * SCENE_UNIT * SCENE_UNIT) )
|
#define CIRCLE_SQUARE_DIST(x,y) ( (x*x + y*y) / (SCENE_UNIT * SCENE_UNIT * SCENE_UNIT * SCENE_UNIT) )
|
||||||
|
|
||||||
#define IMGUI_TITLE_MAINWINDOW ICON_FA_CIRCLE_NOTCH " vimix"
|
#define IMGUI_TITLE_MAINWINDOW ICON_FA_CIRCLE_NOTCH " vimix"
|
||||||
|
|||||||
Reference in New Issue
Block a user