Explorar el Código

Testing polygonOffset in svg example.

Mr.doob hace 7 años
padre
commit
ccc923506f
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  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 );