Skip to content

Class: SceneExporter ​

Defined in: packages/minerender/src/export/SceneExporter.ts:20

Exports the visible meshes at their current poses without changing the source scene.

Constructors ​

Constructor ​

ts
new SceneExporter(): SceneExporter;

Returns ​

SceneExporter

Methods ​

toGLTF() ​

ts
static toGLTF(root, options?): Promise<ArrayBuffer | Record<string, any>>;

Defined in: packages/minerender/src/export/SceneExporter.ts:49

Exports a static glTF/GLB snapshot in a browser. Atlas textures and vertex tints are retained; MineRender's custom directional lighting is not baked into the exported materials.

Parameters ​

ParameterType
rootObject3D
optionsSceneGLTFExportOptions

Returns ​

Promise<ArrayBuffer | Record<string, any>>


toObj() ​

ts
static toObj(root): string;

Defined in: packages/minerender/src/export/SceneExporter.ts:23

Returns OBJ geometry with normals and UVs; material files and textures are not included.

Parameters ​

ParameterType
rootObject3D

Returns ​

string


toPLY() ​

ts
static toPLY(root, options?): string | ArrayBuffer;

Defined in: packages/minerender/src/export/SceneExporter.ts:33

Returns PLY geometry with vertex colors and UVs; texture images are not included.

Parameters ​

ParameterType
rootObject3D
options?PLYExporterOptions

Returns ​

string | ArrayBuffer