|
@@ -17,11 +17,11 @@ function PlaneHelper( plane, size, hex ) {
|
|
|
|
|
|
this.size = ( size === undefined ) ? 1 : size;
|
|
|
|
|
|
- var color = ( hex !== undefined ) ? hex : 0xffff00;
|
|
|
+ const color = ( hex !== undefined ) ? hex : 0xffff00;
|
|
|
|
|
|
- var positions = [ 1, - 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 ];
|
|
|
+ const positions = [ 1, - 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, - 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0 ];
|
|
|
|
|
|
- var geometry = new BufferGeometry();
|
|
|
+ const geometry = new BufferGeometry();
|
|
|
geometry.setAttribute( 'position', new Float32BufferAttribute( positions, 3 ) );
|
|
|
geometry.computeBoundingSphere();
|
|
|
|
|
@@ -31,9 +31,9 @@ function PlaneHelper( plane, size, hex ) {
|
|
|
|
|
|
//
|
|
|
|
|
|
- var positions2 = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, - 1, 1, 1, - 1, 1 ];
|
|
|
+ const positions2 = [ 1, 1, 1, - 1, 1, 1, - 1, - 1, 1, 1, 1, 1, - 1, - 1, 1, 1, - 1, 1 ];
|
|
|
|
|
|
- var geometry2 = new BufferGeometry();
|
|
|
+ const geometry2 = new BufferGeometry();
|
|
|
geometry2.setAttribute( 'position', new Float32BufferAttribute( positions2, 3 ) );
|
|
|
geometry2.computeBoundingSphere();
|
|
|
|
|
@@ -46,7 +46,7 @@ PlaneHelper.prototype.constructor = PlaneHelper;
|
|
|
|
|
|
PlaneHelper.prototype.updateMatrixWorld = function ( force ) {
|
|
|
|
|
|
- var scale = - this.plane.constant;
|
|
|
+ let scale = - this.plane.constant;
|
|
|
|
|
|
if ( Math.abs( scale ) < 1e-8 ) scale = 1e-8; // sign does not matter
|
|
|
|