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

the library doesnt work as espected #59

Closed Trongar closed 1 year ago

Trongar commented 1 year ago

I'm trying to add the effect to my svelt project, but the console say's this This browser has prefers reduced motion turned on, so the cursor did not init and here is how im trying to make it

import { onMount } from 'svelte';
import { rainbowCursor } from "cursor-effects";
let canvas3d ;
onMount(()=>{
  new rainbowCursor({
    length: 3,
    colors: ["red", "blue"],
    size: 4,
  });
})
tholman commented 1 year ago

Do you have prefers reduced motion turned on? The lib respects that and doesn't allow you to add high motion effects.

Trongar commented 1 year ago

i don't know, i have test it in opera, chrome, edge and firefox and i've got the same

Trongar commented 1 year ago

event the page works whell

tholman commented 1 year ago

Ya, its a system setting. If you turn it off you will see the effects.

https://stackoverflow.com/questions/59708960/how-do-i-change-the-prefers-reduced-motion-setting-in-browsers

Trongar commented 1 year ago

thanks, even i've solve it by deleting the condition, I don't know what kind of bug it will trace, but a least it works for me, thank you