DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

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.

Short answer: Add the Thinking Orbs package to your project with File > Add Package Dependencies and paste https://github.com/haplollc/ThinkingOrbs; then call OrbDesign.connecting.frame(size: .regular, at: seconds) with seconds set to a running time in seconds, such as a TimelineView date's timeIntervalSinceReferenceDate. All steps.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for haplollc/ThinkingOrbs and "Draw orb geometry in SpriteKit, Metal or another surface"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer