SkillAgentSearch skills...

control-camera-lenses

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.

Install / Use

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

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

88/100

Supported Platforms

Universal

Tags

Our assessment of control-camera-lenses

control-camera-lenses scores 88/100 on our quality scale, 1733rd of 4,719 Development & Engineering skills we index (top 37%).

Its SKILL.md is 2.8 KB long, split into 3 sections and no code examples: a solid amount of guidance for an agent.

With 6,252 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
26/30
Structure
8/20
Description
15/15
Adoption
16/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated about 2 months ago, so control-camera-lenses is actively maintained.
  • It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
  • Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

control-camera-lenses compared with similar skills

All 4 of these similar skills score higher than control-camera-lenses; compare them before choosing.

SkillScoreStarsUpdatedFormat
control-camera-lenses (this skill)by MengTo886.3k2mo agoSKILL.md
taste-skillby Leonxlnx100121.6ktodayCLAUDE.md
hyperframesby heygen-com10090.2ktodayCLAUDE.md
ai-job-searchby ai-job-search-dev10073.5ktodayCLAUDE.md
claude-howtoby luongnv8910047.6k5d agoCLAUDE.md

Frequently asked questions

How do I install control-camera-lenses?
Run npx skills add MengTo/Skills --skill control-camera-lenses. The install tabs above show the steps for each supported agent.
Which AI agents does control-camera-lenses work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is control-camera-lenses safe to use?
It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is control-camera-lenses still maintained?
The repository was last updated about 2 months ago, so control-camera-lenses is actively maintained.

name: control-camera-lenses description: 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.

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.

Related Skills

View on GitHub
GitHub Stars6.3k
CategoryDevelopment
Updated2mo ago
Forks741

Languages

HTML

Trust signals

100/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

No cautions