Giter Site home page Giter Site logo

Comments (11)

06wj avatar 06wj commented on April 28, 2024

具体什么机器呢 我这边试了下木有问题

from hilo.

iguoji avatar iguoji commented on April 28, 2024

电脑:win10 x64 i5-4430 8g内存
Chrome 版本 51.0.2687.0
电脑上,谷歌浏览器使用手机流量模式,点击会卡顿
另外小米手机4,更新到最新系统,在最新版微信里点击稍微按住一下会出现卡顿

链接:http://h.fulihuodong.com/guoji/game.html?t=-1534373860

from hilo.

iguoji avatar iguoji commented on April 28, 2024

还有点击屏幕后执行Tween.to动画,很正常,但是如果双击,那么就尴尬了。

from hilo.

06wj avatar 06wj commented on April 28, 2024

感觉是页面滚动的问题,小米上复现了,pc上木有复现
加下面禁止滚动试试呢

document.body.addEventListener('touchmove', function (e) {
e.preventDefault(); });

from hilo.

06wj avatar 06wj commented on April 28, 2024

双击那个是因为你连续对一个对象调了两次tweenTo,你可以

Tween.remove(target);
Tween.to(target, {}, {});

每次tween前把target 的tween先删掉

from hilo.

iguoji avatar iguoji commented on April 28, 2024

加上e.preventDefault()也是不行的,只要touchstart时间稍微长一点点就会有问题,之前我的理解是canvas的机制问题,因为好像在别的什么项目也看到过这种现象。

from hilo.

06wj avatar 06wj commented on April 28, 2024

touchstart时preventDefault呢

from hilo.

iguoji avatar iguoji commented on April 28, 2024

还是一样,不纠结了。。

from hilo.

xbl avatar xbl commented on April 28, 2024

android手机上会有,我也遇到了~

from hilo.

finscn avatar finscn commented on April 28, 2024

除了 preventDefault 一类的js
再加一些css试一试呢? 比如

body,
div,
span,
canvas,
iframe {
    -webkit-touch-action: none;
    -ms-touch-action: none;
    touch-action: none;
    -webkit-touch-callout: none;
    -ms-touch-callout: none;
    touch-callout: none;
    -webkit-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-size-adjust: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -ms-tap-highlight-color: rgba(0, 0, 0, 0);
    tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

我果然是火狐黑。哈哈哈哈

from hilo.

imindzzz avatar imindzzz commented on April 28, 2024

小米5自带的浏览器就会卡

from hilo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.