[feat/MAT-361] 네이티브 스타일러스 입력 (iOS)#303
Open
b0nsu wants to merge 1 commit intorefactor/mat-360-input-eraserfrom
Open
[feat/MAT-361] 네이티브 스타일러스 입력 (iOS)#303b0nsu wants to merge 1 commit intorefactor/mat-360-input-eraserfrom
b0nsu wants to merge 1 commit intorefactor/mat-360-input-eraserfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
iOS에서 Apple Pencil 네이티브 입력(코얼레스드 터치/예측 터치 포함)을 React Native New Architecture(Fabric) 컴포넌트로 수집하고, JS 입력 콜백 모델로 전달하기 위한 기반을 추가합니다.
Changes:
- Fabric 네이티브 컴포넌트
StylusInputView및PencilGestureRecognizer로 Pencil/손가락 터치(코얼레스드/예측 샘플) 이벤트 방출 - JS 측
useNativeStylusAdapter훅으로 네이티브 이벤트를DrawingInputCallbacks로 변환/전달 - RN codegen 설정 및 iOS Podspec 추가
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/pointer-native-drawing/src/specs/StylusInputViewNativeComponent.ts | StylusInputView codegen 스펙(병렬 배열 이벤트 페이로드) 정의 |
| packages/pointer-native-drawing/src/input/nativeStylusAdapter.tsx | 네이티브 stylus 이벤트를 InputEvent로 변환해 draw/erase 콜백으로 라우팅 |
| packages/pointer-native-drawing/src/index.ts | 신규 어댑터 훅 export 추가 |
| packages/pointer-native-drawing/pointer-native-drawing.podspec | iOS 소스 포함 Podspec 추가 |
| packages/pointer-native-drawing/package.json | codegenConfig 및 배포 파일 목록에 iOS 디렉터리 추가 |
| packages/pointer-native-drawing/ios/StylusInputView.mm | Fabric 컴포넌트 구현 및 이벤트 emit |
| packages/pointer-native-drawing/ios/StylusInputView.h | Fabric 컴포넌트 헤더 추가 |
| packages/pointer-native-drawing/ios/PencilGestureRecognizer.m | coalesced/predicted touch 수집 및 finger-input 지연 시작 로직 구현 |
| packages/pointer-native-drawing/ios/PencilGestureRecognizer.h | recognizer + delegate + 데이터 모델 선언 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| onStylusTouch={handleStylusTouch} | ||
| /> | ||
| ) : null, | ||
| [handleStylusTouch] |
| "dist", | ||
| "src" | ||
| "src", | ||
| "ios" |
Comment on lines
+36
to
+47
| - (instancetype)initWithFrame:(CGRect)frame | ||
| { | ||
| if (self = [super initWithFrame:frame]) { | ||
| self.userInteractionEnabled = YES; | ||
| self.backgroundColor = [UIColor clearColor]; | ||
|
|
||
| _pencilRecognizer = [[PencilGestureRecognizer alloc] initWithTarget:nil action:nil]; | ||
| _pencilRecognizer.pencilDelegate = self; | ||
| _pencilRecognizer.cancelsTouchesInView = NO; | ||
| _pencilRecognizer.delaysTouchesBegan = NO; | ||
| [self addGestureRecognizer:_pencilRecognizer]; | ||
| } |
6ecb49f to
51d4099
Compare
…nvas iOS 통합
- ios/PencilGestureRecognizer.{h,m}: UIGestureRecognizer 서브클래스 (Apple Pencil precise + 240Hz coalesced + predicted touches)
- ios/StylusInputView.{h,mm}: Fabric component — UITouch 좌표/force/altitude/azimuth 패킹
- src/specs/StylusInputViewNativeComponent.ts: codegen spec
- src/input/nativeStylusAdapter.tsx: native overlay 어댑터
- state.phase 외부 미노출 (consumer 0건 — PR #302 인터페이스와 일관)
- acceptFingerInput 미전달 (textbox 비활성화 정책 — native default false)
- pointer-native-drawing.podspec + package.json: codegen 등록
- DrawingCanvas.tsx: Platform 분기
- iOS = native overlay (240Hz pencil 풀 활용), rngh pan 비활성
- Android/Web = rngh pan 그대로
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4e9555a to
255d565
Compare
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
iOS Apple Pencil 네이티브 입력을 위한 Fabric 컴포넌트(StylusInputView)와 PencilGestureRecognizer를 추가합니다.
coalesced touch(240Hz) 지원으로 입력 정밀도를 높입니다.
Linear
Changes
ios/PencilGestureRecognizer.h/.m— Apple Pencil 제스처 인식기ios/StylusInputView.h/.mm— Fabric 네이티브 컴포넌트src/input/nativeStylusAdapter.tsx— 네이티브 스타일러스 어댑터src/specs/StylusInputViewNativeComponent.ts— codegen specpackage.jsoncodegenConfig 추가,podspec생성Testing
pnpm typecheck통과pnpm lint통과Risk / Impact