A sky and a ground

Give the scene a sky to stand under and a ground to stand on.

Your scene is drawn in 3D by your own browser, inside this tab. No headset needed.

A sky

Without a sky, the scene is surrounded by white. <a-sky> is a huge ball around everything, coloured on the inside.

Give it a color.

Example
<a-scene>
  <a-sky color="lightskyblue"></a-sky>
  <a-box position="0 1 -3" color="tomato"></a-box>
</a-scene>

Your turn: a night sky

Change what surrounds the scene.

Practice task

Write a scene with a sky coloured midnightblue and a white sphere at position 0 2 -5.

Your answer is run and checked in the lesson. Create a free account to try it.

A ground

<a-plane> is a flat sheet with a width and a height. On its own it stands upright, like a wall facing you.

To make a floor, lay it flat by tipping it back a quarter turn: rotation="-90 0 0".

Shapes sit on the floor when their position is half their own height above it.

Example
<a-scene>
  <a-plane position="0 0 -4" rotation="-90 0 0" width="8" height="8" color="darkseagreen"></a-plane>
  <a-box position="0 0.5 -4" color="sienna"></a-box>
</a-scene>

Your turn: lay a floor

A plane needs turning to become a floor.

Practice task

Write a scene with a green plane that is 10 wide and 10 high, laid flat with rotation -90 0 0.

Your answer is run and checked in the lesson. Create a free account to try it.

A small world

A sky, a ground and a few shapes are enough to make a place.

Run the example and look around. Then change the numbers and colours and run it again: that is the quickest way to get a feel for the space.

Example
<a-scene>
  <a-sky color="lightskyblue"></a-sky>
  <a-plane position="0 0 -4" rotation="-90 0 0" width="12" height="12" color="darkseagreen"></a-plane>
  <a-cylinder position="-2 1 -5" radius="0.2" height="2" color="saddlebrown"></a-cylinder>
  <a-sphere position="-2 2.4 -5" radius="0.9" color="forestgreen"></a-sphere>
  <a-box position="1.5 0.5 -4" color="sienna"></a-box>
</a-scene>