dorukeker / gyronorm.js

JavaScript project for accessing and normalizing the accelerometer and gyroscope data on mobile devices
MIT License
640 stars 65 forks source link

Indentation/whitespace cleanup #5

Closed mordack closed 9 years ago

mordack commented 9 years ago

This PR replaces all tabs with 2-space indentation, which is common for most JS code. An .editorconfig file has been added, so that IDEs/editors such as sublime, atom, webstorm etc. can automatically switch to the correct indentation for this project. Constants that were defined but never used (GAME, WORLD, etc) are now used in the factory function to remove some duplication in the code. The constants are also exported on the GyroNorm constructor function, so they can be used without needing a GyroNorm instance. eg

before

console.log(new GyroNorm().WORLD);

after

console.log(GyroNorm.WORLD);