euv-core 0.51.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
/// Khronos GLB binary container magic (`"glTF"` little-endian `0x46546C67`).
pub const GLB_MAGIC: u32 = 0x4654_6C67;

/// Supported Khronos GLB binary specification version (`2`).
pub const GLB_VERSION_2: u32 = 2;

/// Khronos GLB JSON chunk type tag (`"JSON"` little-endian `0x4E4F534A`).
pub const GLB_CHUNK_JSON: u32 = 0x4E4F_534A;

/// Khronos GLB binary buffer chunk type tag (`"BIN\0"` little-endian `0x004E4942`).
pub const GLB_CHUNK_BIN: u32 = 0x004E_4942;

/// glTF 2.0 component type constant for signed 8-bit integer (`BYTE`).
pub(crate) const GLTF_COMP_I8: u32 = 5120;
/// glTF 2.0 component type constant for unsigned 8-bit integer (`UNSIGNED_BYTE`).
pub(crate) const GLTF_COMP_U8: u32 = 5121;
/// glTF 2.0 component type constant for signed 16-bit integer (`SHORT`).
pub(crate) const GLTF_COMP_I16: u32 = 5122;
/// glTF 2.0 component type constant for unsigned 16-bit integer (`UNSIGNED_SHORT`).
pub(crate) const GLTF_COMP_U16: u32 = 5123;
/// glTF 2.0 component type constant for unsigned 32-bit integer (`UNSIGNED_INT`).
pub(crate) const GLTF_COMP_U32: u32 = 5125;
/// glTF 2.0 component type constant for 32-bit IEEE float (`FLOAT`).
pub(crate) const GLTF_COMP_F32: u32 = 5126;

/// glTF 2.0 primitive mode for triangle list.
pub(crate) const GLTF_MODE_TRIANGLES: u32 = 4;
/// glTF 2.0 primitive mode for triangle strip.
pub(crate) const GLTF_MODE_TRIANGLE_STRIP: u32 = 5;
/// glTF 2.0 primitive mode for triangle fan.
pub(crate) const GLTF_MODE_TRIANGLE_FAN: u32 = 6;

/// Default imported scene name when glTF omits scene and generator labels.
pub(crate) const GLTF_DEFAULT_SCENE_NAME: &str = "gltf_scene";
/// Prefix matching RFC 2397 inline data URIs.
pub(crate) const GLTF_DATA_URI_PREFIX: &str = "data:";
/// Delimiter marking base64 payload inside a data URI.
pub(crate) const GLTF_BASE64_MARKER: &str = ";base64,";
/// glTF extension name for `KHR_texture_transform`.
pub(crate) const GLTF_EXT_TEX_TRANSFORM: &str = "KHR_texture_transform";
/// glTF extension name for `KHR_materials_emissive_strength`.
pub(crate) const GLTF_EXT_EMISSIVE_STRENGTH: &str = "KHR_materials_emissive_strength";
/// glTF extension name for `KHR_materials_ior`.
pub(crate) const GLTF_EXT_IOR: &str = "KHR_materials_ior";
/// glTF extension name for `KHR_materials_specular`.
pub(crate) const GLTF_EXT_SPECULAR: &str = "KHR_materials_specular";
/// glTF extension name for `KHR_materials_clearcoat`.
pub(crate) const GLTF_EXT_CLEARCOAT: &str = "KHR_materials_clearcoat";
/// glTF extension name for `KHR_materials_transmission`.
pub(crate) const GLTF_EXT_TRANSMISSION: &str = "KHR_materials_transmission";
/// glTF extension name for `KHR_materials_volume`.
pub(crate) const GLTF_EXT_VOLUME: &str = "KHR_materials_volume";
/// glTF extension name for `KHR_materials_sheen`.
pub(crate) const GLTF_EXT_SHEEN: &str = "KHR_materials_sheen";
/// glTF extension name for `KHR_materials_unlit`.
pub(crate) const GLTF_EXT_UNLIT: &str = "KHR_materials_unlit";
/// glTF extension name for `KHR_lights_punctual`.
pub(crate) const GLTF_EXT_LIGHTS_PUNCTUAL: &str = "KHR_lights_punctual";

/// glTF JSON key for `asset`.
pub(crate) const KEY_ASSET: &str = "asset";
/// glTF JSON key for `generator`.
pub(crate) const KEY_GENERATOR: &str = "generator";
/// glTF JSON key for `name`.
pub(crate) const KEY_NAME: &str = "name";
/// glTF JSON key for `buffers`.
pub(crate) const KEY_BUFFERS: &str = "buffers";
/// glTF JSON key for `bufferViews`.
pub(crate) const KEY_BUFFER_VIEWS: &str = "bufferViews";
/// glTF JSON key for `buffer`.
pub(crate) const KEY_BUFFER: &str = "buffer";
/// glTF JSON key for `bufferView`.
pub(crate) const KEY_BUFFER_VIEW: &str = "bufferView";
/// glTF JSON key for `byteOffset`.
pub(crate) const KEY_BYTE_OFFSET: &str = "byteOffset";
/// glTF JSON key for `byteLength`.
pub(crate) const KEY_BYTE_LENGTH: &str = "byteLength";
/// glTF JSON key for `byteStride`.
pub(crate) const KEY_BYTE_STRIDE: &str = "byteStride";
/// glTF JSON key for `accessors`.
pub(crate) const KEY_ACCESSORS: &str = "accessors";
/// glTF JSON key for `componentType`.
pub(crate) const KEY_COMPONENT_TYPE: &str = "componentType";
/// glTF JSON key for `normalized`.
pub(crate) const KEY_NORMALIZED: &str = "normalized";
/// glTF JSON key for `count`.
pub(crate) const KEY_COUNT: &str = "count";
/// glTF JSON key for `type`.
pub(crate) const KEY_TYPE: &str = "type";
/// glTF JSON key for `sparse`.
pub(crate) const KEY_SPARSE: &str = "sparse";
/// glTF JSON key for `indices`.
pub(crate) const KEY_INDICES: &str = "indices";
/// glTF JSON key for `values`.
pub(crate) const KEY_VALUES: &str = "values";
/// glTF JSON key for `images`.
pub(crate) const KEY_IMAGES: &str = "images";
/// glTF JSON key for `samplers`.
pub(crate) const KEY_SAMPLERS: &str = "samplers";
/// glTF JSON key for `textures`.
pub(crate) const KEY_TEXTURES: &str = "textures";
/// glTF JSON key for `source`.
pub(crate) const KEY_SOURCE: &str = "source";
/// glTF JSON key for `sampler`.
pub(crate) const KEY_SAMPLER: &str = "sampler";
/// glTF JSON key for `magFilter`.
pub(crate) const KEY_MAG_FILTER: &str = "magFilter";
/// glTF JSON key for `minFilter`.
pub(crate) const KEY_MIN_FILTER: &str = "minFilter";
/// glTF JSON key for `wrapS`.
pub(crate) const KEY_WRAP_S: &str = "wrapS";
/// glTF JSON key for `wrapT`.
pub(crate) const KEY_WRAP_T: &str = "wrapT";
/// glTF JSON key for `materials`.
pub(crate) const KEY_MATERIALS: &str = "materials";
/// glTF JSON key for `pbrMetallicRoughness`.
pub(crate) const KEY_PBR_MR: &str = "pbrMetallicRoughness";
/// glTF JSON key for `baseColorFactor`.
pub(crate) const KEY_BASE_COLOR_FACTOR: &str = "baseColorFactor";
/// glTF JSON key for `baseColorTexture`.
pub(crate) const KEY_BASE_COLOR_TEX: &str = "baseColorTexture";
/// glTF JSON key for `metallicFactor`.
pub(crate) const KEY_METALLIC_FACTOR: &str = "metallicFactor";
/// glTF JSON key for `roughnessFactor`.
pub(crate) const KEY_ROUGHNESS_FACTOR: &str = "roughnessFactor";
/// glTF JSON key for `metallicRoughnessTexture`.
pub(crate) const KEY_MR_TEX: &str = "metallicRoughnessTexture";
/// glTF JSON key for `normalTexture`.
pub(crate) const KEY_NORMAL_TEX: &str = "normalTexture";
/// glTF JSON key for `occlusionTexture`.
pub(crate) const KEY_OCCLUSION_TEX: &str = "occlusionTexture";
/// glTF JSON key for `emissiveFactor`.
pub(crate) const KEY_EMISSIVE_FACTOR: &str = "emissiveFactor";
/// glTF JSON key for `emissiveTexture`.
pub(crate) const KEY_EMISSIVE_TEX: &str = "emissiveTexture";
/// glTF JSON key for `alphaMode`.
pub(crate) const KEY_ALPHA_MODE: &str = "alphaMode";
/// glTF JSON key for `alphaCutoff`.
pub(crate) const KEY_ALPHA_CUTOFF: &str = "alphaCutoff";
/// glTF JSON key for `doubleSided`.
pub(crate) const KEY_DOUBLE_SIDED: &str = "doubleSided";
/// glTF JSON key for `extensions`.
pub(crate) const KEY_EXTENSIONS: &str = "extensions";
/// glTF JSON key for `extras`.
pub(crate) const KEY_EXTRAS: &str = "extras";
/// glTF JSON key for `index`.
pub(crate) const KEY_INDEX: &str = "index";
/// glTF JSON key for `texCoord`.
pub(crate) const KEY_TEX_COORD: &str = "texCoord";
/// glTF JSON key for `scale`.
pub(crate) const KEY_SCALE: &str = "scale";
/// glTF JSON key for `strength`.
pub(crate) const KEY_STRENGTH: &str = "strength";
/// glTF JSON key for `offset`.
pub(crate) const KEY_OFFSET: &str = "offset";
/// glTF JSON key for `rotation`.
pub(crate) const KEY_ROTATION: &str = "rotation";
/// glTF JSON key for `emissiveStrength`.
pub(crate) const KEY_EMISSIVE_STRENGTH: &str = "emissiveStrength";
/// glTF JSON key for `specularFactor`.
pub(crate) const KEY_SPECULAR_FACTOR: &str = "specularFactor";
/// glTF JSON key for `specularColorFactor`.
pub(crate) const KEY_SPECULAR_COLOR_FACTOR: &str = "specularColorFactor";
/// glTF JSON key for `specularTexture`.
pub(crate) const KEY_SPECULAR_TEX: &str = "specularTexture";
/// glTF JSON key for `specularColorTexture`.
pub(crate) const KEY_SPECULAR_COLOR_TEX: &str = "specularColorTexture";
/// glTF JSON key for `clearcoatFactor`.
pub(crate) const KEY_CLEARCOAT_FACTOR: &str = "clearcoatFactor";
/// glTF JSON key for `clearcoatRoughnessFactor`.
pub(crate) const KEY_CLEARCOAT_ROUGHNESS: &str = "clearcoatRoughnessFactor";
/// glTF JSON key for `clearcoatTexture`.
pub(crate) const KEY_CLEARCOAT_TEX: &str = "clearcoatTexture";
/// glTF JSON key for `clearcoatRoughnessTexture`.
pub(crate) const KEY_CLEARCOAT_ROUGH_TEX: &str = "clearcoatRoughnessTexture";
/// glTF JSON key for `clearcoatNormalTexture`.
pub(crate) const KEY_CLEARCOAT_NORM_TEX: &str = "clearcoatNormalTexture";
/// glTF JSON key for `transmissionFactor`.
pub(crate) const KEY_TRANSMISSION_FACTOR: &str = "transmissionFactor";
/// glTF JSON key for `transmissionTexture`.
pub(crate) const KEY_TRANSMISSION_TEX: &str = "transmissionTexture";
/// glTF JSON key for `thicknessFactor`.
pub(crate) const KEY_THICKNESS_FACTOR: &str = "thicknessFactor";
/// glTF JSON key for `attenuationDistance`.
pub(crate) const KEY_ATTENUATION_DIST: &str = "attenuationDistance";
/// glTF JSON key for `attenuationColor`.
pub(crate) const KEY_ATTENUATION_COLOR: &str = "attenuationColor";
/// glTF JSON key for `sheenColorFactor`.
pub(crate) const KEY_SHEEN_COLOR: &str = "sheenColorFactor";
/// glTF JSON key for `sheenRoughnessFactor`.
pub(crate) const KEY_SHEEN_ROUGHNESS: &str = "sheenRoughnessFactor";
/// glTF JSON key for `sheenColorTexture`.
pub(crate) const KEY_SHEEN_COLOR_TEX: &str = "sheenColorTexture";
/// glTF JSON key for `sheenRoughnessTexture`.
pub(crate) const KEY_SHEEN_ROUGH_TEX: &str = "sheenRoughnessTexture";
/// glTF JSON key for `meshes`.
pub(crate) const KEY_MESHES: &str = "meshes";
/// glTF JSON key for `primitives`.
pub(crate) const KEY_PRIMITIVES: &str = "primitives";
/// glTF JSON key for `attributes`.
pub(crate) const KEY_ATTRIBUTES: &str = "attributes";
/// glTF JSON key for `material`.
pub(crate) const KEY_MATERIAL: &str = "material";
/// glTF JSON key for `mode`.
pub(crate) const KEY_MODE: &str = "mode";
/// glTF JSON key for `targets`.
pub(crate) const KEY_TARGETS: &str = "targets";
/// glTF JSON key for `targetNames`.
pub(crate) const KEY_TARGET_NAMES: &str = "targetNames";
/// glTF JSON key for `POSITION`.
pub(crate) const ATTR_POSITION: &str = "POSITION";
/// glTF JSON key for `NORMAL`.
pub(crate) const ATTR_NORMAL: &str = "NORMAL";
/// glTF JSON key for `TANGENT`.
pub(crate) const ATTR_TANGENT: &str = "TANGENT";
/// glTF JSON key for `TEXCOORD_0`.
pub(crate) const ATTR_TEXCOORD_0: &str = "TEXCOORD_0";
/// glTF JSON key for `TEXCOORD_1`.
pub(crate) const ATTR_TEXCOORD_1: &str = "TEXCOORD_1";
/// glTF JSON key for `COLOR_0`.
pub(crate) const ATTR_COLOR_0: &str = "COLOR_0";
/// glTF JSON key for `JOINTS_0`.
pub(crate) const ATTR_JOINTS_0: &str = "JOINTS_0";
/// glTF JSON key for `JOINTS_1`.
pub(crate) const ATTR_JOINTS_1: &str = "JOINTS_1";
/// glTF JSON key for `WEIGHTS_0`.
pub(crate) const ATTR_WEIGHTS_0: &str = "WEIGHTS_0";
/// glTF JSON key for `WEIGHTS_1`.
pub(crate) const ATTR_WEIGHTS_1: &str = "WEIGHTS_1";
/// glTF JSON key for `skins`.
pub(crate) const KEY_SKINS: &str = "skins";
/// glTF JSON key for `joints`.
pub(crate) const KEY_JOINTS: &str = "joints";
/// glTF JSON key for `skeleton`.
pub(crate) const KEY_SKELETON: &str = "skeleton";
/// glTF JSON key for `inverseBindMatrices`.
pub(crate) const KEY_INV_BIND_MATRICES: &str = "inverseBindMatrices";
/// glTF JSON key for `animations`.
pub(crate) const KEY_ANIMATIONS: &str = "animations";
/// glTF JSON key for `channels`.
pub(crate) const KEY_CHANNELS: &str = "channels";
/// glTF JSON key for `target`.
pub(crate) const KEY_TARGET: &str = "target";
/// glTF JSON key for `node`.
pub(crate) const KEY_NODE: &str = "node";
/// glTF JSON key for `path`.
pub(crate) const KEY_PATH: &str = "path";
/// glTF JSON key for `input`.
pub(crate) const KEY_INPUT: &str = "input";
/// glTF JSON key for `output`.
pub(crate) const KEY_OUTPUT: &str = "output";
/// glTF JSON key for `interpolation`.
pub(crate) const KEY_INTERPOLATION: &str = "interpolation";
/// glTF JSON key for `cameras`.
pub(crate) const KEY_CAMERAS: &str = "cameras";
/// glTF JSON key for `perspective`.
pub(crate) const KEY_PERSPECTIVE: &str = "perspective";
/// glTF JSON key for `orthographic`.
pub(crate) const KEY_ORTHOGRAPHIC: &str = "orthographic";
/// glTF JSON key for `yfov`.
pub(crate) const KEY_YFOV: &str = "yfov";
/// glTF JSON key for `aspectRatio`.
pub(crate) const KEY_ASPECT_RATIO: &str = "aspectRatio";
/// glTF JSON key for `znear`.
pub(crate) const KEY_ZNEAR: &str = "znear";
/// glTF JSON key for `zfar`.
pub(crate) const KEY_ZFAR: &str = "zfar";
/// glTF JSON key for `xmag`.
pub(crate) const KEY_XMAG: &str = "xmag";
/// glTF JSON key for `ymag`.
pub(crate) const KEY_YMAG: &str = "ymag";
/// glTF JSON key for `lights`.
pub(crate) const KEY_LIGHTS: &str = "lights";
/// glTF JSON key for `light`.
pub(crate) const KEY_LIGHT: &str = "light";
/// glTF JSON key for `color`.
pub(crate) const KEY_COLOR: &str = "color";
/// glTF JSON key for `intensity`.
pub(crate) const KEY_INTENSITY: &str = "intensity";
/// glTF JSON key for `range`.
pub(crate) const KEY_RANGE: &str = "range";
/// glTF JSON key for `spot`.
pub(crate) const KEY_SPOT: &str = "spot";
/// glTF JSON key for `innerConeAngle`.
pub(crate) const KEY_INNER_CONE: &str = "innerConeAngle";
/// glTF JSON key for `outerConeAngle`.
pub(crate) const KEY_OUTER_CONE: &str = "outerConeAngle";
/// glTF JSON key for `nodes`.
pub(crate) const KEY_NODES: &str = "nodes";
/// glTF JSON key for `children`.
pub(crate) const KEY_CHILDREN: &str = "children";
/// glTF JSON key for `matrix`.
pub(crate) const KEY_MATRIX: &str = "matrix";
/// glTF JSON key for `translation`.
pub(crate) const KEY_TRANSLATION: &str = "translation";
/// glTF JSON key for `mesh`.
pub(crate) const KEY_MESH: &str = "mesh";
/// glTF JSON key for `skin`.
pub(crate) const KEY_SKIN: &str = "skin";
/// glTF JSON key for `camera`.
pub(crate) const KEY_CAMERA: &str = "camera";
/// glTF JSON key for `weights`.
pub(crate) const KEY_WEIGHTS: &str = "weights";
/// glTF JSON key for `scenes`.
pub(crate) const KEY_SCENES: &str = "scenes";
/// glTF JSON key for `scene`.
pub(crate) const KEY_SCENE: &str = "scene";
/// glTF JSON key for `positions` (legacy inline fallback).
pub(crate) const KEY_LEGACY_POSITIONS: &str = "positions";
/// Blender custom extras sub-object key (`extras.euv`).
pub(crate) const KEY_EUV_COLLECTIONS: &str = "collections";
/// Blender custom extras collider key.
pub(crate) const KEY_EUV_COLLIDER: &str = "collider";
/// Blender custom extras buoyancy density key.
pub(crate) const KEY_EUV_BUOYANCY: &str = "buoyancy_density";
/// Blender custom extras trigger key.
pub(crate) const KEY_EUV_TRIGGER: &str = "is_trigger";
/// Blender custom extras shadow casting key.
pub(crate) const KEY_EUV_CAST_SHADOWS: &str = "cast_shadows";
/// Alpha mode string `MASK`.
pub(crate) const ALPHA_MODE_MASK: &str = "MASK";
/// Alpha mode string `BLEND`.
pub(crate) const ALPHA_MODE_BLEND: &str = "BLEND";
/// Interpolation string `STEP`.
pub(crate) const INTERP_STEP: &str = "STEP";
/// Interpolation string `CUBICSPLINE`.
pub(crate) const INTERP_CUBICSPLINE: &str = "CUBICSPLINE";
/// Light kind string `directional`.
pub(crate) const LIGHT_TYPE_DIRECTIONAL: &str = "directional";
/// Light kind string `point`.
pub(crate) const LIGHT_TYPE_POINT: &str = "point";
/// Light kind string `spot`.
pub(crate) const LIGHT_TYPE_SPOT: &str = "spot";
/// Light kind string `area`.
pub(crate) const LIGHT_TYPE_AREA: &str = "area";
/// Accessor type string `SCALAR`.
pub(crate) const ACC_TYPE_SCALAR: &str = "SCALAR";
/// Accessor type string `VEC2`.
pub(crate) const ACC_TYPE_VEC2: &str = "VEC2";
/// Accessor type string `VEC3`.
pub(crate) const ACC_TYPE_VEC3: &str = "VEC3";
/// Accessor type string `VEC4`.
pub(crate) const ACC_TYPE_VEC4: &str = "VEC4";
/// Accessor type string `MAT2`.
pub(crate) const ACC_TYPE_MAT2: &str = "MAT2";
/// Accessor type string `MAT3`.
pub(crate) const ACC_TYPE_MAT3: &str = "MAT3";
/// Accessor type string `MAT4`.
pub(crate) const ACC_TYPE_MAT4: &str = "MAT4";
/// Collider tag string `sphere`.
pub(crate) const COLLIDER_SPHERE: &str = "sphere";
/// Collider tag string `convex`.
pub(crate) const COLLIDER_CONVEX: &str = "convex";
/// Collider tag string `convex_hull`.
pub(crate) const COLLIDER_CONVEX_HULL: &str = "convex_hull";
/// Collider tag string `mesh`.
pub(crate) const COLLIDER_MESH: &str = "mesh";

/// Error string for malformed GLB binary headers or chunks.
pub(crate) const ERR_GLB_INVALID: &str = "invalid glb v2 binary container";
/// Error string for malformed glTF JSON syntax.
pub(crate) const ERR_GLTF_PARSE: &str = "invalid gltf 2.0 json document";
/// Error string for missing external URI buffer or image.
pub(crate) const ERR_GLTF_URI_RESOLVE: &str = "failed to resolve gltf external uri";
/// Error string for path traversal attempt in relative glTF URI.
pub(crate) const ERR_GLTF_URI_TRAVERSAL: &str = "rejected unsafe relative gltf uri path";
/// Error string for out-of-bounds buffer view or accessor slice.
pub(crate) const ERR_GLTF_ACCESSOR_BOUNDS: &str = "gltf accessor or bufferView out of bounds";