Skip to content

Feat: Add camera mod pitch/rotation#1009

Open
Peechiz wants to merge 4 commits into
mainfrom
feat/add-camera-mod-events
Open

Feat: Add camera mod pitch/rotation#1009
Peechiz wants to merge 4 commits into
mainfrom
feat/add-camera-mod-events

Conversation

@Peechiz
Copy link
Copy Markdown
Contributor

@Peechiz Peechiz commented May 21, 2026

Closes n/a

✅ Pull Request Checklist

  • Included link to corresponding GitHub Issue.
  • The commit message follows conventional commit extended guidelines.
  • Added/updated unit tests and storybook for this change (for bug fixes / features).
  • Added/updated visual regression tests for this change (for bug fixes / features).
  • Added/updated documentation (for bug fixes / features)
  • Filled out test instructions.
  • Added changeset (for bug fixes / features).

📝 Test Instructions

useMapCamera should now return pitchBy and rotateBy functions. Calling these with a delta should tilt & rotate the camera state by the given delta

❓ Does this PR introduce a breaking change?

  • Yes
  • No

🤖 AI Usage

  • Added corresponding label (ai / human) to PR:

If ai was used, select all that apply:

  • Ideation / brainstorming
  • Documentation
  • Testing
  • Implementation

💬 Other information

@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-toolkit Ready Ready Preview, Comment May 22, 2026 3:56pm
map-toolkit Ready Ready Preview, Comment May 22, 2026 3:56pm

Request Review

@Peechiz Peechiz added the ai AI was used in some way in this PR label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

📊 Coverage Reports

Coverage Changes by Package

Click to expand 29 package details

apps/next (No diff)

packages/bus (No diff)

packages/constants (No diff)

packages/converters (No diff)

packages/core (No diff)

packages/dataset (No diff)

packages/design-foundation (No diff)

packages/design-toolkit (No diff)

packages/formatters (No diff)

packages/geo (No diff)

packages/hotkey-manager (No diff)

packages/icons (No diff)

packages/logger (No diff)

packages/map-toolkit

metric current base change
lines 68.88% 68.78% 0.10
statements 68.83% 68.72% 0.11
functions 71.08% 70.91% 0.17
branches 62.11% 62.07% 0.04

packages/math (No diff)

packages/ntds (No diff)

packages/postcss-tailwind-css-modules (No diff)

packages/predicates (No diff)

packages/temporal (No diff)

packages/web-worker (No diff)

packages/websocket (No diff)

tooling/biome-config (No diff)

tooling/constellation-tracker (No diff)

tooling/eslint-config (No diff)

tooling/prettier-config (No diff)

tooling/smeegl (No diff)

tooling/turbo-filter (No diff)

tooling/typescript-config (No diff)

tooling/vitest-config (No diff)

Coverage data collected from all packages in the monorepo.

Copy link
Copy Markdown
Contributor

@colehart colehart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. instead of mod prefix, let's follow the mapping/DOM ecosystem conventions for deltas with a suffixBy so modPitch > pitchBy, modRotation > rotateBy

  2. you should add rotation normalization of 0-360 and pitch clamping to MapLibre's range of 0-85 to avoid returning weird numbers

  3. Add tests for this new request (clamping / normalization behavior),

  4. The MDX file for the camera needs to be updated to reflect these new functions

Comment thread packages/map-toolkit/src/camera/types.ts
Comment thread packages/map-toolkit/src/camera/types.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai AI was used in some way in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants