فهرست منبع

Examples: Improve webgl_loader_xyz demo.

Mugen87 4 سال پیش
والد
کامیت
8c5fd92811
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      examples/webgl_loader_xyz.html

+ 3 - 1
examples/webgl_loader_xyz.html

@@ -42,7 +42,9 @@
 
 					geometry.center();
 
-					const material = new THREE.PointsMaterial( { size: 0.1 } );
+					const vertexColors = ( geometry.hasAttribute( 'color' ) === true );
+
+					const material = new THREE.PointsMaterial( { size: 0.1, vertexColors: vertexColors } );
 
 					points = new THREE.Points( geometry, material );
 					scene.add( points );