Coder Social home page Coder Social logo

legendary-cursor's People

Contributors

dependabot[bot] avatar domenicobrz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

legendary-cursor's Issues

mobile support

Hi! First of all, thanks for this amazing project, is just that I wanted. So elegant and easy to implement.
Could you add support for mobile users? I referr to touchscreen obviusly

I tried to make a listener for touchmove event but only draws the cursor when user give touches and not when it slides

My functions:

document.addEventListener("touchmove", onTouchMove, false);

function onTouchMove(e) {
    posX = e.touches[0].clientX;
    posY = e.touches[0].clientY;
    
    let ux = (posX / innerWidth) * 2 - 1;
    let uy = ((innerHeight - posY) / innerHeight) * 2 - 1;
    let v = vec3(ux * aspectRatio, uy, 0);
    
    currMousePos = v;
    lastTextureDisp = new THREE.Vector2(posX, posY);
    e.preventDefault();
}

Edit: after a review, the touch draws is already on this lib, not with my event listener. And after putting a console log inside touchmove event, doesn't print anything on console

New quest: Craft a demo

An avid RPG fan is wanting a demo.

He is ready to reward you for your efforts.

Reward: 1 GitHub star + sharing to his 1K developer colleagues at work

Do you accept this quest? Yes / No

ReferenceError: innerWidth is not defined

When I just import it in my nextjs project, it's showing error like this. How can I solve it?

- error node_modules\legendary-cursor\src\index.js (26:0) @ eval
- error ReferenceError: innerWidth is not defined

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.