1
Good afternoon,
I have a code from a canvas Constellation that interacts with the mouseover pulling the links from the stars to next to the mouse, and would like to do in mobile the same thing, for the click it works, but I would like it to also "feel" and follow the touch to make the scroll (the finger slide on the screen) and follow where the finger is placed.
Code of Handler:
this.handlers = {
window: {
mousemove: function(e){
config.position.x = e.pageX - $canvas.offset().left;
config.position.y = e.pageY - $canvas.offset().top;
},
touchmove: function(e){
config.position.x = e.pageX - $canvas.offset().left;
config.position.y = e.pageY - $canvas.offset().top;
},
resize: function () {
window.cancelAnimationFrame(this.rAF);
}
}
};
I tried to use the means to pick up different call but also did not roll?
Mobile testing https://codepen.io/pcordista/pen/PoYNxpQ?editors=1010
Somebody give me a hand?