Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pixi/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/prepare - npm Package Compare versions

Comparing version 5.0.0-alpha.3 to 5.0.0-rc

79

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

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

*/
import { BaseTexture, Texture } from '@pixi/core';
import { settings } from '@pixi/settings';
import { Texture, BaseTexture } from '@pixi/core';
import { Graphics } from '@pixi/graphics';
import { Ticker, UPDATE_PRIORITY } from '@pixi/ticker';
import { settings as settings$1 } from '@pixi/settings';
import { Container } from '@pixi/display';
import { Text, TextMetrics, TextStyle } from '@pixi/text';
import { Text, TextStyle, TextMetrics } from '@pixi/text';
/**
* Default number of uploads per frame using prepare plugin.
*
* @static
* @memberof PIXI.settings
* @name UPLOADS_PER_FRAME
* @type {number}
* @default 4
*/
settings.UPLOADS_PER_FRAME = 4;
/**
* CountLimiter limits the number of items handled by a {@link PIXI.prepare.BasePrepare} to a specified

@@ -21,3 +32,3 @@ * number of items per frame.

* @class
* @memberof PIXI
* @memberof PIXI.prepare
*/

@@ -28,2 +39,3 @@ var CountLimiter = function CountLimiter(maxItemsPerFrame)

* The maximum number of items that can be prepared each frame.
* @type {number}
* @private

@@ -58,15 +70,6 @@ */

/**
* Default number of uploads per frame using prepare plugin.
* The prepare manager provides functionality to upload content to the GPU.
*
* @static
* @memberof PIXI.settings
* @name UPLOADS_PER_FRAME
* @type {number}
* @default 4
*/
settings$1.UPLOADS_PER_FRAME = 4;
/**
* The prepare manager provides functionality to upload content to the GPU. BasePrepare handles
* basic queuing functionality and is extended by {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare}
* BasePrepare handles basic queuing functionality and is extended by
* {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare}
* to provide preparation capabilities specific to their respective renderers.

@@ -98,3 +101,3 @@ *

*/
this.limiter = new CountLimiter(settings$1.UPLOADS_PER_FRAME);
this.limiter = new CountLimiter(settings.UPLOADS_PER_FRAME);

@@ -211,3 +214,3 @@ /**

this.ticking = true;
Ticker.shared.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
}

@@ -239,4 +242,2 @@ }

{
var this$1 = this;
this.limiter.beginFrame();

@@ -246,3 +247,3 @@ // Upload the graphics

{
var item = this$1.queue[0];
var item = this.queue[0];
var uploaded = false;

@@ -254,5 +255,5 @@

{
if (this$1.uploadHooks[i](this$1.uploadHookHelper, item))
if (this.uploadHooks[i](this.uploadHookHelper, item))
{
this$1.queue.shift();
this.queue.shift();
uploaded = true;

@@ -266,3 +267,3 @@ break;

{
this$1.queue.shift();
this.queue.shift();
}

@@ -288,3 +289,3 @@ }

// if we are not finished, on the next rAF do this again
Ticker.shared.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
Ticker.system.addOnce(this.tick, this, UPDATE_PRIORITY.UTILITY);
}

@@ -298,3 +299,3 @@ };

* function must return `true` if it was able to add item to the queue.
* @return {PIXI.BasePrepare} Instance of plugin for chaining.
* @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
*/

@@ -316,3 +317,3 @@ BasePrepare.prototype.registerFindHook = function registerFindHook (addHook)

* function must return `true` if it was able to handle upload of item.
* @return {PIXI.BasePrepare} Instance of plugin for chaining.
* @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
*/

@@ -334,8 +335,6 @@ BasePrepare.prototype.registerUploadHook = function registerUploadHook (uploadHook)

* add to the queue
* @return {PIXI.CanvasPrepare} Instance of plugin for chaining.
* @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
*/
BasePrepare.prototype.add = function add (item)
{
var this$1 = this;
// Add additional hooks for finding elements on special

@@ -345,3 +344,3 @@ // types of objects that

{
if (this$1.addHooks[i](item, this$1.queue))
if (this.addHooks[i](item, this.queue))
{

@@ -357,3 +356,3 @@ break;

{
this$1.add(item.children[i$1]);
this.add(item.children[i$1]);
}

@@ -373,3 +372,3 @@ }

{
Ticker.shared.remove(this.tick, this);
Ticker.system.remove(this.tick, this);
}

@@ -573,3 +572,3 @@ this.ticking = false;

*
* 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`
*

@@ -580,3 +579,3 @@ * @class

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

@@ -600,3 +599,2 @@ {

}(BasePrepare));
/**

@@ -678,3 +676,3 @@ * Built-in hook to upload PIXI.Texture objects to the GPU.

* @class
* @memberof PIXI
* @memberof PIXI.prepare
*/

@@ -685,2 +683,3 @@ var TimeLimiter = function TimeLimiter(maxMilliseconds)

* The maximum milliseconds that can be spent preparing items each frame.
* @type {number}
* @private

@@ -716,3 +715,3 @@ */

* The prepare namespace provides renderer-specific plugins for pre-rendering DisplayObjects. These plugins are useful for
* asynchronously preparing assets, textures, graphics waiting to be displayed.
* asynchronously preparing and uploading to the GPU assets, textures, graphics waiting to be displayed.
*

@@ -719,0 +718,0 @@ * Do not instantiate these plugins directly. It is available from the `renderer.plugins` property.

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

@@ -12,6 +12,6 @@ * @pixi/prepare is licensed under the MIT License.

var settings = require('@pixi/settings');
var core = require('@pixi/core');
var graphics = require('@pixi/graphics');
var ticker = require('@pixi/ticker');
var settings = require('@pixi/settings');
var display = require('@pixi/display');

@@ -21,2 +21,13 @@ var text = require('@pixi/text');

/**
* Default number of uploads per frame using prepare plugin.
*
* @static
* @memberof PIXI.settings
* @name UPLOADS_PER_FRAME
* @type {number}
* @default 4
*/
settings.settings.UPLOADS_PER_FRAME = 4;
/**
* CountLimiter limits the number of items handled by a {@link PIXI.prepare.BasePrepare} to a specified

@@ -26,3 +37,3 @@ * number of items per frame.

* @class
* @memberof PIXI
* @memberof PIXI.prepare
*/

@@ -33,2 +44,3 @@ var CountLimiter = function CountLimiter(maxItemsPerFrame)

* The maximum number of items that can be prepared each frame.
* @type {number}
* @private

@@ -63,15 +75,6 @@ */

/**
* Default number of uploads per frame using prepare plugin.
* The prepare manager provides functionality to upload content to the GPU.
*
* @static
* @memberof PIXI.settings
* @name UPLOADS_PER_FRAME
* @type {number}
* @default 4
*/
settings.settings.UPLOADS_PER_FRAME = 4;
/**
* The prepare manager provides functionality to upload content to the GPU. BasePrepare handles
* basic queuing functionality and is extended by {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare}
* BasePrepare handles basic queuing functionality and is extended by
* {@link PIXI.prepare.WebGLPrepare} and {@link PIXI.prepare.CanvasPrepare}
* to provide preparation capabilities specific to their respective renderers.

@@ -215,3 +218,3 @@ *

this.ticking = true;
ticker.Ticker.shared.addOnce(this.tick, this, ticker.UPDATE_PRIORITY.UTILITY);
ticker.Ticker.system.addOnce(this.tick, this, ticker.UPDATE_PRIORITY.UTILITY);
}

@@ -243,4 +246,2 @@ }

{
var this$1 = this;
this.limiter.beginFrame();

@@ -250,3 +251,3 @@ // Upload the graphics

{
var item = this$1.queue[0];
var item = this.queue[0];
var uploaded = false;

@@ -258,5 +259,5 @@

{
if (this$1.uploadHooks[i](this$1.uploadHookHelper, item))
if (this.uploadHooks[i](this.uploadHookHelper, item))
{
this$1.queue.shift();
this.queue.shift();
uploaded = true;

@@ -270,3 +271,3 @@ break;

{
this$1.queue.shift();
this.queue.shift();
}

@@ -292,3 +293,3 @@ }

// if we are not finished, on the next rAF do this again
ticker.Ticker.shared.addOnce(this.tick, this, ticker.UPDATE_PRIORITY.UTILITY);
ticker.Ticker.system.addOnce(this.tick, this, ticker.UPDATE_PRIORITY.UTILITY);
}

@@ -302,3 +303,3 @@ };

* function must return `true` if it was able to add item to the queue.
* @return {PIXI.BasePrepare} Instance of plugin for chaining.
* @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
*/

@@ -320,3 +321,3 @@ BasePrepare.prototype.registerFindHook = function registerFindHook (addHook)

* function must return `true` if it was able to handle upload of item.
* @return {PIXI.BasePrepare} Instance of plugin for chaining.
* @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
*/

@@ -338,8 +339,6 @@ BasePrepare.prototype.registerUploadHook = function registerUploadHook (uploadHook)

* add to the queue
* @return {PIXI.CanvasPrepare} Instance of plugin for chaining.
* @return {PIXI.prepare.BasePrepare} Instance of plugin for chaining.
*/
BasePrepare.prototype.add = function add (item)
{
var this$1 = this;
// Add additional hooks for finding elements on special

@@ -349,3 +348,3 @@ // types of objects that

{
if (this$1.addHooks[i](item, this$1.queue))
if (this.addHooks[i](item, this.queue))
{

@@ -361,3 +360,3 @@ break;

{
this$1.add(item.children[i$1]);
this.add(item.children[i$1]);
}

@@ -377,3 +376,3 @@ }

{
ticker.Ticker.shared.remove(this.tick, this);
ticker.Ticker.system.remove(this.tick, this);
}

@@ -577,3 +576,3 @@ this.ticking = false;

*
* 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`
*

@@ -584,3 +583,3 @@ * @class

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

@@ -604,3 +603,2 @@ {

}(BasePrepare));
/**

@@ -682,3 +680,3 @@ * Built-in hook to upload PIXI.Texture objects to the GPU.

* @class
* @memberof PIXI
* @memberof PIXI.prepare
*/

@@ -689,2 +687,3 @@ var TimeLimiter = function TimeLimiter(maxMilliseconds)

* The maximum milliseconds that can be spent preparing items each frame.
* @type {number}
* @private

@@ -720,3 +719,3 @@ */

* The prepare namespace provides renderer-specific plugins for pre-rendering DisplayObjects. These plugins are useful for
* asynchronously preparing assets, textures, graphics waiting to be displayed.
* asynchronously preparing and uploading to the GPU assets, textures, graphics waiting to be displayed.
*

@@ -723,0 +722,0 @@ * Do not instantiate these plugins directly. It is available from the `renderer.plugins` property.

{
"name": "@pixi/prepare",
"version": "5.0.0-alpha.3",
"version": "5.0.0-rc",
"main": "lib/prepare.js",
"module": "lib/prepare.es.js",
"description": "Support for legacy browser JavaScript environments",
"description": "Plugin to allow uploading textures to the GPU",
"author": "Mat Groves",

@@ -28,13 +28,14 @@ "contributors": [

"dependencies": {
"@pixi/canvas-renderer": "^5.0.0-alpha.3",
"@pixi/core": "^5.0.0-alpha.3",
"@pixi/display": "^5.0.0-alpha.3",
"@pixi/graphics": "^5.0.0-alpha.3",
"@pixi/settings": "^5.0.0-alpha.3",
"@pixi/text": "^5.0.0-alpha.3",
"@pixi/ticker": "^5.0.0-alpha.3"
"@pixi/canvas-renderer": "^5.0.0-rc",
"@pixi/core": "^5.0.0-rc",
"@pixi/display": "^5.0.0-rc",
"@pixi/graphics": "^5.0.0-rc",
"@pixi/settings": "^5.0.0-rc",
"@pixi/text": "^5.0.0-rc",
"@pixi/ticker": "^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