-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat-mvp' of github.com:Mississippi-Labs/mississippi in…
…to feat-mvp
- Loading branch information
Showing
12 changed files
with
3,061 additions
and
8,958 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,4 @@ packages/contracts/types/* | |
!packages/contracts/out/IWorld.sol/ | ||
|
||
packages/client/dist/* | ||
.idea/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.home-header { | ||
position: fixed; | ||
z-index: 2; | ||
z-index: 999; | ||
display: flex; | ||
align-items: center; | ||
top: 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* Created by ui on 2016/6/13. | ||
*/ | ||
const showFPS = (function () { | ||
const requestAnimationFrame = | ||
window.requestAnimationFrame; | ||
// 去他大爷的兼容 | ||
//|| //Chromium | ||
//window.webkitRequestAnimationFrame || //Webkit | ||
//window.mozRequestAnimationFrame || //Mozilla Geko | ||
//window.oRequestAnimationFrame || //Opera Presto | ||
//window.msRequestAnimationFrame || //IE Trident? | ||
//function(callback) { //Fallback function | ||
// window.setTimeout(callback, 1000/60); | ||
//} | ||
let e, pe, pid, fps, last, offset; | ||
|
||
fps = 0; | ||
last = Date.now(); | ||
const step = function () { | ||
offset = Date.now() - last; | ||
fps += 1; | ||
if (offset >= 1000) { | ||
last += offset; | ||
appendFps(fps); | ||
fps = 0; | ||
} | ||
requestAnimationFrame(step); | ||
}; | ||
//显示fps; 如果未指定元素id,默认<body>标签 | ||
const appendFps = function (fps) { | ||
if (!e) e = document.createElement('span'); | ||
e.style = ` | ||
position: fixed; | ||
right: 0; | ||
top: 0; | ||
color: red; | ||
z-index: 999; | ||
` | ||
pe = pid ? document.getElementById(pid) : document.getElementsByTagName('body')[0]; | ||
e.innerHTML = "fps: " + fps; | ||
pe.appendChild(e); | ||
} | ||
return { | ||
setParentElementId: function (id) { | ||
pid = id; | ||
}, | ||
go: function () { | ||
step(); | ||
} | ||
} | ||
})(); | ||
|
||
export default showFPS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.