relative-coordinate-clamping
CommunityKeep child positions bound to parent transforms
Software Engineering#ui-rendering#relative-coordinates#coordinate-transforms#clamping#graphics-rendering#hierarchical-layout#boundary-clamping
Authormlinnen
Version1.0.0
Installs0
System Documentation
What problem does it solve?
In graphics rendering, when a parent element is transformed, child elements can go out of view or clip incorrectly if clamping is done in absolute screen coordinates. This skill provides a pattern to clamp coordinates relative to the parent's coordinate system, ensuring consistent behavior across transforms.
Core Features & Use Cases
- Relative positioning of children to transformed parents to preserve layout during offsets, scales, and rotations.
- Clamp against true boundaries (parent bounds and screen edges) rather than hardcoded screen coordinates.
- Relative collision detection and bounds checks to maintain visibility without snapping.
- Avoid anti-patterns such as clamping before transform or using fixed screen coordinates.
Quick Start
Apply this pattern by calculating child positions relative to their parent and clamp against actual rendering boundaries to preserve visibility when the parent is transformed.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: relative-coordinate-clamping Download link: https://github.com/mlinnen/mr-pumpkin/archive/main.zip#relative-coordinate-clamping Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.