0.1.6 • Published 10 years ago

nylira-maximize v0.1.6

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

nylira-maximize

nylira-maximize is a simple function that maximizes the specified DOM element to your preferred aspect ratio.

Use it

Install with NPM:

$ npm install nylira-maximize

Example usage:

var maximize = require('nylira-maximize')
var gameCanvas = document.getElementById('gameCanvas')

maximize(gameCanvas, 1920, 1080)

This example will resize the #gameCanvas element to fill the screen horizontally. It will also keep the 16:9 aspect ratio.

The 1920, 1080 parameters are WIDTH and HEIGHT respectively. The function uses WIDTH and HEIGHT to get your aspect ratio.

License

MIT

0.1.6

10 years ago

1.0.5

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago