New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/canvas-prepare

Package Overview
Dependencies
Maintainers
3
Versions
121
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pixi/canvas-prepare - npm Package Compare versions

Comparing version 5.0.0-alpha.3 to 5.0.0-rc

22

lib/canvas-prepare.es.js
/*!
* @pixi/canvas-prepare - v5.0.0-alpha.3
* Compiled Tue, 03 Jul 2018 04:08:21 UTC
* @pixi/canvas-prepare - v5.0.0-rc
* Compiled Fri, 01 Feb 2019 04:50:10 UTC
*

@@ -14,8 +14,8 @@ * @pixi/canvas-prepare is licensed under the MIT License.

/**
* The prepare manager provides functionality to upload content to the GPU
* The prepare manager provides functionality to upload content to the GPU.
*
* This cannot be done directly for Canvas like in WebGL, but the effect can be achieved by drawing
* textures to an offline canvas.
* This draw call will force the texture to be moved onto the GPU.
* textures to an offline canvas. This draw call will force the texture to be moved onto the GPU.
*
* An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare
* An instance of this class is automatically created by default, and can be found at `renderer.plugins.prepare`
*

@@ -26,3 +26,3 @@ * @class

*/
var CanvasPrepare = (function (BasePrepare$$1) {
var CanvasPrepare = /*@__PURE__*/(function (BasePrepare$$1) {
function CanvasPrepare(renderer)

@@ -80,3 +80,3 @@ {

*/
function uploadBaseTextures(prepare$$1, item)
function uploadBaseTextures(prepare, item)
{

@@ -90,8 +90,8 @@ if (item instanceof BaseTexture)

// Otherwise use whatever is smaller, the image dimensions or the canvas dimensions.
var imageWidth = image.width === 0 ? prepare$$1.canvas.width : Math.min(prepare$$1.canvas.width, image.width);
var imageHeight = image.height === 0 ? prepare$$1.canvas.height : Math.min(prepare$$1.canvas.height, image.height);
var imageWidth = image.width === 0 ? prepare.canvas.width : Math.min(prepare.canvas.width, image.width);
var imageHeight = image.height === 0 ? prepare.canvas.height : Math.min(prepare.canvas.height, image.height);
// Only a small subsections is required to be drawn to have the whole texture uploaded to the GPU
// A smaller draw can be faster.
prepare$$1.ctx.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, prepare$$1.canvas.width, prepare$$1.canvas.height);
prepare.ctx.drawImage(image, 0, 0, imageWidth, imageHeight, 0, 0, prepare.canvas.width, prepare.canvas.height);

@@ -98,0 +98,0 @@ return true;

/*!
* @pixi/canvas-prepare - v5.0.0-alpha.3
* Compiled Tue, 03 Jul 2018 04:08:21 UTC
* @pixi/canvas-prepare - v5.0.0-rc
* Compiled Fri, 01 Feb 2019 04:50:10 UTC
*

@@ -18,8 +18,8 @@ * @pixi/canvas-prepare is licensed under the MIT License.

/**
* The prepare manager provides functionality to upload content to the GPU
* The prepare manager provides functionality to upload content to the GPU.
*
* This cannot be done directly for Canvas like in WebGL, but the effect can be achieved by drawing
* textures to an offline canvas.
* This draw call will force the texture to be moved onto the GPU.
* textures to an offline canvas. This draw call will force the texture to be moved onto the GPU.
*
* An instance of this class is automatically created by default, and can be found at renderer.plugins.prepare
* An instance of this class is automatically created by default, and can be found at `renderer.plugins.prepare`
*

@@ -30,6 +30,6 @@ * @class

*/
var CanvasPrepare = (function (BasePrepare$$1) {
var CanvasPrepare = /*@__PURE__*/(function (BasePrepare) {
function CanvasPrepare(renderer)
{
BasePrepare$$1.call(this, renderer);
BasePrepare.call(this, renderer);

@@ -58,4 +58,4 @@ this.uploadHookHelper = this;

if ( BasePrepare$$1 ) CanvasPrepare.__proto__ = BasePrepare$$1;
CanvasPrepare.prototype = Object.create( BasePrepare$$1 && BasePrepare$$1.prototype );
if ( BasePrepare ) CanvasPrepare.__proto__ = BasePrepare;
CanvasPrepare.prototype = Object.create( BasePrepare && BasePrepare.prototype );
CanvasPrepare.prototype.constructor = CanvasPrepare;

@@ -69,3 +69,3 @@

{
BasePrepare$$1.prototype.destroy.call(this);
BasePrepare.prototype.destroy.call(this);
this.ctx = null;

@@ -72,0 +72,0 @@ this.canvas = null;

{
"name": "@pixi/canvas-prepare",
"version": "5.0.0-alpha.3",
"version": "5.0.0-rc",
"main": "lib/canvas-prepare.js",
"module": "lib/canvas-prepare.es.js",
"description": "PixiJS Application",
"description": "Canvas mixin for the prepare package",
"author": "Mat Groves",

@@ -25,9 +25,10 @@ "contributors": [

"dependencies": {
"@pixi/canvas-renderer": "^5.0.0-alpha.3",
"@pixi/core": "^5.0.0-alpha.3",
"@pixi/prepare": "^5.0.0-alpha.3"
"@pixi/canvas-renderer": "^5.0.0-rc",
"@pixi/core": "^5.0.0-rc",
"@pixi/prepare": "^5.0.0-rc"
},
"devDependencies": {
"floss": "^2.1.3"
}
"floss": "^2.1.5"
},
"gitHead": "9026a1bbca9a9d86b7a3b6d5eb4fa2c3145c2b85"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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