-
-
Notifications
You must be signed in to change notification settings - Fork 461
feat: implement strokeUniform property for zoom-invariant stroke widths #789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
…ring zoom Adds strokeUniform boolean property to Path and Group classes that maintains constant stroke width in screen space regardless of scale transformations. Key features: - strokeUniform property on Path and Group (defaults to false) - getEffectiveStrokeWidth() utility function compensates for world scale - Cross-renderer support (Canvas, SVG, WebGL) - Group propagation applies to all child shapes - Backward compatible with existing code Resolves issue #546 for zoom-invariant stroke widths when using ZUI. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Jono <[email protected]>
Claude finished @jonobr1's task —— View job PR Review: strokeUniform Property ImplementationI've completed a comprehensive analysis of the Todo List:
Overall Assessment: ✅ High Quality ImplementationThe implementation is well-architected and follows Two.js patterns consistently. Here's my detailed feedback: Strengths✅ Excellent Architecture
✅ Robust Mathematical Implementation
✅ Cross-Renderer ConsistencyAll three renderers correctly call
✅ Backward Compatibility
✅ TypeScript Support
Areas for Improvement
|
@claude instead of |
Claude finished @jonobr1's task —— View job Renaming strokeUniform to strokeAttenuation ✅I have successfully renamed Todo List:
Summary of Changes:Property Behavior:
Files Modified:
Backward Compatibility: Note: According to CLAUDE.md, you should manually run |
- Replace strokeUniform property with strokeAttenuation across codebase - Invert boolean logic: strokeAttenuation=true (default) enables scaling, false maintains constant screen space width - Update property names, flags, documentation, and TypeScript definitions - Maintain backward compatibility by defaulting to true (normal scaling behavior) - Update getEffectiveStrokeWidth utility to use inverted logic 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Jono <[email protected]>
Summary
strokeUniform
boolean property for Path and Group classesResolves Issue #546
This addresses the original request for maintaining stroke width upon zoom using ZUI or other scaling operations. When
strokeUniform
is set totrue
, the stroke width automatically compensates for world transform scale, maintaining constant visual thickness regardless of zoom level.Backward Compatible
false
for existing behavior🤖 Generated with Claude Code