New demo artwork: Procedural String Lights

This commit is contained in:
Keavon Chambers 2024-01-05 06:24:13 -08:00
parent b3e4caec1a
commit c7fd9cfc21
7 changed files with 9 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -478,6 +478,7 @@ mod test {
let test_files = [
("Just a Potted Cactus", include_str!("../../demo-artwork/just-a-potted-cactus.graphite")),
("Valley of Spires", include_str!("../../demo-artwork/procedural-string-lights.graphite")),
("Valley of Spires", include_str!("../../demo-artwork/valley-of-spires.graphite")),
];

View file

@ -5,9 +5,10 @@ use crate::messages::prelude::*;
pub struct DemoArtworkDialog;
/// `(name, thumbnail, filename)`
const ARTWORK: [(&str, &str, &str); 2] = [
const ARTWORK: [(&str, &str, &str); 3] = [
("Valley of Spires", "ThumbnailValleyOfSpires", "valley-of-spires.graphite"),
("Just a Potted Cactus", "ThumbnailJustAPottedCactus", "just-a-potted-cactus.graphite"),
("Procedural String Lights", "ThumbnailProceduralStringLights", "procedural-string-lights.graphite"),
];
impl DialogLayoutHolder for DemoArtworkDialog {

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View file

@ -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;

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();

View file

@ -24,7 +24,7 @@ I am grateful to everyone who has placed their faith in my vision for Graphite s
</video>
</div>
<center><em>Happy Holidays from the Graphite team!<br />These procedural light strands are powered by the newly completed node graph features.</em></center>
<center><em>Happy Holidays from the Graphite team!<br />These procedural light strands are powered by the newly completed node graph features.<br /><a href="https://editor.graphite.rs/#demo/procedural-string-lights">Click here to explore this demo</a> — drag the wire layer's points with the Path tool.</em></center>
## The Alpha Milestone 2 release series