Browse Source

Updated builds.

Mr.doob 4 years ago
parent
commit
728de0b9b1
3 changed files with 1188 additions and 1107 deletions
  1. 700 578
      build/three.js
  2. 0 0
      build/three.min.js
  3. 488 529
      build/three.module.js

+ 700 - 578
build/three.js

@@ -27146,117 +27146,138 @@
 		}
 	});
 
-	function EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {
-		Curve.call(this);
-		this.type = 'EllipseCurve';
-		this.aX = aX || 0;
-		this.aY = aY || 0;
-		this.xRadius = xRadius || 1;
-		this.yRadius = yRadius || 1;
-		this.aStartAngle = aStartAngle || 0;
-		this.aEndAngle = aEndAngle || 2 * Math.PI;
-		this.aClockwise = aClockwise || false;
-		this.aRotation = aRotation || 0;
-	}
-
-	EllipseCurve.prototype = Object.create(Curve.prototype);
-	EllipseCurve.prototype.constructor = EllipseCurve;
-	EllipseCurve.prototype.isEllipseCurve = true;
+	var EllipseCurve = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(EllipseCurve, _Curve);
 
-	EllipseCurve.prototype.getPoint = function (t, optionalTarget) {
-		var point = optionalTarget || new Vector2();
-		var twoPi = Math.PI * 2;
-		var deltaAngle = this.aEndAngle - this.aStartAngle;
-		var samePoints = Math.abs(deltaAngle) < Number.EPSILON; // ensures that deltaAngle is 0 .. 2 PI
+		function EllipseCurve(aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation) {
+			var _this;
 
-		while (deltaAngle < 0) {
-			deltaAngle += twoPi;
+			_this = _Curve.call(this) || this;
+			_this.type = 'EllipseCurve';
+			Object.defineProperty(_assertThisInitialized(_this), 'isEllipseCurve', {
+				value: true
+			});
+			_this.aX = aX || 0;
+			_this.aY = aY || 0;
+			_this.xRadius = xRadius || 1;
+			_this.yRadius = yRadius || 1;
+			_this.aStartAngle = aStartAngle || 0;
+			_this.aEndAngle = aEndAngle || 2 * Math.PI;
+			_this.aClockwise = aClockwise || false;
+			_this.aRotation = aRotation || 0;
+			return _this;
 		}
 
-		while (deltaAngle > twoPi) {
-			deltaAngle -= twoPi;
-		}
+		var _proto = EllipseCurve.prototype;
 
-		if (deltaAngle < Number.EPSILON) {
-			if (samePoints) {
-				deltaAngle = 0;
-			} else {
-				deltaAngle = twoPi;
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			var point = optionalTarget || new Vector2();
+			var twoPi = Math.PI * 2;
+			var deltaAngle = this.aEndAngle - this.aStartAngle;
+			var samePoints = Math.abs(deltaAngle) < Number.EPSILON; // ensures that deltaAngle is 0 .. 2 PI
+
+			while (deltaAngle < 0) {
+				deltaAngle += twoPi;
 			}
-		}
 
-		if (this.aClockwise === true && !samePoints) {
-			if (deltaAngle === twoPi) {
-				deltaAngle = -twoPi;
-			} else {
-				deltaAngle = deltaAngle - twoPi;
+			while (deltaAngle > twoPi) {
+				deltaAngle -= twoPi;
 			}
-		}
 
-		var angle = this.aStartAngle + t * deltaAngle;
-		var x = this.aX + this.xRadius * Math.cos(angle);
-		var y = this.aY + this.yRadius * Math.sin(angle);
+			if (deltaAngle < Number.EPSILON) {
+				if (samePoints) {
+					deltaAngle = 0;
+				} else {
+					deltaAngle = twoPi;
+				}
+			}
 
-		if (this.aRotation !== 0) {
-			var cos = Math.cos(this.aRotation);
-			var sin = Math.sin(this.aRotation);
-			var tx = x - this.aX;
-			var ty = y - this.aY; // Rotate the point about the center of the ellipse.
+			if (this.aClockwise === true && !samePoints) {
+				if (deltaAngle === twoPi) {
+					deltaAngle = -twoPi;
+				} else {
+					deltaAngle = deltaAngle - twoPi;
+				}
+			}
 
-			x = tx * cos - ty * sin + this.aX;
-			y = tx * sin + ty * cos + this.aY;
-		}
+			var angle = this.aStartAngle + t * deltaAngle;
+			var x = this.aX + this.xRadius * Math.cos(angle);
+			var y = this.aY + this.yRadius * Math.sin(angle);
 
-		return point.set(x, y);
-	};
+			if (this.aRotation !== 0) {
+				var cos = Math.cos(this.aRotation);
+				var sin = Math.sin(this.aRotation);
+				var tx = x - this.aX;
+				var ty = y - this.aY; // Rotate the point about the center of the ellipse.
 
-	EllipseCurve.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.aX = source.aX;
-		this.aY = source.aY;
-		this.xRadius = source.xRadius;
-		this.yRadius = source.yRadius;
-		this.aStartAngle = source.aStartAngle;
-		this.aEndAngle = source.aEndAngle;
-		this.aClockwise = source.aClockwise;
-		this.aRotation = source.aRotation;
-		return this;
-	};
+				x = tx * cos - ty * sin + this.aX;
+				y = tx * sin + ty * cos + this.aY;
+			}
 
-	EllipseCurve.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.aX = this.aX;
-		data.aY = this.aY;
-		data.xRadius = this.xRadius;
-		data.yRadius = this.yRadius;
-		data.aStartAngle = this.aStartAngle;
-		data.aEndAngle = this.aEndAngle;
-		data.aClockwise = this.aClockwise;
-		data.aRotation = this.aRotation;
-		return data;
-	};
+			return point.set(x, y);
+		};
 
-	EllipseCurve.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.aX = json.aX;
-		this.aY = json.aY;
-		this.xRadius = json.xRadius;
-		this.yRadius = json.yRadius;
-		this.aStartAngle = json.aStartAngle;
-		this.aEndAngle = json.aEndAngle;
-		this.aClockwise = json.aClockwise;
-		this.aRotation = json.aRotation;
-		return this;
-	};
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
 
-	function ArcCurve(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {
-		EllipseCurve.call(this, aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise);
-		this.type = 'ArcCurve';
-	}
+			this.aX = source.aX;
+			this.aY = source.aY;
+			this.xRadius = source.xRadius;
+			this.yRadius = source.yRadius;
+			this.aStartAngle = source.aStartAngle;
+			this.aEndAngle = source.aEndAngle;
+			this.aClockwise = source.aClockwise;
+			this.aRotation = source.aRotation;
+			return this;
+		};
+
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
+
+			data.aX = this.aX;
+			data.aY = this.aY;
+			data.xRadius = this.xRadius;
+			data.yRadius = this.yRadius;
+			data.aStartAngle = this.aStartAngle;
+			data.aEndAngle = this.aEndAngle;
+			data.aClockwise = this.aClockwise;
+			data.aRotation = this.aRotation;
+			return data;
+		};
 
-	ArcCurve.prototype = Object.create(EllipseCurve.prototype);
-	ArcCurve.prototype.constructor = ArcCurve;
-	ArcCurve.prototype.isArcCurve = true;
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
+
+			this.aX = json.aX;
+			this.aY = json.aY;
+			this.xRadius = json.xRadius;
+			this.yRadius = json.yRadius;
+			this.aStartAngle = json.aStartAngle;
+			this.aEndAngle = json.aEndAngle;
+			this.aClockwise = json.aClockwise;
+			this.aRotation = json.aRotation;
+			return this;
+		};
+
+		return EllipseCurve;
+	}(Curve);
+
+	var ArcCurve = /*#__PURE__*/function (_EllipseCurve) {
+		_inheritsLoose(ArcCurve, _EllipseCurve);
+
+		function ArcCurve(aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise) {
+			var _this;
+
+			_this = _EllipseCurve.call(this, aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise) || this;
+			_this.type = 'ArcCurve';
+			Object.defineProperty(_assertThisInitialized(_this), 'isArcCurve', {
+				value: true
+			});
+			return _this;
+		}
+
+		return ArcCurve;
+	}(EllipseCurve);
 
 	/**
 	 * Centripetal CatmullRom Curve - which is useful for avoiding
@@ -27325,142 +27346,155 @@
 			py = new CubicPoly(),
 			pz = new CubicPoly();
 
-	function CatmullRomCurve3(points, closed, curveType, tension) {
-		if (points === void 0) {
-			points = [];
-		}
+	var CatmullRomCurve3 = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(CatmullRomCurve3, _Curve);
 
-		if (closed === void 0) {
-			closed = false;
-		}
+		function CatmullRomCurve3(points, closed, curveType, tension) {
+			var _this;
 
-		if (curveType === void 0) {
-			curveType = 'centripetal';
-		}
+			if (points === void 0) {
+				points = [];
+			}
 
-		if (tension === void 0) {
-			tension = 0.5;
-		}
+			if (closed === void 0) {
+				closed = false;
+			}
 
-		Curve.call(this);
-		this.type = 'CatmullRomCurve3';
-		this.points = points;
-		this.closed = closed;
-		this.curveType = curveType;
-		this.tension = tension;
-	}
+			if (curveType === void 0) {
+				curveType = 'centripetal';
+			}
 
-	CatmullRomCurve3.prototype = Object.create(Curve.prototype);
-	CatmullRomCurve3.prototype.constructor = CatmullRomCurve3;
-	CatmullRomCurve3.prototype.isCatmullRomCurve3 = true;
+			if (tension === void 0) {
+				tension = 0.5;
+			}
 
-	CatmullRomCurve3.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector3();
+			_this = _Curve.call(this) || this;
+			_this.type = 'CatmullRomCurve3';
+			Object.defineProperty(_assertThisInitialized(_this), 'isCatmullRomCurve3', {
+				value: true
+			});
+			_this.points = points;
+			_this.closed = closed;
+			_this.curveType = curveType;
+			_this.tension = tension;
+			return _this;
 		}
 
-		var point = optionalTarget;
-		var points = this.points;
-		var l = points.length;
-		var p = (l - (this.closed ? 0 : 1)) * t;
-		var intPoint = Math.floor(p);
-		var weight = p - intPoint;
+		var _proto = CatmullRomCurve3.prototype;
 
-		if (this.closed) {
-			intPoint += intPoint > 0 ? 0 : (Math.floor(Math.abs(intPoint) / l) + 1) * l;
-		} else if (weight === 0 && intPoint === l - 1) {
-			intPoint = l - 2;
-			weight = 1;
-		}
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector3();
+			}
 
-		var p0, p3; // 4 points (p1 & p2 defined below)
+			var point = optionalTarget;
+			var points = this.points;
+			var l = points.length;
+			var p = (l - (this.closed ? 0 : 1)) * t;
+			var intPoint = Math.floor(p);
+			var weight = p - intPoint;
 
-		if (this.closed || intPoint > 0) {
-			p0 = points[(intPoint - 1) % l];
-		} else {
-			// extrapolate first point
-			tmp.subVectors(points[0], points[1]).add(points[0]);
-			p0 = tmp;
-		}
+			if (this.closed) {
+				intPoint += intPoint > 0 ? 0 : (Math.floor(Math.abs(intPoint) / l) + 1) * l;
+			} else if (weight === 0 && intPoint === l - 1) {
+				intPoint = l - 2;
+				weight = 1;
+			}
 
-		var p1 = points[intPoint % l];
-		var p2 = points[(intPoint + 1) % l];
+			var p0, p3; // 4 points (p1 & p2 defined below)
 
-		if (this.closed || intPoint + 2 < l) {
-			p3 = points[(intPoint + 2) % l];
-		} else {
-			// extrapolate last point
-			tmp.subVectors(points[l - 1], points[l - 2]).add(points[l - 1]);
-			p3 = tmp;
-		}
-
-		if (this.curveType === 'centripetal' || this.curveType === 'chordal') {
-			// init Centripetal / Chordal Catmull-Rom
-			var pow = this.curveType === 'chordal' ? 0.5 : 0.25;
-			var dt0 = Math.pow(p0.distanceToSquared(p1), pow);
-			var dt1 = Math.pow(p1.distanceToSquared(p2), pow);
-			var dt2 = Math.pow(p2.distanceToSquared(p3), pow); // safety check for repeated points
-
-			if (dt1 < 1e-4) dt1 = 1.0;
-			if (dt0 < 1e-4) dt0 = dt1;
-			if (dt2 < 1e-4) dt2 = dt1;
-			px.initNonuniformCatmullRom(p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2);
-			py.initNonuniformCatmullRom(p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2);
-			pz.initNonuniformCatmullRom(p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2);
-		} else if (this.curveType === 'catmullrom') {
-			px.initCatmullRom(p0.x, p1.x, p2.x, p3.x, this.tension);
-			py.initCatmullRom(p0.y, p1.y, p2.y, p3.y, this.tension);
-			pz.initCatmullRom(p0.z, p1.z, p2.z, p3.z, this.tension);
-		}
-
-		point.set(px.calc(weight), py.calc(weight), pz.calc(weight));
-		return point;
-	};
+			if (this.closed || intPoint > 0) {
+				p0 = points[(intPoint - 1) % l];
+			} else {
+				// extrapolate first point
+				tmp.subVectors(points[0], points[1]).add(points[0]);
+				p0 = tmp;
+			}
 
-	CatmullRomCurve3.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.points = [];
+			var p1 = points[intPoint % l];
+			var p2 = points[(intPoint + 1) % l];
 
-		for (var i = 0, l = source.points.length; i < l; i++) {
-			var point = source.points[i];
-			this.points.push(point.clone());
-		}
+			if (this.closed || intPoint + 2 < l) {
+				p3 = points[(intPoint + 2) % l];
+			} else {
+				// extrapolate last point
+				tmp.subVectors(points[l - 1], points[l - 2]).add(points[l - 1]);
+				p3 = tmp;
+			}
 
-		this.closed = source.closed;
-		this.curveType = source.curveType;
-		this.tension = source.tension;
-		return this;
-	};
+			if (this.curveType === 'centripetal' || this.curveType === 'chordal') {
+				// init Centripetal / Chordal Catmull-Rom
+				var pow = this.curveType === 'chordal' ? 0.5 : 0.25;
+				var dt0 = Math.pow(p0.distanceToSquared(p1), pow);
+				var dt1 = Math.pow(p1.distanceToSquared(p2), pow);
+				var dt2 = Math.pow(p2.distanceToSquared(p3), pow); // safety check for repeated points
 
-	CatmullRomCurve3.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.points = [];
+				if (dt1 < 1e-4) dt1 = 1.0;
+				if (dt0 < 1e-4) dt0 = dt1;
+				if (dt2 < 1e-4) dt2 = dt1;
+				px.initNonuniformCatmullRom(p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2);
+				py.initNonuniformCatmullRom(p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2);
+				pz.initNonuniformCatmullRom(p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2);
+			} else if (this.curveType === 'catmullrom') {
+				px.initCatmullRom(p0.x, p1.x, p2.x, p3.x, this.tension);
+				py.initCatmullRom(p0.y, p1.y, p2.y, p3.y, this.tension);
+				pz.initCatmullRom(p0.z, p1.z, p2.z, p3.z, this.tension);
+			}
 
-		for (var i = 0, l = this.points.length; i < l; i++) {
-			var point = this.points[i];
-			data.points.push(point.toArray());
-		}
+			point.set(px.calc(weight), py.calc(weight), pz.calc(weight));
+			return point;
+		};
 
-		data.closed = this.closed;
-		data.curveType = this.curveType;
-		data.tension = this.tension;
-		return data;
-	};
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
 
-	CatmullRomCurve3.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.points = [];
+			this.points = [];
 
-		for (var i = 0, l = json.points.length; i < l; i++) {
-			var point = json.points[i];
-			this.points.push(new Vector3().fromArray(point));
-		}
+			for (var i = 0, l = source.points.length; i < l; i++) {
+				var point = source.points[i];
+				this.points.push(point.clone());
+			}
 
-		this.closed = json.closed;
-		this.curveType = json.curveType;
-		this.tension = json.tension;
-		return this;
-	};
+			this.closed = source.closed;
+			this.curveType = source.curveType;
+			this.tension = source.tension;
+			return this;
+		};
+
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
+
+			data.points = [];
+
+			for (var i = 0, l = this.points.length; i < l; i++) {
+				var point = this.points[i];
+				data.points.push(point.toArray());
+			}
+
+			data.closed = this.closed;
+			data.curveType = this.curveType;
+			data.tension = this.tension;
+			return data;
+		};
+
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
+
+			this.points = [];
+
+			for (var i = 0, l = json.points.length; i < l; i++) {
+				var point = json.points[i];
+				this.points.push(new Vector3().fromArray(point));
+			}
+
+			this.closed = json.closed;
+			this.curveType = json.curveType;
+			this.tension = json.tension;
+			return this;
+		};
+
+		return CatmullRomCurve3;
+	}(Curve);
 
 	/**
 	 * Bezier Curves formulas obtained from
@@ -27515,465 +27549,553 @@
 		return CubicBezierP0(t, p0) + CubicBezierP1(t, p1) + CubicBezierP2(t, p2) + CubicBezierP3(t, p3);
 	}
 
-	function CubicBezierCurve(v0, v1, v2, v3) {
-		if (v0 === void 0) {
-			v0 = new Vector2();
-		}
+	var CubicBezierCurve = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(CubicBezierCurve, _Curve);
 
-		if (v1 === void 0) {
-			v1 = new Vector2();
-		}
+		function CubicBezierCurve(v0, v1, v2, v3) {
+			var _this;
 
-		if (v2 === void 0) {
-			v2 = new Vector2();
-		}
+			if (v0 === void 0) {
+				v0 = new Vector2();
+			}
 
-		if (v3 === void 0) {
-			v3 = new Vector2();
-		}
+			if (v1 === void 0) {
+				v1 = new Vector2();
+			}
 
-		Curve.call(this);
-		this.type = 'CubicBezierCurve';
-		this.v0 = v0;
-		this.v1 = v1;
-		this.v2 = v2;
-		this.v3 = v3;
-	}
+			if (v2 === void 0) {
+				v2 = new Vector2();
+			}
 
-	CubicBezierCurve.prototype = Object.create(Curve.prototype);
-	CubicBezierCurve.prototype.constructor = CubicBezierCurve;
-	CubicBezierCurve.prototype.isCubicBezierCurve = true;
+			if (v3 === void 0) {
+				v3 = new Vector2();
+			}
 
-	CubicBezierCurve.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector2();
+			_this = _Curve.call(this) || this;
+			_this.type = 'CubicBezierCurve';
+			Object.defineProperty(_assertThisInitialized(_this), 'isCubicBezierCurve', {
+				value: true
+			});
+			_this.v0 = v0;
+			_this.v1 = v1;
+			_this.v2 = v2;
+			_this.v3 = v3;
+			return _this;
 		}
 
-		var point = optionalTarget;
-		var v0 = this.v0,
-				v1 = this.v1,
-				v2 = this.v2,
-				v3 = this.v3;
-		point.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y));
-		return point;
-	};
+		var _proto = CubicBezierCurve.prototype;
 
-	CubicBezierCurve.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.v0.copy(source.v0);
-		this.v1.copy(source.v1);
-		this.v2.copy(source.v2);
-		this.v3.copy(source.v3);
-		return this;
-	};
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector2();
+			}
 
-	CubicBezierCurve.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.v0 = this.v0.toArray();
-		data.v1 = this.v1.toArray();
-		data.v2 = this.v2.toArray();
-		data.v3 = this.v3.toArray();
-		return data;
-	};
+			var point = optionalTarget;
+			var v0 = this.v0,
+					v1 = this.v1,
+					v2 = this.v2,
+					v3 = this.v3;
+			point.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y));
+			return point;
+		};
 
-	CubicBezierCurve.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.v0.fromArray(json.v0);
-		this.v1.fromArray(json.v1);
-		this.v2.fromArray(json.v2);
-		this.v3.fromArray(json.v3);
-		return this;
-	};
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
 
-	function CubicBezierCurve3(v0, v1, v2, v3) {
-		if (v0 === void 0) {
-			v0 = new Vector3();
-		}
+			this.v0.copy(source.v0);
+			this.v1.copy(source.v1);
+			this.v2.copy(source.v2);
+			this.v3.copy(source.v3);
+			return this;
+		};
 
-		if (v1 === void 0) {
-			v1 = new Vector3();
-		}
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
 
-		if (v2 === void 0) {
-			v2 = new Vector3();
-		}
+			data.v0 = this.v0.toArray();
+			data.v1 = this.v1.toArray();
+			data.v2 = this.v2.toArray();
+			data.v3 = this.v3.toArray();
+			return data;
+		};
 
-		if (v3 === void 0) {
-			v3 = new Vector3();
-		}
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
 
-		Curve.call(this);
-		this.type = 'CubicBezierCurve3';
-		this.v0 = v0;
-		this.v1 = v1;
-		this.v2 = v2;
-		this.v3 = v3;
-	}
+			this.v0.fromArray(json.v0);
+			this.v1.fromArray(json.v1);
+			this.v2.fromArray(json.v2);
+			this.v3.fromArray(json.v3);
+			return this;
+		};
 
-	CubicBezierCurve3.prototype = Object.create(Curve.prototype);
-	CubicBezierCurve3.prototype.constructor = CubicBezierCurve3;
-	CubicBezierCurve3.prototype.isCubicBezierCurve3 = true;
+		return CubicBezierCurve;
+	}(Curve);
 
-	CubicBezierCurve3.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector3();
-		}
+	var CubicBezierCurve3 = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(CubicBezierCurve3, _Curve);
 
-		var point = optionalTarget;
-		var v0 = this.v0,
-				v1 = this.v1,
-				v2 = this.v2,
-				v3 = this.v3;
-		point.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y), CubicBezier(t, v0.z, v1.z, v2.z, v3.z));
-		return point;
-	};
+		function CubicBezierCurve3(v0, v1, v2, v3) {
+			var _this;
 
-	CubicBezierCurve3.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.v0.copy(source.v0);
-		this.v1.copy(source.v1);
-		this.v2.copy(source.v2);
-		this.v3.copy(source.v3);
-		return this;
-	};
+			if (v0 === void 0) {
+				v0 = new Vector3();
+			}
 
-	CubicBezierCurve3.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.v0 = this.v0.toArray();
-		data.v1 = this.v1.toArray();
-		data.v2 = this.v2.toArray();
-		data.v3 = this.v3.toArray();
-		return data;
-	};
+			if (v1 === void 0) {
+				v1 = new Vector3();
+			}
 
-	CubicBezierCurve3.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.v0.fromArray(json.v0);
-		this.v1.fromArray(json.v1);
-		this.v2.fromArray(json.v2);
-		this.v3.fromArray(json.v3);
-		return this;
-	};
+			if (v2 === void 0) {
+				v2 = new Vector3();
+			}
 
-	function LineCurve(v1, v2) {
-		if (v1 === void 0) {
-			v1 = new Vector2();
-		}
+			if (v3 === void 0) {
+				v3 = new Vector3();
+			}
 
-		if (v2 === void 0) {
-			v2 = new Vector2();
+			_this = _Curve.call(this) || this;
+			_this.type = 'CubicBezierCurve3';
+			Object.defineProperty(_assertThisInitialized(_this), 'isCubicBezierCurve3', {
+				value: true
+			});
+			_this.v0 = v0;
+			_this.v1 = v1;
+			_this.v2 = v2;
+			_this.v3 = v3;
+			return _this;
 		}
 
-		Curve.call(this);
-		this.type = 'LineCurve';
-		this.v1 = v1;
-		this.v2 = v2;
-	}
+		var _proto = CubicBezierCurve3.prototype;
 
-	LineCurve.prototype = Object.create(Curve.prototype);
-	LineCurve.prototype.constructor = LineCurve;
-	LineCurve.prototype.isLineCurve = true;
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector3();
+			}
 
-	LineCurve.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector2();
-		}
+			var point = optionalTarget;
+			var v0 = this.v0,
+					v1 = this.v1,
+					v2 = this.v2,
+					v3 = this.v3;
+			point.set(CubicBezier(t, v0.x, v1.x, v2.x, v3.x), CubicBezier(t, v0.y, v1.y, v2.y, v3.y), CubicBezier(t, v0.z, v1.z, v2.z, v3.z));
+			return point;
+		};
 
-		var point = optionalTarget;
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
 
-		if (t === 1) {
-			point.copy(this.v2);
-		} else {
-			point.copy(this.v2).sub(this.v1);
-			point.multiplyScalar(t).add(this.v1);
-		}
+			this.v0.copy(source.v0);
+			this.v1.copy(source.v1);
+			this.v2.copy(source.v2);
+			this.v3.copy(source.v3);
+			return this;
+		};
 
-		return point;
-	}; // Line curve is linear, so we can overwrite default getPointAt
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
 
+			data.v0 = this.v0.toArray();
+			data.v1 = this.v1.toArray();
+			data.v2 = this.v2.toArray();
+			data.v3 = this.v3.toArray();
+			return data;
+		};
 
-	LineCurve.prototype.getPointAt = function (u, optionalTarget) {
-		return this.getPoint(u, optionalTarget);
-	};
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
 
-	LineCurve.prototype.getTangent = function (t, optionalTarget) {
-		var tangent = optionalTarget || new Vector2();
-		tangent.copy(this.v2).sub(this.v1).normalize();
-		return tangent;
-	};
+			this.v0.fromArray(json.v0);
+			this.v1.fromArray(json.v1);
+			this.v2.fromArray(json.v2);
+			this.v3.fromArray(json.v3);
+			return this;
+		};
 
-	LineCurve.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.v1.copy(source.v1);
-		this.v2.copy(source.v2);
-		return this;
-	};
+		return CubicBezierCurve3;
+	}(Curve);
 
-	LineCurve.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.v1 = this.v1.toArray();
-		data.v2 = this.v2.toArray();
-		return data;
-	};
+	var LineCurve = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(LineCurve, _Curve);
 
-	LineCurve.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.v1.fromArray(json.v1);
-		this.v2.fromArray(json.v2);
-		return this;
-	};
+		function LineCurve(v1, v2) {
+			var _this;
 
-	function LineCurve3(v1, v2) {
-		if (v1 === void 0) {
-			v1 = new Vector3();
-		}
+			if (v1 === void 0) {
+				v1 = new Vector2();
+			}
 
-		if (v2 === void 0) {
-			v2 = new Vector3();
+			if (v2 === void 0) {
+				v2 = new Vector2();
+			}
+
+			_this = _Curve.call(this) || this;
+			_this.type = 'LineCurve';
+			Object.defineProperty(_assertThisInitialized(_this), 'isLineCurve', {
+				value: true
+			});
+			_this.v1 = v1;
+			_this.v2 = v2;
+			return _this;
 		}
 
-		Curve.call(this);
-		this.type = 'LineCurve3';
-		this.v1 = v1;
-		this.v2 = v2;
-	}
+		var _proto = LineCurve.prototype;
 
-	LineCurve3.prototype = Object.create(Curve.prototype);
-	LineCurve3.prototype.constructor = LineCurve3;
-	LineCurve3.prototype.isLineCurve3 = true;
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector2();
+			}
 
-	LineCurve3.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector3();
-		}
+			var point = optionalTarget;
 
-		var point = optionalTarget;
+			if (t === 1) {
+				point.copy(this.v2);
+			} else {
+				point.copy(this.v2).sub(this.v1);
+				point.multiplyScalar(t).add(this.v1);
+			}
 
-		if (t === 1) {
-			point.copy(this.v2);
-		} else {
-			point.copy(this.v2).sub(this.v1);
-			point.multiplyScalar(t).add(this.v1);
-		}
+			return point;
+		} // Line curve is linear, so we can overwrite default getPointAt
+		;
 
-		return point;
-	}; // Line curve is linear, so we can overwrite default getPointAt
+		_proto.getPointAt = function getPointAt(u, optionalTarget) {
+			return this.getPoint(u, optionalTarget);
+		};
 
+		_proto.getTangent = function getTangent(t, optionalTarget) {
+			var tangent = optionalTarget || new Vector2();
+			tangent.copy(this.v2).sub(this.v1).normalize();
+			return tangent;
+		};
 
-	LineCurve3.prototype.getPointAt = function (u, optionalTarget) {
-		return this.getPoint(u, optionalTarget);
-	};
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
 
-	LineCurve3.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.v1.copy(source.v1);
-		this.v2.copy(source.v2);
-		return this;
-	};
+			this.v1.copy(source.v1);
+			this.v2.copy(source.v2);
+			return this;
+		};
 
-	LineCurve3.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.v1 = this.v1.toArray();
-		data.v2 = this.v2.toArray();
-		return data;
-	};
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
 
-	LineCurve3.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.v1.fromArray(json.v1);
-		this.v2.fromArray(json.v2);
-		return this;
-	};
+			data.v1 = this.v1.toArray();
+			data.v2 = this.v2.toArray();
+			return data;
+		};
 
-	function QuadraticBezierCurve(v0, v1, v2) {
-		if (v0 === void 0) {
-			v0 = new Vector2();
-		}
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
 
-		if (v1 === void 0) {
-			v1 = new Vector2();
-		}
+			this.v1.fromArray(json.v1);
+			this.v2.fromArray(json.v2);
+			return this;
+		};
 
-		if (v2 === void 0) {
-			v2 = new Vector2();
-		}
+		return LineCurve;
+	}(Curve);
 
-		Curve.call(this);
-		this.type = 'QuadraticBezierCurve';
-		this.v0 = v0;
-		this.v1 = v1;
-		this.v2 = v2;
-	}
+	var LineCurve3 = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(LineCurve3, _Curve);
+
+		function LineCurve3(v1, v2) {
+			var _this;
 
-	QuadraticBezierCurve.prototype = Object.create(Curve.prototype);
-	QuadraticBezierCurve.prototype.constructor = QuadraticBezierCurve;
-	QuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;
+			if (v1 === void 0) {
+				v1 = new Vector3();
+			}
+
+			if (v2 === void 0) {
+				v2 = new Vector3();
+			}
 
-	QuadraticBezierCurve.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector2();
+			_this = _Curve.call(this) || this;
+			_this.type = 'LineCurve3';
+			Object.defineProperty(_assertThisInitialized(_this), 'isLineCurve3', {
+				value: true
+			});
+			_this.v1 = v1;
+			_this.v2 = v2;
+			return _this;
 		}
 
-		var point = optionalTarget;
-		var v0 = this.v0,
-				v1 = this.v1,
-				v2 = this.v2;
-		point.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y));
-		return point;
-	};
+		var _proto = LineCurve3.prototype;
 
-	QuadraticBezierCurve.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.v0.copy(source.v0);
-		this.v1.copy(source.v1);
-		this.v2.copy(source.v2);
-		return this;
-	};
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector3();
+			}
 
-	QuadraticBezierCurve.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.v0 = this.v0.toArray();
-		data.v1 = this.v1.toArray();
-		data.v2 = this.v2.toArray();
-		return data;
-	};
+			var point = optionalTarget;
 
-	QuadraticBezierCurve.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.v0.fromArray(json.v0);
-		this.v1.fromArray(json.v1);
-		this.v2.fromArray(json.v2);
-		return this;
-	};
+			if (t === 1) {
+				point.copy(this.v2);
+			} else {
+				point.copy(this.v2).sub(this.v1);
+				point.multiplyScalar(t).add(this.v1);
+			}
 
-	function QuadraticBezierCurve3(v0, v1, v2) {
-		if (v0 === void 0) {
-			v0 = new Vector3();
-		}
+			return point;
+		} // Line curve is linear, so we can overwrite default getPointAt
+		;
 
-		if (v1 === void 0) {
-			v1 = new Vector3();
-		}
+		_proto.getPointAt = function getPointAt(u, optionalTarget) {
+			return this.getPoint(u, optionalTarget);
+		};
 
-		if (v2 === void 0) {
-			v2 = new Vector3();
-		}
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
 
-		Curve.call(this);
-		this.type = 'QuadraticBezierCurve3';
-		this.v0 = v0;
-		this.v1 = v1;
-		this.v2 = v2;
-	}
+			this.v1.copy(source.v1);
+			this.v2.copy(source.v2);
+			return this;
+		};
 
-	QuadraticBezierCurve3.prototype = Object.create(Curve.prototype);
-	QuadraticBezierCurve3.prototype.constructor = QuadraticBezierCurve3;
-	QuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
 
-	QuadraticBezierCurve3.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector3();
-		}
+			data.v1 = this.v1.toArray();
+			data.v2 = this.v2.toArray();
+			return data;
+		};
 
-		var point = optionalTarget;
-		var v0 = this.v0,
-				v1 = this.v1,
-				v2 = this.v2;
-		point.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y), QuadraticBezier(t, v0.z, v1.z, v2.z));
-		return point;
-	};
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
 
-	QuadraticBezierCurve3.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.v0.copy(source.v0);
-		this.v1.copy(source.v1);
-		this.v2.copy(source.v2);
-		return this;
-	};
+			this.v1.fromArray(json.v1);
+			this.v2.fromArray(json.v2);
+			return this;
+		};
 
-	QuadraticBezierCurve3.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.v0 = this.v0.toArray();
-		data.v1 = this.v1.toArray();
-		data.v2 = this.v2.toArray();
-		return data;
-	};
+		return LineCurve3;
+	}(Curve);
 
-	QuadraticBezierCurve3.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.v0.fromArray(json.v0);
-		this.v1.fromArray(json.v1);
-		this.v2.fromArray(json.v2);
-		return this;
-	};
+	var QuadraticBezierCurve = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(QuadraticBezierCurve, _Curve);
 
-	function SplineCurve(points) {
-		if (points === void 0) {
-			points = [];
-		}
+		function QuadraticBezierCurve(v0, v1, v2) {
+			var _this;
 
-		Curve.call(this);
-		this.type = 'SplineCurve';
-		this.points = points;
-	}
+			if (v0 === void 0) {
+				v0 = new Vector2();
+			}
+
+			if (v1 === void 0) {
+				v1 = new Vector2();
+			}
 
-	SplineCurve.prototype = Object.create(Curve.prototype);
-	SplineCurve.prototype.constructor = SplineCurve;
-	SplineCurve.prototype.isSplineCurve = true;
+			if (v2 === void 0) {
+				v2 = new Vector2();
+			}
 
-	SplineCurve.prototype.getPoint = function (t, optionalTarget) {
-		if (optionalTarget === void 0) {
-			optionalTarget = new Vector2();
+			_this = _Curve.call(this) || this;
+			_this.type = 'QuadraticBezierCurve';
+			Object.defineProperty(_assertThisInitialized(_this), 'isQuadraticBezierCurve', {
+				value: true
+			});
+			_this.v0 = v0;
+			_this.v1 = v1;
+			_this.v2 = v2;
+			return _this;
 		}
 
-		var point = optionalTarget;
-		var points = this.points;
-		var p = (points.length - 1) * t;
-		var intPoint = Math.floor(p);
-		var weight = p - intPoint;
-		var p0 = points[intPoint === 0 ? intPoint : intPoint - 1];
-		var p1 = points[intPoint];
-		var p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1];
-		var p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2];
-		point.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));
-		return point;
-	};
+		var _proto = QuadraticBezierCurve.prototype;
 
-	SplineCurve.prototype.copy = function (source) {
-		Curve.prototype.copy.call(this, source);
-		this.points = [];
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector2();
+			}
 
-		for (var i = 0, l = source.points.length; i < l; i++) {
-			var point = source.points[i];
-			this.points.push(point.clone());
-		}
+			var point = optionalTarget;
+			var v0 = this.v0,
+					v1 = this.v1,
+					v2 = this.v2;
+			point.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y));
+			return point;
+		};
 
-		return this;
-	};
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
+
+			this.v0.copy(source.v0);
+			this.v1.copy(source.v1);
+			this.v2.copy(source.v2);
+			return this;
+		};
 
-	SplineCurve.prototype.toJSON = function () {
-		var data = Curve.prototype.toJSON.call(this);
-		data.points = [];
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
+
+			data.v0 = this.v0.toArray();
+			data.v1 = this.v1.toArray();
+			data.v2 = this.v2.toArray();
+			return data;
+		};
+
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
+
+			this.v0.fromArray(json.v0);
+			this.v1.fromArray(json.v1);
+			this.v2.fromArray(json.v2);
+			return this;
+		};
+
+		return QuadraticBezierCurve;
+	}(Curve);
 
-		for (var i = 0, l = this.points.length; i < l; i++) {
-			var point = this.points[i];
-			data.points.push(point.toArray());
+	var QuadraticBezierCurve3 = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(QuadraticBezierCurve3, _Curve);
+
+		function QuadraticBezierCurve3(v0, v1, v2) {
+			var _this;
+
+			if (v0 === void 0) {
+				v0 = new Vector3();
+			}
+
+			if (v1 === void 0) {
+				v1 = new Vector3();
+			}
+
+			if (v2 === void 0) {
+				v2 = new Vector3();
+			}
+
+			_this = _Curve.call(this) || this;
+			_this.type = 'QuadraticBezierCurve3';
+			Object.defineProperty(_assertThisInitialized(_this), 'isQuadraticBezierCurve3', {
+				value: true
+			});
+			_this.v0 = v0;
+			_this.v1 = v1;
+			_this.v2 = v2;
+			return _this;
 		}
 
-		return data;
-	};
+		var _proto = QuadraticBezierCurve3.prototype;
+
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector3();
+			}
+
+			var point = optionalTarget;
+			var v0 = this.v0,
+					v1 = this.v1,
+					v2 = this.v2;
+			point.set(QuadraticBezier(t, v0.x, v1.x, v2.x), QuadraticBezier(t, v0.y, v1.y, v2.y), QuadraticBezier(t, v0.z, v1.z, v2.z));
+			return point;
+		};
+
+		_proto.copy = function copy(source) {
+			_Curve.prototype.copy.call(this, source);
+
+			this.v0.copy(source.v0);
+			this.v1.copy(source.v1);
+			this.v2.copy(source.v2);
+			return this;
+		};
 
-	SplineCurve.prototype.fromJSON = function (json) {
-		Curve.prototype.fromJSON.call(this, json);
-		this.points = [];
+		_proto.toJSON = function toJSON() {
+			var data = _Curve.prototype.toJSON.call(this);
+
+			data.v0 = this.v0.toArray();
+			data.v1 = this.v1.toArray();
+			data.v2 = this.v2.toArray();
+			return data;
+		};
+
+		_proto.fromJSON = function fromJSON(json) {
+			_Curve.prototype.fromJSON.call(this, json);
+
+			this.v0.fromArray(json.v0);
+			this.v1.fromArray(json.v1);
+			this.v2.fromArray(json.v2);
+			return this;
+		};
+
+		return QuadraticBezierCurve3;
+	}(Curve);
 
-		for (var i = 0, l = json.points.length; i < l; i++) {
-			var point = json.points[i];
-			this.points.push(new Vector2().fromArray(point));
+	var SplineCurve = /*#__PURE__*/function (_Curve) {
+		_inheritsLoose(SplineCurve, _Curve);
+
+		function SplineCurve(points) {
+			var _this;
+
+			if (points === void 0) {
+				points = [];
+			}
+
+			_this = _Curve.call(this) || this;
+			_this.type = 'SplineCurve';
+			Object.defineProperty(_assertThisInitialized(_this), 'isSplineCurve', {
+				value: true
+			});
+			_this.points = points;
+			return _this;
 		}
 
-		return this;
-	};
+		var _proto = SplineCurve.prototype;
+
+		_proto.getPoint = function getPoint(t, optionalTarget) {
+			if (optionalTarget === void 0) {
+				optionalTarget = new Vector2();
+			}
+
+			var point = optionalTarget;
+			var points = this.points;
+			var p = (points.length - 1) * t;
+			var intPoint = Math.floor(p);
+			var weight = p - intPoint;
+			var p0 = points[intPoint === 0 ? intPoint : intPoint - 1];
+			var p1 = points[intPoint];
+			var p2 = points[intPoint > points.length - 2 ? points.length - 1 : intPoint + 1];
+			var p3 = points[intPoint > points.length - 3 ? points.length - 1 : intPoint + 2];
+			point.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));
+			return point;
+		};
+
+		_proto.copy = function copy(source) {
+			Curve.prototype.copy.call(this, source);
+			this.points = [];
+
+			for (var i = 0, l = source.points.length; i < l; i++) {
+				var point = source.points[i];
+				this.points.push(point.clone());
+			}
+
+			return this;
+		};
+
+		_proto.toJSON = function toJSON() {
+			var data = Curve.prototype.toJSON.call(this);
+			data.points = [];
+
+			for (var i = 0, l = this.points.length; i < l; i++) {
+				var point = this.points[i];
+				data.points.push(point.toArray());
+			}
+
+			return data;
+		};
+
+		_proto.fromJSON = function fromJSON(json) {
+			Curve.prototype.fromJSON.call(this, json);
+			this.points = [];
+
+			for (var i = 0, l = json.points.length; i < l; i++) {
+				var point = json.points[i];
+				this.points.push(new Vector2().fromArray(point));
+			}
+
+			return this;
+		};
+
+		return SplineCurve;
+	}(Curve);
 
 	var Curves = /*#__PURE__*/Object.freeze({
 		__proto__: null,

File diff suppressed because it is too large
+ 0 - 0
build/three.min.js


+ 488 - 529
build/three.module.js

@@ -35320,171 +35320,166 @@ Object.assign( Curve.prototype, {
 
 } );
 
-function EllipseCurve( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {
+class EllipseCurve extends Curve {
 
-	Curve.call( this );
+	constructor( aX, aY, xRadius, yRadius, aStartAngle, aEndAngle, aClockwise, aRotation ) {
 
-	this.type = 'EllipseCurve';
-
-	this.aX = aX || 0;
-	this.aY = aY || 0;
+		super();
 
-	this.xRadius = xRadius || 1;
-	this.yRadius = yRadius || 1;
+		this.type = 'EllipseCurve';
+		Object.defineProperty( this, 'isEllipseCurve', { value: true } );
 
-	this.aStartAngle = aStartAngle || 0;
-	this.aEndAngle = aEndAngle || 2 * Math.PI;
+		this.aX = aX || 0;
+		this.aY = aY || 0;
 
-	this.aClockwise = aClockwise || false;
+		this.xRadius = xRadius || 1;
+		this.yRadius = yRadius || 1;
 
-	this.aRotation = aRotation || 0;
+		this.aStartAngle = aStartAngle || 0;
+		this.aEndAngle = aEndAngle || 2 * Math.PI;
 
-}
+		this.aClockwise = aClockwise || false;
 
-EllipseCurve.prototype = Object.create( Curve.prototype );
-EllipseCurve.prototype.constructor = EllipseCurve;
+		this.aRotation = aRotation || 0;
 
-EllipseCurve.prototype.isEllipseCurve = true;
+	}
+	getPoint( t, optionalTarget ) {
 
-EllipseCurve.prototype.getPoint = function ( t, optionalTarget ) {
+		const point = optionalTarget || new Vector2();
 
-	const point = optionalTarget || new Vector2();
+		const twoPi = Math.PI * 2;
+		let deltaAngle = this.aEndAngle - this.aStartAngle;
+		const samePoints = Math.abs( deltaAngle ) < Number.EPSILON;
 
-	const twoPi = Math.PI * 2;
-	let deltaAngle = this.aEndAngle - this.aStartAngle;
-	const samePoints = Math.abs( deltaAngle ) < Number.EPSILON;
+		// ensures that deltaAngle is 0 .. 2 PI
+		while ( deltaAngle < 0 ) deltaAngle += twoPi;
+		while ( deltaAngle > twoPi ) deltaAngle -= twoPi;
 
-	// ensures that deltaAngle is 0 .. 2 PI
-	while ( deltaAngle < 0 ) deltaAngle += twoPi;
-	while ( deltaAngle > twoPi ) deltaAngle -= twoPi;
+		if ( deltaAngle < Number.EPSILON ) {
 
-	if ( deltaAngle < Number.EPSILON ) {
+			if ( samePoints ) {
 
-		if ( samePoints ) {
+				deltaAngle = 0;
 
-			deltaAngle = 0;
+			} else {
 
-		} else {
+				deltaAngle = twoPi;
 
-			deltaAngle = twoPi;
+			}
 
 		}
 
-	}
+		if ( this.aClockwise === true && ! samePoints ) {
 
-	if ( this.aClockwise === true && ! samePoints ) {
+			if ( deltaAngle === twoPi ) {
 
-		if ( deltaAngle === twoPi ) {
+				deltaAngle = - twoPi;
 
-			deltaAngle = - twoPi;
+			} else {
 
-		} else {
+				deltaAngle = deltaAngle - twoPi;
 
-			deltaAngle = deltaAngle - twoPi;
+			}
 
 		}
 
-	}
-
-	const angle = this.aStartAngle + t * deltaAngle;
-	let x = this.aX + this.xRadius * Math.cos( angle );
-	let y = this.aY + this.yRadius * Math.sin( angle );
+		const angle = this.aStartAngle + t * deltaAngle;
+		let x = this.aX + this.xRadius * Math.cos( angle );
+		let y = this.aY + this.yRadius * Math.sin( angle );
 
-	if ( this.aRotation !== 0 ) {
+		if ( this.aRotation !== 0 ) {
 
-		const cos = Math.cos( this.aRotation );
-		const sin = Math.sin( this.aRotation );
+			const cos = Math.cos( this.aRotation );
+			const sin = Math.sin( this.aRotation );
 
-		const tx = x - this.aX;
-		const ty = y - this.aY;
+			const tx = x - this.aX;
+			const ty = y - this.aY;
 
-		// Rotate the point about the center of the ellipse.
-		x = tx * cos - ty * sin + this.aX;
-		y = tx * sin + ty * cos + this.aY;
-
-	}
+			// Rotate the point about the center of the ellipse.
+			x = tx * cos - ty * sin + this.aX;
+			y = tx * sin + ty * cos + this.aY;
 
-	return point.set( x, y );
+		}
 
-};
+		return point.set( x, y );
 
-EllipseCurve.prototype.copy = function ( source ) {
+	}
+	copy( source ) {
 
-	Curve.prototype.copy.call( this, source );
+		super.copy( source );
 
-	this.aX = source.aX;
-	this.aY = source.aY;
+		this.aX = source.aX;
+		this.aY = source.aY;
 
-	this.xRadius = source.xRadius;
-	this.yRadius = source.yRadius;
+		this.xRadius = source.xRadius;
+		this.yRadius = source.yRadius;
 
-	this.aStartAngle = source.aStartAngle;
-	this.aEndAngle = source.aEndAngle;
+		this.aStartAngle = source.aStartAngle;
+		this.aEndAngle = source.aEndAngle;
 
-	this.aClockwise = source.aClockwise;
+		this.aClockwise = source.aClockwise;
 
-	this.aRotation = source.aRotation;
+		this.aRotation = source.aRotation;
 
-	return this;
+		return this;
 
-};
+	}
+	toJSON() {
 
+		const data = super.toJSON();
 
-EllipseCurve.prototype.toJSON = function () {
+		data.aX = this.aX;
+		data.aY = this.aY;
 
-	const data = Curve.prototype.toJSON.call( this );
+		data.xRadius = this.xRadius;
+		data.yRadius = this.yRadius;
 
-	data.aX = this.aX;
-	data.aY = this.aY;
+		data.aStartAngle = this.aStartAngle;
+		data.aEndAngle = this.aEndAngle;
 
-	data.xRadius = this.xRadius;
-	data.yRadius = this.yRadius;
+		data.aClockwise = this.aClockwise;
 
-	data.aStartAngle = this.aStartAngle;
-	data.aEndAngle = this.aEndAngle;
+		data.aRotation = this.aRotation;
 
-	data.aClockwise = this.aClockwise;
+		return data;
 
-	data.aRotation = this.aRotation;
+	}
+	fromJSON( json ) {
 
-	return data;
+		super.fromJSON( json );
 
-};
+		this.aX = json.aX;
+		this.aY = json.aY;
 
-EllipseCurve.prototype.fromJSON = function ( json ) {
+		this.xRadius = json.xRadius;
+		this.yRadius = json.yRadius;
 
-	Curve.prototype.fromJSON.call( this, json );
+		this.aStartAngle = json.aStartAngle;
+		this.aEndAngle = json.aEndAngle;
 
-	this.aX = json.aX;
-	this.aY = json.aY;
+		this.aClockwise = json.aClockwise;
 
-	this.xRadius = json.xRadius;
-	this.yRadius = json.yRadius;
+		this.aRotation = json.aRotation;
 
-	this.aStartAngle = json.aStartAngle;
-	this.aEndAngle = json.aEndAngle;
+		return this;
 
-	this.aClockwise = json.aClockwise;
+	}
 
-	this.aRotation = json.aRotation;
+}
 
-	return this;
+class ArcCurve extends EllipseCurve {
 
-};
+	constructor( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {
 
-function ArcCurve( aX, aY, aRadius, aStartAngle, aEndAngle, aClockwise ) {
+		super( aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );
 
-	EllipseCurve.call( this, aX, aY, aRadius, aRadius, aStartAngle, aEndAngle, aClockwise );
+		this.type = 'ArcCurve';
+		Object.defineProperty( this, 'isArcCurve', { value: true } );
 
-	this.type = 'ArcCurve';
+	}
 
 }
 
-ArcCurve.prototype = Object.create( EllipseCurve.prototype );
-ArcCurve.prototype.constructor = ArcCurve;
-
-ArcCurve.prototype.isArcCurve = true;
-
 /**
  * Centripetal CatmullRom Curve - which is useful for avoiding
  * cusps and self-intersections in non-uniform catmull rom curves.
@@ -35565,173 +35560,169 @@ function CubicPoly() {
 const tmp = new Vector3();
 const px = new CubicPoly(), py = new CubicPoly(), pz = new CubicPoly();
 
-function CatmullRomCurve3( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) {
+class CatmullRomCurve3 extends Curve {
 
-	Curve.call( this );
+	constructor( points = [], closed = false, curveType = 'centripetal', tension = 0.5 ) {
 
-	this.type = 'CatmullRomCurve3';
+		super();
 
-	this.points = points;
-	this.closed = closed;
-	this.curveType = curveType;
-	this.tension = tension;
+		this.type = 'CatmullRomCurve3';
+		Object.defineProperty( this, 'isCatmullRomCurve3', { value: true } );
+		this.points = points;
+		this.closed = closed;
+		this.curveType = curveType;
+		this.tension = tension;
 
-}
+	}
 
-CatmullRomCurve3.prototype = Object.create( Curve.prototype );
-CatmullRomCurve3.prototype.constructor = CatmullRomCurve3;
+	getPoint( t, optionalTarget = new Vector3() ) {
 
-CatmullRomCurve3.prototype.isCatmullRomCurve3 = true;
+		const point = optionalTarget;
 
-CatmullRomCurve3.prototype.getPoint = function ( t, optionalTarget = new Vector3() ) {
+		const points = this.points;
+		const l = points.length;
 
-	const point = optionalTarget;
+		const p = ( l - ( this.closed ? 0 : 1 ) ) * t;
+		let intPoint = Math.floor( p );
+		let weight = p - intPoint;
 
-	const points = this.points;
-	const l = points.length;
+		if ( this.closed ) {
 
-	const p = ( l - ( this.closed ? 0 : 1 ) ) * t;
-	let intPoint = Math.floor( p );
-	let weight = p - intPoint;
+			intPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l;
 
-	if ( this.closed ) {
+		} else if ( weight === 0 && intPoint === l - 1 ) {
 
-		intPoint += intPoint > 0 ? 0 : ( Math.floor( Math.abs( intPoint ) / l ) + 1 ) * l;
+			intPoint = l - 2;
+			weight = 1;
 
-	} else if ( weight === 0 && intPoint === l - 1 ) {
+		}
 
-		intPoint = l - 2;
-		weight = 1;
+		let p0, p3; // 4 points (p1 & p2 defined below)
 
-	}
+		if ( this.closed || intPoint > 0 ) {
 
-	let p0, p3; // 4 points (p1 & p2 defined below)
+			p0 = points[ ( intPoint - 1 ) % l ];
 
-	if ( this.closed || intPoint > 0 ) {
+		} else {
 
-		p0 = points[ ( intPoint - 1 ) % l ];
+			// extrapolate first point
+			tmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] );
+			p0 = tmp;
 
-	} else {
+		}
 
-		// extrapolate first point
-		tmp.subVectors( points[ 0 ], points[ 1 ] ).add( points[ 0 ] );
-		p0 = tmp;
+		const p1 = points[ intPoint % l ];
+		const p2 = points[ ( intPoint + 1 ) % l ];
 
-	}
+		if ( this.closed || intPoint + 2 < l ) {
 
-	const p1 = points[ intPoint % l ];
-	const p2 = points[ ( intPoint + 1 ) % l ];
+			p3 = points[ ( intPoint + 2 ) % l ];
 
-	if ( this.closed || intPoint + 2 < l ) {
+		} else {
 
-		p3 = points[ ( intPoint + 2 ) % l ];
+			// extrapolate last point
+			tmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] );
+			p3 = tmp;
 
-	} else {
+		}
 
-		// extrapolate last point
-		tmp.subVectors( points[ l - 1 ], points[ l - 2 ] ).add( points[ l - 1 ] );
-		p3 = tmp;
+		if ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) {
 
-	}
+			// init Centripetal / Chordal Catmull-Rom
+			const pow = this.curveType === 'chordal' ? 0.5 : 0.25;
+			let dt0 = Math.pow( p0.distanceToSquared( p1 ), pow );
+			let dt1 = Math.pow( p1.distanceToSquared( p2 ), pow );
+			let dt2 = Math.pow( p2.distanceToSquared( p3 ), pow );
 
-	if ( this.curveType === 'centripetal' || this.curveType === 'chordal' ) {
+			// safety check for repeated points
+			if ( dt1 < 1e-4 ) dt1 = 1.0;
+			if ( dt0 < 1e-4 ) dt0 = dt1;
+			if ( dt2 < 1e-4 ) dt2 = dt1;
 
-		// init Centripetal / Chordal Catmull-Rom
-		const pow = this.curveType === 'chordal' ? 0.5 : 0.25;
-		let dt0 = Math.pow( p0.distanceToSquared( p1 ), pow );
-		let dt1 = Math.pow( p1.distanceToSquared( p2 ), pow );
-		let dt2 = Math.pow( p2.distanceToSquared( p3 ), pow );
+			px.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 );
+			py.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 );
+			pz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 );
 
-		// safety check for repeated points
-		if ( dt1 < 1e-4 ) dt1 = 1.0;
-		if ( dt0 < 1e-4 ) dt0 = dt1;
-		if ( dt2 < 1e-4 ) dt2 = dt1;
+		} else if ( this.curveType === 'catmullrom' ) {
 
-		px.initNonuniformCatmullRom( p0.x, p1.x, p2.x, p3.x, dt0, dt1, dt2 );
-		py.initNonuniformCatmullRom( p0.y, p1.y, p2.y, p3.y, dt0, dt1, dt2 );
-		pz.initNonuniformCatmullRom( p0.z, p1.z, p2.z, p3.z, dt0, dt1, dt2 );
+			px.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension );
+			py.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension );
+			pz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension );
 
-	} else if ( this.curveType === 'catmullrom' ) {
+		}
 
-		px.initCatmullRom( p0.x, p1.x, p2.x, p3.x, this.tension );
-		py.initCatmullRom( p0.y, p1.y, p2.y, p3.y, this.tension );
-		pz.initCatmullRom( p0.z, p1.z, p2.z, p3.z, this.tension );
+		point.set(
+			px.calc( weight ),
+			py.calc( weight ),
+			pz.calc( weight )
+		);
+
+		return point;
 
 	}
+	copy( source ) {
 
-	point.set(
-		px.calc( weight ),
-		py.calc( weight ),
-		pz.calc( weight )
-	);
+		super.copy( source );
 
-	return point;
+		this.points = [];
 
-};
+		for ( let i = 0, l = source.points.length; i < l; i ++ ) {
 
-CatmullRomCurve3.prototype.copy = function ( source ) {
+			const point = source.points[ i ];
 
-	Curve.prototype.copy.call( this, source );
+			this.points.push( point.clone() );
 
-	this.points = [];
-
-	for ( let i = 0, l = source.points.length; i < l; i ++ ) {
+		}
 
-		const point = source.points[ i ];
+		this.closed = source.closed;
+		this.curveType = source.curveType;
+		this.tension = source.tension;
 
-		this.points.push( point.clone() );
+		return this;
 
 	}
+	toJSON() {
 
-	this.closed = source.closed;
-	this.curveType = source.curveType;
-	this.tension = source.tension;
-
-	return this;
+		const data = super.toJSON();
 
-};
+		data.points = [];
 
-CatmullRomCurve3.prototype.toJSON = function () {
+		for ( let i = 0, l = this.points.length; i < l; i ++ ) {
 
-	const data = Curve.prototype.toJSON.call( this );
+			const point = this.points[ i ];
+			data.points.push( point.toArray() );
 
-	data.points = [];
+		}
 
-	for ( let i = 0, l = this.points.length; i < l; i ++ ) {
+		data.closed = this.closed;
+		data.curveType = this.curveType;
+		data.tension = this.tension;
 
-		const point = this.points[ i ];
-		data.points.push( point.toArray() );
+		return data;
 
 	}
+	fromJSON( json ) {
 
-	data.closed = this.closed;
-	data.curveType = this.curveType;
-	data.tension = this.tension;
-
-	return data;
+		super.fromJSON( json );
 
-};
+		this.points = [];
 
-CatmullRomCurve3.prototype.fromJSON = function ( json ) {
+		for ( let i = 0, l = json.points.length; i < l; i ++ ) {
 
-	Curve.prototype.fromJSON.call( this, json );
+			const point = json.points[ i ];
+			this.points.push( new Vector3().fromArray( point ) );
 
-	this.points = [];
+		}
 
-	for ( let i = 0, l = json.points.length; i < l; i ++ ) {
+		this.closed = json.closed;
+		this.curveType = json.curveType;
+		this.tension = json.tension;
 
-		const point = json.points[ i ];
-		this.points.push( new Vector3().fromArray( point ) );
+		return this;
 
 	}
 
-	this.closed = json.closed;
-	this.curveType = json.curveType;
-	this.tension = json.tension;
-
-	return this;
-
-};
+}
 
 /**
  * Bezier Curves formulas obtained from
@@ -35811,540 +35802,508 @@ function CubicBezier( t, p0, p1, p2, p3 ) {
 
 }
 
-function CubicBezierCurve( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) {
-
-	Curve.call( this );
+class CubicBezierCurve extends Curve {
 
-	this.type = 'CubicBezierCurve';
+	constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2(), v3 = new Vector2() ) {
 
-	this.v0 = v0;
-	this.v1 = v1;
-	this.v2 = v2;
-	this.v3 = v3;
-
-}
-
-CubicBezierCurve.prototype = Object.create( Curve.prototype );
-CubicBezierCurve.prototype.constructor = CubicBezierCurve;
-
-CubicBezierCurve.prototype.isCubicBezierCurve = true;
-
-CubicBezierCurve.prototype.getPoint = function ( t, optionalTarget = new Vector2() ) {
-
-	const point = optionalTarget;
-
-	const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
-
-	point.set(
-		CubicBezier( t, v0.x, v1.x, v2.x, v3.x ),
-		CubicBezier( t, v0.y, v1.y, v2.y, v3.y )
-	);
+		super();
 
-	return point;
+		this.type = 'CubicBezierCurve';
+		Object.defineProperty( this, 'isCubicBezierCurve', { value: true } );
 
-};
+		this.v0 = v0;
+		this.v1 = v1;
+		this.v2 = v2;
+		this.v3 = v3;
 
-CubicBezierCurve.prototype.copy = function ( source ) {
+	}
 
-	Curve.prototype.copy.call( this, source );
+	getPoint( t, optionalTarget = new Vector2() ) {
 
-	this.v0.copy( source.v0 );
-	this.v1.copy( source.v1 );
-	this.v2.copy( source.v2 );
-	this.v3.copy( source.v3 );
+		const point = optionalTarget;
 
-	return this;
+		const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
 
-};
+		point.set(
+			CubicBezier( t, v0.x, v1.x, v2.x, v3.x ),
+			CubicBezier( t, v0.y, v1.y, v2.y, v3.y )
+		);
 
-CubicBezierCurve.prototype.toJSON = function () {
+		return point;
 
-	const data = Curve.prototype.toJSON.call( this );
+	}
+	copy( source ) {
 
-	data.v0 = this.v0.toArray();
-	data.v1 = this.v1.toArray();
-	data.v2 = this.v2.toArray();
-	data.v3 = this.v3.toArray();
+		super.copy( source );
 
-	return data;
+		this.v0.copy( source.v0 );
+		this.v1.copy( source.v1 );
+		this.v2.copy( source.v2 );
+		this.v3.copy( source.v3 );
 
-};
+		return this;
 
-CubicBezierCurve.prototype.fromJSON = function ( json ) {
+	}
+	toJSON() {
 
-	Curve.prototype.fromJSON.call( this, json );
+		const data = super.toJSON();
 
-	this.v0.fromArray( json.v0 );
-	this.v1.fromArray( json.v1 );
-	this.v2.fromArray( json.v2 );
-	this.v3.fromArray( json.v3 );
+		data.v0 = this.v0.toArray();
+		data.v1 = this.v1.toArray();
+		data.v2 = this.v2.toArray();
+		data.v3 = this.v3.toArray();
 
-	return this;
+		return data;
 
-};
+	}
+	fromJSON( json ) {
 
-function CubicBezierCurve3( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) {
+		super.fromJSON( json );
 
-	Curve.call( this );
+		this.v0.fromArray( json.v0 );
+		this.v1.fromArray( json.v1 );
+		this.v2.fromArray( json.v2 );
+		this.v3.fromArray( json.v3 );
 
-	this.type = 'CubicBezierCurve3';
+		return this;
 
-	this.v0 = v0;
-	this.v1 = v1;
-	this.v2 = v2;
-	this.v3 = v3;
+	}
 
 }
 
-CubicBezierCurve3.prototype = Object.create( Curve.prototype );
-CubicBezierCurve3.prototype.constructor = CubicBezierCurve3;
-
-CubicBezierCurve3.prototype.isCubicBezierCurve3 = true;
-
-CubicBezierCurve3.prototype.getPoint = function ( t, optionalTarget = new Vector3() ) {
-
-	const point = optionalTarget;
-
-	const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
+class CubicBezierCurve3 extends Curve {
 
-	point.set(
-		CubicBezier( t, v0.x, v1.x, v2.x, v3.x ),
-		CubicBezier( t, v0.y, v1.y, v2.y, v3.y ),
-		CubicBezier( t, v0.z, v1.z, v2.z, v3.z )
-	);
+	constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3() ) {
 
-	return point;
+		super();
 
-};
+		this.type = 'CubicBezierCurve3';
+		Object.defineProperty( this, 'isCubicBezierCurve3', { value: true } );
 
-CubicBezierCurve3.prototype.copy = function ( source ) {
+		this.v0 = v0;
+		this.v1 = v1;
+		this.v2 = v2;
+		this.v3 = v3;
 
-	Curve.prototype.copy.call( this, source );
+	}
+	getPoint( t, optionalTarget = new Vector3() ) {
 
-	this.v0.copy( source.v0 );
-	this.v1.copy( source.v1 );
-	this.v2.copy( source.v2 );
-	this.v3.copy( source.v3 );
+		const point = optionalTarget;
 
-	return this;
+		const v0 = this.v0, v1 = this.v1, v2 = this.v2, v3 = this.v3;
 
-};
+		point.set(
+			CubicBezier( t, v0.x, v1.x, v2.x, v3.x ),
+			CubicBezier( t, v0.y, v1.y, v2.y, v3.y ),
+			CubicBezier( t, v0.z, v1.z, v2.z, v3.z )
+		);
 
-CubicBezierCurve3.prototype.toJSON = function () {
+		return point;
 
-	const data = Curve.prototype.toJSON.call( this );
+	}
+	copy( source ) {
 
-	data.v0 = this.v0.toArray();
-	data.v1 = this.v1.toArray();
-	data.v2 = this.v2.toArray();
-	data.v3 = this.v3.toArray();
+		super.copy( source );
 
-	return data;
+		this.v0.copy( source.v0 );
+		this.v1.copy( source.v1 );
+		this.v2.copy( source.v2 );
+		this.v3.copy( source.v3 );
 
-};
+		return this;
 
-CubicBezierCurve3.prototype.fromJSON = function ( json ) {
+	}
+	toJSON() {
 
-	Curve.prototype.fromJSON.call( this, json );
+		const data = super.toJSON();
 
-	this.v0.fromArray( json.v0 );
-	this.v1.fromArray( json.v1 );
-	this.v2.fromArray( json.v2 );
-	this.v3.fromArray( json.v3 );
+		data.v0 = this.v0.toArray();
+		data.v1 = this.v1.toArray();
+		data.v2 = this.v2.toArray();
+		data.v3 = this.v3.toArray();
 
-	return this;
+		return data;
 
-};
+	}
+	fromJSON( json ) {
 
-function LineCurve( v1 = new Vector2(), v2 = new Vector2() ) {
+		super.fromJSON( json );
 
-	Curve.call( this );
+		this.v0.fromArray( json.v0 );
+		this.v1.fromArray( json.v1 );
+		this.v2.fromArray( json.v2 );
+		this.v3.fromArray( json.v3 );
 
-	this.type = 'LineCurve';
+		return this;
 
-	this.v1 = v1;
-	this.v2 = v2;
+	}
 
 }
 
-LineCurve.prototype = Object.create( Curve.prototype );
-LineCurve.prototype.constructor = LineCurve;
-
-LineCurve.prototype.isLineCurve = true;
-
-LineCurve.prototype.getPoint = function ( t, optionalTarget = new Vector2() ) {
-
-	const point = optionalTarget;
+class LineCurve extends Curve {
 
-	if ( t === 1 ) {
+	constructor( v1 = new Vector2(), v2 = new Vector2() ) {
 
-		point.copy( this.v2 );
+		super();
 
-	} else {
+		this.type = 'LineCurve';
+		Object.defineProperty( this, 'isLineCurve', { value: true } );
 
-		point.copy( this.v2 ).sub( this.v1 );
-		point.multiplyScalar( t ).add( this.v1 );
+		this.v1 = v1;
+		this.v2 = v2;
 
 	}
+	getPoint( t, optionalTarget = new Vector2() ) {
 
-	return point;
-
-};
-
-// Line curve is linear, so we can overwrite default getPointAt
+		const point = optionalTarget;
 
-LineCurve.prototype.getPointAt = function ( u, optionalTarget ) {
-
-	return this.getPoint( u, optionalTarget );
-
-};
+		if ( t === 1 ) {
 
-LineCurve.prototype.getTangent = function ( t, optionalTarget ) {
+			point.copy( this.v2 );
 
-	const tangent = optionalTarget || new Vector2();
+		} else {
 
-	tangent.copy( this.v2 ).sub( this.v1 ).normalize();
+			point.copy( this.v2 ).sub( this.v1 );
+			point.multiplyScalar( t ).add( this.v1 );
 
-	return tangent;
+		}
 
-};
+		return point;
 
-LineCurve.prototype.copy = function ( source ) {
+	}
+	// Line curve is linear, so we can overwrite default getPointAt
+	getPointAt( u, optionalTarget ) {
 
-	Curve.prototype.copy.call( this, source );
+		return this.getPoint( u, optionalTarget );
 
-	this.v1.copy( source.v1 );
-	this.v2.copy( source.v2 );
+	}
+	getTangent( t, optionalTarget ) {
 
-	return this;
+		const tangent = optionalTarget || new Vector2();
 
-};
+		tangent.copy( this.v2 ).sub( this.v1 ).normalize();
 
-LineCurve.prototype.toJSON = function () {
+		return tangent;
 
-	const data = Curve.prototype.toJSON.call( this );
+	}
+	copy( source ) {
 
-	data.v1 = this.v1.toArray();
-	data.v2 = this.v2.toArray();
+		super.copy( source );
 
-	return data;
+		this.v1.copy( source.v1 );
+		this.v2.copy( source.v2 );
 
-};
+		return this;
 
-LineCurve.prototype.fromJSON = function ( json ) {
+	}
+	toJSON() {
 
-	Curve.prototype.fromJSON.call( this, json );
+		const data = super.toJSON();
 
-	this.v1.fromArray( json.v1 );
-	this.v2.fromArray( json.v2 );
+		data.v1 = this.v1.toArray();
+		data.v2 = this.v2.toArray();
 
-	return this;
+		return data;
 
-};
+	}
+	fromJSON( json ) {
 
-function LineCurve3( v1 = new Vector3(), v2 = new Vector3() ) {
+		super.fromJSON( json );
 
-	Curve.call( this );
+		this.v1.fromArray( json.v1 );
+		this.v2.fromArray( json.v2 );
 
-	this.type = 'LineCurve3';
+		return this;
 
-	this.v1 = v1;
-	this.v2 = v2;
+	}
 
 }
 
-LineCurve3.prototype = Object.create( Curve.prototype );
-LineCurve3.prototype.constructor = LineCurve3;
-
-LineCurve3.prototype.isLineCurve3 = true;
-
-LineCurve3.prototype.getPoint = function ( t, optionalTarget = new Vector3() ) {
-
-	const point = optionalTarget;
+class LineCurve3 extends Curve {
 
-	if ( t === 1 ) {
+	constructor( v1 = new Vector3(), v2 = new Vector3() ) {
 
-		point.copy( this.v2 );
+		super();
 
-	} else {
+		this.type = 'LineCurve3';
+		Object.defineProperty( this, 'isLineCurve3', { value: true } );
 
-		point.copy( this.v2 ).sub( this.v1 );
-		point.multiplyScalar( t ).add( this.v1 );
+		this.v1 = v1;
+		this.v2 = v2;
 
 	}
+	getPoint( t, optionalTarget = new Vector3() ) {
 
-	return point;
-
-};
-
-// Line curve is linear, so we can overwrite default getPointAt
+		const point = optionalTarget;
 
-LineCurve3.prototype.getPointAt = function ( u, optionalTarget ) {
-
-	return this.getPoint( u, optionalTarget );
+		if ( t === 1 ) {
 
-};
+			point.copy( this.v2 );
 
-LineCurve3.prototype.copy = function ( source ) {
+		} else {
 
-	Curve.prototype.copy.call( this, source );
+			point.copy( this.v2 ).sub( this.v1 );
+			point.multiplyScalar( t ).add( this.v1 );
 
-	this.v1.copy( source.v1 );
-	this.v2.copy( source.v2 );
+		}
 
-	return this;
+		return point;
 
-};
+	}
+	// Line curve is linear, so we can overwrite default getPointAt
+	getPointAt( u, optionalTarget ) {
 
-LineCurve3.prototype.toJSON = function () {
+		return this.getPoint( u, optionalTarget );
 
-	const data = Curve.prototype.toJSON.call( this );
+	}
+	copy( source ) {
 
-	data.v1 = this.v1.toArray();
-	data.v2 = this.v2.toArray();
+		super.copy( source );
 
-	return data;
+		this.v1.copy( source.v1 );
+		this.v2.copy( source.v2 );
 
-};
+		return this;
 
-LineCurve3.prototype.fromJSON = function ( json ) {
+	}
+	toJSON() {
 
-	Curve.prototype.fromJSON.call( this, json );
+		const data = super.toJSON();
 
-	this.v1.fromArray( json.v1 );
-	this.v2.fromArray( json.v2 );
+		data.v1 = this.v1.toArray();
+		data.v2 = this.v2.toArray();
 
-	return this;
+		return data;
 
-};
+	}
+	fromJSON( json ) {
 
-function QuadraticBezierCurve( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) {
+		super.fromJSON( json );
 
-	Curve.call( this );
+		this.v1.fromArray( json.v1 );
+		this.v2.fromArray( json.v2 );
 
-	this.type = 'QuadraticBezierCurve';
+		return this;
 
-	this.v0 = v0;
-	this.v1 = v1;
-	this.v2 = v2;
+	}
 
 }
 
-QuadraticBezierCurve.prototype = Object.create( Curve.prototype );
-QuadraticBezierCurve.prototype.constructor = QuadraticBezierCurve;
-
-QuadraticBezierCurve.prototype.isQuadraticBezierCurve = true;
-
-QuadraticBezierCurve.prototype.getPoint = function ( t, optionalTarget = new Vector2() ) {
+class QuadraticBezierCurve extends Curve {
 
-	const point = optionalTarget;
+	constructor( v0 = new Vector2(), v1 = new Vector2(), v2 = new Vector2() ) {
 
-	const v0 = this.v0, v1 = this.v1, v2 = this.v2;
-
-	point.set(
-		QuadraticBezier( t, v0.x, v1.x, v2.x ),
-		QuadraticBezier( t, v0.y, v1.y, v2.y )
-	);
-
-	return point;
+		super();
 
-};
+		this.type = 'QuadraticBezierCurve';
+		Object.defineProperty( this, 'isQuadraticBezierCurve', { value: true } );
 
-QuadraticBezierCurve.prototype.copy = function ( source ) {
+		this.v0 = v0;
+		this.v1 = v1;
+		this.v2 = v2;
 
-	Curve.prototype.copy.call( this, source );
+	}
+	getPoint( t, optionalTarget = new Vector2() ) {
 
-	this.v0.copy( source.v0 );
-	this.v1.copy( source.v1 );
-	this.v2.copy( source.v2 );
+		const point = optionalTarget;
 
-	return this;
+		const v0 = this.v0, v1 = this.v1, v2 = this.v2;
 
-};
+		point.set(
+			QuadraticBezier( t, v0.x, v1.x, v2.x ),
+			QuadraticBezier( t, v0.y, v1.y, v2.y )
+		);
 
-QuadraticBezierCurve.prototype.toJSON = function () {
+		return point;
 
-	const data = Curve.prototype.toJSON.call( this );
+	}
+	copy( source ) {
 
-	data.v0 = this.v0.toArray();
-	data.v1 = this.v1.toArray();
-	data.v2 = this.v2.toArray();
+		super.copy( source );
 
-	return data;
+		this.v0.copy( source.v0 );
+		this.v1.copy( source.v1 );
+		this.v2.copy( source.v2 );
 
-};
+		return this;
 
-QuadraticBezierCurve.prototype.fromJSON = function ( json ) {
+	}
+	toJSON() {
 
-	Curve.prototype.fromJSON.call( this, json );
+		const data = super.toJSON();
 
-	this.v0.fromArray( json.v0 );
-	this.v1.fromArray( json.v1 );
-	this.v2.fromArray( json.v2 );
+		data.v0 = this.v0.toArray();
+		data.v1 = this.v1.toArray();
+		data.v2 = this.v2.toArray();
 
-	return this;
+		return data;
 
-};
+	}
+	fromJSON( json ) {
 
-function QuadraticBezierCurve3( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) {
+		super.fromJSON( json );
 
-	Curve.call( this );
+		this.v0.fromArray( json.v0 );
+		this.v1.fromArray( json.v1 );
+		this.v2.fromArray( json.v2 );
 
-	this.type = 'QuadraticBezierCurve3';
+		return this;
 
-	this.v0 = v0;
-	this.v1 = v1;
-	this.v2 = v2;
+	}
 
 }
 
-QuadraticBezierCurve3.prototype = Object.create( Curve.prototype );
-QuadraticBezierCurve3.prototype.constructor = QuadraticBezierCurve3;
+class QuadraticBezierCurve3 extends Curve {
 
-QuadraticBezierCurve3.prototype.isQuadraticBezierCurve3 = true;
+	constructor( v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3() ) {
 
-QuadraticBezierCurve3.prototype.getPoint = function ( t, optionalTarget = new Vector3() ) {
+		super();
 
-	const point = optionalTarget;
+		this.type = 'QuadraticBezierCurve3';
+		Object.defineProperty( this, 'isQuadraticBezierCurve3', { value: true } );
 
-	const v0 = this.v0, v1 = this.v1, v2 = this.v2;
+		this.v0 = v0;
+		this.v1 = v1;
+		this.v2 = v2;
 
-	point.set(
-		QuadraticBezier( t, v0.x, v1.x, v2.x ),
-		QuadraticBezier( t, v0.y, v1.y, v2.y ),
-		QuadraticBezier( t, v0.z, v1.z, v2.z )
-	);
+	}
+	getPoint( t, optionalTarget = new Vector3() ) {
 
-	return point;
+		const point = optionalTarget;
 
-};
+		const v0 = this.v0, v1 = this.v1, v2 = this.v2;
 
-QuadraticBezierCurve3.prototype.copy = function ( source ) {
+		point.set(
+			QuadraticBezier( t, v0.x, v1.x, v2.x ),
+			QuadraticBezier( t, v0.y, v1.y, v2.y ),
+			QuadraticBezier( t, v0.z, v1.z, v2.z )
+		);
 
-	Curve.prototype.copy.call( this, source );
+		return point;
 
-	this.v0.copy( source.v0 );
-	this.v1.copy( source.v1 );
-	this.v2.copy( source.v2 );
+	}
+	copy( source ) {
 
-	return this;
+		super.copy( source );
 
-};
+		this.v0.copy( source.v0 );
+		this.v1.copy( source.v1 );
+		this.v2.copy( source.v2 );
 
-QuadraticBezierCurve3.prototype.toJSON = function () {
+		return this;
 
-	const data = Curve.prototype.toJSON.call( this );
+	}
+	toJSON() {
 
-	data.v0 = this.v0.toArray();
-	data.v1 = this.v1.toArray();
-	data.v2 = this.v2.toArray();
+		const data = super.toJSON();
 
-	return data;
+		data.v0 = this.v0.toArray();
+		data.v1 = this.v1.toArray();
+		data.v2 = this.v2.toArray();
 
-};
+		return data;
 
-QuadraticBezierCurve3.prototype.fromJSON = function ( json ) {
+	}
+	fromJSON( json ) {
 
-	Curve.prototype.fromJSON.call( this, json );
+		super.fromJSON( json );
 
-	this.v0.fromArray( json.v0 );
-	this.v1.fromArray( json.v1 );
-	this.v2.fromArray( json.v2 );
+		this.v0.fromArray( json.v0 );
+		this.v1.fromArray( json.v1 );
+		this.v2.fromArray( json.v2 );
 
-	return this;
+		return this;
 
-};
+	}
 
-function SplineCurve( points = [] ) {
+}
 
-	Curve.call( this );
+class SplineCurve extends Curve {
 
-	this.type = 'SplineCurve';
+	constructor( points = [] ) {
 
-	this.points = points;
+		super();
 
-}
+		this.type = 'SplineCurve';
+		Object.defineProperty( this, 'isSplineCurve', { value: true } );
 
-SplineCurve.prototype = Object.create( Curve.prototype );
-SplineCurve.prototype.constructor = SplineCurve;
+		this.points = points;
 
-SplineCurve.prototype.isSplineCurve = true;
+	}
+	getPoint( t, optionalTarget = new Vector2() ) {
 
-SplineCurve.prototype.getPoint = function ( t, optionalTarget = new Vector2() ) {
+		const point = optionalTarget;
 
-	const point = optionalTarget;
+		const points = this.points;
+		const p = ( points.length - 1 ) * t;
 
-	const points = this.points;
-	const p = ( points.length - 1 ) * t;
+		const intPoint = Math.floor( p );
+		const weight = p - intPoint;
 
-	const intPoint = Math.floor( p );
-	const weight = p - intPoint;
+		const p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ];
+		const p1 = points[ intPoint ];
+		const p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ];
+		const p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ];
 
-	const p0 = points[ intPoint === 0 ? intPoint : intPoint - 1 ];
-	const p1 = points[ intPoint ];
-	const p2 = points[ intPoint > points.length - 2 ? points.length - 1 : intPoint + 1 ];
-	const p3 = points[ intPoint > points.length - 3 ? points.length - 1 : intPoint + 2 ];
+		point.set(
+			CatmullRom( weight, p0.x, p1.x, p2.x, p3.x ),
+			CatmullRom( weight, p0.y, p1.y, p2.y, p3.y )
+		);
 
-	point.set(
-		CatmullRom( weight, p0.x, p1.x, p2.x, p3.x ),
-		CatmullRom( weight, p0.y, p1.y, p2.y, p3.y )
-	);
+		return point;
 
-	return point;
+	}
+	copy( source ) {
 
-};
+		Curve.prototype.copy.call( this, source );
 
-SplineCurve.prototype.copy = function ( source ) {
+		this.points = [];
 
-	Curve.prototype.copy.call( this, source );
+		for ( let i = 0, l = source.points.length; i < l; i ++ ) {
 
-	this.points = [];
+			const point = source.points[ i ];
 
-	for ( let i = 0, l = source.points.length; i < l; i ++ ) {
+			this.points.push( point.clone() );
 
-		const point = source.points[ i ];
+		}
 
-		this.points.push( point.clone() );
+		return this;
 
 	}
+	toJSON() {
 
-	return this;
+		const data = Curve.prototype.toJSON.call( this );
 
-};
+		data.points = [];
 
-SplineCurve.prototype.toJSON = function () {
+		for ( let i = 0, l = this.points.length; i < l; i ++ ) {
 
-	const data = Curve.prototype.toJSON.call( this );
+			const point = this.points[ i ];
+			data.points.push( point.toArray() );
 
-	data.points = [];
-
-	for ( let i = 0, l = this.points.length; i < l; i ++ ) {
+		}
 
-		const point = this.points[ i ];
-		data.points.push( point.toArray() );
+		return data;
 
 	}
+	fromJSON( json ) {
 
-	return data;
-
-};
+		Curve.prototype.fromJSON.call( this, json );
 
-SplineCurve.prototype.fromJSON = function ( json ) {
+		this.points = [];
 
-	Curve.prototype.fromJSON.call( this, json );
+		for ( let i = 0, l = json.points.length; i < l; i ++ ) {
 
-	this.points = [];
+			const point = json.points[ i ];
+			this.points.push( new Vector2().fromArray( point ) );
 
-	for ( let i = 0, l = json.points.length; i < l; i ++ ) {
+		}
 
-		const point = json.points[ i ];
-		this.points.push( new Vector2().fromArray( point ) );
+		return this;
 
 	}
 
-	return this;
-
-};
+}
 
 var Curves = /*#__PURE__*/Object.freeze({
 	__proto__: null,

Some files were not shown because too many files changed in this diff