0
mouseover 이벤트에서 크기 캔버스 요소 (원호처럼) 크기를 천천히 늘리려는 경우. 어떻게해야합니까?마우스 오버시 캔버스 요소의 크기를 조절하는 방법
mouseover 이벤트에서 크기 캔버스 요소 (원호처럼) 크기를 천천히 늘리려는 경우. 어떻게해야합니까?마우스 오버시 캔버스 요소의 크기를 조절하는 방법
마우스 오버 캔버스 자체? 그냥 이벤트 리스너를 추가하고 장면 당신이 원하는 방식으로 다시 그리기 :
// Every time the mouse comes over the canvas the radius increases.
// you could even add a timer so that every time the mouse stays over
// the canvas the radius continues to increase constantly
can.addEventListener('mouseover', function(e) {
radius += 10;
ctx.clearRect(0,0,can.width, can.height);
ctx.beginPath();
ctx.arc(150, 150, radius, 0, Math.PI*.8, false);
ctx.stroke();
}, false);
마우스 오버 캔버스에 그려진 "개체를?" 너는 add object persistence and detection to the canvas 일거야.