Automatically generate beautiful animated star fields and warp fields on HTML5 Canvas elements.
let cvs = document.getElementById('canvas');
let starField = new Azimuth();
starField.init(cvs, {
starConfigs: {
renderSize: 100,
minStars: 1,
maxStars: 8
},
warpConfigs: {
renderSize: 10,
minEntities: 5,
maxEntities: 10
}
});
// Listen for window resizing events with a debounce method, then reset Azimuth accordingly
$( window ).resize( debounce(function() {
if (starField) {
starField.reset();
})
);
Example of debounce function available in Underscore.js .
- My personal website: http://dleng.xyz
- Clone the repository.
- Change directory into repository root, run
npm init
- After npm packages install successfully, you are ready to start developing Azimuth. See Deployment section below for details on generating minified copy.
- See list of Github tasks for development.
Tests are currently being written and will be updated in the repository soon.
To produce a minified copy of Azimuth, run gulp build
. The file will be created in dist/js
The source code is written in ES6 syntax, and transpiled into ES5 using Babel via Gulp. (See gulpfile.js)
- Daniel Leng - Initial work - dleng.xyz
This project is licensed under the MIT License - see the LICENSE.md file for details
- Simple Javascript Easing Functions - by Gaëtan Renaudeau