We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cc87b7 commit de51f21Copy full SHA for de51f21
lib/index.ts
@@ -33,6 +33,14 @@ export function createSvgUrl(
33
return `https://svg.tscircuit.com/?svg_type=${svgType}&code=${encodeURIComponent(base64Data)}`
34
}
35
36
+export function createPngUrl(
37
+ tscircuitCode: string,
38
+ view: "pcb" | "schematic" | "3d",
39
+) {
40
+ const base64Data = getCompressedBase64SnippetString(tscircuitCode)
41
+ return `https://png.tscircuit.com/?view=${view}&code=${encodeURIComponent(base64Data)}`
42
+}
43
+
44
export function createSnippetUrl(text: string, snippet_type?: string): string {
45
// Construct the URL
46
const typeParam = snippet_type ? `&snippet_type=${snippet_type}` : ""
0 commit comments