DEV Community

Discussion on: This is probably the funniest Codepen I found this year!

Collapse
 
chrisachard profile image
Chris Achard • Edited

Ha, I saw this other day - it's fantastic :)

For anyone looking in the code for the 'trick' (of hiding the mouse), it's done by setting the cursor in JS on this line:

const screenStyle = cursorGrabbed ? { cursor: "none" } : {};

and then the fake mouse pointer is part of the hand graphic. Brilliant!

Collapse
 
savagepixie profile image
SavagePixie

Oh, so there is a cursor trick! I've seen it on my mobile, where you can obviously just tap on things, so I hadn't caught on this feature.