Skip to content

Commit 7a4dd73

Browse files
committed
Fix picking
1 parent 97e6e67 commit 7a4dd73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webgl/lessons/ko/webgl-picking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,8 @@ objects.forEach(function(object) {
558558

559559
const subLeft = left + pixelX * width / gl.canvas.width;
560560
const subBottom = bottom + pixelY * height / gl.canvas.height;
561-
const subWidth = 1 / gl.canvas.width;
562-
const subHeight = 1 / gl.canvas.height;
561+
const subWidth = width / gl.canvas.width;
562+
const subHeight = height / gl.canvas.height;
563563

564564
// 해당 1픽셀에 대한 절두체 만들기
565565
const projectionMatrix = m4.frustum(

0 commit comments

Comments
 (0)