Browse Source

Testing polygonOffset in svg example.

Mr.doob 7 năm trước cách đây
mục cha
commit
ccc923506f
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      examples/webgl_loader_svg.html

+ 5 - 1
examples/webgl_loader_svg.html

@@ -85,7 +85,11 @@
 
 						var path = paths[ i ];
 
-						var material = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } );
+						var material = new THREE.MeshBasicMaterial( {
+							color: Math.random() * 0xffffff,
+							polygonOffset: true,
+							polygonOffsetUnits: - i
+						} );
 
 						var shapes = path.toShapes( true );