typescript + React-p5에서 Vector 연산 사용시 type 에러

마리 Mari·2023년 3월 22일

Error


해결

window에 있는 p5 객체 사용

const dot = window.p5.Vector.dot(this.mPos, this.targetPos);

참고

https://stackoverflow.com/questions/66540987/p5-vector-subraction-sub-returning-error
https://github.com/Gherciu/react-p5/issues/78
https://github.com/Gherciu/react-p5/issues/52

profile
우리 블로그 정상영업합니다.

0개의 댓글