/
Initialization.ts
43 lines (34 loc) · 1.08 KB
/
Initialization.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { judgeLine } from '../judgeLine.js'
import { note } from '../note.js'
import { particle } from '../particle.js'
import { skin } from '../skin.js'
export class Initialization extends Archetype {
preprocess() {
const noteRadius = 0.2
const judgeLineY = -0.6
const t = screen.t + noteRadius
const b = judgeLineY
const h = t - b
const transform = Mat.identity.scale(h, -h).translate(0, t)
skin.transform.set(transform)
particle.transform.set(transform)
judgeLine.l = screen.l / h
judgeLine.r = screen.r / h
note.radius = noteRadius / h
ui.menu.set({
anchor: screen.rect.lt.add(new Vec(0.05, -0.05)),
pivot: { x: 0, y: 1 },
size: new Vec(0.15, 0.15).mul(ui.configuration.menu.scale),
rotation: 0,
alpha: ui.configuration.menu.alpha,
horizontalAlign: HorizontalAlign.Center,
background: true,
})
}
spawnOrder() {
return 0
}
updateSequential() {
this.despawn = true
}
}