# Skybox background

**URL:** <https://discourse.threejs.org/t/skybox-background/5259>\
**Category:** Questions\
**Created:** [December 6, 2018, 8:38pm UTC](https://discourse.threejs.org/t/skybox-background/5259 "2018-12-06T20:38:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gigamesh](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gigamesh](https://discourse.threejs.org/u/gigamesh)\
**Post date:** [December 6, 2018, 8:38pm UTC](https://discourse.threejs.org/t/skybox-background/5259/1 "2018-12-06T20:38:17Z")

</div>

I’m trying to add a skybox background to this but I can’t figure out what is missing in my code:  
[http://threejs-logo-demo.s3-website-us-west-1.amazonaws.com/](http://threejs-logo-demo.s3-website-us-west-1.amazonaws.com/)

source:

> <https://github.com/gigamesh/threejs-demo/blob/mobile-interactive-device-orientation/src/components/PureGold.js>

Any ideas would be much appreciated!

---

<div class="post-metadata">

**Author:** ![marquizzo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/marquizzo/32/25192_2.png) [@marquizzo](https://discourse.threejs.org/u/marquizzo)\
**Post date:** [December 6, 2018, 9:10pm UTC](https://discourse.threejs.org/t/skybox-background/5259/2 "2018-12-06T21:10:21Z")

</div>

Looks like you’re creating the skybox in a very complex way. You could just simply do

```
this.scene = new THREE.Scene();
const textureCube = textureloader.load([
    ....
]);
this.scene.background = textureCube;

```

Three.js will handle all the mesh and material creation for you.

---

<div class="post-metadata">

**Author:** ![gigamesh](https://avatars.discourse-cdn.com/v4/letter/g/5daacb/32.png) [@gigamesh](https://discourse.threejs.org/u/gigamesh)\
**Post date:** [December 6, 2018, 9:18pm UTC](https://discourse.threejs.org/t/skybox-background/5259/3 "2018-12-06T21:18:52Z")

</div>

thank you! I was copying/pasting code from one of the examples. Grabbed way more than I needed to. 🙂
