레퍼런스 updatePixels()

updatePixels()

pixels 배열에 있는 RGBA 값으로 캔버스를 업데이트합니다.

updatePixels()pixels 배열의 값을 변경한 후에만 호출합니다. 이러한 변경은 loadPixels()를 호출한 직후에 직접 변경하거나 set()을 호출하여 할 수 있습니다.

예제

구문

updatePixels([x], [y], [w], [h])

매개변수

x

업데이트할 영역의 좌상단 x 좌표.

y

업데이트할 영역의 좌상단 y 좌표.

w

업데이트할 영역의 너비.

h

업데이트할 영역의 높이.

Notice any errors or typos? Please let us know. Please feel free to edit src/image/pixels.js and open a pull request!

관련 레퍼런스