|
@@ -25454,6 +25454,42 @@ Object.assign( InterleavedBufferAttribute.prototype, {
|
|
|
|
|
|
},
|
|
|
|
|
|
+ applyNormalMatrix: function ( m ) {
|
|
|
+
|
|
|
+ for ( let i = 0, l = this.count; i < l; i ++ ) {
|
|
|
+
|
|
|
+ _vector$6.x = this.getX( i );
|
|
|
+ _vector$6.y = this.getY( i );
|
|
|
+ _vector$6.z = this.getZ( i );
|
|
|
+
|
|
|
+ _vector$6.applyNormalMatrix( m );
|
|
|
+
|
|
|
+ this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ transformDirection: function ( m ) {
|
|
|
+
|
|
|
+ for ( let i = 0, l = this.count; i < l; i ++ ) {
|
|
|
+
|
|
|
+ _vector$6.x = this.getX( i );
|
|
|
+ _vector$6.y = this.getY( i );
|
|
|
+ _vector$6.z = this.getZ( i );
|
|
|
+
|
|
|
+ _vector$6.transformDirection( m );
|
|
|
+
|
|
|
+ this.setXYZ( i, _vector$6.x, _vector$6.y, _vector$6.z );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ return this;
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
setX: function ( index, x ) {
|
|
|
|
|
|
this.data.array[ index * this.data.stride + this.offset ] = x;
|
|
@@ -26730,6 +26766,7 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
const geometry = this.geometry;
|
|
|
const matrixWorld = this.matrixWorld;
|
|
|
const threshold = raycaster.params.Line.threshold;
|
|
|
+ const drawRange = geometry.drawRange;
|
|
|
|
|
|
// Checking boundingSphere distance to ray
|
|
|
|
|
@@ -26763,7 +26800,10 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
if ( index !== null ) {
|
|
|
|
|
|
- for ( let i = 0, l = index.count - 1; i < l; i += step ) {
|
|
|
+ const start = Math.max( 0, drawRange.start );
|
|
|
+ const end = Math.min( index.count, ( drawRange.start + drawRange.count ) );
|
|
|
+
|
|
|
+ for ( let i = start, l = end - 1; i < l; i += step ) {
|
|
|
|
|
|
const a = index.getX( i );
|
|
|
const b = index.getX( i + 1 );
|
|
@@ -26798,7 +26838,10 @@ Line.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- for ( let i = 0, l = positionAttribute.count - 1; i < l; i += step ) {
|
|
|
+ const start = Math.max( 0, drawRange.start );
|
|
|
+ const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );
|
|
|
+
|
|
|
+ for ( let i = start, l = end - 1; i < l; i += step ) {
|
|
|
|
|
|
vStart.fromBufferAttribute( positionAttribute, i );
|
|
|
vEnd.fromBufferAttribute( positionAttribute, i + 1 );
|
|
@@ -27059,6 +27102,7 @@ Points.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
const geometry = this.geometry;
|
|
|
const matrixWorld = this.matrixWorld;
|
|
|
const threshold = raycaster.params.Points.threshold;
|
|
|
+ const drawRange = geometry.drawRange;
|
|
|
|
|
|
// Checking boundingSphere distance to ray
|
|
|
|
|
@@ -27086,7 +27130,10 @@ Points.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
if ( index !== null ) {
|
|
|
|
|
|
- for ( let i = 0, il = index.count; i < il; i ++ ) {
|
|
|
+ const start = Math.max( 0, drawRange.start );
|
|
|
+ const end = Math.min( index.count, ( drawRange.start + drawRange.count ) );
|
|
|
+
|
|
|
+ for ( let i = start, il = end; i < il; i ++ ) {
|
|
|
|
|
|
const a = index.getX( i );
|
|
|
|
|
@@ -27098,7 +27145,10 @@ Points.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- for ( let i = 0, l = positionAttribute.count; i < l; i ++ ) {
|
|
|
+ const start = Math.max( 0, drawRange.start );
|
|
|
+ const end = Math.min( positionAttribute.count, ( drawRange.start + drawRange.count ) );
|
|
|
+
|
|
|
+ for ( let i = start, l = end; i < l; i ++ ) {
|
|
|
|
|
|
_position$1.fromBufferAttribute( positionAttribute, i );
|
|
|
|