How does this work?
Basically, the plugin will detect the movement of your cursor and when the cursor is hovering over the images, then the plugin executes the shuffle image mechanism. The problem with using the cursor to trigger shuffle image is that the cursor movement data changes every pixel which may cause the images to shuffle way too fast. The tackle this issue, I added a global variable to keep track of the previous cursor location and when the cursor moves, the current location will be compared to the previous location and if the pixel difference doesn’t exceed the number specified (default is 50px), then it won't execute the image shuffle mechanism. This way, the shuffle of images will now be significantly slower which in turn lets developers adjust the sensitivity of the trigger with this pixel difference variable.
How does this work?
Basically, the plugin will detect the movement of your cursor and when the cursor is hovering over the images, then the plugin executes the shuffle image mechanism. The problem with using the cursor to trigger shuffle image is that the cursor movement data changes every pixel which may cause the images to shuffle way too fast. The tackle this issue, I added a global variable to keep track of the previous cursor location and when the cursor moves, the current location will be compared to the previous location and if the pixel difference doesn’t exceed the number specified (default is 50px), then it won't execute the image shuffle mechanism. This way, the shuffle of images will now be significantly slower which in turn lets developers adjust the sensitivity of the trigger with this pixel difference variable.
การแปล กรุณารอสักครู่..
