mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 23:05:01 +08:00
[ts] center loading screen logo + spinner
This commit is contained in:
parent
ea66b3578d
commit
99a5f43aca
@ -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
@ -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
@ -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
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user