Browse Source

Clean up.

Mr.doob 7 years ago
parent
commit
a942083170
2 changed files with 6 additions and 8 deletions
  1. 1 3
      examples/webgl_loader_svg.html
  2. 5 5
      src/extras/core/ShapePath.js

+ 1 - 3
examples/webgl_loader_svg.html

@@ -75,8 +75,6 @@
 				var loader = new THREE.SVGLoader();
 				loader.load( 'models/svg/tiger.svg', function ( paths ) {
 
-					console.log( paths );
-
 					var group = new THREE.Group();
 					group.scale.multiplyScalar( 0.1 );
 					group.scale.y *= -1;
@@ -86,7 +84,7 @@
 						var path = paths[ i ];
 
 						var material = new THREE.MeshBasicMaterial( {
-							color: Math.random() * 0xffffff,
+							color: path.color,
 							depthWrite: false
 						} );
 

+ 5 - 5
src/extras/core/ShapePath.js

@@ -1,13 +1,13 @@
-import { Color } from '../../math/Color.js';
-import { Path } from './Path.js';
-import { Shape } from './Shape.js';
-import { ShapeUtils } from '../ShapeUtils.js';
-
 /**
  * @author zz85 / http://www.lab4games.net/zz85/blog
  * minimal class for proxing functions to Path. Replaces old "extractSubpaths()"
  **/
 
+import { Color } from '../../math/Color.js';
+import { Path } from './Path.js';
+import { Shape } from './Shape.js';
+import { ShapeUtils } from '../ShapeUtils.js';
+
 function ShapePath() {
 
 	this.type = 'ShapePath';