Skip to content
Join free
MengTo

Control Camera Lenses skill

Add photographic focal length, sensor fit, subject tracking and depth-aware shallow focus to a Three.js scene. Use for lens selectors, dolly and zoom shots, eye focus, and sharp deterministic film exports.

$npx alyn-cli add control-camera-lenses
View this skill on GitHubMengTo/Skills/agent-skills/3d/control-camera-lenses/SKILL.md
Pack stars
8,228
Pack installs
333k
Alyn Score
81/99
Updated
3 h ago
License
MIT

What is the Control Camera Lenses skill?

Control Camera Lenses is a images & art skill by MengTo for Claude Code, Cursor, Codex and other AI coding agents. Add photographic focal length, sensor fit, subject tracking and depth-aware shallow focus to a Three.js scene. Use for lens selectors, dolly and zoom shots, eye focus, and sharp deterministic film exports.

Keep the camera pose, focal length, focus distance and aperture as separate controls. Use a fixed position when demonstrating two lenses. A dolly changes the relative size of foreground and background objects as the camera moves. A zoom at a fixed position crops the same perspective.

When to use it

Use for lens selectors, dolly and zoom shots, eye focus, and sharp deterministic film exports.

What the SKILL.md covers

  • Set up the shot
  • Check the image
Author
MengTo
Pack
MengTo/Skills (30 skills)
Category
Images & art, #47 of 317
Alyn Score
81 / 99
Files
10, includes scripts, includes references
License
MIT
Last updated
3 h ago
Works with
Claude Code, Claude, Cursor, Codex, Gemini CLI, Copilot

Control Camera Lenses compared to similar skills

SkillAlyn ScoreGitHub starsUpdated
Control Camera Lenses · MengTo818.2k3 h ago
Godot 3d Essentials · gamedev-skills8311k12 days ago
Threejs Gameplay Systems · majidmanzarpour662.9k2 months ago
Scenario Game Assets · scenario-labs774k35 h ago

Install Control Camera Lenses

Pick your agent. Every command is ready to paste.

$npx alyn-cli add control-camera-lenses

Detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

$npx skills add MengTo/Skills --skill control-camera-lenses

Or use the open skills CLI directly.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads control-camera-lenses when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the control-camera-lenses skill”. In Codex, type $control-camera-lenses.

The skill itself

SKILL.md

FolderGitHub

Control camera lenses in Three.js

Keep the camera pose, focal length, focus distance and aperture as separate controls. Use a fixed position when demonstrating two lenses. A dolly changes the relative size of foreground and background objects as the camera moves. A zoom at a fixed position crops the same perspective.

Set up the shot

  1. Define a sensor gate. The creek uses a 36 mm wide, 16:9 gate with a height of 20.25 mm. Set the vertical field of view to 2 * atan(sensorHeight / (2 * focalLength)) and convert to degrees for camera.fov. Set the aspect on resize and update the projection matrix. Choose a gate-fit policy for portrait framing, and use the same convention for presets and the displayed millimetres.
  2. Set a focus plane in metres along the camera's local forward axis. After animation and camera movement, transform both eye centres to camera space and use the nearer visible eye. With the subject off centre, Euclidean camera-to-eye distance places the focus plane behind it. Preserve the last valid focus when the target moves behind the camera.
  3. Store linear depth for every visible surface, including water and alpha-tested foliage. Thin-lens blur uses focal length squared and grows with the difference in reciprocal depth. Carry the blur sign to distinguish foreground and background. The lens helper returns signed radius in output pixels. Recompute it at the actual backing-buffer height for Retina and native 4K.
  4. Gather colour around each pixel using the signed blur radius. Reject farther samples that would bleed across a sharp foreground edge. A near-field occupancy or dilation pass lets blurred foreground shapes expand across their silhouettes. Keep an in-focus subject at its original resolution. Tone-map once after combining the passes.
  5. Animate the millimetres and the camera motion independently. Momiji Creek starts at 24 mm, uses 35 mm for the house, and eases from 40 to 58 mm on the perched wagtail. Let the eye stay sharp as the water recedes into softer highlights. Advance camera and subject on the same fixed-step clock for film export.

Check the image

Open the lens study. Switch from 24 to 58 mm without moving the camera. The nearby twig grows against the sensor while its alignment with the distant marker holds. Shift focus from the twig to the far trees and back. Check that the sharp band follows the selected distance at both lens settings. Try a different frame aspect and inspect the output at native resolution. Run node references/check-lens.cjs for the projection and blur checks.

Tips for Control Camera Lenses

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • This skill ships scripts. Read them before the first run, and run it in a project without secrets first.
  • • It bundles reference files. The agent reads them only when needed, so they cost no context until then.
  • • It is part of a pack with 30 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Control Camera Lenses

What does the Control Camera Lenses skill do?

Add photographic focal length, sensor fit, subject tracking and depth-aware shallow focus to a Three.js scene. Use for lens selectors, dolly and zoom shots, eye focus, and sharp deterministic film exports.

How do I install Control Camera Lenses?

Run "npx alyn-cli add control-camera-lenses" in your project. The Alyn CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Control Camera Lenses work in Cursor and Codex?

Yes. Control Camera Lenses uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

When should I use the Control Camera Lenses skill?

Use for lens selectors, dolly and zoom shots, eye focus, and sharp deterministic film exports.

What is a good alternative to Control Camera Lenses?

Godot 3d Essentials by gamedev-skills is the highest-ranked similar skill from another creator, with an Alyn Score of 83 compared to 81 for Control Camera Lenses.

Is Control Camera Lenses free?

Control Camera Lenses is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Control Camera Lenses?

Control Camera Lenses is published by MengTo in the MengTo/Skills repository, together with 29 other skills.

Similar skills. From other creators.