Initial project sync

This commit is contained in:
wxm
2026-07-06 22:55:14 -07:00
commit 8cca00d0da
1066 changed files with 58585 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
class_name ChartEvent
extends Resource
@export var event_id: StringName = &""
@export var beat_index := 0
@export var subdivision := 0
@export var subdivisions_per_beat := 1
@export var event_type: StringName = &""
@export var target_id: StringName = &""
@export var action_id: StringName = &""
@export var payload: Dictionary = {}
@export var lead_beats := 1.0
@export var time_phase_mask: StringName = &"both"
func matches_time_phase(time_phase: StringName) -> bool:
if time_phase_mask.is_empty() or time_phase_mask == &"both":
return true
return time_phase_mask == time_phase
func beat_position() -> float:
var safe_subdivisions := maxi(1, subdivisions_per_beat)
return float(beat_index) + float(subdivision) / float(safe_subdivisions)
func time_seconds(beat_time: float) -> float:
return beat_position() * maxf(0.001, beat_time)
func key() -> StringName:
if not event_id.is_empty():
return event_id
return StringName("%s:%s:%d:%d" % [event_type, target_id, beat_index, subdivision])