T
tscircuit•2mo ago
Seve

this was so annoying to get working 😭

this was so annoying to get working 😭
No description
22 Replies
Seve
SeveOP•2mo ago
Here's the prompt if you want to try it:
Please create a canvas with the following HTML

<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://unpkg.com/@tscircuit/circuit-preview@0.0.11/dist/index.global.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

<script type="text/babel">
window.tscircuit.render(
<resistor name="R1" footprint="0402" resistance="1k" />
)
</script>
</head>
<body></body>
</html>
Please create a canvas with the following HTML

<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://unpkg.com/@tscircuit/circuit-preview@0.0.11/dist/index.global.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

<script type="text/babel">
window.tscircuit.render(
<resistor name="R1" footprint="0402" resistance="1k" />
)
</script>
</head>
<body></body>
</html>
Seve
SeveOP•2mo ago
@shibo the 3d viewer isn't working and i could use help. We have a huge huge demo next week and this stuff needs to be 100% rock solid for me to demo it but could be a big customer. You must load manifold from a trusted CDN for it to work w/ ChatGPT, so probably unpkg or jsdelvir.net, can't embed the blob url
No description
No description
Seve
SeveOP•2mo ago
we definitely need to get automatic traces/netlabels working in maintline, but after that it does seem like this will work
No description
shibo
shibo•2mo ago
No description
Rishabh
Rishabh•2mo ago
Isn't the bundled cdn version for manifold would also have wasm?
shibo
shibo•2mo ago
yes
No description
Rishabh
Rishabh•2mo ago
But chatgpt sandbox can't run wasm.
No description
shibo
shibo•2mo ago
even embedded as a js string?
Rishabh
Rishabh•2mo ago
I don't know try it I mean the example I showed did use the base64 encoded version
Seve
SeveOP•2mo ago
@shibo we are for sure not loading from cdn. I looked at the 3d-viewer codebase and there are direct manifold imports It is getting bundled, idk if there are two modules (eg one with WASM ) but it’s listed as a dep or something.
shibo
shibo•2mo ago
No description
shibo
shibo•2mo ago
This shouldn't be a dep as it contains the wasm
Seve
SeveOP•2mo ago
I just met with Rishabh, we are incredibly pressed on time but the 3d viewer needs to work in this repo in addition to 10 other things that need to be fixed https://github.com/tscircuit/circuit-preview
GitHub
GitHub - tscircuit/circuit-preview
Contribute to tscircuit/circuit-preview development by creating an account on GitHub.
Seve
SeveOP•2mo ago
I will record a video but tldr you just build and open the html files to test @Rishabh another issue: im not sure if we’ll be able to load the cdn 3d models….
Seve
SeveOP•2mo ago
passing along some notes Rishabh and I took about stuff not currently working that we have 6 days to fix and make perfect...
No description
Seve
SeveOP•2mo ago
RE: Manifold imports CC @shibo this is the issue and causing all the problems IIUC
No description
Seve
SeveOP•2mo ago
not a CDN import
shibo
shibo•2mo ago
Was afk, ill see what i can do
shibo
shibo•2mo ago
@Seve you can't import types from a cdn right? can I copy those type files into our project?
No description
Seve
SeveOP•2mo ago
it's ok to import the types
shibo
shibo•2mo ago
but manifold-3d package has the wasm
Seve
SeveOP•2mo ago
if you import type files it gets stripped so it's ok

Did you find this page helpful?