Skip to content

Commit

Permalink
The Alpha, Flip and Origin components have been removed from the Mesh…
Browse files Browse the repository at this point in the history
… Game Object (and by extension, Quad as well) as they are not used in the renderer and should be manipulated via the Mesh properties. Fix #4188
  • Loading branch information
photonstorm committed Dec 18, 2018
1 parent a272324 commit cb57425
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ one set of bindings ever created, which makes things a lot cleaner.
* `List.getFirst` was using an incorrect Array Utils function `GetFirstElement`, when it should have been using `GetFirst`. It now uses the correct function. Fix #4244 (thanks @miran248)
* Fixed an issue where changing the viewport or size of a Camera belonging to a RenderTexture, it wouldn't impact the rendering and objects will still render outside of the viewport range. It's now converted to a proper gl scissor rect by the renderer, meaning you can limit the area rendered to by adjusting the internal Render Texture cameras viewport. Fix #4243 (thanks @hackhat)
* `CanvasTexture.destroy` is a new method that specifically handles the destruction of the CanvasTexture and all of its associated typed arrays. This prevents a memory leak when creating and destroying lots of RenderTextures (which are CanvasTexture backed). Fix #4239 (thanks @sjb933)
* The Alpha, Flip and Origin components have been removed from the Mesh Game Object (and by extension, Quad as well) as they are not used in the renderer and should be manipulated via the Mesh properties. Fix #4188 (thanks @enriqueto)

### Examples and TypeScript

Expand Down
7 changes: 0 additions & 7 deletions src/gameobjects/mesh/Mesh.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@ var MeshRender = require('./MeshRender');
* @webglOnly
* @since 3.0.0
*
* @extends Phaser.GameObjects.Components.Alpha
* @extends Phaser.GameObjects.Components.BlendMode
* @extends Phaser.GameObjects.Components.Depth
* @extends Phaser.GameObjects.Components.Flip
* @extends Phaser.GameObjects.Components.GetBounds
* @extends Phaser.GameObjects.Components.Mask
* @extends Phaser.GameObjects.Components.Origin
* @extends Phaser.GameObjects.Components.Pipeline
* @extends Phaser.GameObjects.Components.ScaleMode
* @extends Phaser.GameObjects.Components.Size
Expand All @@ -50,13 +47,10 @@ var Mesh = new Class({
Extends: GameObject,

Mixins: [
Components.Alpha,
Components.BlendMode,
Components.Depth,
Components.Flip,
Components.GetBounds,
Components.Mask,
Components.Origin,
Components.Pipeline,
Components.ScaleMode,
Components.Size,
Expand Down Expand Up @@ -157,7 +151,6 @@ var Mesh = new Class({
this.setTexture(texture, frame);
this.setPosition(x, y);
this.setSizeToFrame();
this.setOrigin();
this.initPipeline();
}

Expand Down
2 changes: 1 addition & 1 deletion src/gameobjects/mesh/MeshWebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera
var meshVerticesLength = vertices.length;
var vertexCount = Math.floor(meshVerticesLength * 0.5);

if (pipeline.vertexCount + vertexCount >= pipeline.vertexCapacity)
if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity)
{
pipeline.flush();
}
Expand Down

0 comments on commit cb57425

Please sign in to comment.