tholman / cursor-effects

Old-school cursor effects for your browser built with modern JavaScript
https://tholman.com/cursor-effects
3.35k stars 246 forks source link

[feat]add color mix effect to the dotCursor #76

Open chase-si opened 3 months ago

chase-si commented 3 months ago

Hi,Tholman.

I used your code in my project, and added some codes to make the dot background is changeable.

I think someone else may also need the effect. So submit a PR to you.

Here's the screenshot:

image
tholman commented 3 months ago

Nice stuff!

I think a slightly more succinct way to do this would be to expose a variable called mixBlendMode as a string, that takes the option of "difference" (or any of the others, if someone may find they want them).

I almost think we make 'difference' the default, looks way nicer.

chase-si commented 3 months ago

Nice stuff!

I think a slightly more succinct way to do this would be to expose a variable called mixBlendMode as a string, that takes the option of "difference" (or any of the others, if someone may find they want them).

I almost think we make 'difference' the default, looks way nicer.

Hi, I have added a new commit to change mixDotBgColor to mixBlendMode.

But I didn't set thedifference as the default value.

It may make a small change for the guys that using your npm package to build their page, when they update the version.

For example, if I set it as default value, in your example(Following Dot), the gray dot will be lighter because it will mix with the white background.