Skip to content

Commit 9a7723a

Browse files
committed
fix: VRT時に差分が発生しないようにする(端数処理)
1 parent cb67abf commit 9a7723a

File tree

1 file changed

+2
-2
lines changed
  • src/useCases/Home/components/Hero/assets/effect

1 file changed

+2
-2
lines changed

src/useCases/Home/components/Hero/assets/effect/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export class Effect {
5555
const radian = p.pow(1.06, theta)
5656
const noise = p.noise(theta, offset.y, offset.z) + 1
5757

58-
const x = (spacing + radian) * p.cos(theta) * noise
59-
const y = (spacing + radian) * p.sin(theta) * noise
58+
const x = p.round((spacing + radian) * p.cos(theta) * noise, 2)
59+
const y = p.round((spacing + radian) * p.sin(theta) * noise, 2)
6060

6161
// 画面外の場合は描画を終了する
6262
if (x < -p.width && p.height < y) break

0 commit comments

Comments
 (0)