This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fs from 'fs'; | |
import path from 'path'; | |
import {exportModels} from './worker'; | |
import Module from './built/manifold'; | |
export const manifoldModule = await Module(); | |
manifoldModule.setup(); | |
const {cube, sphere} = manifoldModule.Manifold; | |
const defaults = { roughness: 0.2, metallic: 1, baseColorFactor: [1, 1, 0], alpha: 1, unlit: false, animationLength: 1, animationMode: 'loop' }; | |
async function runAndSave() { | |
const box = cube([100, 100, 100], true); |