savoiardi/loader

Typed constructors for the Three.js loader objects used by Savoiardi.

Loaders are kept in their own module so the higher-level geometry, texture, audio, and object APIs can share them without exposing raw JavaScript values.

Types

Loads audio buffers.

pub type AudioLoader

Loads cube textures from six image URLs.

pub type CubeTextureLoader

Loads FBX models.

pub type FBXLoader

Loads fonts used by text geometry.

pub type FontLoader

Loads GLTF models.

pub type GLTFLoader
pub type LoadError {
  EmptyUrl
  InvalidUrl(url: String, message: String)
  HttpError(url: String, status: Int, status_text: String)
  ResourceError(url: String)
  ParseError(message: String)
  LoadFailure(message: String)
}

Constructors

  • EmptyUrl
  • InvalidUrl(url: String, message: String)
  • HttpError(url: String, status: Int, status_text: String)
  • ResourceError(url: String)
  • ParseError(message: String)
  • LoadFailure(message: String)

Loads OBJ models.

pub type OBJLoader

Loads STL geometry assets.

pub type STLLoader

Loads 2D textures.

pub type TextureLoader

Values

pub fn audio() -> AudioLoader

Creates an audio loader.

pub fn cube_texture() -> CubeTextureLoader

Creates a cube texture loader.

pub fn fbx() -> FBXLoader

Creates an FBX loader.

pub fn font() -> FontLoader

Creates a font loader.

pub fn gltf() -> GLTFLoader

Creates a GLTF loader.

pub fn obj() -> OBJLoader

Creates an OBJ loader.

pub fn stl() -> STLLoader

Creates an STL loader.

pub fn texture() -> TextureLoader

Creates a texture loader.

Search Document