Comparing version 2.0.0 to 2.1.0
10
index.js
var getGL = require('webgl-context'); | ||
var debounce = require('debounce'); | ||
var addEvent = require('add-event-listener'); | ||
@@ -73,7 +75,9 @@ function CanvasApp(render, options) { | ||
if (!this._ignoreResize) { | ||
window.addEventListener("resize", function() { | ||
options.resizeDebounce = typeof options.resizeDebounce === 'number' | ||
? options.resizeDebounce : 50; | ||
addEvent(window, "resize", debounce(function() { | ||
this.resize(window.innerWidth, window.innerHeight); | ||
}.bind(this)); | ||
}.bind(this), options.resizeDebounce, false)); | ||
window.addEventListener("orientationchange", function() { | ||
addEvent(window, "orientationchange", function() { | ||
this.resize(window.innerWidth, window.innerHeight); | ||
@@ -80,0 +84,0 @@ }.bind(this)); |
{ | ||
"name": "canvas-app", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "sets up a retina-scaled canvas with render loop", | ||
@@ -9,2 +9,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"add-event-listener": "0.0.1", | ||
"debounce": "^1.0.0", | ||
"webgl-context": "^1.2.1" | ||
@@ -11,0 +13,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11514
164
3
+ Addedadd-event-listener@0.0.1
+ Addeddebounce@^1.0.0
+ Addedadd-event-listener@0.0.1(transitive)
+ Addeddebounce@1.2.1(transitive)