The saveObj() function exports p5.Geometry objects as 3D models in the Wavefront .obj file format. This way, you can use the 3D shapes you create in p5.js in other software for rendering, animation, 3D printing, or more.
The exported .obj file will include the faces and vertices of the p5.Geometry, as well as its texture coordinates and normals, if it has them.
예제
구문
saveObj([fileName])
매개변수
The name of the file to save the model as. If not specified, the default file name will be 'model.obj'.
관련 레퍼런스
beginGeometry
Begins adding shapes to a new p5.Geometry object.
buildGeometry
Creates a custom p5.Geometry object from simpler 3D shapes.
endGeometry
Stops adding shapes to a new p5.Geometry object and returns the object.
freeGeometry
Clears a p5.Geometry object from the graphics processing unit (GPU) memory.