diff --git a/client/client_recv.js b/client/client_recv.js index 262c165..76e8d70 100644 --- a/client/client_recv.js +++ b/client/client_recv.js @@ -184,7 +184,7 @@ function handle_event(state, context, event, options = {}) { } case EVENT.PREDRAW: { - geometry_add_point(state, context, event.user_id, {'x': event.x, 'y': event.y}, 0.5); // TODO: event.pressure + geometry_add_point(state, context, event.user_id, {'x': event.x, 'y': event.y, 'pressure': 128}, false); // TODO: add pressure to predraw events need_draw = true; break; } diff --git a/client/webgl_draw.js b/client/webgl_draw.js index 5862f82..7cee1d3 100644 --- a/client/webgl_draw.js +++ b/client/webgl_draw.js @@ -251,6 +251,7 @@ async function draw(state, context, animate, ts) { gl.vertexAttribDivisor(locations['a_stroke_id'], 0); gl.vertexAttribDivisor(locations['a_pressure'], 0); } + // Dynamic strokes should be drawn above static strokes gl.clear(gl.DEPTH_BUFFER_BIT);