File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ new cursoreffects.bubbleCursor({ element: document.querySelector("#bubbles") })
9
9
new cursoreffects . snowflakeCursor ( { element : document . querySelector ( "#snowflake" ) } )
10
10
new cursoreffects . characterCursor ( { element : document . querySelector ( "#character" ) } )
11
11
new cursoreffects . clockCursor ( { element : document . querySelector ( "#clock" ) } )
12
- new cursoreffects . textFlag ( { element : document . querySelector ( "#textFlag" ) , text : 'Like & Subscribe' } )
12
+ new cursoreffects . textFlag ( { element : document . querySelector ( "#textFlag" ) , text : 'Like & Subscribe 💸 ' } )
Original file line number Diff line number Diff line change 2
2
"name" : " cursor-effects" ,
3
3
"type" : " module" ,
4
4
"description" : " Old-school cursor effects for your browser built in modern JavaScript." ,
5
- "version" : " 1.0.16 " ,
5
+ "version" : " 1.0.17 " ,
6
6
"main" : " ./dist/cjs.cjs" ,
7
7
"module" : " ./dist/esm.js" ,
8
8
"types" : " ./types.d.ts" ,
Original file line number Diff line number Diff line change @@ -26,9 +26,11 @@ export function textFlag(options) {
26
26
let height = window . innerHeight ;
27
27
let cursor = { x : width / 2 , y : width / 2 } ;
28
28
29
- for ( let i = 0 ; i < text . length ; i ++ ) {
30
- charArray [ i ] = { letter : text . charAt ( i ) , x : width / 2 , y : width / 2 } ;
31
- }
29
+ charArray = Array . from ( text ) . map ( char => ( {
30
+ letter : char ,
31
+ x : width / 2 ,
32
+ y : width / 2
33
+ } ) ) ;
32
34
33
35
let canvas , context , animationFrame ;
34
36
You can’t perform that action at this time.
0 commit comments