#1 - 2024-3-8 11:17
冰灵子
<canvas id="docCanvas"
class="fl"
width="100%"
height="100%"
@mousedown="docCanvasDown($event)"
@mouseup="docCanvasUp($event)"
@mousemove="docCanvasMove($event)"
@touchstart="docTouchCanvasDown($event)"
@touchend="docTouchCanvasUp($event)"
@touchmove="docTouchCanvasMove($event)"></canvas>
代码上面也写有触摸的方法,但还是出现画线或者写字时不流畅,请问有没有其他更好的方法或者有好的优化方案?谢谢赐教!
class="fl"
width="100%"
height="100%"
@mousedown="docCanvasDown($event)"
@mouseup="docCanvasUp($event)"
@mousemove="docCanvasMove($event)"
@touchstart="docTouchCanvasDown($event)"
@touchend="docTouchCanvasUp($event)"
@touchmove="docTouchCanvasMove($event)"></canvas>
代码上面也写有触摸的方法,但还是出现画线或者写字时不流畅,请问有没有其他更好的方法或者有好的优化方案?谢谢赐教!
#2 - 2024-3-8 11:44
CureDovahkinn🤔
(プリキュアなりたい)
#2-1 - 2024-3-8 11:57
冰灵子
看着代码是手搓的画笔,以前已写好的。慢慢发现在一体机进行画笔或者写字,出现了不流畅的情况。好的,我找找一些库试试。谢谢
#3 - 2024-3-19 15:19
yostgray