Projects / Spectacles mainframe
Spectacles mainframe
An AR panel for Snap Spectacles. Weather, reminders, and music, built in Lens Studio.
Why
A glasses UI cannot be a phone home screen shrunk down. Three things you might want without taking the glasses off: the weather, a reminder, and music. The hackathon scope stops there.
Diagrams
A solid outline is the path in the repo. A dashed outline is the alternative that shape is refusing.
Lens Studio runs the glasses UI. Weather, reminders, and music each call an API. When the connection drops, the panel shows a fallback instead of spinning.
flowchart TD
lens["Lens Studio"]
weather["Weather"]
remind["Reminders"]
music["Music"]
api["That panel's API"]
fallback["Fallback value"]
lens --> weather --> api
lens --> remind --> api
lens --> music --> api
api -->|"connection drops"| fallback
class lens,weather,remind,music,api,fallback chosen
A blank panel in front of your eyes is worse than a stale one. The writeup does not say how old the fallback may be. It also does not want one thrown error to clear the other two panels. It does not state a retry policy.
flowchart TD
q{The connection drops}
q -->|"show the last good value"| keep["Fallback"]
q -->|"an empty panel"| blank["Blank"]
share{One call fails}
share -->|"the other panels stay up"| sep["A call per panel"]
share -->|"the first error clears the UI"| shared["One client throws for all three"]
class keep,sep chosen
class blank,shared rejected
Why this shape
Lens Studio, TypeScript, and JavaScript. Each panel calls an API. When the connection drops, the writeup says the UI falls back rather than spinning. The fallback is the part that makes it wearable. A blank panel in front of your eyes is worse than a stale one.
Where it breaks
A fallback can show the last good weather after the storm has started. The writeup does not say how old that value is allowed to be. Three panels also means three APIs. One of them failing should not take the other two down, and a shared client that throws on the first error will do exactly that. This is a Devpost project. I am not describing a retry policy the page does not state.