First pass converting snapshot code over to RojoTree from RbxTree

This commit is contained in:
Lucien Greathouse
2019-09-09 13:50:39 -07:00
parent 618185a52d
commit 824b984a64
6 changed files with 143 additions and 88 deletions

View File

@@ -1,13 +1,13 @@
use std::{collections::HashMap, path::PathBuf, sync::Arc};
use failure::Fail;
use rbx_dom_weak::{RbxInstanceProperties, RbxTree};
use rbx_dom_weak::RbxInstanceProperties;
use crate::{
imfs::new::{Imfs, RealFetcher, WatchMode},
project::{Project, ProjectLoadError},
serve_session::ServeSession,
snapshot::{apply_patch_set, compute_patch_set},
snapshot::{apply_patch_set, compute_patch_set, InstancePropertiesWithMeta, RojoTree},
snapshot_middleware::snapshot_from_imfs,
web::LiveServer,
};
@@ -48,10 +48,13 @@ pub fn serve(options: &ServeOptions) -> Result<(), ServeError> {
println!("Rojo server listening on port {}", port);
let mut tree = RbxTree::new(RbxInstanceProperties {
name: "ROOT".to_owned(),
class_name: "Folder".to_owned(),
properties: HashMap::new(),
let mut tree = RojoTree::new(InstancePropertiesWithMeta {
properties: RbxInstanceProperties {
name: "ROOT".to_owned(),
class_name: "Folder".to_owned(),
properties: HashMap::new(),
},
metadata: Default::default(),
});
let root_id = tree.get_root_id();