提交 9b9c60f6 编写于 作者: G Giorgio Marcias

import `Float32BufferAttribute` since `THREE` is not defined

上级 683289bd
...@@ -6,6 +6,7 @@ import { Vector3 } from '../math/Vector3.js'; ...@@ -6,6 +6,7 @@ import { Vector3 } from '../math/Vector3.js';
import { LineBasicMaterial } from '../materials/LineBasicMaterial.js'; import { LineBasicMaterial } from '../materials/LineBasicMaterial.js';
import { BufferGeometry } from '../core/BufferGeometry.js'; import { BufferGeometry } from '../core/BufferGeometry.js';
import { LineSegments } from './LineSegments.js'; import { LineSegments } from './LineSegments.js';
import { Float32BufferAttribute } from '../core/BufferAttribute';
/** /**
* @author mrdoob / http://mrdoob.com/ * @author mrdoob / http://mrdoob.com/
...@@ -63,7 +64,7 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), { ...@@ -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 { } else {
......
import { Line } from './Line.js'; import { Line } from './Line.js';
import { Vector3 } from '../math/Vector3.js'; import { Vector3 } from '../math/Vector3.js';
import { Float32BufferAttribute } from '../core/BufferAttribute';
/** /**
* @author mrdoob / http://mrdoob.com/ * @author mrdoob / http://mrdoob.com/
...@@ -47,7 +48,7 @@ LineSegments.prototype = Object.assign( Object.create( Line.prototype ), { ...@@ -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 { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册