Removed WebGL Tilemap renderer, has moved to its own branch to be part of 2.5.0.

This commit is contained in:
photonstorm 2016-05-11 11:27:22 +01:00
parent a2ba13e33f
commit 368913fd98
5 changed files with 0 additions and 1429 deletions

View file

@ -64,7 +64,6 @@
<script src="$path/src/pixi/renderers/webgl/shaders/StripShader.js"></script>
<script src="$path/src/pixi/renderers/webgl/shaders/PrimitiveShader.js"></script>
<script src="$path/src/pixi/renderers/webgl/shaders/ComplexPrimitiveShader.js"></script>
<script src="$path/src/pixi/renderers/webgl/shaders/TilemapShader.js"></script>
<script src="$path/src/pixi/renderers/webgl/utils/WebGLGraphics.js"></script>
<script src="$path/src/pixi/renderers/webgl/WebGLRenderer.js"></script>
<script src="$path/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js"></script>
@ -85,9 +84,6 @@
<script src="$path/src/pixi/primitives/Graphics.js"></script>
<script src="$path/src/pixi/primitives/GraphicsData.js"></script>
<script src="$path/src/pixi/extras/Tilemap.js"></script>
EOL;
if ($modules['rope'])
@ -408,7 +404,6 @@ EOL;
<script src="$path/src/tilemap/Tile.js"></script>
<script src="$path/src/tilemap/Tilemap.js"></script>
<script src="$path/src/tilemap/TilemapLayer.js"></script>
<script src="$path/src/tilemap/TilemapLayerGL.js"></script>
<script src="$path/src/tilemap/TilemapParser.js"></script>
<script src="$path/src/tilemap/Tileset.js"></script>

View file

@ -1,110 +0,0 @@
/**
* @author Mat Groves http://matgroves.com/ @Doormat23
*/
/**
* @class TilemapShader
* @constructor
* @param gl {WebGLContext} the current WebGL drawing context
*/
PIXI.TilemapShader = function(gl)
{
/**
* @property _UID
* @type Number
* @private
*/
this._UID = PIXI._UID++;
/**
* @property gl
* @type WebGLContext
*/
this.gl = gl;
/**
* The WebGL program.
* @property program
* @type Any
*/
this.program = null;
/**
* The fragment shader.
* @property fragmentSrc
* @type Array
*/
this.fragmentSrc = [
" precision mediump float;",
" uniform sampler2D uImageSampler;",
" varying vec2 vTexCoord;",
" void main(void) {",
" gl_FragColor = texture2D(uImageSampler, vTexCoord);",
" }"
];
/**
* The vertex shader.
* @property vertexSrc
* @type Array
*/
this.vertexSrc = [
" uniform vec2 uScreenPosition;",
" attribute vec4 aPosition;",
" uniform mat3 uProjectionMatrix;",
" varying vec2 vTexCoord;",
" void main(void) {",
" vec3 pos = uProjectionMatrix * (vec3(aPosition.xy, 1) + vec3(uScreenPosition, 0));",
" gl_Position = vec4(pos.xy, 1, 1);",
" vTexCoord = aPosition.zw;",
" }"
];
/**
* A local texture counter for multi-texture shaders.
* @property textureCount
* @type Number
*/
this.textureCount = 0;
this.init();
};
PIXI.TilemapShader.prototype.constructor = PIXI.TilemapShader;
/**
* Initialises the shader.
*
* @method init
*/
PIXI.TilemapShader.prototype.init = function()
{
var gl = this.gl;
var program = PIXI.compileProgram(gl, this.vertexSrc, this.fragmentSrc);
gl.useProgram(program);
// get and store the attributes
this.aPosition = gl.getAttribLocation(program, 'aPosition');
this.uProjectionMatrix = gl.getUniformLocation(program, 'uProjectionMatrix');
this.uScreenPosition = gl.getUniformLocation(program, 'uScreenPosition');
this.uSampler = gl.getUniformLocation(program, 'uImageSampler');
this.attributes = [this.aScreenPosition, this.aPosition, this.uProjectionMatrix, this.uSampler];
this.program = program;
};
/**
* Destroys the shader.
*
* @method destroy
*/
PIXI.TilemapShader.prototype.destroy = function()
{
this.gl.deleteProgram( this.program );
this.uniforms = null;
this.gl = null;
this.attributes = null;
};

View file

@ -67,8 +67,6 @@ PIXI.WebGLShaderManager.prototype.setContext = function(gl)
// the next one is used for rendering triangle strips
this.stripShader = new PIXI.StripShader(gl);
this.tilemapShader = new PIXI.TilemapShader(gl);
this.setShader(this.defaultShader);
};
@ -156,7 +154,5 @@ PIXI.WebGLShaderManager.prototype.destroy = function()
this.stripShader.destroy();
this.tilemapShader.destroy();
this.gl = null;
};

View file

@ -35,7 +35,6 @@ Phaser.Tilemap = function (game, key, tileWidth, tileHeight, width, height) {
this.key = key;
var data = Phaser.TilemapParser.parse(this.game, key, tileWidth, tileHeight, width, height);
this.data = data;
if (data === null)
{

File diff suppressed because it is too large Load diff