Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download gltf model #480

Closed
wants to merge 2 commits into from
Closed

Conversation

Anshgrover23
Copy link
Contributor

@Anshgrover23 Anshgrover23 commented Jan 3, 2025

/claim #476
Fixes #476

reference video:

2025-01-03.13-28-44.mov

@tscircuitbot
Copy link

📊 Bundle Size Analysis

Total Bundle Size

  • Before: 30.11 MB
  • After: 30.11 MB
  • Change: 📈 2.34 KB (0.01%)

Diff

No significant changes in bundle size.

View Dependencies
Package Size
typescript@^5.6.3 8.69 MB
@babel/standalone@^7.26.2 4.82 MB
react@^18.3.1 617.30 KB
ms@^2.1.3 530.54 KB
posthog-js@^1.203.2 229.68 KB
jszip@^3.10.1 139.73 KB
react-dom@^18.3.1 138.54 KB
@tscircuit/footprinter@^0.0.96 122.03 KB
circuit-json@^0.0.126 118.90 KB
zod@^3.23.8 117.16 KB
circuit-to-svg@^0.0.99 101.33 KB
tailwind-merge@^2.5.2 69.93 KB
dsn-converter@^0.0.54 32.97 KB
react-helmet@^6.1.0 29.17 KB
fflate@^0.8.2 19.95 KB
states-us@^1.1.1 7.27 KB
use-mouse-matrix-transform@^1.1.13 5.80 KB
zustand@^4.5.5 4.17 KB
file-saver@^2.0.5 3.58 KB
vite@^5.4.8 3.24 KB
@vercel/analytics@^1.4.1 2.88 KB
redaxios@^0.5.1 1.83 KB
clsx@^2.1.1 783.00 B
use-async-memo@^1.2.5 759.00 B
codemirror@^6.0.1 595.00 B
country-list@^2.3.0 387.00 B
extract-codefence@^0.0.4 151.00 B
jscad-electronics@^0.0.24 63.00 B
What is this? This is an automated bundle size report generated during the build process.

@Anshgrover23 Anshgrover23 changed the title donwload gltf model Download gltf model Jan 3, 2025
import { useSaveGltfAs } from "@tscircuit/3d-viewer"

export const downloadGltfFile = (circuitJson: any, filename: string) => {
const blob = new Blob([JSON.stringify(circuitJson)], {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's not gltf

@seveibar
Copy link
Contributor

seveibar commented Jan 3, 2025

@Anshgrover23 after you download use this to check to make sure it's working https://gltf-viewer.donmccurdy.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow downloading of 3d model in gltf (using new 3d viewer gltf export)
3 participants