pixi-viewport
Advanced tools
Comparing version 0.7.6 to 0.7.7
{ | ||
"name": "pixi-viewport", | ||
"version": "0.7.6", | ||
"version": "0.7.7", | ||
"description": "A highly configurable viewport/2D camera designed to work with pixi.js. Featurse inclue dragging, pinch-to-zoom, decelerated dragging, following target, snapping to point, clamping, bouncing on edges.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -136,3 +136,3 @@ # pixi-viewport | ||
* change zoom so the width fits in the viewport | ||
* @param {number} [width=container.width] in world coordinates; uses container.width if not provided | ||
* @param {number} [width=this.worldWidth] in world coordinates | ||
* @param {boolean} [center] maintain the same center | ||
@@ -145,3 +145,3 @@ * @return {Viewport} this | ||
* change zoom so the height fits in the viewport | ||
* @param {number} [width=container.height] in world coordinates; uses container.width if not provided | ||
* @param {number} [height=this.worldHeight] in world coordinates | ||
* @param {boolean} [center] maintain the same center of the screen after zoom | ||
@@ -148,0 +148,0 @@ * @return {Viewport} this |
@@ -331,3 +331,3 @@ const Loop = require('yy-loop') | ||
* change zoom so the width fits in the viewport | ||
* @param {number} [width=container.width] in world coordinates; uses container.width if not provided | ||
* @param {number} [width=this.worldWidth] in world coordinates | ||
* @param {boolean} [center] maintain the same center | ||
@@ -343,3 +343,3 @@ * @return {Viewport} this | ||
} | ||
width = width || this.container.width | ||
width = width || this.worldWidth | ||
this.container.scale.x = this.screenWidth / width | ||
@@ -356,3 +356,3 @@ this.container.scale.y = this.container.scale.x | ||
* change zoom so the height fits in the viewport | ||
* @param {number} [width=container.height] in world coordinates; uses container.width if not provided | ||
* @param {number} [height=this.worldHeight] in world coordinates | ||
* @param {boolean} [center] maintain the same center of the screen after zoom | ||
@@ -368,3 +368,3 @@ * @return {Viewport} this | ||
} | ||
height = height || this.container.height | ||
height = height || this.worldHeight | ||
this.container.scale.y = this.screenHeight / height | ||
@@ -391,4 +391,4 @@ this.container.scale.x = this.container.scale.y | ||
} | ||
this.container.scale.x = this.screenWidth / this.container.width | ||
this.container.scale.y = this.screenHeight / this.container.height | ||
this.container.scale.x = this.screenWidth / this.worldWidth | ||
this.container.scale.y = this.screenHeight / this.worldHeight | ||
if (this.container.scale.x < this.container.scale.y) | ||
@@ -395,0 +395,0 @@ { |
Sorry, the diff of this file is too big to display
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
2401007