fix iOS short stroke preview
This commit is contained in:
@@ -206,7 +206,7 @@ void Stroke::add_point(glm::vec3 pos, float pressure)
|
|||||||
#ifdef __IOS__
|
#ifdef __IOS__
|
||||||
m_curve = glm::min(m_curve + 0.1f, 1.f);
|
m_curve = glm::min(m_curve + 0.1f, 1.f);
|
||||||
//pressure = pressure * glm::pow(m_curve, 2.f);
|
//pressure = pressure * glm::pow(m_curve, 2.f);
|
||||||
if (m_hold_points.size() < 5)
|
if (m_filter_points && m_hold_points.size() < 5)
|
||||||
{
|
{
|
||||||
m_hold_points.push_back({pos, pressure});
|
m_hold_points.push_back({pos, pressure});
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public:
|
|||||||
float m_dist = 0;
|
float m_dist = 0;
|
||||||
float m_step = 0;
|
float m_step = 0;
|
||||||
float m_max_size = FLT_MAX;
|
float m_max_size = FLT_MAX;
|
||||||
|
bool m_filter_points = true;
|
||||||
Camera m_camera;
|
Camera m_camera;
|
||||||
std::shared_ptr<Brush> m_brush;
|
std::shared_ptr<Brush> m_brush;
|
||||||
cbuffer<float, 3> m_curve_angles;
|
cbuffer<float, 3> m_curve_angles;
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ void NodeStrokePreview::draw_stroke()
|
|||||||
glm::mat4 proj = glm::ortho<float>(0, (float)m_rtt.getWidth(), 0, (float)m_rtt.getHeight(), -1, 1);
|
glm::mat4 proj = glm::ortho<float>(0, (float)m_rtt.getWidth(), 0, (float)m_rtt.getHeight(), -1, 1);
|
||||||
|
|
||||||
const auto& b = m_brush;
|
const auto& b = m_brush;
|
||||||
|
m_stroke.m_filter_points = false;
|
||||||
m_stroke.m_max_size = m_size.y / 800.f * App::I.zoom;
|
m_stroke.m_max_size = m_size.y / 800.f * App::I.zoom;
|
||||||
m_stroke.m_camera.fov = Canvas::I->m_cam_fov;
|
m_stroke.m_camera.fov = Canvas::I->m_cam_fov;
|
||||||
m_stroke.m_camera.rot = Canvas::I->m_cam_rot;
|
m_stroke.m_camera.rot = Canvas::I->m_cam_rot;
|
||||||
|
|||||||
Reference in New Issue
Block a user