Integrate engine into application prototype #15
@ -1,6 +1,13 @@
|
|||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
glen marked this conversation as resolved
|
|||||||
use sycamore::{prelude::*, web::tags::div};
|
use sycamore::{prelude::*, web::tags::div};
|
||||||
use web_sys::{Element, Event, HtmlInputElement, KeyboardEvent, MouseEvent, wasm_bindgen::JsCast};
|
use web_sys::{
|
||||||
|
Element,
|
||||||
|
Event,
|
||||||
|
HtmlInputElement,
|
||||||
|
KeyboardEvent,
|
||||||
|
MouseEvent,
|
||||||
|
wasm_bindgen::JsCast
|
||||||
|
};
|
||||||
|
|
||||||
use crate::{AppState, assembly::Constraint};
|
use crate::{AppState, assembly::Constraint};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
Definitely at some point we are going to need to separate the src directory into parts for the Assembly/Engine and for each of the views, but fine if you don't think that's warranted yet. On the other hand, if you just want to set up a reasonable hierarchy now and see how it works, that's fine too.
Yeah, I think we'll probably want separate modules for "front of house" and "back of house" code at some point. Right now it does seem like the
engine
andassembly
modules should go together in the "back of house" module, but I could imagine that changing, since the assembly structure is pretty tailored to the needs of the user interface.Note that the
Display
andOutline
views each have their own module already: that's why the expressionsmod display;
andmod outline;
appear at the top ofmain.rs
.I was commenting on the fact that outline is in the same directory as assembly and engine. I guess the module structure may not be immediately clear to the untrained eye; but directory structure is.
Also be cautious about the notion that "assembly is tailored to needs of UI". The driver for what goes in Assembly is the facts of the platonic universe we are observing. So color and label are OK because the sphere labeled George is red in the platonic universe. But unless "hidden" means that an entity must be hidden in all possible views -- and I doubt it should -- that should not be part of Assembly. (That's just an example, I know there is not a "hidden" property yet.)