New demo artwork: Procedural String Lights

This commit is contained in:
Keavon Chambers
2024-01-05 15:16:48 -08:00
parent b3e4caec1a
commit c7fd9cfc21
7 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -69,8 +69,9 @@ export function createEditor() {
if (!demoArtwork) return;
try {
const url = new URL(`https://raw.githubusercontent.com/GraphiteEditor/Graphite/master/demo-artwork/${demoArtwork}.graphite`);
const url = new URL(`/${demoArtwork}.graphite`, document.location.href);
const data = await fetch(url);
if (!data.ok) throw new Error();
const filename = url.pathname.split("/").pop() || "Untitled";
const content = await data.text();