THREE.SVGRenderer save text of image

旧巷老猫 提交于 2019-12-11 12:13:55

问题


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

Currently using r58.


回答1:


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); 



回答2:


You could try printing the page to PDF.



来源:https://stackoverflow.com/questions/17398134/three-svgrenderer-save-text-of-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!