title: How to use ThreeJS with VueJS
body: <p>I want to use threeJS, so i install it with npm i three --save. I followed basic tutorial in threeJS documentation but i got an error.</p>
  
  <pre><code>  mounted () {
      this.initThree();
    },
    methods: {
      initThree() {
        this.scene = new THREE.Scene();
        this.camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
  
        this.renderer = new THREE.WebGLRenderer( { canvas: document.getElementById( "background" ), alpha: true, antialias: true } );
        this.renderer.setSize( window.innerWidth, window.innerHeight );
  
        let geometry = new THREE.BoxGeometry( 1, 1, 1 );
        let material = new THREE.MeshBasicMaterial( { color: 0x0000ff } );
        this.cube = new THREE.Mesh( geometry, material );
        this.scene.add( this.cube );
  
        this.camera.position.z = 5;
        this.animate()
  
      },
  
      animate() {
  
        this.cube.rotation.x += 0.01;
        this.renderer.render( this.scene, this.camera );
        requestAnimationFrame( this.animate() );
  
      }
    }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/m7WT5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m7WT5.png" alt="Error"></a></p>