GithubHelp home page GithubHelp logo

可以在canvas上使用吗? about any-touch HOT 4 CLOSED

any86 avatar any86 commented on May 5, 2024
可以在canvas上使用吗?

from any-touch.

Comments (4)

any86 avatar any86 commented on May 5, 2024

可以啊, at可以捕获在canvas元素上的所有手势, 但如果你指的是canvas内自己画的物体的手势, 是没法针对某个物体捕获的, 这个就要进一步编程了.

from any-touch.

q1998763 avatar q1998763 commented on May 5, 2024

关于“进一步编程”,不知道能否给个demo,我自已其实用pixi捣鼓了一段时间,都没能跑通。原本是使用pixi-hammer的,但它太重了,想换成这个项目。

from any-touch.

any86 avatar any86 commented on May 5, 2024

我对这方面没研究, 帮不上忙啊, 我只是知道你要自己在canvas去判断触点是否在某个图形内, 比如isPontInPath这种api

from any-touch.

q1998763 avatar q1998763 commented on May 5, 2024

恩恩,我理解是用catchEvent,然后在canvasElement.on('touchstart', (e) => { })后,在函数里new Event()出来传进catchEvent里。

from any-touch.

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.