소스 검색

Override toJSON in TubeGeometry

Temdog007 6 년 전
부모
커밋
b966dc7d8b
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/geometries/TubeGeometry.js

+ 8 - 0
src/geometries/TubeGeometry.js

@@ -219,5 +219,13 @@ function TubeBufferGeometry( path, tubularSegments, radius, radialSegments, clos
 TubeBufferGeometry.prototype = Object.create( BufferGeometry.prototype );
 TubeBufferGeometry.prototype.constructor = TubeBufferGeometry;
 
+TubeBufferGeometry.prototype.toJSON = function () {
+
+	var data = BufferGeometry.prototype.toJSON.call( this );
+
+	data.path = this.parameters.path.toJSON();
+
+	return data;
+};
 
 export { TubeGeometry, TubeBufferGeometry };