[ts] center loading screen logo + spinner

This commit is contained in:
badlogic 2016-09-02 16:55:15 +02:00
parent ea66b3578d
commit 99a5f43aca
7 changed files with 15 additions and 15 deletions

View File

@ -5340,7 +5340,7 @@ var spine;
}
LoadingScreen.prototype.draw = function () {
this.timeKeeper.update();
this.angle += this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
this.angle -= this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
var renderer = this.renderer;
var canvas = renderer.canvas;
var gl = renderer.gl;
@ -5365,8 +5365,8 @@ var spine;
var margin = 15;
var height = logoHeight + margin + spinnerHeight;
renderer.begin();
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + margin / 2, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - margin / 2 - spinnerHeight, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + height / 2 - logoHeight, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - height / 2, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.end();
};
LoadingScreen.loaded = 0;

File diff suppressed because one or more lines are too long

View File

@ -4917,7 +4917,7 @@ var spine;
}
LoadingScreen.prototype.draw = function () {
this.timeKeeper.update();
this.angle += this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
this.angle -= this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
var renderer = this.renderer;
var canvas = renderer.canvas;
var gl = renderer.gl;
@ -4942,8 +4942,8 @@ var spine;
var margin = 15;
var height = logoHeight + margin + spinnerHeight;
renderer.begin();
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + margin / 2, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - margin / 2 - spinnerHeight, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + height / 2 - logoHeight, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - height / 2, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.end();
};
LoadingScreen.loaded = 0;

File diff suppressed because one or more lines are too long

View File

@ -4917,7 +4917,7 @@ var spine;
}
LoadingScreen.prototype.draw = function () {
this.timeKeeper.update();
this.angle += this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
this.angle -= this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
var renderer = this.renderer;
var canvas = renderer.canvas;
var gl = renderer.gl;
@ -4942,8 +4942,8 @@ var spine;
var margin = 15;
var height = logoHeight + margin + spinnerHeight;
renderer.begin();
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + margin / 2, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - margin / 2 - spinnerHeight, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + height / 2 - logoHeight, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - height / 2, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.end();
};
LoadingScreen.loaded = 0;

File diff suppressed because one or more lines are too long

View File

@ -43,7 +43,7 @@ module spine.webgl {
draw () {
this.timeKeeper.update();
this.angle += this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
this.angle -= this.timeKeeper.delta * 360 * (0.5 + 2 * Math.abs(Math.sin(this.timeKeeper.totalTime)));
var renderer = this.renderer;
var canvas = renderer.canvas;
@ -73,8 +73,8 @@ module spine.webgl {
var height = logoHeight + margin + spinnerHeight;
renderer.begin();
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + margin / 2, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - margin / 2 - spinnerHeight, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.drawTexture(this.logo, canvas.width / 2 - logoWidth / 2, canvas.height / 2 + height / 2 - logoHeight, logoWidth, logoHeight);
renderer.drawTextureRotated(this.spinner, canvas.width / 2 - spinnerWidth / 2, canvas.height / 2 - height / 2, spinnerWidth, spinnerHeight, spinnerWidth / 2, spinnerHeight / 2, this.angle);
renderer.end();
}
}