Last active
December 30, 2016 09:20
-
-
Save spite/90e3dbf8e117660f6788a5748ae06cad to your computer and use it in GitHub Desktop.
Go to https://lines.chromeexperiments.com/drag/, start the experience and run this code in the console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById( 'loading' ).style.display = 'none'; | |
var speed = .001; // changes the rate of rotation | |
var distance = 4; // changes the distance the point travels | |
function _update() { | |
bAmDrawing = true; | |
lastMouseX = 0; lastMouseY = 0; | |
var a = speed * performance.now(); | |
var x = distance * Math.cos( a ); | |
var y = distance * Math.sin( a ); | |
stage.mousemove( { data: { global : { x: x, y: y } } } ) | |
} | |
function _animate() { | |
_update(); | |
setTimeout( _animate, 1000 ); | |
} | |
_animate(); |
Oh, I had it open already and haven't noticed that the URL was different, my bad! Thanks :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right, when starting from the main page.
The instructions say "go to https://lines.chromeexperiments.com/drag/", to skip the embed altogether.