New demo artwork: Procedural String Lights
This commit is contained in:
parent
b3e4caec1a
commit
c7fd9cfc21
File diff suppressed because one or more lines are too long
|
|
@ -478,6 +478,7 @@ mod test {
|
||||||
|
|
||||||
let test_files = [
|
let test_files = [
|
||||||
("Just a Potted Cactus", include_str!("../../demo-artwork/just-a-potted-cactus.graphite")),
|
("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")),
|
("Valley of Spires", include_str!("../../demo-artwork/valley-of-spires.graphite")),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,10 @@ use crate::messages::prelude::*;
|
||||||
pub struct DemoArtworkDialog;
|
pub struct DemoArtworkDialog;
|
||||||
|
|
||||||
/// `(name, thumbnail, filename)`
|
/// `(name, thumbnail, filename)`
|
||||||
const ARTWORK: [(&str, &str, &str); 2] = [
|
const ARTWORK: [(&str, &str, &str); 3] = [
|
||||||
("Valley of Spires", "ThumbnailValleyOfSpires", "valley-of-spires.graphite"),
|
("Valley of Spires", "ThumbnailValleyOfSpires", "valley-of-spires.graphite"),
|
||||||
("Just a Potted Cactus", "ThumbnailJustAPottedCactus", "just-a-potted-cactus.graphite"),
|
("Just a Potted Cactus", "ThumbnailJustAPottedCactus", "just-a-potted-cactus.graphite"),
|
||||||
|
("Procedural String Lights", "ThumbnailProceduralStringLights", "procedural-string-lights.graphite"),
|
||||||
];
|
];
|
||||||
|
|
||||||
impl DialogLayoutHolder for DemoArtworkDialog {
|
impl DialogLayoutHolder for DemoArtworkDialog {
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 8.1 KiB |
|
|
@ -2,10 +2,12 @@
|
||||||
|
|
||||||
// Demo artwork
|
// Demo artwork
|
||||||
import ThumbnailJustAPottedCactus from "@graphite-frontend/assets/images/demo-artwork/thumbnail-just-a-potted-cactus.png";
|
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";
|
import ThumbnailValleyOfSpires from "@graphite-frontend/assets/images/demo-artwork/thumbnail-valley-of-spires.png";
|
||||||
|
|
||||||
const DEMO_ARTWORK = {
|
const DEMO_ARTWORK = {
|
||||||
ThumbnailJustAPottedCactus,
|
ThumbnailJustAPottedCactus,
|
||||||
|
ThumbnailProceduralStringLights,
|
||||||
ThumbnailValleyOfSpires,
|
ThumbnailValleyOfSpires,
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,8 +69,9 @@ export function createEditor() {
|
||||||
if (!demoArtwork) return;
|
if (!demoArtwork) return;
|
||||||
|
|
||||||
try {
|
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);
|
const data = await fetch(url);
|
||||||
|
if (!data.ok) throw new Error();
|
||||||
|
|
||||||
const filename = url.pathname.split("/").pop() || "Untitled";
|
const filename = url.pathname.split("/").pop() || "Untitled";
|
||||||
const content = await data.text();
|
const content = await data.text();
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ I am grateful to everyone who has placed their faith in my vision for Graphite s
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</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
|
## The Alpha Milestone 2 release series
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue