Skip to content

[refactor/MAT-899] DrawingCanvas Eraser AABB 2단계 히트테스트#350

Draft
b0nsu wants to merge 1 commit into
refactor/mat-898-stroke-boundsfrom
refactor/mat-899-eraser-bounds-first-pass
Draft

[refactor/MAT-899] DrawingCanvas Eraser AABB 2단계 히트테스트#350
b0nsu wants to merge 1 commit into
refactor/mat-898-stroke-boundsfrom
refactor/mat-899-eraser-bounds-first-pass

Conversation

@b0nsu
Copy link
Copy Markdown
Collaborator

@b0nsu b0nsu commented May 26, 2026

Summary

지우개 히트 테스트를 stroke AABB 1차 필터 + 점-체크 2단계로 분리.

Linear

Changes

  • `aabbIntersectsCircle(bounds, x, y, r)` 헬퍼: 지우개 원 enclosing box vs stroke AABB axis 4비교
  • `eraseAtPoint`: stroke 의 bounds 가 지우개 원과 안 겹치면 점-체크 스킵, 겹칠 가능성 있으면 기존 점-체크
  • `index.ts` 에 `aabbIntersectsCircle` export

Testing

  • `pnpm typecheck && pnpm lint && pnpm build` 통과

Risk / Impact

  • props / imperative API 변경 없음
  • 동작 변화 없음 (정확성 동일, false-negative 0). bounds 없는 외부 stroke 는 기존 점-체크 fallback

Dependency

MAT-898 위에 stacked (base: `refactor/mat-898-stroke-bounds`). PR #348 머지 후 base 자동 develop 으로 변경.

- aabbIntersectsCircle 헬퍼 추가 (지우개 원의 enclosing box vs stroke AABB)
- eraseAtPoint 에서 stroke.bounds 1차 필터 → 통과한 stroke 만 점-체크
- index.ts 에 aabbIntersectsCircle export

200 strokes 시나리오에서 점-체크 ~95% 스킵 기대(~20× 가속). bounds 는 MAT-898 에서 항상 채워지므로 외부 stroke 도 안전.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear Bot commented May 26, 2026

MAT-899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant