euv-core 0.56.0

Core cross-platform runtime for euv featuring arena-based fine-grained reactivity, deterministic layout, flat scene graph, multi-mode rendering, and direct OS platform adapters.
Documentation
use super::*;

/// Process-wide monotonic revision allocator for `GpuPbrMeshBuffer` uploads so distinct `World3D` instances never collide on `revision == 1`.
pub(crate) static NEXT_GPU_PBR_MESH_REVISION: AtomicU64 = AtomicU64::new(1);

/// Process-wide monotonic revision allocator for `GpuWorld3dMeshBuffer` uploads so distinct `World3D` instances never collide on cached GPU VBOs.
pub(crate) static NEXT_GPU_WORLD3D_MESH_REVISION: AtomicU64 = AtomicU64::new(1);

/// Process-wide immutable Vice Boulevard open-world city template populated once and reused across `/game3d` entries without regenerating meshes or BVHs.
#[cfg(not(target_arch = "wasm32"))]
pub(crate) static OPEN_WORLD_CITY_TEMPLATE: OnceLock<OpenWorldCityTemplate3D> = OnceLock::new();

thread_local! {
    /// Per-thread reusable `World3dGpuPassScratch` eliminating per-frame `Vec<Vec<_>>` heap allocations when `&World3D` builds GPU passes.
    pub(crate) static WORLD3D_GPU_PASS_SCRATCH: RefCell<World3dGpuPassScratch> =
        const { RefCell::new(World3dGpuPassScratch {
            dynamic_pose_epochs: Vec::new(),
            dynamic_pose_transforms: Vec::new(),
            current_epoch: 0,
            mesh_counts: Vec::new(),
            mesh_cursors: Vec::new(),
            visible_scratch: Vec::new(),
        }) };
    /// Single-threaded WebAssembly cache holding the immutable Vice Boulevard open-world city template without regenerating meshes or BVHs.
    #[cfg(target_arch = "wasm32")]
    pub(crate) static OPEN_WORLD_CITY_TEMPLATE_WASM: RefCell<Option<OpenWorldCityTemplate3D>> =
        const { RefCell::new(None) };
}