-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
8,376 additions
and
8,015 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
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
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,38 @@ | ||
export const loopFps = () => { | ||
if ( | ||
null == window.localStorage.getItem('fpson') || | ||
'1' == window.localStorage.getItem('fpson') | ||
) { | ||
var rAF = | ||
window.requestAnimationFrame || | ||
window.webkitRequestAnimationFrame || | ||
function (e) { | ||
window.setTimeout(e, 1e3 / 60) | ||
}, | ||
frame = 0, | ||
allFrameCount = 0, | ||
lastTime = Date.now(), | ||
lastFameTime = Date.now(), | ||
loop = function () { | ||
var e = Date.now(), | ||
a = e - lastFameTime, | ||
o = Math.round(1e3 / a) | ||
if ( | ||
((lastFameTime = e), allFrameCount++, frame++, e > 1e3 + lastTime) | ||
) { | ||
if ((o = Math.round((1e3 * frame) / (e - lastTime))) <= 5) | ||
var n = '<span style="color:#bd0000">卡成ppt🤢</span>' | ||
else if (o <= 15) n = '<span style="color:red">电竞级帧率😖</span>' | ||
else if (o <= 25) n = '<span style="color:orange">有点难受😨</span>' | ||
else if (o < 35) n = '<span style="color:#9338e6">不太流畅🙄</span>' | ||
else if (o <= 45) n = '<span style="color:#08b7e4">还不错哦😁</span>' | ||
else n = '<span style="color:#39c5bb">十分流畅🤣</span>' | ||
;(document.getElementById('fps').innerHTML = `FPS: ${o}🚀`), | ||
(frame = 0), | ||
(lastTime = e) | ||
} | ||
rAF(loop) | ||
} | ||
loop() | ||
} else document.getElementById('fps').style = 'display:none!important' | ||
} |
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,5 +1,6 @@ | ||
--- | ||
permalink: / | ||
lang: zh-CN | ||
--- | ||
|
||
```js | ||
|
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,3 +1,8 @@ | ||
<!-- --- | ||
title: React.Fragment和空标签的区别 | ||
lang: zh-CN | ||
--- --> | ||
|
||
<!-- # 学习之路 | ||
## 大学经历 | ||
|
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,3 +1,7 @@ | ||
--- | ||
title: MIME类型 | ||
lang: zh-CN | ||
--- | ||
# MIME类型 | ||
> | ||
> 本文作者:[onresize](https://github.com/onresize) | ||
|
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.