Published on

THREE spaces

Authors
  • avatar
    Name
    Antoine BERNIER
    Twitter

THREE spaces

Related article: Change of basis

"Space"

In a 3d environment, a "space" is defined by 3 perpendicular axes and an origin: image

It allows us to locate any "point" in this space, by its 3 coordinates components: image

In THREE, a such space is called an Object3D.

World space

A default "world" space will always exist, the Scene: image

const scene = new THREE.Scene()

Any other "object" in the scene has also its own "space", typically a Mesh — which is an Object3d: image

const cube = new THREE.Mesh(/* ... */)
scene.add(cube)

NB: A Camera is also an Object3D and has its own "space" too.

Topology

Scene is the root of any "object":