pub mod asset;
pub mod audio;
pub mod avatar;
pub mod behavior;
pub mod creation;
pub mod entity;
pub mod ext_provenance;
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 world_patch;
pub mod author;
pub mod authoring;
pub mod doc;
pub mod hash;
pub mod oplog;
pub mod package;
pub mod physics;
pub mod session;
pub mod state;
pub mod strict;
pub use asset::{MeshAssetRef, NodeOverride};
pub use audio::{AudioDef, AudioKind, AudioSource, FilterType, Rolloff, WaveformType};
pub use authoring::{Ingested, Refused, ingest, merge_patch};
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 ext_provenance::{EXT_PROVENANCE_FIELDS, EXT_PROVENANCE_KEY, ExtProvenance};
pub use hash::{sha256, sha256_hex};
pub use history::{AmbienceLayerDef, EditHistory, EditOp, WorldEdit};
pub use identity::{CreationId, EntityId, EntityName, EntityRef, MAX_ENTITY_ID};
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, canonical_json, compute_entry_id, decode_line, encode_line};
pub use package::{
BASE_SNAPSHOT, PACKAGE_FORMAT_VERSION, compact_plan, manifest_text, manifest_text_of,
snapshot_filename,
};
pub use session::{MergedBranch, fold_log, fold_path, merge_branch};
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 strict::{
REGISTERED_EXTENSIONS, StrictError, decode_line_strict, parse_manifest_strict,
registered_extensions,
};
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, IdCeilingError, WorldManifest, WorldMeta,
};
pub use world_patch::{WORLD_PATCH_KEYS, WorldPatch};
impl WorldManifest {
pub fn as_base(&self) -> Result<WorldDoc, ApplyError> {
let mut doc = WorldDoc::new(self.meta.name.as_str());
doc.set_scene(self);
for entity in &self.entities {
doc.apply(&EditOp::spawn(entity.clone()))?;
}
doc.resolve_all_refs()?;
Ok(doc)
}
}
pub const WORLD_SCHEMA_VERSION: u32 = crate::world::WORLD_SCHEMA_VERSION;