diff --git a/datafiles/data/themes/default.zip b/datafiles/data/themes/default.zip index 1e26ebf30..cd16558fd 100644 Binary files a/datafiles/data/themes/default.zip and b/datafiles/data/themes/default.zip differ diff --git a/scripts/d3d_camera/d3d_camera.gml b/scripts/d3d_camera/d3d_camera.gml index 40c16986b..d1c6d0f3a 100644 --- a/scripts/d3d_camera/d3d_camera.gml +++ b/scripts/d3d_camera/d3d_camera.gml @@ -77,6 +77,8 @@ function __3dCamera() constructor { } #endregion static setFocusAngle = function(ax, ay, dist) { #region + if(ay % 90 == 0) ay += 0.01; + focus_angle_x = ax; focus_angle_y = ay; focus_dist = dist; @@ -101,7 +103,7 @@ function __3dCamera() constructor { } #endregion static setCameraLookRotate = function() { #region - var _fPos = calculate_3d_position(focus.x, focus.y, focus.z, focus_angle_x, focus_angle_y, focus_dist); + var _fPos = d3d_PolarToCart(focus.x, focus.y, focus.z, focus_angle_x, focus_angle_y, focus_dist); position.set(_fPos); } #endregion diff --git a/scripts/d3d_camera_object/d3d_camera_object.gml b/scripts/d3d_camera_object/d3d_camera_object.gml index 9411ec9c5..3d0efecd2 100644 --- a/scripts/d3d_camera_object/d3d_camera_object.gml +++ b/scripts/d3d_camera_object/d3d_camera_object.gml @@ -42,9 +42,10 @@ function __3dCamera_object() : __3dObject() constructor { } } -function calculate_3d_position(camFx, camFy, camFz, camAx, camAy, camDist) { +function d3d_PolarToCart(camFx, camFy, camFz, camAx, camAy, camDist) { var pos = new __vec3(); + if(camAy % 90 == 0) camAy += 0.01; var radAx = degtorad(camAx); var radAy = degtorad(camAy); diff --git a/scripts/d3d_scene/d3d_scene.gml b/scripts/d3d_scene/d3d_scene.gml index 9905195d2..d879cc356 100644 --- a/scripts/d3d_scene/d3d_scene.gml +++ b/scripts/d3d_scene/d3d_scene.gml @@ -5,7 +5,7 @@ var d3_view_camera = new __3dCamera(); d3_view_camera.setViewSize(2, 2); d3_view_camera.setFocusAngle(135, 45, 8); - d3_view_camera.position.set(calculate_3d_position(0, 0, 0, d3_view_camera.focus_angle_x, d3_view_camera.focus_angle_y, d3_view_camera.focus_dist)); + d3_view_camera.position.set(d3d_PolarToCart(0, 0, 0, d3_view_camera.focus_angle_x, d3_view_camera.focus_angle_y, d3_view_camera.focus_dist)); d3_view_camera.projection = CAMERA_PROJECTION.orthograph; d3_view_camera.setMatrix(); diff --git a/scripts/dynaSurf_3d/dynaSurf_3d.gml b/scripts/dynaSurf_3d/dynaSurf_3d.gml index fe3477b72..a525f0f13 100644 --- a/scripts/dynaSurf_3d/dynaSurf_3d.gml +++ b/scripts/dynaSurf_3d/dynaSurf_3d.gml @@ -23,7 +23,7 @@ function dynaSurf_3d() : dynaSurf() constructor { #region view var _pos, _blend = 1; - _pos = calculate_3d_position(camTarget.x, camTarget.y, camTarget.z, _rot, camera_ay, camera.focus_dist); + _pos = d3d_PolarToCart(camTarget.x, camTarget.y, camTarget.z, _rot, camera_ay, camera.focus_dist); camera.position.set(_pos); camera.focus.set(camTarget); diff --git a/scripts/node_3d_camera_set/node_3d_camera_set.gml b/scripts/node_3d_camera_set/node_3d_camera_set.gml index a69fd420a..b9886165c 100644 --- a/scripts/node_3d_camera_set/node_3d_camera_set.gml +++ b/scripts/node_3d_camera_set/node_3d_camera_set.gml @@ -55,7 +55,7 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr var _col = _data[in_cam + 2]; var _int = _data[in_cam + 3]; - var pos = calculate_3d_position(0, 0, 0, _han, _van, 4) + var pos = d3d_PolarToCart(0, 0, 0, _han, _van, 4) light_key.transform.position.set(pos.x, pos.y, pos.z); var _rot = new __rot3().lookAt(light_key.transform.position, new __vec3()); light_key.transform.rotation.FromEuler(_rot.x, _rot.y, _rot.z); @@ -68,7 +68,7 @@ function Node_3D_Camera_Set(_x, _y, _group = noone) : Node_3D_Camera(_x, _y, _gr var _col = _data[in_cam + 6]; var _int = _data[in_cam + 7]; - var pos = calculate_3d_position(0, 0, 0, _han, _van, 4) + var pos = d3d_PolarToCart(0, 0, 0, _han, _van, 4) light_fill.transform.position.set(pos.x, pos.y, pos.z); var _rot = new __rot3().lookAt(light_fill.transform.position, new __vec3()); light_fill.transform.rotation.FromEuler(_rot.x, _rot.y, _rot.z); diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index b51e465b4..7403b7680 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -1231,7 +1231,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x badgeInspect = lerp_float(badgeInspect, inspecting, 2); if(badgePreview > 0) { - draw_sprite_ext(THEME.node_state, 0, xx, yy, badgePreview, badgePreview, 0, c_white, 1); + draw_sprite_ext(THEME.node_state, is_3D? 3 : 0, xx, yy, badgePreview, badgePreview, 0, c_white, 1); xx -= 28 * badgePreview; } diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 4eaea0760..5c3474e17 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -2071,15 +2071,15 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru if(type == VALUE_TYPE.action) { var tx = x; draw_set_text(f_p1, fa_center, fa_center, _draw_cc); - draw_text(tx, y - (line_get_height() + 16) / 2, name); + draw_text(round(tx), round(y - (line_get_height() + 16) / 2), name); } else if(connect_type == JUNCTION_CONNECT.input) { var tx = x - 12 * _s; draw_set_halign(fa_right); - draw_text(tx, y, name); + draw_text(round(tx), round(y), name); } else { var tx = x + 12 * _s; draw_set_halign(fa_left); - draw_text(tx, y, name); + draw_text(round(tx), round(y), name); } } #endregion diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index 2806202f5..c073c9da4 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -614,18 +614,17 @@ function Panel_Preview() : PanelContent() constructor { } var _node = getNodePreview(); - if(_node) - title = _node.renamed? _node.display_name : _node.name; + if(_node) title = _node.renamed? _node.display_name : _node.name; - if(splitView == 0 && tileMode == 0 && is_surface(preview_surface[0])) { + if(splitView == 0 && tileMode == 0) { var node = preview_node[0]; - node.previewing = 1; - var aa = node.preview_alpha; + if(is_surface(preview_surface[0])) { + node.previewing = 1; + var aa = node.preview_alpha; - if(PROJECT.onion_skin.enabled) { - drawOnionSkin(node, psx, psy, ss); - } else - draw_surface_ext_safe(preview_surface[0], psx, psy, ss, ss, 0, c_white, aa); + if(PROJECT.onion_skin.enabled) drawOnionSkin(node, psx, psy, ss); + else draw_surface_ext_safe(preview_surface[0], psx, psy, ss, ss, 0, c_white, aa); + } } switch(splitView) { #region draw surfaces @@ -752,7 +751,7 @@ function Panel_Preview() : PanelContent() constructor { function draw3D() { #region var _prev_node = getNodePreview(); if(_prev_node == noone) return; - if(!_prev_node.is_3D) return + if(!_prev_node.is_3D) return; _prev_node.previewing = 1; @@ -763,7 +762,7 @@ function Panel_Preview() : PanelContent() constructor { var _pos, targ, _blend = 1; targ = d3_camTarget; - _pos = calculate_3d_position(targ.x, targ.y, targ.z, d3_view_camera.focus_angle_x, d3_view_camera.focus_angle_y, d3_view_camera.focus_dist); + _pos = d3d_PolarToCart(targ.x, targ.y, targ.z, d3_view_camera.focus_angle_x, d3_view_camera.focus_angle_y, d3_view_camera.focus_dist); if(d3_active_transition == 1) { var _up = new __vec3(0, 0, -1);