Skip to content

Commit cdf896b

Browse files
committed
New demo artwork: "Parametric Dunescape"
1 parent c4e16e1 commit cdf896b

File tree

9 files changed

+22
-11
lines changed

9 files changed

+22
-11
lines changed

demo-artwork/parametric-dunescape.graphite

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editor/src/dispatcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ mod test {
515515
// include_str!("../../demo-artwork/isometric-fountain.graphite"),
516516
// include_str!("../../demo-artwork/painted-dreams.graphite"),
517517
// include_str!("../../demo-artwork/procedural-string-lights.graphite"),
518+
// include_str!("../../demo-artwork/parametric-dunescape.graphite"),
518519
// include_str!("../../demo-artwork/red-dress.graphite"),
519520
// include_str!("../../demo-artwork/valley-of-spires.graphite"),
520521
// ];

editor/src/messages/dialog/simple_dialogs/demo_artwork_dialog.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ use crate::messages::prelude::*;
55
pub struct DemoArtworkDialog;
66

77
/// `(name, thumbnail, filename)`
8-
pub const ARTWORK: [(&str, &str, &str); 6] = [
8+
pub const ARTWORK: [(&str, &str, &str); 7] = [
99
("Isometric Fountain", "ThumbnailIsometricFountain", "isometric-fountain.graphite"),
1010
("Changing Seasons", "ThumbnailChangingSeasons", "changing-seasons.graphite"),
1111
("Painted Dreams", "ThumbnailPaintedDreams", "painted-dreams.graphite"),
12+
("Parametric Dunescape", "ThumbnailParametricDunescape", "parametric-dunescape.graphite"),
1213
("Red Dress", "ThumbnailRedDress", "red-dress.graphite"),
1314
("Procedural String Lights", "ThumbnailProceduralStringLights", "procedural-string-lights.graphite"),
1415
("Valley of Spires", "ThumbnailValleyOfSpires", "valley-of-spires.graphite"),
@@ -28,7 +29,7 @@ impl DialogLayoutHolder for DemoArtworkDialog {
2829
impl LayoutHolder for DemoArtworkDialog {
2930
fn layout(&self) -> Layout {
3031
let mut rows_of_images_with_buttons: Vec<_> = ARTWORK
31-
.chunks(3)
32+
.chunks(4)
3233
.flat_map(|chunk| {
3334
fn make_dialog(name: &str, filename: &str) -> Message {
3435
DialogMessage::CloseDialogAndThen {

editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use super::node_properties;
22
use super::utility_types::FrontendNodeType;
33
use crate::messages::layout::utility_types::widget_prelude::*;
44
use crate::messages::portfolio::document::utility_types::network_interface::{
5-
DocumentNodeMetadata, DocumentNodePersistentMetadata, NodeNetworkInterface, NodeNetworkMetadata, NodeNetworkPersistentMetadata, NodePersistentMetadata, NodePosition, NodeTemplate,
6-
NodeTypePersistentMetadata, NumberInputSettings, PropertiesRow, Vec2InputSettings, WidgetOverride,
5+
DocumentNodeMetadata, DocumentNodePersistentMetadata, NodeNetworkInterface, NodeNetworkMetadata, NodeNetworkPersistentMetadata, NodeTemplate, NodeTypePersistentMetadata, NumberInputSettings,
6+
PropertiesRow, Vec2InputSettings, WidgetOverride,
77
};
88
use crate::messages::portfolio::utility_types::PersistentData;
99
use crate::messages::prelude::Message;

editor/src/messages/portfolio/document/overlays/overlays_message_handler.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ pub struct OverlaysMessageHandler {
1616

1717
impl MessageHandler<OverlaysMessage, OverlaysMessageData<'_>> for OverlaysMessageHandler {
1818
fn process_message(&mut self, message: OverlaysMessage, responses: &mut VecDeque<Message>, data: OverlaysMessageData) {
19-
let OverlaysMessageData {
20-
overlays_visible,
21-
ipp,
22-
device_pixel_ratio,
23-
} = data;
19+
let OverlaysMessageData { overlays_visible, ipp, .. } = data;
2420

2521
match message {
2622
#[cfg(target_arch = "wasm32")]
@@ -30,6 +26,8 @@ impl MessageHandler<OverlaysMessage, OverlaysMessageData<'_>> for OverlaysMessag
3026
use glam::{DAffine2, DVec2};
3127
use wasm_bindgen::JsCast;
3228

29+
let device_pixel_ratio = data.device_pixel_ratio;
30+
3331
let canvas = match &self.canvas {
3432
Some(canvas) => canvas,
3533
None => {
Loading

frontend/src/utility-functions/images.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import ThumbnailChangingSeasons from "@graphite-frontend/assets/images/demo-artwork/thumbnail-changing-seasons.png";
55
import ThumbnailIsometricFountain from "@graphite-frontend/assets/images/demo-artwork/thumbnail-isometric-fountain.png";
66
import ThumbnailPaintedDreams from "@graphite-frontend/assets/images/demo-artwork/thumbnail-painted-dreams.png";
7+
import ThumbnailParametricDunescape from "@graphite-frontend/assets/images/demo-artwork/thumbnail-parametric-dunescape.png";
78
import ThumbnailProceduralStringLights from "@graphite-frontend/assets/images/demo-artwork/thumbnail-procedural-string-lights.png";
89
import ThumbnailRedDress from "@graphite-frontend/assets/images/demo-artwork/thumbnail-red-dress.png";
910
import ThumbnailValleyOfSpires from "@graphite-frontend/assets/images/demo-artwork/thumbnail-valley-of-spires.png";
@@ -12,6 +13,7 @@ const DEMO_ARTWORK = {
1213
ThumbnailChangingSeasons,
1314
ThumbnailIsometricFountain,
1415
ThumbnailPaintedDreams,
16+
ThumbnailParametricDunescape,
1517
ThumbnailProceduralStringLights,
1618
ThumbnailRedDress,
1719
ThumbnailValleyOfSpires,

node-graph/graph-craft/benches/compile_demo_art_iai.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use graph_craft::util::*;
33
use iai_callgrind::{black_box, library_benchmark, library_benchmark_group, main};
44

55
#[library_benchmark]
6-
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "red-dress", "valley-of-spires"], setup = load_from_name)]
6+
#[benches::with_setup(args = ["isometric-fountain", "painted-dreams", "procedural-string-lights", "parametric-dunescape", "red-dress", "valley-of-spires"], setup = load_from_name)]
77
pub fn compile_to_proto(_input: NodeNetwork) {
88
black_box(compile(_input));
99
}

node-graph/graph-craft/src/util.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@ pub fn load_from_name(name: &str) -> NodeNetwork {
1818
load_network(content)
1919
}
2020

21-
pub static DEMO_ART: [&str; 6] = ["changing-seasons", "painted-dreams", "red-dress", "valley-of-spires", "isometric-fountain", "procedural-string-lights"];
21+
pub static DEMO_ART: [&str; 7] = [
22+
"changing-seasons",
23+
"painted-dreams",
24+
"red-dress",
25+
"valley-of-spires",
26+
"isometric-fountain",
27+
"procedural-string-lights",
28+
"parametric-dunescape",
29+
];

0 commit comments

Comments
 (0)