pub mod asset;
pub mod audio;
pub mod avatar;
pub mod behavior;
pub mod creation;
pub mod entity;
pub mod history;
pub mod identity;
pub mod instance;
pub mod light;
pub mod material;
pub mod modulation;
pub mod shape;
pub mod soundtrack;
pub mod spatial;
pub mod tour;
pub mod trigger;
pub mod validation;
pub mod world;
pub mod author;
pub mod doc;
pub mod oplog;
pub mod physics;
pub mod session;
pub mod state;
pub use asset::{MeshAssetRef, NodeOverride};
pub use audio::{AudioDef, AudioKind, AudioSource, FilterType, Rolloff, WaveformType};
pub use avatar::{AvatarDef, PointOfView};
pub use behavior::{BehaviorDef, PathMode};
pub use creation::{CreationDef, SemanticCategory};
pub use doc::{ApplyError, WorldDoc};
pub use entity::{EntityPatch, WorldEntity, WorldTransform, values_close};
pub use history::{AmbienceLayerDef, EditHistory, EditOp, WorldEdit};
pub use identity::{CreationId, EntityId, EntityName, EntityRef};
pub use instance::{
InstanceOf, PartLink, PartOverride, expand_instances, part_links, validate_instances,
};
pub use light::{LightDef, LightType};
pub use material::{AlphaModeDef, MaterialDef, TextureSlot};
pub use modulation::{ModulationDef, ModulationTarget, SignalSource, StemKind};
pub use oplog::{OpLogEntry, decode_line, encode_line};
pub use session::{fold_log, fold_path};
pub use shape::{PrimitiveShapeKind, Shape};
pub use soundtrack::{SoundtrackDef, StemCurves, curve_at};
pub use spatial::ChunkCoord;
pub use state::{StateDoc, StateField, fold_state};
pub use tour::{TourDef, TourMode, TourWaypoint};
pub use trigger::{TriggerActionDef, TriggerDef, TriggerEvent, TriggerVolume};
pub use validation::{
Severity, ValidationIssue, WorldLimits, validate_entities, validate_manifest,
};
pub use world::{CameraDef, ComplianceMeta, EnvironmentDef, WorldManifest, WorldMeta};
impl WorldManifest {
pub fn as_base(&self) -> Result<WorldDoc, ApplyError> {
let mut doc = WorldDoc::new(self.meta.name.as_str());
doc.environment = self.environment.clone();
doc.camera = self.camera.clone();
doc.avatar = self.avatar.clone();
doc.tours = self.tours.clone();
for entity in &self.entities {
doc.apply(&EditOp::spawn(entity.clone()))?;
}
Ok(doc)
}
}
pub const WORLD_SCHEMA_VERSION: u32 = crate::world::WORLD_SCHEMA_VERSION;