         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)
+    chainedFadeIn: (array, duration) ->
+        reduction = (promise, curr, index, array) ->
+            promise.then ->
+                # debugger
+                fadeToArray(1, 1000) curr._text_object.children
+            # addFadeOpacityTransition(1, 1000, curr._text_object)(prev)
+            # prev.transition()
+            #     .call (t) ->
+            #         d3.select curr._text_object
+                # .duration duration
+                # # .tween "fadeOpacity", fadeOpacityTween(1, curr._text_object)
+                # .tween "fadeOpacity", ->
+                #     obj = curr._text_object
+                #     from = obj.material.uniforms.opacity.value
+                #     i = d3.interpolate from, to
+                #     (t) ->
+                #         obj.material.uniforms.opacity.value = i(t)
+        # transition = array.reduce reduction, d3.transition().duration(0)
+        promise = array.reduce reduction, Promise.resolve()
 
     animateLines: (root) =>
 

                        parent = node._parent
                        promises = siblings.concat(parent).map (child) ->
                                fadeToArray(0, 1000) child._text_object.children
                        Promise.all promises
                    return true
                .then =>
                    # Fade in children
                    if node.children?
                        promises = node.children.map (child) =>

                            # Get the array of letters for the target word only
                            children = @getWordObjects child._text_object, node.word

                            # The fade functions expect a "children" property
                            # fadeTo(1, 1000) children: word
                            fadeToArray(1, 1000) children
                        return Promise.all promises
                .then =>
                    if next_child?
                        @chainedFadeIn node.children, next_child
                .then =>
                    if next_child?
                        fadeToArray(1, 1000) next_child._text_object.children

                obj.position.y = parent_y + offset_from_parent * line_height

            parent.children.forEach alignToNode(parent)
            parent.children.forEach traverse

        traverse root
