TripoSplat-WebGPU / scripts /sync_ort_assets.mjs
Yosun's picture
Deploy TripoSplat WebGPU demo
31c7d49 verified
Raw
History Blame Contribute Delete
512 Bytes
import { mkdir, copyFile } from 'node:fs/promises'
import { resolve } from 'node:path'
const root = process.cwd()
const srcDir = resolve(root, 'node_modules/onnxruntime-web/dist')
const dstDir = resolve(root, 'public/ort')
const files = [
'ort-wasm-simd-threaded.asyncify.mjs',
'ort-wasm-simd-threaded.asyncify.wasm',
]
await mkdir(dstDir, { recursive: true })
for (const file of files) {
await copyFile(resolve(srcDir, file), resolve(dstDir, file))
}
console.log(`Copied ORT web assets to ${dstDir}`)