Skip to content

Commit 9280a73

Browse files
committed
StaticTilemapLayer now includes the ModelViewProjection mixin, so it doesn't need to modify the pipeline during rendering.
1 parent ea8102f commit 9280a73

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/tilemaps/staticlayer/StaticTilemapLayer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ var Class = require('../../utils/Class');
88
var Components = require('../../gameobjects/components');
99
var GameEvents = require('../../core/events');
1010
var GameObject = require('../../gameobjects/GameObject');
11+
var ModelViewProjection = require('../../renderer/webgl/pipelines/components/ModelViewProjection');
1112
var StaticTilemapLayerRender = require('./StaticTilemapLayerRender');
1213
var TilemapComponents = require('../components');
1314
var TransformMatrix = require('../../gameobjects/components/TransformMatrix');
@@ -40,6 +41,7 @@ var Utils = require('../../renderer/webgl/Utils');
4041
* @extends Phaser.GameObjects.Components.Transform
4142
* @extends Phaser.GameObjects.Components.Visible
4243
* @extends Phaser.GameObjects.Components.ScrollFactor
44+
* @extends Phaser.Renderer.WebGL.Pipelines.ModelViewProjection
4345
*
4446
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.
4547
* @param {Phaser.Tilemaps.Tilemap} tilemap - The Tilemap this layer is a part of.
@@ -64,7 +66,8 @@ var StaticTilemapLayer = new Class({
6466
Components.Transform,
6567
Components.Visible,
6668
Components.ScrollFactor,
67-
StaticTilemapLayerRender
69+
StaticTilemapLayerRender,
70+
ModelViewProjection
6871
],
6972

7073
initialize:
@@ -359,6 +362,8 @@ var StaticTilemapLayer = new Class({
359362

360363
this.initPipeline('TextureTintPipeline');
361364

365+
this.mvpInit();
366+
362367
scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()
363368
{
364369
this.updateVBOData();

0 commit comments

Comments
 (0)