From 18226d6d2701b55d4cbf103e336e47a930aaf383 Mon Sep 17 00:00:00 2001 From: Michael Herzog Date: Thu, 27 May 2021 16:05:53 +0200 Subject: [PATCH] Core: Clean up. (#21899) --- src/geometries/ExtrudeGeometry.js | 2 +- src/geometries/ShapeGeometry.js | 2 +- src/geometries/TubeGeometry.js | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/geometries/ExtrudeGeometry.js b/src/geometries/ExtrudeGeometry.js index 6704f93294..8ba55dcf1b 100644 --- a/src/geometries/ExtrudeGeometry.js +++ b/src/geometries/ExtrudeGeometry.js @@ -686,7 +686,7 @@ class ExtrudeGeometry extends BufferGeometry { toJSON() { - const data = BufferGeometry.prototype.toJSON.call( this ); + const data = super.toJSON(); const shapes = this.parameters.shapes; const options = this.parameters.options; diff --git a/src/geometries/ShapeGeometry.js b/src/geometries/ShapeGeometry.js index e80a9949d1..1cb99c3887 100644 --- a/src/geometries/ShapeGeometry.js +++ b/src/geometries/ShapeGeometry.js @@ -129,7 +129,7 @@ class ShapeGeometry extends BufferGeometry { toJSON() { - const data = BufferGeometry.prototype.toJSON.call( this ); + const data = super.toJSON(); const shapes = this.parameters.shapes; diff --git a/src/geometries/TubeGeometry.js b/src/geometries/TubeGeometry.js index da94f128cb..ccbfcce1a7 100644 --- a/src/geometries/TubeGeometry.js +++ b/src/geometries/TubeGeometry.js @@ -160,9 +160,10 @@ class TubeGeometry extends BufferGeometry { } } + toJSON() { - const data = BufferGeometry.prototype.toJSON.call( this ); + const data = super.toJSON(); data.path = this.parameters.path.toJSON(); -- GitLab