Closed sophiekoonin closed 2 years ago
Awesome! A few small bits that we'll need to patch up here
this.canvas
rather than having to give it an ID/request to select it again. cancelAnimationFrame
to stop the primary loop from running in the backgroundSorry its a pita to update each of these, if we get one of these in the green I'll happily go through and patch the others
I'm going to merge and then add these lil bits now!
Completed the rest here! https://github.com/tholman/cursor-effects/commit/c4b4aef2cd371d2c32b23d903ccb65c0be5a4a64 ... looking and behaving well by all my tests :)
Fixes #26
Extremely copy-pastey, but it seems like each cursor is its own encapsulated thing so it seemed like the thing to do.
prefers-reduced-motion
when we init the cursor trailprefers-reduced-motion
changes, either re-init or destroy the cursor trailid
to the trail's canvas element, so that we can remove it from the DOM where necessary (this may help with #33?)