From 93fd321dac2c37543741fc6018cad804a7667d89 Mon Sep 17 00:00:00 2001 From: Shark Date: Mon, 6 May 2024 21:57:57 +0200 Subject: [PATCH 1/2] search hovered element --- Cargo.lock | 54 ++++++- crates/gosub_html5/src/node/data/element.rs | 4 + crates/gosub_renderer/src/draw.rs | 21 +++ crates/gosub_renderer/src/render.rs | 1 - crates/gosub_renderer/src/render_tree.rs | 8 +- crates/gosub_renderer/src/window.rs | 5 + crates/gosub_rendering/Cargo.toml | 1 + crates/gosub_rendering/src/layout.rs | 14 +- crates/gosub_rendering/src/lib.rs | 1 + crates/gosub_rendering/src/position.rs | 151 ++++++++++++++++++++ crates/gosub_styling/src/css_values.rs | 6 +- src/bin/renderer.rs | 14 +- 12 files changed, 256 insertions(+), 24 deletions(-) delete mode 100644 crates/gosub_renderer/src/render.rs create mode 100644 crates/gosub_rendering/src/position.rs diff --git a/Cargo.lock b/Cargo.lock index df9b9c0f6..770950197 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -260,7 +260,7 @@ checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.60", ] [[package]] @@ -1521,6 +1521,7 @@ dependencies = [ "gosub_html5", "gosub_styling", "regex", + "rstar", "taffy", ] @@ -1698,6 +1699,15 @@ dependencies = [ "crunchy", ] +[[package]] +name = "hash32" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.14.3" @@ -1723,6 +1733,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "heapless" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad" +dependencies = [ + "hash32", + "stable_deref_trait", +] + [[package]] name = "heck" version = "0.4.1" @@ -1938,7 +1958,7 @@ checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.60", ] [[package]] @@ -2116,6 +2136,12 @@ dependencies = [ "windows-targets 0.52.4", ] +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + [[package]] name = "libredox" version = "0.0.2" @@ -2373,7 +2399,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.60", ] [[package]] @@ -2404,6 +2430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -2806,7 +2833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd" dependencies = [ "quote", - "syn 2.0.60", + "syn 2.0.60", ] [[package]] @@ -3087,6 +3114,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "rstar" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "133315eb94c7b1e8d0cb097e5a710d850263372fd028fff18969de708afc7008" +dependencies = [ + "heapless", + "num-traits", + "smallvec", +] + [[package]] name = "rust-fontconfig" version = "0.1.7" @@ -3418,6 +3456,12 @@ dependencies = [ "sqlite3-src", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "static_assertions" version = "1.1.0" @@ -4062,7 +4106,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.60", ] [[package]] diff --git a/crates/gosub_html5/src/node/data/element.rs b/crates/gosub_html5/src/node/data/element.rs index cb1e3b22a..ce64b8ece 100644 --- a/crates/gosub_html5/src/node/data/element.rs +++ b/crates/gosub_html5/src/node/data/element.rs @@ -29,6 +29,10 @@ pub struct ElementData { impl Debug for ElementData { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { let mut debug = f.debug_struct("ElementData"); + debug.field("node_id", &self.node_id); + debug.field("name", &self.name); + debug.field("attributes", &self.attributes); + debug.field("classes", &self.classes); debug.finish() } } diff --git a/crates/gosub_renderer/src/draw.rs b/crates/gosub_renderer/src/draw.rs index 85bb7f32e..d8fa9d4a0 100644 --- a/crates/gosub_renderer/src/draw.rs +++ b/crates/gosub_renderer/src/draw.rs @@ -11,6 +11,7 @@ use vello::Scene; use winit::dpi::PhysicalSize; use gosub_html5::node::NodeId as GosubId; +use gosub_rendering::position::PositionTree; use gosub_styling::css_colors::RgbColor; use gosub_styling::css_values::CssValue; use gosub_styling::render_tree::{RenderNodeData, RenderTree, RenderTreeNode}; @@ -20,6 +21,7 @@ use crate::render_tree::{NodeID, TreeDrawer}; pub trait SceneDrawer { /// Returns true if the texture needs to be redrawn fn draw(&mut self, scene: &mut Scene, size: PhysicalSize); + fn mouse_move(&mut self, scene: &mut Scene, x: f64, y: f64); } impl SceneDrawer for TreeDrawer { @@ -34,6 +36,23 @@ impl SceneDrawer for TreeDrawer { scene.reset(); self.render(scene, size); } + + fn mouse_move(&mut self, _scene: &mut Scene, x: f64, y: f64) { + if let Some(e) = self.position.find(x as f32, y as f32) { + if self.last_hover != Some(e) { + self.last_hover = Some(e); + let Some(node_id) = self.taffy.get_node_context(e) else { + return; + }; + + let Some(node) = self.style.get_node(*node_id) else { + return; + }; + + println!("Hovering over: {:?} ({:?})@({x},{y})", node.data, e); + } + }; + } } impl TreeDrawer { @@ -50,6 +69,8 @@ impl TreeDrawer { print_tree(&self.taffy, self.root, &self.style); + self.position = PositionTree::from_taffy(&self.taffy, self.root); + let bg = Rect::new(0.0, 0.0, size.width as f64, size.height as f64); scene.fill(Fill::NonZero, Affine::IDENTITY, Color::BLACK, None, &bg); diff --git a/crates/gosub_renderer/src/render.rs b/crates/gosub_renderer/src/render.rs deleted file mode 100644 index 8b1378917..000000000 --- a/crates/gosub_renderer/src/render.rs +++ /dev/null @@ -1 +0,0 @@ - diff --git a/crates/gosub_renderer/src/render_tree.rs b/crates/gosub_renderer/src/render_tree.rs index 3c5b80d1c..9f3060cd5 100644 --- a/crates/gosub_renderer/src/render_tree.rs +++ b/crates/gosub_renderer/src/render_tree.rs @@ -1,9 +1,10 @@ -use taffy::NodeId as TaffyID; use taffy::{Layout, TaffyTree}; +use taffy::{NodeId as TaffyID, NodeId}; use url::Url; use winit::dpi::PhysicalSize; use gosub_html5::node::NodeId as GosubID; +use gosub_rendering::position::PositionTree; use gosub_styling::css_values::CssProperties; use gosub_styling::render_tree::{RenderNodeData, RenderTree as StyleTree}; @@ -15,16 +16,21 @@ pub struct TreeDrawer { pub(crate) taffy: TaffyTree, pub(crate) size: Option>, pub(crate) url: Url, + pub(crate) position: PositionTree, + pub(crate) last_hover: Option, } impl TreeDrawer { pub fn new(style: StyleTree, taffy: TaffyTree, root: TaffyID, url: Url) -> Self { + let position = PositionTree::from_taffy(&taffy, root); Self { style, root, taffy, size: None, url, + position, + last_hover: None, } } } diff --git a/crates/gosub_renderer/src/window.rs b/crates/gosub_renderer/src/window.rs index cba8c9558..a8f0028e1 100644 --- a/crates/gosub_renderer/src/window.rs +++ b/crates/gosub_renderer/src/window.rs @@ -214,6 +214,11 @@ impl<'a, D: SceneDrawer> Window<'a, D> { surface_texture.present(); } + WindowEvent::CursorMoved { position, .. } => { + self.scene_drawer + .mouse_move(&mut self.scene, position.x, position.y); + } + _ => {} } diff --git a/crates/gosub_rendering/Cargo.toml b/crates/gosub_rendering/Cargo.toml index 74df3b745..782220ae1 100644 --- a/crates/gosub_rendering/Cargo.toml +++ b/crates/gosub_rendering/Cargo.toml @@ -11,3 +11,4 @@ gosub_styling = { path = "../gosub_styling" } taffy = "0.4.3" anyhow = "1.0.82" regex = "1.10.4" +rstar = "0.12.0" diff --git a/crates/gosub_rendering/src/layout.rs b/crates/gosub_rendering/src/layout.rs index de5ca9a4f..b8a40283c 100644 --- a/crates/gosub_rendering/src/layout.rs +++ b/crates/gosub_rendering/src/layout.rs @@ -1,7 +1,7 @@ use taffy::prelude::*; use gosub_html5::node::NodeId as GosubID; -use gosub_styling::render_tree::{RenderNodeData, RenderTree}; +use gosub_styling::render_tree::RenderTree; use crate::style::get_style_from_node; @@ -40,22 +40,10 @@ fn add_children_to_tree( let style = get_style_from_node(node); - let node = rt.get_node(node_id).unwrap(); - let mut is_text = false; - if let RenderNodeData::Text(text) = &node.data { - println!("Text: {:?}", text.text); - println!("Style: {:?}", style.size); - is_text = true; - } - let node = tree .new_with_children(style, &children) .map_err(|e| anyhow::anyhow!(e.to_string()))?; - if is_text { - println!("Node: {:?}", node); - } - tree.set_node_context(node, Some(node_id))?; Ok(node) diff --git a/crates/gosub_rendering/src/lib.rs b/crates/gosub_rendering/src/lib.rs index e817e266a..b70f15a87 100644 --- a/crates/gosub_rendering/src/lib.rs +++ b/crates/gosub_rendering/src/lib.rs @@ -4,5 +4,6 @@ //! pub mod layout; +pub mod position; pub mod render_tree; pub mod style; diff --git a/crates/gosub_rendering/src/position.rs b/crates/gosub_rendering/src/position.rs new file mode 100644 index 000000000..4fde6ea3e --- /dev/null +++ b/crates/gosub_rendering/src/position.rs @@ -0,0 +1,151 @@ +use std::cmp::Ordering; + +use rstar::{RTree, RTreeObject, AABB}; +use taffy::{NodeId, PrintTree, TaffyTree}; + +struct Element { + id: NodeId, + x: f32, + y: f32, + width: f32, + height: f32, + radius: Option<(f32, f32, f32, f32)>, + z_index: i32, +} + +impl RTreeObject for Element { + type Envelope = AABB<(f32, f32)>; + fn envelope(&self) -> Self::Envelope { + let lower = (self.x, self.y); + let upper = (self.x + self.width, self.y + self.height); + AABB::from_corners(lower, upper) + } +} + +pub struct PositionTree { + tree: RTree, +} + +impl PositionTree { + pub fn from_taffy(taffy: &TaffyTree, root: NodeId) -> Self { + let mut tree = RTree::new(); + + //TODO: we somehow need to get the border radius and a potential stacking context of the element here + + Self::add_node_to_tree(taffy, root, 0, &mut tree, (0.0, 0.0)); + + Self { tree } + } + + fn add_node_to_tree( + taffy: &TaffyTree, + id: NodeId, + z_index: i32, + tree: &mut RTree, + mut pos: (f32, f32), + ) { + let layout = taffy.get_final_layout(id); + + pos.0 += layout.location.x; + pos.1 += layout.location.y; + + let element = Element { + id, + x: pos.0, + y: pos.1, + width: layout.size.width, + height: layout.size.height, + radius: None, //TODO: border radius + z_index, + }; + + tree.insert(element); + + for child in taffy.children(id).unwrap_or_default() { + Self::add_node_to_tree(taffy, child, z_index + 1, tree, pos); + } + } + + pub fn find(&self, x: f32, y: f32) -> Option { + let envelope = AABB::from_point((x, y)); + + self.tree + .locate_in_envelope_intersecting(&envelope) + .filter(|e| { + let Some(radi) = e.radius else { + return true; + }; + + let middle = (e.x + e.width / 2.0, e.y + e.height / 2.0); + + match middle.0.total_cmp(&x) { + Ordering::Equal => true, + Ordering::Less => { + match middle.1.total_cmp(&y) { + Ordering::Equal => true, + // top left + Ordering::Less => { + if (e.x + radi.0) > x && (e.y + radi.0) > y { + return is_point_in_circle( + (e.x + radi.0, e.y + radi.0), + radi.0, + (x, y), + ); + } + false + } + // top right + Ordering::Greater => { + if (e.x + e.width - radi.1) < x && (e.y + radi.1) < y { + return is_point_in_circle( + (e.x + radi.1, e.y + radi.1), + radi.1, + (x, y), + ); + } + + false + } + } + } + Ordering::Greater => { + match middle.1.total_cmp(&y) { + Ordering::Equal => true, + // bottom left + Ordering::Less => { + if (e.x + radi.2) > x && (e.y + e.height - radi.2) < y { + return is_point_in_circle( + (e.x + radi.2, e.y + e.height - radi.2), + radi.2, + (x, y), + ); + } + false + } + // bottom right + Ordering::Greater => { + if (e.x + e.width - radi.3) < x && (e.y + e.height - radi.3) < y { + return is_point_in_circle( + (e.x + radi.3, e.y + radi.3), + radi.3, + (x, y), + ); + } + false + } + } + } + } + }) + .reduce(|a, b| if a.z_index >= b.z_index { a } else { b }) // >= because we just hope that the last-drawn element is last in the list + .map(|e| e.id) + } +} + +fn is_point_in_circle(circle_center: (f32, f32), circle_radius: f32, point: (f32, f32)) -> bool { + let dx = circle_center.0 - point.0; + let dy = circle_center.1 - point.1; + let distance = (dx * dx + dy * dy).sqrt(); + + distance <= circle_radius +} diff --git a/crates/gosub_styling/src/css_values.rs b/crates/gosub_styling/src/css_values.rs index 25f099217..e47a2fcb9 100644 --- a/crates/gosub_styling/src/css_values.rs +++ b/crates/gosub_styling/src/css_values.rs @@ -464,11 +464,11 @@ impl CssValue { }, CssValue::String(value) => { if value.ends_with("px") { - value.trim_end_matches("px").parse::().unwrap() + value.trim_end_matches("px").parse::().unwrap_or(0.0) } else if value.ends_with("rem") { - value.trim_end_matches("rem").parse::().unwrap() * 16.0 + value.trim_end_matches("rem").parse::().unwrap_or(0.0) * 16.0 } else if value.ends_with("em") { - value.trim_end_matches("em").parse::().unwrap() * 16.0 + value.trim_end_matches("em").parse::().unwrap_or(0.0) * 16.0 } else { 0.0 } diff --git a/src/bin/renderer.rs b/src/bin/renderer.rs index c881a0e16..23bec6b6f 100644 --- a/src/bin/renderer.rs +++ b/src/bin/renderer.rs @@ -61,9 +61,21 @@ fn load_html_rendertree(str_url: &str) -> Result { chars.read_from_str(&html, Some(Encoding::UTF8)); chars.set_confidence(Confidence::Certain); - let doc_handle = DocumentBuilder::new_document(Some(url)); + let mut doc_handle = DocumentBuilder::new_document(Some(url)); let _parse_errors = Html5Parser::parse_document(&mut chars, Document::clone(&doc_handle), None)?; + let mut doc = doc_handle.get_mut(); + doc.stylesheets + .push(gosub_styling::load_default_useragent_stylesheet()?); + + println!("stylesheets: {:?}", doc.stylesheets.len()); + + for stylesheet in doc.stylesheets.iter() { + println!("stylesheet: {:?}", stylesheet.location); + } + + drop(doc); + generate_render_tree(Document::clone(&doc_handle)) } From a303a2dae5d9709683383ad7817409c6f4e652e0 Mon Sep 17 00:00:00 2001 From: Shark Date: Mon, 6 May 2024 21:58:24 +0200 Subject: [PATCH 2/2] rename gosub_rendering to gosub_render_utils, so it is less confusing --- Cargo.toml | 2 +- crates/gosub_bindings/Cargo.toml | 2 +- crates/gosub_bindings/src/wrapper/text.rs | 2 +- crates/{gosub_rendering => gosub_render_utils}/Cargo.toml | 0 crates/{gosub_rendering => gosub_render_utils}/src/layout.rs | 0 crates/{gosub_rendering => gosub_render_utils}/src/lib.rs | 0 crates/{gosub_rendering => gosub_render_utils}/src/position.rs | 0 .../{gosub_rendering => gosub_render_utils}/src/render_tree.rs | 0 .../src/render_tree/properties.rs | 0 .../src/render_tree/text.rs | 0 .../src/render_tree/util.rs | 0 crates/{gosub_rendering => gosub_render_utils}/src/style.rs | 0 .../{gosub_rendering => gosub_render_utils}/src/style/parse.rs | 0 .../src/style/parse_properties.rs | 0 crates/gosub_renderer/Cargo.toml | 2 +- 15 files changed, 4 insertions(+), 4 deletions(-) rename crates/{gosub_rendering => gosub_render_utils}/Cargo.toml (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/layout.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/lib.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/position.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/render_tree.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/render_tree/properties.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/render_tree/text.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/render_tree/util.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/style.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/style/parse.rs (100%) rename crates/{gosub_rendering => gosub_render_utils}/src/style/parse_properties.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 60ead6af3..654b176a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ gosub_css3 = { path = "./crates/gosub_css3", features = [] } gosub_styling = { path = "./crates/gosub_styling", features = [] } gosub_jsapi = { path = "./crates/gosub_jsapi", features = [] } gosub_testing = { path = "./crates/gosub_testing", features = [] } -gosub_rendering = { path = "./crates/gosub_rendering", features = [] } +gosub_rendering = { path = "crates/gosub_render_utils", features = [] } gosub_renderer = { path = "./crates/gosub_renderer", features = [] } serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" diff --git a/crates/gosub_bindings/Cargo.toml b/crates/gosub_bindings/Cargo.toml index 2d5382204..e6d390d72 100644 --- a/crates/gosub_bindings/Cargo.toml +++ b/crates/gosub_bindings/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT" [dependencies] gosub_shared = { path = "../gosub_shared" } -gosub_rendering = { path = "../gosub_rendering" } +gosub_rendering = { path = "../gosub_render_utils" } gosub_html5 = { path = "../gosub_html5" } [lib] diff --git a/crates/gosub_bindings/src/wrapper/text.rs b/crates/gosub_bindings/src/wrapper/text.rs index 37b3d38df..78c89312b 100644 --- a/crates/gosub_bindings/src/wrapper/text.rs +++ b/crates/gosub_bindings/src/wrapper/text.rs @@ -2,7 +2,7 @@ use gosub_rendering::render_tree::text::TextNode; use std::ffi::c_char; use std::ffi::CString; -/// This is a C-friendly wrapper around gosub_rendering::rendertree::text::TextNode +/// This is a C-friendly wrapper around gosub_render_utils::rendertree::text::TextNode /// that converts Rust Strings to owned pointers to pass to the C API. #[repr(C)] pub struct CTextNode { diff --git a/crates/gosub_rendering/Cargo.toml b/crates/gosub_render_utils/Cargo.toml similarity index 100% rename from crates/gosub_rendering/Cargo.toml rename to crates/gosub_render_utils/Cargo.toml diff --git a/crates/gosub_rendering/src/layout.rs b/crates/gosub_render_utils/src/layout.rs similarity index 100% rename from crates/gosub_rendering/src/layout.rs rename to crates/gosub_render_utils/src/layout.rs diff --git a/crates/gosub_rendering/src/lib.rs b/crates/gosub_render_utils/src/lib.rs similarity index 100% rename from crates/gosub_rendering/src/lib.rs rename to crates/gosub_render_utils/src/lib.rs diff --git a/crates/gosub_rendering/src/position.rs b/crates/gosub_render_utils/src/position.rs similarity index 100% rename from crates/gosub_rendering/src/position.rs rename to crates/gosub_render_utils/src/position.rs diff --git a/crates/gosub_rendering/src/render_tree.rs b/crates/gosub_render_utils/src/render_tree.rs similarity index 100% rename from crates/gosub_rendering/src/render_tree.rs rename to crates/gosub_render_utils/src/render_tree.rs diff --git a/crates/gosub_rendering/src/render_tree/properties.rs b/crates/gosub_render_utils/src/render_tree/properties.rs similarity index 100% rename from crates/gosub_rendering/src/render_tree/properties.rs rename to crates/gosub_render_utils/src/render_tree/properties.rs diff --git a/crates/gosub_rendering/src/render_tree/text.rs b/crates/gosub_render_utils/src/render_tree/text.rs similarity index 100% rename from crates/gosub_rendering/src/render_tree/text.rs rename to crates/gosub_render_utils/src/render_tree/text.rs diff --git a/crates/gosub_rendering/src/render_tree/util.rs b/crates/gosub_render_utils/src/render_tree/util.rs similarity index 100% rename from crates/gosub_rendering/src/render_tree/util.rs rename to crates/gosub_render_utils/src/render_tree/util.rs diff --git a/crates/gosub_rendering/src/style.rs b/crates/gosub_render_utils/src/style.rs similarity index 100% rename from crates/gosub_rendering/src/style.rs rename to crates/gosub_render_utils/src/style.rs diff --git a/crates/gosub_rendering/src/style/parse.rs b/crates/gosub_render_utils/src/style/parse.rs similarity index 100% rename from crates/gosub_rendering/src/style/parse.rs rename to crates/gosub_render_utils/src/style/parse.rs diff --git a/crates/gosub_rendering/src/style/parse_properties.rs b/crates/gosub_render_utils/src/style/parse_properties.rs similarity index 100% rename from crates/gosub_rendering/src/style/parse_properties.rs rename to crates/gosub_render_utils/src/style/parse_properties.rs diff --git a/crates/gosub_renderer/Cargo.toml b/crates/gosub_renderer/Cargo.toml index 9c010305b..4f0e67eb8 100644 --- a/crates/gosub_renderer/Cargo.toml +++ b/crates/gosub_renderer/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -gosub_rendering = { path = "../gosub_rendering" } +gosub_rendering = { path = "../gosub_render_utils" } gosub_html5 = { path = "../gosub_html5" } gosub_shared = { path = "../gosub_shared" } gosub_styling = { path = "../gosub_styling" }