THREE.js 에서 Color는 rgb값으로 0~1까지의 실수의 집합으로 되어있다.

ex) new THREE.Color(0,0,1)

그리고 BufferGeometry의 경우

  1. material.color.set(new THREE.Color(0,0,1))을 통해 변경할수도있다.
  2. 두번째방법은 colors 를 rgb를 3개씩 넣어서 push후 setAttribute로 넘겨주는것이다.
    1. ex) colors = [r, g, b, r, g, b, r, g, b] 이럴경우 3개의 점의 색을 넣어준것
bufferGeometry.setAttribute(
                "color",
                new THREE.Float32BufferAttribute(colors, 3)
            );