mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 13:30:48 +00:00
New demo artwork: Procedural String Lights
This commit is contained in:
parent
b3e4caec1a
commit
c7fd9cfc21
7 changed files with 9 additions and 3 deletions
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
|
@ -2,10 +2,12 @@
|
|||
|
||||
// Demo artwork
|
||||
import ThumbnailJustAPottedCactus from "@graphite-frontend/assets/images/demo-artwork/thumbnail-just-a-potted-cactus.png";
|
||||
import ThumbnailProceduralStringLights from "@graphite-frontend/assets/images/demo-artwork/thumbnail-procedural-string-lights.png";
|
||||
import ThumbnailValleyOfSpires from "@graphite-frontend/assets/images/demo-artwork/thumbnail-valley-of-spires.png";
|
||||
|
||||
const DEMO_ARTWORK = {
|
||||
ThumbnailJustAPottedCactus,
|
||||
ThumbnailProceduralStringLights,
|
||||
ThumbnailValleyOfSpires,
|
||||
} as const;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue