Skip to content

Commit 26bc6e4

Browse files
committed
Use vertex colors in preview if set
1 parent a041622 commit 26bc6e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

js/src/_base/Preview.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ var PreviewView = RenderableView.extend({
7575
color: '#ffffff',
7676
});
7777
}
78+
if (obj instanceof THREE.BufferGeometry && 'color' in obj.attributes) {
79+
material.vertexColors = THREE.VertexColors;
80+
}
7881

7982
var mesh = new THREE.Mesh(obj, material);
8083
this.scene.add(mesh);

0 commit comments

Comments
 (0)