Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVGLoader: Implement 'defs' and 'use' nodes #20209

Merged
merged 13 commits into from
Sep 1, 2020
Prev Previous commit
Next Next commit
Fix greek characters
yomboprime committed Aug 31, 2020
commit 0d67dea6b1a0fbf3eb26c432c41a680c1124f85e
4 changes: 2 additions & 2 deletions examples/js/loaders/SVGLoader.js
Original file line number Diff line number Diff line change
@@ -698,11 +698,11 @@ THREE.SVGLoader.prototype = Object.assign( Object.create( THREE.Loader.prototype
var cxp = q * rx * y1p / ry;
var cyp = - q * ry * x1p / rx;

// Step 3: Compute (cx, cy) from (cx′, cy′)
// Step 3: Compute (cx, cy) from (cx', cy')
var cx = Math.cos( x_axis_rotation ) * cxp - Math.sin( x_axis_rotation ) * cyp + ( start.x + end.x ) / 2;
var cy = Math.sin( x_axis_rotation ) * cxp + Math.cos( x_axis_rotation ) * cyp + ( start.y + end.y ) / 2;

// Step 4: Compute θ1 and Δθ
// Step 4: Compute θ1 and Δθ
var theta = svgAngle( 1, 0, ( x1p - cxp ) / rx, ( y1p - cyp ) / ry );
var delta = svgAngle( ( x1p - cxp ) / rx, ( y1p - cyp ) / ry, ( - x1p - cxp ) / rx, ( - y1p - cyp ) / ry ) % ( Math.PI * 2 );