UI: liquid opening, staggered content, answer wave, haptics, gaze, notch drop
- Opening: the notch spreads sideways then pours down with a slight overshoot; header and screen come out of a soft blur one after the other. - Chat: a purple→orange wave of bars instead of three dots while Claude answers. - Haptic tap (Force Touch trackpad) when the notch opens and on Allow/Deny. - Memoji turns its head toward the cursor clearly (slide, lean, slight shear). - A drop of the folded notch stretches toward the approaching cursor (within 130 pt), leaning to its side; its own ObservableObject so only the drop redraws at 30 Hz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -242,6 +242,8 @@ final class IslandWindowController: NSWindowController {
|
||||
/// 10 Hz when folded (hover still reacts within 0.1 s).
|
||||
private var desiredPollInterval: TimeInterval {
|
||||
if inAttachDrag || attachDragStart != nil || state.chatDragHeight != nil { return 1.0 / 60.0 }
|
||||
// The drop under the folded notch follows the cursor smoothly.
|
||||
if NotchProximity.shared.value > 0 { return 1.0 / 30.0 }
|
||||
return state.mode == .expanded ? 1.0 / 30.0 : 1.0 / 10.0
|
||||
}
|
||||
|
||||
@@ -296,6 +298,18 @@ final class IslandWindowController: NSWindowController {
|
||||
AppState.shared.mousePosition = newPos
|
||||
}
|
||||
|
||||
// Drop under the folded notch: grows as the cursor comes within 130 pt.
|
||||
var proximity: CGFloat = 0
|
||||
if state.mode != .expanded && !inIsland && !inAttachDrag {
|
||||
let dx = max(islandRect.minX - local.x, 0, local.x - islandRect.maxX)
|
||||
let dy = max(islandRect.minY - local.y, 0, local.y - islandRect.maxY)
|
||||
proximity = max(0, 1 - hypot(dx, dy) / 130)
|
||||
}
|
||||
let near = NotchProximity.shared
|
||||
if abs(proximity - near.value) > 0.03 || (proximity == 0 && near.value != 0) {
|
||||
near.value = proximity
|
||||
}
|
||||
|
||||
// AppState can hide the island by itself (last task ended): keep the FSM in step.
|
||||
if state.mode == .hidden && fsm.state == .petit { fsm.hiddenExternally() }
|
||||
|
||||
@@ -388,7 +402,7 @@ final class IslandWindowController: NSWindowController {
|
||||
? .timingCurve(0.45, 0, 0.2, 1, duration: 0.34)
|
||||
: .spring(response: 0.5, dampingFraction: 0.72)
|
||||
withAnimation(anim) { state.mode = mode }
|
||||
if mode == .expanded { SoundEngine.shared.play("open") }
|
||||
if mode == .expanded { SoundEngine.shared.play("open"); Haptic.tap() }
|
||||
if prev == .expanded {
|
||||
SoundEngine.shared.play("close")
|
||||
if fsm.isHeldOpen?() != true { state.isPinned = false }
|
||||
|
||||
Reference in New Issue
Block a user