         begin = getWordIndex text_object._line, word
         end = begin + word.length
         text_object.children.slice begin, end
+
+    chainedFadeIn: (children, target_child, duration) ->
+        # transition = (prev, curr, index, array) ->
+        #     prev.transition()
+        #         .duration duration
+        #         .tween "fadeOpacity", ->
+        #             from = this.material.uniforms.opacity.value
+        #             i = d3.interpolate from, to
+        #             (t) ->
+        #                 this.material.uniforms.opacity.value = i(t)
 
     animateLines: (root) =>
 

                        return Promise.all promises
                .then =>
                    if next_child?
                        fadeToArray(1, 1000) next_child._text_object.children
                        @panCameraToBBox next_child._text_object
                .then ->

                            this.material.uniforms.opacity.value = i(t)
                    .each "end", resolve

    fadeOpacityTween = (to) ->
        ->
            from = this.material.uniforms.opacity.value
            i = d3.interpolate from, to
            (t) ->
                this.material.uniforms.opacity.value = i(t)

    getFadeLettersPromise = (to, duration) ->
        (text_object) ->
            new Promise (resolve) ->
                d3.selectAll(text_object.children)
                    .transition()
                    .duration duration
                    .tween "fadeOpacity", fadeOpacityTween(to)
                    # .tween "fadeOpacity", ->
                    #     from = this.material.uniforms.opacity.value
                    #     i = d3.interpolate from, to
                    #     (t) ->
                    #         this.material.uniforms.opacity.value = i(t)
                    .each "end", resolve


