Skip to content

Add marker shapes, ping animation, visibility toggle, and iOS touch support#3

Open
Atothendrew wants to merge 2 commits into
mainfrom
claude/optimize-performance-W8XxP
Open

Add marker shapes, ping animation, visibility toggle, and iOS touch support#3
Atothendrew wants to merge 2 commits into
mainfrom
claude/optimize-performance-W8XxP

Conversation

@Atothendrew

Copy link
Copy Markdown
Owner

Summary

  • MiniMapMarkerShape — new .circle (default), .square, .diamond, .triangle enum; added markerShape to MiniMapEntity protocol and AnyMiniMapEntity; node-reuse logic recreates markers only when shape or radius changes
  • showPing(at:color:duration:) — displays a pulsing, expanding ring at any scene coordinate on the mini-map; clamped to map bounds; auto-removes when the animation completes; silently no-ops if scene size is not yet set
  • setVisible(_:animated:) — fades in/out over 0.3 s by default (instant with animated: false); contains(_:) now respects isHidden so hidden maps never capture clicks
  • iOS / tvOS touch convenience methodshandleTouchBegan(at:in:), handleTouchMoved(to:in:), handleTouchEnded(at:in:) mirror the existing macOS mouse API with identical drag/resize/click semantics

Test plan

  • 16 new unit tests added covering all four features (shapes, ping, visibility, touch)
  • Existing 34 tests continue to pass unchanged
  • Verify MiniMapMarkerShape values round-trip correctly through AnyMiniMapEntity
  • Verify showPing no-ops when updateEntityPositions has not yet been called
  • Verify setVisible(false) prevents contains from returning true
  • Verify touch methods fire the delegate on tap (no drag)

https://claude.ai/code/session_018t9xFejpw1oNq4KkKhKagR


Generated by Claude Code

claude added 2 commits May 13, 2026 18:48
…upport

Marker shapes (MiniMapMarkerShape):
- New .circle (default), .square, .diamond, .triangle enum
- markerShape added to MiniMapEntity protocol with .circle default
- AnyMiniMapEntity stores the shape; makeMarkerNode(for:) builds the correct
  SKShapeNode path; reuse logic only recreates when radius or shape changes

Ping animation (showPing(at:color:duration:)):
- Expanding, fading ring at any scene coordinate, clamped to map bounds
- No-ops silently when sceneSize is not yet known

Visibility toggle (setVisible(_:animated:)):
- 0.3 s cross-fade by default; instant when animated: false
- contains(_:) returns false while isHidden — no stale click capture

iOS / tvOS touch convenience methods:
- handleTouchBegan(at:in:), handleTouchMoved(to:in:), handleTouchEnded(at:in:)
- Mirror the macOS mouse API; support drag, resize, and click

https://claude.ai/code/session_018t9xFejpw1oNq4KkKhKagR
macos-latest runners in 2026 ship with Xcode 16.x; Xcode_15.0.app no
longer exists, causing the xcode-select step to fail immediately. Drop
the version pin and use the runner's default Xcode instead.

https://claude.ai/code/session_018t9xFejpw1oNq4KkKhKagR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants