mirror of
https://github.com/photonstorm/phaser
synced 2024-11-24 21:53:59 +00:00
v4.0.0 Beta 2
This commit is contained in:
parent
1abe613cd6
commit
135efa1de0
8 changed files with 177099 additions and 177150 deletions
88
dist/phaser-arcade-physics.js
vendored
88
dist/phaser-arcade-physics.js
vendored
|
@ -15665,7 +15665,7 @@ var CONST = {
|
|||
* @type {string}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
VERSION: '4.0.0 Beta 1',
|
||||
VERSION: '4.0.0 Beta 2',
|
||||
|
||||
/**
|
||||
* Phaser Release Version as displayed in the console.log header URL.
|
||||
|
@ -32053,6 +32053,7 @@ module.exports = Glow;
|
|||
*/
|
||||
|
||||
var Class = __webpack_require__(83419);
|
||||
var UUID = __webpack_require__(45650);
|
||||
var Controller = __webpack_require__(13045);
|
||||
|
||||
/**
|
||||
|
@ -32212,11 +32213,10 @@ var Mask = new Class({
|
|||
return;
|
||||
}
|
||||
|
||||
var textureManager = this.camera.scene.sys.textures;
|
||||
|
||||
if (!this._dynamicTexture)
|
||||
{
|
||||
this._dynamicTexture = textureManager.addDynamicTexture('', width, height);
|
||||
var textureManager = this.camera.scene.sys.textures;
|
||||
this._dynamicTexture = textureManager.addDynamicTexture(UUID(), width, height);
|
||||
}
|
||||
else if (this._dynamicTexture.width !== width || this._dynamicTexture.height !== height)
|
||||
{
|
||||
|
@ -50069,6 +50069,9 @@ var ExternRender = __webpack_require__(64993);
|
|||
* override the `render` (and optionally `preUpdate`) methods and pass off control to your
|
||||
* 3rd party libraries or custom WebGL code there.
|
||||
*
|
||||
* The `render` method is called with this signature:
|
||||
* `render(renderer: Phaser.Renderer.WebGL.WebGLRenderer, drawingContext: Phaser.Renderer.WebGL.DrawingContext, calcMatrix: Phaser.GameObjects.Components.TransformMatrix): void`.
|
||||
*
|
||||
* Once you've finished, you should free-up any of your resources.
|
||||
* The Extern will then return Phaser state and carry on rendering the display list.
|
||||
*
|
||||
|
@ -50142,7 +50145,7 @@ var Extern = new Class({
|
|||
render: function ()
|
||||
{
|
||||
// override this!
|
||||
// Arguments: renderer, camera, calcMatrix
|
||||
// Arguments: renderer, drawingContext, calcMatrix
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -50265,7 +50268,7 @@ var ExternWebGLRenderer = function (renderer, src, drawingContext, parentMatrix)
|
|||
|
||||
var calcMatrix = GetCalcMatrix(src, drawingContext.camera, parentMatrix).calc;
|
||||
|
||||
src.render.call(src, renderer, drawingContext.camera, calcMatrix);
|
||||
src.render.call(src, renderer, drawingContext, calcMatrix);
|
||||
|
||||
renderer.renderNodes.getNode('RebindContext').run(drawingContext);
|
||||
};
|
||||
|
@ -67786,7 +67789,7 @@ module.exports = RenderFiltersWebGLRenderer;
|
|||
*/
|
||||
|
||||
var Class = __webpack_require__(83419);
|
||||
var DynamicTexture = __webpack_require__(81320);
|
||||
var UUID = __webpack_require__(45650);
|
||||
var Image = __webpack_require__(88571);
|
||||
|
||||
/**
|
||||
|
@ -67851,7 +67854,7 @@ var RenderTexture = new Class({
|
|||
if (width === undefined) { width = 32; }
|
||||
if (height === undefined) { height = 32; }
|
||||
|
||||
var dynamicTexture = new DynamicTexture(scene.sys.textures, '', width, height);
|
||||
var dynamicTexture = scene.sys.textures.addDynamicTexture(UUID(), width, height);
|
||||
|
||||
Image.call(this, scene, x, y, dynamicTexture);
|
||||
|
||||
|
@ -81075,16 +81078,8 @@ var TileSprite = new Class({
|
|||
var displayTexture = scene.sys.textures.get(textureKey);
|
||||
var displayFrame = displayTexture.get(frameKey);
|
||||
|
||||
if (!width || !height)
|
||||
{
|
||||
width = displayFrame.width;
|
||||
height = displayFrame.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = Math.floor(width);
|
||||
height = Math.floor(height);
|
||||
}
|
||||
width = width ? Math.floor(width) : displayFrame.width;
|
||||
height = height ? Math.floor(height) : displayFrame.height;
|
||||
|
||||
/**
|
||||
* Internal tile position vector.
|
||||
|
@ -155136,16 +155131,6 @@ var WebGLRenderer = new Class({
|
|||
*/
|
||||
this.mipmapFilter = null;
|
||||
|
||||
/**
|
||||
* The default scissor, set during `preRender` and modified during `resize`.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.WebGLRenderer#defaultScissor
|
||||
* @type {number[]}
|
||||
* @private
|
||||
* @since 3.50.0
|
||||
*/
|
||||
this.defaultScissor = [ 0, 0, 0, 0 ];
|
||||
|
||||
/**
|
||||
* Has this renderer fully booted yet?
|
||||
*
|
||||
|
@ -155513,10 +155498,6 @@ var WebGLRenderer = new Class({
|
|||
);
|
||||
this.on(Events.RESIZE, this.baseDrawingContext.resize, this.baseDrawingContext);
|
||||
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
||||
|
||||
gl.enable(gl.SCISSOR_TEST);
|
||||
|
||||
game.scale.on(ScaleEvents.RESIZE, this.onResize, this);
|
||||
|
||||
this.resize(width, height);
|
||||
|
@ -155770,14 +155751,14 @@ var WebGLRenderer = new Class({
|
|||
|
||||
this.setProjectionMatrix(width, height);
|
||||
|
||||
gl.viewport(0, 0, width, height);
|
||||
|
||||
this.drawingBufferHeight = gl.drawingBufferHeight;
|
||||
|
||||
gl.scissor(0, (gl.drawingBufferHeight - height), width, height);
|
||||
|
||||
this.defaultScissor[2] = width;
|
||||
this.defaultScissor[3] = height;
|
||||
this.glWrapper.update({
|
||||
scissor: {
|
||||
box: [ 0, (gl.drawingBufferHeight - height), width, height ]
|
||||
},
|
||||
viewport: [ 0, 0, width, height ]
|
||||
});
|
||||
|
||||
this.emit(Events.RESIZE, width, height);
|
||||
|
||||
|
@ -157373,7 +157354,7 @@ var WebGLGlobalParametersFactory = {
|
|||
cullFace: false,
|
||||
depthTest: false,
|
||||
scissor: {
|
||||
enable: false,
|
||||
enable: true,
|
||||
box: [ 0, 0, 0, 0 ]
|
||||
},
|
||||
stencil: WebGLStencilParametersFactory.create(renderer),
|
||||
|
@ -161448,7 +161429,7 @@ var RebindContext = new Class({
|
|||
// Clear the current framebuffer's stencil and depth renderbuffers.
|
||||
renderer.clearFramebuffer(
|
||||
undefined,
|
||||
renderer.hasActiveStencilMask() ? undefined : 0,
|
||||
undefined, // Stencil is currently not implemented by DrawingContext.
|
||||
0
|
||||
);
|
||||
|
||||
|
@ -163222,7 +163203,7 @@ var BaseFilterShader = new Class({
|
|||
{
|
||||
if (!fragmentShaderSource)
|
||||
{
|
||||
var baseShader = manager.renderer.shaders.get(fragmentShaderKey);
|
||||
var baseShader = manager.renderer.game.cache.shader.get(fragmentShaderKey);
|
||||
if (!(baseShader && baseShader.glsl))
|
||||
{
|
||||
throw new Error('BaseFilterShader: No fragment shader source provided and no shader found with key ' + fragmentShaderKey);
|
||||
|
@ -167620,7 +167601,11 @@ module.exports = [
|
|||
'#pragma phaserTemplate(shaderName)',
|
||||
'#pragma phaserTemplate(extensions)',
|
||||
'#pragma phaserTemplate(features)',
|
||||
'#ifdef GL_FRAGMENT_PRECISION_HIGH',
|
||||
'precision highp float;',
|
||||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform vec2 uResolution;',
|
||||
|
@ -167754,6 +167739,7 @@ module.exports = [
|
|||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#define ROUND_BIAS 0.5001',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform int uRoundPixels;',
|
||||
|
@ -167771,11 +167757,8 @@ module.exports = [
|
|||
'#pragma phaserTemplate(vertexHeader)',
|
||||
'void main ()',
|
||||
'{',
|
||||
' gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);',
|
||||
' if (uRoundPixels == 1)',
|
||||
' {',
|
||||
' gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;',
|
||||
' }',
|
||||
' vec2 position = uRoundPixels == 1 ? floor(inPosition + ROUND_BIAS) : inPosition;',
|
||||
' gl_Position = uProjectionMatrix * vec4(position, 1.0, 1.0);',
|
||||
' outTexCoord = inTexCoord;',
|
||||
' outTexDatum = inTexDatum;',
|
||||
' outTint = inTint;',
|
||||
|
@ -168201,6 +168184,7 @@ module.exports = [
|
|||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#define ROUND_BIAS 0.5001',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform int uRoundPixels;',
|
||||
|
@ -168214,11 +168198,8 @@ module.exports = [
|
|||
'#pragma phaserTemplate(vertexHeader)',
|
||||
'void main ()',
|
||||
'{',
|
||||
' gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);',
|
||||
' if (uRoundPixels == 1)',
|
||||
' {',
|
||||
' gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;',
|
||||
' }',
|
||||
' vec2 position = uRoundPixels == 1 ? floor(inPosition + ROUND_BIAS) : inPosition;',
|
||||
' gl_Position = uProjectionMatrix * vec4(position, 1.0, 1.0);',
|
||||
' outTexCoord = inTexCoord;',
|
||||
' outTileStride = uTileWidthHeightMarginSpacing.xy + uTileWidthHeightMarginSpacing.zz;',
|
||||
' #pragma phaserTemplate(vertexProcess)',
|
||||
|
@ -169652,7 +169633,7 @@ var WebGLFramebufferWrapper = new Class({
|
|||
{
|
||||
framebuffer: this
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
|
||||
// Create attachments.
|
||||
for (i = 0; i < this.attachments.length; i++)
|
||||
|
@ -172354,7 +172335,8 @@ var WebGLVAOWrapper = new Class({
|
|||
var attributeIndex = glAttributeNames.get(layout.name);
|
||||
if (attributeIndex === undefined)
|
||||
{
|
||||
throw new Error('Attribute not found: ' + layout.name);
|
||||
// This attribute is not used in the shader, so skip it.
|
||||
continue;
|
||||
}
|
||||
var attributeInfo = glAttributes[attributeIndex];
|
||||
layout.location = attributeInfo.location;
|
||||
|
|
2
dist/phaser-arcade-physics.min.js
vendored
2
dist/phaser-arcade-physics.min.js
vendored
File diff suppressed because one or more lines are too long
88
dist/phaser.esm.js
vendored
88
dist/phaser.esm.js
vendored
|
@ -15653,7 +15653,7 @@ var CONST = {
|
|||
* @type {string}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
VERSION: '4.0.0 Beta 1',
|
||||
VERSION: '4.0.0 Beta 2',
|
||||
|
||||
/**
|
||||
* Phaser Release Version as displayed in the console.log header URL.
|
||||
|
@ -32041,6 +32041,7 @@ module.exports = Glow;
|
|||
*/
|
||||
|
||||
var Class = __webpack_require__(83419);
|
||||
var UUID = __webpack_require__(45650);
|
||||
var Controller = __webpack_require__(13045);
|
||||
|
||||
/**
|
||||
|
@ -32200,11 +32201,10 @@ var Mask = new Class({
|
|||
return;
|
||||
}
|
||||
|
||||
var textureManager = this.camera.scene.sys.textures;
|
||||
|
||||
if (!this._dynamicTexture)
|
||||
{
|
||||
this._dynamicTexture = textureManager.addDynamicTexture('', width, height);
|
||||
var textureManager = this.camera.scene.sys.textures;
|
||||
this._dynamicTexture = textureManager.addDynamicTexture(UUID(), width, height);
|
||||
}
|
||||
else if (this._dynamicTexture.width !== width || this._dynamicTexture.height !== height)
|
||||
{
|
||||
|
@ -50057,6 +50057,9 @@ var ExternRender = __webpack_require__(64993);
|
|||
* override the `render` (and optionally `preUpdate`) methods and pass off control to your
|
||||
* 3rd party libraries or custom WebGL code there.
|
||||
*
|
||||
* The `render` method is called with this signature:
|
||||
* `render(renderer: Phaser.Renderer.WebGL.WebGLRenderer, drawingContext: Phaser.Renderer.WebGL.DrawingContext, calcMatrix: Phaser.GameObjects.Components.TransformMatrix): void`.
|
||||
*
|
||||
* Once you've finished, you should free-up any of your resources.
|
||||
* The Extern will then return Phaser state and carry on rendering the display list.
|
||||
*
|
||||
|
@ -50130,7 +50133,7 @@ var Extern = new Class({
|
|||
render: function ()
|
||||
{
|
||||
// override this!
|
||||
// Arguments: renderer, camera, calcMatrix
|
||||
// Arguments: renderer, drawingContext, calcMatrix
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -50253,7 +50256,7 @@ var ExternWebGLRenderer = function (renderer, src, drawingContext, parentMatrix)
|
|||
|
||||
var calcMatrix = GetCalcMatrix(src, drawingContext.camera, parentMatrix).calc;
|
||||
|
||||
src.render.call(src, renderer, drawingContext.camera, calcMatrix);
|
||||
src.render.call(src, renderer, drawingContext, calcMatrix);
|
||||
|
||||
renderer.renderNodes.getNode('RebindContext').run(drawingContext);
|
||||
};
|
||||
|
@ -67774,7 +67777,7 @@ module.exports = RenderFiltersWebGLRenderer;
|
|||
*/
|
||||
|
||||
var Class = __webpack_require__(83419);
|
||||
var DynamicTexture = __webpack_require__(81320);
|
||||
var UUID = __webpack_require__(45650);
|
||||
var Image = __webpack_require__(88571);
|
||||
|
||||
/**
|
||||
|
@ -67839,7 +67842,7 @@ var RenderTexture = new Class({
|
|||
if (width === undefined) { width = 32; }
|
||||
if (height === undefined) { height = 32; }
|
||||
|
||||
var dynamicTexture = new DynamicTexture(scene.sys.textures, '', width, height);
|
||||
var dynamicTexture = scene.sys.textures.addDynamicTexture(UUID(), width, height);
|
||||
|
||||
Image.call(this, scene, x, y, dynamicTexture);
|
||||
|
||||
|
@ -81063,16 +81066,8 @@ var TileSprite = new Class({
|
|||
var displayTexture = scene.sys.textures.get(textureKey);
|
||||
var displayFrame = displayTexture.get(frameKey);
|
||||
|
||||
if (!width || !height)
|
||||
{
|
||||
width = displayFrame.width;
|
||||
height = displayFrame.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = Math.floor(width);
|
||||
height = Math.floor(height);
|
||||
}
|
||||
width = width ? Math.floor(width) : displayFrame.width;
|
||||
height = height ? Math.floor(height) : displayFrame.height;
|
||||
|
||||
/**
|
||||
* Internal tile position vector.
|
||||
|
@ -173125,16 +173120,6 @@ var WebGLRenderer = new Class({
|
|||
*/
|
||||
this.mipmapFilter = null;
|
||||
|
||||
/**
|
||||
* The default scissor, set during `preRender` and modified during `resize`.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.WebGLRenderer#defaultScissor
|
||||
* @type {number[]}
|
||||
* @private
|
||||
* @since 3.50.0
|
||||
*/
|
||||
this.defaultScissor = [ 0, 0, 0, 0 ];
|
||||
|
||||
/**
|
||||
* Has this renderer fully booted yet?
|
||||
*
|
||||
|
@ -173502,10 +173487,6 @@ var WebGLRenderer = new Class({
|
|||
);
|
||||
this.on(Events.RESIZE, this.baseDrawingContext.resize, this.baseDrawingContext);
|
||||
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
||||
|
||||
gl.enable(gl.SCISSOR_TEST);
|
||||
|
||||
game.scale.on(ScaleEvents.RESIZE, this.onResize, this);
|
||||
|
||||
this.resize(width, height);
|
||||
|
@ -173759,14 +173740,14 @@ var WebGLRenderer = new Class({
|
|||
|
||||
this.setProjectionMatrix(width, height);
|
||||
|
||||
gl.viewport(0, 0, width, height);
|
||||
|
||||
this.drawingBufferHeight = gl.drawingBufferHeight;
|
||||
|
||||
gl.scissor(0, (gl.drawingBufferHeight - height), width, height);
|
||||
|
||||
this.defaultScissor[2] = width;
|
||||
this.defaultScissor[3] = height;
|
||||
this.glWrapper.update({
|
||||
scissor: {
|
||||
box: [ 0, (gl.drawingBufferHeight - height), width, height ]
|
||||
},
|
||||
viewport: [ 0, 0, width, height ]
|
||||
});
|
||||
|
||||
this.emit(Events.RESIZE, width, height);
|
||||
|
||||
|
@ -175362,7 +175343,7 @@ var WebGLGlobalParametersFactory = {
|
|||
cullFace: false,
|
||||
depthTest: false,
|
||||
scissor: {
|
||||
enable: false,
|
||||
enable: true,
|
||||
box: [ 0, 0, 0, 0 ]
|
||||
},
|
||||
stencil: WebGLStencilParametersFactory.create(renderer),
|
||||
|
@ -179437,7 +179418,7 @@ var RebindContext = new Class({
|
|||
// Clear the current framebuffer's stencil and depth renderbuffers.
|
||||
renderer.clearFramebuffer(
|
||||
undefined,
|
||||
renderer.hasActiveStencilMask() ? undefined : 0,
|
||||
undefined, // Stencil is currently not implemented by DrawingContext.
|
||||
0
|
||||
);
|
||||
|
||||
|
@ -181211,7 +181192,7 @@ var BaseFilterShader = new Class({
|
|||
{
|
||||
if (!fragmentShaderSource)
|
||||
{
|
||||
var baseShader = manager.renderer.shaders.get(fragmentShaderKey);
|
||||
var baseShader = manager.renderer.game.cache.shader.get(fragmentShaderKey);
|
||||
if (!(baseShader && baseShader.glsl))
|
||||
{
|
||||
throw new Error('BaseFilterShader: No fragment shader source provided and no shader found with key ' + fragmentShaderKey);
|
||||
|
@ -185609,7 +185590,11 @@ module.exports = [
|
|||
'#pragma phaserTemplate(shaderName)',
|
||||
'#pragma phaserTemplate(extensions)',
|
||||
'#pragma phaserTemplate(features)',
|
||||
'#ifdef GL_FRAGMENT_PRECISION_HIGH',
|
||||
'precision highp float;',
|
||||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform vec2 uResolution;',
|
||||
|
@ -185743,6 +185728,7 @@ module.exports = [
|
|||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#define ROUND_BIAS 0.5001',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform int uRoundPixels;',
|
||||
|
@ -185760,11 +185746,8 @@ module.exports = [
|
|||
'#pragma phaserTemplate(vertexHeader)',
|
||||
'void main ()',
|
||||
'{',
|
||||
' gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);',
|
||||
' if (uRoundPixels == 1)',
|
||||
' {',
|
||||
' gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;',
|
||||
' }',
|
||||
' vec2 position = uRoundPixels == 1 ? floor(inPosition + ROUND_BIAS) : inPosition;',
|
||||
' gl_Position = uProjectionMatrix * vec4(position, 1.0, 1.0);',
|
||||
' outTexCoord = inTexCoord;',
|
||||
' outTexDatum = inTexDatum;',
|
||||
' outTint = inTint;',
|
||||
|
@ -186190,6 +186173,7 @@ module.exports = [
|
|||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#define ROUND_BIAS 0.5001',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform int uRoundPixels;',
|
||||
|
@ -186203,11 +186187,8 @@ module.exports = [
|
|||
'#pragma phaserTemplate(vertexHeader)',
|
||||
'void main ()',
|
||||
'{',
|
||||
' gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);',
|
||||
' if (uRoundPixels == 1)',
|
||||
' {',
|
||||
' gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;',
|
||||
' }',
|
||||
' vec2 position = uRoundPixels == 1 ? floor(inPosition + ROUND_BIAS) : inPosition;',
|
||||
' gl_Position = uProjectionMatrix * vec4(position, 1.0, 1.0);',
|
||||
' outTexCoord = inTexCoord;',
|
||||
' outTileStride = uTileWidthHeightMarginSpacing.xy + uTileWidthHeightMarginSpacing.zz;',
|
||||
' #pragma phaserTemplate(vertexProcess)',
|
||||
|
@ -187641,7 +187622,7 @@ var WebGLFramebufferWrapper = new Class({
|
|||
{
|
||||
framebuffer: this
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
|
||||
// Create attachments.
|
||||
for (i = 0; i < this.attachments.length; i++)
|
||||
|
@ -190343,7 +190324,8 @@ var WebGLVAOWrapper = new Class({
|
|||
var attributeIndex = glAttributeNames.get(layout.name);
|
||||
if (attributeIndex === undefined)
|
||||
{
|
||||
throw new Error('Attribute not found: ' + layout.name);
|
||||
// This attribute is not used in the shader, so skip it.
|
||||
continue;
|
||||
}
|
||||
var attributeInfo = glAttributes[attributeIndex];
|
||||
layout.location = attributeInfo.location;
|
||||
|
|
2
dist/phaser.esm.min.js
vendored
2
dist/phaser.esm.min.js
vendored
File diff suppressed because one or more lines are too long
88
dist/phaser.js
vendored
88
dist/phaser.js
vendored
|
@ -15665,7 +15665,7 @@ var CONST = {
|
|||
* @type {string}
|
||||
* @since 3.0.0
|
||||
*/
|
||||
VERSION: '4.0.0 Beta 1',
|
||||
VERSION: '4.0.0 Beta 2',
|
||||
|
||||
/**
|
||||
* Phaser Release Version as displayed in the console.log header URL.
|
||||
|
@ -32053,6 +32053,7 @@ module.exports = Glow;
|
|||
*/
|
||||
|
||||
var Class = __webpack_require__(83419);
|
||||
var UUID = __webpack_require__(45650);
|
||||
var Controller = __webpack_require__(13045);
|
||||
|
||||
/**
|
||||
|
@ -32212,11 +32213,10 @@ var Mask = new Class({
|
|||
return;
|
||||
}
|
||||
|
||||
var textureManager = this.camera.scene.sys.textures;
|
||||
|
||||
if (!this._dynamicTexture)
|
||||
{
|
||||
this._dynamicTexture = textureManager.addDynamicTexture('', width, height);
|
||||
var textureManager = this.camera.scene.sys.textures;
|
||||
this._dynamicTexture = textureManager.addDynamicTexture(UUID(), width, height);
|
||||
}
|
||||
else if (this._dynamicTexture.width !== width || this._dynamicTexture.height !== height)
|
||||
{
|
||||
|
@ -50069,6 +50069,9 @@ var ExternRender = __webpack_require__(64993);
|
|||
* override the `render` (and optionally `preUpdate`) methods and pass off control to your
|
||||
* 3rd party libraries or custom WebGL code there.
|
||||
*
|
||||
* The `render` method is called with this signature:
|
||||
* `render(renderer: Phaser.Renderer.WebGL.WebGLRenderer, drawingContext: Phaser.Renderer.WebGL.DrawingContext, calcMatrix: Phaser.GameObjects.Components.TransformMatrix): void`.
|
||||
*
|
||||
* Once you've finished, you should free-up any of your resources.
|
||||
* The Extern will then return Phaser state and carry on rendering the display list.
|
||||
*
|
||||
|
@ -50142,7 +50145,7 @@ var Extern = new Class({
|
|||
render: function ()
|
||||
{
|
||||
// override this!
|
||||
// Arguments: renderer, camera, calcMatrix
|
||||
// Arguments: renderer, drawingContext, calcMatrix
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -50265,7 +50268,7 @@ var ExternWebGLRenderer = function (renderer, src, drawingContext, parentMatrix)
|
|||
|
||||
var calcMatrix = GetCalcMatrix(src, drawingContext.camera, parentMatrix).calc;
|
||||
|
||||
src.render.call(src, renderer, drawingContext.camera, calcMatrix);
|
||||
src.render.call(src, renderer, drawingContext, calcMatrix);
|
||||
|
||||
renderer.renderNodes.getNode('RebindContext').run(drawingContext);
|
||||
};
|
||||
|
@ -67786,7 +67789,7 @@ module.exports = RenderFiltersWebGLRenderer;
|
|||
*/
|
||||
|
||||
var Class = __webpack_require__(83419);
|
||||
var DynamicTexture = __webpack_require__(81320);
|
||||
var UUID = __webpack_require__(45650);
|
||||
var Image = __webpack_require__(88571);
|
||||
|
||||
/**
|
||||
|
@ -67851,7 +67854,7 @@ var RenderTexture = new Class({
|
|||
if (width === undefined) { width = 32; }
|
||||
if (height === undefined) { height = 32; }
|
||||
|
||||
var dynamicTexture = new DynamicTexture(scene.sys.textures, '', width, height);
|
||||
var dynamicTexture = scene.sys.textures.addDynamicTexture(UUID(), width, height);
|
||||
|
||||
Image.call(this, scene, x, y, dynamicTexture);
|
||||
|
||||
|
@ -81075,16 +81078,8 @@ var TileSprite = new Class({
|
|||
var displayTexture = scene.sys.textures.get(textureKey);
|
||||
var displayFrame = displayTexture.get(frameKey);
|
||||
|
||||
if (!width || !height)
|
||||
{
|
||||
width = displayFrame.width;
|
||||
height = displayFrame.height;
|
||||
}
|
||||
else
|
||||
{
|
||||
width = Math.floor(width);
|
||||
height = Math.floor(height);
|
||||
}
|
||||
width = width ? Math.floor(width) : displayFrame.width;
|
||||
height = height ? Math.floor(height) : displayFrame.height;
|
||||
|
||||
/**
|
||||
* Internal tile position vector.
|
||||
|
@ -173226,16 +173221,6 @@ var WebGLRenderer = new Class({
|
|||
*/
|
||||
this.mipmapFilter = null;
|
||||
|
||||
/**
|
||||
* The default scissor, set during `preRender` and modified during `resize`.
|
||||
*
|
||||
* @name Phaser.Renderer.WebGL.WebGLRenderer#defaultScissor
|
||||
* @type {number[]}
|
||||
* @private
|
||||
* @since 3.50.0
|
||||
*/
|
||||
this.defaultScissor = [ 0, 0, 0, 0 ];
|
||||
|
||||
/**
|
||||
* Has this renderer fully booted yet?
|
||||
*
|
||||
|
@ -173603,10 +173588,6 @@ var WebGLRenderer = new Class({
|
|||
);
|
||||
this.on(Events.RESIZE, this.baseDrawingContext.resize, this.baseDrawingContext);
|
||||
|
||||
gl.bindFramebuffer(gl.FRAMEBUFFER, null);
|
||||
|
||||
gl.enable(gl.SCISSOR_TEST);
|
||||
|
||||
game.scale.on(ScaleEvents.RESIZE, this.onResize, this);
|
||||
|
||||
this.resize(width, height);
|
||||
|
@ -173860,14 +173841,14 @@ var WebGLRenderer = new Class({
|
|||
|
||||
this.setProjectionMatrix(width, height);
|
||||
|
||||
gl.viewport(0, 0, width, height);
|
||||
|
||||
this.drawingBufferHeight = gl.drawingBufferHeight;
|
||||
|
||||
gl.scissor(0, (gl.drawingBufferHeight - height), width, height);
|
||||
|
||||
this.defaultScissor[2] = width;
|
||||
this.defaultScissor[3] = height;
|
||||
this.glWrapper.update({
|
||||
scissor: {
|
||||
box: [ 0, (gl.drawingBufferHeight - height), width, height ]
|
||||
},
|
||||
viewport: [ 0, 0, width, height ]
|
||||
});
|
||||
|
||||
this.emit(Events.RESIZE, width, height);
|
||||
|
||||
|
@ -175463,7 +175444,7 @@ var WebGLGlobalParametersFactory = {
|
|||
cullFace: false,
|
||||
depthTest: false,
|
||||
scissor: {
|
||||
enable: false,
|
||||
enable: true,
|
||||
box: [ 0, 0, 0, 0 ]
|
||||
},
|
||||
stencil: WebGLStencilParametersFactory.create(renderer),
|
||||
|
@ -179538,7 +179519,7 @@ var RebindContext = new Class({
|
|||
// Clear the current framebuffer's stencil and depth renderbuffers.
|
||||
renderer.clearFramebuffer(
|
||||
undefined,
|
||||
renderer.hasActiveStencilMask() ? undefined : 0,
|
||||
undefined, // Stencil is currently not implemented by DrawingContext.
|
||||
0
|
||||
);
|
||||
|
||||
|
@ -181312,7 +181293,7 @@ var BaseFilterShader = new Class({
|
|||
{
|
||||
if (!fragmentShaderSource)
|
||||
{
|
||||
var baseShader = manager.renderer.shaders.get(fragmentShaderKey);
|
||||
var baseShader = manager.renderer.game.cache.shader.get(fragmentShaderKey);
|
||||
if (!(baseShader && baseShader.glsl))
|
||||
{
|
||||
throw new Error('BaseFilterShader: No fragment shader source provided and no shader found with key ' + fragmentShaderKey);
|
||||
|
@ -185710,7 +185691,11 @@ module.exports = [
|
|||
'#pragma phaserTemplate(shaderName)',
|
||||
'#pragma phaserTemplate(extensions)',
|
||||
'#pragma phaserTemplate(features)',
|
||||
'#ifdef GL_FRAGMENT_PRECISION_HIGH',
|
||||
'precision highp float;',
|
||||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform vec2 uResolution;',
|
||||
|
@ -185844,6 +185829,7 @@ module.exports = [
|
|||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#define ROUND_BIAS 0.5001',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform int uRoundPixels;',
|
||||
|
@ -185861,11 +185847,8 @@ module.exports = [
|
|||
'#pragma phaserTemplate(vertexHeader)',
|
||||
'void main ()',
|
||||
'{',
|
||||
' gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);',
|
||||
' if (uRoundPixels == 1)',
|
||||
' {',
|
||||
' gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;',
|
||||
' }',
|
||||
' vec2 position = uRoundPixels == 1 ? floor(inPosition + ROUND_BIAS) : inPosition;',
|
||||
' gl_Position = uProjectionMatrix * vec4(position, 1.0, 1.0);',
|
||||
' outTexCoord = inTexCoord;',
|
||||
' outTexDatum = inTexDatum;',
|
||||
' outTint = inTint;',
|
||||
|
@ -186291,6 +186274,7 @@ module.exports = [
|
|||
'#else',
|
||||
'precision mediump float;',
|
||||
'#endif',
|
||||
'#define ROUND_BIAS 0.5001',
|
||||
'#pragma phaserTemplate(vertexDefine)',
|
||||
'uniform mat4 uProjectionMatrix;',
|
||||
'uniform int uRoundPixels;',
|
||||
|
@ -186304,11 +186288,8 @@ module.exports = [
|
|||
'#pragma phaserTemplate(vertexHeader)',
|
||||
'void main ()',
|
||||
'{',
|
||||
' gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);',
|
||||
' if (uRoundPixels == 1)',
|
||||
' {',
|
||||
' gl_Position.xy = floor(((gl_Position.xy + 1.0) * 0.5 * uResolution) + 0.5) / uResolution * 2.0 - 1.0;',
|
||||
' }',
|
||||
' vec2 position = uRoundPixels == 1 ? floor(inPosition + ROUND_BIAS) : inPosition;',
|
||||
' gl_Position = uProjectionMatrix * vec4(position, 1.0, 1.0);',
|
||||
' outTexCoord = inTexCoord;',
|
||||
' outTileStride = uTileWidthHeightMarginSpacing.xy + uTileWidthHeightMarginSpacing.zz;',
|
||||
' #pragma phaserTemplate(vertexProcess)',
|
||||
|
@ -187742,7 +187723,7 @@ var WebGLFramebufferWrapper = new Class({
|
|||
{
|
||||
framebuffer: this
|
||||
}
|
||||
});
|
||||
}, true);
|
||||
|
||||
// Create attachments.
|
||||
for (i = 0; i < this.attachments.length; i++)
|
||||
|
@ -190444,7 +190425,8 @@ var WebGLVAOWrapper = new Class({
|
|||
var attributeIndex = glAttributeNames.get(layout.name);
|
||||
if (attributeIndex === undefined)
|
||||
{
|
||||
throw new Error('Attribute not found: ' + layout.name);
|
||||
// This attribute is not used in the shader, so skip it.
|
||||
continue;
|
||||
}
|
||||
var attributeInfo = glAttributes[attributeIndex];
|
||||
layout.location = attributeInfo.location;
|
||||
|
|
2
dist/phaser.min.js
vendored
2
dist/phaser.min.js
vendored
File diff suppressed because one or more lines are too long
29215
types/phaser.d.ts
vendored
29215
types/phaser.d.ts
vendored
File diff suppressed because it is too large
Load diff
324764
types/phaser.json
324764
types/phaser.json
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue