UNPKG

threepipe

Version:

A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.

9 lines (6 loc) 271 B
import {IExportWriter} from '../IExporter' export class SimpleJSONExporter implements IExportWriter { async parseAsync(obj: any, {jsonSpaces = 2}): Promise<Blob> { return new Blob([JSON.stringify(obj, null, jsonSpaces)], {type: 'application/json'}) } }