mirror of
https://github.com/photonstorm/phaser
synced 2025-02-25 20:07:08 +00:00
parentMatrix added to individual game object render function
This commit is contained in:
parent
5d7e910f5b
commit
d544701495
11 changed files with 32 additions and 20 deletions
|
@ -19,8 +19,9 @@ var GameObject = require('../../GameObject');
|
|||
* @param {Phaser.GameObjects.DynamicBitmapText} gameObject - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var DynamicBitmapTextWebGLRenderer = function (renderer, bitmapText, interpolationPercentage, camera)
|
||||
var DynamicBitmapTextWebGLRenderer = function (renderer, bitmapText, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
var text = bitmapText.text;
|
||||
var textLength = text.length;
|
||||
|
@ -30,7 +31,7 @@ var DynamicBitmapTextWebGLRenderer = function (renderer, bitmapText, interpolati
|
|||
return;
|
||||
}
|
||||
|
||||
this.pipeline.batchDynamicBitmapText(bitmapText, camera);
|
||||
this.pipeline.batchDynamicBitmapText(bitmapText, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = DynamicBitmapTextWebGLRenderer;
|
||||
|
|
|
@ -19,8 +19,9 @@ var GameObject = require('../../GameObject');
|
|||
* @param {Phaser.GameObjects.BitmapText} gameObject - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var BitmapTextWebGLRenderer = function (renderer, gameObject, interpolationPercentage, camera)
|
||||
var BitmapTextWebGLRenderer = function (renderer, gameObject, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
var text = gameObject.text;
|
||||
var textLength = text.length;
|
||||
|
@ -30,7 +31,7 @@ var BitmapTextWebGLRenderer = function (renderer, gameObject, interpolationPerce
|
|||
return;
|
||||
}
|
||||
|
||||
this.pipeline.batchBitmapText(this, camera);
|
||||
this.pipeline.batchBitmapText(this, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = BitmapTextWebGLRenderer;
|
||||
|
|
|
@ -19,15 +19,16 @@ var GameObject = require('../GameObject');
|
|||
* @param {Phaser.GameObjects.Blitter} gameObject - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var BlitterWebGLRenderer = function (renderer, gameObject, interpolationPercentage, camera)
|
||||
var BlitterWebGLRenderer = function (renderer, gameObject, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
if (GameObject.RENDER_MASK !== gameObject.renderFlags || (gameObject.cameraFilter > 0 && (gameObject.cameraFilter & camera._id)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.pipeline.drawBlitter(gameObject, camera);
|
||||
this.pipeline.drawBlitter(gameObject, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = BlitterWebGLRenderer;
|
||||
|
|
|
@ -19,15 +19,16 @@ var GameObject = require('../GameObject');
|
|||
* @param {Phaser.GameObjects.Graphics} graphics - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var GraphicsWebGLRenderer = function (renderer, graphics, interpolationPercentage, camera)
|
||||
var GraphicsWebGLRenderer = function (renderer, graphics, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
if (GameObject.RENDER_MASK !== graphics.renderFlags || (graphics.cameraFilter > 0 && (graphics.cameraFilter & camera._id)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.pipeline.batchGraphics(this, camera);
|
||||
this.pipeline.batchGraphics(this, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = GraphicsWebGLRenderer;
|
||||
|
|
|
@ -19,6 +19,7 @@ var GameObject = require('../GameObject');
|
|||
* @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
|
|
|
@ -19,15 +19,16 @@ var GameObject = require('../GameObject');
|
|||
* @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
|
||||
var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
if (GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter > 0 && (src.cameraFilter & camera._id)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.pipeline.batchMesh(src, camera);
|
||||
this.pipeline.batchMesh(src, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = MeshWebGLRenderer;
|
||||
|
|
|
@ -19,8 +19,9 @@ var GameObject = require('../GameObject');
|
|||
* @param {Phaser.GameObjects.Particles} emitterManager - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpolationPercentage, camera)
|
||||
var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
var emitters = emitterManager.emitters;
|
||||
|
||||
|
@ -29,7 +30,7 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola
|
|||
return;
|
||||
}
|
||||
|
||||
this.pipeline.drawEmitterManager(emitterManager, camera);
|
||||
this.pipeline.drawEmitterManager(emitterManager, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = ParticleManagerWebGLRenderer;
|
||||
|
|
|
@ -20,8 +20,9 @@ var Utils = require('../../renderer/webgl/Utils');
|
|||
* @param {Phaser.GameObjects.RenderTexture} renderTexture - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var RenderTextureWebGLRenderer = function (renderer, renderTexture, interpolationPercentage, camera)
|
||||
var RenderTextureWebGLRenderer = function (renderer, renderTexture, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
if (GameObject.RENDER_MASK !== renderTexture.renderFlags || (renderTexture.cameraFilter > 0 && (renderTexture.cameraFilter & camera._id)))
|
||||
{
|
||||
|
@ -42,7 +43,8 @@ var RenderTextureWebGLRenderer = function (renderer, renderTexture, interpolatio
|
|||
0, 0, renderTexture.texture.width, renderTexture.texture.height,
|
||||
Utils.getTintAppendFloatAlpha(renderTexture.tintTopLeft, renderTexture.alphaTopLeft), Utils.getTintAppendFloatAlpha(renderTexture.tintTopRight, renderTexture.alphaTopRight), Utils.getTintAppendFloatAlpha(renderTexture.tintBottomLeft, renderTexture.alphaBottomLeft), Utils.getTintAppendFloatAlpha(renderTexture.tintBottomRight, renderTexture.alphaBottomRight),
|
||||
0, 0,
|
||||
camera
|
||||
camera,
|
||||
parentMatrix
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
@ -19,15 +19,16 @@ var GameObject = require('../GameObject');
|
|||
* @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
|
||||
var SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
if (GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter > 0 && (src.cameraFilter & camera._id)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
this.pipeline.batchSprite(src, camera);
|
||||
this.pipeline.batchSprite(src, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = SpriteWebGLRenderer;
|
||||
|
|
|
@ -19,8 +19,9 @@ var GameObject = require('../../GameObject');
|
|||
* @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
|
||||
var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
if (GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter > 0 && (src.cameraFilter & camera._id)) || src.text === '')
|
||||
{
|
||||
|
@ -33,7 +34,7 @@ var TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera
|
|||
src.dirty = false;
|
||||
}
|
||||
|
||||
this.pipeline.batchText(this, camera);
|
||||
this.pipeline.batchText(this, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = TextWebGLRenderer;
|
||||
|
|
|
@ -19,8 +19,9 @@ var GameObject = require('../GameObject');
|
|||
* @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call.
|
||||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
* @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested
|
||||
*/
|
||||
var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
|
||||
var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
|
||||
{
|
||||
if (GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter > 0 && (src.cameraFilter & camera._id)))
|
||||
{
|
||||
|
@ -29,7 +30,7 @@ var TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage,
|
|||
|
||||
src.updateTileTexture();
|
||||
|
||||
this.pipeline.batchTileSprite(this, camera);
|
||||
this.pipeline.batchTileSprite(this, camera, parentMatrix);
|
||||
};
|
||||
|
||||
module.exports = TileSpriteWebGLRenderer;
|
||||
|
|
Loading…
Add table
Reference in a new issue