修改Three.js中的顶点后如何导出网格?

How to export the mesh after modified the Vertices in Three.js?

我试图通过OBJExporter.js导出https://threejs.org/examples/webgl_modifier_curve.html示例中弯曲的文本几何图形。但是导出的结果文本几何体并没有像场景中看到的那样弯曲。 在代码行“scene.add(flow.object3D);”之后添加了“new OBJExporter...”的代码 请告知我应该将导出器代码放在哪里,以及我错过了哪些步骤来获取带有修改顶点的文本几何图形?非常感谢您的帮助!

const loader = new THREE.FontLoader();

            loader.load( "fonts/Microsoft_YaHei_Regular.json", function (
                font
            ) {

                const geometry = new THREE.TextGeometry( "1 234567890", {
                    font: font,
                    size:0.25,
                    height: 0.02, //0.05 thickness
                    curveSegments: 12,
                    bevelEnabled: true,
                    bevelThickness: 0.02,
                    bevelSize: 0.01,
                    bevelOffset: 0,
                    bevelSegments: 5,
                } );

                geometry.rotateX( Math.PI );
                
                geometry.rotateY( Math.PI );

                const material = new THREE.MeshStandardMaterial( {
                    color: 0x99ffff
                } );

                const objectToCurve = new THREE.Mesh( geometry, material );

                flow = new Flow( objectToCurve );
                flow.updateCurve( 0, curve );
                scene.add( flow.object3D );
                

                const exporter = new OBJExporter();
                const result = exporter.parse(flow.object3D); 

修改器的顶点位移发生在 GPU 上(在顶点着色器中)。所以你不能使用任何导出器来导出 bent/modified 几何图形。