Skip to content
Snippets Groups Projects
Commit 421f98ef authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

feat: #fe tweak waves

parent 0a77d9a0
No related branches found
No related tags found
No related merge requests found
...@@ -470,7 +470,7 @@ export default class FightScene extends Phaser.Scene { ...@@ -470,7 +470,7 @@ export default class FightScene extends Phaser.Scene {
return scale / Math.pow(Math.random(), 1 / shape); return scale / Math.pow(Math.random(), 1 / shape);
} }
sawtoothRamp(t: number, peaksCount = 10, dipsHeight = 0.1, midwayAt = 0.3) { sawtoothRamp(t: number, peaksCount = 5, dipsHeight = 0.2, midwayAt = 0.3) {
// https://www.desmos.com/calculator/7zcb6p8qeu // https://www.desmos.com/calculator/7zcb6p8qeu
// NOTE: this always maps [0;1] ↦ [0;1] // NOTE: this always maps [0;1] ↦ [0;1]
const ramp = t * (peaksCount * dipsHeight + 1); const ramp = t * (peaksCount * dipsHeight + 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment