生成excel开发中 进度 10%

This commit is contained in:
rucky
2022-03-22 00:49:58 +08:00
parent 8507d848b4
commit a36a99c1f3
8 changed files with 1488 additions and 1001 deletions

View File

@@ -2,7 +2,7 @@ var FPS = FPS || {};
FPS.time = 0;
FPS.FPS = 0;
FPS.showText = "";
FPS.startFPS = function (stage,pos = {x : 0, y : 0}, app){
FPS.startFPS = function (stage, pos = { x: 0, y: 0 }, app) {
FPS.app = app;
FPS.pos = pos;
FPS.shape = new createjs.Shape();
@@ -10,45 +10,40 @@ FPS.startFPS = function (stage,pos = {x : 0, y : 0}, app){
FPS.shape.alpha = .5;
FPS.txt = new createjs.Text("COUNT:", "24px Arial", "#ffffff");
FPS.txt.x = 20;
FPS.txt.y = pos.y+10;
FPS.txt.y = pos.y + 10;
FPS.container = new createjs.Container();
if (FPS.app.debug) {
stage.addChild(FPS.container);
}
FPS.container.addChild(FPS.shape)
FPS.container.addChild(FPS.txt);
FPS.container.cache(pos.x, pos.y, 140,50);
// FPS.container.addChild(FPS.shape)
// FPS.container.addChild(FPS.txt);
FPS.container.cache(pos.x, pos.y, 140, 50);
createjs.Ticker.addEventListener("tick", FPS.TickerFPS);
// setInterval(FPS.TickerFPS,18)
// setInterval(FPS.TickerFPS,18)
}
FPS.TickerFPS = function (event)
{
FPS.TickerFPS = function (event) {
FPS.date = new Date();
FPS.currentTime = FPS.date.getTime();
if(FPS.time!=0)
{
FPS.FPS = Math.ceil(1000/(FPS.currentTime - FPS.time));
if (FPS.time != 0) {
FPS.FPS = Math.ceil(1000 / (FPS.currentTime - FPS.time));
}
FPS.time = FPS.currentTime;
FPS.txt.text = "FPS: "+FPS.FPS + "\n" + FPS.showText;
FPS.container.cache(FPS.pos.x, FPS.pos.y, 140,50);
FPS.txt.text = "FPS: " + FPS.FPS + "\n" + FPS.showText;
FPS.container.cache(FPS.pos.x, FPS.pos.y, 140, 50);
}
FPS.startFPS2 = function (stage)
{
FPS.startFPS2 = function (stage) {
FPS.txt = document.getElementById("fps");
createjs.Ticker.addEventListener("tick", FPS.TickerFPS2);
}
FPS.TickerFPS2 = function (event)
{
FPS.TickerFPS2 = function (event) {
FPS.date = new Date();
FPS.currentTime = FPS.date.getTime();
if(FPS.time!=0)
{
FPS.FPS = Math.ceil(1000/(FPS.currentTime - FPS.time));
if (FPS.time != 0) {
FPS.FPS = Math.ceil(1000 / (FPS.currentTime - FPS.time));
}
FPS.time = FPS.currentTime;
FPS.txt.innerText = "FPS: "+FPS.FPS;
FPS.txt.innerText = "FPS: " + FPS.FPS;
}
module.exports = FPS;