Camera Pan Zoom Controls

Use when adding pan, zoom, and clamping to an isometric camera so the world stays crisp and within bounds across screen sizes.

49 stars 6 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add 0xheycat/isometric-game-skills --skill camera-pan-zoom-controls
Manual install
git clone --depth 1 https://github.com/0xheycat/isometric-game-skills.git /tmp/isometric-game-skills
mkdir -p ~/.claude/skills
cp -r /tmp/isometric-game-skills/skills/camera-pan-zoom-controls ~/.claude/skills/camera-pan-zoom-controls

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Camera Pan & Zoom Controls

## Overview

A camera is a single transform applied before drawing. This skill implements pan (drag), zoom (toward cursor), and clamping to map bounds, keeping tiles pixel-aligned to avoid shimmer.

## When to Use

- The world is bigger than the screen.
- You need drag-to-pan and scroll-to-zoom.
- Tiles shimmer or the camera leaves the map.

## Process

1. Represent the camera as offset (x, y) and scale (zoom).
2. Apply it once per frame before drawing (translate then scale).
3. Pan by adding drag delta to the offset.
4. Zoom toward the cursor: adjust offset so the point under the cursor stays put.
5. Clamp offset and zoom so the view never leaves the map bounds.
6. Snap the final transform to whole pixels to avoid tile shimmer.
7. Feed the inverse transform into `tile-picking-interaction`.

```js
ctx.setTransform(zoom,0,0,zoom, -cam.x*zoom, -cam.y*zoom);
```

## Rationalizations (Stop Lying to Yourself)

| Excuse | Reality |
|---|---|
| "Zoom toward center is fine" | Users expect zoom toward the cursor. Anchor the zoom point. |
| "Clamping is optional" | Without clamps the player pans into the void. Clamp to bounds. |

## Red Flags - STOP if you catch yourself:

- Zoom anchored to screen center, not cursor.
- No bounds clamping.
- Sub-pixel camera offsets causing shimmer.

## Verification

You are NOT done until every box is checked:

- [ ] Drag pans and scroll zooms toward the cursor.
- [ ] Camera is clamped within map bounds at all zooms.
Read the full skill on GitHub

Details

Skill name
camera-pan-zoom-controls
Path
skills/camera-pan-zoom-controls/SKILL.md
License
MIT
Repo updated
12 August 2026

FAQ

What does the Camera Pan Zoom Controls skill do?

Use when adding pan, zoom, and clamping to an isometric camera so the world stays crisp and within bounds across screen sizes.

How do I install the Camera Pan Zoom Controls skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add 0xheycat/isometric-game-skills --skill camera-pan-zoom-controls. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Camera Pan Zoom Controls popular?

It lives in 0xheycat/isometric-game-skills, which has 49 GitHub stars and 6 forks, and is included in 1 curated skill list.

Related skills

Animated Sprite Generation

49

0xheycat/isometric-game-skills

Use when creating looping animated isometric sprites (water, fire, windmills, flags) as frame strips that play back smoothly in-engine.

OtherIn 1 list

Asset Pipeline Automation

49

0xheycat/isometric-game-skills

Use when automating the path from generated sprites to a shipped atlas + map so re-generating art does not mean hours of manual rework.

Productivity & NotesIn 1 list

Autotiling Transitions

49

0xheycat/isometric-game-skills

Use when making different terrain types (grass, water, sand) blend with automatic edge and corner transition tiles instead of hard seams.

OtherIn 1 list

Charm Person

113

Hmbown/Wizards-of-the-Ghosts

Charm Person is about ONE-TO-ONE interpersonal communication where warmth, honesty, and respect for autonomy are the primary constraints. It is not about persuasion tactics, conversion rates, conflict mediation, public performance, or operational coordination. The spell succeeds when the recipient feels respected even if they say no.

Other11

Depth Sorting Occlusion

49

0xheycat/isometric-game-skills

Use when sprites draw in the wrong order so characters appear in front of objects they should be behind in an isometric scene.

OtherIn 1 list

Feeblemind

113

Hmbown/Wizards-of-the-Ghosts

In D&D, Feeblemind crushes a creature's Intelligence and Charisma to near-zero — leaving them alive but barely functional. The real-world version is deliberate capability reduction: putting a system into safe mode, stripping an overpowered tool down to basic functions, reducing attack surface by removing features. Feeblemind is not punishment — it is the recognition that sometimes a system at full capability is more dangerous than a system at reduced capability. Restricted shells, read-only modes, feature-stripped emergency interfaces.

Other11

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.