2
0
Эх сурвалжийг харах

isnt visibly right, but conceptually correct for z-command

Jonathan Brandel 7 жил өмнө
parent
commit
cde518a1cf

+ 5 - 0
examples/js/loaders/SVGLoader.js

@@ -249,6 +249,7 @@ THREE.SVGLoader.prototype = {
 							point.y += numbers[ j + 1 ];
 							control.x = point.x;
 							control.y = point.y;
+							console.log( point.x, point.y );
 							path.moveTo( point.x, point.y );
 						}
 						break;
@@ -373,6 +374,10 @@ THREE.SVGLoader.prototype = {
 					case 'Z':
 					case 'z':
 						path.currentPath.autoClose = true;
+						// Reset point to beginning of Path
+						point.x = path.currentPath.curves[ 0 ].v0.x;
+						point.y = path.currentPath.curves[ 0 ].v0.y;
+						path.currentPath.currentPoint.copy( point );
 						break;
 
 					default: