@pixi/prepare
Advanced tools
Comparing version 7.1.0-alpha to 7.1.0
@@ -7,2 +7,8 @@ declare namespace GlobalMixins | ||
} | ||
interface Settings | ||
{ | ||
/** @deprecated */ | ||
UPLOADS_PER_FRAME: number; | ||
} | ||
} |
@@ -1,6 +0,6 @@ | ||
import { Texture, BaseTexture } from '@pixi/core'; | ||
import type { DisplayObject } from '@pixi/display'; | ||
import { BaseTexture, Texture } from '@pixi/core'; | ||
import { Container } from '@pixi/display'; | ||
import { TextStyle } from '@pixi/text'; | ||
import type { IRenderer } from '@pixi/core'; | ||
import type { DisplayObject } from '@pixi/display'; | ||
interface IUploadHook { | ||
@@ -28,3 +28,3 @@ (helper: IRenderer | BasePrepare, item: IDisplayObjectExtended): boolean; | ||
* // Load object into GPU | ||
* app.renderer.plugins.prepare.upload(sprite, () => { | ||
* app.renderer.prepare.upload(sprite, () => { | ||
* // Texture(s) has been uploaded to GPU | ||
@@ -38,2 +38,7 @@ * app.stage.addChild(sprite); | ||
/** | ||
* The default maximum uploads per frame. | ||
* @static | ||
*/ | ||
static uploadsPerFrame: number; | ||
/** | ||
* The limiter to be used to control how quickly items are prepared. | ||
@@ -40,0 +45,0 @@ * @type {PIXI.CountLimiter|PIXI.TimeLimiter} |
@@ -85,5 +85,5 @@ 'use strict'; | ||
} | ||
class BasePrepare { | ||
const _BasePrepare = class { | ||
constructor(renderer) { | ||
this.limiter = new CountLimiter.CountLimiter(core.settings.UPLOADS_PER_FRAME); | ||
this.limiter = new CountLimiter.CountLimiter(_BasePrepare.uploadsPerFrame); | ||
this.renderer = renderer; | ||
@@ -196,5 +196,7 @@ this.uploadHookHelper = null; | ||
} | ||
} | ||
}; | ||
let BasePrepare = _BasePrepare; | ||
BasePrepare.uploadsPerFrame = 4; | ||
exports.BasePrepare = BasePrepare; | ||
//# sourceMappingURL=BasePrepare.js.map |
/// <reference path="../global.d.ts" /> | ||
import './settings'; | ||
export * from './Prepare'; | ||
export * from './BasePrepare'; | ||
export * from './CountLimiter'; | ||
export * from './Prepare'; | ||
export * from './TimeLimiter'; |
@@ -6,5 +6,5 @@ 'use strict'; | ||
require('./settings.js'); | ||
var Prepare = require('./Prepare.js'); | ||
var BasePrepare = require('./BasePrepare.js'); | ||
var CountLimiter = require('./CountLimiter.js'); | ||
var Prepare = require('./Prepare.js'); | ||
var TimeLimiter = require('./TimeLimiter.js'); | ||
@@ -14,6 +14,6 @@ | ||
exports.Prepare = Prepare.Prepare; | ||
exports.BasePrepare = BasePrepare.BasePrepare; | ||
exports.CountLimiter = CountLimiter.CountLimiter; | ||
exports.Prepare = Prepare.Prepare; | ||
exports.TimeLimiter = TimeLimiter.TimeLimiter; | ||
//# sourceMappingURL=index.js.map |
import { BasePrepare } from './BasePrepare'; | ||
import type { Renderer, ISystem, ExtensionMetadata } from '@pixi/core'; | ||
import type { ExtensionMetadata, ISystem, Renderer } from '@pixi/core'; | ||
/** | ||
@@ -28,3 +28,3 @@ * The prepare plugin provides renderer-specific plugins for pre-rendering DisplayObjects. These plugins are useful for | ||
* // Don't start rendering until the graphic is uploaded to the GPU | ||
* app.renderer.plugins.prepare.upload(app.stage, () => { | ||
* app.renderer.prepare.upload(app.stage, () => { | ||
* app.start(); | ||
@@ -31,0 +31,0 @@ * }); |
@@ -6,9 +6,20 @@ 'use strict'; | ||
var core = require('@pixi/core'); | ||
var BasePrepare = require('./BasePrepare.js'); | ||
core.settings.UPLOADS_PER_FRAME = 4; | ||
Object.defineProperties(core.settings, { | ||
UPLOADS_PER_FRAME: { | ||
get() { | ||
return BasePrepare.BasePrepare.uploadsPerFrame; | ||
}, | ||
set(value) { | ||
core.utils.deprecation("7.1.0", "settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"); | ||
BasePrepare.BasePrepare.uploadsPerFrame = value; | ||
} | ||
} | ||
}); | ||
Object.defineProperty(exports, 'settings', { | ||
enumerable: true, | ||
get: function () { return core.settings; } | ||
enumerable: true, | ||
get: function () { return core.settings; } | ||
}); | ||
//# sourceMappingURL=settings.js.map |
{ | ||
"name": "@pixi/prepare", | ||
"version": "7.1.0-alpha", | ||
"version": "7.1.0", | ||
"main": "lib/index.js", | ||
@@ -25,7 +25,7 @@ "module": "lib/index.mjs", | ||
"homepage": "http://pixijs.com/", | ||
"bugs": "https://github.com/pixijs/pixi.js/issues", | ||
"bugs": "https://github.com/pixijs/pixijs/issues", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pixijs/pixi.js.git" | ||
"url": "https://github.com/pixijs/pixijs.git" | ||
}, | ||
@@ -45,3 +45,3 @@ "publishConfig": { | ||
], | ||
"gitHead": "0fb26a500c738cb550da277c112d15d9dd3f87b6" | ||
"gitHead": "4079e92895ecb692afe9f0b15d3e48ee40852ada" | ||
} |
@@ -12,3 +12,3 @@ # @pixi/prepare | ||
```js | ||
import '@pixi/canvas-prepare'; | ||
``` | ||
import '@pixi/prepare'; | ||
``` |
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 not supported yet
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 not supported yet
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 not supported yet
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
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
87687
845
0
14