           xmax: vertices[0].x
           ymax: vertices[0].y
         })
-        _areaBox.xmin = _areaBox.xmin * wall.scale.x + wall.position.x
-        _areaBox.ymin = _areaBox.ymin * wall.scale.y + wall.position.y
-        _areaBox.xmax = _areaBox.xmax * wall.scale.x + wall.position.x
-        _areaBox.ymax = _areaBox.ymax * wall.scale.y + wall.position.y
+        _areaBox.xmin = _areaBox.xmin * scale.x + position.x
+        _areaBox.ymin = _areaBox.ymin * scale.y + position.y
+        _areaBox.xmax = _areaBox.xmax * scale.x + position.x
+        _areaBox.ymax = _areaBox.ymax * scale.y + position.y
+        console.debug("_areaBox", _areaBox)
+        _areaBox
 
 
       #

          _scene.add(light)
        )
        wall = scene3d.objects.wall
        vertices = wall.geometry.vertices
        _areaBox = _.reduce(vertices, (acc, v) ->
          acc.xmin = Math.min(acc.xmin, v.x)
          acc.ymin = Math.min(acc.ymin, v.y)

        axis.scale.set(0.1, 0.1, 0.1) # default length of axis is 100
        _scene.add(axis)

      makeLight = () ->
        mainlight = new THREE.DirectionalLight( 0xffffff )
        #shadow stuff
        mainlight.shadowCameraNear = 50
        mainlight.shadowCameraFar = 1000

        mainlight.castShadow = true
        mainlight.shadowDarkness = 0.5
        mainlight.shadowCameraVisible = false
        mainlight.shadowMapWidth = 2048
        mainlight.shadowMapHeight = 2048

        #light target
        lightTarget = new THREE.Object3D()
        lightTarget.name = "lightTarget"
        mainlight.target = lightTarget
        lightTarget.position.set(20,0,0)

        lightTarget.add( mainlight ) #adding mainlight as child to lightTarget (easy rotation controls via parent)
        mainlight.position.set(0,500,0) # moving mainlight away from its parent
        lightTarget.rotation.set(0,-0.5,1) #setting elevation and azimuth via mainlight's parent
        #lightTarget
        mainlight

      #TODO support spawn animation
      spawnObj = (id, pos, obj3d) ->
        ids = id.split('>')
