fix gltf snapshots (#1224)

* fix gltf snapshots

* delete old assets
This commit is contained in:
Kurt Hutten
2023-12-18 14:22:15 +11:00
committed by GitHub
parent 10b6c1cfbc
commit eea55ff2b1
6 changed files with 17 additions and 2987 deletions

2
.gitignore vendored
View File

@ -42,6 +42,8 @@ e2e/playwright/export-snapshots/*.ply
e2e/playwright/export-snapshots/*.obj
e2e/playwright/export-snapshots/*.step
e2e/playwright/export-snapshots/*.stl
e2e/playwright/export-snapshots/*binary.gltf
e2e/playwright/export-snapshots/*embedded.gltf
/test-results/

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View File

@ -337,18 +337,22 @@ const part001 = startSketchOn('-XZ')
units: 'in',
})
)
exportLocations.push(
await doExport({
type: 'gltf',
storage: 'embedded',
presentation: 'pretty',
})
)
exportLocations.push(
await doExport({
type: 'gltf',
storage: 'binary',
presentation: 'pretty',
})
)
// TODO: gltfs don't seem to work with snap shots. push onto exportLocations once it's figured out
await doExport({
type: 'gltf',
storage: 'embedded',
presentation: 'pretty',
})
await doExport({
type: 'gltf',
storage: 'binary',
presentation: 'pretty',
})
await doExport({
type: 'gltf',
storage: 'standard',
@ -361,7 +365,7 @@ const part001 = startSketchOn('-XZ')
// snapshot exports, good compromise to capture that exports are healthy without getting bogged down in "did the formatting change" changes
// context: https://github.com/KittyCAD/modeling-app/issues/1222
for (const { modelPath, imagePath, outputType } of exportLocations) {
const cliCommand = `export KITTYCAD_TOKEN=${secrets.snapshottoken} && cat ${modelPath} | kittycad file snapshot --output-format=png --src-format=${outputType} - ${imagePath}`
const cliCommand = `export KITTYCAD_TOKEN=${secrets.snapshottoken} && kittycad file snapshot --output-format=png --src-format=${outputType} ${modelPath} ${imagePath}`
const child = spawn(cliCommand, { shell: true })
await new Promise((resolve, reject) => {
child.on('error', (code: any, msg: any) => {