DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to draw orb geometry in SpriteKit, Metal or another surface with Thinking Orbs

Read the public frame data and render it in a non-SwiftUI target.

Who it is forA developer building a watch complication, a Metal or SpriteKit scene, or a plotter output who needs the orb shapes outside SwiftUI.

The problemSwiftUI views cannot be placed in some targets, but the orb still needs to appear there in the same design.

The outcomeA custom renderer draws the lines and dots of an orb frame, following the draw order from the package.

What you need first

  • Xcode 16 or later with Swift 6, on a Mac
  • An app targeting iOS 17+, macOS 14+, tvOS 17+, watchOS 10+ or visionOS 1+
  • Node, only if you want to run Scripts/differential-sweep.sh (inferred from the README, which says the script runs the original engine under Node)

Steps

  1. Add the Thinking Orbs package to your project with File > Add Package Dependencies and paste https://github.com/haplollc/ThinkingOrbs.
  2. Call OrbDesign.connecting.frame(size: .regular, at: seconds) with seconds set to a running time in seconds, such as a TimelineView date's timeIntervalSinceReferenceDate.
  3. Loop over frame.lines first and draw each line using x1, y1, x2, y2 and w in points, with white and a for ink and opacity.
  4. Loop over frame.dots next and draw each dot at x, y and r in a 64 by 64 box, mirroring white on dark backgrounds.
  5. Run the target and confirm the dots appear in the expected positions and draw order.

Prompt for your agent

Read the Draw it yourself section of the ThinkingOrbs repo (https://github.com/haplollc/ThinkingOrbs) and write a <target renderer> function that draws OrbDesign.<design>.frame(size:at:) lines then dots. Return the drawing code and confirm that the output contains the same number of dots as the frame.

Caveat. The README documents the frame data, but you must handle the mirrored ink on dark backgrounds and your own drawing code yourself.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page