mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
Remove roundPixels from DrawingContext, but keep it in QuadLight.
This commit is contained in:
parent
cbcb14f724
commit
aa69e4f8b3
3 changed files with 2 additions and 33 deletions
|
@ -165,30 +165,6 @@ var DrawingContext = new Class({
|
||||||
*/
|
*/
|
||||||
this.inUse = false;
|
this.inUse = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether to override the camera's roundPixels setting
|
|
||||||
* with the DrawingContext's own setting.
|
|
||||||
*
|
|
||||||
* @name Phaser.Renderer.WebGL.DrawingContext#overrideRoundPixels
|
|
||||||
* @type {boolean}
|
|
||||||
* @default false
|
|
||||||
* @since 3.90.0
|
|
||||||
*/
|
|
||||||
this.overrideRoundPixels = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Whether to round the camera's position before rendering.
|
|
||||||
*
|
|
||||||
* This value is taken from the camera's `roundPixels` property
|
|
||||||
* when `setCamera` is called if `overrideRoundPixels` is `false`.
|
|
||||||
*
|
|
||||||
* @name Phaser.Renderer.WebGL.DrawingContext#roundPixels
|
|
||||||
* @type {boolean}
|
|
||||||
* @default false
|
|
||||||
* @since 3.90.0
|
|
||||||
*/
|
|
||||||
this.roundPixels = false;
|
|
||||||
|
|
||||||
if (options.autoResize)
|
if (options.autoResize)
|
||||||
{
|
{
|
||||||
this.renderer.on(Events.RESIZE, this.resize, this);
|
this.renderer.on(Events.RESIZE, this.resize, this);
|
||||||
|
@ -278,8 +254,6 @@ var DrawingContext = new Class({
|
||||||
this.texture = source.texture;
|
this.texture = source.texture;
|
||||||
this.camera = source.camera;
|
this.camera = source.camera;
|
||||||
this.blendMode = source.blendMode;
|
this.blendMode = source.blendMode;
|
||||||
this.overrideRoundPixels = source.overrideRoundPixels;
|
|
||||||
this.roundPixels = source.roundPixels;
|
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
bindings:
|
bindings:
|
||||||
|
@ -388,11 +362,6 @@ var DrawingContext = new Class({
|
||||||
setCamera: function (camera)
|
setCamera: function (camera)
|
||||||
{
|
{
|
||||||
this.camera = camera;
|
this.camera = camera;
|
||||||
|
|
||||||
if (!this.overrideRoundPixels)
|
|
||||||
{
|
|
||||||
this.roundPixels = camera ? camera.roundPixels : false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -194,7 +194,7 @@ var BatchHandlerQuad = new Class({
|
||||||
{
|
{
|
||||||
this.program.setUniform(
|
this.program.setUniform(
|
||||||
'uRoundPixels',
|
'uRoundPixels',
|
||||||
drawingContext.roundPixels
|
drawingContext.camera.roundPixels
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ var BatchHandlerQuadLight = new Class({
|
||||||
|
|
||||||
program.setUniform(
|
program.setUniform(
|
||||||
'uRoundPixels',
|
'uRoundPixels',
|
||||||
drawingContext.roundPixels
|
drawingContext.camera.roundPixels
|
||||||
);
|
);
|
||||||
program.setUniform(
|
program.setUniform(
|
||||||
'uCamera',
|
'uCamera',
|
||||||
|
|
Loading…
Reference in a new issue