From 9b9c60f60c34495ff4332852aef4cfd7d154ccd0 Mon Sep 17 00:00:00 2001 From: Giorgio Marcias Date: Fri, 23 Mar 2018 10:39:10 +0100 Subject: [PATCH] import `Float32BufferAttribute` since `THREE` is not defined --- src/objects/Line.js | 3 ++- src/objects/LineSegments.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/objects/Line.js b/src/objects/Line.js index 2178811cbb..c7f6770e12 100644 --- a/src/objects/Line.js +++ b/src/objects/Line.js @@ -6,6 +6,7 @@ import { Vector3 } from '../math/Vector3.js'; import { LineBasicMaterial } from '../materials/LineBasicMaterial.js'; import { BufferGeometry } from '../core/BufferGeometry.js'; import { LineSegments } from './LineSegments.js'; +import { Float32BufferAttribute } from '../core/BufferAttribute'; /** * @author mrdoob / http://mrdoob.com/ @@ -63,7 +64,7 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), { } - geometry.addAttribute( 'lineDistance', new THREE.Float32BufferAttribute( lineDistances, 1 ) ); + geometry.addAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); } else { diff --git a/src/objects/LineSegments.js b/src/objects/LineSegments.js index a812a8f00a..cb350df061 100644 --- a/src/objects/LineSegments.js +++ b/src/objects/LineSegments.js @@ -1,5 +1,6 @@ import { Line } from './Line.js'; import { Vector3 } from '../math/Vector3.js'; +import { Float32BufferAttribute } from '../core/BufferAttribute'; /** * @author mrdoob / http://mrdoob.com/ @@ -47,7 +48,7 @@ LineSegments.prototype = Object.assign( Object.create( Line.prototype ), { } - geometry.addAttribute( 'lineDistance', new THREE.Float32BufferAttribute( lineDistances, 1 ) ); + geometry.addAttribute( 'lineDistance', new Float32BufferAttribute( lineDistances, 1 ) ); } else { -- GitLab