Skip to content

Instantly share code, notes, and snippets.

@quantumpotato
Created December 11, 2015 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantumpotato/edc46fc77e97d696f88a to your computer and use it in GitHub Desktop.
Save quantumpotato/edc46fc77e97d696f88a to your computer and use it in GitHub Desktop.
Turbo
class TurboMover extends Component {
registrationNames() {
return ['velocity'];
}
getValue(name, hash) {
if (name == 'velocity') {
hash.vx = hash.vx * 20; //times speed
hash.vy = hash.vy * 20;
}
return hash;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment