|
|
@ -153,22 +153,22 @@ final class OutwardExpandingOrbView: NSView { |
|
|
|
|
|
|
|
|
let center = CGPoint(x: bounds.midX, y: bounds.midY) |
|
|
let center = CGPoint(x: bounds.midX, y: bounds.midY) |
|
|
|
|
|
|
|
|
// 1. Solid Jet Black Inner Core (Fixed 48px circle, NEVER resizes or shrinks) |
|
|
|
|
|
|
|
|
// 1. Solid Fresh Lime Inner Core (وسطش لیمویی سالید، کاملاً ثابت و مقتدر) |
|
|
coreSolidLayer.bounds = CGRect(x: 0, y: 0, width: baseDiameter, height: baseDiameter) |
|
|
coreSolidLayer.bounds = CGRect(x: 0, y: 0, width: baseDiameter, height: baseDiameter) |
|
|
coreSolidLayer.position = center |
|
|
coreSolidLayer.position = center |
|
|
coreSolidLayer.cornerRadius = baseDiameter / 2.0 |
|
|
coreSolidLayer.cornerRadius = baseDiameter / 2.0 |
|
|
coreSolidLayer.backgroundColor = NSColor(red: 0.08, green: 0.08, blue: 0.10, alpha: 1.0).cgColor |
|
|
|
|
|
|
|
|
coreSolidLayer.backgroundColor = NSColor(red: 0.82, green: 0.96, blue: 0.28, alpha: 1.0).cgColor // Solid Fresh Lime (#D2F547) |
|
|
layer.addSublayer(coreSolidLayer) |
|
|
layer.addSublayer(coreSolidLayer) |
|
|
|
|
|
|
|
|
// 2. Outward Expanding Dynamic Crimson Red Stroke Layer |
|
|
|
|
|
|
|
|
// 2. Outward Expanding Pastel Light Blue Stroke Layer (دورش آبی پاستیلی کمرنگ) |
|
|
let initialStrokeDiameter = baseDiameter + (minStrokeWidth * 2.0) |
|
|
let initialStrokeDiameter = baseDiameter + (minStrokeWidth * 2.0) |
|
|
dynamicStrokeLayer.bounds = CGRect(x: 0, y: 0, width: initialStrokeDiameter, height: initialStrokeDiameter) |
|
|
dynamicStrokeLayer.bounds = CGRect(x: 0, y: 0, width: initialStrokeDiameter, height: initialStrokeDiameter) |
|
|
dynamicStrokeLayer.position = center |
|
|
dynamicStrokeLayer.position = center |
|
|
dynamicStrokeLayer.cornerRadius = initialStrokeDiameter / 2.0 |
|
|
dynamicStrokeLayer.cornerRadius = initialStrokeDiameter / 2.0 |
|
|
dynamicStrokeLayer.borderWidth = minStrokeWidth |
|
|
dynamicStrokeLayer.borderWidth = minStrokeWidth |
|
|
dynamicStrokeLayer.borderColor = NSColor(red: 1.0, green: 0.18, blue: 0.33, alpha: 0.85).cgColor // Vibrant Neon Red |
|
|
|
|
|
|
|
|
dynamicStrokeLayer.borderColor = NSColor(red: 0.65, green: 0.86, blue: 0.98, alpha: 0.90).cgColor // Soft Pastel Light Blue |
|
|
dynamicStrokeLayer.backgroundColor = NSColor.clear.cgColor |
|
|
dynamicStrokeLayer.backgroundColor = NSColor.clear.cgColor |
|
|
dynamicStrokeLayer.shadowColor = NSColor(red: 1.0, green: 0.10, blue: 0.30, alpha: 0.90).cgColor |
|
|
|
|
|
|
|
|
dynamicStrokeLayer.shadowColor = NSColor(red: 0.58, green: 0.82, blue: 0.98, alpha: 0.85).cgColor |
|
|
dynamicStrokeLayer.shadowOffset = .zero |
|
|
dynamicStrokeLayer.shadowOffset = .zero |
|
|
dynamicStrokeLayer.shadowRadius = 4.0 |
|
|
dynamicStrokeLayer.shadowRadius = 4.0 |
|
|
dynamicStrokeLayer.shadowOpacity = 0.50 |
|
|
dynamicStrokeLayer.shadowOpacity = 0.50 |
|
|
@ -199,15 +199,15 @@ final class OutwardExpandingOrbView: NSView { |
|
|
dynamicStrokeLayer.borderColor = amber |
|
|
dynamicStrokeLayer.borderColor = amber |
|
|
dynamicStrokeLayer.shadowColor = amber |
|
|
dynamicStrokeLayer.shadowColor = amber |
|
|
} else { |
|
|
} else { |
|
|
// Fiery Neon Crimson Red palette: brightens with volume |
|
|
|
|
|
let neonRed = NSColor( |
|
|
|
|
|
red: 1.0, |
|
|
|
|
|
green: 0.18 + (0.35 * dynamicFactor), |
|
|
|
|
|
blue: 0.33 * (1.0 - dynamicFactor), |
|
|
|
|
|
alpha: 0.80 + (0.20 * dynamicFactor) |
|
|
|
|
|
|
|
|
// Soft Pastel Light Blue palette: brightens and blooms with volume |
|
|
|
|
|
let pastelBlue = NSColor( |
|
|
|
|
|
red: 0.65 + (0.15 * dynamicFactor), |
|
|
|
|
|
green: 0.86 + (0.10 * dynamicFactor), |
|
|
|
|
|
blue: 0.98 + (0.02 * dynamicFactor), |
|
|
|
|
|
alpha: 0.85 + (0.15 * dynamicFactor) |
|
|
).cgColor |
|
|
).cgColor |
|
|
dynamicStrokeLayer.borderColor = neonRed |
|
|
|
|
|
dynamicStrokeLayer.shadowColor = NSColor(red: 1.0, green: 0.15, blue: 0.25, alpha: 0.90).cgColor |
|
|
|
|
|
|
|
|
dynamicStrokeLayer.borderColor = pastelBlue |
|
|
|
|
|
dynamicStrokeLayer.shadowColor = NSColor(red: 0.58, green: 0.82, blue: 0.98, alpha: 0.85).cgColor |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Dynamic bloom shadow expanding outward with voice |
|
|
// Dynamic bloom shadow expanding outward with voice |
|
|
@ -291,8 +291,8 @@ final class OutwardExpandingOrbView: NSView { |
|
|
dynamicStrokeLayer.bounds = CGRect(x: 0, y: 0, width: initialStrokeDiameter, height: initialStrokeDiameter) |
|
|
dynamicStrokeLayer.bounds = CGRect(x: 0, y: 0, width: initialStrokeDiameter, height: initialStrokeDiameter) |
|
|
dynamicStrokeLayer.cornerRadius = initialStrokeDiameter / 2.0 |
|
|
dynamicStrokeLayer.cornerRadius = initialStrokeDiameter / 2.0 |
|
|
dynamicStrokeLayer.borderWidth = minStrokeWidth |
|
|
dynamicStrokeLayer.borderWidth = minStrokeWidth |
|
|
dynamicStrokeLayer.borderColor = NSColor(red: 1.0, green: 0.18, blue: 0.33, alpha: 0.85).cgColor |
|
|
|
|
|
dynamicStrokeLayer.shadowColor = NSColor(red: 1.0, green: 0.10, blue: 0.30, alpha: 0.90).cgColor |
|
|
|
|
|
|
|
|
dynamicStrokeLayer.borderColor = NSColor(red: 0.65, green: 0.86, blue: 0.98, alpha: 0.90).cgColor |
|
|
|
|
|
dynamicStrokeLayer.shadowColor = NSColor(red: 0.58, green: 0.82, blue: 0.98, alpha: 0.85).cgColor |
|
|
dynamicStrokeLayer.shadowRadius = 4.0 |
|
|
dynamicStrokeLayer.shadowRadius = 4.0 |
|
|
dynamicStrokeLayer.shadowOpacity = 0.50 |
|
|
dynamicStrokeLayer.shadowOpacity = 0.50 |
|
|
CATransaction.commit() |
|
|
CATransaction.commit() |
|
|
|