Struct three::Factory [] [src]

pub struct Factory { /* fields omitted */ }

Factory is used to instantiate game objects.

Methods

impl Factory
[src]

[src]

Create new empty Scene.

[src]

Create a new Bone, one component of a Skeleton.

[src]

Create a new [Skeleton] from a set of [Bone] instances.

  • bones is the array of bones that form the skeleton.
  • inverses is an optional array of inverse bind matrices for each bone. [Skeleton]: ../skeleton/struct.Skeleton.html [Bone]: ../skeleton/struct.Bone.html

[src]

Create new Orthographic Camera. It's used to render 2D.

[src]

Create new Perspective Camera.

It's used to render 3D.

Examples

Creating a finite perspective camera.

let camera = factory.perspective_camera(60.0, 0.1 .. 1.0);

Creating an infinite perspective camera.

let camera = factory.perspective_camera(60.0, 0.1 ..);

[src]

Create empty Group.

[src]

Create new Mesh with desired Geometry and Material.

[src]

Create a new DynamicMesh with desired Geometry and Material.

[src]

Create a Mesh sharing the geometry with another one. Rendering a sequence of meshes with the same geometry is faster. The material is duplicated from the template.

[src]

Create a Mesh sharing the geometry with another one but with a different material. Rendering a sequence of meshes with the same geometry is faster.

[src]

Create new sprite from Material.

[src]

Create a Sprite sharing the material with another one. Rendering a sequence of instanced sprites is much faster.

[src]

Create new AmbientLight.

[src]

Create new DirectionalLight.

[src]

Create new HemisphereLight.

[src]

Create new PointLight.

[src]

Create a Sampler with default properties.

The default sampler has Clamp as its horizontal and vertical wrapping mode and Scale as its filtering method.

[src]

Create new Sampler.

[src]

Create new ShadowMap.

[src]

Create a basic mesh pipeline using a custom shader.

[src]

Create new UI (on-screen) text. See Text for default settings.

[src]

Create new audio source.

[src]

Map vertices for updating their data.

[src]

Interpolate between the shapes of a DynamicMesh.

[src]

Load TrueTypeFont (.ttf) from file.

Panics

Panics if I/O operations with file fails (e.g. file not found or corrupted)

[src]

Load texture from pre-loaded data.

[src]

Load texture from file, with default Sampler. Supported file formats are: PNG, JPEG, GIF, WEBP, PPM, TIFF, TGA, BMP, ICO, HDR.

[src]

Load texture from file, with custom Sampler. Supported file formats are: PNG, JPEG, GIF, WEBP, PPM, TIFF, TGA, BMP, ICO, HDR.

[src]

Load cubemap from files. Supported file formats are: PNG, JPEG, GIF, WEBP, PPM, TIFF, TGA, BMP, ICO, HDR.

[src]

Load mesh from Wavefront Obj format.

[src]

Load audio from file. Supported formats are Flac, Vorbis and WAV.

Trait Implementations

Auto Trait Implementations

impl !Send for Factory

impl !Sync for Factory