|
@@ -227,6 +227,14 @@ THREE.SVGRenderer = function () {
|
|
|
_v2.positionScreen.x *= _svgWidthHalf; _v2.positionScreen.y *= - _svgHeightHalf;
|
|
|
_v3.positionScreen.x *= _svgWidthHalf; _v3.positionScreen.y *= - _svgHeightHalf;
|
|
|
|
|
|
+ if ( this.overdraw > 0 ) {
|
|
|
+
|
|
|
+ expand( _v1.positionScreen, _v2.positionScreen, this.overdraw );
|
|
|
+ expand( _v2.positionScreen, _v3.positionScreen, this.overdraw );
|
|
|
+ expand( _v3.positionScreen, _v1.positionScreen, this.overdraw );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
_elemBox.setFromPoints( [
|
|
|
_v1.positionScreen,
|
|
|
_v2.positionScreen,
|
|
@@ -451,6 +459,24 @@ THREE.SVGRenderer = function () {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ // Hide anti-alias gaps
|
|
|
+
|
|
|
+ function expand( v1, v2, pixels ) {
|
|
|
+
|
|
|
+ var x = v2.x - v1.x, y = v2.y - v1.y,
|
|
|
+ det = x * x + y * y, idet;
|
|
|
+
|
|
|
+ if ( det === 0 ) return;
|
|
|
+
|
|
|
+ idet = pixels / Math.sqrt( det );
|
|
|
+
|
|
|
+ x *= idet; y *= idet;
|
|
|
+
|
|
|
+ v2.x += x; v2.y += y;
|
|
|
+ v1.x -= x; v1.y -= y;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
function addPath( style, path ) {
|
|
|
|
|
|
if ( _currentStyle === style ) {
|