UNPKG

threepipe

Version:

A 3D viewer framework built on top of three.js in TypeScript with a focus on quality rendering, modularity and extensibility.

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