Skip to content

Commit ed5138d

Browse files
committed
perf: strictly limit per-second price change to 0.5% and rebuild dist
1 parent 0c962fd commit ed5138d

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

commodity-crisis/dist/assets/index-ErrN0c3M.js renamed to commodity-crisis/dist/assets/index-Bod71NSB.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

commodity-crisis/dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</script>
1717
<!-- Busuanzi -->
1818
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
19-
<script type="module" crossorigin src="/games/commodity-crisis/assets/index-ErrN0c3M.js"></script>
19+
<script type="module" crossorigin src="/games/commodity-crisis/assets/index-Bod71NSB.js"></script>
2020
<link rel="stylesheet" crossorigin href="/games/commodity-crisis/assets/index-C8HuocnS.css">
2121
</head>
2222
<body>

commodity-crisis/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ const App: React.FC = () => {
156156
const newsPower = activeImpactsRef.current[asset] * (0.7 + Math.random() * 0.6);
157157

158158
let delta = randomNoise + momentum + reversion + newsPower;
159-
// 防溢出保护:单秒变动严禁超过 20%
160-
delta = Math.max(-0.2, Math.min(0.2, delta));
159+
// 严格限制:单秒变动严禁超过 0.5%
160+
delta = Math.max(-0.005, Math.min(0.005, delta));
161161

162162
let p = prevP * (1 + delta);
163163

0 commit comments

Comments
 (0)