THREE.SVGRenderer save text of image

2019-07-28 17:03发布

Is there a way to obtain the svg text (an image) from THREE.SVGRenderer?

Currently using r58.

2条回答
成全新的幸福
2楼-- · 2019-07-28 17:40

You should be able to access the SVG DOM with renderer.domElement

To convert that to XML string (if that is what you mean by "svg text"):

var XMLS = new XMLSerializer(); 
var svgfile = XMLS.serializeToString(renderer.domElement); 
查看更多
Explosion°爆炸
3楼-- · 2019-07-28 17:47

You could try printing the page to PDF.

查看更多
登录 后发表回答