Skip to content

Commit

Permalink
add thumbnail file to 3mf output (#626)
Browse files Browse the repository at this point in the history
add _rel to 3mf output
  • Loading branch information
pca006132 authored Nov 22, 2023
1 parent 6e1629d commit 10a15c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bindings/wasm/examples/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import {Accessor, Animation, Document, mat4, Material, Node, WebIO} from '@gltf-transform/core';
import {KHRMaterialsUnlit, KHRONOS_EXTENSIONS} from '@gltf-transform/extensions';
import {fileForContentTypes, to3dmodel} from '@jscadui/3mf-export';
import {fileForContentTypes, fileForRelThumbnail, to3dmodel} from '@jscadui/3mf-export';
import {strToU8, Zippable, zipSync} from 'fflate'
import * as glMatrix from 'gl-matrix';

Expand Down Expand Up @@ -645,6 +645,7 @@ async function exportModels(defaults: GlobalDefaults, manifold?: Manifold) {
const files: Zippable = {};
files['3D/3dmodel.model'] = strToU8(model);
files[fileForContentTypes.name] = strToU8(fileForContentTypes.content);
files[fileForRelThumbnail.name] = strToU8(fileForRelThumbnail.content);
const zipFile = zipSync(files);
const blob3MF = new Blob(
[zipFile],
Expand Down

0 comments on commit 10a15c1

Please sign in to comment.