diff --git a/examples/models/svg/tests/letter.svg b/examples/models/svg/tests/letter.svg new file mode 100644 index 00000000000000..f537893106c5ce --- /dev/null +++ b/examples/models/svg/tests/letter.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/examples/webgl_loader_svg.html b/examples/webgl_loader_svg.html index f22328181bc225..a0adb3f3d6acb3 100644 --- a/examples/webgl_loader_svg.html +++ b/examples/webgl_loader_svg.html @@ -127,6 +127,7 @@ 'emoji': 'models/svg/emoji.svg', 'blueprint': 'models/svg/blueprint.svg', 'wideStroke': 'models/svg/tests/wideStroke.svg', + 'letter': 'models/svg/tests/letter.svg', } ).name( 'SVG File' ).onChange( update ); diff --git a/src/extras/core/ShapePath.js b/src/extras/core/ShapePath.js index c2ae18cf95303d..ddc0ec5a37522f 100644 --- a/src/extras/core/ShapePath.js +++ b/src/extras/core/ShapePath.js @@ -285,7 +285,8 @@ class ShapePath { for ( let j = i - 1; j >= 0; j -- ) { const candidate = entries[ j ]; - if ( ! candidate.boundingBox.containsPoint( entry.interiorPoint ) ) continue; + + if ( ! candidate.boundingBox.containsBox( entry.boundingBox ) ) continue; if ( ! pointInPolygon( entry.interiorPoint, candidate.points ) ) continue; entry.container = candidate.exclude ? candidate.container : candidate;