             z0 -= 1
         ###
 
-        min = @boundingBox.geometry.boundingBox.min.clone()
-        max = @boundingBox.geometry.boundingBox.max.clone()
-        avg = min.clone().add(max).divideScalar(2)
-        dim = max.clone().sub(min)
+        min = @boundingBox.geometry.boundingBox.min
+        max = @boundingBox.geometry.boundingBox.max
+        avg = @boundingBox.geometry.boundingBox.center()
+        dim = @boundingBox.geometry.boundingBox.size()
 
         @_center = avg
 


            @matrixWorldNeedsUpdate = true

        if not @_3dText?
            @_3dText = [mesh]
        else
            @_3dText.push mesh

        if opts.in_frame
            @updateBoundingBox mesh
        @scene.add mesh

    add_line: (opts) ->
        opts = defaults opts,

            # add the bounding box to the scene
            @scene.add @boundingBox

            if @frameOpts.labels and not @_labeled
                @_labeled = true

                maxDim = Math.max(dim.x, dim.y, dim.z)
                textSize = Math.min(dim.x, dim.y, dim.z)/10
                textDepth = textSize/100

                if textSize is 0
                    return

                frameColor = [@frameColor.r, @frameColor.g, @frameColor.b]
                offset = maxDim*0.05

                addLabel = (loc, text) =>
                    loc2 = new THREE.Vector3 loc...
                    if offsetDirection[0] is '+'
                        loc2[offsetDirection[1]] += offset*0.75
                    else if offsetDirection[0] is '-'
                        loc2[offsetDirection[1]] -= offset*0.75
                    loc2 = [loc2.x, loc2.y, loc2.z]

                    @add_line
                            points     : [loc, loc2]
                            thickness  : @frameOpts.thickness*4
                            in_frame   : false
                            material   :
                                    color   : frameColor
                                    opacity : 1

                    text = @add_3dtext
                            loc         : loc
                            text        : text
                            size        : textSize
                            depth       : textDepth
                            in_frame    : false
                            material    :
                                    color   : frameColor
                                    opacity : 1

                    textBox = text.geometry.boundingBox.size()
                    extraOffset = Math.max(textBox.x, textBox.y, textBox.z)*0.5
                    realOffset = offset + extraOffset
                    if offsetDirection[0] is '+'
                        text.position[offsetDirection[1]] += realOffset
                    else if offsetDirection[0] is '-'
                        text.position[offsetDirection[1]] -= realOffset

                format = (vec, coord) =>
                    num = vec[coord]/@opts.aspect_ratio[coord]
                    Number(num.toFixed 2).toString()

                offsetDirection = ['-','y']
                addLabel [max.x, min.y, min.z], format(min, 'z')
                addLabel [max.x, min.y, avg.z], "z = #{format avg, 'z'}"
                addLabel [max.x, min.y, max.z], format(max, 'z')

                offsetDirection = ['+','x']
                addLabel [max.x, min.y, min.z], format(min, 'y')
                addLabel [max.x, avg.y, min.z], "y = #{format avg, 'y'}"
                addLabel [max.x, max.y, min.z], format(max, 'y')

                offsetDirection = ['+','y']
                addLabel [max.x, max.y, min.z], format(max, 'x')
                addLabel [avg.x, max.y, min.z], "x = #{format avg, 'x'}"
                addLabel [min.x, max.y, min.z], format(min, 'x')

    add_obj: (opts) ->
        opts = defaults opts,
