@pixi/app
Advanced tools
Comparing version 6.4.2 to 6.5.0-rc
/*! | ||
* @pixi/app - v6.4.2 | ||
* Compiled Thu, 02 Jun 2022 15:39:26 UTC | ||
* @pixi/app - v6.5.0-rc | ||
* Compiled Thu, 14 Jul 2022 18:30:46 UTC | ||
* | ||
@@ -9,6 +9,121 @@ * @pixi/app is licensed under the MIT License. | ||
this.PIXI = this.PIXI || {}; | ||
var _pixi_app = (function (exports, display, core) { | ||
var _pixi_app = (function (exports, core, display, utils) { | ||
'use strict'; | ||
/** | ||
* Middleware for for Application's resize functionality | ||
* @private | ||
* @class | ||
*/ | ||
var ResizePlugin = /** @class */ (function () { | ||
function ResizePlugin() { | ||
} | ||
/** | ||
* Initialize the plugin with scope of application instance | ||
* @static | ||
* @private | ||
* @param {object} [options] - See application options | ||
*/ | ||
ResizePlugin.init = function (options) { | ||
var _this = this; | ||
Object.defineProperty(this, 'resizeTo', | ||
/** | ||
* The HTML element or window to automatically resize the | ||
* renderer's view element to match width and height. | ||
* @member {Window|HTMLElement} | ||
* @name resizeTo | ||
* @memberof PIXI.Application# | ||
*/ | ||
{ | ||
set: function (dom) { | ||
globalThis.removeEventListener('resize', this.queueResize); | ||
this._resizeTo = dom; | ||
if (dom) { | ||
globalThis.addEventListener('resize', this.queueResize); | ||
this.resize(); | ||
} | ||
}, | ||
get: function () { | ||
return this._resizeTo; | ||
}, | ||
}); | ||
/** | ||
* Resize is throttled, so it's safe to call this multiple times per frame and it'll | ||
* only be called once. | ||
* @memberof PIXI.Application# | ||
* @method queueResize | ||
* @private | ||
*/ | ||
this.queueResize = function () { | ||
if (!_this._resizeTo) { | ||
return; | ||
} | ||
_this.cancelResize(); | ||
// // Throttle resize events per raf | ||
_this._resizeId = requestAnimationFrame(function () { return _this.resize(); }); | ||
}; | ||
/** | ||
* Cancel the resize queue. | ||
* @memberof PIXI.Application# | ||
* @method cancelResize | ||
* @private | ||
*/ | ||
this.cancelResize = function () { | ||
if (_this._resizeId) { | ||
cancelAnimationFrame(_this._resizeId); | ||
_this._resizeId = null; | ||
} | ||
}; | ||
/** | ||
* Execute an immediate resize on the renderer, this is not | ||
* throttled and can be expensive to call many times in a row. | ||
* Will resize only if `resizeTo` property is set. | ||
* @memberof PIXI.Application# | ||
* @method resize | ||
*/ | ||
this.resize = function () { | ||
if (!_this._resizeTo) { | ||
return; | ||
} | ||
// clear queue resize | ||
_this.cancelResize(); | ||
var width; | ||
var height; | ||
// Resize to the window | ||
if (_this._resizeTo === globalThis.window) { | ||
width = globalThis.innerWidth; | ||
height = globalThis.innerHeight; | ||
} | ||
// Resize to other HTML entities | ||
else { | ||
var _a = _this._resizeTo, clientWidth = _a.clientWidth, clientHeight = _a.clientHeight; | ||
width = clientWidth; | ||
height = clientHeight; | ||
} | ||
_this.renderer.resize(width, height); | ||
}; | ||
// On resize | ||
this._resizeId = null; | ||
this._resizeTo = null; | ||
this.resizeTo = options.resizeTo || null; | ||
}; | ||
/** | ||
* Clean up the ticker, scoped to application | ||
* @static | ||
* @private | ||
*/ | ||
ResizePlugin.destroy = function () { | ||
globalThis.removeEventListener('resize', this.queueResize); | ||
this.cancelResize(); | ||
this.cancelResize = null; | ||
this.queueResize = null; | ||
this.resizeTo = null; | ||
this.resize = null; | ||
}; | ||
/** @ignore */ | ||
ResizePlugin.extension = core.ExtensionType.Application; | ||
return ResizePlugin; | ||
}()); | ||
/** | ||
* Convenience class to create a new PIXI application. | ||
@@ -81,3 +196,4 @@ * | ||
/** | ||
* Register a middleware plugin for the application | ||
* Use the {@link PIXI.extensions.add} API to register plugins. | ||
* @deprecated since 6.5.0 | ||
* @static | ||
@@ -87,3 +203,7 @@ * @param {PIXI.IApplicationPlugin} plugin - Plugin being installed | ||
Application.registerPlugin = function (plugin) { | ||
Application._plugins.push(plugin); | ||
utils.deprecation('6.5.0', 'Application.registerPlugin() is deprecated, use extensions.add()'); | ||
core.extensions.add({ | ||
type: core.ExtensionType.Application, | ||
ref: plugin, | ||
}); | ||
}; | ||
@@ -148,119 +268,8 @@ /** Render the current stage. */ | ||
}()); | ||
core.extensions.handleByList(core.ExtensionType.Application, Application._plugins); | ||
/** | ||
* Middleware for for Application's resize functionality | ||
* @private | ||
* @class | ||
*/ | ||
var ResizePlugin = /** @class */ (function () { | ||
function ResizePlugin() { | ||
} | ||
/** | ||
* Initialize the plugin with scope of application instance | ||
* @static | ||
* @private | ||
* @param {object} [options] - See application options | ||
*/ | ||
ResizePlugin.init = function (options) { | ||
var _this = this; | ||
Object.defineProperty(this, 'resizeTo', | ||
/** | ||
* The HTML element or window to automatically resize the | ||
* renderer's view element to match width and height. | ||
* @member {Window|HTMLElement} | ||
* @name resizeTo | ||
* @memberof PIXI.Application# | ||
*/ | ||
{ | ||
set: function (dom) { | ||
globalThis.removeEventListener('resize', this.queueResize); | ||
this._resizeTo = dom; | ||
if (dom) { | ||
globalThis.addEventListener('resize', this.queueResize); | ||
this.resize(); | ||
} | ||
}, | ||
get: function () { | ||
return this._resizeTo; | ||
}, | ||
}); | ||
/** | ||
* Resize is throttled, so it's safe to call this multiple times per frame and it'll | ||
* only be called once. | ||
* @memberof PIXI.Application# | ||
* @method queueResize | ||
* @private | ||
*/ | ||
this.queueResize = function () { | ||
if (!_this._resizeTo) { | ||
return; | ||
} | ||
_this.cancelResize(); | ||
// // Throttle resize events per raf | ||
_this._resizeId = requestAnimationFrame(function () { return _this.resize(); }); | ||
}; | ||
/** | ||
* Cancel the resize queue. | ||
* @memberof PIXI.Application# | ||
* @method cancelResize | ||
* @private | ||
*/ | ||
this.cancelResize = function () { | ||
if (_this._resizeId) { | ||
cancelAnimationFrame(_this._resizeId); | ||
_this._resizeId = null; | ||
} | ||
}; | ||
/** | ||
* Execute an immediate resize on the renderer, this is not | ||
* throttled and can be expensive to call many times in a row. | ||
* Will resize only if `resizeTo` property is set. | ||
* @memberof PIXI.Application# | ||
* @method resize | ||
*/ | ||
this.resize = function () { | ||
if (!_this._resizeTo) { | ||
return; | ||
} | ||
// clear queue resize | ||
_this.cancelResize(); | ||
var width; | ||
var height; | ||
// Resize to the window | ||
if (_this._resizeTo === globalThis.window) { | ||
width = globalThis.innerWidth; | ||
height = globalThis.innerHeight; | ||
} | ||
// Resize to other HTML entities | ||
else { | ||
var _a = _this._resizeTo, clientWidth = _a.clientWidth, clientHeight = _a.clientHeight; | ||
width = clientWidth; | ||
height = clientHeight; | ||
} | ||
_this.renderer.resize(width, height); | ||
}; | ||
// On resize | ||
this._resizeId = null; | ||
this._resizeTo = null; | ||
this.resizeTo = options.resizeTo || null; | ||
}; | ||
/** | ||
* Clean up the ticker, scoped to application | ||
* @static | ||
* @private | ||
*/ | ||
ResizePlugin.destroy = function () { | ||
globalThis.removeEventListener('resize', this.queueResize); | ||
this.cancelResize(); | ||
this.cancelResize = null; | ||
this.queueResize = null; | ||
this.resizeTo = null; | ||
this.resize = null; | ||
}; | ||
return ResizePlugin; | ||
}()); | ||
core.extensions.add(ResizePlugin); | ||
Application.registerPlugin(ResizePlugin); | ||
exports.Application = Application; | ||
exports.ResizePlugin = ResizePlugin; | ||
@@ -271,4 +280,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
})({}, PIXI, PIXI); | ||
})({}, PIXI, PIXI, PIXI.utils); | ||
Object.assign(this.PIXI, _pixi_app); | ||
//# sourceMappingURL=app.js.map |
/*! | ||
* @pixi/app - v6.4.2 | ||
* Compiled Thu, 02 Jun 2022 15:39:26 UTC | ||
* @pixi/app - v6.5.0-rc | ||
* Compiled Thu, 14 Jul 2022 18:30:46 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/app is licensed under the MIT License. | ||
*/ | ||
this.PIXI=this.PIXI||{};var _pixi_app=function(e,i,t){"use strict";var r=function(){function e(r){var n=this;this.stage=new i.Container,r=Object.assign({forceCanvas:!1},r),this.renderer=t.autoDetectRenderer(r),e._plugins.forEach((function(e){e.init.call(n,r)}))}return e.registerPlugin=function(i){e._plugins.push(i)},e.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(e.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),e.prototype.destroy=function(i,t){var r=this,n=e._plugins.slice(0);n.reverse(),n.forEach((function(e){e.destroy.call(r)})),this.stage.destroy(t),this.stage=null,this.renderer.destroy(i),this.renderer=null},e._plugins=[],e}(),n=function(){function e(){}return e.init=function(e){var i=this;Object.defineProperty(this,"resizeTo",{set:function(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){i._resizeTo&&(i.cancelResize(),i._resizeId=requestAnimationFrame((function(){return i.resize()})))},this.cancelResize=function(){i._resizeId&&(cancelAnimationFrame(i._resizeId),i._resizeId=null)},this.resize=function(){if(i._resizeTo){var e,t;if(i.cancelResize(),i._resizeTo===globalThis.window)e=globalThis.innerWidth,t=globalThis.innerHeight;else{var r=i._resizeTo;e=r.clientWidth,t=r.clientHeight}i.renderer.resize(e,t)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},e.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},e}();return r.registerPlugin(n),e.Application=r,Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI,PIXI);Object.assign(this.PIXI,_pixi_app); | ||
this.PIXI=this.PIXI||{};var _pixi_app=function(e,i,n){"use strict";var t=function(){function e(){}return e.init=function(e){var i=this;Object.defineProperty(this,"resizeTo",{set:function(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){i._resizeTo&&(i.cancelResize(),i._resizeId=requestAnimationFrame((function(){return i.resize()})))},this.cancelResize=function(){i._resizeId&&(cancelAnimationFrame(i._resizeId),i._resizeId=null)},this.resize=function(){if(i._resizeTo){var e,n;if(i.cancelResize(),i._resizeTo===globalThis.window)e=globalThis.innerWidth,n=globalThis.innerHeight;else{var t=i._resizeTo;e=t.clientWidth,n=t.clientHeight}i.renderer.resize(e,n)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},e.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},e.extension=i.ExtensionType.Application,e}(),s=function(){function e(t){var s=this;this.stage=new n.Container,t=Object.assign({forceCanvas:!1},t),this.renderer=i.autoDetectRenderer(t),e._plugins.forEach((function(e){e.init.call(s,t)}))}return e.registerPlugin=function(e){i.extensions.add({type:i.ExtensionType.Application,ref:e})},e.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(e.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),e.prototype.destroy=function(i,n){var t=this,s=e._plugins.slice(0);s.reverse(),s.forEach((function(e){e.destroy.call(t)})),this.stage.destroy(n),this.stage=null,this.renderer.destroy(i),this.renderer=null},e._plugins=[],e}();return i.extensions.handleByList(i.ExtensionType.Application,s._plugins),i.extensions.add(t),e.Application=s,e.ResizePlugin=t,Object.defineProperty(e,"__esModule",{value:!0}),e}({},PIXI,PIXI);Object.assign(this.PIXI,_pixi_app); | ||
//# sourceMappingURL=app.min.js.map |
/*! | ||
* @pixi/app - v6.4.2 | ||
* Compiled Thu, 02 Jun 2022 15:39:26 UTC | ||
* @pixi/app - v6.5.0-rc | ||
* Compiled Thu, 14 Jul 2022 18:30:46 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/app is licensed under the MIT License. | ||
*/ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@pixi/display"),i=require("@pixi/core"),r=function(){function r(t){var n=this;this.stage=new e.Container,t=Object.assign({forceCanvas:!1},t),this.renderer=i.autoDetectRenderer(t),r._plugins.forEach((function(e){e.init.call(n,t)}))}return r.registerPlugin=function(e){r._plugins.push(e)},r.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(r.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),r.prototype.destroy=function(e,i){var t=this,n=r._plugins.slice(0);n.reverse(),n.forEach((function(e){e.destroy.call(t)})),this.stage.destroy(i),this.stage=null,this.renderer.destroy(e),this.renderer=null},r._plugins=[],r}(),t=function(){function e(){}return e.init=function(e){var i=this;Object.defineProperty(this,"resizeTo",{set:function(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){i._resizeTo&&(i.cancelResize(),i._resizeId=requestAnimationFrame((function(){return i.resize()})))},this.cancelResize=function(){i._resizeId&&(cancelAnimationFrame(i._resizeId),i._resizeId=null)},this.resize=function(){if(i._resizeTo){var e,r;if(i.cancelResize(),i._resizeTo===globalThis.window)e=globalThis.innerWidth,r=globalThis.innerHeight;else{var t=i._resizeTo;e=t.clientWidth,r=t.clientHeight}i.renderer.resize(e,r)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},e.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},e}();r.registerPlugin(t),exports.Application=r; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@pixi/core"),i=require("@pixi/display"),n=function(){function i(){}return i.init=function(e){var i=this;Object.defineProperty(this,"resizeTo",{set:function(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){i._resizeTo&&(i.cancelResize(),i._resizeId=requestAnimationFrame((function(){return i.resize()})))},this.cancelResize=function(){i._resizeId&&(cancelAnimationFrame(i._resizeId),i._resizeId=null)},this.resize=function(){if(i._resizeTo){var e,n;if(i.cancelResize(),i._resizeTo===globalThis.window)e=globalThis.innerWidth,n=globalThis.innerHeight;else{var t=i._resizeTo;e=t.clientWidth,n=t.clientHeight}i.renderer.resize(e,n)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},i.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},i.extension=e.ExtensionType.Application,i}(),t=function(){function n(t){var r=this;this.stage=new i.Container,t=Object.assign({forceCanvas:!1},t),this.renderer=e.autoDetectRenderer(t),n._plugins.forEach((function(e){e.init.call(r,t)}))}return n.registerPlugin=function(i){e.extensions.add({type:e.ExtensionType.Application,ref:i})},n.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(n.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),n.prototype.destroy=function(e,i){var t=this,r=n._plugins.slice(0);r.reverse(),r.forEach((function(e){e.destroy.call(t)})),this.stage.destroy(i),this.stage=null,this.renderer.destroy(e),this.renderer=null},n._plugins=[],n}();e.extensions.handleByList(e.ExtensionType.Application,t._plugins),e.extensions.add(n),exports.Application=t,exports.ResizePlugin=n; | ||
//# sourceMappingURL=app.min.js.map |
/*! | ||
* @pixi/app - v6.4.2 | ||
* Compiled Thu, 02 Jun 2022 15:39:26 UTC | ||
* @pixi/app - v6.5.0-rc | ||
* Compiled Thu, 14 Jul 2022 18:30:46 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/app is licensed under the MIT License. | ||
*/ | ||
import{Container as e}from"@pixi/display";import{autoDetectRenderer as i}from"@pixi/core";var r=function(){function r(n){var t=this;this.stage=new e,n=Object.assign({forceCanvas:!1},n),this.renderer=i(n),r._plugins.forEach((function(e){e.init.call(t,n)}))}return r.registerPlugin=function(e){r._plugins.push(e)},r.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(r.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),r.prototype.destroy=function(e,i){var n=this,t=r._plugins.slice(0);t.reverse(),t.forEach((function(e){e.destroy.call(n)})),this.stage.destroy(i),this.stage=null,this.renderer.destroy(e),this.renderer=null},r._plugins=[],r}(),n=function(){function e(){}return e.init=function(e){var i=this;Object.defineProperty(this,"resizeTo",{set:function(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){i._resizeTo&&(i.cancelResize(),i._resizeId=requestAnimationFrame((function(){return i.resize()})))},this.cancelResize=function(){i._resizeId&&(cancelAnimationFrame(i._resizeId),i._resizeId=null)},this.resize=function(){if(i._resizeTo){var e,r;if(i.cancelResize(),i._resizeTo===globalThis.window)e=globalThis.innerWidth,r=globalThis.innerHeight;else{var n=i._resizeTo;e=n.clientWidth,r=n.clientHeight}i.renderer.resize(e,r)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},e.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},e}();r.registerPlugin(n);export{r as Application}; | ||
import{ExtensionType as e,extensions as i,autoDetectRenderer as r}from"@pixi/core";import{Container as n}from"@pixi/display";var t=function(){function i(){}return i.init=function(e){var i=this;Object.defineProperty(this,"resizeTo",{set:function(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){i._resizeTo&&(i.cancelResize(),i._resizeId=requestAnimationFrame((function(){return i.resize()})))},this.cancelResize=function(){i._resizeId&&(cancelAnimationFrame(i._resizeId),i._resizeId=null)},this.resize=function(){if(i._resizeTo){var e,r;if(i.cancelResize(),i._resizeTo===globalThis.window)e=globalThis.innerWidth,r=globalThis.innerHeight;else{var n=i._resizeTo;e=n.clientWidth,r=n.clientHeight}i.renderer.resize(e,r)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null},i.destroy=function(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},i.extension=e.Application,i}(),s=function(){function t(e){var i=this;this.stage=new n,e=Object.assign({forceCanvas:!1},e),this.renderer=r(e),t._plugins.forEach((function(r){r.init.call(i,e)}))}return t.registerPlugin=function(r){i.add({type:e.Application,ref:r})},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,i){var r=this,n=t._plugins.slice(0);n.reverse(),n.forEach((function(e){e.destroy.call(r)})),this.stage.destroy(i),this.stage=null,this.renderer.destroy(e),this.renderer=null},t._plugins=[],t}();i.handleByList(e.Application,s._plugins),i.add(t);export{s as Application,t as ResizePlugin}; | ||
//# sourceMappingURL=app.min.js.map |
/// <reference path="./global.d.ts" /> | ||
import type { AbstractRenderer } from '@pixi/core'; | ||
import type { CanvasRenderer } from '@pixi/canvas-renderer'; | ||
import { Container } from '@pixi/display'; | ||
import type { ExtensionMetadata } from '@pixi/core'; | ||
import type { IDestroyOptions } from '@pixi/display'; | ||
@@ -31,3 +33,3 @@ import type { IRendererOptionsAuto } from '@pixi/core'; | ||
/** Collection of installed plugins. */ | ||
private static _plugins; | ||
static _plugins: IApplicationPlugin[]; | ||
/** | ||
@@ -78,3 +80,4 @@ * The root display container that's rendered. | ||
/** | ||
* Register a middleware plugin for the application | ||
* Use the {@link PIXI.extensions.add} API to register plugins. | ||
* @deprecated since 6.5.0 | ||
* @static | ||
@@ -119,3 +122,2 @@ * @param {PIXI.IApplicationPlugin} plugin - Plugin being installed | ||
* @memberof PIXI | ||
* @see {@link PIXI.Application.registerPlugin} | ||
*/ | ||
@@ -133,2 +135,32 @@ export declare interface IApplicationPlugin { | ||
/** | ||
* Middleware for for Application's resize functionality | ||
* @private | ||
* @class | ||
*/ | ||
export declare class ResizePlugin { | ||
/** @ignore */ | ||
static extension: ExtensionMetadata; | ||
static resizeTo: Window | HTMLElement; | ||
static resize: () => void; | ||
static renderer: Renderer | CanvasRenderer; | ||
static queueResize: () => void; | ||
private static _resizeId; | ||
private static _resizeTo; | ||
private static cancelResize; | ||
/** | ||
* Initialize the plugin with scope of application instance | ||
* @static | ||
* @private | ||
* @param {object} [options] - See application options | ||
*/ | ||
static init(options?: IApplicationOptions): void; | ||
/** | ||
* Clean up the ticker, scoped to application | ||
* @static | ||
* @private | ||
*/ | ||
static destroy(): void; | ||
} | ||
export { } |
{ | ||
"name": "@pixi/app", | ||
"version": "6.4.2", | ||
"version": "6.5.0-rc", | ||
"main": "dist/cjs/app.js", | ||
@@ -41,6 +41,6 @@ "module": "dist/esm/app.js", | ||
"peerDependencies": { | ||
"@pixi/core": "6.4.2", | ||
"@pixi/display": "6.4.2" | ||
"@pixi/core": "6.5.0-rc", | ||
"@pixi/display": "6.5.0-rc" | ||
}, | ||
"gitHead": "a87bb87036d5fb9119ee92fd9c3da23b5bb9424b" | ||
"gitHead": "16005f83e7a6d87831ce84f8a6d460606a331ef6" | ||
} |
@@ -20,5 +20,5 @@ # @pixi/app | ||
PixiJS provides a few plugins to add features to the Application. These can be installed from the following packages. Use `Application.registerPlugin` to use these plugins. _Note: if you are using pixi.js or pixi.js-legacy bundles, this is unnecessary since plugins are installed automatically by default._ | ||
PixiJS provides a few plugins to add features to the Application. These can be installed from the following packages. Use `extensions.add` to use these plugins. _Note: if you are using pixi.js or pixi.js-legacy bundles, this is unnecessary since plugins are installed automatically by default._ | ||
* **LoaderPlugin** from `@pixi/loaders` | ||
* **TickerPlugin** from `@pixi/ticker` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
707422
5985
2
3