pub struct Document(/* private fields */);Expand description
glTF JSON wrapper.
Implementations§
Source§impl Document
impl Document
Sourcepub fn from_json_without_validation(json: Root) -> Self
pub fn from_json_without_validation(json: Root) -> Self
Loads glTF from pre-deserialized JSON without performing validation checks.
Sourcepub fn accessors(&self) -> Accessors<'_> ⓘ
pub fn accessors(&self) -> Accessors<'_> ⓘ
Returns an Iterator that visits the accessors of the glTF asset.
Sourcepub fn animations(&self) -> Animations<'_> ⓘ
pub fn animations(&self) -> Animations<'_> ⓘ
Returns an Iterator that visits the animations of the glTF asset.
Sourcepub fn buffers(&self) -> Buffers<'_> ⓘ
pub fn buffers(&self) -> Buffers<'_> ⓘ
Returns an Iterator that visits the pre-loaded buffers of the glTF asset.
Sourcepub fn cameras(&self) -> Cameras<'_> ⓘ
pub fn cameras(&self) -> Cameras<'_> ⓘ
Returns an Iterator that visits the cameras of the glTF asset.
Sourcepub fn default_scene(&self) -> Option<Scene<'_>>
pub fn default_scene(&self) -> Option<Scene<'_>>
Returns the default scene, if provided.
Sourcepub fn extensions_used(&self) -> ExtensionsUsed<'_> ⓘ
pub fn extensions_used(&self) -> ExtensionsUsed<'_> ⓘ
Returns the extensions referenced in this .document file.
Sourcepub fn extensions_required(&self) -> ExtensionsRequired<'_> ⓘ
pub fn extensions_required(&self) -> ExtensionsRequired<'_> ⓘ
Returns the extensions required to load and render this asset.
Sourcepub fn images(&self) -> Images<'_> ⓘ
pub fn images(&self) -> Images<'_> ⓘ
Returns an Iterator that visits the pre-loaded images of the glTF asset.
Sourcepub fn extensions(&self) -> Option<&Map<String, Value>>
Available on crate feature extensions only.
pub fn extensions(&self) -> Option<&Map<String, Value>>
extensions only.Returns extension data unknown to this crate version.
Sourcepub fn extension_value(&self, ext_name: &str) -> Option<&Value>
Available on crate feature extensions only.
pub fn extension_value(&self, ext_name: &str) -> Option<&Value>
extensions only.Queries extension data unknown to this crate version.
Sourcepub fn lights(&self) -> Option<Lights<'_>>
Available on crate feature KHR_lights_punctual only.
pub fn lights(&self) -> Option<Lights<'_>>
KHR_lights_punctual only.Returns an Iterator that visits the lights of the glTF asset as defined by the
KHR_lights_punctual extension.
Sourcepub fn variants(&self) -> Option<Variants<'_>>
Available on crate feature KHR_materials_variants only.
pub fn variants(&self) -> Option<Variants<'_>>
KHR_materials_variants only.Returns an Iterator that visits the variants of the glTF asset as defined by the
KHR_materials_variants extension.
Sourcepub fn materials(&self) -> Materials<'_> ⓘ
pub fn materials(&self) -> Materials<'_> ⓘ
Returns an Iterator that visits the materials of the glTF asset.
Sourcepub fn meshes(&self) -> Meshes<'_> ⓘ
pub fn meshes(&self) -> Meshes<'_> ⓘ
Returns an Iterator that visits the meshes of the glTF asset.
Sourcepub fn nodes(&self) -> Nodes<'_> ⓘ
pub fn nodes(&self) -> Nodes<'_> ⓘ
Returns an Iterator that visits the nodes of the glTF asset.
Sourcepub fn samplers(&self) -> Samplers<'_> ⓘ
pub fn samplers(&self) -> Samplers<'_> ⓘ
Returns an Iterator that visits the samplers of the glTF asset.
Sourcepub fn scenes(&self) -> Scenes<'_> ⓘ
pub fn scenes(&self) -> Scenes<'_> ⓘ
Returns an Iterator that visits the scenes of the glTF asset.
Sourcepub fn skins(&self) -> Skins<'_> ⓘ
pub fn skins(&self) -> Skins<'_> ⓘ
Returns an Iterator that visits the skins of the glTF asset.