提交 23cc9025 编写于 作者: S Sergey Linev

SVGRenderer: use svg:path for line drawing

Idea to use svg:path for all SVG primitives.
Later one can concatenate svg:path if they have identical styles
上级 5f3c219e
......@@ -350,12 +350,9 @@ THREE.SVGRenderer = function () {
function renderLine( v1, v2, element, material ) {
_svgNode = getLineNode( _lineCount ++ );
_svgNode = getPathNode( _pathCount ++ );
_svgNode.setAttribute( 'x1', v1.positionScreen.x );
_svgNode.setAttribute( 'y1', v1.positionScreen.y );
_svgNode.setAttribute( 'x2', v2.positionScreen.x );
_svgNode.setAttribute( 'y2', v2.positionScreen.y );
_svgNode.setAttribute( 'd', 'M ' + v1.positionScreen.x + ' ' + v1.positionScreen.y + ' L ' + v2.positionScreen.x + ' ' + v2.positionScreen.y );
if ( material instanceof THREE.LineBasicMaterial ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册