@pixi/mixin-cache-as-bitmap
Advanced tools
Comparing version 5.0.0-alpha.3 to 5.0.0-rc
/*! | ||
* @pixi/mixin-cache-as-bitmap - v5.0.0-alpha.3 | ||
* Compiled Tue, 03 Jul 2018 04:08:21 UTC | ||
* @pixi/mixin-cache-as-bitmap - v5.0.0-rc | ||
* Compiled Fri, 01 Feb 2019 04:50:10 UTC | ||
* | ||
@@ -8,3 +8,3 @@ * @pixi/mixin-cache-as-bitmap is licensed under the MIT License. | ||
*/ | ||
import { BaseTexture, RenderTexture, Texture } from '@pixi/core'; | ||
import { RenderTexture, BaseTexture, Texture } from '@pixi/core'; | ||
import { Sprite } from '@pixi/sprite'; | ||
@@ -14,2 +14,3 @@ import { DisplayObject } from '@pixi/display'; | ||
import { uid } from '@pixi/utils'; | ||
import { settings } from '@pixi/settings'; | ||
@@ -132,2 +133,3 @@ var _tempMatrix = new Matrix(); | ||
* @private | ||
* @function _renderCached | ||
* @memberof PIXI.DisplayObject# | ||
@@ -145,3 +147,3 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
this._cacheData.sprite._transformID = -1; | ||
this._cacheData.sprite.transform._worldID = this.transform._worldID; | ||
this._cacheData.sprite.worldAlpha = this.worldAlpha; | ||
@@ -155,2 +157,3 @@ this._cacheData.sprite._render(renderer); | ||
* @private | ||
* @function _initCachedDisplayObject | ||
* @memberof PIXI.DisplayObject# | ||
@@ -189,3 +192,5 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
// for now we cache the current renderTarget that the webGL renderer is currently using. | ||
bounds.ceil(settings.RESOLUTION); | ||
// for now we cache the current renderTarget that the WebGL renderer is currently using. | ||
// this could be more elegant.. | ||
@@ -197,5 +202,4 @@ var cachedRenderTarget = renderer._activeRenderTarget; | ||
// this renderTexture will be used to store the cached DisplayObject | ||
var renderTexture = RenderTexture.create(bounds.width, bounds.height); | ||
var renderTexture = RenderTexture.create(bounds.width | 0, bounds.height | 0); | ||
var textureCacheId = "cacheAsBitmap_" + (uid()); | ||
@@ -269,2 +273,3 @@ | ||
* @private | ||
* @function _renderCachedCanvas | ||
* @memberof PIXI.DisplayObject# | ||
@@ -283,7 +288,6 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
this._cacheData.sprite.worldAlpha = this.worldAlpha; | ||
this._cacheData.sprite.renderCanvas(renderer); | ||
this._cacheData.sprite._renderCanvas(renderer); | ||
}; | ||
// TODO this can be the same as the webGL version.. will need to do a little tweaking first though.. | ||
// TODO this can be the same as the WebGL version.. will need to do a little tweaking first though.. | ||
/** | ||
@@ -293,2 +297,3 @@ * Prepares the Canvas renderer to cache the sprite | ||
* @private | ||
* @function _initCachedDisplayObjectCanvas | ||
* @memberof PIXI.DisplayObject# | ||
@@ -313,4 +318,6 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
var renderTexture = RenderTexture.create(bounds.width | 0, bounds.height | 0); | ||
bounds.ceil(settings.RESOLUTION); | ||
var renderTexture = RenderTexture.create(bounds.width, bounds.height); | ||
var textureCacheId = "cacheAsBitmap_" + (uid()); | ||
@@ -343,3 +350,3 @@ | ||
this.renderCanvas = this._renderCachedCanvas; | ||
this._calculateBounds = this._calculateCachedBounds; | ||
this.calculateBounds = this._calculateCachedBounds; | ||
@@ -383,3 +390,6 @@ this._mask = null; | ||
{ | ||
this._bounds.clear(); | ||
this._cacheData.sprite.transform._worldID = this.transform._worldID; | ||
this._cacheData.sprite._calculateBounds(); | ||
this._lastBoundsID = this._boundsID; | ||
}; | ||
@@ -386,0 +396,0 @@ |
/*! | ||
* @pixi/mixin-cache-as-bitmap - v5.0.0-alpha.3 | ||
* Compiled Tue, 03 Jul 2018 04:08:21 UTC | ||
* @pixi/mixin-cache-as-bitmap - v5.0.0-rc | ||
* Compiled Fri, 01 Feb 2019 04:50:10 UTC | ||
* | ||
@@ -15,2 +15,3 @@ * @pixi/mixin-cache-as-bitmap is licensed under the MIT License. | ||
var utils = require('@pixi/utils'); | ||
var settings = require('@pixi/settings'); | ||
@@ -133,2 +134,3 @@ var _tempMatrix = new math.Matrix(); | ||
* @private | ||
* @function _renderCached | ||
* @memberof PIXI.DisplayObject# | ||
@@ -146,3 +148,3 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
this._cacheData.sprite._transformID = -1; | ||
this._cacheData.sprite.transform._worldID = this.transform._worldID; | ||
this._cacheData.sprite.worldAlpha = this.worldAlpha; | ||
@@ -156,2 +158,3 @@ this._cacheData.sprite._render(renderer); | ||
* @private | ||
* @function _initCachedDisplayObject | ||
* @memberof PIXI.DisplayObject# | ||
@@ -190,3 +193,5 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
// for now we cache the current renderTarget that the webGL renderer is currently using. | ||
bounds.ceil(settings.settings.RESOLUTION); | ||
// for now we cache the current renderTarget that the WebGL renderer is currently using. | ||
// this could be more elegant.. | ||
@@ -198,5 +203,4 @@ var cachedRenderTarget = renderer._activeRenderTarget; | ||
// this renderTexture will be used to store the cached DisplayObject | ||
var renderTexture = core.RenderTexture.create(bounds.width, bounds.height); | ||
var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); | ||
var textureCacheId = "cacheAsBitmap_" + (utils.uid()); | ||
@@ -270,2 +274,3 @@ | ||
* @private | ||
* @function _renderCachedCanvas | ||
* @memberof PIXI.DisplayObject# | ||
@@ -284,7 +289,6 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
this._cacheData.sprite.worldAlpha = this.worldAlpha; | ||
this._cacheData.sprite.renderCanvas(renderer); | ||
this._cacheData.sprite._renderCanvas(renderer); | ||
}; | ||
// TODO this can be the same as the webGL version.. will need to do a little tweaking first though.. | ||
// TODO this can be the same as the WebGL version.. will need to do a little tweaking first though.. | ||
/** | ||
@@ -294,2 +298,3 @@ * Prepares the Canvas renderer to cache the sprite | ||
* @private | ||
* @function _initCachedDisplayObjectCanvas | ||
* @memberof PIXI.DisplayObject# | ||
@@ -314,4 +319,6 @@ * @param {PIXI.Renderer} renderer - the WebGL renderer | ||
var renderTexture = core.RenderTexture.create(bounds.width | 0, bounds.height | 0); | ||
bounds.ceil(settings.settings.RESOLUTION); | ||
var renderTexture = core.RenderTexture.create(bounds.width, bounds.height); | ||
var textureCacheId = "cacheAsBitmap_" + (utils.uid()); | ||
@@ -344,3 +351,3 @@ | ||
this.renderCanvas = this._renderCachedCanvas; | ||
this._calculateBounds = this._calculateCachedBounds; | ||
this.calculateBounds = this._calculateCachedBounds; | ||
@@ -384,3 +391,6 @@ this._mask = null; | ||
{ | ||
this._bounds.clear(); | ||
this._cacheData.sprite.transform._worldID = this.transform._worldID; | ||
this._cacheData.sprite._calculateBounds(); | ||
this._lastBoundsID = this._boundsID; | ||
}; | ||
@@ -387,0 +397,0 @@ |
{ | ||
"name": "@pixi/mixin-cache-as-bitmap", | ||
"version": "5.0.0-alpha.3", | ||
"version": "5.0.0-rc", | ||
"main": "lib/mixin-cache-as-bitmap.js", | ||
"module": "lib/mixin-cache-as-bitmap.es.js", | ||
"description": "Support for legacy browser JavaScript environments", | ||
"description": "Mixin to allow caching container and its children to a bitmap texture", | ||
"author": "Mat Groves", | ||
@@ -28,11 +28,13 @@ "contributors": [ | ||
"dependencies": { | ||
"@pixi/core": "^5.0.0-alpha.3", | ||
"@pixi/display": "^5.0.0-alpha.3", | ||
"@pixi/math": "^5.0.0-alpha.3", | ||
"@pixi/sprite": "^5.0.0-alpha.3", | ||
"@pixi/utils": "^5.0.0-alpha.3" | ||
"@pixi/core": "^5.0.0-rc", | ||
"@pixi/display": "^5.0.0-rc", | ||
"@pixi/math": "^5.0.0-rc", | ||
"@pixi/settings": "^5.0.0-rc", | ||
"@pixi/sprite": "^5.0.0-rc", | ||
"@pixi/utils": "^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
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
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
70311
677
6
+ Added@pixi/settings@^5.0.0-rc
Updated@pixi/core@^5.0.0-rc
Updated@pixi/display@^5.0.0-rc
Updated@pixi/math@^5.0.0-rc
Updated@pixi/sprite@^5.0.0-rc
Updated@pixi/utils@^5.0.0-rc