Browse Source

Fix wrong buffered points

infinite
A.Olokhtonov 2 years ago
parent
commit
0271e38dbc
  1. 2
      client/client_recv.js
  2. 24
      client/index.html
  3. 2
      client/index.js
  4. 4
      client/webgl_listeners.js
  5. 2
      client/websocket.js

2
client/client_recv.js

@ -240,7 +240,7 @@ function handle_event(state, context, event, relax = false) { @@ -240,7 +240,7 @@ function handle_event(state, context, event, relax = false) {
case EVENT.IMAGE_MOVE: {
// Already moved due to local prediction
if (event.user_id !== state.me.id) {
if (event.user_id !== state.me) {
const image_id = event.image_id;
const image_event = find_image(state, image_id);

24
client/index.html

@ -7,20 +7,20 @@ @@ -7,20 +7,20 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="shortcut icon" href="icons/favicon.svg" id="favicon">
<link rel="stylesheet" type="text/css" href="default.css?v=26">
<link rel="stylesheet" type="text/css" href="default.css?v=27">
<script type="text/javascript" src="aux.js?v=26"></script>
<script type="text/javascript" src="math.js?v=26"></script>
<script type="text/javascript" src="tools.js?v=26"></script>
<script type="text/javascript" src="webgl_geometry.js?v=26"></script>
<script type="text/javascript" src="webgl_shaders.js?v=26"></script>
<script type="text/javascript" src="webgl_listeners.js?v=26"></script>
<script type="text/javascript" src="webgl_draw.js?v=26"></script>
<script type="text/javascript" src="index.js?v=26"></script>
<script type="text/javascript" src="aux.js?v=27"></script>
<script type="text/javascript" src="math.js?v=27"></script>
<script type="text/javascript" src="tools.js?v=27"></script>
<script type="text/javascript" src="webgl_geometry.js?v=27"></script>
<script type="text/javascript" src="webgl_shaders.js?v=27"></script>
<script type="text/javascript" src="webgl_listeners.js?v=27"></script>
<script type="text/javascript" src="webgl_draw.js?v=27"></script>
<script type="text/javascript" src="index.js?v=27"></script>
<script type="text/javascript" src="client_send.js?v=26"></script>
<script type="text/javascript" src="client_recv.js?v=26"></script>
<script type="text/javascript" src="websocket.js?v=26"></script>
<script type="text/javascript" src="client_send.js?v=27"></script>
<script type="text/javascript" src="client_recv.js?v=27"></script>
<script type="text/javascript" src="websocket.js?v=27"></script>
</head>
<body>
<div class="main">

2
client/index.js

@ -1,5 +1,3 @@ @@ -1,5 +1,3 @@
// NEXT: fire events for brush changes
document.addEventListener('DOMContentLoaded', main);
const config = {

4
client/webgl_listeners.js

@ -283,10 +283,10 @@ function touchmove(e, state, context) { @@ -283,10 +283,10 @@ function touchmove(e, state, context) {
if (state.touch.buffered.length > 0) {
clear_dynamic_stroke(state, context, state.me);
// BUG: can't see these on other clients!!
// NEXT: BUG: can't see these on other clients!!
for (const p of state.touch.buffered) {
update_dynamic_stroke(state, context, state.me, p);
fire_event(state, predraw_event(canvasp.x, canvasp.y));
fire_event(state, predraw_event(p.x, p.y));
}
state.touch.buffered.length = 0;

2
client/websocket.js

@ -28,7 +28,7 @@ async function ws_connect(state, context, first_connect = false) { @@ -28,7 +28,7 @@ async function ws_connect(state, context, first_connect = false) {
}
}
} catch (e) {
console.log('Could not ping the server:', e);
// console.log('Could not ping the server:', e);
}
state.timers.offline_toast = setTimeout(() => ws_connect(state, context, first_connect), config.ws_reconnect_timeout);

Loading…
Cancel
Save