         if not s? or (Math.abs(@_last_scale - s) < 0.000001 and not force)
             return
         @_last_scale = s
-        if @_text?
-            for sprite in @_text
-                sprite.scale.set s, s, s
-        if @_frame_labels?
-            for sprite in @_frame_labels
-                sprite.scale.set s, s, s
         if @_points?
             for z in @_points
                 c = z[1]


    addText: (opts) ->
        opts = defaults opts,
            loc              : [0,0,0]
            text             : required
            fontsize         : 12
            fontface         : 'Arial'
            material         : required
            constant_size    : true  # if true, then text is automatically resized when the camera moves;
            in_frame         : true
            # WARNING: if constant_size, don't remove text from scene (or if you do, note that it is slightly inefficient still.)

        # make an HTML5 2d canvas on which to draw text
        canvas = document.createElement 'canvas'
        canvas.width   = 300  # this determines max text width; beyond this, text is cut off.
        canvas.height  = 150
        context = canvas.getContext '2d'  # get the drawing context

        # set the fontsize and fix for our text.
        context.font = 'Bold ' + opts.fontsize + 'px ' + opts.fontface
        context.textAlign = 'center'

        # set the color of our text
        context.fillStyle = rgb_to_hex opts.material.color

        # actually draw the text -- right in the middle of the canvas.
        context.fillText opts.text, canvas.width/2, canvas.height/2

        # Make THREE.js texture from our canvas.
        texture = new THREE.Texture canvas
        texture.needsUpdate = true

        # Make a material out of our texture.
        spriteMaterial = new THREE.SpriteMaterial
            map     : texture

        # Make the sprite itself.  (A sprite is a 3d plane that always faces the camera.)
        sprite = new THREE.Sprite spriteMaterial

        # Move the sprite to its position
        position = @aspect_ratio_scale opts.loc...
        sprite.position.set position...

        # If the text is supposed to stay constant size, add it to the list of constant size text,
        # which gets resized on scene update.
        if opts.constant_size
            if not @_text?
                @_text = [sprite]
            else
                @_text.push sprite

        # Finally add the sprite to our scene
        if opts.in_frame
            @updateBoundingBox sprite
        @scene.add sprite
        return sprite

    addText3d: (opts) ->
        opts = defaults opts,
            text        : required
            loc         : [0, 0, 0]
            rotation    : undefined # by default will always face the camera
            size        : 1
            depth       : 1
            material    : required
            in_frame    : true



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

                if textSize is 0
                    return
