Socket
Socket
Sign inDemoInstall

pixi-viewport

Package Overview
Dependencies
Maintainers
1
Versions
243
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pixi-viewport - npm Package Compare versions

Comparing version 0.7.6 to 0.7.7

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc