[feat/MAT-360] 입력 어댑터 패턴 + 지우개 bounds 최적화#302
Open
b0nsu wants to merge 1 commit intorefactor/mat-359-textboxfrom
Open
[feat/MAT-360] 입력 어댑터 패턴 + 지우개 bounds 최적화#302b0nsu wants to merge 1 commit intorefactor/mat-359-textboxfrom
b0nsu wants to merge 1 commit intorefactor/mat-359-textboxfrom
Conversation
- input/inputTypes.ts: InputPhase, CancelReason, DrawingInputCallbacks
- input/inputAdapterTypes.ts: InputAdapterConfig, InputAdapterState, InputAdapter
- input/rnghPanAdapter.ts: useRnghPanAdapter (pencilOnly, eraser/draw 분기)
- model/drawingTypes.ts: PointerType, InputEvent 타입 추가
- DrawingCanvas.tsx:
- inline pan gesture → useRnghPanAdapter 어댑터로 교체
- isActiveGesture 제거 (어댑터가 phase 관리)
- DrawingInputCallbacks로 펜/지우개 콜백 구조화
- pencilOnly=true (현재 동작 유지: stylus+mouse만 허용)
- [v2 개선] 지우개 히트 테스트에 StrokeBounds 적용
strokeBoundsRef로 bounds 관리, eraseAtPoint에서 bounds 체크 우선
시나리오: 200 strokes → bounds로 ~190 스킵 → ~20배 개선
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
터치 입력을 추상화하는 어댑터 패턴을 도입하고, 지우개 히트 테스트에 StrokeBounds를 적용하여 ~20배 성능 개선합니다.
시나리오: 200 strokes에서 지우개 → bounds로 ~190 스킵 → point-level 비교 대폭 감소.
Linear
Changes
input/inputTypes.ts— InputPhase, CancelReason, DrawingInputCallbacksinput/inputAdapterTypes.ts— InputAdapterConfig, InputAdapterState, InputAdapterinput/rnghPanAdapter.ts— RNGH Pan 제스처 어댑터model/drawingTypes.ts— PointerType, InputEvent 타입 추가Testing
pnpm typecheck통과pnpm lint통과Risk / Impact