发现Graphics组件的一个问题!

在TouchMove事件中,使用Graphics组件lineTo方法做一个绘画,在桌面浏览器下会出现下面情况

在模拟器和手机浏览器中则没有出现过

代码如下:

  _onGraphicsTouchStart(sender, event) {
        let location = event.getLocation();
        this._drawGraphics(location);
    },

    _onGraphicsTouchMove(sender, event) {
        let location = event.getLocation();
        this._drawGraphics(location);
    },

    _onGraphicsTouchEnd(sender, event) {
        this._startPoint = null;
    },

    _drawGraphics(point) {
        if (!this._startPoint) {
            this._startPoint = point;
            this._graphics.$Graphics.moveTo(point.x, point.y);
            return;
        }
        this._graphics.$Graphics.lineTo(point.x, point.y);
        this._graphics.$Graphics.stroke();
    },

我用的CocosCreator版本是1.5.2和1.70的桌面Web上都存在这个问题,猜想是不是电脑上是用鼠标模拟的触摸事件造成的?

看表现是之前顶点数量过多的问题,不过后面已经修过了的,你先上传一个demo,有空我看看

这个问题怎么还存在???

1赞

请问楼主 后来是如何解决的呀?