Color geometry with vertex colors in headless environment

I created a function that renders a cube and colors it with a float array using a MeshPhongMaterial with vertex colors. This works in browser environment but in headless environment it renders the cube white. I’ve logged the values and they are the same.

Any ideas how to solve this?

Link to project:

The relevant code is found in index.js in functions meshToThreejs and getColorArray

1 Like