mirror of
https://github.com/photonstorm/phaser
synced 2025-02-17 06:28:30 +00:00
Fixed rotation! and setting Canvas tint modes.
This commit is contained in:
parent
f6047763fa
commit
98d2bdf03b
4 changed files with 27 additions and 24 deletions
|
@ -45,6 +45,28 @@
|
|||
}
|
||||
|
||||
// PIXI Intro
|
||||
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/WebGLShaderUtils.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/shaders/PixiShader.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/shaders/PixiFastShader.js"></script>
|
||||
// <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/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>
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/WebGLMaskManager.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/WebGLStencilManager.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/WebGLShaderManager.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/WebGLFastSpriteBatch.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/WebGLFilterManager.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/webgl/utils/FilterTexture.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/canvas/utils/CanvasMaskManager.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/canvas/utils/CanvasTinter.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/canvas/CanvasRenderer.js"></script>
|
||||
// <script src="$path/src/pixi/renderers/canvas/CanvasGraphics.js"></script>
|
||||
|
||||
echo <<<EOL
|
||||
|
||||
<script src="$path/src/pixi/Pixi.js"></script>
|
||||
|
@ -52,28 +74,7 @@
|
|||
<script src="$path/src/pixi/display/DisplayObjectContainer.js"></script>
|
||||
<script src="$path/src/pixi/display/Sprite.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/WebGLShaderUtils.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/shaders/PixiShader.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/shaders/PixiFastShader.js"></script>
|
||||
<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/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>
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/WebGLMaskManager.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/WebGLStencilManager.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/WebGLShaderManager.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/WebGLFastSpriteBatch.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/WebGLFilterManager.js"></script>
|
||||
<script src="$path/src/pixi/renderers/webgl/utils/FilterTexture.js"></script>
|
||||
|
||||
<script src="$path/src/pixi/renderers/canvas/utils/CanvasBuffer.js"></script>
|
||||
<script src="$path/src/pixi/renderers/canvas/utils/CanvasMaskManager.js"></script>
|
||||
<script src="$path/src/pixi/renderers/canvas/utils/CanvasTinter.js"></script>
|
||||
<script src="$path/src/pixi/renderers/canvas/CanvasRenderer.js"></script>
|
||||
<script src="$path/src/pixi/renderers/canvas/CanvasGraphics.js"></script>
|
||||
|
||||
EOL;
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ PIXI.DisplayObject.prototype = {
|
|||
var a, b, c, d, tx, ty;
|
||||
|
||||
// so if rotation is between 0 then we can simplify the multiplication process..
|
||||
if (this.rotation % Phaser.Math.PI_2)
|
||||
if (this.rotation % Phaser.Math.PI2)
|
||||
{
|
||||
// check to see if the rotation is the same as the previous render. This means we only need to use sin and cos when rotation actually changes
|
||||
if (this.rotation !== this.rotationCache)
|
||||
|
|
|
@ -95,6 +95,8 @@ Phaser.Renderer.Canvas = function (game)
|
|||
this.currentBlendMode = 0;
|
||||
this.currentScaleMode = 0;
|
||||
|
||||
this.tintMethod = this.tintWithPerPixel;
|
||||
|
||||
this.init();
|
||||
|
||||
};
|
||||
|
@ -120,6 +122,8 @@ Phaser.Renderer.Canvas.prototype = {
|
|||
|
||||
if (this.game.device.canUseMultiply)
|
||||
{
|
||||
this.tintMethod = this.tintWithMultiply;
|
||||
|
||||
this.mapBlendModes();
|
||||
}
|
||||
|
||||
|
|
|
@ -767,8 +767,6 @@ Phaser.Device._initialize = function () {
|
|||
|
||||
Phaser.CanvasPool.removeByCanvas(canvas);
|
||||
|
||||
PIXI.CanvasTinter.tintMethod = (device.canUseMultiply) ? PIXI.CanvasTinter.tintWithMultiply : PIXI.CanvasTinter.tintWithPerPixel;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue