Skip to content

Commit

Permalink
Removed getRangesIntersection
Browse files Browse the repository at this point in the history
  • Loading branch information
agargaro committed Jul 15, 2024
1 parent c3e654f commit 938cbea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ example/dev-bundle

*.generated.js

build/**
build/**
16 changes: 1 addition & 15 deletions src/core/build/geometryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function getRootIndexRanges( geo, range ) {
const ranges = [];
const rangeBoundaries = new Set();

const drawRange = range ? getRangesIntersection( geo.drawRange, range ) : geo.drawRange; // or we just want to use only 'range' also here?
const drawRange = range ? range : geo.drawRange;
const drawRangeStart = drawRange.start / 3;
const drawRangeEnd = ( drawRange.start + drawRange.count ) / 3;
for ( const group of geo.groups ) {
Expand Down Expand Up @@ -135,17 +135,3 @@ export function hasGroupGaps( geometry, range ) {
return vertexCount !== total;

}


export function getRangesIntersection( geoRange, customRange ) {

const start = Math.max( geoRange.start, customRange.start );

return {

start,
count: Math.min( geoRange.start + geoRange.count, customRange.start + customRange.count ) - start

};

}

0 comments on commit 938cbea

Please sign in to comment.