DefinitelyMaybe il y a 4 ans
Parent
commit
ad7801984c

+ 3 - 0
src/extras/core/CurvePath.js

@@ -9,12 +9,14 @@ import * as Curves from '../curves/Curves.js';
 class CurvePath extends Curve {
 class CurvePath extends Curve {
 
 
 	constructor() {
 	constructor() {
+
 		super();
 		super();
 
 
 		this.type = 'CurvePath';
 		this.type = 'CurvePath';
 
 
 		this.curves = [];
 		this.curves = [];
 		this.autoClose = false; // Automatically closes the path
 		this.autoClose = false; // Automatically closes the path
+
 	}
 	}
 
 
 	add( curve ) {
 	add( curve ) {
@@ -243,6 +245,7 @@ class CurvePath extends Curve {
 		return this;
 		return this;
 
 
 	}
 	}
+
 }
 }
 
 
 
 

+ 7 - 4
src/extras/core/Path.js

@@ -8,8 +8,9 @@ import { LineCurve } from '../curves/LineCurve.js';
 
 
 class Path extends CurvePath {
 class Path extends CurvePath {
 
 
-	constructor ( points ) {
-		super()
+	constructor( points ) {
+
+		super();
 		this.type = 'Path';
 		this.type = 'Path';
 
 
 		this.currentPoint = new Vector2();
 		this.currentPoint = new Vector2();
@@ -19,6 +20,7 @@ class Path extends CurvePath {
 			this.setFromPoints( points );
 			this.setFromPoints( points );
 
 
 		}
 		}
+
 	}
 	}
 
 
 	setFromPoints( points ) {
 	setFromPoints( points ) {
@@ -159,7 +161,7 @@ class Path extends CurvePath {
 
 
 	copy( source ) {
 	copy( source ) {
 
 
-		super.copy(  source );
+		super.copy( source );
 
 
 		this.currentPoint.copy( source.currentPoint );
 		this.currentPoint.copy( source.currentPoint );
 
 
@@ -179,13 +181,14 @@ class Path extends CurvePath {
 
 
 	fromJSON( json ) {
 	fromJSON( json ) {
 
 
-		super.fromJSON(  json );
+		super.fromJSON( json );
 
 
 		this.currentPoint.fromArray( json.currentPoint );
 		this.currentPoint.fromArray( json.currentPoint );
 
 
 		return this;
 		return this;
 
 
 	}
 	}
+
 }
 }
 
 
 
 

+ 6 - 3
src/extras/core/Shape.js

@@ -3,7 +3,8 @@ import { MathUtils } from '../../math/MathUtils.js';
 
 
 class Shape extends Path {
 class Shape extends Path {
 
 
-	constructor ( points ) {
+	constructor( points ) {
+
 		super( points );
 		super( points );
 
 
 		this.uuid = MathUtils.generateUUID();
 		this.uuid = MathUtils.generateUUID();
@@ -11,6 +12,7 @@ class Shape extends Path {
 		this.type = 'Shape';
 		this.type = 'Shape';
 
 
 		this.holes = [];
 		this.holes = [];
+
 	}
 	}
 
 
 	getPointsHoles( divisions ) {
 	getPointsHoles( divisions ) {
@@ -42,7 +44,7 @@ class Shape extends Path {
 
 
 	copy( source ) {
 	copy( source ) {
 
 
-		super.copy(  source );
+		super.copy( source );
 
 
 		this.holes = [];
 		this.holes = [];
 
 
@@ -78,7 +80,7 @@ class Shape extends Path {
 
 
 	fromJSON( json ) {
 	fromJSON( json ) {
 
 
-		super.fromJSON(  json );
+		super.fromJSON( json );
 
 
 		this.uuid = json.uuid;
 		this.uuid = json.uuid;
 		this.holes = [];
 		this.holes = [];
@@ -93,6 +95,7 @@ class Shape extends Path {
 		return this;
 		return this;
 
 
 	}
 	}
+
 }
 }
 
 
 
 

+ 3 - 1
src/extras/core/ShapePath.js

@@ -5,7 +5,8 @@ import { ShapeUtils } from '../ShapeUtils.js';
 
 
 class ShapePath {
 class ShapePath {
 
 
-	constructor () {
+	constructor() {
+
 		this.type = 'ShapePath';
 		this.type = 'ShapePath';
 
 
 		this.color = new Color();
 		this.color = new Color();
@@ -287,6 +288,7 @@ class ShapePath {
 		return shapes;
 		return shapes;
 
 
 	}
 	}
+
 }
 }