diff --git a/src/core/math/GroupD8.js b/src/core/math/GroupD8.js index 50c2f31..e6a09e7 100644 --- a/src/core/math/GroupD8.js +++ b/src/core/math/GroupD8.js @@ -111,13 +111,14 @@ rotate180: (rotation) => rotation ^ 4, /** - * I dont know why sometimes width and heights needs to be swapped. We'll fix it later. + * Direction of main vector can be horizontal, vertical or diagonal. + * Some objects work with vertical directions different. * * @memberof PIXI.GroupD8 * @param {number} rotation - The number to check. - * @returns {boolean} Whether or not the width/height should be swapped. + * @returns {boolean} Whether or not the direction is vertical */ - isSwapWidthHeight: (rotation) => (rotation & 3) === 2, + isVertical: (rotation) => (rotation & 3) === 2, /** * @memberof PIXI.GroupD8 diff --git a/src/core/math/GroupD8.js b/src/core/math/GroupD8.js index 50c2f31..e6a09e7 100644 --- a/src/core/math/GroupD8.js +++ b/src/core/math/GroupD8.js @@ -111,13 +111,14 @@ rotate180: (rotation) => rotation ^ 4, /** - * I dont know why sometimes width and heights needs to be swapped. We'll fix it later. + * Direction of main vector can be horizontal, vertical or diagonal. + * Some objects work with vertical directions different. * * @memberof PIXI.GroupD8 * @param {number} rotation - The number to check. - * @returns {boolean} Whether or not the width/height should be swapped. + * @returns {boolean} Whether or not the direction is vertical */ - isSwapWidthHeight: (rotation) => (rotation & 3) === 2, + isVertical: (rotation) => (rotation & 3) === 2, /** * @memberof PIXI.GroupD8 diff --git a/src/deprecation.js b/src/deprecation.js index d1b689e..209910a 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -601,6 +601,21 @@ return this.generateCanvasTexture(scaleMode, resolution); }; + /** + * @method + * @name PIXI.GroupD8.isSwapWidthHeight + * @see PIXI.GroupD8.isVertical + * @param {number} rotation - The number to check. + * @returns {boolean} Whether or not the direction is vertical + * @deprecated since version 4.6.0 + */ + core.GroupD8.isSwapWidthHeight = function isSwapWidthHeight(rotation) + { + warn('GroupD8.isSwapWidthHeight was renamed to GroupD8.isVertical'); + + return core.GroupD8.isVertical(rotation); + }; + core.RenderTexture.prototype.render = function render(displayObject, matrix, clear, updateTransform) { this.legacyRenderer.render(displayObject, this, clear, matrix, !updateTransform);