It has to be geometry.vertexColors instead of geometry.colors (push a colour per vertex).
And the material:
material = new THREE.MeshBasicMaterial({ vertexColors: THREE.VertexColors });
More Related Contents:
- Drawing a line with three.js dynamically
- Thickness of lines using THREE.LineBasicMaterial
- Multiple transparent textures on the same mesh face in Three.js
- How to stop a requestAnimationFrame recursion/loop?
- How to get the absolute position of a vertex in three.js?
- Three.js / WebGL – transparent planes hiding other planes behind them
- Replicating MeshLambertMaterial Using ShaderMaterial ignores textures
- How to detect collision in three.js?
- Three.js/WebGL: Large spheres appear broken at intersection
- WebGL / Three.js – Particles colored by texture flicker erratically while moving camera
- Antialiasing not working in Three.js
- Why do shaders have to be in html file for webgl program?
- How to get camera position with mouse move event and transform into screen coordinates in three.js? [closed]
- Canvas toDataURL() returns blank image
- Rotate object on specific axis anywhere in Three.js – including outside of mesh
- Three JS – Find all points where a mesh intersects a plane
- What is the logic of binding buffers in webgl?
- Three.js Projector and Ray objects
- Three.js – Geometry on top of another
- webgl readpixels is always returning 0,0,0,0
- Three.js cube with different texture on each face
- Three.js and loading a cross-domain image
- Saving canvas to image via canvas.toDataURL results in black rectangle
- Javascript Typed Arrays and Endianness
- How to save canvas animation as gif or webm?
- Proper way to detect WebGL support?
- How to create a custom mesh on THREE.JS?
- Detect clicked object in THREE.js
- Why does my canvas go blank after converting to image?
- Three.js multiple materials on object loaded via OBJMTLLoader