Rebrand project and refresh title presentation
This commit is contained in:
parent
17fef2c5d4
commit
7ae20789a9
138 changed files with 1511 additions and 1498 deletions
|
|
@ -9,6 +9,7 @@ const ControllerFocusNavigationType = preload(
|
|||
@export var desktop_reference_size: Vector2 = Vector2(396.0, 318.0)
|
||||
@export var compact_reference_size: Vector2 = Vector2(294.0, 200.0)
|
||||
@export_range(0.0, 1.0, 0.01) var motion_scale: float = 1.0
|
||||
@export var collision_separation_enabled: bool = true
|
||||
|
||||
var _bubbles: Array[BubbleButton] = []
|
||||
var _elapsed: float = 0.0
|
||||
|
|
@ -70,39 +71,40 @@ func advance_motion(delta: float) -> void:
|
|||
targets.append(target)
|
||||
visual_scales.append(visual_scale)
|
||||
visual_radii.append(bubble.get_visual_radius(visual_scale))
|
||||
for first_index: int in _bubbles.size():
|
||||
for second_index: int in range(first_index + 1, _bubbles.size()):
|
||||
var first_center: Vector2 = (
|
||||
targets[first_index]
|
||||
+ _bubbles[first_index].presented_size * 0.5
|
||||
)
|
||||
var second_center: Vector2 = (
|
||||
targets[second_index]
|
||||
+ _bubbles[second_index].presented_size * 0.5
|
||||
)
|
||||
var center_delta: Vector2 = second_center - first_center
|
||||
var distance: float = center_delta.length()
|
||||
var desired_distance: float = (
|
||||
visual_radii[first_index]
|
||||
+ visual_radii[second_index]
|
||||
+ profile.contact_gap * _layout_scale
|
||||
)
|
||||
if distance >= desired_distance:
|
||||
continue
|
||||
var direction := (
|
||||
center_delta / distance
|
||||
if distance > 0.001
|
||||
else Vector2.RIGHT.rotated(float(first_index + 1))
|
||||
)
|
||||
var correction: Vector2 = (
|
||||
direction
|
||||
* minf(
|
||||
(desired_distance - distance) * 0.5,
|
||||
profile.maximum_separation * _layout_scale
|
||||
if collision_separation_enabled:
|
||||
for first_index: int in _bubbles.size():
|
||||
for second_index: int in range(first_index + 1, _bubbles.size()):
|
||||
var first_center: Vector2 = (
|
||||
targets[first_index]
|
||||
+ _bubbles[first_index].presented_size * 0.5
|
||||
)
|
||||
)
|
||||
targets[first_index] -= correction
|
||||
targets[second_index] += correction
|
||||
var second_center: Vector2 = (
|
||||
targets[second_index]
|
||||
+ _bubbles[second_index].presented_size * 0.5
|
||||
)
|
||||
var center_delta: Vector2 = second_center - first_center
|
||||
var distance: float = center_delta.length()
|
||||
var desired_distance: float = (
|
||||
visual_radii[first_index]
|
||||
+ visual_radii[second_index]
|
||||
+ profile.contact_gap * _layout_scale
|
||||
)
|
||||
if distance >= desired_distance:
|
||||
continue
|
||||
var direction := (
|
||||
center_delta / distance
|
||||
if distance > 0.001
|
||||
else Vector2.RIGHT.rotated(float(first_index + 1))
|
||||
)
|
||||
var correction: Vector2 = (
|
||||
direction
|
||||
* minf(
|
||||
(desired_distance - distance) * 0.5,
|
||||
profile.maximum_separation * _layout_scale
|
||||
)
|
||||
)
|
||||
targets[first_index] -= correction
|
||||
targets[second_index] += correction
|
||||
var position_weight: float = 1.0 - exp(
|
||||
-profile.position_response * delta
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue