Struct three::Factory [] [src]

pub struct Factory { /* fields omitted */ }

Factory is used to instantiate game objects.

Methods

impl Factory
[src]

Create new empty Scene.

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

Create new Perspective Camera. It's used basically to render 3D.

Create empty Group.

Create new Mesh with desired Geometry and Material.

Create a new DynamicMesh with desired Geometry and Material.

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

Create new sprite from Material.

Create new AmbientLight.

Create new DirectionalLight.

Create new HemisphereLight.

Create new PointLight.

Create new ShadowMap.

impl Factory
[src]

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

Load mesh from Wavefront Obj format.

Note

You must store Vec<Mesh> somewhere to keep them alive.

Update the geometry of DynamicMesh.