     fade = (from, to, duration) ->
         (text_object) ->
             i = d3.interpolate from, to
-            getTransitionPromise(i, duration)(text_object)
+            getFadePromise(i, duration)(text_object)
 
     fadeTo = (to, duration) ->
         (text_object) ->

                        @camera.position.y = y(t)
                .each "end", resolve

    getTransitionPromise = (interpolator, duration) ->
        (text_object) ->
            new Promise (resolve) ->
                d3.select(text_object).transition()

                text_object.children[0].material.uniforms.opacity.value
            else 0
            i = d3.interpolate current, to
            getFadePromise(i, duration) text_object

    fadeOut = (text_object) ->
        i = d3.interpolate(0.5, 0)
        getFadePromise(i)(text_object)

    fadeIn = (text_object) ->
        i = d3.interpolate(0, 0.5)
        getFadePromise(i)(text_object)

    setTextObject: (node) =>
        text_object = @getLineObject(node.val)
