Crate three [] [src]

Three.js inspired 3D engine in Rust.

Macros

three_object_wrapper

Implements conversion traits on a type wrapping a three-rs type. Useful for when you wrap a three-rs type with your own struct. Allows you to use that struct in place of any three-rs object.

Structs

AmbientLight

Omni-directional, fixed-intensity and fixed-color light source that affects all objects in the scene equally.

Camera

Camera is used to render Scene with specific Projection.

DebugQuadHandle

Handle for additional viewport to render some relevant debug information. See Renderer::debug_shadow_quad.

DirectionalLight

The light source that illuminates all objects equally from a given direction, like an area light of infinite size and infinite distance from the scene; there is shading, but cannot be any distance falloff.

DynamicMesh

A dynamic version of a mesh allows changing the geometry on CPU side in order to animate the mesh.

Factory

Factory is used to instantiate game objects.

Geometry

A collection of vertices, their normals, and faces that defines the shape of a polyhedral object.

GeometryShape

A shape of geometry that is used for mesh blending.

Group

Groups are used to combine several other objects or groups to work with them as with a single entity.

HemisphereLight

HemisphereLight uses two different colors in opposite to AmbientLight.

Input
KeyAxis
Mesh

Geometry with some Material.

Node

Fat node of the scene graph.

NodeInfo

General information about scene Node.

NodeTransform

Position, rotation and scale of the scene Node.

Object

Object represents an entity that can be added to the scene.

OrbitControls
Orthographic

Orthographic projection parameters. See Orthographic projection.

Perspective

Perspective projection parameters. See Perspective projection.

PointLight

Light originates from a single point, and spreads outward in all directions.

Renderer

Renders Scene by Camera.

Scene

Game scene contains game objects and can be rendered by Camera.

ShadowMap

ShadowMap is used to render shadows from PointLight and DirectionalLight.

Sprite

Two-dimensional bitmap that is integrated into a larger scene.

Texture

An image applied (mapped) to the surface of a shape or polygon.

Timer
Window

Window is the core entity of every three-rs application.

Enums

Background

Background type.

Button
Key
Material

Material is the enhancement of Texture that is used to setup appearance of Mesh.

ShadowType

Shadow type is used to specify shadow's rendering algorithm.

Constants

AXIS_DOWN_UP
AXIS_LEFT_RIGHT
KEY_ESCAPE
KEY_SPACE
MOUSE_LEFT
MOUSE_RIGHT

Type Definitions

Color

Color represented by 4-bytes hex number.

ColorFormat

The format of the back buffer color requested from the windowing system.

DepthFormat

The format of the depth stencil buffer requested from the windowing system.

NodePointer

Pointer to a Node